nhellman

Joined 4 years ago

Karma
179
Submissions
27
Member since
Sep 22
https://hllmn.net
View on Hacker News

Recent submissions

Comment · 2 years ago
We've been experimenting at my day-job with using the nix package manager to automate the fetching and building of dependencies, and also isolate them per project/revision.

In the root of each project repository, we have a shell.nix file that lists all dependencies needed to build and develop the project. Most of them are from the latest major nixpkgs tarball and we include its hash to account for the hashes of every package that it provides. Other packages are from e.g. PyPI, crates.io or internal repositories and each of those have their own hashes.

With the shell.nix file we can then get a working environment set up by running nix-shell or automatically when we enter the directory by using direnv. The first time it will fetch and build everything but it will be cached after that.

This has worked quite well for us so far, it makes it very convenient to maintain dependencies. We can try out new dependencies on a feature branch and easily run CI on it, and when we merge the branch to master the dependencies follow along automatically for both local and CI machines.

For older revisions or branches it is also very convenient to get a working environment as you just need to check it out and load its shell.nix file. No need to make sure your system has e.g. an older Python version available, it will be fetched automatically. In theory, older revisions should be usable indefinitively, as long as the sources we fetch the dependencies from are still available.

To try to ensure that all required dependencies are included in the shell.nix file our CI jobs run with nix-shell --pure to make sure it does not use any system programs. However, this does not prevent e.g. using files or binaries specified by an absolute path, if it is available both locally and from CI. Preventing unneeded dependencies from being listed is also difficult, as that requires removing a dependency and re-running everything to make sure nothing breaks without it.

Comment · 2 years ago
This is not forced by Gentoo. My Gentoo installs have separate bin directories which is what I got by default.
Comment · 2 years ago
Why return an owned string instead of a borrowed str slice? A substring can always be borrowed and should never require a heap allocation?
Comment · 2 years ago
Aren't there symbols missing for the mid central vowels which are common in English? I.e. https://en.wikipedia.org/wiki/Mid_central_vowel.

How do you write e.g. "learn" or "bird"?

It seems to be needed in the first "This is a sentence..." example as well. Right now it uses U for the lone "a" and I for the second syllable in "sentEnce". But U represents /ʌ/ (as in but) and I represents /ɪ/ (as in bit), but a symbol for /ə/ would be a better fit for these two, right?

Comment · 2 years ago
Germany does share an electricity market with its neighbours, you can see the live import and export e.g. here: https://www.iea.org/data-and-statistics/data-tools/real-time....

Currently, Germany is averaging around 6.4 GW of imports and 3.2 GW of exports. During production spikes caused by e.g. wind or solar power, the price quickly drops in the whole region, sometimes into the negative in order to help stabilize the grid frequency.

Comment · 2 years ago
Besides for verifying that the compiled program works on the target, tests are also required to compile with PGO because you need to have a runtime example to optimize for.
Comment · 2 years ago
> Then before I push, I have to temporarily rewind the branch to remove them, push, then cherry-pick them again.

You do not necessarily need to modify and restore your branch head just to push in this case. If you have e.g. two temporary commits at the top of the branch, you can use e.g. "git push origin HEAD~2:master" to skip those commits when pushing.

Comment · 2 years ago
To me it feels like Cyrillic cursive has at least as many differences from its printed counterparts as Latin has. For example, д is written like a g, б kind of like a d, т like an m. The last one is especially confusing because м also exists.
Comment · 2 years ago
It is not an entirely painfree experience, though. In some cases it is not a completely unwarranted question.

For example, the snow and ice melted here yesterday, exposing gravel on asphalt which is borderline painful to run on directly. Also, e.g. very cold winter days or just nasty gravel roads may inflict varying degrees of pain.

Otherwise, it can also be slightly painful for the soles during later parts of long runs, especially when inexperienced or when running for the first time in months.

Comment · 2 years ago
What happened to C? It's the #5 top language and you never ruled it out but it is missing from the final list? It seems like a reasonable first language with simple operations and not much magic happening behind the scenes.
Comment · 2 years ago
Yes, the three holes are very common in Sweden, the first time I even encountered covers without them was when moving abroad.

However, a few years ago Ikea removed them in Sweden also, unfortunately. From what I've heard it's because they got too many complaints internationally due to people believing that the covers were broken.

Comment · 2 years ago
The link to the paper seems to be broken but it is openly available at IEEE explore: https://ieeexplore.ieee.org/document/9152719

The paper explores manually guiding AFL-based fuzzers using annotations in the source code in order to more easily reach deep states.

The Super Mario Bros example highlighted in the git repo uses a modified version of a C++ variant converted from disassembly of the original game: https://github.com/MitchellSternke/SuperMarioBros-C/

In this example, the only guidance used is an annotation that maximizes the x-position while accounting for different y-positions, allowing it to faster complete the game levels: https://github.com/RUB-SysSec/ijon-data/blob/c75433e1ce52523...

Comment · 3 years ago
NHE looks interesting, they seem to have modified all clients to make the host player teleport above the map. With the current protocol, it seems like it is impossible to achieve this without modifying the guest clients as well. And by modifying all clients they are also able to add extra maps and make gameplay changes.
Comment · 3 years ago
Heh, what a coincidence!

Does XSP stand for anything?

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton