tag:blogger.com,1999:blog-57487842855396057062024-03-16T14:51:16.753-04:00Software ReflectionsDavid Buckhttp://www.blogger.com/profile/14309364915707457568noreply@blogger.comBlogger61125tag:blogger.com,1999:blog-5748784285539605706.post-47590586056641512622022-02-04T07:05:00.004-05:002022-02-04T07:05:42.042-05:00Internationalized Programming<p> PigeonTalk will be exploring the idea of graphical programming using drag and drop without translating from a text form using a compiler. This idea gives us the ability to extend the idea of programming into areas never before available.</p><p>Suppose that the names we use in our programs (class names, variable names, strings to display, reserved words, etc.) aren't just Symbols or Strings but are Translatable objects which can store a "default" version but can also store versions of that name in other languages (English, French, Japanese, etc.) and even using the unicode characters for those languages.</p><p>In your development environment, then, you would choose which language you want to use and the code would appear in your language. If a word doesn't have a translation for your language, you can add one. We could (as a first attempt), use Google Translate to translate the names for us to give a first rough translation of a name. This becomes even more feasible when we allow spaces in class and method names rather than depending on camelCase names.</p><p>Why should programming be English-specific? Let's let people who speak other languages program in their own language and allow programmers from one language be understandable by people in another language. I'd like to see a wider world of sharing and cooperation in programming.</p><p><br /></p>Davidhttp://www.blogger.com/profile/07044995997965805073noreply@blogger.com1tag:blogger.com,1999:blog-5748784285539605706.post-13585484172774991732022-02-04T06:54:00.000-05:002022-02-04T06:54:37.888-05:00Realms of Programming<p>One of the ideas I'm tossing around for PigeonTalk is the concept of a Realm. In a Smalltalk environment, when you're using a debugger if you keep hitting "Send" to follow the message send into the called method, you'll eventually find yourself in the "weeds" inside collections code, window frameworks, exception handling, and more. Although this may be interesting, and useful at times, it can be distracting and confusing for kids who are new to programming.<br /></p><p>On top of that, your stack trace in the debugger is filled with low level framework methods that usually don't help you understand the problem at hand.</p><p>To address this, I'm considering the concept of a Realm. A Realm is a group of classes and methods. It has some similarity to the concept of a Package in Store or an Application in Envy. On top of the grouping of classes and methods, however, it controls what you see when you debug through your code and when you browse senders, implemented, class references, etc.</p><p>Users can turn realms on or off. If a realm is on, then its classes and methods will show up in the IDE tools allowing you to see and step through the code. If a realm is off, you don't see the code inside it. Stack frames called by that code are hidden. Senders, implementers and references from the realm are hidden. You see the code you're working on and only that code.</p><p>It will certainly take some experimentation and trial implementations, but I believe it can help control the complexity of the system and hide the irrelevant parts from the programmers so they can focus on what they're doing.</p>Davidhttp://www.blogger.com/profile/07044995997965805073noreply@blogger.com0tag:blogger.com,1999:blog-5748784285539605706.post-13964876513583929502021-11-18T21:54:00.004-05:002021-11-18T21:55:34.527-05:00PigeonTalk Phase 2<p> For many years, I've been teaching programming courses. In order to help people visualize how object oriented programming works, I've developed an analogy. Imagine a person sitting at a desk. The person corresponds to an object. In front of the person is a pile of instruction books. There's one book for the class and one for each of its superclasses. Also on the table is a sheet of paper where you have written down your instance variables and another ready for temporary variables.</p><p>When a message arrives, you read it and look up the instructions for the method named by the message. You look in book for your own class first then go through the books for the superclasses until you find the method.</p><p>You then start running the instructions in the book. When you get to a message send, you write a message to an object and send it off. You then take a coffee break until the answer returns.</p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhk0fBnfGEXivQaDURuUG5qu4c-O7lsdNe8sF0e4KdaRi3vP4hJ6XHCNpPh5-e8ZuR2NxNyr_V9Ibw3Tgyla6S-V5wbRYMHOgq6QK8qD8KhZ7dfOkXFXeC23RqkRZWDOKr2nzzZLNoWt3c/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="768" data-original-width="1024" height="336" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhk0fBnfGEXivQaDURuUG5qu4c-O7lsdNe8sF0e4KdaRi3vP4hJ6XHCNpPh5-e8ZuR2NxNyr_V9Ibw3Tgyla6S-V5wbRYMHOgq6QK8qD8KhZ7dfOkXFXeC23RqkRZWDOKr2nzzZLNoWt3c/w449-h336/objectOriented.png" width="449" /></a></div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">This image represents that analogy graphically. The blue sphere on the right helps identify the kind of object. Every class would have an icon displayed on the table. To the left of the sphere are the books for your class and superclasses. Below it are the instance variables and the current values. The pink area represents temporary variables. The green area is the message that arrived with the argument displayed. Finally the gray area contains the code.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">The code doesn't need to be represented as text. We can use drag and drop to build the code. The red left arrows indicate variable assignment and the up arrows represent returns. The message in black with white text is the next message to be executed.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">This is just a graphical representation of where I'm heading. The final result may not look like this (since it was rendered in 3D with POV-Ray) but it shows what I'd like to do.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">I'd like to be able to "zoom out" and see the network of objects that make up the application. Lines would connect objects corresponding to the instance variable values. This aspect of the system is inspired by Kent Beck's Object Explorer. Finally, I'd like to be able to animate the execution of the program with glowing lines to show the current thread of execution. You can watch the messages flow from object to object and return back. You should be able to speed up or slow down the animation or pause it altogether.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">The system would include breakpoints, data watchpoints (breakpoints that trigger when variables change values). Breakpoints and watchpoints could be made conditional so they are only hit if the condition passes.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">There's certainly a lot to do, but I'm moving along that path.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><p></p><br /><br /><p></p>Davidhttp://www.blogger.com/profile/07044995997965805073noreply@blogger.com0tag:blogger.com,1999:blog-5748784285539605706.post-64169792354223304672021-11-13T22:33:00.002-05:002021-11-13T22:33:52.679-05:00PigeonTalk - Phase 1<p>Phase 1 of the development of PigeonTalk is to create a full Smalltalk development environment. Currently, I'm working by editing text files of Smalltalk code and using a REPL (Read Eval Print Loop) to run the commands to file in the changed files. This is a very difficult way to develop Smalltalk code.</p><p>The REPL itself is a simple HTML / Javascript interface which establishes a WebSockets connection with the image (which may run on the same system or a different system). The VM has a Sockets interface written as VM primitives and I've written a Web Sockets interface in Smalltalk using the Sockets interface.</p><p>Using this interface, I can at least type Smalltalk commands into a Text field and have them executed then I press the Print It button.</p><p>Phase 1 improves this interface using an HTML canvas and Javascript drawing operations. This technique is similar to the one used by <a href="https://en.wikipedia.org/wiki/Dan_Ingalls" rel="nofollow" target="_blank">Dan Ingalls</a> in his <a href="https://lively-kernel.org/" rel="nofollow" target="_blank">Lively Kernel</a>. The difference is that Lively has you doing all of the programming in Javascript. With PigeonTalk, the components will be implemented in PigeonTalk using Smalltalk. The low-level drawing commands for each component will be sent using JSON to the Javascript code which interprets those commands to perform the drawing. (A later optimization will have the Javascript code store the commands for re-drawing each component and for PigeonTalk to only send the commands to re-draw the components which have changed).</p><p>Using this technique, I plan to develop my own simple windowing system. From there, I plan to implement workspaces, Smalltalk browsers and debuggers. That would allow the system to behave like a real Smalltalk development environment.</p><p>Here's what the interface looks like right now.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhT38mYdY4oxiiqpk8d4mOeIq2nBPmgYwz8rSWP7jPS2XVrUd0I0r-e8H-YfqL_fv1X_lUbtVlOEVRKzmseC2Anjs7_CEJid5UJbXZNMMBjqh06Wv_SZvugTnsanM2YbZhLT4ycowVkfVI/s1214/PigeonDevEnvironment.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="867" data-original-width="1214" height="229" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhT38mYdY4oxiiqpk8d4mOeIq2nBPmgYwz8rSWP7jPS2XVrUd0I0r-e8H-YfqL_fv1X_lUbtVlOEVRKzmseC2Anjs7_CEJid5UJbXZNMMBjqh06Wv_SZvugTnsanM2YbZhLT4ycowVkfVI/s320/PigeonDevEnvironment.png" width="320" /></a></div><br /><p>The Do It and Print It buttons are implemented at the VM level. The remaining buttons allow me to open the VM in a Development mode and perform single stepping and view stacks to make sure the VM is working properly.</p><p>The gray area at the bottom is an HTML canvas to use as the beginning of the windowing system. Once the windowing system works well enough, I'll remove the buttons and text fields at the top leaving only the canvas on the screen. This will be the Smalltalk user interface.</p><p>The first version of PigeonTalk will look and feel very much like a version of Smalltalk. Once this is working, I'll move on to Phase 2 to change the language itself. I'll describe that vision in another blog post.</p>Davidhttp://www.blogger.com/profile/07044995997965805073noreply@blogger.com0tag:blogger.com,1999:blog-5748784285539605706.post-17929346404446818132021-11-13T19:06:00.006-05:002021-11-13T19:11:30.598-05:00 PigeonTalk<p>It’s been a while since I’ve posted to this blog so I thought I’d update everyone on my latest project.</p><p>First, I'd like to explain my motivation. I started programming when I was 15 years old on my own hand-wired computer. Over the years, I've been able to play in many areas of computing including 2D graphics, 3D graphics (including DKBTrace and <a href="http://www.povray.org" rel="nofollow" target="_blank">POV-Ray</a>), sound effects, music, neural networks, Braitenberg vehicles, simulated physics (<a href="http://www.simberon.com/elastolab.html" rel="nofollow" target="_blank">ElastoLab</a>) and computer games. My goal is to encourage others to explore the fun areas of computing by providing a programming environment and frameworks that make those explorations easy, fun and understandable.<br /><br /></p><div class="separator" style="clear: both; text-align: center;"><a href="http://news.povray.org/povray.binaries.images/attachment/%3C47ae6bd0%40news.povray.org%3E/roman.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="600" data-original-width="800" height="201" src="http://news.povray.org/povray.binaries.images/attachment/%3C47ae6bd0%40news.povray.org%3E/roman.jpg" width="267" /></a><div class="separator" style="clear: both; text-align: center;"><a href="http://www.simberon.com/images/elastolab.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="500" data-original-width="620" height="215" src="http://www.simberon.com/images/elastolab.jpg" width="266" /></a><div class="separator" style="clear: both; text-align: center;"><a href="http://www.simberon.com/SeaTurtleRescue/images/MainMenu.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="600" data-original-width="800" height="202" src="http://www.simberon.com/SeaTurtleRescue/images/MainMenu.png" width="269" /></a></div></div></div><br /><p>You may know that Simberon wrote a Smalltalk virtual machine to run VisualWorks compiled code. We used that VM to release Sea Turtle Rescue for Android and iOS.</p><p>Since then, I’ve re-written the VM to use a redesigned bytecode language. I then wrote a new Smalltalk compiler from scratch (written in itself) to compile Smalltalk source code to that new bytecode language.</p><p>This means that I now have a version of Smalltalk that runs by itself independent of any commercial software. When it’s ready, I’d like to release it as free open-source software. My working name for the project is PigeonTalk for reasons I’ll describe later.</p><p>My long-term plans for PigeonTalk fall into three phases.</p><p>1) Create a complete self-contained Smalltalk with a development and runtime environment running in a web browser.</p><p>2) Change the language and environment to escape the restrictions of text-based source code and compilers. At the same time, create an environment where programming can be done primarily with drag and drop components and where the runtime operation of the code can be clearly seen. I plan to animate the execution of the program under the control of the programmer. A program becomes a maze that a small person runs through. Accessing and modifying variables is represented as reading and writing things on post-it notes around the program. Message sends are shown as carrier pigeons that fly off to deliver your message and return with an answer - hence the name PigeonTalk.</p><p>3) Write frameworks where various kinds of applications can be easily developed on top of the framework. For example, I'm planning to build frameworks for 2D graphics, 3D graphics, sound, music, and more. I plan to create YouTube videos showing how to build programs on those frameworks and provide samples that others can modify.</p><p>I'm planning to fund this development with Kickstarter campaigns. The end result will be a free product to allow as many people as possible to use it.</p><p>Coming from a Smalltalk background, I have several guiding principles:</p><p>1) All source code is visible and modifiable. The source for the entire library is available and editable in the same development environment as you use to write your own programs. If you're curious about how something works, just go look. The VM is written in C and parts of the UI are controlled by JavaScript, but everything else is written in the same PigeonTalk environment.</p><p>2) The development environment is that same as the runtime environment. You can change code even while the program is running. The debugger allows you to stop the program, and single-step it easily seeing the effects of the code. You can also change the code directly in the debugger and keep going.</p><p>3) Everything is an object. Integers, Characters, Floats and Strings are objects just like the objects you create yourself. There are no "primitive types" which are handled differently.</p><p>I'll be following up this post with more describing some of the details of this project. If you're interested in PigeonTalk, send me an e-mail at david@simberon.com and I'd be happy to answer your questions.</p>Davidhttp://www.blogger.com/profile/07044995997965805073noreply@blogger.com0tag:blogger.com,1999:blog-5748784285539605706.post-31137252088034098372019-11-20T07:55:00.002-05:002019-11-20T07:55:19.188-05:00Sea Turtle Rescue is now Released!Simberon's new mobile game Sea Turtle Rescue has now been released for iPhone, iPad and Android devices. The game is a puzzle game that challenges you to solve puzzles to hatch sea turtle eggs and guide the babies to the ocean.<br />
<br />
You can read details about the game and links to the online stores at the web site <a href="http://www.simberon.com/SeaTurtleRescue/">http://www.simberon.com/SeaTurtleRescue/</a>.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-fLuccuRksMEZXz5GVycUrbfqDR-busraXl48gUD6B2kS2QXcWSvV7wyqPCtMRZw77oTl7NgXGEb0cgGllMwBa5dDA3WH8srVvYzF69w_wVzPq90WQtqCqsTSf_Z_ocw_AmMt3mwP2a0/s1600/MainMenu.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="768" data-original-width="1024" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-fLuccuRksMEZXz5GVycUrbfqDR-busraXl48gUD6B2kS2QXcWSvV7wyqPCtMRZw77oTl7NgXGEb0cgGllMwBa5dDA3WH8srVvYzF69w_wVzPq90WQtqCqsTSf_Z_ocw_AmMt3mwP2a0/s320/MainMenu.png" width="320" /></a></div>
<br />Davidhttp://www.blogger.com/profile/07044995997965805073noreply@blogger.com0tag:blogger.com,1999:blog-5748784285539605706.post-84494174806802539012019-11-04T22:15:00.002-05:002019-11-04T22:15:35.216-05:00Sea Turtle Rescue web site updateI've updated the <a href="http://www.simberon.com/SeaTurtleRescue">Sea Turtle Rescue web site</a> to include better instructions on how to play the game. Thanks to my co-op students Milchias Teare and Chris Stanley from St. Patrick's High School for the help updating the web site. I think they did a great job.Davidhttp://www.blogger.com/profile/07044995997965805073noreply@blogger.com0tag:blogger.com,1999:blog-5748784285539605706.post-37503186918556854652019-11-04T13:51:00.000-05:002019-11-04T13:51:16.772-05:00Sea Turtle Rescue - ReleaseWell, the release date is drawing near. Sea Turtle Rescue will be released to the App Store and the Play Store on November 20, 2019.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTIVRredfY4wQf4PN2GDMzgRIY0M8i21E6NB8e2i9-oAbJqEnzUdtGdQJrSufJhprPGCK5V7fJFw_ly7a31c-43cuxM4q_XdfD7PKoQnEhsh8Oz9KOuIVTw_MxSyO1c5oVQSSMdeufeoc/s1600/MainMenu.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="768" data-original-width="1024" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTIVRredfY4wQf4PN2GDMzgRIY0M8i21E6NB8e2i9-oAbJqEnzUdtGdQJrSufJhprPGCK5V7fJFw_ly7a31c-43cuxM4q_XdfD7PKoQnEhsh8Oz9KOuIVTw_MxSyO1c5oVQSSMdeufeoc/s320/MainMenu.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
Sea Turtle Rescue is a puzzle game written in Smalltalk. It features 244 levels of play divided into 9 series.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCHSuwfrsJj5y-qarYlKByYevYAB8jZe1_-PYwJ41wXWC65VncRcLI0WNxZN7jPDjQttiY4d0_wQUXRGMWFXU1fBB1pJ7uKJ99tGdsjj7DnMeuIN85x4kzt-YsmFi1-L0pJ8re3bgS5R4/s1600/BlastBank.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="768" data-original-width="1024" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCHSuwfrsJj5y-qarYlKByYevYAB8jZe1_-PYwJ41wXWC65VncRcLI0WNxZN7jPDjQttiY4d0_wQUXRGMWFXU1fBB1pJ7uKJ99tGdsjj7DnMeuIN85x4kzt-YsmFi1-L0pJ8re3bgS5R4/s320/BlastBank.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
Your goal is to hatch the eggs (in the above level, there's an egg on the 5 tile) by making a sequence of connected tiles from the egg down to 1. Once you've connected the sequence, the egg will hatch and the sea turtle will run down the path and be dropped into the ocean.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2YrPlj362c3WUeEbMEWTX8gEURFWU4cvrSz4GVxs2LYzXvJ5JWD3jiSs5a1IFhQx1va37ZXsefowIRxMMsqeVZiRWyCm09fLZUhyzHDT6QrBlQJLgQ0h_YnzISH8j4y8X39A3VDdDbyY/s1600/BlastBank2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="768" data-original-width="1024" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2YrPlj362c3WUeEbMEWTX8gEURFWU4cvrSz4GVxs2LYzXvJ5JWD3jiSs5a1IFhQx1va37ZXsefowIRxMMsqeVZiRWyCm09fLZUhyzHDT6QrBlQJLgQ0h_YnzISH8j4y8X39A3VDdDbyY/s320/BlastBank2.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
To help you solve the harder puzzles, you can use hammers, bombs and magnets. Hammers allow you to nail tiles down so they don't move. Bombs can blow up tiles that are in your way. Magnets attract other tiles so they move together.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Sea Turtle Rescue runs on iPhones, iPads and Android devices and will be available on November 20.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div style="text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.blogger.com/video.g?token=AD6v5dwDtrm5B8TCA0PPn5Scoi2gmd0I25eeZ70wXvELOBMRpzZqG2I2Lgzb8G_1KrAD7SFM_UrIJtyAuq6Zrc0FUg' class='b-hbp-video b-uploaded' frameborder='0'></iframe></div>
<br />
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<br />Davidhttp://www.blogger.com/profile/07044995997965805073noreply@blogger.com0tag:blogger.com,1999:blog-5748784285539605706.post-40470723521966886492018-07-25T11:27:00.000-04:002018-07-25T11:27:01.314-04:00Smalltalk contract workLooking forward, I'll have some time available between now and the end of the year to take on other projects. If anyone is interested in contracting some work to Simberon let me know. Simberon specializes in Smalltalk software development (VisualWorks, ObjectStudio, VA Smalltalk and GemStone). Services include:<br />
<br />
<br />
<ul>
<li>Version upgrades</li>
<li>Custom software development</li>
<li>Tracking down difficult bugs</li>
<li>Mobile application development on Android and iOS in VisualWorks Smalltalk</li>
<li>Instructor-led Training</li>
<ul>
<li>Introduction to Smalltalk</li>
<li>Advanced VisualWorks Topics</li>
<li>Design Patterns</li>
<li>Improving Object Oriented Design</li>
</ul>
</ul>
Contact me at info@simberon.com if there are any services you would like.<br />
<br />Davidhttp://www.blogger.com/profile/07044995997965805073noreply@blogger.com0tag:blogger.com,1999:blog-5748784285539605706.post-32599806563068448722018-07-25T07:21:00.001-04:002018-07-25T07:21:51.927-04:00Sea Turtle RescueI've been a bit quiet about my game recently. It's not because I'm not working on it - I am. It's that I'm changing the game around so much that I have to get my head around it.<br />
<br />
I'm in the process of transforming the game to a new theme and new title. I've hired an animator and graphics artist to do artwork for me.<br />
<br />
The new game will be "Sea Turtle Rescue". The goal of each level of the game is to hatch sea turtle eggs and guide the sea turtles into the ocean. The basic mechanics will be the same as HexSolve but the graphics and animation will all change.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVs7V9CyBM3UBZbPfdeJ_wE03sv1rTxEKc-OpJ4loagXMkZJmVXo_u7thSetoPVFl3CTmZDpttrNFbqMWtq5Blm9bzgHbUrhg95t514hcIHHYYFl1kFPKjZmBpFqDxCw20cFp2tZMstrM/s1600/turtle-full-body.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="707" data-original-width="411" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVs7V9CyBM3UBZbPfdeJ_wE03sv1rTxEKc-OpJ4loagXMkZJmVXo_u7thSetoPVFl3CTmZDpttrNFbqMWtq5Blm9bzgHbUrhg95t514hcIHHYYFl1kFPKjZmBpFqDxCw20cFp2tZMstrM/s320/turtle-full-body.png" width="186" /></a></div>
Tiles in the board will become tiles covered with sand. The target will become a sea turtle egg. When you make a sequence (a path) from 1 up to the tile with the egg, the egg will hatch and a sea turtle will emerge. The sea turtle will shuffle down the path you built (in reverse order: eg. 4, 3, 2, 1) until it gets to the 1 tile where it will drop into the ocean below.<br />
<br />
I'll be adding sound and music to the game to add an extra ambiance.<br />
<br />
I like the new theme much more than the strict mechanical puzzle theme of HexSolve. It gives a nice purpose for the game and an interesting theme. I'll try to keep you posted as we make progress.Davidhttp://www.blogger.com/profile/07044995997965805073noreply@blogger.com0tag:blogger.com,1999:blog-5748784285539605706.post-91238021681156400852018-07-14T20:21:00.000-04:002018-07-14T20:21:31.424-04:00Native development of mobile gamesWhen I tell people that I'm developing mobile games in VisualWorks Smalltalk, they often look at me quizzically and ask why. It's hard to explain the advantages of using Smalltalk when the game needs to run on a mobile device with only a serial interface connected to my own low-level debugger.<br />
<br />
I've now broken through that barrier. I can now run the code natively in a VisualWorks development environment.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVOPTM3wPE9TBk2NZHPRzjgUL812oKxCz4XfW0aeXCXyZUUoTgDV5TgJZtgf4L8bZy4XEJasHUKbR_FTQgisRenhuHUMbKi-6n77ayO2EMwZRpbGXBOCYqDBsN8Ef9Q6xpskZjoJhXQ1Y/s1600/SimTalk-Emulator.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1041" data-original-width="770" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVOPTM3wPE9TBk2NZHPRzjgUL812oKxCz4XfW0aeXCXyZUUoTgDV5TgJZtgf4L8bZy4XEJasHUKbR_FTQgisRenhuHUMbKi-6n77ayO2EMwZRpbGXBOCYqDBsN8Ef9Q6xpskZjoJhXQ1Y/s320/SimTalk-Emulator.png" width="236" /></a></div>
<br />
This is my game running inside a VisualWorks window on a Windows 10 laptop. The Smalltalk code is virtually identical to the Smalltalk code that runs on the mobile device. The only differences are in the low-level interfaces to the file system, the FreeType library and OpenGL.<br />
<br />
This is a game changer for me. I now have access to the full Smalltalk development environment including the inspectors, the debugger, condition breakpoints and the ability to change code while the game is running.<br />
<br />
Now I feel like my decision to use Smalltalk will pay off in spades.<br />
<br />Davidhttp://www.blogger.com/profile/07044995997965805073noreply@blogger.com1tag:blogger.com,1999:blog-5748784285539605706.post-65402812011898312332018-04-05T06:28:00.002-04:002018-04-05T06:29:20.973-04:00HexSolve Puzzle GameYour challenge is to slide tiles around a hexagonal board and create numbered chains. End the chain with target tiles to advance to the next level. Make chains too early and you can get stuck. With over 200 levels from Easy to Wicked, you will find this game challenging yet satisfying. How far can you get before you meet your match?<br />
<br />
Available on the App Store and on Google Play.<br />
<br />
For more details, visit <a href="http://www.simberon.com/HexSolve">http://www.simberon.com/HexSolve</a><br />
<div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqjuRPYSLAaokz5AcncIQDEo0C-rNVlC5Yae51Q1GyURR3H6E65MlLDMbfCbvJKhNW4AMQ1XlaI6qtwrzYsWI5N7u0j1n-ut2Qv-dVNW5d929koYarp0vbwqmIAGicp_HI02DhP1MEshI/s1600/HexSolve.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="864" data-original-width="864" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqjuRPYSLAaokz5AcncIQDEo0C-rNVlC5Yae51Q1GyURR3H6E65MlLDMbfCbvJKhNW4AMQ1XlaI6qtwrzYsWI5N7u0j1n-ut2Qv-dVNW5d929koYarp0vbwqmIAGicp_HI02DhP1MEshI/s320/HexSolve.png" width="320" /></a></div>
<div>
<br /></div>
</div>
Davidhttp://www.blogger.com/profile/07044995997965805073noreply@blogger.com3tag:blogger.com,1999:blog-5748784285539605706.post-2163908559392424492018-04-02T14:18:00.000-04:002018-04-05T05:42:28.637-04:00HexSolve Puzzle Game for iOS and AndroidSimberon is proud to announce the release of the HexSolve Puzzle Game for iOS and Android. You can download them on the App Store and on Google Play.<br />
<br />
HexSolve challenges you to create chains of tiles on order to make special "target" tiles advance. As you swipe the screen in one of 6 directions (left, right, up-left, up-right, down-left and down-right), all of the free tiles will move as far as they can in that direction.<br />
<br />
At the end of the swipe, and chains of consecutive numbers starting at 1 are "combined". All the tiles except the highest number are removed and the highest number tile is advanced. If that tile was a target tile, the target is removed.<br />
<br />
You finish the level when there are no more target tiles left on the board.<br />
<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjU84xkoOOZsPnfe5QCSr4oY9GiALwYawtzUnmunnfLijlGEbjqiYvTppELY-mgomQdHU5aDG2Khp-fX6tHjwpFHt2u5U2IxCd_0Hwq1boLlDaGm4rjKeeqTNVsoHBKxXRyQsjuzixqdc/s1600/HexSolve.png" imageanchor="1"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjU84xkoOOZsPnfe5QCSr4oY9GiALwYawtzUnmunnfLijlGEbjqiYvTppELY-mgomQdHU5aDG2Khp-fX6tHjwpFHt2u5U2IxCd_0Hwq1boLlDaGm4rjKeeqTNVsoHBKxXRyQsjuzixqdc/s320/HexSolve.png" width="320" /></a><br />
After the Tutorial level which guides you through the game's rules, you'll advance to higher levels including Easy, Challenging, Tough, Hard and Wicked.<br />
<br />
You can play the game from start to end without making any purchases. In that case, you'll have a limited number of restarts per hour and you'll receive ads occasionally. If you want to eliminate the ads, get hints on how to solve levels, or get unlimited restarts, you can purchase those options from the Shop.<br />
<br />
Download it now and have fun. If you can solve any Wicked level on your own, let me know. Those levels are really hard.<br />
<br />
I'd love to hear any feedback you have by e-mailing hexsolve@simberon.com.<br />
<br />
<br />Davidhttp://www.blogger.com/profile/07044995997965805073noreply@blogger.com2tag:blogger.com,1999:blog-5748784285539605706.post-48480491354579063762017-11-28T05:39:00.000-05:002017-11-28T09:11:06.855-05:00Mobile SmalltalkI've been announcing the Open Beta release of my game <a href="http://www.simberon.com/HexSolve">HexSolve </a>for Android and iOS. HexSolve was written in Smalltalk and people have been asking me how it's possible to run Smalltalk on mobile devices. I thought I'd write up a little description of the technology behind it.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3TN247cjsUwPYey9ovYROWC7NZIvmiIFkTF3wIa9fvoBNL497pO8h5xxKCXV2X-Cr3G7wK30IikXYmRysiD76E3ZCQ8OsuTUjOrzbR_yHlm7VyMfYtC1qjHhVqzICw0LBmF6CL2dNprY/s1600/2017-11-23+09.45.47.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1000" data-original-width="1600" height="250" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3TN247cjsUwPYey9ovYROWC7NZIvmiIFkTF3wIa9fvoBNL497pO8h5xxKCXV2X-Cr3G7wK30IikXYmRysiD76E3ZCQ8OsuTUjOrzbR_yHlm7VyMfYtC1qjHhVqzICw0LBmF6CL2dNprY/s400/2017-11-23+09.45.47.png" width="400" /></a></div>
<br />
<br />
I've wanted to be able to run Smalltalk on Android and iOS for many years. I finally decided to do something about it. I chose VisualWorks for my development environment. Unfortunately iOS doesn't support dynamic compilation so getting the regular VisualWorks VM to run on iOS is virtually impossible. I decided to skirt around the issue by writing my own VM.<br />
<br />
My VM is written in C. It interprets the same bytecodes as those generated by VisualWorks so I can use the VisualWorks compiler to compile all of the code for the mobile Smalltalk. Being a pure interpreter, I get around the problem of dynamic compilation on iOS. Apple is okay with an interpreter so long as all of the code it's interpreting is delivered with the product and not downloaded dynamically.<br />
<br />
Development of the Smalltalk code begins in VisualWorks. I have my own Object class (in my own namespace) as well as my own copies of the other base classes (True, False, UndefinedObject, etc.). I did this because I had better control of the implementation than I would if I just used the VisualWorks base code. If I used the regular VisualWorks classes, then I would need to bring in more and more of the base code to get those classes to work. There are just too many "strings attached" to do this effectively.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuxxVk5fgCdEJHzXp2NpmfhcgclmtVsilcYtUINAHHaJBxEhzprFd75SmsYZAmosZKwabPKP7JceUSMx_wuCu-8mv0YqZtNI2qBu9L6Z-J8w-D72wZ4nF3jD5VMuiBOLflZCB9WpwMkEc/s1600/SimTalkClassBrowser.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="538" data-original-width="777" height="275" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuxxVk5fgCdEJHzXp2NpmfhcgclmtVsilcYtUINAHHaJBxEhzprFd75SmsYZAmosZKwabPKP7JceUSMx_wuCu-8mv0YqZtNI2qBu9L6Z-J8w-D72wZ4nF3jD5VMuiBOLflZCB9WpwMkEc/s400/SimTalkClassBrowser.png" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
Methods beginning with an underscore ($_) will have the underscore removed when moving the image to the mobile device. It allows me to have one version for Mobile Smalltalk and a different version for VisualWorks. You can imagine that it would be bad if I re-defined at:put: in VisualWorks.<br />
<br />
I have an ImageBuilder utility that takes all of the code in the packages "SimTalk Remote Core" (base Smalltalk code) and "SimTalk HexSolve" (the game itself), packages them into a special 64-bit image format and writes the image into a file. I can then use AndroidStudio or XCode to include this image as an asset to deliver to the device along with the interpreter.<br />
<br />
The interpreter itself is a 64 bit image. It uses immediate objects (tagged objects that fit within the object pointer) for SmallInteger, Character and Float. This allows me to do faster operations on these objects without allocating memory.<br />
<br />
The game uses Smalltalk primitives to interface to OpenGL ES which runs on both Android and iOS. For text, I interface to Freetype which is compiled and delivered with the game. Freetype will create images for the characters which I can collect and cache in a Smalltalk Image object. I then render these images as OpenGL textures.<br />
<br />
My mobile Smalltalk is single-threaded - there's no such thing as fork, a Process or a ProcessManager. In fact, Smalltalk runs completely as an OS callback. When the OS determines that something happened (a touch event, a button or a timeout), it runs a callback in my VM. The VM creates an Event object, drops it into a known spot in the image and runs the interpreter. The interpreter then reads the event, dispatches it, re-renders the screen if necessary then calls suspend which returns from the OS callback. Nothing more happens until the next OS callback.<br />
<br />
Some people have asked me when I'll release this technology so they can use it. I'm sorry to say, but I don't intend to do that. This is for internal use for me to write Smalltalk code for Android and iOS. I have several problems if I try to commercialize the development technology:<br />
<br />
<ol>
<li>You can't develop code in this environment without a VisualWorks license. I have such a license with Cincom but it's hard to tell other developers that they need a license for VisualWorks plus a license for my mobile development environment and it's hard to enforce.</li>
<li>I've implemented interfaces to API's I need in the OS but not to everything. Other developers would need probably access to accelerometers, GPS, Internet, cameras and other things. I can't have a good commercial product without those interfaces and it's too much work to write these interfaces on speculation.</li>
<li>Too many companies have died trying to provide tools for developers to enhance Smalltalk environments. The market isn't big enough to justify the effort.</li>
<li>To be honest, software developers make lousy customers. They tend to be very demanding on everything they need and usually don't like paying money for what they get. They're used to software development environments being free and open source and don't want to pay for development and maintenance of their toolset.</li>
<li>I'd rather create fun profitable games than creating development environments for other people to use to create fun profitable games.</li>
</ol>
The graphics for HexSolve were all rendered using <a href="http://www.povray.org/">POV-Ray</a>.<br />
<br />
I hope that answers most of your questions. Happy Smalltalking.<br />
<br />Davidhttp://www.blogger.com/profile/07044995997965805073noreply@blogger.com188tag:blogger.com,1999:blog-5748784285539605706.post-62377818956581404382017-02-01T15:02:00.000-05:002017-02-01T15:02:09.564-05:00Base source code - the good, the bad and the uglySmalltalk is one of the very few development environments where developers get easy access to all the source code of all the frameworks they use. This comes in very handy when there are problems you need to debug and you need to step through the framework to figure them out. It also allows you to see how the framework expects to call your code.<br />
<br />
Smalltalk also allows you to make changes to that framework. Environments like VisualWorks even allow you to keep your base changes in your own packages so that they're loaded in when you load the rest of your code from the version control system.<br />
<br />
The problem with all of that is that developers begin to feel too free that they can change anything they want. If they don't like the colors of controls, they can change them. Do you want to add new options to the controls? Sure, go ahead. Do you want lists that format their contents into columns? Just write it. Many companies develop their own frameworks on to of the vendor-supplied framework.<br />
<br />
It makes for an incredibly flexible system but there's one huge drawback. When you upgrade to a new version of the base, the vendor has made changes and now all of your modifications don't work. It's a long and painful process to find the pieces that are wrong and either fix them or re-write them.<br />
<br />
I'm currently working on two upgrades for VisualWorks customers. Both of them have built their own frameworks on top of the VisualWorks framework. Both are encountering problems upgrading to the latest version because some very basic things have changed in the base. Normally, these are details that only the vendor needs to worry about, but when you build your own framework with intimate knowledge of how the base framework operates, you're going to run into problems.<br />
<br />
I don't really have a good solution for these customers except to fix the problems as I come across them. It would have been nice if they didn't have this strong dependency on the base but given that they do, I can't really change that. They just have to understand that it makes upgrades more difficult and expensive.<br />
<br />
Do developers in other languages have these problems as well? Do you need to make sweeping changes to your Java application whenever a new version of Java or one of your framework libraries comes out? Do you customize your framework libraries? Is this just a Smalltalk headache? Let me hear from you.David Buckhttp://www.blogger.com/profile/14309364915707457568noreply@blogger.com6tag:blogger.com,1999:blog-5748784285539605706.post-37098786305953702072015-03-31T16:20:00.002-04:002015-03-31T16:20:33.201-04:00Canadian Smalltalk Programming CompetitionI'm working with the <a href="https://smalltalkrenaissance.wordpress.com/">Smalltalk Renaissance Program</a> to run a Smalltalk coding competition to start in January 2016. The competition is open to high school students across Canada with prizes of university scholarships we're calling the "James Robertson Memorial Scholarships".<br />
<br />
The competition itself will run over 10 weeks in 5 rounds. The challenge is to write a program to play a game we devise (details to be provided later). At the end of each round, we produce a video of the top 30 scoring programs. For the next round, we throw in a twist to the game. The scholarships are awarded based on the scores of the final round.<br />
<br />
This competition will be a lot of fun to play and to follow. All materials and videos produced will be available for anyone to download. Only student teams can actually compete.<br />
<br />
We will be producing introductory videos to get the students familiar with Smalltalk, the development environment and the starting code we provide.<br />
<br />
For this to work, we need the funding for the scholarships so we're running a Kickstarter project. Come join us to help make this competition a success.<br />
<br />
<a href="https://www.kickstarter.com/projects/1520902870/canadian-smalltalk-competition">https://www.kickstarter.com/projects/1520902870/canadian-smalltalk-competition</a><br />
<br />David Buckhttp://www.blogger.com/profile/14309364915707457568noreply@blogger.com0tag:blogger.com,1999:blog-5748784285539605706.post-5395895682957538952014-11-14T16:57:00.001-05:002014-11-14T17:04:35.286-05:00Pharo Days 2015Torsten Bergmann has announced <a href="https://medium.com/@svenvc/pharo-days-2015-6336d6ee2a23">Pharo Days 2015</a> to be held January 29 and 30, 2015 in Lille France. Here's part of his announcement:<br />
<br />
<blockquote class="tr_bq">
Start the year in the right spirit by joining the Pharo community for the Pharo Days 2015 on Thursday January 29 and Friday January 30 at INRIA, Lille, France. Meet your online colleagues, programmers and hackers in real life and experience how much you can pick up in just two days. Learn about key technologies, talk to core developers and other users, pair program and contribute to Pharo. Have fun and enjoy yourself.</blockquote>
It sounds like fun. Check it out.<br />
<br />
<a href="https://medium.com/@svenvc/pharo-days-2015-6336d6ee2a23">https://medium.com/@svenvc/pharo-days-2015-6336d6ee2a23</a><br />
<br />David Buckhttp://www.blogger.com/profile/14309364915707457568noreply@blogger.com0tag:blogger.com,1999:blog-5748784285539605706.post-6678797900099066742014-11-14T16:51:00.000-05:002014-11-14T16:51:02.118-05:00Essence# in InfoQThere's a great interview in <a href="http://l.facebook.com/l/hAQElLgXm/www.infoq.com/articles/Introducing-Essence-Sharp">InfoQ </a>with Alan Lovejoy - the author of Essence#. Essence# is Alan's ANSI-compliant Smalltalk running on .NET. Check it out.<br />
<br />
Thanks to Peter William Lount for the pointer.<br />
<br />David Buckhttp://www.blogger.com/profile/14309364915707457568noreply@blogger.com0tag:blogger.com,1999:blog-5748784285539605706.post-86371648219409577912014-11-13T16:06:00.001-05:002014-11-13T16:06:25.033-05:00Instantiations releases VA Smalltalk 8.6.1Instantiations has released VA Smalltalk version 8.6.1. New features include real-time code analytics. enhanced refactoring support, SQLite3 support and zip/gz support plus enhancements to Linux and Seaside. Check it out:<br />
<br />
<a href="http://www.instantiations.com/products/vasmalltalk/download.html">VA Smalltalk 8.6.1</a>David Buckhttp://www.blogger.com/profile/14309364915707457568noreply@blogger.com0tag:blogger.com,1999:blog-5748784285539605706.post-53033001254576376442014-11-13T16:02:00.001-05:002014-11-13T16:02:11.603-05:00Cincom releases VisualWorks 8.0 and ObjectStudio 8.6Cincom has released VisualWorks 8.0 and ObjectStudio 8.6. This new version has dramatic new changes to the user interface including Text2, a new source code editor and UISkinning. The changes are very exciting. Check it out at the links below.<br />
<br />
<a href="http://www.cincomsmalltalk.com/main/products/visualworks/?elq=ed400e68a07f48e495c53a83019b242c&elqCampaignId=893">VisualWorks</a><br />
<a href="http://www.cincomsmalltalk.com/main/products/objectstudio/?elq=ed400e68a07f48e495c53a83019b242c&elqCampaignId=893">ObjectStudio</a><br />
<br />David Buckhttp://www.blogger.com/profile/14309364915707457568noreply@blogger.com0tag:blogger.com,1999:blog-5748784285539605706.post-49978606446018575492014-09-22T21:44:00.003-04:002014-09-22T21:44:33.989-04:00OpenGL ES from Smalltalk on AndroidWell, here's my first rendering of an OpenGL scene from Smalltalk on the Android:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCwkNnC30tC9HAN_xihApIVCod7P0gkL504dZY-22lo5RID9YXnGPcxE6-61LTAwG0C_z0ATbCbpPbwL_IT1BSbVezDI49iyz5azHNuCEzTmwwDjJQw751nz_YzbFfCQ8ghQ2GvV1LgvQq/s1600/1289478780387Screenshot_2014-09-22-21-29-06.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCwkNnC30tC9HAN_xihApIVCod7P0gkL504dZY-22lo5RID9YXnGPcxE6-61LTAwG0C_z0ATbCbpPbwL_IT1BSbVezDI49iyz5azHNuCEzTmwwDjJQw751nz_YzbFfCQ8ghQ2GvV1LgvQq/s1600/1289478780387Screenshot_2014-09-22-21-29-06.png" height="320" width="200" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
It's your standard plain colored triangle on a plain background - so shoot me. But this image was generated by calling OpenGL primitives from my Smalltalk VM on an Android device, so it's pretty special.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
I've talked about this Smalltalk before <a href="http://simberon.blogspot.ca/2014/03/simtalk-smalltalk-for-mobile-devices.html">here</a>. Here's the current status. I have all of the same bytecodes as VisualWorks implemented with the exception of the bytecode for thisContext. This allows me to use the VisualWorks compiler for free.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
My source code is kept in a Store package in a separate namespace. To run the code, I package all the classes and methods from that package into an image file in my own format - the Android image isn't compatible with a standard VW image. This image is added as an asset in an Android project and sent along with a .so shared object library for the VM where it runs on the Android.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
There's no Java code in the project at all. I'm using a native activity in C and I've merged the Android event loop into the Smalltalk interpreter loop. This allows me to handle events from the Android although I currently don't have code for that.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
For debugging purposes, I can package a development image. On startup, this image connects by a socket connection to a VW application which I wrote to provide low-level debugging and stepping instructions.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
The system is still in its infancy. There are still lots of things to develop like the garbage collector and most of the class library. I have some basic operations but there's a lot of work needed to build up the library. So far I don't have large integers although that's in the works. I do support Float and Double and these classes are being used to help build the OpenGL image above.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
I'll be demoing this system at Camp Smalltalk in Vancouver. I'd be happy to answer questions about it. It still needs a lot of work, but it's starting to produce real results.</div>
David Buckhttp://www.blogger.com/profile/14309364915707457568noreply@blogger.com0tag:blogger.com,1999:blog-5748784285539605706.post-36820433460769094142014-09-13T14:55:00.001-04:002014-09-13T14:55:07.232-04:00Camp Smalltalk in NanaimoEverything's booked. My wife and I are heading to Nanaimo BC on October 3, 2014 to attend Camp Smalltalk. I'll be demonstrating the mobile Smalltalk I'm developing - it will be a work in progress. I may also be involved in a "Intro to Smalltalk" presentation there. I'm heading back to Ottawa on October 6th.<div>
<br /></div>
<div>
If you're interested in attending, you can check out this link:</div>
<div>
<a href="http://forum.world.st/VanIsle-CampSmalltalk-3rd-5th-October-2014-td4776075.html">VanIsle CampSmalltalk</a></div>
David Buckhttp://www.blogger.com/profile/14309364915707457568noreply@blogger.com0tag:blogger.com,1999:blog-5748784285539605706.post-10494702799144663912014-03-01T19:36:00.001-05:002014-03-03T21:22:32.224-05:00SimTalk - Smalltalk for Mobile DevicesOk, the secret is out. I'm busy developing a Smalltalk for Android and (later) iOS devices. It's a new implementation of Smalltalk from the ground up. Here's what I have and what I'm planning.<br />
<br />
I'm currently developing a pure interpreter. Later I may consider either dynamic compilation or compilation direct to native instructions. For now, however, the easiest way to start is with a pure bytecode interpreter. I'm using the same bytecode set as VisualWorks. This is mostly for convenience. It means that I can use the VisualWorks compiler to create the bytecodes for the new Smalltalk.<br />
<br />
I don't yet have garbage collection but I have everything setup to allow me to implement garbage collection. I'll have generation scavenging for new and survivor spaces and mark and sweep for old space.<br />
<br />
I'm developing the system using three different languages. Java is used as a shell (for now) to start the system. I'll also be using it to perform various primitive operations. The core of the interpreter itself is written in C under the Android NDK. It can call back to Java using JNI when needed. It's the C code that loads the image from an asset and runs the Smalltalk bytecodes.<br />
<br />
So far, I can do simple arithmetic, pushing and popping of the stack, message sends and super calls. Any looping or branching that compiles to bytecodes also works. I was able to write a non-recursive factorial method that worked well.<br />
<br />
The image for the new Smalltalk is generated by VisualWorks and sent to the Android as an asset in the APK file. When Smalltalk launches, it loads the image then sets up a socket listener and waits for a connection. At that point, a bytecode debugger I wrote in VisualWorks connects to the image. This debugger can provide information about the memory spaces, dump the stack, inspect objects (in a fashion), and single step through the bytecodes.<br />
<br />
Here's what the debugger looks like so far:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnhzKjgPbd81QSBBS-IUHim44vv3HtKOaYgzjBuXlggPhXj8qPmZNtrNCCVLlT6oiRPZqhqbFvwueO915lWXYK-Xc9afdfAGyJOR8f2yIKJ8M4gIKiIeMD81RA-BpM8cx9IXlXXU64s82J/s1600/SimTalk-Debugger.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnhzKjgPbd81QSBBS-IUHim44vv3HtKOaYgzjBuXlggPhXj8qPmZNtrNCCVLlT6oiRPZqhqbFvwueO915lWXYK-Xc9afdfAGyJOR8f2yIKJ8M4gIKiIeMD81RA-BpM8cx9IXlXXU64s82J/s1600/SimTalk-Debugger.png" height="221" width="320" /></a></div>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: left;">
This is a stack trace in the process of evaluating 3 + 4. It's pushed the 3 and 4 onto the stack and is about to run the + method. Remember, this is a temporary debugger for me to use at a very low level to make sure all the infrastructure is working. Ultimately, I intend to tap into the VisualWorks debugger and direct its operations to run on the Android device.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Even though I have 95% of the VisualWorks bytecodes implemented, I'm still far away from getting the system as functional as I would like. I need to properly implement blocks, add a lot of primitives, and develop a base class library for the new Smalltalk. It's a lot of work but very exciting.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
My current intention is to use this new Smalltalk to develop my own apps for commercial sale. If, however, other people are interested in developing mobile apps in Smalltalk I can look into ways of licensing the application for others to use. If this work interests you, drop me a line or leave me a comment. I'd love to hear your thoughts. You can also listen to the <a href="http://www.jarober.com/blog/blogView?showComments=true&printTitle=IM_164:_Mobile_Smalltalk_(AAC)&entry=3571243901">Independent Misinterpretations</a><span id="goog_1195427300"></span><span id="goog_1195427301"></span><a href="https://www.blogger.com/"></a> podcast episode 164 where I discuss the project with James.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
David Buckhttp://www.blogger.com/profile/14309364915707457568noreply@blogger.com4tag:blogger.com,1999:blog-5748784285539605706.post-83423087818941379342013-06-24T19:58:00.000-04:002013-06-24T19:58:20.745-04:00Summer Smalltalk TrainingSimberon will be offering three Webcast Smalltalk courses over the summer.<br />
<br />
<a href="http://www.simberon.com/introvwwebcast.htm">Introduction to VisualWorks Smalltalk July 22-26, 2013</a><br />
<br />
<a href="http://www.simberon.com/introvaweb.htm">Introduction to VASmalltalk Aug 19-23, 2013</a><br />
<br />
<a href="http://www.simberon.com/improvingdesignwebst.htm">Improving Object Oriented Design Aug 13-16, 2013</a><br />
<br />
You don't need to travel to attend these courses. They are all instructor-led over the Internet. All you need is a web browser.<br />
<br />
If you're interested in taking any of these courses, follow the links above for information and to register for the courses or email <a href="mailto:info@simberon.com">info@simberon.com</a>.<br />
<br />David Buckhttp://www.blogger.com/profile/14309364915707457568noreply@blogger.com0tag:blogger.com,1999:blog-5748784285539605706.post-28863273777718567272013-04-20T07:05:00.001-04:002013-04-20T07:16:46.379-04:00The Math of Music (part 3)In the previous post, I derived the frequencies for the notes in all of the scales from Gb up to F#. In many cases, the pitches were close enough to call the same note but not quite correct. So which pitch do we choose? We come up with a compromise called the "Equal Tempered Scale".<br />
<br />
We know that between C and high C we need to jump from a pitch of 1 to a pitch of 2. From counting the notes in between C and high C we can see that we have 12 distinct notes. Let's come up with a multiplier x that we can use to calculate the frequency of each of those notes. Here's what we know:<br />
<br />
C = 1<br />
C# = 1 * x<br />
D = 1 * x * x<br />
D# = 1 * x * x * x<br />
...<br />
C = 1 * x * x * x * x * x * x * x * x * x * x * x * x<br />
<br />
But we know that high C = 2 so:<br />
x^12 = 2<br />
x is the 12th root of 2.<br />
<br />
How can you calculate 12th roots? Lets try to calculate the 4th root of 100,000,000. Notice that there are 8 zeros. We call 8 the log of 100,000,000 because 10 ^ 8 is 100,000,000. If we divide 8 by 4, we get 2. 10^2 = 100 so 100 is the 4th root of 100,000,000.<br />
<br />
We can do the same thing to calculate the 12th root of 2 by taking the log of 2 (0.30103) dividing it by 12 (0.025086) then raising 10 to that power (1.059463). You can do the same thing with ln and exp if you're familiar with those.<br />
<br />
So, by taking the frequency for C as 1, you can keep multiplying by 1.059463 to get each successive note until you get to high C.<br />
<table border="1">
<tbody>
<tr><td>C</td><td>1</td></tr>
<tr><td>C#/Db</td><td>1.059463094</td></tr>
<tr><td>D</td><td>1.122462048</td></tr>
<tr><td>D#/Eb</td><td>1.189207115</td></tr>
<tr><td>E</td><td>1.25992105</td></tr>
<tr><td>F</td><td>1.334839854</td></tr>
<tr><td>F#/Gb</td><td>1.414213562</td></tr>
<tr><td>G</td><td>1.498307077</td></tr>
<tr><td>G#/Ab</td><td>1.587401052</td></tr>
<tr><td>A</td><td>1.681792831</td></tr>
<tr><td>A#/Bb</td><td>1.781797436</td></tr>
<tr><td>B</td><td>1.887748625</td></tr>
<tr><td>C</td><td>2</td></tr>
</tbody>
</table>
<br />
<div>
Each of these pitches is close to the right note but not quite. In the case of the black notes that could be used as sharps or flats, the pitch we calculated this way is between the sharp pitch and the flat pitch so it makes a good compromise.</div>
<div>
<br /></div>
<div>
All that remains is to set the actual frequencies. By international convention, the note A is exactly 440Hz. Given that frequency and the multiplier of 1.059463, you can calculate the pitches of every note on the piano keyboard.</div>
<div>
<br /></div>
David Buckhttp://www.blogger.com/profile/14309364915707457568noreply@blogger.com1