tra / spawnling

spawn gem for Rails to easily fork or thread long-running code blocks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Spawn needs a new name

tra opened this issue · comments

Spawn is such a good name that Ruby 1.9 decided to steal it (damn you Matz!). I'm not inclined to monkey-patch ruby so it's probably time to come up with a new name. Here's some ideas:

spelling variations

spon - nice & short
spown - spawn has been p0wn3d
spawnd - spawn daemon, just add a 'd'
spawned - past tense
spark - spawn/fork
spork - spawn/fork - unfortunately already a gem with this name

synonyms

beget - parent process begets child process
branch - branching metaphor, too generic?
hatch - children start out as eggs
sow - like a seed
cleave - with a knife
dispatch - send it away
launch - off you go!

miscellaneous

khan - after Genghis Khan who was a prolific spawner of children
drone - a worker bee process

Feel free to give your 2 cents and pick your top 3 favorites.

+1 spown

+1 spork

Genghis Khan had lots of offspring so how about "khan"? Do you have a "khan do" attitude?

"Spark" is good, but also in use (though it appears to be a dead project)

It doesn't have quite the same meaning, but how about "respawn"?

Or to keep with the original theme, "roe" and "offspring" are both available.

I've been giving it more thought and am considering keeping the name and, instead, changing the syntax to something like this:

Spawn.new do
  stuff
end

Or maybe,

Spawn.run do
  stuff
end

This sort of change would also make it easier to pull out of ActiveRecord so that you can run it anywhere.

That would be much better!

Spark +1

I took this as an option to learn about forking, setting up a github repo, and making it a gem. So I did "Spawner".

But I also vote for the Spawn.new or Spawn.run, particularly as that's cleaner to understand what is happening. In my case, though, I'd make it: Spawner.new or Spawner.run

I like "Spawner" because it's the thing that spawns... i.e. a Driver drives... a Coder codes.

I like Spawn.new or Spawn.run

commented

+1 for Spawn.run

Is the gem completely broken under Ruby 1.9? I tried to make the necessary name changes but couldn't seem to get it working ...

whatever name it is, can it be implemented soon please? :-)
right now because of the name hijack, I get "wrong number of arguments" ...

commented

I tried to fork the 'edge' branch and change the name but I can't seem to get it to work. Has anyone else had any luck?

I'm going with Spawn.run

Good call, tra. +1 for Spawn.run

I look forward to seeing it work. :-)

Is there an ETA on the change to Spawn.run? The gem seems to be completely broken under 1.9.2.

ETA = whenever I stop being so damned lazy!

tra, I posted a pull request for this, hopefully that'll make it easier on you. :-)

Spawn.new is what I settled on. I chose that because it returns an object which you can use to monitor the spawned process. Unfortunately, the name "spawn" is already used in another gem which doesn't actually spawn anything. So the gem is called "spawn-block" for now. If that's too confusing I may go with a name change after all but we'll see how this goes.