4 ms·
Here's a piece of it that we did opensource. An Erlang pipe implementation. It acts as a FIFO for binaries. http://github.com/mojombo/erlang_pipe/tree/master/p
by mojombo 18y ago
Here's a piece of it that we did opensource. An Erlang pipe implementation. It acts as a FIFO for binaries.
http://github.com/mojombo/erlang_pipe/tree/master/pipe.erl http://github.com/mojombo/erlang_pipe/tree/master/pipe.erl
The performance ends up being quite good.
- jfarmer 18y agospaceship?
- mojombo 18y agoThe comparison operator that returns -1, 0, or 1 depending on how the operands compare is often represented as <=> and commonly referred to as the "spaceship operator" because it looks like a flying saucer viewed from the side. http://en.wikipedia.org/wiki/Spaceship_operator http://en.wikipedia.org/wiki/Spaceship_operator
- jfarmer 18y agoHuh. I never heard it called that before. My background is in math so I always though of it in terms of the sign function: http://en.wikipedia.org/wiki/Sign_function http://en.wikipedia.org/wiki/Sign_function spaceship(x,y) = sign(x-y), for numbers, anyhow.
- jrockway 18y agoFWIW, Larry Wall calls it the Spaceship Operator in "Programming Perl".