hoodwink.d enhanced
RSS
2.0
XHTML
1.0

RedHanded

The Ruby Mix Tape, Day One #

by why in cult

Enough coding already. Let’s put it to work. Get out flgr’s six-line p2p and point it at druby://redhanded.hobix.com:4114. The password is mixtape. Download all mp3s. Each day this week, we’re blogging two songs with any slight relevance. (Whilst steering clear of certain UB40 and Chris De Burgh.)

Today I bring you two songs which share a birthplace with Ruby.

Kazumi Nikaidoh “Pulsation”

If there’s one Japanese artist I can recommend, here she is. I heard her voice and wandered into a building and there she was, teetering around the stage, strumming her guitar, tilting her head, singing off into the ceiling, high notes like a powdered mouse, low notes like a vampire’s cloud. The closest my spinal cord’s ever gotten to being plugged straight into a wall socket.

Her songs are Ruby. The loose structure, the voices up and down. Her album has two really cool videos. One’s her wandering around a zoo and the other is a science project. Both on her album You Dropped Something Again, Didn’t You?, which looks to be still available. 2,100 yen only.

Cornelius “New Music Machine”

This song is the moment Ruby clicks and your mind opens to all the little proggies you’re going to write in the next ten, twenty, fifty years. Your brain says, “Oh, wow, I’m on the edge! I’m blurting thoughts in a futuristic language!” And you’re reading source code for drb or Ruby/X11 and all the ghosts from Pac-Man are gathered on your nose cheering, having pixel pizza. Go, little, nuby! Go!

From his album Fantasma, available basically anywhere.

Hey, if anyone out there gets a hankering to run a server, post it here in the comments, willya? And that’s how friendship pours through the streets and villages of Rubyland.

said on 21 Feb 2005 at 13:04

Hmm, broken somehow:

Exception `DRb::DRbServerNotFound' at /usr/local/lib/ruby/1.8/drb/drb.rb:1572 - DRb::DRbServerNotFound
said on 21 Feb 2005 at 13:05
“Whilst steering clear of certain UB40 and Chris De Burgh”

Whew – At least Little Red Corvette is still on the table. ;)

said on 21 Feb 2005 at 13:07

Thanks for posting this. It finally gave me the opportunity I needed for advertising this:

Regarding Ruby and music: There’s also a Ruby user group on last.fm (a radio stream that adapts itself to your taste) at http://www.last.fm/group/ruby

Regarding p2p.rb and trouble: Make sure to try this latest version in case you’re experiencing any trouble. Though currently the service does indeed seem to be down so it will likely not help much just yet.

#!/usr/bin/ruby
# Server: ruby p2p.rb password server public-uri private-uri merge-servers
# Sample: ruby p2p.rb foobar server druby://123.123.123.123:1337
#         druby://:1337 druby://foo.bar:1337
# Client: ruby p2p.rb password client server-uri download-pattern [list-only]
# Sample: ruby p2p.rb foobar client druby://localhost:1337 *.rb
################################################################################
# You are not allowed to use this application for anything illegal unless you
# live inside a sane place. Insane places currently include California (see
# link) and might soon include the complete USA. People using this software are
# responsible for themselves. I can't prevent them from doing illegal stuff for
# obvious reasons. So have fun and do whatever you can get away with for now.
# 
# http://info.sen.ca.gov/pub/bill/sen/sb_0051-0100/sb_96_bill_20050114_introduced.html
################################################################################
require'drb';F=File;def c(u)DRbObject.new((),u)end;def x(u)[P,u].hash;end;def s(
p)F.basename p[/[^|]+/]end;P,M,U,V,*O=$*;M["s"]?(DRb.start_service V,Class.new{
def p(z=O)O.push(*z).uniq;end;new.methods.map{|m|m[/_[_t]/]||private(m)};def y;(
p(U)+p).map{|u|u!=U&&c(u).f(x(u),p(U))};self;end;def f(c,a=O,t=2)x(U)==c&&t<1?
Dir[s(a)]:t<2?[*open(s(a),"rb")]:p(a)end}.new.y;sleep):c(U).f(x(U)).map{|n|c(n).
f(x(n),V,0).map{|f|s f}.map{|f|O[0]?p(f):open(f,"wb")<<c(n).f(x(n),f,1)}}

said on 21 Feb 2005 at 13:31

Service down? What are you guys getting when you do this:

 ruby p2p.rb mixtape client \
   druby://redhanded.hobix.com:4114 *.mp3 1
said on 21 Feb 2005 at 13:47

Worked great for me. Thanks, _why! :)

said on 21 Feb 2005 at 14:25

Oh now it works. I prefer the second song :-)

said on 21 Feb 2005 at 15:21
Mine just hangs with no output. Here’s my trace when I ^C out:
[danny@linux ~]$ p2p.rb mixtape client druby://redhanded.hobix.com:4114 *.mp3 1

/usr/local/lib/ruby/1.8/drb/drb.rb:796:in `initialize': Interrupt
        from /usr/local/lib/ruby/1.8/drb/drb.rb:796:in `open'
        from /usr/local/lib/ruby/1.8/drb/drb.rb:796:in `open'
        from /usr/local/lib/ruby/1.8/drb/drb.rb:701:in `open'
        from /usr/local/lib/ruby/1.8/drb/drb.rb:699:in `each'
        from /usr/local/lib/ruby/1.8/drb/drb.rb:699:in `open'
        from /usr/local/lib/ruby/1.8/drb/drb.rb:1098:in `initialize'
        from /usr/local/lib/ruby/1.8/drb/drb.rb:1078:in `new'
        from /usr/local/lib/ruby/1.8/drb/drb.rb:1078:in `open'
        from /usr/local/lib/ruby/1.8/drb/drb.rb:1014:in `method_missing'
        from /usr/local/bin/p2p.rb:18
said on 21 Feb 2005 at 15:29

Give it another try. The process was hanging for a bit there.

said on 21 Feb 2005 at 15:30

Looks like you have to wait in line for previous connections to finish. Hang out, it’ll finish.

said on 21 Feb 2005 at 16:43
Oooh, here’s a weird one!

Benjamin-Stiglitzs-iBook-G4:~ bstiglit$ ruby p2p.rb mixtape client druby://redhanded.hobix.com:4114 *.mp3 1
/usr/lib/ruby/1.8/drb/drb.rb:570:in `load': too large packet 50331648 (DRb::DRbConnError)
        from /usr/lib/ruby/1.8/drb/drb.rb:620:in `recv_reply'
        from /usr/lib/ruby/1.8/drb/drb.rb:909:in `recv_reply'
        from /usr/lib/ruby/1.8/drb/drb.rb:1148:in `send_message'
        from /usr/lib/ruby/1.8/drb/drb.rb:1059:in `method_missing'
        from /usr/lib/ruby/1.8/drb/drb.rb:1058:in `open'
        from /usr/lib/ruby/1.8/drb/drb.rb:1058:in `method_missing'
        from p2p.rb:12
I sense a weird ruby distribution.
said on 21 Feb 2005 at 17:00

Thanks _why, works great now!

said on 21 Feb 2005 at 21:29
(druby://redhanded.hobix.com:4114) p2p-new.rb:20:in `initialize': No such file or directory - *.mp3 (Errno::ENOENT)
said on 22 Feb 2005 at 03:07

C:\AR>rubyp2p mixtape client druby://redhanded.hobix.com:4114 *.mp3 1 c:/ruby/lib/ruby/1.8/drb/drb.rb:724:in `open’: druby://redhanded.hobix.com:4114 - # (DRb::DRbConnError) from c:/ruby/lib/ruby/1.8/drb/drb.rb:717:in `each’ from c:/ruby/lib/ruby/1.8/drb/drb.rb:717:in `open’ from c:/ruby/lib/ruby/1.8/drb/drb.rb:1142:in `initialize’ from c:/ruby/lib/ruby/1.8/drb/drb.rb:1122:in `new’ from c:/ruby/lib/ruby/1.8/drb/drb.rb:1122:in `open’ from c:/ruby/lib/ruby/1.8/drb/drb.rb:1058:in `method_missing’ from C:/AR/rubyp2p.rb:12

said on 22 Feb 2005 at 08:49

$ ruby p2p.rb mixtape client druby://redhanded.hobix.com:4114 *.mp3 1 /usr/lib/ruby/1.8/drb/drb.rb:724:in `open’: druby://redhanded.hobix.com:4114 – # (DRb::DRbConnError) from /usr/lib/ruby/1.8/drb/drb.rb:717:in `each’ from /usr/lib/ruby/1.8/drb/drb.rb:717:in `open’ from /usr/lib/ruby/1.8/drb/drb.rb:1142:in `initialize’ from /usr/lib/ruby/1.8/drb/drb.rb:1122:in `new’ from /usr/lib/ruby/1.8/drb/drb.rb:1122:in `open’ from /usr/lib/ruby/1.8/drb/drb.rb:1058:in `method_missing’ from p2p.rb:20

said on 22 Feb 2005 at 09:46

Surely enough, this little six lines is hard to keep up all the time. It crashes like once every two hours with: Illegal instruction. It gets queezy on stray Marshals. Akk-k-k, too bad.

Now, let’s all put our stack traces away and see if we can get something closer to MoleSter.

said on 22 Feb 2005 at 10:17

Thank you why!

I’ve been a fan of Cornelius quite long ago..

said on 22 Feb 2005 at 14:20

Illegal instruction? That sounds like a Ruby bug to me. Can you provide any details?

said on 23 Feb 2005 at 15:37

I can read directory just fine, d/l’ing seems to be slower than I’d expected. Still, sounds neat.

said on 24 Feb 2005 at 07:20

rubytalk.com URL for the p2p thang doesn’t seem to point where it should.

said on 24 Feb 2005 at 10:01

rubytalk.com is gone. what a crappy ruby birthday thing to do! well, fixed at least.

Comments are closed for this entry.