MetaDark | 5 years ago | on: Systemd 248 RC3: systemd-oomd is now considered fully supported
MetaDark's comments
MetaDark | 5 years ago | on: Electron 12 released with Wayland support
See https://github.com/ValveSoftware/steam-for-linux/issues/4924....
MetaDark | 5 years ago | on: The modern packager’s security nightmare
MetaDark | 5 years ago | on: The modern packager’s security nightmare
Every package installed with Nix is isolated into content-addressable* directories, so for example, my install of Firefox is located at /nix/store/c7pmng2x05dkigpbhnjs8fdzd8kk31np-firefox-85.0.2/bin/firefox. This is pretty inconvenient to use directly, so Nix generates a profile that symlinks all your packages into one place (eg. /run/current/system/sw, ~/.nix-profile), and then environment variables like PATH can just include <PROFILE_DIR>/bin.
With this approach, I can have multiple versions of the same package installed simultaneously, without them conflicting with each other. Like in a traditional distro, any dependencies that are shared between packages aren't duplicated, but if a package needs to explicitly depend on a different version, it can.
Also, because Nix is designed as a functional package manager for building packages from source (even though it has a binary cache), you can trace back exactly what sources were used to build your package and its dependencies, all the way back to the bootstrap binaries used to build any self-hosting compilers (gcc, rust, openjdk, ...)
* Most packages use a hash that's generated from the inputs used to build it, rather than the output that's generated.
MetaDark | 5 years ago | on: Tagged Unions Are Overrated
It's also easy enough to emulate all control flow statements with goto. Tagged unions are valuable because they help communicate restraints. Not only to other developers, but also to the compiler.
MetaDark | 5 years ago | on: A few HiDPI tricks for Linux
X only allows setting a DPI per "display", but not per screen (multiple monitor setups where you can drag windows between screens use one X "display"). So you have to resort to these hacks.
MetaDark | 5 years ago | on: NixOS Linux
The old libcurl will still exist on your system to allow you to rollback to previous states of your system, but you can always run nix-collect-garbage if you want to free up disk space.
This is similar to the situation in Arch Linux where pacman keeps all downloaded packages, and you have to run paccache if you want to free space.
daxvena | 5 years ago | on: Rust Design Patterns as a Book
For example, serde uses the visitor pattern to encode its intermediate representation. If it used pattern matching instead of the visitor pattern, it would have to instantiate its intermediate representation as an enum, which would add unnecessary overhead.
MetaDark | 5 years ago | on: Rust 1.49.0
Have you seen how many new features have been added to C++20? (which is probably the closest language to Rust) Not to mention any of the dynamically typed languages.
MetaDark | 5 years ago | on: The State of Linux Debuggers
MetaDark | 5 years ago | on: Parse, don’t type-check
MetaDark | 5 years ago | on: YouTube Down
MetaDark | 5 years ago | on: New youtube-dl release: v2020.11.01.1
MetaDark | 5 years ago | on: 2020's fastest-rising tech jobs? Programming language PHP leads the way
You can usually grep or even use static code analysis to help find where your existing code is using "tainted" data to construct a query.
Also, if you use an ORM, you'll generally be working at a high enough level where SQL injection is impossible (unless there's a bug or design flaw in the ORM); since you won't be directly dealing with text queries.
MetaDark | 5 years ago | on: What if a pill can change your politics or religious beliefs?
I was trying to say that the comment isn't transphobic at all, and if people think stuff like this is the reason why trans people kill themselves then they're probably blind to the actual transphobia that happens in the world.
Also, I strongly believe that we shouldn't be restricting language out of fear of being offensive, because then people become too afraid to talk about important issues.
MetaDark | 5 years ago | on: What if a pill can change your politics or religious beliefs?
I don't get why there's this stereotype of trans people being so fragile. All the trans people I know are stronger because of what they've been through.
MetaDark | 5 years ago | on: How Normal Am I?
Although, it did say I'm 16 with a BMI of 18.3, which is a huge undershot. There's no way I lost 45 pounds since I last weighed myself.
MetaDark | 5 years ago | on: The Era of Visual Studio Code
daxvena | 5 years ago | on: The Era of Visual Studio Code
With the language server protocol & debug adapter protocol, I can just plugin in a couple of servers and have a full-blown IDE environment that uses a consistent interface across multiple languages. I remember spending so much time trying out and setting up ctags, ggtags, irony, rtags, gdb-mi, etc...
I don't see myself switching to VSCode because I can just take the best features from VSCode and use them Emacs.
MetaDark | 5 years ago | on: Show HN: Using Rust to write shell-script like tasks
So many times, I've run into the issue where I've wanted to chain a set of commands with a concise syntax (specifically in Python) without having to shell out to bash.
What I really like about this library is that it gives you the concise composability of bash, without having to deal with its pitfalls (eg. variable escaping, lack of Windows support, clunky interface for anything that's not a command invocation...).
Using a DSL will always come with certain tradeoffs, and it won't be the best solution for every use case, but I think this library fills a certain need very well.