Hacker Newsnew | past | comments | ask | show | jobs | submit | tyilo's commentslogin

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.

The C compiler also isn't allowed to do all of them. However some people use fast-math or compilers that default to fast-math to break the rules. Some older targets also may use the 80 bit fpu, which is its own mess and any sane compiler will default to properly sized SSE instructions instead.

On x86, LLVM does not follow strict IEEE 754 behavior all the time.

IIRC it also depends on the CPU's storage and capabilities.

There is a PoC that does exactly that here: https://github.com/tgies/copy-fail-c

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.


> 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.


You probably just want to use `.peekable()`: https://doc.rust-lang.org/stable/std/iter/trait.Iterator.htm...


Note that `peekable` will most likely break autovectorization


> 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


I got a 403 Forbidden error when trying to register a user.


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.


Have you tried to compare Z3 with cvc5? https://cvc5.github.io/docs/cvc5-1.1.2/api/python/pythonic/p...

It offers basically the same API and could be faster in many cases


I was about to comment the same. Z3 always takes all the credit but cvc5 is just as great!


What is the expected output of padding "﷽"? It is only one code point but very wide.


There is a definition file on unicode spec about a character should be n half-width in monospacr context. Not sure if it includes all symbol though. Also don't know if it handles symbol that has more than 2 half-width

https://www.unicode.org/reports/tr11/


I use the `self_replace` crate for this: https://docs.rs/self-replace/latest/self_replace/


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: