[HN Gopher] Ugit - DIY Git in Python
       ___________________________________________________________________
        
       Ugit - DIY Git in Python
        
       Author : rohithkp
       Score  : 164 points
       Date   : 2021-10-03 08:12 UTC (14 hours ago)
        
 (HTM) web link (www.leshenko.net)
 (TXT) w3m dump (www.leshenko.net)
        
       | JonathanBeuys wrote:
       | Wow, that is a beautiful interface. I mean the website itself.
       | How is it made?
        
         | leeuw01 wrote:
         | +1, it looks great! Just wanted to ask the same question.
        
           | andlima wrote:
           | +1 It would be awesome to have a tool that creates a website
           | like that from a git repo and a collection of markdown pages
           | matching the commits.
        
       | otheracc wrote:
       | > f'{GIT_DIR}/objects'
       | 
       | Never seen a writing style like that. How is it called? I want to
       | read some documentation and history.
        
         | mixmastamyk wrote:
         | Sting interpolation, aka f-string, pep 498. Uses the .format
         | mini-language plus expressions. Python 3.6+
        
       | [deleted]
        
       | xonix wrote:
       | Git in Awk: https://github.com/djanderson/aho
        
       | mixedmath wrote:
       | I particularly like the iterated development approach to teaching
       | on this site. That is, one starts with some minimal working code,
       | states a goal, and then modifies the code to accomplish that goal
       | --- repeatedly.
       | 
       | This is a very powerful way to go through a codebase (when it is
       | possible).
        
         | tony wrote:
         | Does anyone know the tool to use used to generate the site?
         | 
         | e.g. Is it using plugin for a static site generator?
        
           | yardshop wrote:
           | In the comments on the first page, he says it's custom
           | written in TypeScript and not open source yet.
        
       | toinbis wrote:
       | Earlier(2020-09) HN submission with discussion on same project:
       | https://news.ycombinator.com/item?id=24517925.
        
       | iheredia wrote:
       | Anyone knows of similar projects in another languages? I've been
       | wanting to understand some important tools (like git in this
       | case) and also learn some languages I've been pushing back. Would
       | love to find more of these
        
         | egeozcan wrote:
         | Exactly, Typescript or C# would have been very nice.
         | 
         | edit: found some for JS, not TS but still something:
         | 
         | http://gitlet.maryrosecook.com/docs/gitlet.html
         | 
         | https://kushagra.dev/blog/build-git-learn-git/
        
         | ori_b wrote:
         | The OpenBSD people are working on Game of Trees:
         | http://gameoftrees.org/
         | 
         | And I wrote the one that 9front uses, which is self hosting
         | (client, server, and web ui all run off it):
         | http://shithub.us/ori/git9/HEAD/f.html
        
         | turminal wrote:
         | There's https://git.sr.ht/~sircmpwn/shit, written in posix sh.
         | It doesn't implement any of the porcelain though.
        
         | rohitpaulk wrote:
         | There's a long list here:
         | https://github.com/danistefanovic/build-your-own-x.
         | 
         | Also, https://codecrafters.io/challenges/git supports multiple
         | languages (I'm the author). Many folks that try this challenge
         | do it for the same reason you mentioned: to learn about a tool
         | and learn a new language at the same time.
        
         | JoshTriplett wrote:
         | For Rust, see https://github.com/Byron/gitoxide , which
         | provides both a pure Rust library and a command-line tool built
         | atop that library.
        
         | sc4ramouche wrote:
         | I was thinking the same and found the book that teaches to
         | build Git in Ruby, although I haven't checked it out yet:
         | https://shop.jcoglan.com/building-git/
        
           | iudqnolq wrote:
           | I followed along to that book in Rust and found it excellent.
        
         | fiddlerwoaroof wrote:
         | I've been slowly working on implementing git in Common Lisp:
         | https://github.com/fiddlerwoaroof/cl-git
         | 
         | I think I have most of the object type parsers done for loose
         | objects and pack files, just need to finish implementing the
         | delta ref decoding algorithm.
        
       | arafatamim wrote:
       | There isn't a table of contents for the website? I haven't been
       | able to find one.
        
         | jonatron wrote:
         | You could take the titles from these:
         | https://www.leshenko.net/p/ugit/commits/0_ea7001173eca.json
         | https://www.leshenko.net/p/ugit/commits/10_ad7b545d89c5.json
         | https://www.leshenko.net/p/ugit/commits/20_b9fc219d64aa.json
         | https://www.leshenko.net/p/ugit/commits/30_edbc10cf00d3.json
         | https://www.leshenko.net/p/ugit/commits/40_cbfd5156051c.json
         | https://www.leshenko.net/p/ugit/commits/50_56ed4b981991.json
         | https://www.leshenko.net/p/ugit/commits/60_4592eac2f135.json
        
       ___________________________________________________________________
       (page generated 2021-10-03 23:01 UTC)