> couldn't you write a wrapper for an existing GUI toolkit that just had a simplified API?
This is exactly what Shoes 4 is. We're taking advantage of JRuby to handle this for us. Packaging was a huuuuuuuge question here.
> Just implement Hackety Hack as an offline web app, where the typed Ruby code is just piped to the interpreter running on the box, and the results are returned as HTML displayed in the browser?
I think the biggest thing that you're not appreciating here is how many dependencies there are and how they combine: this would not include Ruby. Or any of the libraries that work with it. Then we'd have to re-write all of the GUI code to be in-browser instead of the existing render to screen stuff.
> It seems like a lot of work is reinventing basic things
First rule of legacy code: You can't replace it all at once. This stuff takes time.
Telling one person "Can't you _just_ re-implement Mac/Windows/Linux GUI stuff (optionally re-writing it all in browser, of course) with embedded Ruby, write the app on top of it, make a website, write curriculum, promote it, and everything else?" is a bit... much, eh?
(oh, funny bit of history: Shoes was actually embedded Gecko long before it was a native GUI toolkit. but that's a story for another time...)
To give you an idea of size:
steve at thoth in ~/src/shoes on develop
$ cloc .
367 text files.
358 unique files.
613 files ignored.
http://cloc.sourceforge.net v 1.56 T=2.0 s (150.5 files/s, 38339.5 lines/s)
--------------------------------------------------------------------------------
Language files blank comment code
--------------------------------------------------------------------------------
C 80 5749 2184 41915
Ruby 127 1471 1588 10045
C/C++ Header 66 890 825 4165
make 12 375 36 2046
Objective C 3 151 15 1845
Bourne Shell 4 168 68 877
Perl 1 213 503 731
YAML 3 156 0 249
CSS 1 2 2 167
Javascript 2 26 38 150
Bourne Again Shell 2 3 3 23
--------------------------------------------------------------------------------
SUM: 301 9204 5262 62213
--------------------------------------------------------------------------------
steve at thoth in ~/src/hacketyhack on master
$ cloc .
75 text files.
75 unique files.
45 files ignored.
http://cloc.sourceforge.net v 1.56 T=1.0 s (64.0 files/s, 6483.0 lines/s)
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
Ruby 62 735 471 5260
YAML 2 1 0 16
-------------------------------------------------------------------------------
SUM: 64 736 471 5276
-------------------------------------------------------------------------------
steve at thoth in ~/src/hackety-hack.com on master
$ cloc .
205 text files.
198 unique files.
598 files ignored.
http://cloc.sourceforge.net v 1.56 T=1.0 s (94.0 files/s, 2411.0 lines/s)
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
Ruby 81 383 430 1219
HTML 3 7 1 114
YAML 6 8 25 90
CSS 1 7 40 47
Javascript 2 0 9 28
CoffeeScript 1 0 3 0
-------------------------------------------------------------------------------
SUM: 94 405 508 1498
-------------------------------------------------------------------------------
steve at thoth in ~/src/hackety_hack-lessons on master
$ cloc .
14 text files.
14 unique files.
43 files ignored.
http://cloc.sourceforge.net v 1.56 T=0.5 s (8.0 files/s, 292.0 lines/s)
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
Ruby 4 24 10 112
-------------------------------------------------------------------------------
SUM: 4 24 10 112
-------------------------------------------------------------------------------