5¢ Concurrency

January 2nd 15:00
by why

16 comments

_why

said on January 2nd 15:33
require 'rubygems'
require 'aqueduct'
require 'open-uri'
if __FILE__ == $0
  [aqueduct { URI("http://www.qwantz.com/archive/000001.html").read },
   aqueduct { URI("http://www.qwantz.com/archive/000002.html").read },
   aqueduct { URI("http://www.qwantz.com/archive/000003.html").read },
   aqueduct { URI("http://www.qwantz.com/archive/000004.html").read },
   aqueduct { URI("http://www.qwantz.com/archive/000005.html").read },
   aqueduct { URI("http://www.qwantz.com/archive/000006.html").read },
   aqueduct { URI("http://www.qwantz.com/archive/000007.html").read },
   aqueduct { URI("http://www.qwantz.com/archive/000008.html").read },
   aqueduct { URI("http://www.qwantz.com/archive/000009.html").read },
   aqueduct { URI("http://www.qwantz.com/archive/000010.html").read }].
  each do |c|
    puts c.join[%r!<span class="rss-title">(.+?)</span>!, 1]
  end
end

Peter Cooper

said on January 2nd 17:46

Bravo! Nice to see a return to RedHanded-esque teasers ;-)

timf

said on January 2nd 17:49

Awesome! I had to add inn.close after the inn.puts to get it to work though (on a Macbook).

caleb

said on January 2nd 17:51

thanks, that was fun to grok

Dr Nic

said on January 2nd 17:51
$ sudo gem install aqueduct --source=http://code.whytheluckystiff.net
Password:
Updating metadata for 155 gems from http://code.whytheluckystiff.net

I’m so lame…

Dr Nic

said on January 2nd 18:01
ERROR:  could not find aqueduct locally or in a repository

Now I really suck.

Dr Nic

said on January 2nd 18:02

oh, require ‘rubygems’ is for the gems listed in 1st line. Pooey. Back to typing it all out…

Peter

said on January 3rd 02:59

Don’t scare the kids!

chris2

said on January 3rd 04:21

You are nuts. In a good way.

Nonni

said on January 3rd 05:02

Won’t somebody please think of the children?!

Magnus Holm

said on January 3rd 08:46

Is this childish enough for you?

raggi

said on January 3rd 14:44

Someone else has been watching Tim Brays blog too then?

I’m glad I may not be alone :D

And yes, good fun to have the old post style back, even if the parents like spoiling the fun! ;)

seydar

said on January 3rd 18:22

I really like this hack for concurrency! It struck me as cheating at first, but I think it’s more suited for all things.

Awesome job. Looks like I didn’t completely miss out of RedHanded

timf

said on January 4th 04:25

The style is catching on. Hooray!

Nonni

said on January 6th 04:37

Magnus, the children use win32, so if we change open3 to win32/open3, they’ll be happy.

Remember hackers! The children use win32 because they’re oppressed!

J`ey

said on January 13rd 06:28

Hey _why!
Remember me? :P
Glad to see some of the redhanded style still here!

Comments are closed for this entry.