News for hackers. Stuff that matters.
Re:Remote code execution, git, and OS X by zaphar on Monday April 18, 2016 @09:49AM (#11519829)
But if the goal of the rewrite is safer tooling then Rust wins.
Re:Remote code execution, git, and OS X by falcolas on Monday April 18, 2016 @10:00AM (#11519898)
Or Python, or Ada, or Ruby, or Go, or Java, or Lisp, or any of the myriad of other memory safe programming languages.

When it comes to memory safe languages, your choices do not boil down to "Rust or nothing".

Re:Remote code execution, git, and OS X by blub on Monday April 18, 2016 @10:47AM (#11520296)
No, in this case it pretty much does boil down to Rust or C++. This is a low-level tool, not a webapp.
Re:Remote code execution, git, and OS X by falcolas on Monday April 18, 2016 @11:06AM (#11520464)
That still gives you Lisp, Ada, Go, Haskell, and Java, if you make the (imo incorrect) assumption that "low level" tools can only be written in languages which compile down to bytecode.

Of course, Mercurial gives lie to this assumption.

Re:Remote code execution, git, and OS X by samirm on Monday April 18, 2016 @01:41PM (#11521718)
Java? You won't get any performance out of it compared to something like C.
Re:Remote code execution, git, and OS X by joushou on Monday April 18, 2016 @03:23PM (#11522456)
I don't like Java, but don't underestimate the performance of the JVM. Unless you're a crazy perf wiz, then your average C code won't beat your average Java code. It's fast enough for short processes, and for long processes the JIT is pretty darn good. Also note that a JIT can perform runtime assumptions and optimize code based on what is currently the case, which an AOT compiler cannot.

It takes a lot more than a toolchain to write fast code.

Re:Remote code execution, git, and OS X by pjmlp on Monday April 18, 2016 @02:16PM (#11521997)
In what scale?

What it matters is if it is fast enough for the use case being targeted.

As side note I remember when C compilers for home computers generated worser code than junior Assembly programmers.

Re:Remote code execution, git, and OS X by pjmlp on Monday April 18, 2016 @11:40AM (#11520766)
A command line tool like Git can be written in any programming language that has implementations capable of generating native code.

Even then, Mercurial is implemented in Python and quite usable

Re:Remote code execution, git, and OS X by bsder on Monday April 18, 2016 @02:50PM (#11522240)
Git is not a "low-level" tool.

The fact that a Java rewrite of git actually exists demonstrates the falsity of this statement.

Re:Remote code execution, git, and OS X by ptc on Monday April 18, 2016 @11:32AM (#11520703)
@falcolas -- I think you mean machine code not bytecode. And w.r.t. Mercurial afaik the project's hot paths are all written in Cython extensions, and there's ongoing work to improve the Python part by working with the PyPy folks. So, there's definite technical advantages in using Python for greater developer productivity, but there's also a cost.
Re:Remote code execution, git, and OS X by zaphar on Monday April 18, 2016 @01:17PM (#11521520)
I was not implying it did. I was responding to the C++ suggestion specifically.
Re:Remote code execution, git, and OS X by blub on Monday April 18, 2016 @10:49AM (#11520315)
The goal is writing safer code, but that also comes with some costs. The interesting question is which costs can the project afford.

Otherwise yes, it could even be rewritten in Ruby, as falcolas suggested...