arendjr

joined 1 year ago
[–] arendjr@programming.dev 7 points 1 year ago (3 children)

Yeah, it was the first line of the linked PR:

This PR replaces the sort implementations with tailor-made ones that strike a balance of run-time, compile-time and binary-size, yielding run-time and compile-time improvements.

It was also repeated a few paragraphs later that the motivation for the changes was both runtime and compile time improvements. So a little bit bumped to hear the compile time impact wasn’t as good as the authors hoped apparently. I’m not even sure I fully endorse the tradeoff, because it seems the gains, while major, only affect very select use cases, while the regressions seem to affect everyone and hurt in an area that is already perceived as a pain point. But oh well, the total regression is still minor so I guess we’ll live with it.

[–] arendjr@programming.dev 5 points 1 year ago (5 children)

The post mentioned that the introduction of these new algorithms brings compile-time improvements too, so how should I see this? I assumed it meant that compiling applications that use sorting would speed up, but that seems like a meaningless improvement if overall compilation times have regressed. Or do you mean compiling the compiler has become slower?

[–] arendjr@programming.dev 8 points 1 year ago (7 children)

Does the Rust compiler use their std sort algorithms, or does it already use specialized ones? If the former, it would be a great side-effect if the compiler itself receives additional speed ups because of this.

[–] arendjr@programming.dev 7 points 1 year ago* (last edited 1 year ago)

From what I understand as I skimmed over the stable sort analysis (https://github.com/Voultapher/sort-research-rs/blob/main/writeup/driftsort_introduction/text.md), it lost out against driftsort.

[–] arendjr@programming.dev 7 points 1 year ago

For a little bit I thought this library might be a subtle joke, seeing the #define _SHITPRESS_H at the start. That combined with the compress() and decompress() not taking any arguments and not having a return value, I thought we were being played. Not to mention the library appears to be plain C rather than C++... surely the author should know the difference?

Then I saw how the interface actually works:

// interface for the library user, implement these in your program:
unsigned int SPR_in(); // Return next byte from input or value > 255 on EOF.
void SPR_out(unsigned char); // Output byte.

This seems extremely poorly thought out. Calling into global functions for input and output means that your library will be a pain to use in any program that has to (de)compress anything more than a single input.

[–] arendjr@programming.dev 18 points 1 year ago (1 children)

The System76 scheduler helps to tune for better desktop responsiveness under high load: https://github.com/pop-os/system76-scheduler I think if you use Pop!OS this may be set up out-of-the-box.

[–] arendjr@programming.dev 3 points 1 year ago

Essentially, but it doesn’t roll off the tongue as nicely 😅

[–] arendjr@programming.dev 4 points 1 year ago (1 children)

I made Sudoku Pi: https://apps.apple.com/nl/app/sudoku-pi/id6467504425

Sorry, still iOS only thus far!

[–] arendjr@programming.dev 7 points 1 year ago (1 children)

Smart pointers are really really nice, I do recommend getting used to them (and all other features from c++11 forward).

You’re recommending him to give up his sanity and/or life?

[–] arendjr@programming.dev 2 points 1 year ago

The other day I saw a link to Verus on here and it’s made me somewhat interested in the topic how Rust and formal verification can work together.

It’s quite insightful to see how the borrow checker both required and ended up facilitating the ability to do more extensive formal verification on Rust code.

Something like Verus (I haven’t looked into most of the other tools in this space yet, there seem to be many!) does appear poised to make verification quite approachable in low-level, self-contained Rust code already, and I’m curious to see how things evolve from there.

It would be exceedingly cool if one day there’s a subset of libraries on crates.io that are fully verified (similar to how today there’s a subset that supports no-std development) and which are then usable to build upon in your own formally verified code.

[–] arendjr@programming.dev 2 points 1 year ago* (last edited 1 year ago) (1 children)

Based on the limited (but useful!) information in your profile and your age I would estimate competent mid-level fits you.

[–] arendjr@programming.dev 12 points 1 year ago

And conversely, something Go is very bad at. For example, os.Chmod silently not doing anything on Windows.

view more: ‹ prev next ›