Context 4 alpha 1 is released. This one fixes loading errors in the welcome page, supports remote debugging and process browsing, and makes Naiad and remote messaging support available as Monticello packages. Thanks in advance for reporting bugs!
Archive for smalltalk
Context release 4 alpha 1
Posted in Appsterdam, consulting, Context, Naiad, Smalltalk, Spoon with tags context, minimalism, object-oriented programming, objects, smalltalk, spoon, virtual machine on 9 December 2014 by Craig Lattaa most useful virtual machine debugging aid: simulated objects
Posted in Appsterdam, consulting, Context, Smalltalk, Spoon with tags context, debugging, primitives, smalltalk, spoon, virtual machine, virtual machine simulator on 2 December 2014 by Craig LattaSqueak’s virtual machine simulator is extremely useful for debugging. You can use it to inspect and change objects “while time is stopped”, between the execution of individual virtual machine instructions. Traditionally, though, it takes an address-based view of objects. There are several useful utility methods which, given an object address, will print useful information to the Transcript. Wouldn’t it be nicer, though, if you could use normal inspectors to look through the fields of the objects in a simulated virtual machine’s object memory?
I created simulated objects for this purpose. They are instances of a SimulatedObject class; each one has an interpreter and an address. They can print useful information about themselves, like the interpreter can, but they can also modify themselves and interact with each other, changing the interpreter’s object memory appropriately. Are you wondering about the instructions of a compiled method? Would you like to make a few choice modifications to those instructions? A simulated object for that method’s address will help you.
Simulated objects play nicely with Squeak’s object inspectors, and, more importantly, with its object explorers. You feel like you’re inspecting normal objects, except that you can’t send normal messages to them. Or can you? I’m pondering this. It might be useful, for example, to terminate a process in a simulated interpreter’s object memory, without having to do it in another process. Time is stopped, but perhaps you could queue up messages to send when it starts again, through a collaboration between simulated objects and a coordinating object in the memory they describe.
I’ve been using simulated objects recently to chase references with the absolute assurance that I won’t be creating new ones. They’re very useful for debugging virtual machine primitives. Sometimes, when I’m debugging a headless system with a broken remote messaging system, it’s the only user interface I have for inspecting things. And it’s sure a lot nicer than inspecting things in a C debugger.
What will you do with them?
the Smalltalk Reflections podcast, episode one: a tribute to James Robertson
Posted in Appsterdam, consulting, Smalltalk, Spoon with tags podcast, smalltalk, smalltalk reflections on 2 December 2014 by Craig LattaWe did it! On James Robertson’s birthday, David Buck and I released episode one of “Smalltalk Reflections”, a podcast about Smalltalk. Our first episode is a tribute to James, who started the previous incarnation of the show. It’s hosted by David and myself, and features remembrances from several friends and co-workers, as well as a few choice words from the man himself. I edited it, and wrote the theme music. Enjoy!
debugging remote exceptions works
Posted in consulting, Context, Smalltalk, Spoon with tags context, debugging, livecoding, remote messaging, smalltalk, spoon, squeak on 20 November 2014 by Craig LattaI have debugging working for remote unhandled exceptions. My motivating use case was debugging messages not understood by the Context console’s embedded web server. The console is a headless app. In development, I run it with a remote-messaging connection to a headful system. Now, when there is an unhandled exception (like a message not understood), the exception requests that the headful system open a debugger (as its default action).
Before opening the debugger, the headful system replaces the sender of the first relevant context on the headless system with the last relevant context on the headful system, hiding all the remote-messaging-related contexts in between. The picture above shows an example of this. On the headful system, I sent “zork” to an object on the headless system. The debugger shows a continuous context stack which spans the two systems. This all works with little special handling in the debugger because of the complete transparency of remote messaging. It doesn’t matter that the contexts and methods that the debugger is manipulating happen to be remote.
the IDE app README
Posted in consulting, Context, Naiad, Smalltalk, Spoon with tags smalltalk, spoon on 27 October 2014 by Craig LattaContext 3 beta 5 released
Posted in Context, Uncategorized with tags 3 beta 5, context, modules, naiad, release, smalltalk, spoon, squeak on 4 March 2014 by Craig LattaHi, Context 3 beta 5 is released. I’ve still got a bunch of changes pending, for a 3b6 release to follow shortly. This release is just to fix some startup problems on Windows, Linux, and Mac OS. You can also find the Spoon VM changes separated out, in the second “Resources” folder.
What I’d like is for you to just start the app and tell me the results, along with your host platform. Thanks!
current design for Context’s virtual filesystem
Posted in consulting, Context, Naiad, Smalltalk, Spoon with tags context, favorite text editor, smalltalk, spoon, squeak, virtual filesystem on 13 January 2014 by Craig LattaI’m writing Context’s virtual filesystem support now. The directory structure looks like this:
-- root classes <each class> methods all <each method> literals <literal objects> source version inherited <inherited methods> local <locally-defined methods> slots all <each slot> <instances ordered by slot> references <referring objects> slots <etc> inherited <etc> local <etc> processes <each process' suspended context> method instructions literals <literal objects> sender <etc> README.html --
What do you think?
the initial Context webpage
Posted in consulting, Context, Naiad, Smalltalk, Spoon with tags context, modules, naiad, smalltalk, spoon, squeak, web browser, welcome on 10 January 2014 by Craig LattaA Spoonful of Raspberry Pi
Posted in consulting, Naiad, Smalltalk, Spoon with tags Flow, Morphic, MVC, naiad, Raspberry Pi, remote messaging, smalltalk, spoon, squeak, virtual machine on 3 January 2014 by Craig LattaSpoon is up on the Raspberry Pi and exchanging remote messages with Spoon on my laptop. Morphic works, but it’s pretty slow, so I’ll be sticking with MVC for now (the Raspberry Pi is a 700MHz machine… I’m looking forward to Tim’s profiling work!). I’m writing a talk for FOSDEM in February called “A Spoonful of Raspberry Pi”. What should the Pi do? I’m eager to hear your suggestions!
Another VM debugging trick: halting
Posted in consulting, Smalltalk, Spoon with tags debugging, smalltalk, spoon, squeak, virtual machine on 31 December 2013 by Craig LattaJust another little VM debugging trick I use… In one of my VM plugins I include a little C function called “breakHere”, which Smalltalk can call as a primitive. I put a breakpoint on it in the C debugger, and then have a convenient way to break in the C debugger from Smalltalk.