Live data from Hacker News

Tor in a safer language: Network team update from Amsterdam

lists.torproject.org

101–110 of 254 posts

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

#101
post #21
post #5

I don't know much about Tor. But I hope I can route all of my home network traffic through it. That or route everything through VPN. I'll bet you can guess why I'm suddenly interested.

Founder of https://easyvpnrouter.com/ ask me anything or how to build one yourself if you want a project

Nice! There's definitely a need for this. It would be good to include the actual router specs on your site, like cpu frequency + cores and RAM.

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

#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 migration.

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

#103

Earlier quoted context omitted.

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

So, Java?

Kind of, but with more `strings.hasSuffix(...)` and less `new StringComparatorFactory(new StringSubsetComparison(), StringComparisonPositions.END_POSITION, ...`

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

#104
post #45
post #36

Earlier quoted context omitted.

Go is a genersl purpose industry language. The ones you mention are niche or academic research languages.

There are companies built on Haskell and Erlang. Just because a language is founded on good programming theory doesn't make it unviable in the industry. Ideally, the reverse would be true.

Erlang, sure. Maybe a few. But Haskell? I doubt there are many. I bet Go's use in industry is easily 100 times that of Haskell's already and it is much younger.

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

#105
post #92

I live and love in Amsterdam and Golang seems to be the quintessential hipster language for this quintessentially hipster city. Booking.com's soup du jour if you will. Basically, if you aren't using JavaScript in a web shop, and you claim to be a "full-stack" "ninja", then probably you are using Go around here as a jobbing programmer. I know that sounds terribly cynical and obviously a massive generalization but that…

> Developers, please suck it up, get over it and learn C/C++ and some variation of Lisp.

I've got over 20 years of writing production C/C++ under my belt and I know Lisp. So I've "sucked it up." Am I allowed to like Go now?

It never ceases to amaze me how many people are bothered about other people's taste in something so mundane. If you don't enjoy programming in Go, don't do it. I personally think it feels light and easy like a scripting language, but with more C-like performance.

I like the fact that its stdlib is very complete, so I can sit down and do pretty much any kind of small project with zero external dependencies, I like the fact that the core libraries are well-designed so the interfaces are consistent and easy to learn, I like the fact that it produces statically-linked binaries so deployment issues are minimal, I like the simplicity of the CSP approach for a lot of concurrency problems. I could also come up with a list of things I don't like about Go, but I'm not going to bother, because I've decided that on the whole, I really like it as a tool.

Btw: > Positives... Has a fairly nice package manager like npm

One of my biggest complaints about golang is that it really doesn't have nice dependency management. It's terrible and probably the one issue that has made me seriously consider walking away. :)

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

#106

Earlier quoted context omitted.

1) Two words: "begin" and "end"; 2) Unix, C is so fundamental to building software, that I think any language that doesn't share syntax with it is doomed. Having a common syntax helps in learning new languages, IMO, and can also be a launching point for differing semantics...

I'll give you it's overly verbose even though quite a bit of it was justifiable. The theory of Ada's designers was that people read software more than write it. So, the syntax should be designed to facilitate catching errors in maintenance mode, during extensions, or during integrations. It's done phenomenal at that per industrial, case studies despite having been invented in the 80's when lots of language decisions…

I totally agree that code should be written to be read.

It certainly wouldn't hurt if people simply used a more literate programming style no matter what language they choose

Far too many people think code as below is acceptable.

This is C obviously, but pretty much equal horrors around in every language.

This isn't 1994 and the compiler really doesn't care how long your variable names are, plus EatWhite() is pretty damn fast.

  const int to_pn  = base_n ^ label_n;
      const int from_p = _array[to_pn].check;
      const int base_p = _array[from_p].base ();
      const bool flag
        = _consult (base_n, base_p, _ninfo[from_n].child, _ninfo[from_p].child);
      uchar child[256];
      uchar* const first = &child[0];
      uchar* const last  = flag ? _set_child (first, base_n, _ninfo[from_n].child, label_n)
        : _set_child (first, base_p, _ninfo

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

#107
post #16

I am curious why they were advised not to use Go. Probably not a safety concern. Edit: cgo != Go. Thanks for the responses. I have done a bit of Go, but just pure Go.

Go and Rust are very different languages. Rust is, by design, well-suited to Tor's use case, where they have a large C or C++ program and they need to incrementally rewrite parts of it (and maybe never all of it!) in a better language. It turns out (or so I hear) that Google statically links everything in production, and has been using C++ as a language to implement HTTP endpoints for a long time. So Go is a better C…

I think Go is a better C, while C++ is the opposite.

+1 for the rest of the explanation.

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

#108
post #74

Not sure why Ada is not taking off these days. It is mature and has all the safety and concurrency bells and whistles: http://www.adacore.com/uploads_gems/07_safe_secure_ada_2005_... https://en.wikibooks.org/wiki/Ada_Programming/Tasking http://courses.cs.vt.edu/cs5204/sp99/Overheads/6UP/6UPCSPand...

I looked into Ada last year. Getting a toolchain working sanely on a Mac seemed quite a lot of work; it's not in Homebrew, the MacPorts version has some weird bootstrap process, and the various random versions available for download had a murky mix of license and implementation issues that i don't remember in detail. So i read documentation instead. Ada mostly seems like a pretty sensible language. Its story on memor…

[deleted]

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

#110
post #99
post #16

Earlier quoted context omitted.

Go and Rust are very different languages. Rust is, by design, well-suited to Tor's use case, where they have a large C or C++ program and they need to incrementally rewrite parts of it (and maybe never all of it!) in a better language. It turns out (or so I hear) that Google statically links everything in production, and has been using C++ as a language to implement HTTP endpoints for a long time. So Go is a better C…

Totally agree, and Rust isn't a sane choice either even though the points you make are valid. Rust has some interesting features, but being C isn't one of them.

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