VA Smalltalk on Raspberry Pi

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

VA Smalltalk on Raspberry Pi

Seth Berman
Hello all,

We are going to be showing this at Camp Smalltalk RDU, so if you interested in this kind of thing, I encourage you to come.
I've attached a picture of VA, running on top of our new virtual machine, compiled for the Raspberry Pi's ARM processor.
It's quite snappy...surprisingly so given what it's running on.

What may surprise you to know is that this was done in about 4 hours over the weekend when I had some spare time.  A fact I attribute more to the portability of the vm rather than my ability.
In fact, I spent more time dealing with Motif/X11 linking issues than the actual virtual machine port.

The only thing that hung me up, forcing me to print out pages of bytecodes and compare them against a Linux/X86 run, was the fact that 'char' datatypes in C compilers are unsigned by default on the ARM.
So our Linux x86 defininition of an I_8 (a datatype we define that is supposedly a signed byte)...was in fact not a signed byte on the ARM.  So a bytecode to jump to a small negative offset turned into a jump to a much larger positive offset.
But redefining it as 'signed char' fixed that up.
Who knew?  Well...somebody knew...just not me.

We have multiple ways we can build our vm.  From C interpreter versions that have zero assembly (well, assembly managed by us) all the way to the LLVM code-generated version which are the most performant.
I chose somewhere in between to start with.  The only assembly I did was to make use of gcc's register intrinsics allowing us to pin important vm state to registers.

That was the fun part...then came Motif...but I'll leave that where it is because it's not that interesting...just painful:)

Hope to see some of you at Camp Smalltalk RDU!

-- Seth

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.

vastOnPi.jpg (179K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: VA Smalltalk on Raspberry Pi

Louis LaBrunda
Hi Seth,

This is really cool!!  Congrats.  When we talked about it, I thought it would be a long way off.

I have been playing with building a Squeak/Seaside program that controls the GPIO pins on my very old Raspberry Pi B (first gen).  I want to give it to a friend so he can open and close his garage doors over the Internet with a web browser.

It works and just needs some clean up and a little work wiring transistors and relays.  It would be cool to be able to do it in VA Smalltalk (probably would have to port a hardware interface from Squeak).  Not that there is anything wrong with Squeak, I'm just much more comfortable with VA Smalltalk.

Lou

On Friday, February 10, 2017 at 2:02:48 PM UTC-5, Seth Berman wrote:
Hello all,

We are going to be showing this at <a href="http://campsmalltalk-rdu.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fcampsmalltalk-rdu.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGgLeb6lqOMhlzCAaBubDhBDV6wjg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fcampsmalltalk-rdu.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGgLeb6lqOMhlzCAaBubDhBDV6wjg&#39;;return true;">Camp Smalltalk RDU, so if you interested in this kind of thing, I encourage you to come.
I've attached a picture of VA, running on top of our new virtual machine, compiled for the Raspberry Pi's ARM processor.
It's quite snappy...surprisingly so given what it's running on.

What may surprise you to know is that this was done in about 4 hours over the weekend when I had some spare time.  A fact I attribute more to the portability of the vm rather than my ability.
In fact, I spent more time dealing with Motif/X11 linking issues than the actual virtual machine port.

The only thing that hung me up, forcing me to print out pages of bytecodes and compare them against a Linux/X86 run, was the fact that 'char' datatypes in C compilers are unsigned by default on the ARM.
So our Linux x86 defininition of an I_8 (a datatype we define that is supposedly a signed byte)...was in fact not a signed byte on the ARM.  So a bytecode to jump to a small negative offset turned into a jump to a much larger positive offset.
But redefining it as 'signed char' fixed that up.
Who knew?  Well...somebody knew...just not me.

We have multiple ways we can build our vm.  From C interpreter versions that have zero assembly (well, assembly managed by us) all the way to the LLVM code-generated version which are the most performant.
I chose somewhere in between to start with.  The only assembly I did was to make use of gcc's register intrinsics allowing us to pin important vm state to registers.

That was the fun part...then came Motif...but I'll leave that where it is because it's not that interesting...just painful:)

Hope to see some of you at Camp Smalltalk RDU!

-- Seth

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: VA Smalltalk on Raspberry Pi

jtuchel
In reply to this post by Seth Berman
Hell, this might finally be a good reason to buy a Pi ;-)





Am Freitag, 10. Februar 2017 20:02:48 UTC+1 schrieb Seth Berman:
Hello all,

We are going to be showing this at <a href="http://campsmalltalk-rdu.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fcampsmalltalk-rdu.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGgLeb6lqOMhlzCAaBubDhBDV6wjg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fcampsmalltalk-rdu.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGgLeb6lqOMhlzCAaBubDhBDV6wjg&#39;;return true;">Camp Smalltalk RDU, so if you interested in this kind of thing, I encourage you to come.
I've attached a picture of VA, running on top of our new virtual machine, compiled for the Raspberry Pi's ARM processor.
It's quite snappy...surprisingly so given what it's running on.

What may surprise you to know is that this was done in about 4 hours over the weekend when I had some spare time.  A fact I attribute more to the portability of the vm rather than my ability.
In fact, I spent more time dealing with Motif/X11 linking issues than the actual virtual machine port.

The only thing that hung me up, forcing me to print out pages of bytecodes and compare them against a Linux/X86 run, was the fact that 'char' datatypes in C compilers are unsigned by default on the ARM.
So our Linux x86 defininition of an I_8 (a datatype we define that is supposedly a signed byte)...was in fact not a signed byte on the ARM.  So a bytecode to jump to a small negative offset turned into a jump to a much larger positive offset.
But redefining it as 'signed char' fixed that up.
Who knew?  Well...somebody knew...just not me.

We have multiple ways we can build our vm.  From C interpreter versions that have zero assembly (well, assembly managed by us) all the way to the LLVM code-generated version which are the most performant.
I chose somewhere in between to start with.  The only assembly I did was to make use of gcc's register intrinsics allowing us to pin important vm state to registers.

That was the fun part...then came Motif...but I'll leave that where it is because it's not that interesting...just painful:)

Hope to see some of you at Camp Smalltalk RDU!

-- Seth

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: VA Smalltalk on Raspberry Pi

thomas....@natural-software.eu
In reply to this post by Seth Berman
Wow !!
Good job

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: VA Smalltalk on Raspberry Pi

Seth Berman
Greetings,

This project still is under the "just for fun" category and is something I have done when I have some free time.
However, it is stable at this point and good enough for folks to experiment with.
I know we have at least a couple of customers, that I am aware of, that wanted to get their hands on it.
So, I have included it in the Linux ECAP distribution here.

Just download the linux ECAP dist, put it on a Raspberry Pi (Mine is Raspberry Pi 3/Rasbian OS), go into raspberryPi directory and launch abt32.sh.
It just uses the Unix Images and ICs, but vm and emsrv binaries for ARM.

-- Seth

On Saturday, February 11, 2017 at 12:36:37 PM UTC-5, Thomas Stalzer wrote:
Wow !!
Good job

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: VA Smalltalk on Raspberry Pi

Louis LaBrunda
Hi Seth, Everyone,

This is as cool as one would think.  A Smalltalk with the power of VA Smalltalk on a computer a small as and inexpensive as a Raspberry Pi, wow!

I have worked with Squeak on the Raspberry on a couple of programs and they are pretty neat and even fun.  One program controls the GPIO pins of the Raspberry.  I have been working on porting the GPIO pin interface of Squeak to VA Smalltalk.  I have gotten busy with other work so the port is on hold for awhile.  When it is ready I will post it to VAST Goodies.  If someone is very interest in this port and would like to work on it, I will post what I have done so far otherwise I will get back to it when I can.

Lou

On Sunday, April 22, 2018 at 3:29:48 PM UTC-4, Seth Berman wrote:
Greetings,

This project still is under the "just for fun" category and is something I have done when I have some free time.
However, it is stable at this point and good enough for folks to experiment with.
I know we have at least a couple of customers, that I am aware of, that wanted to get their hands on it.
So, I have included it in the Linux ECAP distribution <a href="http://www.instantiations.com/ecap/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.instantiations.com%2Fecap%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGAi3TQ0-ME3RuTz5Sz7IMH9UTd1w&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.instantiations.com%2Fecap%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGAi3TQ0-ME3RuTz5Sz7IMH9UTd1w&#39;;return true;">here.

Just download the linux ECAP dist, put it on a Raspberry Pi (Mine is Raspberry Pi 3/Rasbian OS), go into raspberryPi directory and launch abt32.sh.
It just uses the Unix Images and ICs, but vm and emsrv binaries for ARM.

-- Seth

On Saturday, February 11, 2017 at 12:36:37 PM UTC-5, Thomas Stalzer wrote:
Wow !!
Good job

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.