Hi,
I am a lurker on this list, but a long time Squeak participant. When I was a child, my parents gave me an interesting toy - a DigiComp I plastic mechanical computer http://en.wikipedia.org/wiki/Digi-Comp_I. I always remembered that toy, and it makes me wonder if computing machines could be assembled by children using objects in Etoys.
If I wanted to assemble a simple computer, I would probably start by connecting some registers and an accumulator, then figure out how to make the bits move, like cycling the plastic clock lever on my DigiComp I. So the first thing I might need would be a register object that does arithmetic and logic operations when I push the lever.
I don't know much about writing morphs and making them work in the Etoys environment, but I can write Smalltalk so I started by constructing some basic register building blocks. First I made a BitRegister, which is a simple one-bit computing element. Then I made a TwosComplementRegister, which uses a collection of BitRegisters to make a more useful general purpose register and accumulator of any size. I decided that using numbers to implement arithmetic would be cheating, so it's all done with booleans instead.
That's as far as I have gotten this weekend, but you get the idea. If I could turn these register building blocks into graphical Etoys morphs, then figure out how to assemble them into an arithmetic-logic unit, and tie that together with an instruction interpreter, then pretty soon it might turn into something interesting and fun for learning.
The register objects are on SqueakSource in project "Twos Complement" at http://www.squeaksource.com/TwosComplement.
Collaborators welcome.
Dave
David T. Lewis wrote at http://lists.squeakland.org/pipermail/etoys-dev/2011-October/006441.html
I don't know much about writing morphs and making them work in the Etoys environment,
I am not sure if the process to make an Etoys morph is fully documented.
However, one better is an automated tool that Richo made last year: http://www.squeaksource.com/EtoyMaker.html
(I cc'd the users list, because there are graphical ways that young Etoys users can use to solve logical problems or build logic machines. For one approach of many, open an Etoys image, click the Gallery of Projects bubble, and then "ComputerLogicGame" the third project of the third row in Etoys 4.1)
I decided that using numbers to implement arithmetic would be cheating, so it's all done with booleans instead.
I quite agree!
Have you a target processor in mind? Last year, a friend lent me a copy of Donald Knuth's 'Art of Computer Programming' Vol. 1, and ever since then I have thought that a model of the MIX computer would be an interesting Etoy. However I think there are simpler learning computers that could be modelled, though I don't know their names let alone their specifications.
I guess one approach could be to encourage a learner to experiment with different architectures.
David
Thanks to all for the suggestions and Etoys tips. I'm looking forward to finding a few more free weekends to play around with these ideas. A few comments below:
On Sun, Oct 02, 2011 at 09:13:08PM -0700, Casey Ransberger wrote:
Have you looked at Chuck Thacker's Tiny Computer? It's in Points of View, that book they did for Alan's birthday.
On Mon, Oct 03, 2011 at 09:16:24PM +0100, David Corking wrote:
Have you a target processor in mind? Last year, a friend lent me a copy of Donald Knuth's 'Art of Computer Programming' Vol. 1, and ever since then I have thought that a model of the MIX computer would be an interesting Etoy. However I think there are simpler learning computers that could be modelled, though I don't know their names let alone their specifications.
Both good ideas, although perhaps a bit ambitious for children to get started with. I can't help but mention also that Squeak itself has a good target machine: the Squeak VM. It has a byte coded instruction set and it comes with an interpreter written in Squeak. The Smalltalk implementation (which is called the "interpreter simulator" and which nowadays is kept in the VMMaker package on SqueakSource) is a complete working virtual machine, and if you changed it around a bit to use Etoys registers rather than "cheating" and using integers, then it might well become a working "visual Squeak VM". Of course it would not be very fast, but that's not the point ;)
On Mon, Oct 03, 2011 at 09:16:24PM +0100, David Corking wrote:
I guess one approach could be to encourage a learner to experiment with different architectures.
I like this idea the best, especially if it encourages learners to try things like "what is the simplest machine I can make that can add 2 plus 2?" and "how wide do my registers be if I want to multiply 3 times 5?" and "what happens to the result if my register is not big enough?".
On Tue, Oct 04, 2011 at 08:46:19AM +0200, Markus G??lli wrote:
And you might want to use connectors as exemplified in http://scg.unibe.ch/download/petitpetri/ a petri net editor built with Etoys.
That's a great idea, Connectors would be just right for wiring together the data paths.
Dave
David,
the problem with your plastic logic toy was that it had a single level. Simple projects were simple and understandable, but more complicated ones would get out of hand. In the same way, I feel that the solution is to have a sequence of Etoys projects where what you build in one is a basic block in another. You can either go bottom up (better for concrete thinkers) or top down (abstract thinkers like this).
Here is a college level course that does this:
http://www.cs.huji.ac.il/course/2006/nand2tet/
http://www.youtube.com/watch?v=JtXvUoPx4Qs (10 minute video)
http://video.google.com/videoplay?docid=7654043762021156507 (61 minute video)
Starting with NAND and building everything on that is cute from a mathematical viewpoint, but it I would start by showing the basic gates in terms of switches and lamps (there is an Etoys project for this, I think) or in terms of colored rectangles for CMOS chips (perhaps this could be done in Kedama in a reasonable way).
Their processor is really pathetic, but they only use it to implement a Java-like virtual machine and then use that from then on. The Squeak VM could be used as an alternative, but it is very complicated compared to, for example, the one in Little Smalltalk.
Chuck Thacker's TinyComputer designs are simply wonderful, but by implementing it as a very compact Verilog description there is just too much magic for someone who hasn't seen the logic gates and lower levels. There is no reason not to implement it as a schematic, however.
I have a very long list of educational processors you can look at, if you want. Some have been implemented in TTLs, others in FPGAs and still others just as simulators running on PCs. Here is one of my favorites:
http://www.bradrodriguez.com/papers/piscedu2.htm
-- Jecel
Cool project. It would be nice to play with a project like this :-) I think you should play with Etoys a bit to get to know the environment and how your electronic component system could be added.
Etoy reference under development: http://www.gosargon.com/EtoysReferenceManualV0.8.pdf
A EtoyMorph is is any morph. You can make scripting additions on the class side that contain the special additions the morph make. Note that Etoys have limited number of types! These additions must be added to Player as well. So if your morph has a variable called 'adder' that can be read and written you usually add a getAdder and setAdder: in the class additions side of the morph. And you also put getAdder and setAdder: to Player.
Etoys have a little different collection library. It uses holders, PasteUpMorphs, that can contain quite a big variety of objects. To use it as a programming collection you must be a little creative.
Feel free to ask if you run into issues on your way
Karl
On Mon, Oct 3, 2011 at 5:01 AM, David T. Lewis lewis@mail.msen.com wrote:
Hi,
I am a lurker on this list, but a long time Squeak participant. When I was a child, my parents gave me an interesting toy - a DigiComp I plastic mechanical computer http://en.wikipedia.org/wiki/Digi-Comp_I. I always remembered that toy, and it makes me wonder if computing machines could be assembled by children using objects in Etoys.
If I wanted to assemble a simple computer, I would probably start by connecting some registers and an accumulator, then figure out how to make the bits move, like cycling the plastic clock lever on my DigiComp I. So the first thing I might need would be a register object that does arithmetic and logic operations when I push the lever.
I don't know much about writing morphs and making them work in the Etoys environment, but I can write Smalltalk so I started by constructing some basic register building blocks. First I made a BitRegister, which is a simple one-bit computing element. Then I made a TwosComplementRegister, which uses a collection of BitRegisters to make a more useful general purpose register and accumulator of any size. I decided that using numbers to implement arithmetic would be cheating, so it's all done with booleans instead.
That's as far as I have gotten this weekend, but you get the idea. If I could turn these register building blocks into graphical Etoys morphs, then figure out how to assemble them into an arithmetic-logic unit, and tie that together with an instruction interpreter, then pretty soon it might turn into something interesting and fun for learning.
The register objects are on SqueakSource in project "Twos Complement" at http://www.squeaksource.com/TwosComplement.
Collaborators welcome.
Dave
etoys-dev mailing list etoys-dev@squeakland.org http://lists.squeakland.org/mailman/listinfo/etoys-dev
etoys-dev@lists.squeakfoundation.org