Readit News logoReadit News
kldx commented on Mosh Mobile Shell   mosh.org... · Posted by u/rbinv
craftkiller · 5 days ago
I used to use this but ran into too many small issues that ended up outweighing the benefit compared to a plain-old ssh connection. Personally, I'm hoping for a QUIC-based alternative that reaps the benefits of being able to change IP addresses and recover from intermittent connection loss without any of the typing prediction stuff from mosh.
kldx commented on QUIC for the kernel   lwn.net/Articles/1029851/... · Posted by u/Bogdanp
miohtama · a month ago
QUIC does not work very well for use cases like machine-to-machine traffic. However most of traffic in Internet today is from mobile phones to servers and it is were QUIC and HTTP 3 shine.

For other use cases we can keep using TCP.

kldx · a month ago
Let me try providing a different perspective based on experience. QUIC works amazingly well for _some_ kinds of machine to machine traffic.

ssh3, based on QUIC is quicker at dropping into a shell compared to ssh. The latency difference was clearly visible.

QUIC with the unreliable dgram extension is also a great way to implement port forwarding over ssh. Tunneling one reliable transport over another hides the packer losses in the upper layer.

kldx commented on QUIC for the kernel   lwn.net/Articles/1029851/... · Posted by u/Bogdanp
qwertox · a month ago
I recently had to add `ssl_preread_server_name` to my NGINX configuration in order to `proxy_pass` requests for certain domains to another NGINX instance. In this setup, the first instance simply forwards the raw TLS stream (with `proxy_protocol` prepended), while the second instance handles the actual TLS termination.

This approach works well when implementing a failover mechanism: if the default path to a server goes down, you can update DNS A records to point to a fallback machine running NGINX. That fallback instance can then route requests for specific domains to the original backend over an alternate path without needing to replicate the full TLS configuration locally.

However, this method won't work with HTTP/3. Since HTTP/3 uses QUIC over UDP and encrypts the SNI during the handshake, `ssl_preread_server_name` can no longer be used to route based on domain name.

What alternatives exist to support this kind of SNI-based routing with HTTP/3? Is the recommended solution to continue using HTTP/1.1 or HTTP/2 over TLS for setups requiring this behavior?

kldx · a month ago
QUIC v1 does encrypt the SNI in the client hello, but the keys are derived from a predefined salt and the destination connection id. I don't see why decrypting this would be difficult for a nginx plugin.
kldx commented on Multi-Stage Programming with Splice Variables   tsung-ju.org/icfp25/... · Posted by u/matt_d
kldx · 2 months ago
> For example, instead of a power function that uses a loop, you could generate specialized code like x * x * x * x * x directly. This eliminates runtime overhead and creates highly optimized code.

Could anyone explain to me how this is different from templates or parameter pack expansion in C++? I can see the constexpr-ness here is encoded in the type system and appears more composable, but I am not sure if I am missing the point.

I looked at the paper but I can't find anything related to C++.

kldx commented on Using obscure graph theory to solve programming languages problems   reasonablypolymorphic.com... · Posted by u/matt_d
tekknolagi · 4 months ago
This seems, at least upon first read, analogous to global value numbering (GVN). Or, depending on how you look at it, common subexpression elimination (CSE). I am mostly wondering why they are not mentioned in the article.
kldx · 4 months ago
Wondered about the same thing. Perhaps the author deals with graphs with no side effects or branches? It would then trivially become CSE on a single basic block.

SSA transformations are essentially equivalent to what the author appears to be doing in terms of let-bindings [0].

[0] https://dl.acm.org/doi/10.1145/278283.278285

kldx commented on Ways to generate SSA   bernsteinbear.com/blog/ss... · Posted by u/g0xA52A2A
kldx · 7 months ago
Can anyone suggest simple to implement algorithms for SSA destruction? I find Cytron's destruction easy (paired with copy propagation), but the more recent ones are difficult to implement directly from the papers.
kldx commented on Roc rewrites the compiler in Zig   gist.github.com/rtfeldman... · Posted by u/todsacerdoti
zozbot234 · 7 months ago
The Swift folks seem to manage just fine.
kldx · 7 months ago
I like Aria's writing about this https://faultlore.com/blah/swift-abi/.
kldx commented on Advent of Code on the Nintendo DS   sailor.li/aocnds.html... · Posted by u/zdw
bhaney · 9 months ago
Ask HN (comment edition):

I know we have plenty of people here doing AoC with their own personal challenges/restrictions on top. What are yours? Solving in an eso-lang? Self-imposed resource constraints (runtime/memory)? Only using Excel? Let's hear 'em.

kldx · 9 months ago
I am doing it this year with haskell. My C++ alter-ego (ab)used Data.STRef in the previous years so I am trying to do it idiomatically this time.
kldx commented on C++ exception performance three years later   databasearchitects.blogsp... · Posted by u/gpderetta
kldx · 9 months ago
Aren't we paying for Result types every time it's used? A result of a 64 bit value wouldn't fit into $eax for example (I understand there are exceptions to this rule through invalid bit pattern optimizations)
kldx · 9 months ago
Apologies, I mean $rax
kldx commented on C++ exception performance three years later   databasearchitects.blogsp... · Posted by u/gpderetta
bestouff · 9 months ago
Still that's awful. I way prefer the Rust way of "simulated exceptions" via Result return types (currently only available in nightly though).
kldx · 9 months ago
Aren't we paying for Result types every time it's used? A result of a 64 bit value wouldn't fit into $eax for example (I understand there are exceptions to this rule through invalid bit pattern optimizations)

u/kldx

KarmaCake day107April 5, 2022View Original