[General] Lively Kernel programming

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

[General] Lively Kernel programming

Dan Ingalls-5
Haowei wrote this question to me off list, but I figure the answer may  
be of interest to a number of folks out there...

> may i ask what sort of IDE or editor do you use for Lively Kernel  
> development?

I use the System Browser of the Lively Kernel itself exclusively now.  
You can open this from the world menu Tools item to check it out.  It  
is mostly the work of Robert Krahn.

The System Browser starts by showing you a list of all the files in  
the source repository.  If you click on one, it will parse it (using  
the Lively Kernel's own JavaScript parser built using OMeta), and then  
display it in a Smalltalk-style class/method presentation.  When you  
make changes, the files are appropriately updated [Note that you will  
not be able to make changes to the files until you run it from a copy  
of our repository].  You can also turn eval on, and it will cause  
changes that you make to take immediate effect in the system you are  

When I work on something that is not@the core of the system (like  
the kaleidoscope), then I turn eval on, and there is no delay from  
accepting changes to the time they take effect.

Over the past week I rewrote a lot of the text code which would have  
been bad with eval on.  This is because if you make a mistake, you not  
only crash your system, but the changes are on file so you have to un-
make them before you can get back to work.  In this case, I run two  
browser windows, one with the LK System Browser in it (the IDE), and  
the other with a test system running.  I make some changes in the IDE  
window (or tab), and then reload the test window.  If it has bugs I go  
back and fix them in the first window.  This is classical cross-
debugging, but the time between cycles is only a few seconds, because  
I specify

        Config.skipMostExamples = true; // suppress examples that are slow (*)

in my localconfig file, so that a reload only takes 3 or 4 seconds.  
Each time I get to a point where the test system seems solid, then I  
reload the IDE window so that I am living with the changes for a bit  
of extra testing.  When things seem really solid, then I commit the  
changes to the SVN repository, a one-line command that only takes a  
few seconds.

Check out Robert's System Browser documentation at


        - Dan

(*) PS:  There is a way to specify such changes with a URL flag, but I  
always forget it.  Robert or Krzysztof, if this is in the Wiki can you  
say where and, if it is not, could you put a brief description along  
with a list of some of the more useful ones (many can be learned from  
a reading of defaultconfig.js

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://livelykernel.sunlabs.com/pipermail/general/attachments/20090426/dfabb56d/attachment.html