Linus Torvalds built Git in 10 days - and never imagined it would last 20 years (www.zdnet.com)
from cm0002@lemmy.world to programming@programming.dev on 11 Apr 06:17
https://lemmy.world/post/28070199

#programming

threaded - newest

Bezier@suppo.fi on 11 Apr 07:05 next collapse

Turned out better than javascript.

max@lemmy.blahaj.zone on 11 Apr 10:30 next collapse

I expected someone to say that, and boom first comment lol

FizzyOrange@programming.dev on 11 Apr 16:42 collapse

Be thankful we got Javascript. We might have had TCL! šŸ˜±

Interesting footnote: the founding of Netscape occurred at the same time I was deciding where to go in industry when I left Berkeley in 1994. Jim Clarke and Marc Andreessen approached me about the possibility of my joining Netscape as a founder, but I eventually decided against it (they hadnā€™t yet decided to do Web stuff when I talked with them). This is one of the biggest ā€œwhat ifā€ moments of my career. If I had gone to Netscape, I think thereā€™s a good chance that Tcl would have become the browser language instead of JavaScript and the world would be a different place! However, in retrospect Iā€™m not sure that Tcl would actually be a better language for the Web than JavaScript, so maybe the right thing happened.

Definitely dodged a bullet there. Although on the other hand if it had been TCL thereā€™s pretty much zero chance people would have tolerated it like they have with Javascript so it might have been replaced with something better than both. Who knowsā€¦

Bezier@suppo.fi on 11 Apr 20:06 next collapse

Thanks, I hate it even more

resipsaloquitur@lemm.ee on 11 Apr 23:06 collapse

The TV company?

FizzyOrange@programming.dev on 12 Apr 08:00 collapse

Tool Command Language. Itā€™s a shitty stringly-typed scripting language from the 80s that took a neat hack (function bodies are string literals) way too far.

Itā€™s a bit less shit than Bash, but shitter than Perl.

Unfortunately the entire EDA industry has decided to use it as their scripting interface, which isnā€™t too bad in itself - the commands they provide are pretty simple - but unfortunately it leads to people stupidly basing their entire EDA infrastructure on TCL rather than wrapping it in a saner language.

onlinepersona@programming.dev on 11 Apr 07:34 next collapse

It couldā€™ve been mercurial, but Iā€™m glad that didnā€™t happen. Being shouted at in a mailing-list for fixing a bug doesnā€™t sound like fun. Also, the amount of CPU resources that would be wasted running a VCS in python would be phenomenal. And have fun trying to develop a project using a separate python version than supported by your python VCS.

Anti Commercial-AI license

alsimoneau@lemmy.ca on 11 Apr 08:03 next collapse

Care to explain your comment for a layman?

From my limited experience mercurial is way more intuitive than git. The big one is named branches are a thing instead of an abstraction.

SGG@lemmy.world on 11 Apr 08:37 next collapse

I think itā€™s less user experience and more that mercurial is a lot more demanding hardware wise to do the same rough job?

SpaceNoodle@lemmy.world on 11 Apr 08:39 next collapse

What do you mean by ā€œare a thing?ā€ Git has branches.

notabot@lemm.ee on 11 Apr 11:04 next collapse

Git branches are very different to Mercurial branches. In git theyā€™re similar to tags that move along with the head commit of that particular branch. In Mercurial every commit contains meta data indicating the branch itā€™s on. It also has a query language that lets you do sone quite neat things with selecting groups of commits based on their metadata, which can be useful in code reviews and similar.

SpaceNoodle@lemmy.world on 11 Apr 14:02 collapse

That just sounds like an implementation detail.

Can you provide an example of something thatā€™s possible in Mercurial, but not git?

Kayana@ttrpg.network on 11 Apr 16:12 next collapse

Iā€™ve never used Mercurial, but a simple one based on the explanations and my experience with Git:

Locating the branch a commit originated from. If a git branch has been merged into (or rebased on) main or another branch, thereā€™s no way to tell which commit came from which branch. But sometimes Iā€™d really like that information to figure out what prompted a certain change. Without it, I need to use external tools like a ticketing system and hope the other developers added in the necessary information.

SpaceNoodle@lemmy.world on 11 Apr 17:19 collapse

That seems to be the opposite of useful if a commit is initially pushed to a development branch, which is relatively standard practice; now youā€™re polluting the tree with data thatā€™s purposefully ephemeral, and even potentially leaking internal information.

Also, Iā€™d argue that such deep details do belong in another tool, rather than asking the source control tool perform triple duty by being a CR and issue tracker as well.

notabot@lemm.ee on 11 Apr 18:25 collapse

Most of the time youā€™re right, itā€™s little more than a detail, but sometimes I miss the querying that it allowed. You could ask for things like a list of all branches that branched from a specific parent branch and modified a specific file, Which can be handy when you want to understand the impact a change might have before you make it and try merging.

Having the branch name embedded in the commit means you can meaningfully ask this sort of question. In gitā€™s model you canā€™t say a changeset is in a specific branch once there are child branches further downstream because the changeset is in all of those branches.

Rather than come up with lots of examples for other queries (I know it wasnā€™t the focus of your question, but I think itā€™s really neat), I found this page which seems like a reasonable description.

alsimoneau@lemmy.ca on 11 Apr 13:52 collapse

No, git has labels on heads of branches. Once the head moves you loose the information. It also makes for a more messy history, which I believe created the whole ā€œrebase everythingā€ philosophy to cope.

SpaceNoodle@lemmy.world on 11 Apr 14:01 collapse

What information is ā€œloosedā€ when another commit is made to the branch?

bleistift2@sopuli.xyz on 11 Apr 15:55 collapse

If I hand you a commit, you cannot tell which ā€˜branchā€™ it is on without searching the git history and hoping that you only get one answer. Thatā€™s a bummer if, for instance, youā€™re a github action and only get handed the commit. If itā€™s on the master branch, I want to do different things than if itā€™s a dev branch.

SpaceNoodle@lemmy.world on 11 Apr 16:13 collapse

A commit all by itself doesnā€™t mean as much without context.

Why would I not want to be able to apply a commit to any arbitrary branch?

Also, GitHub is not git - itā€™s based on git. Any shortcomings it may have arenā€™t necessarily due to a flaw in git.

bleistift2@sopuli.xyz on 11 Apr 16:55 collapse

A commit all by itself doesnā€™t mean as much without context.

Luckily a commit points to its parent, which means the context is inherently present. Whatā€™s your point?

Why would I not want to be able to apply a commit to any arbitrary branch?

Nobody said that.

Any shortcomings it may have arenā€™t necessarily due to a flaw in git.

True enough.

SpaceNoodle@lemmy.world on 11 Apr 17:11 collapse

Your claim appears to be that Mercurial binds commits to branches, and Iā€™m explaining how I fail to see the advantage.

alsimoneau@lemmy.ca on 11 Apr 19:30 collapse

It makes the history clearer.

SpaceNoodle@lemmy.world on 11 Apr 20:33 collapse

How is a Mercurial commit tree clearer than a git commit tree?

alsimoneau@lemmy.ca on 12 Apr 10:47 collapse

Branches are distinct.

Letā€™s say you have a main and a dev branch, and you periodically merge dev into main. Because of fast forwarding (on by default) the main branch is completely gone from the history. If you then add bug fixes and project branches it becomes a tangled mess really quickly and itā€™s nearly impossible to understand the structure by looking at the tree.

On mercurial every branch is named and distinct forever. You donā€™t have to try to understand what happened to the project since itā€™s obvious by looking at the tree.

Now there are ways to have a clean git history, but afaik you either need to make sure nobody ever messes it up or have everyone rebase everything and only keep the history of the main branch.

When working in a hyper structured organization that may work, but for more casual developers (scientists, students) that arenā€™t system experts and where you have messy history, mercurial default settings are less confusing, easier to learn and produce better results.

SpaceNoodle@lemmy.world on 12 Apr 15:23 collapse

No, merging in git does not make branches disappear.

fartsparkles@lemmy.world on 11 Apr 08:43 next collapse

Mercurial is written in Python, Git in C.

Given the number of git instances, had it been implemented in Python, more CPU cycles / electricity would have been used.

Blah blah Mercurial is responsible for global warming. (Iā€™m being sarcastic by the way - I love Mercurial).

onlinepersona@programming.dev on 11 Apr 08:46 collapse

Python 10s of multiples more CPU cycles than git. It is an interpreted language: every instruction is read by another process, checked, and then run. Hit on the other hand is executed straight by the CPU. It has at least one layer of indirection less than python (the python interpreter may have multiple). That means it can be slower but it definitely uses more energy.

Since git is so popular, if it were instead mercurial, the energy requirements would be much higher for version control. Whether that will be noticeable on a bill is debatable. I havenā€™t run the numbers.

Regarding the different python versions. As mentioned before, there is a python interpreter. That interpreter is versioned and so is the python language. Many things are backwards compatible meaning something written in a higher version of the python language can be interpreted by a lower version of the python interpreter. The reverse is also true, so python interpreter with a higher version can interpret a python file using a lower version of the language.

Notice that I put ā€œcanā€ in bold. Thatā€™s because newer versions can deprecate certain features or parts of the language. So, if youā€™re writing a project in a different version of python, mercurial may or may not run depending on your version. Resolving that may not be as intuitive as one thinks.

I think those were he points you were referring to when you asked your question?

Anti Commercial-AI license

Glitchvid@lemmy.world on 11 Apr 13:00 next collapse

I donā€™t think itā€™s hyperbole to say a significant percentage of Git activity happens on GitHub (and other ā€œfoundriesā€) ā€“ which are themselves a far cry from efficient.

My ultimate takeaway on the topic is that weā€™re stuck with Gitā€™s very counterintuitive porcelain, and only satisfactory plumbing, regardless of performance/efficiency; but if Mercurial had won out, weā€™d still have its better interface (and IMO workflow), and any performance problems couldā€™ve been addressed by a rewrite in C (or the Rust one that is so very slowly happening).

onlinepersona@programming.dev on 11 Apr 17:47 collapse

Imagine if their VCS operations were 10s of times less efficient šŸ˜‰

Anti Commercial-AI license

Glitchvid@lemmy.world on 12 Apr 00:37 collapse

Most of the VCS ops in Hg are actually written in C.

GitHub is mostly written in Ruby, so thatā€™s not really a performance win.

Like I said, weā€™re stuck with Gitā€™s UX, but we were never stuck with Hgā€™s performance.

alsimoneau@lemmy.ca on 11 Apr 13:53 collapse

Surely it could be rewritten in Fortran if performance is really a concern.

onlinepersona@programming.dev on 11 Apr 14:08 collapse

Assembly is the true language of the gods, sir.

Anti Commercial-AI license

anton@lemmy.blahaj.zone on 12 Apr 13:31 collapse

Apart from the obvious lack of portability, compilers write better assembly than most humans.

darkpanda@lemmy.ca on 11 Apr 10:56 next collapse

If Mercurial were as popular as Git I would presume that it would be rewritten in C or Rust, but who can say.

floofloof@lemmy.ca on 11 Apr 12:46 collapse

Iā€™m sure it could, but no one thinks itā€™s worth their time when Git is right there and does the same job.

floofloof@lemmy.ca on 11 Apr 12:45 collapse

Being shouted at in a mailing-list for fixing a bug doesnā€™t sound like fun.

Whatā€™s that a reference to?

onlinepersona@programming.dev on 11 Apr 13:31 collapse

Some instances of one of the mercurial devs being a bully. It was a long time ago and I canā€™t remember the alias of the dev, but I do remember they had merge or commit rights - whatever those are called in mercurial. It felt like they had their own Linus but different. Whether they are still active or whether they still are like that, I dunno. Certainly hope they changed.

Dunno if the git mailing list was as toxic. Didnā€™t investigate that.

Anti Commercial-AI license

lowleveldata@programming.dev on 11 Apr 07:49 next collapse

In a cave with a box of scrap

db0@lemmy.dbzer0.com on 11 Apr 09:22 collapse

The biggest tragedy of modern media is that they chose to cast Elon Musk as the real life Tony Stark instead of torvalds who created 2 pieces of truly revolutionary software (with the help of thousands of other engineers ofc)

darkpanda@lemmy.ca on 11 Apr 10:52 next collapse

Also Subsurface, a scuba diving log program, but that one is not quite as well known.

subsurface-divelog.org

CosmicTurtle0@lemmy.dbzer0.com on 11 Apr 11:19 next collapse

Four things went for Musk:

  • he was rich
  • he had a passing resemblance to Robert Downey Jr.
  • he made was closely associated with futuristic hardware (we donā€™t seem to value revolutionary software the same way as hardware)
  • he was rich

In all honesty, a lot of solo developers who are directly responsible for the internet as we know it should be getting far more credit than rich ass holes but here we are.

Edit: correct

glimse@lemmy.world on 11 Apr 12:53 next collapse

he made futuristic hardware

Did he

FizzyOrange@programming.dev on 11 Apr 14:05 collapse

Yeah Teslas were pretty leading edge at the beginning. Then they started doing weird stuff like removing stalks and making triangular trucks.

Falcon 9 and Starship are obviously futuristic too.

glimse@lemmy.world on 11 Apr 15:33 collapse

Did he, though?

Chakravanti@monero.town on 11 Apr 16:07 next collapse

Look at it. That fuck didnā€™t do fucking shit but fuck. He also bought shit other people designed and made and put his name on shit he told them to be stupid in certain fucking stupid ways. IDRC what ignorant people say. If you look at real history, he fucked and fucked shit. Oh and sure, he paid a bunch of fancy people to look like they move pretty when speaking about his literal fucking shit. It worked and he paid them to lie about which side of fucking anything he was and/or would be on. If you saw shit up until THAT point, you should have fucking known he was lying. Didnā€™t matter that he said both. He was lying about everything because he wasnā€™t anything more than fucking shit, literally.

FizzyOrange@programming.dev on 11 Apr 16:50 collapse

No not in the same way Tony Stark did. But Tony Stark is imaginary. Obviously nobody can build an electric car or a rocket in the same way that Tony Stark does.

Of all the criticisms of Musk this is the weakest. There are many way more valid onesā€¦ for instance:

  • Heā€™s an arsehole.
  • He straight up called that diver a paedo, and even paid a scammer to investigate him.
  • The scummy lottery thing for votes for Trump. I donā€™t care if it ends up being technically legal, itā€™s clearly immoral.
  • Selling the promise of FSD for hard cash when it clearly is never going to happen as he claimed. I still donā€™t know why thereā€™s been no class action suit over that.
  • Backing proper insane far right groups in Europe. These people are worse than Trump. I wouldnā€™t say he is backing neonazis, but heā€™s certainly in the vicinity.

Despite all that he clearly has a pretty good handle on engineering and is definitely involved. Heā€™s not just a figurehead.

I know right, people are multidimensional. You can downvote if that blows your mind.

tyler@programming.dev on 11 Apr 17:04 next collapse

Despite all that he clearly has a pretty good handle on engineering and is definitely involved. Heā€™s not just a figurehead.

as far as Iā€™ve read he actually doesnā€™t, he just pretends to. You can see this in a lot of his interactions with his employees and the public. but yes, people are multidimensional. musk is a good salesman.

Duamerthrax@lemmy.world on 11 Apr 17:27 next collapse

musk was a good salesman.

ftfy

caseyweederman@lemmy.ca on 12 Apr 11:14 collapse

I donā€™t think thatā€™s even true. He just had enough money that he could fail 99 times before succeeding once, and the return from that one was enough that he could fail 999 times before succeeding, and so on.
He just threw money around until enough other people succeeded in big enough ways, and then he claims credit.

frezik@midwest.social on 11 Apr 17:34 collapse

Along those lines, consider the decision for why the Model S charge port is where it is, according to Teslaā€™s former chief engineer:

electrek.co/ā€¦/teslas-charge-port-location-is-due-ā€¦

tl;dr: you donā€™t want it directly in the front-center (like the Nissan Leaf) because a minor fender bender will ruin it. Front-driverā€™s side is a good choice that a lot of other manufactures are going to. Elon didnā€™t want that, because it didnā€™t line up with his Bel Air garage. So they stuck it in back, but due to the way Tesla Superchargers are laid out, it now means Tesla drivers have to back into the parking space.

chunkystyles@sopuli.xyz on 11 Apr 21:08 next collapse

For me the problem is that he LARPs as Tony Stark and idiots but into it. He pretends to be a smart engineer when he lucked into all of it and is really not all that bright.

Colloidal@programming.dev on 17 Apr 15:32 collapse

Didnā€™t he buy Tesla? And isnā€™t there a team on Space X just to prevent him from doing changes to projects? And didnā€™t he say the government didnā€™t use SQL?

gravitas_deficiency@sh.itjust.works on 11 Apr 14:41 collapse

Donā€™t forget:

  • he was rich
Knock_Knock_Lemmy_In@lemmy.world on 11 Apr 17:20 collapse

Donā€™t forget:

  • his dad was rich
gravitas_deficiency@sh.itjust.works on 11 Apr 17:35 next collapse

I mean, letā€™s be thorough. Heā€™s

  • the rich scion
  • of a family that made their fortune owning and exploiting emerald mines
  • in South Africa
  • during apartheid

Kinda tells you all you need to know about him and his family.

Also his dad fucked and married (edit: correction (side note: fuck me, somehow it was WAY weirder than I had remembered):) fathered not one, but TWO children with his own stepdaughter. No, Iā€™m not kidding.

Edit 2: nope, they married in the 90s too! You canā€™t make this shit up.

Colloidal@programming.dev on 17 Apr 15:28 collapse

Wait whatā€½

gravitas_deficiency@sh.itjust.works on 17 Apr 15:30 collapse

Yep.

And that was my reaction when I discovered that too šŸ«©

Colloidal@programming.dev on 17 Apr 15:36 collapse

Fuuuuck.

gravitas_deficiency@sh.itjust.works on 17 Apr 15:43 collapse

Yep.

Also, I want to point out that it was actually worse and weirded than I had remembered: i donā€™t think theyā€™re married, but theyā€™ve had two kids together, and one of them was intentional.

Yep.

Wow.

Edit: hahahahahaha fucking hell they got married in the 90s too

Skoll@lemmy.world on 12 Apr 13:53 collapse

A distinction without a difference

andioop@programming.dev on 14 Apr 14:35 collapse

Made me curious if Torvalds at least got some reward for his work besides gratitude from people who use his stuff. Iā€™m not sure how credible internet estimates of net worth are but looking up ā€œLinus Torvalds net worthā€ keeps showing me stuff from $50ā€“$150 million so hey, at least heā€™s (probably) comfortable. Not exactly Tony Stark superhero territory but if he wasnā€™t rich enough to sit at home and sleep for the rest of his life if he wanted to Iā€™d probably be upset on his behalf for a bit, before I moved onto the next outrage of the day. Glad to see heā€™s well-off.

theotherbelow@lemmynsfw.com on 11 Apr 08:37 next collapse

I believe his goto comment on git is that its current maintainer did/does far more work on git them him.

Thank god for that dude.

kamenlady@lemmy.world on 11 Apr 10:42 collapse

Handing over maintainership was not a hard choice. It was very much: ā€œThe moment somebody else comes along that I can trust to keep it going, Iā€™ll go back to doing just the kernel.ā€

Priorities

Empricorn@feddit.nl on 11 Apr 21:54 collapse

Compare that with someone who wants the appearance of creating/maintaining something, without actually contributing musk of anythingā€¦

phoenixz@lemmy.ca on 12 Apr 02:24 collapse

Nice

cupcakezealot@lemmy.blahaj.zone on 11 Apr 10:55 next collapse

itā€™s wild just doing git init instead of manually setting up /truck, /tags, and /branch every time.

driving_crooner@lemmy.eco.br on 11 Apr 22:12 collapse

Iā€™m part of the accounting team in my company, a fucking big corporation, but because Iā€™m not part of the dev or IT department IT dosenā€™t want to give me access to the azure devops they use. So I had to ask for service desk to install git locally and using it like that.

ABC123itsEASY@lemmy.world on 12 Apr 00:07 collapse

Principle of least permission. Iā€™m a dev and I still have to ask for temporary permission to even access customer infrastructure to solve production issues. Why should you need access to deployment infrastructure? I would deny you too, especially if your need could be solved by a local install of git.

driving_crooner@lemmy.eco.br on 12 Apr 02:44 collapse

I think we in the financial department need a devops for us, we write a lot of code that generates a lot of important information for strategic decisions and for regulatory bodies. Iā€™m the only one in the accounting team that knows how to code, but the actuarial team? All of them write code. And all of that code is sparced on butch of directories with _v{n}, _final_version, _post-fix, (copy) and so on. Is completely ridiculous that everything is being moved to Python without a git environment.

admin@sh.itjust.works on 12 Apr 16:37 collapse

Iā€™m a SysAdmin and Iā€™ve met several ā€˜codersā€™ who went thru a coding bootcamp, or even went to college and donā€™t know about git, less alone how to use itā€¦ kinda makes me sad.