HackerTrans
TopNewTrendsCommentsPastAskShowJobs

tyilo

no profile record

comments

tyilo
·2 maanden geleden·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
·2 maanden geleden·discuss
There is a PoC that does exactly that here: https://github.com/tgies/copy-fail-c
tyilo
·4 maanden geleden·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
·4 maanden geleden·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
·6 maanden geleden·discuss
You probably just want to use `.peekable()`: https://doc.rust-lang.org/stable/std/iter/trait.Iterator.htm...
tyilo
·6 maanden geleden·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
·7 maanden geleden·discuss
I got a 403 Forbidden error when trying to register a user.
tyilo
·8 maanden geleden·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
·9 maanden geleden·discuss
What is the expected output of padding "﷽"? It is only one code point but very wide.
tyilo
·9 maanden geleden·discuss
I use the `self_replace` crate for this: https://docs.rs/self-replace/latest/self_replace/
tyilo
·9 maanden geleden·discuss
Only half circle?
tyilo
·11 maanden geleden·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
·vorig jaar·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
·vorig jaar·discuss
Seems to also work without any:

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