Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
zemo
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
80 ms
·
751.
▲
by
zemo
14y ago
I may be mistaken, but I believe type switches in Go address this criticism: type Fruit struct { Name string Species string } // define a method on Fruit structs named Rename func (f *Fruit) Rename(s st
752.
▲
by
zemo
14y ago
the last time he posted this was in response to me, so I'll join the discussion here to avoid duplication. This was his response when I asked for some clarification: >My problem with Go is that it does not have sum-types and pattern-ma
753.
▲
by
zemo
14y ago
...your problem with Go is that it has a boolean type?
754.
▲
by
zemo
14y ago
>type systems that are both usefully strict but also flexible. that's basically the design criteria behind Go's type system.
755.
▲
by
zemo
14y ago
he's using io.Copy in the main websocket handler, which is a generic, buffered routine for manipulating byte buffers. I don't know if the other implementations are buffered in this manner. It's likely that there are ways to improve the Go
756.
▲
by
zemo
14y ago
his reporting is very misleading. If you look at the number of messages and connections, Java only held ~5k connections, while Go held just shy of ~10k. In the same amount of time, Java was only able to facilitate the transmission of half
757.
▲
by
zemo
14y ago
sometimes the truth hurts people's feelings! If they spend 10 or 20 hours making something and it's total shit, don't tell them! If you tell them it's not good, they might fix it! Make sure you tell everyone everything they make is good,
758.
▲
by
zemo
14y ago
complains about the widespread use of Java, but also complains that Go is stupid. Sounds like someone is a bit difficult to please.
759.
▲
by
zemo
14y ago
the article fails to mention the food industry, despite the fact that the French Culinary Institute is very publicly developing food printers. You can imagine how Nabisco will feel when you can download the plans to print out Oreos in your
760.
▲
by
zemo
14y ago
...did you read the article? They clearly state that it's MySQL. The blog itself is called Oracle WTF.
761.
▲
by
zemo
14y ago
the streaming API publishes the tweets as they come in. Afterwards, if the tweet has been deleted, the streaming API sends out a delete message. That's... the only way to do real time. Otherwise it... wouldn't be real time.
762.
▲
by
zemo
14y ago
I'm using it on a fairly substantial web back end for a new mobile startup. I've also used it in the past at hackathons. I'm a big fan, overall.
763.
▲
by
zemo
14y ago
it sounds bad in theory, but in practice it turns out to be quite good. It's actually the opposite; because you know that there's no exceptions, control flow is very obvious. Whether a function does or does not return an error is a part o
764.
▲
by
zemo
14y ago
>You cannot ignore the error return value in Go. that's not true. You can ignore the second parameter by explicitly naming it with an underscore, like this: x, _ := MightFail()
765.
▲
by
zemo
14y ago
in fb camera, if you see someone is tagged, and you tap their name, it switches to the main fb app and shows their profile there. The notion of doing one thing well seems to be preserved.
766.
▲
by
zemo
14y ago
Go has no exceptions. Instead, functions can return multiple values, one of which is an error, and you check the error value on invocation. It's tedious and awful and makes your code very ugly and it's absolutely correct and I love it. I
767.
▲
by
zemo
14y ago
that's not a Django problem; it's a Python problem. Using exceptions for control flow is idiomatic in Python. Case in point: a generator is supposed to raise a StopIteration exception in order to signal termination.
768.
▲
by
zemo
14y ago
it doesn't "compile from a url", the package name is just the url address. You still have a directory of downloaded packages analogous to Python's site-packages, and they don't update unless you explicitly update them. The difference is t
769.
▲
by
zemo
14y ago
they didn't include HN in their writeup, but the bitly folks had a blog post about this topic pretty recently. They looked at posting times for Twitter, FB, and Tumblr. http://blog.bitly.com/post/22663850994/time-is-on-your-side
770.
▲
by
zemo
14y ago
>you need a number but an external datasource might hand you a number or a string containing a number. http://stackoverflow.com/questions/9452897/how-to-decode-jso... the label on the field lets you denote when that will happen, so...
771.
▲
by
zemo
14y ago
No, the model is completely different. In Node, you pass in a callback to establish what should be done following the return of a longrunning I/O operation. In Go, you use goroutines to manage the concurrency. Basically if you say this:
772.
▲
by
zemo
14y ago
If your json doesn't represent something that already follows some known structure, you have an opaque data structure that you have to hand write a parser for in any language.
773.
▲
by
zemo
14y ago
if the repository owners tags a commit with the tag Go1, it is used by Go. If there is no tag to specify which commit, the tip of master is used. In practice, most maintainers just keep master clean and do all development in a dev branch.
774.
▲
by
zemo
14y ago
it looks more like an acid bath for dissolving the support material. It printed out with a white support structure, and in the end they list the volume of support material used for the structure.
775.
▲
by
zemo
15y ago
not sure of specific games, but ngmoco has a Go stack they've open-sourced. They say they use it on their games, but I'm not sure which ones. https://github.com/ngmoco/falcore
776.
▲
by
zemo
15y ago
The Go program allocates a new item on every line instead of allocating a single struct and just passing a pointer into unmarshal, which would be way faster. There's some claim of "doing async style programming" but the Go code doesn't par
777.
▲
by
zemo
15y ago
"gopher" is the preferred demonym.
778.
▲
by
zemo
15y ago
to be honest, I've used both gevent and Go and concurrency is far more natural in Go. Sure, you can do most of what you want with gevent, and if you're using stackless or pypy you can even have channels, but implementing concurrency at the
779.
▲
by
zemo
15y ago
unlike other languages, a framework isn't as much of a requirement in Go since the Go standard library includes an http server, json serialization/deserialization, html templating, email, logging, basically everything you need in a web app.
780.
▲
by
zemo
15y ago
I really wanted to read user-submitted emails they've received from recruiters.
More ›