Julien Portalier

Results 674 comments of Julien Portalier

@HertzDevil Nice! I've been wondering about mmap for this use case, and this looks exciting.

There's `LLVMGetHostCPUFeatures()` but it only works for when the CPU is set to native, of course.

Hum, the implementation is indeed wrong, as it never calls the block, but the documentation may still be correct about the intent of filtering duplicates :confused: I tried looking at...

An alternative is to deprecate `Set#to_a(&)` in favor to `Set#map(&)`: ```crystal Set{1, 2, 3, 4, 5}.map { |i| i // 2 } # => [0, 1, 1, 2, 2] ```...

Interestingly that caused CI to segfault with `-Dpreview_mt` :raised_eyebrow: Of course, no stacktrace and I can't reproduce.

Superseded by: - #14559 - #14560 - #14561

This is clang complaining that `-rdynamic` is unused because of the `--static` compilation flag. I can't reproduce on Linux (gnu or musl) with `CC=clang-17` and passing `--link-flags="-Wunused-command-line-argument"`.

With `#get?` it will be useful to create a StringPool with a set of known keys, and doing so in idiomatic crystal sounds good. ```crystal known_keys = StringPool{"foo", "bar"} known_keys

Let's do some archeology: In #8017 `Hash#initialize` called `#malloc_entries(initial_capacity / 2)` which correlated with the other `#malloc_entries(4)` since initial capacity is supposed to be 8. But #8182 patched `#initialize` to...