News for hackers. Stuff that matters.
Re:Mezzano on Librebooted ThinkPads by Decabytes on Saturday October 16, 2021 @08:07AM (#28887267)
How is it even possible to write a kernel in Common Lisp? I thought kernels didn’t have enough to support the run time environment of languages that weren’t C, C++, or Rust?

Even Rust C++, and C require special compilation without parts of the Stdlib to running in the kernel.

Re:Mezzano on Librebooted ThinkPads by cyberbanjo on Saturday October 16, 2021 @02:28PM (#28890166)
Common Lisp always struck me (not that I'm familiar) as a language lower than C, and higher than hell. Looks like high level assembler in places.

https://github.com/froggey/Mezzano/blob/master/supervisor/x8...

Re:Mezzano on Librebooted ThinkPads by jonjacky on Saturday October 16, 2021 @03:09PM (#28890508)
It is. The expressions that look like this:

(sys.lap-x86:xor32 :eax :eax)

are assembly language statements.

Re:Mezzano on Librebooted ThinkPads by lispm on Saturday October 16, 2021 @04:19PM (#28891112)
LAP = Lisp Assembly Program
Re:Mezzano on Librebooted ThinkPads by pjmlp on Sunday October 17, 2021 @02:25AM (#28894406)
Just like with Rust, C++, and C, you have a language subset for the kernel, and then enjoy the full language on userspace.
Re:Mezzano on Librebooted ThinkPads by throwaway81523 on Saturday October 16, 2021 @03:49AM (#28886257)
I keep seeing "Librebooted" and thinking it says "liberated". I guess in a certain way though, that is the same thing.
Re:Mezzano on Librebooted ThinkPads by criddell on Friday October 15, 2021 @05:21PM (#28883260)
Is this at all like Symbolics' Lisp Machines from the 80's?
Re:Mezzano on Librebooted ThinkPads by cardanome on Friday October 15, 2021 @05:42PM (#28883463)
Nope. It is a modern from scratch attempt at writing an OS purely in Common Lisp.

It is still very far from being useful for daily use or even getting close to the development experience of an Lisp Machine but for an Hobbyist OS, it is already quite impressive. Most OS projects don't even make it to the runs on real hardware step.

Re:Mezzano on Librebooted ThinkPads by johnlorentzson on Saturday October 16, 2021 @05:39AM (#28886651)
The only notable thing they share is that they were both written in Lisp.
Re:Mezzano on Librebooted ThinkPads by jmercouris on Friday October 15, 2021 @04:19PM (#28882671)
This is fantastic! This is my ultimate dream!
Re:Mezzano on Librebooted ThinkPads by eggy on Friday October 15, 2021 @06:37PM (#28883944)
I am playing with and learning April[1], a subset of APL that compiles to Lisp. It is a blast for me, because I had programmed a bit in Lisp in the 90s, and then I found J around 2011/12. I always loved Lisp, and I didn't really get into Clojure, although it is a nice language. I had heard of APL when I had my Commodore PET 2001 in 1977 and my Vic20 later, but I never got to play with it. Once I did back in 2015, and the APL characters resonated with me (hard to find keyboard input workarounds etc.) because I was free of the associations of ASCII and the symbols made sense as I learned it a bit in their graphic representation and function. I have dreamed of having a real, modern Lisp Machine, so maybe I can get some of that with Mezzano. I am not sure how hard or easy it would be for April's creator, Andrew Sengul (##phantomics) to swing that, but I would participate in a crowdsourcing of it (on The Framework notebook[2] would be the icing on the cake!). I don't know enough of Mezzano to say how vialbe it really is, but I am hoping! I didn't quite get April right away, but I am really starting to appreciate it (with Andrew's help, and the APL community). Andrew's 'Why April' section, poetic and seemingly hyperbolic, is ringing less hyperbolic and more true as I get to know this twisted marriage of PLs: Lisp's legacy, tons of libs, emacs/slime, debugging, and parentheses, yes those beautiful things, to handle all the "front end" programming you could ever need, to feed the array-munching and alchemy of APL. And what about Python? I refer all Pythonistas to take heed of their and MIT's sinful choice to worship the serpent and casting us out from the garden of Lisp! Just read Milton's Paradise Lost, Book X, around verse 550-ish ;)

Machine learning which is heavily based on arrays or array math in their implementation, hence the popularity of libs to handle them like Pandas and NumPy (inspired by J, by the way. Ask Wes McKinney), has some nice nuggets or implementations of an ELM (Extreme Learning Machine) in J called 'JELM'[3], CNNs in APL[4] with some benchmarks, or getting APL into optimized GPU code via Futhark[5] and apltail[6]. And under some of those covers is Haskell as a treat!

Ah, yes we live in interesting times!

A link to an HN post in 2020 by Andrew:

[0] https://news.ycombinator.com/item?id=24434717

[1] https://github.com/phantomics/april

[2] https://frame.work/

[3] https://github.com/peportier/jelm

[4] https://dl.acm.org/doi/10.1145/3315454.3329960

[5] https://futhark-lang.org/blog/2016-06-20-futhark-as-an-apl-c...

[6] https://github.com/melsman/apltail/

Milton reference for the pious (with no parentheses;) or proper line breaks, sorry!)

Now Dragon grown, larger then whom the Sun Ingenderd in the Pythian Vale on slime, Huge Python, and his Power no less he seem’d Above the rest still to retain; they all Him follow’d issuing forth to th’ open Field, Where all yet left of that revolted Rout Heav’n-fall’n, in station stood or just array, Sublime with expectation when to see In Triumph issuing forth thir glorious Chief; They saw, but other sight instead, a crowd Of ugly Serpents; horror on them fell, And horrid sympathie; for what they saw, They felt themselvs now changing; down thir arms, Down fell both Spear and Shield, down they as fast, And the dire hiss renew’d, and the dire form Catcht by Contagion, like in punishment, As in thir crime.

Re:Mezzano on Librebooted ThinkPads by Igelau on Friday October 15, 2021 @09:17PM (#28884814)
> and then I found J

At first glance I took that to mean Visual J++

Re:Mezzano on Librebooted ThinkPads by eggy on Friday October 15, 2021 @10:44PM (#28885120)
Oh, no! Bring back the MSJVM!
Re:Mezzano on Librebooted ThinkPads by finder83 on Friday October 15, 2021 @05:15PM (#28883208)
This looks really cool! May have to try it in a virtualbox or something.

Does anyone know of anything similar to this, but in an image like Pharo/smalltalk has? Would love a fully interactive Common Lisp environment, built in debugger, window system, etc (that's open source)

Re:Mezzano on Librebooted ThinkPads by xkriva11 on Saturday October 16, 2021 @04:38AM (#28886423)
There is a try to resurrect the Interlisp (https://interlisp.org/), but it is just for preserving the old Gem.

Anyway, it is a true tragedy that Genera and Interlisp do not have any modern open successor that would coin and improve the great legacy like Smalltalk has in the form of Pharo.

Re:Mezzano on Librebooted ThinkPads by lispm on Saturday October 16, 2021 @06:04AM (#28886748)
One has SBCL as a high-performance implementation of Lisp and McCLIM as a portable version of the Genera user interface management system.

https://common-lisp.net/project/mcclim/

Re:Mezzano on Librebooted ThinkPads by 7thaccount on Saturday October 16, 2021 @12:07AM (#28885465)
Isn't that the intent of slime + emacs?
Re:Mezzano on Librebooted ThinkPads by pjmlp on Saturday October 16, 2021 @03:34AM (#28886211)
Without the graphics part of Lisp Machines.
Re:Mezzano on Librebooted ThinkPads by 7thaccount on Saturday October 16, 2021 @08:34PM (#28892912)
As always, thanks for the helpful commentary! I recall watching some recent symbolics demos (someone got it running on a VM I think) and everything did look slick.
Re:Mezzano on Librebooted ThinkPads by Arcsech on Friday October 15, 2021 @04:18PM (#28882660)
This is really cool, I’ve been meaning to give Mezzano a shot sometime.
Re:Mezzano on Librebooted ThinkPads by Abhinav2000 on Friday October 15, 2021 @04:23PM (#28882726)
Can somebody elaborate what is Mezzano and how it compares to Linux?
Re:Mezzano on Librebooted ThinkPads by varjag on Friday October 15, 2021 @04:32PM (#28882834)
It's best described as completely something else than Linux.

Mezzano is an OS and desktop environment written from scratch in Common Lisp (including a CL compiler). It is a hobbyist project with several contributors but with most of the work done by one prolific programmer.

Re:Mezzano on Librebooted ThinkPads by Abhinav2000 on Friday October 15, 2021 @04:51PM (#28883003)
I see, thanks
Re:Mezzano on Librebooted ThinkPads by 7thaccount on Friday October 15, 2021 @02:50PM (#28881529)
That's pretty cool. I like these little tiny OSs.
Re:Mezzano on Librebooted ThinkPads by bananamerica on Friday October 15, 2021 @03:33PM (#28882087)
Someone tell Stallman he can stop using a typewriter!
Re:Mezzano on Librebooted ThinkPads by bruce343434 on Friday October 15, 2021 @05:29PM (#28883331)
From the video, the OS seems to have some considerable input latency. How snappy does it feel to use?
Re:Mezzano on Librebooted ThinkPads by a0-prw on Friday October 15, 2021 @03:21PM (#28881954)
Very cool. Did you film it with a helmet-mounted GoPro? ;)
Re:Mezzano on Librebooted ThinkPads by vadfa on Saturday October 16, 2021 @03:49AM (#28886254)
To the webmaster: the video is webm only so it does not work on iphones.
Re:Mezzano on Librebooted ThinkPads by josteink on Saturday October 16, 2021 @04:24AM (#28886375)
If you post the url here people can probably play it through VLC though.
Re:Mezzano on Librebooted ThinkPads by vadfa on Saturday October 16, 2021 @04:45AM (#28886454)
Re:Mezzano on Librebooted ThinkPads by fragmede on Saturday October 16, 2021 @06:02AM (#28886738)
I'm not sure why, webm is explicitly not patent encumubered to promote cross-platform playback. Is it possible Apple is the issue here?
Re:Mezzano on Librebooted ThinkPads by arpa on Sunday October 17, 2021 @05:54AM (#28895225)
the same reason safari doesn't play ogg, but plays aac fine. Apple just want to promote their patent encumubered codecs over free ones.
Re:Mezzano on Librebooted ThinkPads by HerrMonnezza on Saturday October 16, 2021 @04:43AM (#28886447)
I can play it on Debian with Firefox, no problems.
Re:Mezzano on Librebooted ThinkPads by jraph on Saturday October 16, 2021 @04:59AM (#28886521)
Give these phones a break, it's ok for a prototype not to support every format under the sun, even the more mainstream ones. Your comparison with Debian, a well-finished product which gets a lot of money and dedicated human resources to be made polished as hell is a bit unfair.

Keep in mind WebM is only a decade old, it takes time to support a patent-free video format that has readily available implementations, including BSD-licensed software ones. I'm sure Apple will support WebM when they find some money and finally manage to bring iPhones out of beta. Not every small phone producer making it is as big as Debian.

Anyway, if the default browser does not support something it should be easy to install an alternative browser, dumb phones from fifteen years ago had this ability (remember Opera Mobile?) and I hear iPhones are a bit more advanced so I'd expect them to let you do that. What kind of web-capable half-modern device wouldn't anyway.

Re:Mezzano on Librebooted ThinkPads by vadfa on Saturday October 16, 2021 @06:46AM (#28886951)
You are right - Apple should bend the knee and support everything Google shoves into the web without question, just like Mozilla. That's working very well for them.
Re:Mezzano on Librebooted ThinkPads by jraph on Saturday October 16, 2021 @06:58AM (#28887002)
Come on, I don't like Google and their control on the web. I go out of my way to avoid them. But we cannot blame them for providing us with a decent video codec for which you don't need to pay patent fees. That was truly missing at the time. We had Theora but it is far from being as good. We needed a good open video format at the time.

Apple is holding back on WebM support arguably because it has interests in forcing people to keep using patent-encumbered codecs from the MPEG-LA. They did nothing for pushing an open video format for the web, quite the contrary. They are still fighting against this. Apple is the one deserving to be pointed the finger at. Let's not divert the blame here. I hate Google but we should recognize the rare good things they occasionally do.

Re:Mezzano on Librebooted ThinkPads by laurensr on Friday October 15, 2021 @05:34PM (#28883367)
I couldn't help but read this as lib-reboot but it should be read as libre-boot
Re:Mezzano on Librebooted ThinkPads by 43g34g34 on Friday October 15, 2021 @04:07PM (#28882530)
All I want is a bare metal browser. I don't want an operating system and I don't want to run chromium OS. It would be great to see a bare metal browser that implements something like Gecko.
Re:Mezzano on Librebooted ThinkPads by pb82 on Friday October 15, 2021 @04:14PM (#28882621)
Any forks of Firefox OS still alive? That comes closest.
Re:Mezzano on Librebooted ThinkPads by spijdar on Friday October 15, 2021 @04:24PM (#28882741)
Unless GP's objection to chromium OS is entirely because it's chromium, I don't think Firefox OS would be any better as it's essentially the same thing, Firefox running on Linux (not on bare metal)

Without writing the entire browser from scratch, I don't personally think there's much point to this. I suspect if you traced down the library/runtime requirements for Firefox and reimplemented them in a bare metal runtime, you'd end up with something remarkably complex and not much simpler than Linux + runtime in the end.

This is assuming you want a full browser capable of everything Firefox and Chromium are, which includes things like WebGL. If you cut out components, you can definitely reach a point where a bare metal browser is sensible, the question is how much are you willing to sacrifice from "web standards" and how much work are you willing to do reimplementing a kernel, TCP/IP stack, device drivers, etc...

Re:Mezzano on Librebooted ThinkPads by nine_k on Friday October 15, 2021 @04:57PM (#28883051)
I can imagine a unikernel running a browser.

I cannot imagine a unikernel with all the drivers ready for a reasonable variety of PC hardware, unless it's able to reuse Linux or at least FreeBSD as a source of drivers.

Re:Mezzano on Librebooted ThinkPads by toast0 on Friday October 15, 2021 @10:20PM (#28885047)
KaiOS is alive and well. You can probably find a phone or two using it wherever they sell phones.
Re:Mezzano on Librebooted ThinkPads by throwawayboise on Friday October 15, 2021 @10:43PM (#28885117)
You pretty much need an OS to run something as complex as a browser, it's just a question of whether it's included or separate.
Re:Mezzano on Librebooted ThinkPads by marcodiego on Friday October 15, 2021 @04:54PM (#28883022)
I don't know if this is exactly "bare metal". I think it uses GRUB as a hardware abstraction layer. AFAIK GRUB is not particularly high performant, so it will probably be somewhat slow.
Re:Mezzano on Librebooted ThinkPads by moonchild on Friday October 15, 2021 @05:30PM (#28883340)
It uses grub as a bootloader. At runtime, grub is gone.

Linux also uses grub as a bootloader, and has never been called slow.

Re:Mezzano on Librebooted ThinkPads by marcodiego on Friday October 15, 2021 @05:35PM (#28883387)
Thanks for correcting me. I think I misunderstood this part:

> The resulting GRUB module, mezzano.mod, is largely the KBoot Mezzano loader code, ported to use GRUB facilities for memory allocation, disk access, etc. It’s feature-complete, so I released it to Sourcehut. (I’ve only tested it on Libreboot GRUB, not GRUB loaded by other firmware implementations.)