freenode/#sicl - IRC Chatlog
Search
4:17:45
no-defun-allowed
The design of CLOSOS reminds me of a statement Dan Ingalls made, "An operating system is a collection of things that don't fit into a language. There shouldn't be one." CLOSOS moves a lot of "operating system" components, like process isolation, into language components, like first class global environments (though those two examples are far from equivalent).
4:23:49
no-defun-allowed
So it is natural that you can test a lot of features as if it was just a programming language implementation. Still, I admit I want to see how writing drivers in Common Lisp goes, but having enough of some operating system to be able to debug everything is very convenient.
4:45:49
beach
I suppose most device drivers are written in C. And the problem with that way is that C is not great for capturing commonalities and not great for modularity.
4:45:58
moon-child
no-defun-allowed: re ingalls's comment, that's interesting, and I'm not sure what to think of it. My view has always been that an OS _is_ a programming languaage (or, at least, an implementation of one). Things like process isolation are more implementation details than anything (modulo a few untidy corners like debugging and linux's recent userfaultfd)
4:46:44
no-defun-allowed
It was from his "Design Principles Behind Smalltalk" article <https://www.cs.virginia.edu/~evans/cs655/readings/smalltalk.html>. Some parts don't make sense in a Common Lisp context, and the industry eventually went for better compilers over special or user-microcodable hardware, but otherwise I find it inspiring.
4:47:09
beach
That's why I keep referring to IOKit. It is written in C++ I think but we could do much better with CLOS.
4:49:49
beach
And I would very much like to see someone design a CLOS-based protocol ("protocol" as in the generalization of an "interface") for device drivers.
4:51:22
moon-child
an interesting project to look at there, if nothing more than for inspiration as to what the protocol in question should contain, is udi
11:40:00
lukego
though maybe it's more practical to define an idealized protocol for communicating with those devices - "plan 9 style" - and have a box that does the relevant messy conversion e.g. a raspberrypi running Linux.
11:41:19
lukego
but I guess that "bare metal" discussions can go meta pretty quickly e.g. when "metal" becomes "qemu" which is really just a piece of software providing arcane legacy ABIs based on historical hardware systems, etc.
11:53:15
lukego
SqueakNOS is an interesting project in the Dan Ingalls tradition: http://squeaknos.blogspot.com/. Interesting that it's still going, I looked at it many years ago and they were writing serious driver code etc in the full interactive/introspective Smalltalk world (as people describe Genera.) But I think Dan Ingalls himself just does Javascript-based stuff these days.
11:54:08
no-defun-allowed
Am I looking in the right place (SourceForge) to see that "it's still going"?
11:54:51
no-defun-allowed
Sadly when I tried to boot SqueakNOS in a VM and on an old laptop, it was unresponsive after rendering the Squeak desktop.
11:56:40
lukego
fwiw the last time I went down this route my compromise was to target the OLPC XO and use the Forth firmware as the bottom layer. I got Squeak running on that pretty OK and integrated with the hardware blitter IIRC. I lost that code though. But I still have related code doing the same stuff for a toy non-interactive smalltalk dialect at https://github.com/lukego/xoos/tree/master/xoos
11:57:12
lukego
but OLPC XO is a pretty random target especially these days, I guess e.g. Raspberry Pi would make a lot more sense if there's some similar layer available for that.
11:58:18
lukego
XO was nice because the AMD Geode chipset was simple and easy to program e.g. once you add PEEK and POKE primitives to the language you can drive the graphics hardware quite easily e.g. https://github.com/lukego/xoos/blob/master/xoos/Geode.st
11:58:44
lukego
so even the layer of Forth code was pretty thin because the hardware interfaces were pretty sane.
11:59:42
lukego
guessing RPi is not so amenable although maybe that new chip that RPi Foundation did from scratch could be interesting? quite a far cry from an "Alto" though
12:04:44
lukego
aside: I'm going down a multi-year rabbit hole now because the time I've spent writing drivers in recent years has basically convinced me that "people who are serious about software should build their own hardware" (- Alan Kay) i.e. life is too short to write drivers for other people's hardware that was usually made with sane driver interfaces as a low priority.
12:09:13
lukego
case in point: OLPC XO 1.0 had a really nice AMD Geode SoC with sane hardware interfaces all nicely documented publicly, and then the very next iteration 1.5 had a VIA SoC that was pure misery but won on price/performance (the Geode was horrifically slow -- maybe they "wasted" too much engineering time on making the driver interface good.)
12:13:14
lukego
(please excuse that extended braindump, forgot how much I have been obsessing about all things "high level languages on bare metal" over the years, love everything in this space :))
12:19:45
scymtym
who doesn't? that's why i thought https://www.youtube.com/watch?v=cooTl4-9bhg would be an interesting encore for the clouseau presentation
12:30:14
lukego
it's also a bit of a reality check though. I dream about a LispOS... and then suddenly there are multiple to choose from - OpenGenera, Movitz, Mezzano - and I don't actually bother to run them. I think that ultimately what I want is a Lisp machine that enables me to do something new that I couldn't do before -- but I'm not sure what that would be.
12:33:59
no-defun-allowed
Picking up CL let me imagine a few new things, but I don't know if an operating system (or lack thereof) would take it any further. In the case of CLOSOS, most of the language is just "more" of what I already know (barring first class global environments again).
12:37:49
no-defun-allowed
Maybe even the first part of that is debatable; debating linguistic relativity is a bit old by now though.
12:38:08
lukego
I think that I'd be attracted by an OS that came with a good stable hardware platform that I could get invested in. the OLPC was a bit like that although not really ideal. the Amiga was /exactly/ like that but that's been dead for decades now
12:39:12
lukego
Maybe I'll connect with this again... currently I'm writing Lisp code to help me create powerful FPGA boards for a fraction of the normal price, then I want to write Lisp code for programming FPGAs, maybe this could become a Lisp machine :)
12:41:30
lukego
and maybe if the hardware were actually defined by Lisp code and synthesized onto an FPGA that would tick the "lets me do something new" box. but hard to know ahead of time.