Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
zemo
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
63 ms
·
661.
▲
by
zemo
13y ago
you could, but it's not very clear why you would want this to be multithreaded to begin with, since it appears the author wants the program to quit as soon as the value fails validation. It looks like it's multithreaded just for
662.
▲
by
zemo
13y ago
there are first class functions, and closures work the way you would expect. Since it's statically typed and there are no generics, there's no way to implement something like a left fold; you'd have to implement it on a per-
663.
▲
by
zemo
13y ago
yeah, to be honest, it may have been eggregious of me to call how I did it idiomatic. There's a lot we just don't have idioms for. Anyway, callback chains tend to be uncommon; that's just one way to avoid it. There's
664.
▲
by
zemo
13y ago
You don't see it because it's not really idiomatic Go code. Another way to do this would be to define a type that is a function type, and then to put a method on that function type. Yes, functions can have methods in Go. This s
665.
▲
by
zemo
13y ago
web programming is not the entirety of programming. They're making virtual reality actually happen, and you're effectively complaining that a poster fell down.
666.
▲
by
zemo
13y ago
if I ever saw this in a project, I would remove those comments in a heartbeat. The behavior here is specific to the json parser. JavaScript is not the entirety of programming. It does break the json parser in the Go standard library, in a
667.
▲
by
zemo
13y ago
on the internet, it seems that there is a lack of appreciation for having a single way of doing things, but in the real world... it doesn't really same to be the case. The appreciation is there, it's just not as vocal, because it
668.
▲
by
zemo
13y ago
>range does not work with user-defined types at all that's close to true but not strictly true, since you can define your own types using slices, maps and channels. The reason you would do that is that by defining your own type, yo
669.
▲
Show HN: annotated drum machine for the Novation Launchpad, in Chuck
(orel.li)
3 points
by
zemo
13y ago
|
0 comments
670.
▲
by
zemo
13y ago
>I think the interface solution would require setters and getters for every single field not if you use struct tags. e.g., type MyController struct { Id int `revel.q="id,required=true,min=0,max=200"` } or
671.
▲
by
zemo
13y ago
if you anonymously embed a structure, the containing structure gets its methods. If the contained structure satisfies an interface, then the containing structure does as well. Attempting to create inheritance features is ignoring the natur
672.
▲
by
zemo
13y ago
>A Controller is any type that embeds revel.Controller (directly or indirectly). revel.Controller must be embedded as the first type in your struct (-‸ლ)
673.
▲
by
zemo
13y ago
the only thing that sucks more than pair programming is bullshit research papers penned by condescending egotists.
674.
▲
by
zemo
13y ago
showing off that your language has features that Go doesn't have is kinda missing the point of Go. Half of the reason that people like Go is how few features it has; not how many.
675.
▲
by
zemo
13y ago
>Exceptions can be thrown into the generator using the Generator::throw() method. >Rewinding a generator ...wut
676.
▲
by
zemo
13y ago
"Know for a fact that there's no machine observer" Using a hashtag, for a lot of people, isn't a deliberate indicator to effect a specific machine state at present time; it's an indicator that machine action may t
677.
▲
by
zemo
13y ago
"Machine masters" is a bit strong, IMHO. Hashtag use is strictly opt-in. Using a hashtag isn't about machines having power over humans, or humans having power over machines; it is about the harmony of human and machine lang
678.
▲
by
zemo
13y ago
hashtags allow the user to describe to the machine how to categorize a piece of text. So, for example, "I just stepped in shit. #winning" is a way for a user to have the sentence "I just stepped in shit" categorized in
679.
▲
by
zemo
13y ago
it's not English language that's changing, it's human language. Hashtags represent the implicit knowledge within human communication that there is a machine observer present. Hashtags are how humans help to guide machines t
680.
▲
by
zemo
13y ago
honestly, I don't know. I know Go does concurrency well and I like it, the only reason I said it was equivalent or better was to avoid a flamewar. I've never even used Erlang.
681.
▲
by
zemo
13y ago
The type system in Go is as important as the concurrency system. Sure, Erlang can do concurrency as well as (or better than) Go, but it doesn't have the type safety that Go offers.
682.
▲
by
zemo
13y ago
“There are maybe 100 million Web sites out there – that is not many, when you consider that there are billions of people,” considering that the vast majority of people just need a listing on an existing network, that's a completely pointles
683.
▲
by
zemo
14y ago
there is none, just like there is none in Python. PyGame is not a standard library package. Did you install PyGame by hand, or did you use their installer? Internally, it actually has a lot of moving parts; not only does Go not have Py
684.
▲
by
zemo
14y ago
this isn't at all about defending men's rights to have a site like lulu, it's about saying lulu is bullshit and we should call a spade a spade. It's not saying that sexism is OK or defending sexism against women, what it's saying is that y
685.
▲
by
zemo
14y ago
because it was consistently communicated that int is currently 32 bits wide but that it would be changing to be architecture-specific; this has been a planned change for a very long time. It has always been the case that if you needed widt
686.
▲
by
zemo
14y ago
this is a really, really interesting critique of why the current idea of trees on buildings is wrong, but it's a bit short-sighted in that it just says "stop". The next logical step in this is to contemplate how a rooftop environment would
687.
▲
by
zemo
14y ago
we use whatever `go fmt` outputs (which, yes, happens to be tabs).
688.
▲
by
zemo
14y ago
Gopher here. I'll try my best as to why I chose Go over Scala; this isn't meant to be "why I think Go is better than Scala", it's "how Go kept me interested from zero to gopher, while Scala failed to attract my attention". Scala didn't kee
689.
▲
by
zemo
14y ago
the gofmt tool has a replacement feature: `gofmt -r 'InitialName -> FinalName'`
690.
▲
by
zemo
14y ago
check the memory usage. When I did the comparison, the node server's memory climbed steadily up to about 50MB, while the Go server's memory stabilized at about 17MB.
More ›