Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
acidx
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
31.
▲
by
acidx
8y ago
I like this trick that I use in C. It's limited, as it only matches string prefixes, but it works pretty well in the end: https://tia.mat.br/posts/2018/02/01/more_on_string_switch_in... It allows yo
32.
▲
Show HN: Dali Clock as an infinite animated GIF
(time.lwan.ws)
2 points
by
acidx
8y ago
|
0 comments
33.
▲
by
acidx
8y ago
No -- in Lwan, files that will be sent with sendfile() are kept open for a while; when they're first open, the same thread that opened (and this might block) will call readahead(). Files are sent in 512kB bursts. It might use mmap()+
34.
▲
by
acidx
8y ago
Thanks! I don't think there's a way to guarantee that sendfile() won't block on Linux. On FreeBSD, you can specify a "go as much as you can without blocking, and then return" flag; Linux doesn't have a flags p
35.
▲
by
acidx
8y ago
I'm not aware of it. I'm learning Rust (just bought the "The Rust Programming Language" book, FWIW), so I will check it out.
36.
▲
by
acidx
8y ago
Ah, yes, I'm very aware of libtls. The API is indeed nice, but it would require some changes in Lwan that I'd rather avoid; for instance, every socket call would need to be virtual, and it would not be possible to use something l
37.
▲
by
acidx
8y ago
Yes, Lwan's thread scheduler is pretty simple, and can be borderline useless if a thread blocks. This 2014 blog post has more details; not much in that regard has changed since then: https://tia.mat.br/posts/2014&#
38.
▲
by
acidx
8y ago
Server-sent events: https://en.wikipedia.org/wiki/Server-sent_events https://developer.mozilla.org/en-US/docs/Web/API/Server-sent...
39.
▲
by
acidx
8y ago
Curious that you compare Seastar with a Ferrari: those cars are known for an internal finish that's not compatible with their price tag... and Seastar is nothing like that. It's a seriously well engineered piece of software, and i
40.
▲
by
acidx
8y ago
There is SSE, which, although unidirectional, can be used in lieu of websockets for a chat application (receive messages/events via SSE, send via another endpoint). However, as I said before, this is an open source project; if you have
41.
▲
by
acidx
8y ago
Because I failed to move the benchmark harness from the Lwan repository to the TWFB repository. Also, I'm not really spending a lot of time on Lwan any longer; there are so many things I'd like to do, and so little time. :)
42.
▲
by
acidx
8y ago
The authors of Seastar used to use Lwan to benchmark their HTTP server implementation. When Seastar isn't using DPDK/usermode TCP stack, and drops to the POSIX API, Lwan is still faster.
43.
▲
by
acidx
8y ago
It's a known issue with TWFB. I don't know if they're planning on fixing it, but most frameworks that are not in newer rounds are not appearing in older rounds any longer.
44.
▲
by
acidx
8y ago
Yes, the small footprint was a deliberate choice, specifically for the embedded scenario. One of the things I did back in the day was to run Lwan+Lua on an Intel Galileo board, without an SD card (it has only 4MB of flash memory, which has
45.
▲
by
acidx
8y ago
Thanks! Code readability is important: not only for others (it's an open source project, and contributions are welcome!), but for myself... I have terrible memory. :) The reason struct typedefs are avoided is because I prefer to be exp
46.
▲
by
acidx
8y ago
Yes. Team. http://www.commitstrip.com/wp-content/uploads/2014/05/Strip-...
47.
▲
by
acidx
8y ago
Thank you! Although I've used a lot of tricks I've learned over the years in this project, I took a lot of inspiration from Go.
48.
▲
by
acidx
8y ago
In the works? No. Planned? Yes. I've been playing around with kTLS/BearSSL but so far I haven't made any stride. PRs, my inbox, and the IRC channel are open, though!
49.
▲
by
acidx
8y ago
Depends how you measure it. A long time ago I benchmarked it, and Lwan came out on top, performance-wise. However, performance isn't the only thing that matters in a piece of software like this. H2O is a great project; in fact, the au
50.
▲
by
acidx
8y ago
This whole project started as a joke, and I still see it as such.
51.
▲
by
acidx
8y ago
Author here. It's a pun on another similarly-named web server. It's a terrible name, and I should have searched the web before, but it's too late now.
52.
▲
by
acidx
9y ago
I'm left-handed and I have no problems when using a fountain ink pen... if I write upside down.
53.
▲
by
acidx
10y ago
Shameless plug, inspired by pledge(2), if you're a Linux rather than BSD person: how to use elementary virus writing techniques to sandbox programs under Linux using seccomp-bpf: https://tia.mat.br/posts/2016/
54.
▲
Infect to Protect
(tia.mat.br)
2 points
by
acidx
10y ago
|
0 comments
55.
▲
by
acidx
11y ago
Kind of. I've tried making the page just as phony, but that's more difficult than it sounds.
56.
▲
by
acidx
11y ago
It's possible with FFI, yes, but it's not the way it's currently done in Lwan.
57.
▲
by
acidx
11y ago
That's not the only joke in the feature list (or the whole page, to be honest.)
58.
▲
by
acidx
11y ago
It builds on FreeBSD (soon OS X), but it's not working yet.
59.
▲
by
acidx
11y ago
My web server, uses the same pattern. There's an article explaining it in details here: http://tia.mat.br/posts/2014/10/06/life_of_a_http_request.ht...
60.
▲
by
acidx
11y ago
Would a 2-lines nibbles game be better? I've just typed the implementation by Ricardo Bittencourt ( http://www.ricbit.com/mundobizarro/twoliners/ ) and it works. BGM included: https://imgur.com/
More ›