Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
fasterthanlime
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
19 ms
·
31.
▲
by
fasterthanlime
4y ago
Oh I wrote that code in anger forever ago, it had the merit of still working when I did the last round of cleanups on my website. I could've sworn at some point some paths had something slightly more involved (strip slashes, some start
32.
▲
by
fasterthanlime
4y ago
I'm not sure what you mean by "pull-based", but you can make the whole thing single-threaded with `#[tokio::main(flavor = "current_thread")]` See https://docs.rs/tokio/latest/tokio/att
33.
▲
by
fasterthanlime
4y ago
Fair, but if you were writing a web application on top of hyper directly, you probably wouldn't use one tower layer per route, which is somewhat equivalent to what warp does. When I wrote this I worked at a company where the main Rust
34.
▲
by
fasterthanlime
4y ago
Yeah, clippy will yell at you if you use a match with a single arm - I personally don't hate matches with a single arm, but I'd rather not fight clippy (ie. come up with my own clippy config, enforce it onto every project I mainta
35.
▲
by
fasterthanlime
4y ago
Request extensions (a feature of the `http` crate, not specifically hyper/warp/axum) are "just" a typemap, which is "just" a HashMap where keys are TypeIDs rather than strings. It's slightly less footgunny
36.
▲
by
fasterthanlime
4y ago
The RFCs themselves are pretty dry, if that's your thing — https://httpwg.org/ has the freshest ones.
37.
▲
by
fasterthanlime
4y ago
You know how some movie fans will sometimes pretend the sequels to some franchise don't exist? HTTP is the opposite.
38.
▲
by
fasterthanlime
4y ago
My whole thing is that I'm teaching Rust /while/ solving interesting, real-world problems (instead of looking at artificial code samples), so, if someone wants to write the equivalent article with Python, they should! I won&#
39.
▲
by
fasterthanlime
4y ago
The article covers using Wireshark to decrypt TLS traffic using Pre-Shared Master Secrets!
40.
▲
by
fasterthanlime
4y ago
I tend to agree with you there, however the thing I'm replacing does HTTP/2, and HTTP/3 is yet another can of worms as far as "production multitenant deployment" goes, so, that's what my life is right now. As f
41.
▲
by
fasterthanlime
4y ago
Against my better judgement, the article /does/ go over H2 (although H3 is all the rage right now). For TLS, I recommend The Illustrated TLS 1.3 Connection (Every byte explained and reproduced): https://tls13.xargs.org&
42.
▲
by
fasterthanlime
4y ago
Cool Bear has been making guest appearances in a couple places already! I do not intend to pay lawyers to pursue anyone who uses them without permission but I appreciate being asked first — it lets me keep track of where Bear travels. My on
43.
▲
by
fasterthanlime
4y ago
RalfJ if you see this: you have my permission to use Cool Bear on your blog. Thanks for asking!
44.
▲
by
fasterthanlime
4y ago
This particular example is trivially restructured into a version that passes the current borrow checker: https://play.rust-lang.org/?version=stable&mode=debug&editio... It isn't the gotcha you're looking f
45.
▲
by
fasterthanlime
4y ago
> Try to find the current number of running tasks being managed by tokio… As a heavy user of async Rust in production (at a couple places), resource leaks / lack of visibility into that has been a top issue. In this area, tokio-cons
46.
▲
by
fasterthanlime
4y ago
Quick aside: if you're willing to live the nightly life (unstable rustc), the `type_alias_impl_trait` feature gets you most of the way to "async trait methods". You still have to have a `Future` associated type, but in impl b
47.
▲
by
fasterthanlime
4y ago
> but its currently at like 98 Come on now. There's two chasms between "an academic paper", my blog, and "a blog with minion/the office reaction GIFs". The amount of humor is finely-tuned so that it's n
48.
▲
by
fasterthanlime
4y ago
> Don't use the `async` ecosystem. I want to make it /very/ clear that async isn't to blame at all for the pathological build times described here. It's a bug about traits and lifetimes, both very core concepts o
49.
▲
by
fasterthanlime
4y ago
Author here: I honestly expected it to be much worse. The tracing integration in particular is fantastic - being able to just slap a `#[instrument(...)]` attribute on any function and then be able to filter which spans you want to see is ki
50.
▲
by
fasterthanlime
4y ago
The reason is that it takes me longer to remember the order of arguments for "grep" than it takes me to write the pipe. I also find that order more natural. I'm also trying to carbon-offset all my useless uses of cat by writi
51.
▲
by
fasterthanlime
4y ago
(Author here) So, I've been running this exact same setup for my dev box and I think you're overestimating how often the whole IPv4 space is being scanned. What helped me at first was that I only set up an IPv6 address, since I ha
52.
▲
How to Make Rust Leak Memory (Also: How to Make It Stop)
(fly.io)
43 points
by
fasterthanlime
4y ago
|
13 comments
53.
▲
by
fasterthanlime
4y ago
sammy811 is claiming responsibility for the small attack on the video platform. Nobody's claimed responsibility for the main attack, but the answer is probably "mostly Tor + a bunch of open proxies". There's probably eas
54.
▲
by
fasterthanlime
4y ago
I looked for that kind of data structure for 30 seconds in the ipnet crate itself, didn't find it, noticed there were only 23 IP ranges and decided it was fine. (Keep in mind this happened during the attack, so compromises)
55.
▲
by
fasterthanlime
4y ago
It happened after I left, I don't think it's my story to tell (and I think they have higher priorities than telling that story).
56.
▲
by
fasterthanlime
4y ago
The article covers this in great detail. Do a search for "fair enough" to jump to the relevant section.
57.
▲
by
fasterthanlime
4y ago
I snitch-tagged Digital Ocean and other VPS providers involved in the attack, but didn't expect much. They're much bigger than this: what's a big deal for my toy server is barely a blip on their radar. And realistically, ther
58.
▲
by
fasterthanlime
4y ago
Thanks for the context, I fixed those up. This was my first time looking up AS for additional info and it was a lot of fun.
59.
▲
by
fasterthanlime
4y ago
Why were some only some requests Range requests? (the status codes included 206 and 200)
60.
▲
by
fasterthanlime
4y ago
Indeed. fly.io encouraged me to move projects there, but since I budget my side projects as if they were an actual business, parts of the pricing page turned me off. For the time being, I've decided that getting insights into "how
More ›