lone-lang / lone

The standalone Linux Lisp
GNU Affero General Public License v3.0
301 stars 8 forks source link

Graphics - to add to the list of features? #2

Open paul-hammant opened 5 months ago

paul-hammant commented 5 months ago

I appreciate it may not be done yet, but the ability to make fat UI applications (or not) would be a great addition to the list.

Context: QML is interesting, but I think they missed an opportunity - https://paulhammant.com/2016/11/15/qmls-squandered-opportunity/. In that post I talk of a calculator and there are loads of attempts at making it as a demo in different techs. The web has many, and one or two are "single file" for that. Of course Lisp is the grandpappy language for elegant pseudo-declarative apps - https://paulhammant.com/2013/03/28/interface-builders-alternative-lisp-timeline so I'd imagine it was possible and terse/elegant. That's racing ahead as lone-lang should note whether it can do UI or not :)

Great work though!

matheusmoreira commented 5 months ago

Hello, thanks for the interest! This is certainly something that I want to do. Right now it seems so far away from reality though.

I'm currently focusing on implementing the beginnings of what will become lone's foreign interface: binary structure manipulation functions for the bytes module. It will fulfill the short term goal of allowing manipulation of the kernel data structures but there's no doubt that it will enable further compatibility work. Once I implement calling conventions and an ELF loader, lone will be able to look up and call native functions. This enables things like bindings to Qt, GTK or other toolkits. Given the existence of XCB, it should also be possible to create a basic X client without the need for any foreign interface at all.

What I really want though is OpenGL ES bindings. With system calls alone it should be possible to set up kernel mode setting without depending on any toolkit at all. That graphics context can then be passed to OpenGL ES in order to get hardware accelerated graphics support. Now that's something to dream about...

For any of these things to happen though, I have to finish the foreign interface code... There's quite a bit of unfinished work in my devices that I haven't committed yet. The reason for that is life happened. I got engaged at the end of the last year and have been somewhat busy. I will get back to it as soon as I can.

danielsz commented 5 months ago

Parabéns pelo noivado !