On 29-11-2013, at 1:18 PM, Doug Jones <[hidden email]> wrote: > http://www.kickstarter.com/projects/214379695/micro-python-python-for-microcontrollers > > >> The microcontroller is clocked at 168MHz and has 1MiB flash and 192KiB RAM, which is plenty for writing complex Python scripts. Umm, not really. That’s a bit tight, rather slow, and likely to disappoint. At least, for anything we currently think of as Squeak. Now, a simple (it would have to be very simple to save space) vm running a tiny Spoon based image *might* be possible and even useful. The smallest machine I’ve ever run a ‘normal’ Smalltalk system on was the Active Book, which had a whole 1Mb or Ram, though that did have to serve the OS, provide the screen buffer, and host a Fax storage filing system. And it *was* only a 8MHz ARM2 cpu. tim -- tim Rowledge; [hidden email]; http://www.rowledge.org/tim Calm down -- it's only ones and zeros. |
Tim Rowledge wrote:
> On 29-11-2013, at 1:18 PM, Doug Jones wrote: > > > http://www.kickstarter.com/projects/214379695/micro-python-python-for-microcontrollers > > >> The microcontroller is clocked at 168MHz and has 1MiB flash and 192KiB RAM, > >> which is plenty for writing complex Python scripts. > Umm, not really. That's a bit tight, rather slow, and likely to disappoint. At least, for > anything we currently think of as Squeak. Now, a simple (it would have to be very > simple to save space) vm running a tiny Spoon based image *might* be possible > and even useful. The smallest machine I've ever run a "normal" Smalltalk system > on was the Active Book, which had a whole 1Mb or Ram, though that did have to > serve the OS, provide the screen buffer, and host a Fax storage filing system. And > it *was* only a 8MHz ARM2 cpu. It would probably be possible to squeeze Little Smalltalk into such a tiny computer. While it wouldn't do much, it would be comparable to this Python interpreter. It would also work just fine on a text terminal while non graphical Squeak is rather painful to use (I played around with two implementations). A framebuffer for 640x480 pixels with 256 colors takes up 300KB, so having a VNC client on the PC side wouldn't help. I am always interested in finding out how small things can be. The original 1972 Dynabook paper proposed a machine with just 8K words of 16 bits, but that was supposed to be a cache for a tape based virtual memory system and if the display were persistent and readable (like the plasma terminals from Plato) you could do without a frame buffer. The Alto was a 128KB machine, on the other hand, and this ARM microcontroller is was more powerful than it was. -- Jecel http://www.mprove.de/diplom/gui/Kay72a.pdf |
In reply to this post by timrowledge
PIC Smalltalk does much of this. But it translates everything to assembler. http://www.huv.com/uSeeker/smalltalk/pic.htmlKarl On Sat, Nov 30, 2013 at 12:19 AM, Jecel Assumpcao Jr. <[hidden email]> wrote: Tim Rowledge wrote: |
Karl Ramberg wrote:
> PIC Smalltalk does much of this. But it translates everything to assembler. > http://www.huv.com/uSeeker/smalltalk/pic.html This is a cross developement system (where you create the program on a "host computer", like your PC, and then upload it to a "target computer", like a microcontroller board, in order to run it). The interesting aspect of the micro Python is that it is a native environment. The PC just acts as a dumb ASCII terminal. You can also have a mix where the application is developed on the target machine while most of the development environment runs on the host. That was the case for Palm Smalltalk and OOVM which used Squeak and Eclipse respectively on the PC side. -- Jecel |
In reply to this post by Karl Ramberg
On 11/30/2013 11:18 AM, Jecel Assumpcao Jr. wrote:
> Karl Ramberg wrote: >> PIC Smalltalk does much of this. But it translates everything to assembler. >> http://www.huv.com/uSeeker/smalltalk/pic.html > > This is a cross developement system (where you create the program on a > "host computer", like your PC, and then upload it to a "target > computer", like a microcontroller board, in order to run it). The > interesting aspect of the micro Python is that it is a native > environment. The PC just acts as a dumb ASCII terminal. > > You can also have a mix where the application is developed on the target > machine while most of the development environment runs on the host. That > was the case for Palm Smalltalk and OOVM which used Squeak and Eclipse > respectively on the PC side. > > -- Jecel > > What drew my attention to this project is its high level of openness. Open source hardware, and open source software. And it's reasonably inexpensive. It's true that it's not well suited to uses that require a sophisticated GUI or lots of RAM, but there are lots of other kinds of uses. Think of the Arduino and its many derivatives: It's being used for a huge variety of things, and that's largely because it's inexpensive and the software and hardware are open. Anybody can download a hardware design, tweak it a bit if needed, and send it off to a PC board house to be manufactured in any quantity (or just make it themselves in the garage). Or just buy hardware off the shelf if that's all you need. But to program the Arduino, you're basically writing in C. With this Micro Python board, you program it in a high-level language. The hardware portion of the project, of course, is language-agnostic. Anybody can take the same hardware and implement any language that the hardware can support. And this is where it gets really interesting. If you read the entire Kickstarter proposal, including the FAQs and the Updates, he provides a very detailed description of the software he has written. When I read that, I see a comprehensive reference implementation that would be invaluable to anyone wanting to port another language onto this platform. (And he put it all under the same MIT license that Squeak uses!) The hardware has lots of GPIO pins, and USB, so it can talk to other hardware. He is now adding wifi, and shortly he should hit his second stretch goal for adding Ethernet. He will have Python libraries for interfacing with all this hardware. And the board has an SD card slot, so gigabytes of storage are available (virtual memory?). Moore's Law, which still somehow seems to be in effect, guarantees that the price difference between the Arduino platform and next-generation hardware platforms like this new one will gradually drop to near zero. (I think the high-volume cost of the processor chips now differ by no more than a dollar or two.) So we should expect Arduino-like projects to gradually shift to higher-level languages. I think it would be awesome if Squeak was one of the languages readily available on these kinds of platforms. |
I don't see any reason why something like Little Smalltalk couldn't be ported to run on a 32 bit ARM7 type chip. The one running Micro Fortran has 192 KB of RAM, and a megabyte of FLASH. Of course, the real stumbling block is people seem to want to be able to run an IDE on the chip, which I think is silly. Having a command line interpreter like python has, and the ability to push source (maybe using Git or Monticello or whatever) from your development machine to this chip over wifi/ethernet would make it really useful for robotics. It would especially be useful if you could run the command line version of this Smalltalk on a desktop, as the guy does with Micro Python. I would love to have an instant-on Smalltalk system, which is one of the reasons I am supporting Micro Python. I'm currently working on Roz, my quad walker robot, and I've got a Beaglebone Black running Ubuntu 13.04 onboard, but it feels like overkill, and dealing with Linux is painful, not to mention having to keep power to the board all the time once its booted up. If I had something like Smalltalk-on-a-chip, I would definitely be using it for Roz.
- Jon On Mon, Dec 2, 2013 at 3:33 AM, Doug Jones <[hidden email]> wrote: On 11/30/2013 11:18 AM, Jecel Assumpcao Jr. wrote: |
On 02-12-2013, at 7:01 AM, Jon Hylands <[hidden email]> wrote: > > I don't see any reason why something like Little Smalltalk couldn't be ported to run on a 32 bit ARM7 type chip. I did that back in 1987. Well, it was an ARM1, but still. tim -- tim Rowledge; [hidden email]; http://www.rowledge.org/tim Oxymorons: Alone together |
In reply to this post by Doug Jones
Doug Jones wrote:
> What drew my attention to this project is its high level of openness. > Open source hardware, and open source software. And it's reasonably > inexpensive. I would call $10 "reasonably inexpensive", but at £25 it costs *exactly* the same as the Model A of the Raspberry Pi. You get more I/Os, but 192KB of RAM instead of 256MB. But I do like the project. One thing that would be interesting would be to combine Squeak with Internet-0 (http://cba.mit.edu/events/04.09.I0/krikorian.pdf). In the future we could have a $1 computer controlling your light with some 128KB for a headless Squeak image that you program from your desktop machine. As Jon Hylands wrote in another message in this thread, sometimes you don't want a GUI and sometimes you don't want a Linux between your language and your hardware. I find it amazing that some people running C code on a 200MHz ARM can't toggle a pin at more than a few thousand times per second. Having seen how much more usable the old Basic Stamp boards (native development) were to most people than traditional microcontroller programmed (cross) in assembly or C (even with a system as nice as Arduino sketches), I agree with both of you that this is a good direction to explore. Tim Rowledge wrote: > I did that back in 1987. Well, it was an ARM1, but still. Was it really an ARM1 (BBC "tube" board) or an ARM2? In any case, you did Smalltalk-80 and Jon asked about Little Smalltalk, which would be a far simpler project.. -- Jecel |
In reply to this post by Doug Jones
On 02-12-2013, at 1:28 PM, Jecel Assumpcao Jr. <[hidden email]> wrote: > > > Tim Rowledge wrote: >> I did that back in 1987. Well, it was an ARM1, but still. > > Was it really an ARM1 (BBC "tube" board) or an ARM2? In any case, you > did Smalltalk-80 and Jon asked about Little Smalltalk, which would be a > far simpler project.. The original ARM development machines (the ‘silver fox’ desktops) were ARM1 and then many were hand upgraded to ARM3 when they started rolling off the lines a year or so later. I had Little Smalltalk running in a couple of days on the ARM1, but you can’t call it any major triumph of engineering since it was so utterly trivial to do. A modern equivalent, and much more useful, would be Spoon. tim -- tim Rowledge; [hidden email]; http://www.rowledge.org/tim Strange OpCodes: WFL: Wave FLag |
Tim Rowledge wrote:
> The original ARM development machines (the "silver fox" desktops) were ARM1 > and then many were hand upgraded to ARM3 when they started rolling off the > lines a year or so later. I had Little Smalltalk running in a couple of days on the > ARM1, but you can't call it any major triumph of engineering since it was so utterly > trivial to do. Thanks for the details! I had thought you were talking about your Active Book or RiscPC projects, but I suppose this was a bit earlier. > A modern equivalent, and much more useful, would be Spoon. Indeed, though for some applications it might be interesting to add a text interface like Little Smalltalk and GNU Smalltalk have. Actually, the one from Self was a little nicer (we only got a GUI in Self 4.0). Another Smalltalk that was created for this kind of system was a very stripped down Squeak called Fly Smalltalk. I saw a poster about it at OOPSLA 2003 but I never heard anything more about it. http://dl.acm.org/citation.cfm?id=949418 Fly had 29 classes and 170 methods, while Little Smalltalk 3 has 53 classes and 559 methods. Little Smalltalk 4 has 50 classes and 468 methods in the basic image plus a bunch of .st files that add 21 more classes and 140 additional methods. But LST4 does in Smalltalk stuff that LST3 does in the VM, so the very similar sizes is somewhat misleading. Recently I found the 1973 paper by L Peter Deutsch which was the starting point for the InterLisp virtual machine, "A LISP Machine with very compact programs" http://dl.acm.org/citation.cfm?id=1624860 http://ijcai.org/Past%20Proceedings/IJCAI-73/PDF/076.pdf http://www.softwarepreservation.org/projects/LISP/interlisp-d/Deutsch-3I JCAI.pdf This would have been extremely helpful to me when I was doing a children's computer in 1983. There is always some more history to learn and make things more interesting in the present. -- Jecel |
In reply to this post by Doug Jones
On 12/02/2013 01:28 PM, Jecel Assumpcao Jr. wrote:
> > I would call $10 "reasonably inexpensive", but at £25 it costs *exactly* > the same as the Model A of the Raspberry Pi. You get more I/Os, but > 192KB of RAM instead of 256MB. But I do like the project. > True, but comparing with the Raspberry Pi isn't really fair ;-) Literally millions of Raspberry Pi boards have been shipped. If this Micro Python board were made in such quantities, its price would drop substantially. When he set that price point, he was assuming quantities in the hundreds, and presumably he added some margin to compensate him for his design time (all his spare time for the better part of a year so far). And the Pi is entirely closed-source hardware. You can't make your own, and you can't redesign it or otherwise evolve the hardware. (And it cannot boot without a proprietary binary blob that outsiders cannot modify or audit.) Things like Arduino and this Micro Python board can evolve independently of any central control, and anybody can make them. We should expect to pay a premium for this advantage, at least at the beginning. Once the design files are released, if the hardware becomes popular we should expect many players to enter that market and the price will start a race to the bottom, just as happened with Arduino and its descendants. BTW, I neglected to mention earlier in the thread that this hardware is fully capable of driving a graphical display and supporting a GUI. His early videos show it driving a low-res LCD, but I'm curious to find out if it could drive something like a 512x342 pixel monochrome display. Because if it can, that means it could conceivably support a GUI as good as that of the original Macintosh. (Remember how good that was?) This board has 50% more RAM than the first Mac, more than twenty times the speed, thousands of times more storage, and thirty years' worth of further software development to tap into. (Not to mention networking, which the first Mac had no inkling of.) The first Mac was inspired by that legendary visit to Xerox PARC. They saw a GUI there. And Alan Kay showed them Smalltalk. I'm getting one of these boards... |
Doug Jones wrote:
> True, but comparing with the Raspberry Pi isn't really fair ;-) It is unfair from the seller's viewpoint, but totally fair from the buyer's viewpoint. Note that I develop such boards and so am very familiar with the issues you mentioned. If I try to buy the Zynq 7020 chip present in the $99 Parallela board, for example, Xilinx wants me to pay $150. And the fact that I am using FPGAs to implement my Smalltalk processors while these ARM SoCs are full ASICs make it hard to compete. But as a buyer you shouldn't have to care about any of that. Since you are interested in open source, you might find these boards interesting: https://www.olimex.com/Products/OLinuXino/open-source-hardware About the 128KB Macintosh, I had one for a couple of months. MacWrite was limited to at most 7 pages while Word swapped like crazy. I opened it up and expanded it to 512KB and it went from being an interesting toy to a usable tool. > The first Mac was inspired by that legendary visit to Xerox PARC. They > saw a GUI there. And Alan Kay showed them Smalltalk. Not quite, though this is the most popular version of the story. Jef Raskin worked on the idea of a graphical computer that would be user-friendly for his PhD project which he called "QuickDraw". After he became a professor, he spent some time at Xerox PARC as a visiting researcher and became very familiar with all the projects being developed there. After that he joined Apple to write their manuals and was later tasked with creating "Annie", a very low cost game machine. He renamed it Macintosh and proposed to combine his QuickDraw ideas with a "computer as an appliance" design to avoid the complications he had faced trying to document the very flexible Apple II. http://www.digibarn.com/friends/jef-raskin/writings/millions.html Steve Jobs didn't like the project and kept trying to kill it. Jef felt that if Steve could see the stuff at PARC he would leave him alone. Mike Markkula agreed and sent Steve (and, later, the Lisa team) to see a demo of the Alto by Adele Goldberg and Dan Ingalls. -- Jecel |
In reply to this post by Doug Jones
I just bought a Teensy 3.1 from pjrc.com. Its got an ARM overclocked at 96 MHz, with 256 KB of FLASH, and 64 KB of RAM, plus a huge pile of hardware features built in. It was $20, and looks like one of those old basic stamps. Right now I'm programming it with the Arduino IDE, but its another platform that would be cool to run something like Little Smalltalk or Spoon on. I also have a Spark Core sitting on my desk. It is slightly lower-spec in terms of processing power than the Teensy 3.1, but it has a built-in wifi core.Awesome stuff!
On Tue, Dec 3, 2013 at 2:51 PM, Jecel Assumpcao Jr. <[hidden email]> wrote:
|
Hi Jon-- > I just bought a Teensy 3.1 from pjrc.com <http://pjrc.com>. Its got an > ARM overclocked at 96 MHz, with 256 KB of FLASH, and 64 KB of RAM, > plus a huge pile of hardware features built in. It was $20, and looks > like one of those old basic stamps. Right now I'm programming it with > the Arduino IDE, but its another platform that would be cool to run > something like Little Smalltalk or Spoon on. A 32-bit processor, nice! The next hurdle is getting the VM down to below 256 KB. To date there hasn't been an effort to make the VM small, as far as I know. Currently the VM is at least a megabyte on every platform, yeah? thanks, -C -- Craig Latta www.netjam.org/resume +1 510 984 8117 (Skype rings this until 31 January 2014) |
Well, old Windows VMs were about 300kb in size.
Cheers, Juan Vuletich Quoting Craig Latta <[hidden email]>: > > Hi Jon-- > >> I just bought a Teensy 3.1 from pjrc.com <http://pjrc.com>. Its got an >> ARM overclocked at 96 MHz, with 256 KB of FLASH, and 64 KB of RAM, >> plus a huge pile of hardware features built in. It was $20, and looks >> like one of those old basic stamps. Right now I'm programming it with >> the Arduino IDE, but its another platform that would be cool to run >> something like Little Smalltalk or Spoon on. > > A 32-bit processor, nice! The next hurdle is getting the VM down to > below 256 KB. To date there hasn't been an effort to make the VM small, > as far as I know. Currently the VM is at least a megabyte on every > platform, yeah? > > > thanks, > > -C > > -- > Craig Latta > www.netjam.org/resume > +1 510 984 8117 > (Skype rings this until 31 January 2014) > > > Cheers, Juan Vuletich |
In reply to this post by ccrraaiigg
On Sat, Dec 21, 2013 at 5:24 PM, Craig Latta <[hidden email]> wrote:
Well, the thing you have to realize, on a platform like this (no OS, no file system, just a bare chip), there's a lot of stuff in the VM that we could get rid of. All the graphics stuff, file support, sockets, etc. You would want to keep the serial port support, and probably add support for other hardware peripherals. I don't think it would be impossible to get the VM down to a very small size, but I've never really played with it, so I can't say for sure. Basically, you'd want the interpreter, the garbage collector, and enough primitives to support a very basic class library. Plus support for the hardware peripherals on the chip (UART, SPI, I2C, Digital I/O, A/D, PWM, Timers, etc) - Jon |
Yeah, it shouldn't be hard, it just needs doing. -C -- Craig Latta www.netjam.org/resume +1 510 984 8117 (Skype rings this until 31 January 2014) |
In reply to this post by Jon Hylands
On Sat, Dec 21, 2013 at 07:20:39PM -0500, Jon Hylands wrote:
> On Sat, Dec 21, 2013 at 5:24 PM, Craig Latta <[hidden email]> wrote: > > > > > Hi Jon-- > > > > > I just bought a Teensy 3.1 from pjrc.com <http://pjrc.com>. Its got an > > > ARM overclocked at 96 MHz, with 256 KB of FLASH, and 64 KB of RAM, > > > plus a huge pile of hardware features built in. It was $20, and looks > > > like one of those old basic stamps. Right now I'm programming it with > > > the Arduino IDE, but its another platform that would be cool to run > > > something like Little Smalltalk or Spoon on. > > > > A 32-bit processor, nice! The next hurdle is getting the VM down to > > below 256 KB. To date there hasn't been an effort to make the VM small, > > as far as I know. Currently the VM is at least a megabyte on every > > platform, yeah? > > > > Well, the thing you have to realize, on a platform like this (no OS, no > file system, just a bare chip), there's a lot of stuff in the VM that we > could get rid of. All the graphics stuff, file support, sockets, etc. You > would want to keep the serial port support, and probably add support for > other hardware peripherals. I don't think it would be impossible to get the > VM down to a very small size, but I've never really played with it, so I > can't say for sure. > > Basically, you'd want the interpreter, the garbage collector, and enough > primitives to support a very basic class library. Plus support for the > hardware peripherals on the chip (UART, SPI, I2C, Digital I/O, A/D, PWM, > Timers, etc) For a minimal interpreter VM with all plugins external, compiled on a 64-bit Linux system with default optimization, it looks like this: $ size * text data bss dec hex filename 70693 816 208 71717 11825 so.B2DPlugin 43657 528 5864 50049 c381 so.BitBltPlugin 22951 1060 4328 28339 6eb3 so.FilePlugin 52198 1728 608 54534 d506 so.SocketPlugin 6207 1136 16 7359 1cbf so.vm-display-null 104748 4204 7392 116344 1c678 so.vm-display-X11 2957 768 16 3741 e9d so.vm-sound-null 247625 8292 166056 421973 67055 squeakvm The squeakvm size gives some indication of how big the interpreter, garbage collector and interpreter primitives are. A good deal of the code size is associated with inlining of the code in the Smalltalk to C translation. If size were the only concern, you can reduce this considerably, but the performance impact makes this unacceptable (the slang inliner is remarkably effective). It would be somewhat smaller if compiled in 32bit mode also. Dave |
In reply to this post by ccrraaiigg
On 12/21/2013 02:24 PM, Craig Latta wrote:
> > Hi Jon-- > >> I just bought a Teensy 3.1 from pjrc.com<http://pjrc.com>. Its got an >> ARM overclocked at 96 MHz, with 256 KB of FLASH, and 64 KB of RAM, >> plus a huge pile of hardware features built in. It was $20, and looks >> like one of those old basic stamps. Right now I'm programming it with >> the Arduino IDE, but its another platform that would be cool to run >> something like Little Smalltalk or Spoon on. > > A 32-bit processor, nice! The next hurdle is getting the VM down to > below 256 KB. To date there hasn't been an effort to make the VM small, > as far as I know. Currently the VM is at least a megabyte on every > platform, yeah? > This is what motivated me to start this thread in the first place. Spoon is stripped down to be really small, but with enough smarts to pull in additional functionality from across the network as needed. But it runs on top of a humongous VM. Why not strip the VM down as far as possible too, and pull in additional things when needed? Just enough VM to run a minimal Spoon. It doesn't have to be fast; it can pull in speedup methods as needed (or perhaps even swap itself for a fancier VM on the fly???). There are lots of hardware candidates that would be well-suited to build small smart software systems on top of (not to mention fun), but the Micro Python board called out to me because of a number of attributes not shared by many other candidates: - completely open source hardware, not very expensive, and practical for a hobbyist board builder as well as mass production - 192KB RAM, 168MHz 32bit processor, with hardware floating point - 1MB flash, plus gigabytes of SD card storage - lots of GPIO pins, and USB, and ethernet, and wifi - potentially large community building up around it (he pulled in nearly 2000 Kickstarter backers by the time the gong rang) - $150K+ in funding - boots up from bare metal to a high-level language command line, all open source, all MIT licensed, including drivers for file systems and networking and all those GPIO pins This last point is key. Suppose you wanted to implement your favorite language on a small cheap computer -- what would you need? You'd need to RTFM, of course, but things would be much easier if you also had an existing reference implementation to look at, one that was actually working and being used by hobbyists and others for real projects. That's what this board aims to be. It is currently running Python 3.3, with libraries to talk to all those pins and peripherals. And judging by that Kickstarter proposal (plus the FAQs and all those really detailed Update posts), this system will have fabulous documentation. Now if this guy had proposed a Kickstarter for a little board running smalltalk (or lisp or haskell or name your favorite elegant language) I suspect he wouldn't have pulled in quite that many pledges. But he went for Python, and now he has the resources to build something that could be the basis for generations of projects to come. (My fevered imagination sees it as Arduino on steroids, but much easier to program...) Of course his work may not be especially useful for the person who wants to build a smalltalk VM that runs on this CPU, but so what -- after all, didn't Ian and Andreas finish several ports within five weeks after Squeak's first release? ;-) |
Free forum by Nabble | Edit this page |