4 ms·
GitHub implementing Erlang git-daemon
- wmf 18y agoThe two benefits mentioned sound like they have nothing to do with Erlang.
- jrockway 18y agoBut it's much more fun to completely rewrite the application in a new language, rather than just submit a patch to the existing daemon! Don't you know that you can't perform "flexible filesystem mappings" in C? cough
- mojombo 18y agoIt's not about that at all. I'm more familiar with Erlang than C, and the git source is a twisty jungle of advanced C code. I could have patched git-daemon, but to have a project that I can easily understand, maintain, and improve, I chose to write my own in Erlang. My tests show the Erlang and C git servers to be very similar in performance, so that's not a concern. And I can guarantee that egitd has far fewer lines of code! I don't choose languages because they're cool or trendy. I choose them because they make it easier to Get Things Done. And for a startup, that's an unmistakable benefit.
- jrockway 18y agoBut now every time upstream makes a change, you have to reimplement it. And the users of the C daemon don't get your improvements. Obviously you can do things your way, and you'll probably make money doing so... but it's still antisocial.
- mojombo 18y agoChanges to the git protocol happen at a glacial pace. Keeping up with them will not be a problem. The only users of the C daemon that would benefit from egitd are our competitors. We've open sourced our Ruby git library since that has benefit to the community as a whole. I'd hardly call our decision to write an Erlang git server antisocial. As far as I can tell, it's not hurting anyone.
- jrockway 18y agoI didn't realize you weren't releasing egitd. If you're keeping it to yourself, it doesn't really matter what it does or what language it's written in.
- ionfish 18y agoSurely it matters insofar as people find it interesting to hear about, even if they might prefer to actually see the code.
- mojombo 18y agoHere'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.
- ambition 18y agoErlang is the new cool thing. There's a marketing benefit to writing programs in a cool new language, especially in github's early market: People who jumped on the git bandwagon because it was the new cool thing.
- mojombo 18y agoI'm the dev at GitHub that's working on egitd. It's true that those two features are not Erlang specific. They could be accomplished in any language. However, Erlang lets me write very robust servers with tiny amounts of code. The automatic SMP support is also a huge plus when dealing with concurrency.
- pjackson 18y agoAha. My guess was close.
- pjackson 18y agoI like the new features, but I also don't understand the Erlang connection. I think the sentiment is right that it's "cool and new" and should therefore be embraced by geeks. If it helps them distribute their application more in a more scalable way, or in a more stable way, I'd love to understand how. My "guess", knowing little about Erlang, is that the server code is simpler....