[Noisebridge-discuss] Another try at a Ruby group...

Jonathan Lassoff jof at thejof.com
Sun Jul 26 07:10:21 UTC 2009


Excerpts from Jason Dusek's message of Sat Jul 25 23:39:31 -0700 2009:
>   How do folks feel about Ruby study session and work group on
>   Fridays, from 13:00 to 15:00? Naturally this timing is most
>   convenient for the unemployed; classes for the unemployed
>   strike me as a good idea, though.
> 
>   I expect this class to be multi-level. New students would
>   start on implementing UNIX utilities:
> 
>  .  First `cat` and then `wc`.
> 
>  .  Then `grep`.
> 
>  .  Finally, `nc`.
> 
>   Folks with more focused interests would naturally work on the
>   projects that interest them; new students who pass through the
>   UNIX utilities course could move into a course on writing web
>   services.
> 
>   Please let me know if you are interested in attending this
>   group at this time. We can have another group at another time,
>   too.

Sounds great to me. Of course the timing is a little off for me, though
I suspect I might be able to make a meeting here and there.

I like the idea of making examples by implementing simple utilities.
Here's one simple solution (no features) for /bin/cat I made just now.

First, for normal reading:

	ARGV.each do |arg|
	        if arg == "-" then
	                $stdout.write($stdin.read)
	        else
	                $stdout.write open(arg).read
	        end
	end

And then, purely for the LOLs and hax:

	$*.each{|a|(a=='-'?$>.write($<.read):$>.write(open(a).read))}

Cheers,
jof



More information about the Noisebridge-discuss mailing list