Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
dlsspy
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
5 ms
·
1.
▲
Hacking on the GoPro Plus API
(dustin.sallings.org)
1 points
by
dlsspy
6y ago
|
0 comments
2.
▲
by
dlsspy
13y ago
Should also note that the "arrays are values" thing doesn't actually matter in practice. I've written a wide variety of go code in the last > 4 years and I can only think of two places I've used an array.
3.
▲
by
dlsspy
13y ago
"<-c", regardless of what's on the left side of it will block in every case until there's a messages available in the channel (note that close is a message). I just notice this section has been removed. I'll be
4.
▲
by
dlsspy
13y ago
This is very much false: While this will return immediately: v, ok := <- c
5.
▲
by
dlsspy
13y ago
> Your modified Go server doesn't return "Pong" for "Ping". The program doesn't read the result, so it doesn't matter. Returning Pong isn't harder, but why write all that code if it's going t
6.
▲
by
dlsspy
13y ago
It's not obvious to me what that does. Does that only service one of the 100 clients or one of their 10,000 pings each? Or both?
7.
▲
by
dlsspy
13y ago
Did you consider running the go client against the scala server and vice versa? Also, that's kind of a lot of code. Here's my rewrite of the server: http://play.golang.org/p/hKztKKQf7v It doesn't retur
8.
▲
by
dlsspy
13y ago
We've done a few of them here. Notably: * http://cbgb.io/ * http://dustin.github.io/2012/09/09/seriesly.html * https://github.com/couchbaselabs/sync_gateway cbgb i
9.
▲
by
dlsspy
13y ago
I have no idea what my response was about. As I said, I was pretty sick that day. Sorry you had to type all this stuff to explain to me that I'm a moron. :)
10.
▲
by
dlsspy
13y ago
Then why isn't that the default?
11.
▲
by
dlsspy
13y ago
> but I think "<- true" looks nicer than "<- struct{} {}" And what looks even better: defer close(doneChannel) (it's also syntactically correct -- you ca't just have a defer block without a function invocation)
12.
▲
by
dlsspy
13y ago
Or turning that around, do you think it requires all 8 of my cores to copy data over the network? Do you think the two lines of code + justification text provides sufficient value for this application to distract from the point of it in or
13.
▲
by
dlsspy
13y ago
Here's the version I threw together in (what it says here), 12 minutes: https://gist.github.com/dustin/5478818
14.
▲
by
dlsspy
13y ago
There's so much code here. If I weren't sick, I'd submit a new version that: 1. Didn't reimplement io.Copy 2. Didn't avoid io.TeeReader 3. Didn't do weird things to avoid regular channel ranges. 4. Didn't do non-standard date formatting.
15.
▲
by
dlsspy
13y ago
goroutines are not threads because thread means something and goroutine means something else.
16.
▲
by
dlsspy
14y ago
What else would I use? I've been writing tons of go code for nearly three years now. I get fast, concurrent, parallel code in very little time. I was pretty much production-ready with seriesly in two weeks by myself (though I'm starting t
17.
▲
by
dlsspy
14y ago
This is great feedback. You seem to get what I'm going for. Thoughts on your specific items: 1. I could probably prioritize the query/doc processing and get most of this out of the way, or something like what I've been thinking about for #
18.
▲
by
dlsspy
14y ago
What kinds of advanced things are you wanting to accomplish?
19.
▲
by
dlsspy
14y ago
There are two hard things in computer science. The next blog post I'm planning is related to cache management.
20.
▲
by
dlsspy
14y ago
Whisper (backend for graphite), cube, ganglia... possibly more. I used to build things directly on top of rrdtool, but the schema definition can be a pain when you've got a lot of dynamic data.
21.
▲
by
dlsspy
14y ago
I think there are some good ones. I wrote this because I could get it running faster than I could get the data I've got adapted to existing ones. That doesn't mean they're bad as much as it means I don't understand the data I've got. :)
22.
▲
by
dlsspy
14y ago
BTW, my demo site is running in my bedroom on a slow ARM5-based debian box over my terribly slow DSL. If things get slow, that's why. The web server itself is a homemade http server I wrote in go and jokingly called "nging". Doing a lot of
23.
▲
by
dlsspy
14y ago
The two ways (C90 and C99) you can create a variable length item at the end of a structure in C are invalid C++. You can't express them at all. I work around it by making a one element array and using "sizeof(MyThing) - 1" everywhere when
24.
▲
by
dlsspy
14y ago
go1 has been my goto language for a while now. I don't even understand why, but everything makes a lot of sense. It compiles about as fast as python and I have an easy time making quite efficient code. Concurrency is obviously very good a
25.
▲
by
dlsspy
15y ago
So you have a good trainer and a bad yoga teacher?
26.
▲
by
dlsspy
15y ago
I agree with much of what you've said there. You clearly understand enough that I don't need to go into detail describing why I agree. :) But this isn't quite right: > There is a reason antirez choose Lua and not JS for a scripting l
27.
▲
by
dlsspy
15y ago
That's really annoying. People have a tendency to find a minor feature missing from a tool and rewrite it from scratch in a new language instead of contributing a feature back. Personally, I've never used fetch-manifest.rb (even on my mac)
28.
▲
by
dlsspy
15y ago
The networking stuff is the memcached engine branch. It's pure C and loads ep-engine as a module for doing all the backend junk.
29.
▲
by
dlsspy
15y ago
memcached (binary) protocol for both doc manipulation and "changes" helps performance considerably. We looked at inventing a new protocol to stream stuff in and out faster, but we decided to go with the one we already had. Though the inte
30.
▲
by
dlsspy
15y ago
We have something higher-performance than _changes and have had elasticsearch support as a third-party plugin for a while. We don't have firm plans to bring it in first-class, but we do think it would be beneficial to many of our users.
More ›