[HN Gopher] Bare metal Smalltalk-80 port to the Raspberry Pi
       ___________________________________________________________________
        
       Bare metal Smalltalk-80 port to the Raspberry Pi
        
       Author : salgernon
       Score  : 109 points
       Date   : 2020-07-17 19:07 UTC (3 hours ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | johndoe0815 wrote:
       | Author here - happy to answer your questions...
       | 
       | Beware, there's a bug on ARM11-based Raspberry Pis (BCM2835 on Pi
       | 1/Zero/Zero W and CM1) that crashes the VM when executing drawing
       | functions. I'm currently investigating the problem.
        
         | johndoe0815 wrote:
         | Btw., you can read a bit about the background of Smalltalk and
         | the Raspberry port in my article:
         | 
         | https://www.linkedin.com/pulse/relive-part-xerox-parcs-histo...
        
       | cmrdporcupine wrote:
       | I wonder if there's anything neat that could be done in the
       | Smalltalk VM that could take advantage of the BCM SOC's VPU etc.
       | hardware ... hmm...
        
         | johndoe0815 wrote:
         | Accelerating the Smalltalk VM BitBlt primitives using the VPU
         | would certainly be interesting. Currently, drawing is rather
         | slow since lots of the functionality is implemented in
         | interpreted bytecodes and rendering to the framebuffer is
         | completely unoptimized.
        
           | zackangelo wrote:
           | Slight tangent, but: I first encountered a function named
           | BitBlt when using the Win32 C API a long time ago. I had no
           | idea that it originated in Smalltalk-72 in 1975 and the
           | function name was just carried forward into the Windows API.
        
             | johndoe0815 wrote:
             | BitBlt was also used as the drawing primitive for an early
             | graphics terminal developed at Bell Labs, the appropriately
             | named "Blit"
             | (https://en.wikipedia.org/wiki/Blit_(computer_terminal).
             | Hardware implementations of BitBlt were available in the
             | Amiga and Atari ST blitter chips (that's how I learned
             | about BitBlt in the late '80s).
             | 
             | Btw., there's a nice paper on BitBlt by Rob Pike:
             | https://pdos.csail.mit.edu/~rsc/pike84bitblt.pdf
        
       | salgernon wrote:
       | "Past" submission didn't find anything, but the author had an
       | "Ask HN" the other day:
       | https://news.ycombinator.com/item?id=23806323
        
         | johndoe0815 wrote:
         | It was actually submitted twice before, but both submissions
         | linked to the linkedin article, not directly to the github
         | repository.
        
         | johndoe0815 wrote:
         | Thanks for mentioning this - I would certainly appreciate input
         | on this. Testing software on half a dozen different Raspberry
         | Pi models currently involves quite a bit of cable un- and
         | replugging...
        
       | slobiwan wrote:
       | I love the idea of bare-metal ports to the Pi. I saw snakeware
       | posted here not too long ago. Are there other examples?
       | ColorForth would be interesting as well
        
         | johndoe0815 wrote:
         | In addition to the Interim Lisp system I mentioned in another
         | comment, there are a number of bare-metal applications for the
         | Raspberry on github (mostly ports of games).
         | 
         | I especially like this Commodore 64 emulator (also based on
         | circle): https://github.com/randyrossi/bmc64
        
       | 7thaccount wrote:
       | Seems like a neat idea. I've always wanted a tiny LispOS or
       | SmalltalkOS that I could carry around and use on a Pi. I just
       | wish it would also have the modern necessities like web
       | browser...etc.
        
         | johndoe0815 wrote:
         | One of the inspirations for my "crosstalk" Smalltalk system was
         | Lukas Hartmann's Lisp-based "Interim OS" bare-metal system for
         | the Raspberry (http://interim-os.com/), so you might want to
         | give this a try.
         | 
         | I think Interim only runs on the Raspberry Pi 2 at the moment;
         | porting Interim OS to use the circle library (which I use for
         | crosstalk) should also be feasible and would help to support
         | other Raspberry versions.
         | 
         | Lukas is also the creator of the MNT Reform open source
         | notebook (using a Freescale i.MX8 quadcore ARM Cortex-A53) -
         | see https://www.crowdsupply.com/mnt/reform for the currently
         | running crowdfunding campaign.
         | 
         | Modern web browsing is, of course, more complex than the whole
         | rest of the Smalltalk system...
        
           | skissane wrote:
           | I really like language-based operating systems. It is cool
           | you did this.
           | 
           | My ideal though would be - it is all written in the language
           | (Smalltalk/Lisp/whatever), with no use of other languages
           | such as C/C++ (except possibly assembler, in which case my
           | ideal is it comes with an assembler written in the language);
           | and it is fully self-hosting in terms of the build process.
           | 
           | Of course, I realise my ideal is a lot more work than what
           | you've done, and none of us has infinite time in which to
           | tinker with things...
           | 
           | (I myself have some toy programming language interpreters I
           | wrote, some in C, some in Java - I keep on thinking "oh, I
           | should get rid of the C/Java, make it generate native code
           | and then rewrite its core in itself" - but that's a lot of
           | work and I've never had time for that.)
        
             | johndoe0815 wrote:
             | Great that you like it - thanks! Some of the work of
             | Stephen R. Kell at Kent University also covers language-
             | based OSes and how some of their ideas might be adapted in
             | Unix (see [1] and [2]).
             | 
             | The Smalltalk-80 VM is specified in Smalltalk itself (in
             | the "Blue Book" [3]) and the Squeak VM (a Smalltalk
             | derivative) was written in a subset of Squeak itself [4].
             | 
             | The great thing is that it's a lot of fun to build this (at
             | least for me) because it's actually possible to understand
             | the whole system. I hope my students will have fun working
             | on topics like these, too.
             | 
             | [1] Unix, Plan 9 and the Lurking Smalltalk. In L. de Mol
             | and G. Primiero (eds), Reflections on Programming Systems,
             | Philosophical Studies Series, Springer - https://www.cs.ken
             | t.ac.uk/people/staff/srk21/research/papers...
             | 
             | [2] The operating system: should there be one?. In
             | Proceedings of the 7th Workshop on Programming Languages
             | and Operating Systems, ACM, November 2013 - https://www.cs.
             | kent.ac.uk/people/staff/srk21/research/papers...
             | 
             | [3] Adele Goldberg and David Robson, Smalltalk-80: The
             | Language and its Implementation, ISBN 0-201-11371-6 - http:
             | //stephane.ducasse.free.fr/FreeBooks/BlueBook/Bluebook....
             | 
             | [4] Dan Ingalls, Ted Kaehler, John Maloney, Scott Wallace,
             | and Alan Kay. "Back to The Future: The Story of Squeak, A
             | Practical Smalltalk Written in Itself." In Proceedings of
             | the 12th ACM SIGPLAN Conference on Object-Oriented
             | Programming (OOPSLA) 1997, 318-26, 1997 -
             | http://files.squeak.org/docs/OOPSLA.Squeak.html
        
       ___________________________________________________________________
       (page generated 2020-07-17 23:00 UTC)