..or 100 lines, or even 1000 -I'm not trying to reinvent computing
I'm not great at reading code, and even something as fiddler-friendly as
LK is a bit impenetrable for me -but I like learning by imitation so
I'm looking for ideas on where to start imitating.
If anyone felt like commenting on either of the two questions below, I
would be grateful -and it might be fun!
A. "Write a micro-lively that just does this..."
What would a ten line LK do? (yes, I really do mean a web page with 10
general) but no LK code)
A 100 line LK?
..a 1000 line LK?
If it had a persistence model, what would it persist?
What graphics would it target? SVG? HTML? Canvas?
NB: don't be asking "what are you trying to achieve in this system"
:-) -the answer is "the same as LK is trying to achieve!"
Go on -set me a challenge!
B. "If I was to rewrite LK from scratch I would start like this...."
I'm really probing for both "how LK works" (what sub-systems would you
put in place first?) and "what would you do differently?" (not
necessarily better, but different directions you might try)
Would you be tempted by any of: CoffeeScript, Dart, TypeScript, [?]
(warning: serious bike-shed peril !)
Would you take a TDD approach? ( no attitude here btw -I'm a 'rest
first' developer myself and i'm not talking about representational state
transfer ;-> ). Would you use any of Selenium et al (does LK use such
a thing now?)
Is Git the perfect back end for LK? How important is the back end?
Would you support four browsers from scratch -or run with one and
back-fill (or would you perhaps just pick a single browser?)
For extra credit
Take a few years off and write a self hosting LK, but in a literate
programming style so we can look over your shoulder and really see how
your kernel comes together. Children, ask your parents first.
thanks for any comments at all on such silliness!
btw: (unrelated to the above) great to see Dan's JSConf video with the
audience cheering ..and yet so ironic ( ie: how long could Dan's
backward clock run before it got to the same level of functionality done
in Smalltalk? hmmm )
lively-kernel mailing list
I'm totally on your same wavelength, I found myself touching the same line of topics as well.
I was looking for a minimal version of Lively Kernel that I could tinker with a bit more easily in my spare time.
I didn't find that but I found something similar: the minimal gem that is Morphic.js by Jens Moenig, and thought to port it to CoffeeScript to get myself acquainted with it.
I prioritised the creation of more documentation - Coffescript encourages some sort of literary programming style via the nimble docco tool. In fact I went overboard and created 4 different documentation cuts to cater for all styles (two with focus on APIs, one with focus on commented code, one with focus on "descriptive overview").
So I created the Zombie Kernel project here: https://github.com/davidedc/Zombie-Kernel , which requires no server. Just download and pop in the browser. Code-wise it's a separate project from Morphic.js but as of know they are still in sync and Jens and I keep track and often sync each others' changes.
It's very compact - I don't have a line count, but it can be read an completely understood in a week-end. Also I'd say around a third of it can be "ejected" for a minimal build.
I don't have a "minimal build" process yet, but I have your same thoughts on that I want to have a way to create different builds of different sizes. So at any time, even if the project will ever grow bigger, I can always go back and build a 1000-line version that ejects most features.
I fantasise about SW packages that come in "onion-skin" form - i.e. they can reduce themselves to something I can understand in one afternoon, and then get the next build step understood in another day, and then the next one and the next one...
Which is not the same as saying that "it comes with extension modules" or more/less extending classes. It's different: I don't wan't to even see the extension mechanism and module loader or the clever/complex class extension mechanism or whatever it is. I want the bare simple thing. E.g. if it is an IDE, I'd like to see it reduce itself to notepad as a "build 0" version. If it's a desktop system, I want it to downsample itself to a command line or to a window system where all windows paint over each other or something like that.
I don't know whether that's achievable at all :-) but I'd love to give that a shot with Zombie Kernel.
Also testing will have to be a first-class citizen by necessity (but I can't do TDD - I see how it works well in enterprise but I just can't bring myself to be excited about it in a "hobby" context). I've seen Dan's talk at Google where he mentions that these highly-"composite" systems usually make bugs evident quickly. In my little experience (and from email conversations with Jen) that's not the case with Morphic.js and Zombie Kernel (yet? Is it a matter of scale?) - stuff can break really subtly, so an automated testing mechanism is needed to lighten-up the work...
On 12 Nov 2012, at 22:56, Peter Fraser wrote:
lively-kernel mailing list
|Free forum by Nabble||Edit this page|