HackerTrans
TopNewTrendsCommentsPastAskShowJobs

tyilo

no profile record

comments

tyilo
·il y a 2 mois·discuss
If the original code was written in Rust, then I don't think the Rust compiler is allowed to do any of these "optimizations" of rewriting floating point expressions.
tyilo
·il y a 2 mois·discuss
There is a PoC that does exactly that here: https://github.com/tgies/copy-fail-c
tyilo
·il y a 4 mois·discuss
I have set up Ctrl+k to kill (SIGKILL) the front process in my terminal. I just use that for hanging connections and other hanging processes.
tyilo
·il y a 4 mois·discuss
> The only real disruption I'd say is if you happen to be buying something online that triggers the 3DS prompt (an additional security layer to prevent cards getting stolen/scam). In Denmark the 3DS prompt for VISA at least uses MitID to verify you are the owner of the card, so that'll obviously not work when MitID is down.

If you use Lunar, the 3DS prompt uses the Lunar app and not MitID.
tyilo
·il y a 6 mois·discuss
You probably just want to use `.peekable()`: https://doc.rust-lang.org/stable/std/iter/trait.Iterator.htm...
tyilo
·il y a 6 mois·discuss
> Invalid Date is just a Date with the "Unix epoch timestamp" of NaN. It also follows NaN comparison logic: > > > invalid === new Date(NaN) > false

This is just because a JS Date is an object and have nothing to do with the inner representation.

    > new Date(0) === new Date(0)
    false
tyilo
·il y a 7 mois·discuss
I got a 403 Forbidden error when trying to register a user.
tyilo
·il y a 8 mois·discuss
I have created a Python library called "z4-solver" that adds some nice utility functions on top of z3: https://github.com/Tyilo/z4

I always use that instead of the z3-solver directly.
tyilo
·il y a 9 mois·discuss
What is the expected output of padding "﷽"? It is only one code point but very wide.
tyilo
·il y a 9 mois·discuss
I use the `self_replace` crate for this: https://docs.rs/self-replace/latest/self_replace/
tyilo
·il y a 9 mois·discuss
Only half circle?
tyilo
·il y a 11 mois·discuss
It seems like `etcetera` has better defaults: https://docs.rs/etcetera/latest/etcetera/#native-strategy

> `choose_base_strategy()` and `choose_app_strategy()` will use the XDG strategy on Linux & macOS, and the Windows strategy on Windows. This is used by most CLI tools & some GUI tools on each platform.
tyilo
·l’année dernière·discuss
> Go and Rust are both memory safe.

Go doesn't seem to be memory safe, see https://www.reddit.com/r/rust/comments/wbejky/comment/ii7ak8... and https://go.dev/play/p/3PBAfWkSue3
tyilo
·l’année dernière·discuss
Seems to also work without any:

    type Values<T extends Record<string | number | symbol, unknown>> = T[keyof T]