Live data from Hacker News

Tor in a safer language: Network team update from Amsterdam

lists.torproject.org

131–140 of 254 posts

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

#131
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…

You do realize they didn't pick Go, yes?

Yes, but we got into a heated discussion about Go earlier in the thread. And it got my blood pressure up. :)

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

#132
post #21

Earlier quoted context omitted.

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

We use OpenDNS for safer kid surfing and logging. Can I get similar functionality? Your FAQ says you use "Private Internet Access’ custom DNS servers". Also, what about the Netflix issue?

You cannot use Netflix with any non-self-hosted VPN service, they have put a lot of effort into getting around it. We use PIA's DNS for anonymity.

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

#134
post #21

Earlier quoted context omitted.

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.

We can include that, sure. The router's are well-known brands which can be looked up in tons of places, but yeah we should add it.

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

#135
post #35

Earlier quoted context omitted.

To be honest, you can probably also pick up Lisp in a weekend, experienced programmer or not. The syntax is also simpler.

But all those parentheses! I know it sounds like a lame reason to dislike a language, but I've always found staring at Lisp to be so much more difficult and distracting than C-style syntax.

From experience of pairing with other people, there are those happy to leave indentation and formatting to their linter/IDE and those who are anal enough to do it all manually.

The latter group tend to find lisp not that painful because lisp parens/s-exps are as explicit as you can get, and indentation makes parens almost invisible

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

#136
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…

Someone left a comment mentioning that i could download a compiler from AdaCore, but seems to have deleted it. I was going to thank them! AdaCore's website is not very helpful, but googling turned up:

http://libre.adacore.com/download/

You can download the 'GPL edition' of GNAT [1]. This is a complete toolchain for Ada 2005, with the same actual compiler as the commercial version, i think. The libraries are GPL'd, so if you distribute a binary built with it, it has to be GPL'd. So, no Ada 2012, and no way to distribute binaries willy-nilly, but certainly enough to explore the language.

[1] http://libre.adacore.com/tools/gnat-gpl-edition/faq/

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

#137
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 an…

> If you don't enjoy programming in Go, don't do it.

Ordinarily, I would agree; I don't really care what people do when writing application code. The way it's filtered into devops tooling makes the choices of Go peoplea problem for me, though. If I'm going to be stuck with a language with bad error handling and inexpressive typing, I'd rather it be Python or Ruby so at least I can leverage dynamic typing instead of bad static typing.

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

#138

Earlier quoted context omitted.

A concurrent GC running on a single processor machine is still going to pause. There are still other ways to get into situations where an attacker can cause the gc to kick in in ways where you can get information -- find a few CPU-heavy functions that nudge the GC to kick in when and where you want it. Harder, but even a background GC can wiggle into the foreground.

Even a statically compiled program run on a single core machine will pause because of the OS scheduler. Assuming we have a multicore cpu then one core can be dedicated to the GC.

Good you're thinking out the box. That pause might not be a problem, though. The pauses that are a problem when the malicious app can control the timing with an external observer seeing those manipulations. The OS scheduler is usually independent of secret processing. It's just doing it's own thing causing pauses that don't tell you about the secret itself. Theoretically, there could be an esoteric attack in some situation where an OS scheduler would accidentally leak somethinh or be activated to leak something. Not popping into mind righg now, though.

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

#139
post #88
post #4

Earlier quoted context omitted.

They were advised against cgo. In my not so recent experience, it is a huge PITA.

I never understood the idea behind cgo instead of having a proper FFI like Delphi, .NET, Eiffel and so many other languages.

That's probably because of coroutines.

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

#140
post #110
post #99

Earlier quoted context omitted.

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?

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 build a handle based memory management system that everything must go through Safexxxx() versions of everything and then explicitly enforce no other memory access patterns.

If you want to do concurrency, build simple threads with input queues that would just be like channels in Go.

You can use a completely functional actor model in C. Is all this object oriented dangling pointer stuff that is scary, but there really isn't any need for that.

Software pipelines with slab allocation or ring buffers virtually guarantee no leaks and are very scalable and cache friendly.

That would be my personal recommendation.

Post reply on HN