Clog – The Common Lisp Omnificent GUI
github.com
github.com
Oh huh, that's just a good tip in general!
I might even start using this for some of my own projects. A wonderful thing about Common Lisp is that the code you wrote ten years ago tends to keep working forever. That might not hold true here, since this project has to interface with browsers which tend to shift like the air, but I live in hope.
The difference though is the possibilities enabled by having it all running in Common Lisp. Dynamism, speed.. enjoyment :)
Hoping this goes well.
And does this just let you do html/browser events in CL or does it have some solutions for dealing with the complexity of maintaining a correct view? I.e. is it trying to solve the problem that JavaScript is not CL, that JavaScript can’t easily access server resources, or the problem that react tries to solve?
it clearly can suffer from interactivity issues, but for me its been surprisingly snappy for the kind of monitoring UIs with limited interaction that I use it for.
have done in Go, C, Rust, python, atmel assembly (and recently DDlog!)..and probably some other environments too. just need a web socket implementation. the js stub I carry around is ~200 lines and gets served off the same process
and yes - a big win is that you get to access state on the server directly instead of packaging it up, sending it across, unwrapping it, etc. oh right, you also get to do everything in your primary programming environment.
it doesn't address view maintenance specifically, but if the server is delta-based already (admittedly an assumption), then you don't have to do anything really.
i prefer justpy's approach because they work with vue on the frontend, taking advantage of all the work that has already been done on generating good browser UIs and just applying a python interface to it.
How are the leaky abstractions and performance?
Used it to great success to create interactive web UI completely in Python.
Does anyone know of a common lisp library similar to R's shiny? It provides a simple way to define the UI elements and how they intereact with the user's actions: https://shiny.rstudio.com/articles/basics.html
At some point I thought about porting the first release of shiny, which was relatively simple, and keep adding features but I realized that there is a lot of code in the javascript/browser side and I would never find my way around it.
The most relevant thing I found was this clojure(script) reactive web framework from Kenny Tilton: https://github.com/kennytilton/matrix
That said, it presents as a “GUI”, but it’s really more similar to Blazor or LiveView than, say, Qt or even Electron.
What’s a “real” GUI framework? Maybe you mean one that uses the provided operating system’s APIs directly, sometimes called “native GUIs”.
Most "browser-based" applications don't even get basic keyboard shortcuts right. Only few of them are really usable and not a single one has better functionality then its native counterparts. There is a bit of a bubble around web "apps" created by a startup culture. The problem is that most of those startups die within a few years. I'm not saying that a browser-based app cannot be useful, but it's equally important to be aware that many types of applications require a real GUI. It doesn't have to be native (e.g. Qt is not "native" in the traditional sense), but it needs to be fairly complete and respect platform APIs.
Native, cross-platform, nice-looking GUIs seem to be getting harder and harder to make each year as native toolkits and styles continue to diverge. LispWorks and Allegro offer solutions [1,2], but they’re proprietary and definitely won’t let you do anything super slick.
GUI toolkits are no longer plain old C APIs, now we have a zoo of them in a bunch of different languages and frameworks.
How can we get back to an age where we can throw up text boxes, buttons, and canvases without the browser and without C++?
I’ve been hopeful that IUP [3] would expand support for native macOS GUIs, but it doesn’t seem like it’s happening any time soon.
[1] LispWorks CAPI http://www.lispworks.com/products/capi.html
[2] https://franz.com/products/allegrocl/acl_gui_tools.lhtml
[1] https://www.outrunlabs.com/revery/