115 karma · joined June 4, 2009
https://twitter.com/soveran
https://github.com/soveran
$ cat riddle
Vixen Rudolph
Vixen Prancer
Vixen Dasher
Dancer Vixen
Comet Vixen
...
Vixen Dasher
Then use tsort: $ tsort riddle
Dancer
Donder
Comet
Vixen
Blitzen
Dasher
Rudolph
Cupid
PrancerSample game 1 https://lichess.org/VMe0gfa2
Sample game 2 https://lichess.org/Zqwn4Gzk
Sample game 3 https://lichess.org/G2fPHci8
Sample game 4 https://lichess.org/LLt8wyYp
Sample game 5 https://lichess.org/3r6CXx3H
Sample game 6 https://lichess.org/sbdyUYS4
Sample game 7 https://lichess.org/88vsAftE
Sample game 8 https://lichess.org/1uvCwaeB
Sample game 9 https://lichess.org/743quCXj
Sample game 10 https://lichess.org/SkCjxXkb
I invite you to read about it: http://doc.cat-v.org/plan_9/4th_edition/papers/rc.
I find the control structures simpler and more elegant, and overall its design feels more consistent. For example, consider an if statement in bash:
if [ condition ]; then
...
else
...
fi
And now in rc: if (condition) {
...
} else {
...
}
Or a case statement in bash: case $1 in
"bar")
... ;;
"baz")
... ;;
esac
And expressed in rc: switch ($1) {
case "bar"
...
case "baz"
...
}
In the past, I've used it as my shell too, but now I use it only for scripting. I think you can install it in most platforms.In fact, the code is extremely simple. As I mentioned in the README, I've used dc a lot and what I propose with clac is an improvement (for my taste) regarding the UI, as there's an always-visible representation of the stack that gets updated as you type. I recorded a short video to show it in action: http://files.soveran.com/misc/clac.mov
Also, from the article:
The other reason I don't foresee using Disque is alluded to in the author's own comments. He observes that many people are using Redis as a message broker, and decides that maybe there is a need for a "Redis of messaging". I would say the opposite is true, and that instead of another message server, people want to use Redis!
I disagree. I've been using Redis for queues for a very long time, and I'm in the process of migrating all those queues to Disque.
megalotto = MegaLotto.new
megalotto.draw(10)It can be argued that those apps were already broken. Nobody should complain against a security fix.
Cuba.define do
on "blog/:id" do |id|
blog = Blog.get(id)
on(get) { res.write blog }
on(put) { blog.update(req.params); res.write :ok }
end
end