News for hackers. Stuff that matters.
Re:How we rolled out one of the largest Python 3 migrations by rawoke083600 on Tuesday September 25, 2018 @03:31PM (#18069692)
I would have thought that Go would be perfect for this sort of system-level-like programming ?
Re:How we rolled out one of the largest Python 3 migrations by rrdharan on Tuesday September 25, 2018 @07:46PM (#18071520)
Dropbox uses Go (https://github.com/dropbox/godropbox), Rust (e.g. https://github.com/dropbox/rust-brotli) and Python on the server-side, and both Rust (https://github.com/dropbox/finderinfo-rust) and Python on the client-side.

As other commenters have noted, a lot of their Python use for large scale systems was an artifact of history and available choices at the time, but from my experience during my time there and following as an outside observer since leaving, they seem to make reasonable infrastructure and language decisions for their core product.

Re:How we rolled out one of the largest Python 3 migrations by mrgordon on Tuesday September 25, 2018 @03:54PM (#18069915)
Go wasn't created until 2009 and Dropbox already had tons of Python code by then as well as extremely accomplished Python programmers (they hired the creator of Python only a few years later). I also don't think Go would have allowed the tight integration with, for example, OS X where Dropbox actually superimposes their icons onto your Finder icons. As far as I understand, it was only because of smart programming and use of OS X's Python / Ruby bridge functionality that they were able to do it.
Re:How we rolled out one of the largest Python 3 migrations by Longhanks on Tuesday September 25, 2018 @04:35PM (#18070269)
There’s an official API since 2014 (Yosemite): https://developer.apple.com/library/archive/documentation/Ge...
Re:How we rolled out one of the largest Python 3 migrations by NegativeLatency on Tuesday September 25, 2018 @07:04PM (#18071304)
Dropbox predates that api though. They used to hack into Finder.app's api IIRC.
Re:How we rolled out one of the largest Python 3 migrations by Longhanks on Wednesday September 26, 2018 @02:44AM (#18073316)
Which is part of why that extension point was introduced :)

https://twitter.com/nickjshearer/status/608833134902140928

Re:How we rolled out one of the largest Python 3 migrations by kenhwang on Tuesday September 25, 2018 @03:39PM (#18069777)
Looks like they already have Rust/C++/obj-c in use, which all fill that purpose a bit better than Go would.
Re:How we rolled out one of the largest Python 3 migrations by crdoconnor on Tuesday September 25, 2018 @04:42PM (#18070304)
Go code is about ~30% more verbose than equivalent python.
Re:How we rolled out one of the largest Python 3 migrations by melling on Tuesday September 25, 2018 @06:10PM (#18070970)
How much faster is Go? Memory usage?

It has to be less demanding on your laptop battery, for example.

Re:How we rolled out one of the largest Python 3 migrations by oofabz on Tuesday September 25, 2018 @10:19PM (#18072186)
Performance depends very much on what you are doing. Native Python code is much slower than Go, but Python code execution is not the bottleneck in many Python programs. NumPy may be faster than Go and disk IO is the same speed in each.
Re:How we rolled out one of the largest Python 3 migrations by BuckRogers on Wednesday September 26, 2018 @01:19AM (#18072967)
Go performance would be next tier from Python but memory usage a little less so. The Go team has made great strides in that regard from what it was. The runtime is always getting better, and it's fun to watch.

Rust or native platform (Swift/C# .Net Native, depending) are going to be even more ideal for battery usage.

Proper algorithmic choices are even more important and paramount no matter what is used. It goes without saying that poorly implemented Rust can be bested by well implemented Python.

Re:How we rolled out one of the largest Python 3 migrations by azhenley on Tuesday September 25, 2018 @05:37PM (#18070715)
Wow, I wouldn't have expected that. Do you have a reference for the 30%? I'd like to see what is going on to cause that big of a difference.
Re:How we rolled out one of the largest Python 3 migrations by SEJeff on Tuesday September 25, 2018 @05:42PM (#18070751)
Every other 5 lines being the equiv of:

    if err != nil {
        ... error handling ...
    }
Python just uses exceptions, and they bubble up. No need for this excessively verbose error checking.
Re:How we rolled out one of the largest Python 3 migrations by SEJeff on Tuesday September 25, 2018 @05:55PM (#18070842)
I'm not sure why it is downvoted. This is true. I write both Golang and Python as part of my day job. I love both languages, but this is definitely the truth.

Go is more verbose. It also gives you the wonder of the compiler telling you about doing stupid things. That doesn't make it a worse language.

Re:How we rolled out one of the largest Python 3 migrations by samfisher83 on Tuesday September 25, 2018 @06:42PM (#18071170)
Does go not have exception handling?
Re:How we rolled out one of the largest Python 3 migrations by SEJeff on Wednesday September 26, 2018 @11:03AM (#18076642)
Go does not have exception handling at all. It is a proposal they're seriously considering for go2:

https://go.googlesource.com/proposal/+/master/design/go2draf...

See the bits about error handling and error values.

Re:How we rolled out one of the largest Python 3 migrations by samfisher83 on Thursday September 27, 2018 @10:15AM (#18084655)
What was the reason the go designers didn't have exception handling?
Re:How we rolled out one of the largest Python 3 migrations by SEJeff on Thursday September 27, 2018 @11:53PM (#18090919)
Read Rob Pike's post on why: https://commandcenter.blogspot.com/2012/06/less-is-exponenti...

The go2 proposal shows that in this respect, he was woefully wrong.

Re:How we rolled out one of the largest Python 3 migrations by lacksconfidence on Tuesday September 25, 2018 @06:56PM (#18071255)
go has something in the same general area of error handling called panic/recover. It's not exceptions in the normal sense, and devs expect nothing should panic across api boundaries.
Re:How we rolled out one of the largest Python 3 migrations by ChrisSD on Tuesday September 25, 2018 @06:40PM (#18071161)
Go isn't good at the system level. I.e. calls to C APIs are expensive, etc.
Re:How we rolled out one of the largest Python 3 migrations by JustSomeNobody on Tuesday September 25, 2018 @09:33PM (#18071974)
Wait, I thought Go was designed as a system language.
Re:How we rolled out one of the largest Python 3 migrations by xapata on Tuesday September 25, 2018 @10:02PM (#18072110)
Go was designed for concurrency (and the docs take care to distinguish that from parallelism), fast compilation, and easy deployment.
Re:How we rolled out one of the largest Python 3 migrations by floatboth on Wednesday September 26, 2018 @05:47AM (#18074323)
Only in the Google sense i.e. "for building big systems… like servers". Not as in "close to your operating system" or "you should write an operating system in it".
Re:How we rolled out one of the largest Python 3 migrations by bdr on Wednesday September 26, 2018 @01:10AM (#18072936)
Why are people downvoting this? It’s a fine question to ask. I think people have been downvoting questions more lately, and it’s unfortunate.
Re:How we rolled out one of the largest Python 3 migrations by rawoke083600 on Wednesday September 26, 2018 @04:13AM (#18073834)
So much downvoting for a honest question :/
Re:How we rolled out one of the largest Python 3 migrations by kryptiskt on Wednesday September 26, 2018 @06:13AM (#18074455)
There are few comments worser on HN than "why didn't you implement in [rival language]?" as if [rival language] was a default choice that could only be deviated from if it was extensively motivated.

The claim that Go is "perfect" doesn't make things better.

Re:How we rolled out one of the largest Python 3 migrations by basic1 on Tuesday September 25, 2018 @03:50PM (#18069889)
Go wasn't a thing in 2007.