8 ms·
Mezzano: Operating system written in Common Lisp
- podiki 6y agoMost recent release, Demo 5, from July 2020: https://github.com/froggey/Mezzano/tree/demo5 https://github.com/froggey/Mezzano/tree/demo5 Previous discussions from a few years ago: https://news.ycombinator.com/item?id=23950558 https://news.ycombinator.com/item?id=23950558 https://news.ycombinator.com/item?id=20210227 https://news.ycombinator.com/item?id=20210227 https://news.ycombinator.com/item?id=14072121 https://news.ycombinator.com/item?id=14072121 https://news.ycombinator.com/item?id=12358177 https://news.ycombinator.com/item?id=12358177 https://news.ycombinator.com/item?id=8955140 https://news.ycombinator.com/item?id=8955140
- QuesnayJr 6y agoI looked through your links, and I saw that it was renamed from Mezzanine, so there's at least one more discussion: https://news.ycombinator.com/item?id=8943709 https://news.ycombinator.com/item?id=8943709
- jes 6y agoWhat a neat project. I think I’d enjoy contributing.
- rightbyte 6y agoImpressively small and clean code base for that functionality.
- skissane 6y agoIt looks like it isn't capable of building itself as yet: https://github.com/froggey/MBuild https://github.com/froggey/MBuild Hopefully one day it reaches that point. Ability to build one's self, and even to host one's own development, is an important sign of completeness in an operating system.
- sanxiyn 6y agoSome starting points: USB mass storage driver: https://github.com/froggey/Mezzano/blob/master/drivers/usb/mass-storage.lisp https://github.com/froggey/Mezzano/blob/master/drivers/usb/m... ext4 file system (read-only): https://github.com/froggey/Mezzano/blob/master/file/ext4.lisp https://github.com/froggey/Mezzano/blob/master/file/ext4.lis... TCP network stack: https://github.com/froggey/Mezzano/blob/master/net/tcp.lisp https://github.com/froggey/Mezzano/blob/master/net/tcp.lisp
- sillysaurusx 6y agohttps://github.com/froggey/Mezzano/blob/f0eeb2a3f032098b394e31e3dfd32800f8a51122/file/ext4.lisp#L227-L336 https://github.com/froggey/Mezzano/blob/f0eeb2a3f032098b394e... I'm not sure what I was expecting, but 110 lines of keyword arguments was a surprise.
- weavie 6y agoBetter that 100 lines of non-keyword arguments!
- enw 6y agoDoes anyone find Lisp readable? I haven't used Lisp professionally, but find the code terribly confusing to read (mostly due to the look of it, I assume), while I can usually follow code of an unknown language reasonably well.
- stray 6y agoYes. Lisp is easy to read.
- sanxiyn 6y agoYes I find Lisp very readable.
- abhinav22 6y agoYou get used to it pretty quickly. Just need a bit of practice. I used to say that proper indenting helps readability but these days I have departed from the standard indenting and do my own thing. That said, this guide on formatting lisp is very useful IMO if you want to learn to read lisp code better: https://link.medium.com/idMRZk93Fdb https://link.medium.com/idMRZk93Fdb I actually wrote it, but now I don’t follow many of its principles :D perhaps because I got a deeper understanding of it. Check it out if and see if it helps
- lambda_obrien 6y agoHow do you start writing an OS in a language other than C?
- aidenn0 6y agoExactly the way you start writing an OS in C. You implement just enough of the language runtime to boot to a hello world, and then iterate from there. C has a runtime (stdin, stdout, stderr, a heap, a stack), it's just so minimal that people don't think about it much. [edit] I should point out that it's typical for a common-lisp implementation to have builtin tools for manipulating pointers and generating arbitrary instructions (since both of those are needed to implement the compiler anyways, and lisp compilers are typically self-hosting).
- higerordermap 6y agoTo add to this, there's an OS written in Go in similar way https://pdos.csail.mit.edu/projects/biscuit.html https://pdos.csail.mit.edu/projects/biscuit.html
- deleted 6y ago[deleted]
- thu2111 6y agoYou write an ahead of time compiler to machine code for your language. You write a program that is then compiled to native code. You do a bit of assembler glue to set up an execution environment that your language runtime needs. You link them together, do a bit more glue to turn the result into a bootable disk image. Done. You start out in kernel mode and will have to do a lot of work to bring online a conventional OS-like environment, but from that point on there's nothing really C-like required.
- blackrock 6y agoI found this comment funny. From the colour.lisp code. https://github.com/froggey/Mezzano/blob/master/gui/colour.lisp https://github.com/froggey/Mezzano/blob/master/gui/colour.li... ;; Mangle & unmangle the vector ordering so the colour matrix ;; layout makes more sense. This could be fixed up by rearranging ;; the matrix layout, but that's a bit beyond me. (new-rgb (matrix4-vector4-multiply matrix (mezzano.simd:shufps original-rgb original-rgb #4r0321)))
- guytv 6y agoJust ran it on a VirtualBox. This is beyond amazing. How long have you been working on this for?
- rcarmo 6y agoThis needs a native Raspberry Pi port, it would be an amazing workstation.
- blue1 6y agoAgreed. https://github.com/froggey/Mezzano/issues/46 https://github.com/froggey/Mezzano/issues/46