Live data from Hacker News

Tor in a safer language: Network team update from Amsterdam

lists.torproject.org

181–190 of 254 posts

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

#181
Rust is almost always going to win for any projects that take a 'gradually replace' approach, simply because it can interact so easily with C code in both directions (i.e. C calling Rust and Rust calling C) in a way that other languages can't, or can't without significant efforts/hassle.

The Rust team showed great foresight for bringing about those changes before the initial 1.0 release and it will pay off in spades.

It's a key step in removing barriers to entry:

https://www.joelonsoftware.com/2000/06/03/strategy-letter-ii...

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

#182

Earlier quoted context omitted.

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.

I'd be cool with whitelisting a couple of URLs, such as netflix.com. Or google, hacker news, whatever. Who cares if comcast sells the fact that I use a service everyone uses?

I really just want things that I access in Private Browsing, or using a service other than http/https, not to be recorded.

I understand that people in various countries want to use the Netflix from another country. But I'm representing the 99%.

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

#183

Earlier quoted context omitted.

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.

I like it. My brain's already pretty full with trying to get a ML pipeline optimized and launchable, and if I need to write something to read a CSV file, make some RPC calls to a service for each row, and dump the results to a file, go just works. Sure, I could use something like Haskell, but then I'd have to worry about whether I'm accumulating a giant stack of thunks that'll blow up. go just works, and less of it w…

trying to get a ML pipeline optimized

I wrote some machine learning tools in Go and the experience is quite bad. The lack of operator overloading and parametric polymorphism make most ML code ugly. It also does not help that Go's compiler backend does not optimize very strongly and calling out to C comes with a relatively large overhead.

Sure, I could use something like Haskell, but then I'd have to worry about whether I'm accumulating a giant stack of thunks that'll blow up.

There are many languages between Go and Haskell that are productive and provide a sufficiently strong type system.

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

#184
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

I guess the main question about this product (which is the sort of thing I'd buy -- an hour of saved effort pays for it) is how can I trust you to be less evil than Comcast?

I guess if you're open-source and a lot of people are paying attention, that would do it.

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

#185
post #156

Earlier quoted context omitted.

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

Yea, advanced language like Java should have advanced build tools and build files. Go is simplistic so `go build|install|run` just works without IDEs, build files, and external build tools.

Well, yes, if you include the build tool in with your language implementation you do not need external build tools.

Compiling most Java projects is usually as simple as 'brew install maven; mvn package'. Maven does require a build file, but it can also do more than the go utility, such as deploying artifacts in a repository, build distributable tarballs, RPMs, debs, etc.

Maven, like go, largely relies on convention over configuration as well. If you generate a POM file from the standard archetype, you basically drop your files in the right source directory and it will build.

(I am not a fan of Java, but I think a lot of the criticism here is lazy. The first time you use the 'go' tool you have to learn its usage as well: how to separate library code from programs, what are the conventions for package structure, how to avoid API breakage for downstream users, etc.)

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

#186
post #158
post #106

Earlier quoted context omitted.

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…

> This is C obviously No, that's C++.

It could be C if `_array` is an array of

  struct {
          int check;
          int (*base)(void);
  };

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

#187

Earlier quoted context omitted.

So, Java?

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

In Java it is string.endsWith(...), not much different.

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

#188
post #45

Earlier quoted context omitted.

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.

Galois, Facebook and Microsoft are some examples, and all ML derived languages tend to be used for data modelling in the financial sector.

https://wiki.haskell.org/Haskell_in_industry

https://ocaml.org/learn/companies.html

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

#189

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

(1) Better explanations about how to live without heap allocations or how to use them effectively in Ada. It feels like unchecked_deallocate is wrong, but then I don't really see explanations about what programmers should do instead. (2) Compiler and runtime licenses. I always feel like the version of Ada I get is either somehow not the "best" one or has some lingering license issue with the runtime library. I don't…

I advise you to watch this presentation.

"Memory Management with Ada 2012"

https://archive.fosdem.org/2016/schedule/event/ada_memory/

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

#190
post #63

Earlier quoted context omitted.

It's still absolutely terrible in terms of ergonomics. You're forced to perform manual memory management, etc. I've done it a few times and I absolutely don't recommend it.

Finalizers help with memory management in the simple cases.

But C code may not keep a Go pointer that persists between calls (because GC). I can imagine that this is a problem for gradually converting code bases.
Post reply on HN