Viewing profile — wh33zle
wh33zle
HN member- Joined
- Sat, Jul 04, 2020, 1:24 AM UTC
- HN karma
- 336
- Public activity
- 66 items
- HN profile
- View on Hacker News ↗
About wh33zle
Recent public activity
-
comment
Comment #43278811
How low do you need the footprint? At firezone.dev, we also build a ZT product and our headless-client and Gateway are in Rust and use around 15-30 MB of RAM. Could likely be tuned…
-
comment
Comment #43170267
One of the coolest things I've learned about recently is `.git/info/exclude`. It allows you to ignore files in the local repo without modifying the repo's .gitignore Very useful if…
-
comment
Comment #41253508
Depends. MASQUE implies QUIC and a lot of coporate networks still block QUIC, forcing a fallback to TCP (for web browsers). Not sure how they want to address this in case of WARP? …
-
comment
Comment #41201165
I find myself defining my own traits very rarely these days. Traits enable polymorphic actions on data. Most of the time, you simply don't need that. An enum often suffices to expr…
-
comment
Comment #41106760
WASM shouldn't care about which language the host is written in vs what the apps are written in. Writing the host in C seems like a bad choice though. Isn't that exactly the kind o…
-
comment
Comment #40983122
> An async method, basically does the same, but it means your logic doesn't have to handle the polling, orchestration, selection, ordering, etc. In order to take advantage of that,…
-
comment
Comment #40965545
Thinking about your example again made me think of another requirement: Multiplexing. STUN ties requests and responses together with a transaction ID that is encoded as an attribut…
-
comment
Comment #40959185
> The stream is a stream of Result Fair point! Yeah that would allow error handling the state machine. > > Lastly, and this is where using async falls apart: If you try to model th…
-
comment
Comment #40902579
This isn't an adequat comparison in my eyes. Your example moves a very critical component out if the "protocol logic": message parsing. Dealing with invalid messages is crucial in …
-
comment
Comment #40875424
> [EDIT2] Any good recommendations of a tiny protocol that might be a good walk through intro to this? > > Something even simpler than Gopher or SMTP? Would be nice to have a reall…
-
comment
Comment #40874829
> What am I missing here? From unrelated code, I want to call `get_ip_via_stun_or_timeout(hostnames: &[String], timeout: Duration) -> Option `, is what I'm missing that I need to w…
-
comment
Comment #40874240
> If I want to write a function that listens or times out in sans-IO style, should I use tokio::select? If so, where is the async runtime coming from, and how will the caller of th…
-
comment
Comment #40874082
The line between applications and libraries is fairly blurry, isn't it? In my experience, most applications grow to the point where you have internal libraries or could at least sp…
-
comment
Comment #40874048
> I would have been more interested in seeing how they could implement an encapsulated function in the sans-IO style that had to do something like wait on an action or a timer The …
-
comment
Comment #40874006
I too came from the OOP world to Rust (6 years ago now) and in my first 2-3 years I produced horrible code! Type parameters and traits everywhere. Structs being (ab-)used as class-…
-
comment
Comment #40872995
Channels work fine if you are happy for your software to have an actor-like design. But as you say, it comes with problems: Actors / channels can be disconnected for example. You a…
-
comment
Comment #40872897
If Rust ever gets a native generator syntax, this might be become achievable because one would be able to say: `yield transmit` to "write" data whilst staying within the context of…
-
comment
Comment #40872691
They actually play together fairly well higher up the stack. Non-blocking IO (i.e async) makes it easy to concurrently wait for socket IO and time. You can do it with blocking IO t…
-
comment
Comment #40872551
Yes, traffic is routed to the gateway through a WireGuard tunnel. Broadly speaking, what happens is: - Client and gateway perform ICE to agree on a socket pair (this is where hole-…
-
comment
Comment #40872470
Haha thank you! Yes there are indeed similarities to rust-libp2p! Over there, things are more interleaved though because the actual streams and connections are still within `Future…
-
comment
Comment #40872448
I tried to address this at the end of the post: If what you are implementing is mostly _sequential_ IO operations, then this model becomes a bit painful. That isn't always the case…
-
comment
Comment #40872370
Yes! Decoupling is the goal of this! Using non-blocking IO is still useful in this case because it means we can wait on two conditions at once (i.e. socket IO and time), see [0]. I…
-
comment
Comment #40872319
In Firezone's case, things are built on top of UDP so technically there aren't any (kernel-managed) connections and only a single file descriptor is allocated for the UDP socket. T…
-
comment
Comment #40872293
I did some quick research and found that there is an "async job" API in OpenSSL. That one appears to do IO though, it even says that creating a job is a very expensive operation an…
- story