Submission timeline
2007–2026One slot for every year since HN launched. Height is that year's peak points; orange marks a 100+ point or 50+ comment breakout. Select a bar to open its strongest thread.
First comments on top threads
HN comment orderI'm pushing the definition of "one liner" here, and it's got some major shortcomings (including directory traversal!), but here's one with Gnu awk: gawk '@load "filefuncs";func send(s,e,d,t,b) {;print "HTTP/1.0 "s" "e|&S;print "Content-Length: "b|&S;print"Content-Type: "t|&S;print d|&S;close(S);}func mt(f) {;c = "file -b --mime-type " f;r="";while ((c|getline z)>0) {;r=r z;} ;close(c);return r;} ;BEGIN {RS=ORS="\r\n";while(1){;S="/inet/tcp/8080/0/0";while((S|&getline l)>0) {;split(l,f,"…
The ruby one with the -run option is a bit nonintuitive in how it works. $ ruby -run -ehttpd . -p8000 The -r option requires un.rb[1] which is a file full of convenience functions, such as httpd in this example. Classic Ruby. Given that go has popularized long args with a single hyphen (-name etc), it is easy to mistake -run as an option by itself. [1] https://github.com/ruby/ruby/blob/master/lib/un.rb#L323
Just notice the difference between python2 and python3 simple http server $ python -m SimpleHTTPServer 8000 $ python3 -m http.server 8000 Even the python3 is nicer to read, I really like that they package the server in a module. It's almost twice as slower in my machine. Python2 Benchmark Requests per second: 606.03 [#/sec] (mean) Time per request: 8.250 [ms] (mean) Time per request: 1.650 [ms] (mean, across all concurrent requests) Transfer rate: 4412.05 [Kbytes/sec] received And Python3 Benchmark Requests…
The first top-level comment from each of the four biggest threads, in HN’s own order. Excerpts are shortened; open a comment for full context.
- Breakout years
- 2
- Total points
- 610
- Total comments
- 165
100+ points or 50+ comments
reference only — not used in Hall rules or ranking
reference only — not used in Hall rules or ranking
Every submission
| Date | Title as submitted | By | Points | Comments |
|---|---|---|---|---|
| 2013-06-06 | List of ad hoc http server one-liners | willurd | 2 | 0 |
| 2014-05-02 | List of one-liner HTTP static servers | jingwen | 2 | 0 |
| 2014-06-22 | Big list of http static server one-liners | soupdiver | 33 | 4 |
| 2015-03-29 | List of HTTPD one-liners | yskchu | 1 | 0 |
| 2016-05-03 | Big list of http static servers one-liners | jondot | 1 | 0 |
| 2019-12-03 | One-line web servers – a long list | dc352 | 3 | 0 |
| 2020-01-18 | HTTP static server one-linersFirst breakout · Best thread | known | 286 | 66 |
| 2021-05-13 | Big list of HTTP static server one-linersLatest 20+ point return | raytracer | 282 | 95 |
