Live data from Hacker News

Tor in a safer language: Network team update from Amsterdam

lists.torproject.org

151–160 of 254 posts

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

#151

Earlier quoted context omitted.

> 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. You can pick it up in a weekend. A lower entry bar means more people will try it out. > 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. It was developed in a large en…

[I apologize for the absurdly snarky and ranty post, but I'm going to do it anyway:] > You can pick it up in a weekend. A lower entry bar means more people will try it out. ... and then you get the JavaScript situation where everyone thinks they're an actual programmer at $TEAM_LEAD level of sophistication when it comes to modeling, design, architecture, testing and implementation... but they're really not. It's not…

What you described is basically true for any job, and it's more about the culture surrounding the language and particular use case rather than the entry level.

I've seen a lot of people in academia writing C++, mostly horrible code. I've seen electrical engineers writing awful assembly code. Because the incentive is mostly to get one task done today. None of these languages have a lower entry bar.

JavaScript is pretty much bound to a singular use case (web development) where there is a lot of incentive to get quick money, which attracts all kinds of people. I don't see the status quo you're referring would be much different if the browser scripting language was Haskell or brainfuck.

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

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

> ... but I still like the concepts and syntax of Go much better The concept of not having features because someone on your team might use them? You subtly say that Rust is a worse language because it doesn't seem like it was designed in the 80's, when clearly as a language (together with the compiler), it's objectively better than Go.

I did not say that Rust is a worse language. I said I like Go better. I do not know exactly what it is, but I find rust code harder to read (e.g. I do not like the :: operator, which other languages have too).

So this is my personal preference and should not offend any Rust fans. Besides the syntax, which reminds me too much of C++, I think Rust is a very good language. I do not know if it is 'objectively better than Go.'.

Btw. restrictions are not always bad.

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

#153
post #86
post #62

Earlier quoted context omitted.

If you're used to dynamic languages, it gives you type safety and performance for little effort. I love Python but always wished for a simple, type-safe language; Go gives me that. It's not worse than Python IMHO.

Without support for meta-classes, annotations, generators, iterators and list comprehensions it surely is worse.

Goroutines and channels can substitute for generators and iterators, with maybe a downside of being too much more expressive.

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

#154

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 think this is necessarily true, but it's easy to get that impression.

(3) Packaging, libraries, and documentation. Many developers expect a tool like cargo to be available and have access to a wide variety of open-source libraries. They also expect lots of tutorial documentation and blogs.

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

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

I've... never had a problem reading Rust code. It's generally well-typed, and makes good use of "automatic" error handling constructs to ensure errors flow upwards without visually polluting the success case. Whereas with Go code, I have to filter out all the error handling (which often takes up 2/3rds of lines of code, even when it's just "if there's an error, return the error" which it almost always is), wade throu…

My problems with the readability of Rust is related to the syntax and not so much about the code structure. For example, Smalltalk has the most readable syntax I know, while I find it's code structure average.

I know that error handling in Go can be tedious, but to some extent, it is also the programmer's job to utilize the features of the language to write clean code: https://blog.golang.org/errors-are-values

Regarding your type problem I find very few cases where I need an empty interface (mainly container types). Most of the time I use real interfaces and the most code I have seen used non-empty Interfaces too.

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

#156
post #141

Earlier quoted context omitted.

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

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.

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

#157
post #121

Earlier quoted context omitted.

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

Sure, what you say is true but equally so or better for .Net or Java as well, plus they are generally faster and in the case of C# a better language imho. Why not them? You are right, the standard library is a pleasure to work with in Golang and for the most part I trust it, but hey anything you can do in that library is easily reproducible in more or less any other mainstream language. I really don't have an axe to…

I see Go equally fast compare to Java/C# and uses quite a bit less memory.

http://benchmarksgame.alioth.debian.org/u64q/compare.php?lan...

http://benchmarksgame.alioth.debian.org/u64q/go.html

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

#158
post #106

Earlier quoted context omitted.

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…

> This is C obviously

No, that's C++.

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

#159

Earlier quoted context omitted.

IIUC Pike spent most of his career in research right ?

A non commercial University research group and commercial Corporation research group can be focused on solving very different problems. I think Pike and the other designers skew more towards corporate research (Bell Labs). And surely the development of GO as well as other Google research projects are intended to win in the market place.

It's probably useful to look at the goals that the designers of go had when they designed the language. All other discussions seem irrelevant about what go has or doesn't have if it wasn't one of the goals. Pike, et al, weren't interested in solving metaphorically "your" programming language problems. They wanted to solve problems they observed at Google and just happened to open source the resulting language.

From https://talks.golang.org/2012/splash.article > The Go programming language was conceived in late 2007 as an answer to some of the problems we were seeing developing software infrastructure at Google

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

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

I've... never had a problem reading Rust code. It's generally well-typed, and makes good use of "automatic" error handling constructs to ensure errors flow upwards without visually polluting the success case. Whereas with Go code, I have to filter out all the error handling (which often takes up 2/3rds of lines of code, even when it's just "if there's an error, return the error" which it almost always is), wade throu…

It's slightly more tolerable if you do this:

    foo, err := bar()
    if err { return nil, err }
But then the Go community yells at you for daring to not using `go fmt` style.
Post reply on HN