[Seaside] Re: What do you think about Ruby on Rails ?
stephane.ducasse at free.fr
Sun Aug 14 15:54:17 CEST 2005
> Well, terseman is nowhere in sight, and somebody has to start
> somewhere, so...in a Squeak startup script, to be run headless as
> in "squeak -headless squeak.image file:///foo/bar/
> you could do this:
> | dirStack stdout |
> stdout _ FileStream fileNamed: '/dev/tty'.
> dirStack _ OrderedCollection with: FileDirectory default.
> [dirStack isEmpty] whileFalse:
> [ | dir |
> dir _ dirStack first.
> dirStack addAll: (dir entries
> select: [:d | d isDirectory]
> thenCollect: [:dd | FileDirectory on: dir pathName,
> dir slash, dd name]).
> (dir entries reject: [:d | d isDirectory])
> do: [:f | stdout nextPutAll: dir pathName, dir
> slash, f name , ': ', f fileSize asString, String lf].
> dirStack removeFirst].
> Smalltalk snapshot: false andQuit: true
> I'm assuming that "Output" refers to stdout in the hypothetical
> and of course in Seaside you would be doing something else,
> perhaps a
> table of file names and file sizes I suppose. But as long as we
> this far off topic, what's the difference?
I like that :)
I often try to do unix script and wish I could debug them.
I would like to see it much more compact. I think that having a good
abstraction about file/folder/ftp.... would be nice.
Then with a tiny kernel that can be rebuilt .... and the possibility
to embed squeak in C... ;)
More information about the Seaside