Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
NateDad
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
27 ms
·
241.
▲
by
NateDad
12y ago
manual error checks are no more complicated than any other code that branches. Implicitly fulfilled interfaces make it trivial to decouple code, because I can pass a type to a function in a different package, and that package doesn't e
242.
▲
by
NateDad
12y ago
an example from https://www.spacemonkey.com/blog/posts/go-space-monkey - we decided to transliterate our 90k lines of Python directly to Go, line by line The 90K number includes our tests, but without tests, the
243.
▲
by
NateDad
12y ago
Most of those programs are trivially small, and often consist mostly of transformative loops. Yes, go will be worse than python for that. But in a real project, the difference will be minimal, a few percent, which will be lost in the noise
244.
▲
by
NateDad
12y ago
It's not about the language or expressions. He just isn't very familiar with the standard library. His code was not unclear or overly verbose... it just didn't use libraries to replace most of his code. So, yes, it was excee
245.
▲
by
NateDad
12y ago
The blog post is only three years old, and the problems it brings up are basic language problems. Has the language really changed that much in three years? And if so, wouldn't that leave all the existing projects out in the cold? Seri
246.
▲
by
NateDad
12y ago
Go uses a lot less memory than java in general (generally due to having real value types and usable pointers). Go has clean multi-threaded code baked into the language. Go requires no external runtime, so you never have to worry about what
247.
▲
by
NateDad
12y ago
You assume that Go's simplicity means you end up copying and pasting a lot of code. This is just not the case. In juju ( https://github.com/juju/juju ), a ~300kloc project, we have approximately one single type tha
248.
▲
by
NateDad
12y ago
The type system is a concern about the complexity for the users of Go, not for the compiler developers.
249.
▲
by
NateDad
12y ago
It's actually very simple code, if you're at all familiar with go. That's probably what I would have written just by sitting down at the computer to do so for work.
250.
▲
by
NateDad
12y ago
Go is not significantly more verbose than python except in a couple trivial cases (list comprehensions become a 3 line loop). Across even a moderately sized program, this will most likely not even amount for a statistically significant dif
251.
▲
by
NateDad
12y ago
For anything larger than a trivial program, go is no more verbose than python. For small programs, there's too much variance to really say what language is less verbose, because you can always hit cases where one language has somethin
252.
▲
by
NateDad
12y ago
No one has ever said that the compiler implementation would be too hard, and that's why there's no generics in go. People need to stop saying that, because it's bullshit.
253.
▲
by
NateDad
12y ago
Yep, that's what I would have written.
254.
▲
by
NateDad
12y ago
Use io.Copy to copy from the file to os.Stdout. no need to read the whole thing into memory.
255.
▲
by
NateDad
12y ago
On my phone, but his examples just show that he's new to Go. He's using like 5x add much code as he needs to.
256.
▲
by
NateDad
12y ago
Do you really think people who get $12,000 a year aren't going to work? It's not about replacing income. It's about supplementing it. Everyone will still work. They'll just have $12,000 more with which to buy food, cl
257.
▲
by
NateDad
12y ago
There's this thing called ux... John's program has a nice one, diff and curl and bash (used together in the way indicated here) have a terrible one.
258.
▲
by
NateDad
12y ago
why the makefile and src directory? Why not put the source in the root directory, so that go get github.com/jgrahamc/httpdiff would just work? The makefile doesn't even do anything useful, and just makes it so that poor win
259.
▲
by
NateDad
12y ago
Wrong title... Should say "giving formula reduces IQ"
260.
▲
by
NateDad
12y ago
This. Getting well-known by other pythonistas is very valuable. How you get that recognition doesn't really matter. Stack overflow, a popular blog, contributions on the mailing list, working on a lot of open source projects, etc... P
261.
▲
by
NateDad
12y ago
What's wrong with the Dell XPS 15 as a linux macbook? I've seen the two side by side and they're practically identical. The only problem is battery life, and I suspect that's mainly a software problem at this point, no
262.
▲
by
NateDad
12y ago
As others have said, part of your paycheck goes to "unemployment insurance". It's not a handout. You're paying for it.
263.
▲
by
NateDad
12y ago
Just to clarify.... it's retroactive for 60 days. That means you don't really have to do anything for the first 45-ish, and if you don't need insurance in that time, and you get a new job, you're done. If you do need i
264.
▲
by
NateDad
12y ago
Uh, have you been on unemployment? There's a max. In Massachusetts it's $698 / week (with no taxes taken out). That would only barely cover my mortgage, let alone car payment, food, health insurance, etc. And yes, people
265.
▲
by
NateDad
12y ago
It's type safe and there's little performance hit. Please note that the "Interface" there is not "interface{}" ... it is a somewhat unfortunately named interface: http://golang.org/pkg/s
266.
▲
by
NateDad
12y ago
http://golang.org/pkg/sort/#Sort So, something like that? Interfaces, man. They're better than you think.
267.
▲
by
NateDad
12y ago
Uh yes? This is you telling the compiler specifically that you don't care about the error. It's equivalent to try { foo() catch {} In other languages. That's not a problem, that's the computer doin
268.
▲
by
NateDad
12y ago
He and Rob Pike have written a few books together, that's likely the main connection. I follow the Go community fairly closely and hadn't heard of Kernighan in connection with Go, but he may also not be advertising his use of it.
269.
▲
by
NateDad
12y ago
Good for you. I upvoted this reply. We need more humor in the world, and someone who can take a joke deserves the upvote.
270.
▲
by
NateDad
12y ago
That's not really what Go is for. Look at Rust if that's what you want - memory safety without a garbage collector.
More ›