Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
joeshaw
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
10 ms
·
1.
▲
by
joeshaw
2y ago
This is a contrived example, but imagine a situation where I have a file I want to write on disk and then have a reference to it in a database. If I have a flow like: func UpdateUser(user *User) (err error) { f, err := os.Cre
2.
▲
by
joeshaw
2y ago
OP here. I appreciate the comments I've read here, and it might inspire a new blog post: "Defer is for resource cleanup, not error handling."
3.
▲
by
joeshaw
2y ago
OP here. Another commenter pointed out that `errors.Join` didn't exist when I wrote this, but I wouldn't have changed my guidance if it had. The core issue here is that you want to deal with errors as soon as possible. The async
4.
▲
by
joeshaw
2y ago
I caution against this approach, as you are not really dealing with the error when it occurs. If the work you do after the defer has other side effects, you may have just gotten your application into an inconsistent state and it's ver
5.
▲
by
joeshaw
9y ago
I'm fine with vendoring going away as long as we can check these new modules into version control and have vgo use them. Adding a caching proxy adds too much infrastructure for most folks, and without it you can't have reproducib
6.
▲
by
joeshaw
9y ago
In net/http, if a handler panics you don't want it to bring down your entire application. For more info, see https://golang.org/pkg/net/http/#Handler The encoding/json package is interesting b
7.
▲
by
joeshaw
9y ago
> I think there are plans to make an official debugger it just hasn't been prioritized. There was a nascent project inside the Go team a couple of years ago (called ergo I think?) but I believe it was shelved in favor of Delve, whic
8.
▲
by
joeshaw
9y ago
My explanation for why is the following sentence: > If a function could fail, the function must return an error as its last return value. The caller should immediately check for errors from that function. In practice, in idiomatic code i
9.
▲
by
joeshaw
10y ago
All Fastly customers that use it to terminate SSL/TLS are also affected. Among them are Wired and Buzzfeed (ones I've run into this morning).
10.
▲
by
joeshaw
10y ago
Mono was started by Miguel at Ximian, and most of the Mono code was owned by Ximian. Ximian was bought by Novell and with it, all the Ximian-owned Mono code. (I don't remember if a CLA was required before or after Novell bought Ximia
11.
▲
by
joeshaw
11y ago
On a related note, there are an alarmingly large number of hosts listening on port 23 (unencrypted telnet) on the internet: https://www.shodan.io/search?query=port%3A23 Most of them seem to be interfaces to network switches
12.
▲
by
joeshaw
11y ago
I'm one of the developers of http://imagefly.io . We are still very much active and doing development on the service. We have paying customers and our own photo products depend heavily on the service. We clearly need to up
13.
▲
by
joeshaw
11y ago
It may correct itself as you zoom in. It seems to group geographic areas together in somewhat centralized locations to avoid having too many bubbles at a particular zoom level. If you zoom in on the east coast of the US, for instance, jobs
14.
▲
by
joeshaw
11y ago
The app doesn't matter anymore. Twitter is the app now (and whomever else they license their points-of-interest service to). Consumers of their service likely feed back check-in-equivalent data to foursquare, which allows them to do
15.
▲
by
joeshaw
11y ago
The app isn't the product. The points-of-interest database they built from their apps' users is the product. And that is what they're now selling to companies like Twitter. Twitter's incorporation of the POI will give
16.
▲
by
joeshaw
11y ago
Yes! I can't believe that nobody else has made this point. I am as disappointed in the pivot of the app as everyone else, but it's hardly the sign of impending death the post (and many of these comments) make it out to be. 4sq bu
17.
▲
by
joeshaw
12y ago
I'm not sure what the market is like in Cleveland, but in Columbus there is a great demand for web developers. I work out of a coworking place there with several freelance web developers and I'd be happy to put you in touch with t
18.
▲
by
joeshaw
12y ago
Use `goimports` as a save hook in your editor. It analyzes your code and inserts/removes import lines as needed. Other than the occasional need to fix up an ambiguous import that it guessed incorrectly, I haven't touched import l
19.
▲
by
joeshaw
12y ago
The DHCP attack vector is the one that is scariest to me. We know that dhclient on Linux is vulnerable, but the number of unpatched Linux machines on a public wifi network will likely be too small to be worthwhile to try to capture. Macs
20.
▲
How not to pitch a billionaire
(hearstartup.com)
5 points
by
joeshaw
12y ago
|
0 comments
21.
▲
by
joeshaw
12y ago
It appears so. Probably worth filing a bug about this, but I suspect that something about mosh's terminal emulation filters out the VT100 command sequences tmux uses to perform the handshake with iTerm2. Details on the protocol are he
22.
▲
by
joeshaw
12y ago
The issue I've always had with the tmux integration is that it doesn't support multiple sessions simultaneously. I am typically moshed into several hosts and running tmux on each of them. I'd love to have one window per ses
23.
▲
by
joeshaw
12y ago
I posted a comment about this to the blog, but I released a tool which will generate type-specific source code from a generic definition. Code is at https://github.com/joeshaw/gengen The abs example could be reduced t
24.
▲
I am the CADT; and advice on NEEDINFOing old bugs en masse
(lu.is)
3 points
by
joeshaw
12y ago
|
0 comments
25.
▲
by
joeshaw
12y ago
A colleague of mine recently wrote a post about automating an Nginx reverse proxy for Docker containers: http://jasonwilder.com/blog/2014/03/25/automated-nginx-rever...
26.
▲
Automated Nginx Reverse Proxy for Docker
(jasonwilder.com)
4 points
by
joeshaw
12y ago
|
0 comments
27.
▲
by
joeshaw
13y ago
> Your device is doing the equivalent of standing on the street corner and screaming various things. Except there's one huge difference: anyone with eyes and ears can understand what the person is screaming. I would wager that even
28.
▲
by
joeshaw
13y ago
mosh + tmux are simply amazing together. It has radically improved my life, where I keep persistent connections from my laptop to various remote machines.
29.
▲
by
joeshaw
13y ago
The one downside to tmux over screen is that tmux basically requires that all clients connecting to it have the same screen size, and by default it chooses the smallest one. So while you can connect to an existing session, the output might
30.
▲
by
joeshaw
13y ago
Here's a good blog post describing how to use the "Send Hex Codes" for integrating tmux and iTerm: http://tangledhelix.com/blog/2012/04/28/iterm2-keymaps-for-t...
More ›