Live data from Hacker News

Tor in a safer language: Network team update from Amsterdam

lists.torproject.org

161–170 of 254 posts

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

#161
post #98

Earlier quoted context omitted.

If any of the developers are reading this, converting the existing C code to SaferCPlusPlus[1] (a memory safe subset of C++) is probably a more expedient solution (if that's what they're looking for). (And speaking of contributing, an automatic translation (assistance) tool is in early development, and could maybe be functional in short order with a little extra motivated talent... :) [1] shameless plug: https://gith…

I would recommend updating your .gitignore for VS2015. The .vs directory and *.VC.db should both be excluded from the repo.

Thanks. I'll take all the git/github advice I can get. :)

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

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

No matter how smart you are (or think you are), or how much state you can store in your head at once, if you remove some of the mental overhead of a language, then you have more time to think about other things. It's not about people needing to "dumb down" anything, it's about having a bit less mental overhead, meaning you can get a bit more done a bit easier.

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

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

Unless you're one of the people (like me) who considers its lack of many of those things a feature. More features doesn't necessarily make something "better" and less features doesn't necessarily make it "worse" (whatever your definition of "better" or "worse").

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

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

What parentheses?

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

#166
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++.

You can't say that definitively based on that code. It could very well be C code. There's nothing there syntactically that a straight C compiler would barf on.

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

#167
post #96

Earlier quoted context omitted.

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.

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 will bit-rot than the comparable python script, thanks to at least some types.

This is why the SREs seem to be fans, e.g. https://talks.golang.org/2013/go-sreops.slide#1

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

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

You can do all of these things in C - but at the point that you're enforcing use of your Safexxxx() functions, you've already given up on the industry standard. You can't use the normal OS libraries; you've got to route everything through your special functions.

The advantage of Rust is, honestly, that it has a community of people who are excited to do this sort of work in a language. At least 50% of the advantage of any particular language is not the benefits of the language directly, but the community around it (that derives indirectly from the benefits of the language, but also from marketing and other things). Some time ago I needed to write bindings to SCM_RIGHTS / CMSG_*, which is probably the trickiest part of the libc API (all of cmsg(3) is macros that do stupid things with casts). It was annoying, but it led to a better interface than C itself offers, and someone else found a bug in the OS X handling. I couldn't expect that if I were working on my own custom reimplementation of libc.

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

#170

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…

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

Well I could make the same complaints about how ruby has "filtered into devops tooling." If I never see another quasi-DSL that's really just a cute set of ill-specified ruby methods I will die happy.
Post reply on HN