Live data from Hacker News

Tor in a safer language: Network team update from Amsterdam

lists.torproject.org

141–150 of 254 posts

Re: Tor in a safer language: Network team update from Amsterdam

#141
post #85

Earlier quoted context omitted.

So, Java?

No, Java has become too advanced for the typical Go developer. Too many features.

It is for me. Could not figure out advanced tools like Maven or gradle. Maybe it was beneath Java experts at Sun/Oracle develop simple cli tool that could compile a java project with one command.

Re: Tor in a safer language: Network team update from Amsterdam

#142
post #102

When I read safer language, 'Rust' came into mind automatically.. Not sure if 'Rust' will ever be as popular as golang but certainly see a future with it popping up everywhere mission critical / super safe software is required.

I am afraid Rust will become much more popular than Go is atm. I think the C++ crowd will embrace it as soon as it will be mature. I am sure it is better than C++, but I still like the concepts and syntax of Go much better. But as C++ programmers obviously never care about readability and simplicity, I am pretty sure they will take Rust. After all, Rust is a decent language and as users, we will all benefit from the…

C and C++ are used in generally very conservative systems programming contexts. Safety is always considered with other items for tradeoff. Adoption just for reasons of safety isn't a given.

As a result, the "maturity" required for adoption differs in different parts of the C and C++ community. If Rust becomes more popular than either of those languages it is unlikely to be on a time scale shorter than a decade or two. That's not to say it can't happen quicker, especially given that communication and adoption can be much quicker today than it was even 15-20 years ago, but it's unlikely.

Re: Tor in a safer language: Network team update from Amsterdam

#143
post #100

As a mere average user of computer languages, every time I play around with Go I start wondering how a language like this became so popular. It feels like it was invented in a universe where Haskell, OCaml, Erlang, Smalltalk, Lisp and so many more languages and research in languages never happened.

When you talk about Go I think you should start with C. One of my professors used to tell us, that C was built by people who wanted to use it and didn't care about academic style. In many ways Go is just the next step of C. C did not have object orientation and even passing functions around was kinda hard. While C++ tried to bring object orientation to C (total failure) Go decided to keep the core values of C and ins…

Go doesn't have faster build times than C. Rather, it has a de facto single implementation that's fast because it doesn't do the same level of optimization that modern C compilers do.

The one improvement over C related to build time in Go is that you don't need include files. Granted, that's a big one. But modern C compilers make header parsing extremely fast.

Re: Tor in a safer language: Network team update from Amsterdam

#144
post #142
post #102

Earlier quoted context omitted.

I am afraid Rust will become much more popular than Go is atm. I think the C++ crowd will embrace it as soon as it will be mature. I am sure it is better than C++, but I still like the concepts and syntax of Go much better. But as C++ programmers obviously never care about readability and simplicity, I am pretty sure they will take Rust. After all, Rust is a decent language and as users, we will all benefit from the…

C and C++ are used in generally very conservative systems programming contexts. Safety is always considered with other items for tradeoff. Adoption just for reasons of safety isn't a given. As a result, the "maturity" required for adoption differs in different parts of the C and C++ community. If Rust becomes more popular than either of those languages it is unlikely to be on a time scale shorter than a decade or two…

I agree that it will take a few years, but from the current point in time I think it will have a large market share in about 10 years.

Re: Tor in a safer language: Network team update from Amsterdam

#145

Earlier quoted context omitted.

> I keep thinking a different language that acts as a front end w/ a better syntax might be a good idea... Also, a seemless FFI for C libraries like Julia's. You mean Rust I think ;)

People have had a hard time learning Rust. I also get gripes about its inconsistency in language syntax. The FFI I hear is good. It certainly doesn't output to SPARK or a C subset designed for easy, static analysis. So, Rust ain't the Ada makeover Im thinking about. It's also in a stability-oriented freeze of existing design right now. So, the makeover will need to be a different language.

That type system is pretty sophisticated. You could probably slap a FP front-end ala Haskell but that would hardly make it more accessible. Might as well just bite the bullet and learn the language.

Re: Tor in a safer language: Network team update from Amsterdam

#146
post #100

As a mere average user of computer languages, every time I play around with Go I start wondering how a language like this became so popular. It feels like it was invented in a universe where Haskell, OCaml, Erlang, Smalltalk, Lisp and so many more languages and research in languages never happened.

When you talk about Go I think you should start with C. One of my professors used to tell us, that C was built by people who wanted to use it and didn't care about academic style. In many ways Go is just the next step of C. C did not have object orientation and even passing functions around was kinda hard. While C++ tried to bring object orientation to C (total failure) Go decided to keep the core values of C and ins…

Go's concurrency model is based on CSP [0] and the previous languages Rob Pike worked on that were also heavily influenced by CSP.

[0] https://en.wikipedia.org/wiki/Communicating_sequential_proce...

Re: Tor in a safer language: Network team update from Amsterdam

#147
post #140
post #110

Earlier quoted context omitted.

Can you expand on why you think Rust isn't a sane choice here?

Because again you are deviating from the industry standard completely portable lingua-franca language that is designed explicitly for precisely these types of problem spaces, and is perfectly in tune with the OS and existing standard library. What would be the advantage, just improved memory safety guarantees for people working on the project? If that's the case start again from scratch and the first thing you do is…

C programs don't tend to be in tune with the OS and existing standard library if they support more than one OS. You need a heavy abstraction layer by the time you're doing anything vaguely complicated - which Tor is, by simply using an event loop. It's also not super-easy to interface with crypto libraries safely without building an abstraction layer. So you're a few hops away from being "in tune" to start.

Rust provides, among other things, a decent type system that can encode some of your invariants in a manner that's a lot clearer - and every operation goes through the equivalent of your Safexxxx() functions by default, making the actual logic of what you're trying to do further clearer. A reasonable error handling mechanism is also built into the standard library and partially into the language, rather than checking return values for -1, or is it 0, and is the actual error in errno or was that function actually meant to return a value between -1 and -100 corresponding to the error, etc etc.

Re: Tor in a safer language: Network team update from Amsterdam

#148
post #96

Earlier quoted context omitted.

Go is designed for average programmers working in a huge organization. That's why its dullness is a virtue.

Seems weird that from what I hear about the intense interview process that Google programmers go through that they'd feel a need to dumb down the language of choice.

I have yet to meet anyone inside Google who actually likes the language. At best they call it a decent replacement for C or C++, which is damning with faint praise. Lots of people are neutral, of course.

Re: Tor in a safer language: Network team update from Amsterdam

#149
post #96

Earlier quoted context omitted.

Go is designed for average programmers working in a huge organization. That's why its dullness is a virtue.

Seems weird that from what I hear about the intense interview process that Google programmers go through that they'd feel a need to dumb down the language of choice.

The idea is that it makes software engineering across an organization much simpler if your language is minimal and eschews magic or complex constructs

Re: Tor in a safer language: Network team update from Amsterdam

#150
post #141
post #85

Earlier quoted context omitted.

No, Java has become too advanced for the typical Go developer. Too many features.

It is for me. Could not figure out advanced tools like Maven or gradle. Maybe it was beneath Java experts at Sun/Oracle develop simple cli tool that could compile a java project with one command.

'gradle build'

Unless the project is very badly configured, that should be all you need to compile it. Now, writing those .gradle files...

Post reply on HN