2 ms·
I haven't tested use from Elixir yet, but in theory it should Just Work™ (e.g. by calling :otpcl.eval/1). This will be even easier once I do publish it on hex.
by yellowapple 8y ago
I haven't tested use from Elixir yet, but in theory it should Just Work™ (e.g. by calling :otpcl.eval/1). This will be even easier once I do publish it on hex.pm, since (again: in theory) it should just be a matter of including it as a dependency in your app's mix.exs. One of my first Elixir-specific goals will probably be to integrate this with Plug (and particularly Plug.Router, producing a cool hybrid between Plug and OpenBSD's pf/httpd/relayd config files).
But yeah, OTPCL/Tk would be pretty sweet, even if it has to be emulated through wxWidgets (or even through something HTML/JS-friendly; I've always dreamed of being able to generate web pages via a Tk-like API and programming style).
- sbuttgereit 8y agoOTPCL/Scenic OK... You'd probably need an additional library (that may not exist yet) for the widget aspect... But it moves the needle a bit... https://github.com/boydm/scenic https://github.com/boydm/scenic
- yellowapple 8y agoOh hell yeah. Had no idea this existed; this is awesome.
- nivertech 8y agoI was going to mentioned Scenic... The only dependency Scenic needs is OpenGL driver. I was never able to build Erlang's wx app on my Ubuntu laptop, but with Scenic it just works out of the box. IMO Tk's canvas widget can be relatively easily ported to Scenic as both based on retained mode graphics, only in Scenic each item on the canvas will be represented by a gen_server.
- yellowapple 8y agoYeah, a one(-or-more)-process-per-widget approach is exactly how I'd envision an Erlangy GUI framework (and is effectively how ordinary Tk works, except with tasks/events processed by an event loop instead of Erlang's preemptive multitasking). Scenic looks like a great starting point in that direction. I wonder how Wings3D does things? I'd imagine it uses wxWidgets, but I never actually thought to check...