I love to see people reimplementing existing tools on their own, because I find that to be a great way to learn more about those tools. I started on a Git implementation in Rust as well, though I haven't worked on it in a while: https://github.com/avik-das/gitters
Strongly recommend using some standard FOSS license before plenty of people add commits and it gets a big mess clearing up the licensing situation later.
Also, not having a license file isn't a messy situation, that means “this project is protected under Berne Convention copyright“: the author is the only one holding every rights on the code and every use that is not explicitly allowed is a copyright infringement (unless it's fair use).
Actually any high performance GC'd languages would be fine too because latency is a non-issue for long running git operations (you won't notice if your git clone pauses for 100ms, whereas you will notice if your UI does). Throughput of malloc() and GCd languages tends to be similar when latency isn't a concern.
To be honest, I wish there was a movement for something like "literate changelog", where the CL was propely linked with something like a blog post, and specific repo versions. I guess Pull Requests sort of take that role.. But sometimes PR diffs aren't the same as annotated code in a blog post.
Can somebody tell me what is behind the recent rewrite-all-the-things-in-rust craze? I get it can have some benefits in terms of security, but it seems rewriting so many things in it just for the sake of it is a bit excessive.
I understand some of these are very likely for educational purposes (like this one and others; it's good for getting more familiar with the language), but it still seems to be a bit of a strange trend (especially since people who don't need to learn are doing it, seemingly just because "yay rust").
I support RIIR 100%. It’s much easier for me to contribute to Rust projects. It’s not just the language (but that is definitely a part). I don’t need to worry about shit like “how do I build this project” or "my code might run on platforms x and y but I'm not sure about platform z". With c/cpp, the build process can be potentially very complicated. Missing headers, missing binaries. With Rust, I just run “cargo build”.
Furthermore, the resulting code feels just so sturdy. I can also expose it as C and it can be used from the likes of Python.
Actually there's a lot of great reasons to rewrite everything in every language. Git is an especially good piece of software to implement everywhere because it's relatively stable and it's pretty useful.
As for actual reasons, one good example is so you can keep your dependencies in the language, using the language package manager. For Go nobody even questions that this is worth it; it enables painless cross compiling and completely static, libc-free binaries. For Rust that may not be a thing, but you do at least get the benefits that you could integrate Git functionality without having to hack around in porcelain.
This one here is a learning experience by it's own description, but I would suggest people stop complaining about "rewriting everything" in $LANGUAGE. The opposite complaint is often cited as a reason why to not use the language (that, for example, basic programs haven't already been ported.) If we did build an alternate world with feature parity, unit testing, optimizations, in a memory safe language, I doubt many people would be complaining about the strange trend of rewriting things anymore.
In addition to what has already been said, I think there's a lot of interest in reimplementing command line tools in Rust because there are a lot of useful support libraries for TUI development. Because of the lower barrier of entry (no fussing with build/linker issues to use convenience libraries) you're seeing an increase in people trying things just to try them.
For me, dealing with something written in Rust is less painful than dealing with something with bindings for Rust, and honestly I'd consider rewriting something for that reason. And that's the case for nearly any language.
For example, I rewrote `tar` in JavaScript because I wanted to use it in the browser, and I didn't want to fiddle with trying to compile the existing project to JS. It took me a weekend and it worked pretty well for the project I needed it for. That project has since died (completely redesigned), but the tar stuff still works.
These days I'm getting lazy, so for something like git, I'll often exec out to the CLI app instead of fiddling with bindings, especially if it's not a performance-critical part of my app. However, I'd definitely look for a rewrite first and clean bindings second to use as a lib, especially if the rewrite had a suitable license (anything not copyleft).
I would like to see some sources like this that are language agnostic that give you the tools needed to implement your own popular tool. For example, where could I look to find a written description of the way git works from the ground up? Kind of like a "guide to implementing X" type of thing, but without code.
Rust is pretty darn portable as it is though. It runs on the major platforms. Are you thinking its Assembly or something? Everywhere FireFox is compiled to Rust has to run on, which is a lot of platforms.
Maybe it wont run on your toaster but if you are making git commits through your toaster you got other issues.
Eh, why not? Seems like a chicken-and-egg thing. If there's no Rust support for some platform, fewer people will want to write things in it because they won't be able to run them where they want. But the less Rust software there is, the less interest anyone would have in writing build tools for less popular platforms.
Break out of these patterns by writing useful software in it that people would like to have on less popular platforms, so more people feel motivated to build and maintain build tools for it.
If you really needed to run Rust code on some platform LLVM doesn’t natively support, it does allow you to compile to C. Presumably you could then compile that using whatever C compiler works for your platform.
Although Rust is not as portable as C, going through these hoops would mean that —- modulo codegen bugs —- the generated C code should still be as memory-safe as the original Rust code.
[+] [-] akdas|7 years ago|reply
[+] [-] giancarlostoro|7 years ago|reply
[+] [-] jonty|7 years ago|reply
https://shop.jcoglan.com/building-git/
[+] [-] abhijat|7 years ago|reply
It is something I am interested in buying but I have not been able to find reviews of it.
[+] [-] ernst_klim|7 years ago|reply
https://github.com/mirage/ocaml-git
https://github.com/mirage/irmin
[+] [-] empath75|7 years ago|reply
[+] [-] ioquatix|7 years ago|reply
https://github.com/ioquatix/relaxo-model
It's so much fun, but not that practical for scalable websites.
[+] [-] shafte|7 years ago|reply
My understanding is that they want to get it fully ported before Python 2 EOL.
[+] [-] hannob|7 years ago|reply
Strongly recommend using some standard FOSS license before plenty of people add commits and it gets a big mess clearing up the licensing situation later.
[+] [-] littlestymaar|7 years ago|reply
Also, not having a license file isn't a messy situation, that means “this project is protected under Berne Convention copyright“: the author is the only one holding every rights on the code and every use that is not explicitly allowed is a copyright infringement (unless it's fair use).
[+] [-] josteink|7 years ago|reply
For Rust that is (afaik) MIT. Why don’t you go try it? ;)
[+] [-] e12e|7 years ago|reply
[+] [-] _bxg1|7 years ago|reply
[+] [-] aidenn0|7 years ago|reply
[+] [-] lelanthran|7 years ago|reply
[+] [-] d33|7 years ago|reply
[+] [-] kasbah|7 years ago|reply
https://conventionalcommits.org
[+] [-] Chris2048|7 years ago|reply
[+] [-] chx|7 years ago|reply
[+] [-] mises|7 years ago|reply
I understand some of these are very likely for educational purposes (like this one and others; it's good for getting more familiar with the language), but it still seems to be a bit of a strange trend (especially since people who don't need to learn are doing it, seemingly just because "yay rust").
[+] [-] emef|7 years ago|reply
> especially since people who don't need to learn are doing it
Don't need to learn?? There's always something to learn.
[+] [-] adamnemecek|7 years ago|reply
Furthermore, the resulting code feels just so sturdy. I can also expose it as C and it can be used from the likes of Python.
[+] [-] jchw|7 years ago|reply
Actually there's a lot of great reasons to rewrite everything in every language. Git is an especially good piece of software to implement everywhere because it's relatively stable and it's pretty useful.
As for actual reasons, one good example is so you can keep your dependencies in the language, using the language package manager. For Go nobody even questions that this is worth it; it enables painless cross compiling and completely static, libc-free binaries. For Rust that may not be a thing, but you do at least get the benefits that you could integrate Git functionality without having to hack around in porcelain.
This one here is a learning experience by it's own description, but I would suggest people stop complaining about "rewriting everything" in $LANGUAGE. The opposite complaint is often cited as a reason why to not use the language (that, for example, basic programs haven't already been ported.) If we did build an alternate world with feature parity, unit testing, optimizations, in a memory safe language, I doubt many people would be complaining about the strange trend of rewriting things anymore.
[+] [-] PrototypeNM1|7 years ago|reply
[+] [-] beatgammit|7 years ago|reply
For example, I rewrote `tar` in JavaScript because I wanted to use it in the browser, and I didn't want to fiddle with trying to compile the existing project to JS. It took me a weekend and it worked pretty well for the project I needed it for. That project has since died (completely redesigned), but the tar stuff still works.
These days I'm getting lazy, so for something like git, I'll often exec out to the CLI app instead of fiddling with bindings, especially if it's not a performance-critical part of my app. However, I'd definitely look for a rewrite first and clean bindings second to use as a lib, especially if the rewrite had a suitable license (anything not copyleft).
[+] [-] ryanolsonx|7 years ago|reply
[+] [-] chris_mc|7 years ago|reply
[+] [-] unknown|7 years ago|reply
[deleted]
[+] [-] SilasX|7 years ago|reply
[+] [-] sneakernets|7 years ago|reply
[+] [-] qualsiasi|7 years ago|reply
HN discussion: https://news.ycombinator.com/item?id=19485609
[+] [-] johnklos|7 years ago|reply
[deleted]
[+] [-] dang|7 years ago|reply
https://news.ycombinator.com/newsguidelines.html
[+] [-] giancarlostoro|7 years ago|reply
Maybe it wont run on your toaster but if you are making git commits through your toaster you got other issues.
[+] [-] ufmace|7 years ago|reply
Break out of these patterns by writing useful software in it that people would like to have on less popular platforms, so more people feel motivated to build and maintain build tools for it.
[+] [-] foreahl|7 years ago|reply
The author says quite clearly that it's "for fun and education".
[+] [-] profquail|7 years ago|reply
Although Rust is not as portable as C, going through these hoops would mean that —- modulo codegen bugs —- the generated C code should still be as memory-safe as the original Rust code.
[+] [-] Ygg2|7 years ago|reply
[+] [-] GoblinSlayer|7 years ago|reply
[+] [-] OpenBSD-supreme|7 years ago|reply
>rust that
Why re-invent the wheel? Ada is superior. :^)
[+] [-] k0t0n0|7 years ago|reply