Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
zenazn
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
1.
▲
Interface Upgrades in Go
(avtok.com)
174 points
by
zenazn
12y ago
|
40 comments
2.
▲
by
zenazn
12y ago
If Go supported method overloading, you could actually write the types of those functions out. The first one is either a string or a regexp.Regexp, and the second one is one of four variations on an http.Handler, giving a total of 8 varieti
3.
▲
by
zenazn
12y ago
Huh. I'm not sure I saw that particular project during my search. It looks neat! Without having looked in detail at httprouter, I think the most obvious reason it might not be sufficient is that it doesn't support regular expressi
4.
▲
by
zenazn
12y ago
Yeah, this is a good question, and the unfortunate answer is that it was an engineering tradeoff. I wrote a pretty long reply to cypriss ( https://news.ycombinator.com/item?id=7632956 ) which I think covers this.
5.
▲
by
zenazn
12y ago
Yeah, I looked at gocraft/web for a long time before writing Goji. It's a good library, and I think it does a lot of things right. But at the end of the day, just like my disagreement with Martini, this comes down to a difference
6.
▲
by
zenazn
12y ago
Static files: http://golang.org/pkg/net/http/#FileServer Logging: http://golang.org/pkg/log/ Panic recovery: https://godoc.org/github.com/zenazn/goji/
7.
▲
by
zenazn
12y ago
This was not the feedback I was expecting, but thank you :) It was based on my terminal color scheme (named "Solarized Darcula"—not sure where I found it) and the way vim happens to color my Go code.
8.
▲
by
zenazn
12y ago
Actually, Goji grew out of a single deficiency in "pat": the fact that it does not have a standard way of defining request context. The big use case here is how you'd write a middleware that did authentication (using API keys
9.
▲
by
zenazn
12y ago
To be perfectly honest, I'm not sure it is better (I was hoping you would help me decide that!), and I wrote it mostly because every aspiring programmer writes a web framework at some point, and it was time I wrote mine (it was a lot o
10.
▲
Goji: a web microframework for Go
(goji.io)
239 points
by
zenazn
12y ago
|
86 comments
11.
▲
by
zenazn
13y ago
Blackboard isn't all bad—fixing many of its inadequacies was one of my first big side projects in high school. There was one Blackboard dashboard unit that allowed you to embed arbitrary HTML, and I injected some JS onto the page that
12.
▲
by
zenazn
14y ago
Randomized routing isn't all bad. In fact, if Heroku were to switch from purely random routing to minimum-of-two random routing, they'd perform asymptotically better [1]. [1]: http://www.eecs.harvard.edu/~michaelm/postscripts/mythesis.p...
13.
▲
by
zenazn
14y ago
Harvard is seeing a very similar trend. Our intro to CS course, CS 50 [1], had an enrollment of over 600 this Fall (up about 20%), making it one of the largest classes at the College [2]. Even its teaching staff, which numbers over 100, is
14.
▲
by
zenazn
14y ago
Pretty cool, but there are a couple injection vulnerabilities when you make the cert.
15.
▲
by
zenazn
14y ago
...or you could request all your resources over SSL.
16.
▲
by
zenazn
15y ago
Facebook translations are crowdsourced. Doesn't excuse this particular case, but don't assume it was anything malicious on Facebook's part.