5 ms·
If you're interested in this, you may enjoy "Building Git" by James Coglan - a comprehensive book that takes you through reimplementing git in Ruby. https://sh
by jonty 8y ago
If you're interested in this, you may enjoy "Building Git" by James Coglan - a comprehensive book that takes you through reimplementing git in Ruby.
https://shop.jcoglan.com/building-git/ https://shop.jcoglan.com/building-git/
- abhijat 8y agoIf you have read this book, would you care to comment about its content and quality? It is something I am interested in buying but I have not been able to find reviews of it.
- kbknapp 8y agoIt's pretty good, I'd recommend it. I haven't finished the book yet, but what I've read thus far has been good. Something I'd wish I'd known (although it wouldn't have changed my decisions to purchase) is that it's not an exploration style book (i.e. "Let's cat this file and find out what it contains and why.") it's more of an explanation (i.e. "When I cat this file, it outputs XYZ which means ABC which I know from my research of the git source."). So the author isn't taking you along on their research, but rather coming back to you after the research is done to explain their findings from the ground up. This means early chapters have a lot of, "You'll just have to trust me XYZ means ABC." But this is also understandable given the complexity of git; there isn't really a square one. I also would have preferred the author use something like Python instead of Ruby for the reference implementation. IMO Python is a little more ubiquitous and easier to install/setup than Ruby. Ruby also leaves Windows devs at a disadvantage. But that's just me being pedantic. Overall I'd give the thumbs up.
- abhijat 8y agoThanks, I bought the book after finding a sample chapter on the author's website.
- steveklabnik 8y agoI haven’t read it yet, but I’m lucky to call the author a friend. I read all of his tweets about it while he was building it. I expect it to be of extremely high quality. I’ve got a lot of respect for his abilities. The only reason I haven’t read it yet is that I think it deserves a lot of attention and I haven’t made time yet.
- abhijat 8y agoThanks, I bought the book. Still undecided as to which language to work in, I wanted to use rust but the one part I'm unsure about is possibly where tree like data structures will need to be implemented? I guess that's tough to do in rust? I will give it a try.
- taktoa 8y agoTrees are easy in Rust. It's graphs that are harder.
- littlestymaar 8y agoGit “trees” are graphs though, since you have merge commits.
- FullyFunctional 8y agoMore to the point, they are DAGs. Git objects cannot form a loop, thus they are acyclic. </pedantic>
- littlestymaar 8y agoThat's absolutely correct. And your emphasis on this is on point, since DAG are relatively easy to implement in Rust: You just need to use ref-counting (instead of plain `Box` for a Tree) whereas general purpose graphs are harder to implement (and can lead to run-time bugs if node deletions aren't managed properly).
- 8y ago