HNHacker News
TopNewBestAskShowJobs

MetaDark

82 karma · joined September 25, 2015

submissionscomments
MetaDark··on Systemd 248 RC3: systemd-oomd is now considered fully supported
FreeBSD includes a kernel, drivers, and userland utilities under one project. If your complaint is that systemd is "bloated", it doesn't make any sense why you would want to switch to a system that's even more "bloated".
MetaDark··on Electron 12 released with Wayland support
It looks like it won't be so simple for Steam. I just found out a couple of days ago that Steam only uses CEF to render the main content, and it actually looks like it's using GTK2 to render the window.

See https://github.com/ValveSoftware/steam-for-linux/issues/4924....

MetaDark··on The modern packager’s security nightmare
I'm not sure what the slashpackage hierarchy is, but Nix & NixOS started in 2003.
MetaDark··on The modern packager’s security nightmare
Maybe the Nix package manager / NixOS is what you're looking for? I think it takes the best features from both worlds.

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··on Tagged Unions Are Overrated
> However, the crux of my argument is that it’s easy enough to emulate this construction in other languages.

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··on A few HiDPI tricks for Linux
Wayland has a proper protocol for fractional per-output scaling: https://wayland-book.com/surfaces-in-depth/hidpi.html. While there are many reasons why I prefer Wayland over X, this is the biggest.

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··on NixOS Linux
It could, depending on your use case, but normally all packages from nixpkgs share the same libcurl, so when libcurl is updated, all packages that depend on it will also be updated.

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.

MetaDark··on Rust 1.49.0
It sounds like your definition of stable applies to a very limited set of programming languages. The only thing I can think of that would fit that definition is C.

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··on The State of Linux Debuggers
I prefer using dap-mode. It has a much nicer interface that's consistent across multiple debuggers. I use it for C, C++, Rust (Native Debug + gdb) and Python (debugpy).
MetaDark··on Parse, don’t type-check
No, but you can always encode this augmented information in types to make it explicit, and possibly help the compiler make optimizations. Using a weaker type when you can use a stronger type is just as bad as removing type information.
MetaDark··on YouTube Down
Huh, weird. I was just able to start a video with youtube-dl + mpv (it took a few tries), but I still can't access anything from the website.
MetaDark··on New youtube-dl release: v2020.11.01.1
Yes it does, you can either push to multiple remotes individually, or setup multiple pushurls for a single remote.
MetaDark··on 2020's fastest-rising tech jobs? Programming language PHP leads the way
Just don't construct SQL queries by directly concatenating user input. It's easy to mess up or use the wrong escape function, so always use prepared statements anywhere you want to pass user defined data.

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··on What if a pill can change your politics or religious beliefs?
There absolutely is a survival bias. I should have phrased my comment better because my point wasn't that all trans people get stronger by what they go through.

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··on What if a pill can change your politics or religious beliefs?
I'm trans and I've struggled so much with gender dysphoria, but this doesn't bother me at all.

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··on How Normal Am I?
I was surprised to see without wearing any makeup that it was 93% sure I'm a woman, considering that I'm a trans woman.

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··on The Era of Visual Studio Code
Haha yep, I was commenting around 2AM. I probably should have just gone to bed.
MetaDark··on Show HN: Using Rust to write shell-script like tasks
I don't think you deserve to be down voted for this. You bring up a valid concern. Although, I don't agree that this project should be outright dismissed either.

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.

MetaDark··on A Woman Who Needed to Be Upside-Down (2012)
While reading this I thought it sounded familiar, and realized this is exactly what happens in the Grey's anatomy episode "Love Turns You Upside Down". Interesting that it was based on a real life situation, it seems like a lot of episodes are.
MetaDark··on Common Rust Lifetime Misconceptions
> That's exactly what happens: a Rust "move" is under the covers a memcpy().

Not exactly. The Rust compiler is usually pretty smart about optimizing out memcpy for most moves.

For example when returning a large struct from a function, the optimizer could add an "out" reference parameter to the function and the function would directly initialize the return value into that reference.

MetaDark··on Why does it suddenly feel like 1999 on the internet?
This is entirely my opinion, but I feel like Hacker News in general has become a more negative place since I started using it. It used to feel like people were more excited to hear about new things, but now it seems like people are criticizing everything.

The last comment I made mocked the title of the post, and while I don't agree with the direction of the project I was mocking, it felt terrible that I got a bunch of upvotes for it.

I'd be interested to know if anyone has any data to back up / disprove my claims.

MetaDark··on Glimpse: A Photo Editor For Everyone
Gift: A Distributed Version Control System For Everyone
MetaDark··on My Emacs Productivity Tricks/Hacks
By default, Emacs doesn't have an equivalent. Although, if you want to use a package manager that supports version lock files, I would recommend straight.el.
MetaDark··on Fastly launches its new compute environment – supports Rust
Wow it makes me sad that the top comment here is the one that's mocking the post.

Just because they've designed a compute environment that uses WebAssembly doesn't mean that their platform supports all languages that compile to WebAssembly.

MetaDark··on Lubuntu is taking a new direction
Not old enough? Well this makes me feel old even though I'm not. I'm 22 and my first version of Ubuntu was 8.04.
MetaDark··on Where grep came from [video]
Well Ken Thompson didn't actually invent the idea of regular expressions, but he was probably one of the first people to implement them in software. Regular languages and expressions were first formalized in 1951 by Stephen Kleene and I assume Ken Thompson used this research to implement them.
MetaDark··on 10 years of love for Emacs undone by a week of VSCode
Well if he wanted code navigation for JavaScript he could have used tern. It also integrates nicely with company for auto-completion.
MetaDark··on Text Editor: Data Structures
I believe you can use the vlf package (https://github.com/m00natic/vlfi) for dealing with large files in Emacs. I haven't used it myself, so I am not sure how stable it is.
MetaDark··on Feather: Open-source icons
If you want a copy with the lines going from bottom left to top right on all *-off icons, you can run https://pastebin.com/iy84YHyY in your dev tools console when visiting https://feathericons.com.
MetaDark··on Feather: Open-source icons
If it was consistent with the rest of the *-off icons this is what it would look like: http://svgur.com/i/2if.svg.