Re:Mezzano – An operating system written in Common Lisp
by behnamoh on Tuesday June 18, 2019 @03:46PM
(#20217586)
And still I haven't seen any language more Object-Oriented than SmallTalk. Sure, Python, C++, Java, etc. support OO to some level. But in SmallTalk everything literally is an object, which means you can achieve the same functionality of Lisp macros in SmallTalk as well. In Lisp you have data = code, in SmallTalk you have data = program (which is running). In fact, everything is always running in SmallTalk. I'm more than eager to learn more and more about SmallTalk. It's one of those languages with valuable philosophy behind its design (just like Lisp and Haskell).
[ Parent
| on HN ]
Re:Mezzano – An operating system written in Common Lisp
by kazinator on Tuesday June 18, 2019 @06:29PM
(#20219101)
Everything is a class object in Common Lisp.
[1]> (class-of (cons 1 2))
#<BUILT-IN-CLASS CONS>
[2]> (class-of #\x)
#<BUILT-IN-CLASS CHARACTER>
[3]> (class-of nil)
#<BUILT-IN-CLASS NULL>
[4]> (class-of (function mapcar))
#<BUILT-IN-CLASS FUNCTION>
Re:Mezzano – An operating system written in Common Lisp
by astrange on Wednesday June 19, 2019 @04:34AM
(#20221714)
It's more useful to think of SmallTalk as message-based than object-based. Messages are underrated, but objects are just function calls except the first parameter is on the left.
> in SmallTalk you have data = program (which is running)
Isn't it just an eagerly-evaluated language with closures? Can it walk its own AST?
Re:Mezzano – An operating system written in Common Lisp
by scroot on Tuesday June 18, 2019 @04:06PM
(#20217814)
If you haven't yet, I'd recommend reading the "Blue Book" (Smalltalk-80: The Language and its Implementation) by Goldberg. It has a very holistic approach and, as such, is one of the most accessible and pleasant books describing a computing/programing environment one can find.
Re:Mezzano – An operating system written in Common Lisp
by thequux on Tuesday June 18, 2019 @08:31PM
(#20219850)
I also recommend reading http://www.mirandabanda.org/bluebook/bluebook_imp_toc.html once you're done with the blue book; the VM is a two weekend project in any compiled high-level language (I used Rust) and it's not hard to make it performant enough for real use. I think my timeline was ~2 days for the initial implementation, 2 days for fixing up small bugs (mostly in primitives), and then 2-3 hours of minor tweaks to get the VM performant enough to be comfortable.
BTW, somebody typed the VM source in from the blue book and posted it online. You may find the resources on that page useful: http://www.wolczko.com/st80/
Re:Mezzano – An operating system written in Common Lisp
by scroot on Tuesday June 18, 2019 @09:58PM
(#20220215)
This is dope -- didn't know about it, thanks
Re:Mezzano – An operating system written in Common Lisp
by lioeters on Tuesday June 18, 2019 @09:24PM
(#20220108)
I wanted to add to this great recommendation.
The blue book and other excellent out-of-print books on SmallTalk can be found here:
Re:Mezzano – An operating system written in Common Lisp
by behnamoh on Tuesday June 18, 2019 @05:10PM
(#20218450)
Thanks, I'll take a look at it!
Re:Mezzano – An operating system written in Common Lisp
by yellowapple on Tuesday June 18, 2019 @04:54PM
(#20218298)
> But in SmallTalk everything literally is an object, which means you can achieve the same functionality of Lisp macros in SmallTalk as well.
Ruby follows in SmallTalk's footsteps and implements something similar, at least to an extent.