HNHacker News
TopNewBestAskShowJobs

mschwaig

298 karma · joined January 22, 2015

submissionscomments
mschwaig··on A decade of dotfiles
If you are talking about provisioning dot files and command line applications you want to have available on all you machines then take a look at home-manager.

https://github.com/nix-community/home-manager

I use it on NixOS. It should absolutely work on other distros unfortunately I don't have any first hand experience with that or with what the best way is to set it up on other distos (I think there are few options for how to do it).

mschwaig··on A Dotfile History
I guess you cannot install Nix on that Mac because you are not admin?

In general you can install the Nix Package Manager and home-manager an macOS. There were some rough edges when macOS Catalina came out, but that should be resolved now. The way it works will probably require admin rights though (https://nixos.org/manual/nix/stable/installation/installing-...).

mschwaig··on A Dotfile History
Big disclaimer: I have only used home-manager on NixOS.

The main development target for the project seems to be NixOS, but you can install it on other Linux distribution or macOS as well. It just depends on the Nix Package Manager, which you need to install, not on NixOS.

The home-manager manual describes a standalone (not integrated with NixOS) setup with flakes here: https://nix-community.github.io/home-manager/index.html#ch-n...

mschwaig··on One Week of NixOS
For using Python packages that are avialable via pip I have been quite happy with [mach-nix](https://github.com/DavHau/mach-nix), which can pull prebuilt python wheels(?) from pip directly. You can also configure it to obtain those packages in other ways, like from source via pip or from nixpkgs. You can also feed it Python packages you have in source code form locally.
mschwaig··on One Week of NixOS
I can imagine sitting down and migrating a lot of complex packages to Nix is probably quite a tall order right now. Partially because I think a switch like that is always painful, but also because of the open issues, bugs, yet unanswered questions and usability issues that do exist.

I think it depends on if your use case allows for a gradual transition and on your tolerance for migration pain wether or not Nix is worth the trouble right now.

Even if packaging is more difficult with Nix, I appreciate that packages do end up containing a much more precise and flexible description of what they depend on.

mschwaig··on One Week of NixOS
Were you trying to use Nix for running your graphical terminal on a non-NixOS system?

I have personally worked with Nix on a Fedora system, but only for things that run inside the terminal.

EDIT: I removed some content here because it didn't think it applied since you clarified in another comment you were trying to use existing packages.

mschwaig··on One Week of NixOS
This is about right but let me clarify a bit.

The configuration.nix system configuration can be moved between systems, but imports a generated hardware-configuration.nix that really should not be moved between systems.

If you don't want user and system specific configuration to intermix by having user-specific software in your system configuration and you want to manage you the dotfiles in your home directory in the style of Nix there is another popular project called home-manager which enables that, but that's totally optional.

mschwaig··on One Week of NixOS
That's an accurate description. I just want to add some info how the install process ifself works so people get a better picture of it.

For the initial installation you actually have to set up the partitions and mounts inside the root filesystem manually similar to what you have to do to install Arch.

Then you run the install command. The install command sets up the system with a default (or customized) configuration and also generates the hardware-configuration.nix file so that it matches the root filesystem you have set up before running the install command.

mschwaig··on One Week of NixOS
If you are interested in Nix but don't know too much about it, let me tell you one thing:

You can use the package manager to package, build and install software and to take advantage of their large package repo and features like nix-shell without using the OS. What the OS gives you is a full system and all of its services managed exclusively with the paradigms of the package manager.

I do run NixOS on all four of my machines and I got in OS-first package manager second. At first, like the author, I also frequently needed escape hatches like other machines or VMs, but I think if you get into the package manager first you're probably less likely to get stuck. Depending on what you want to do you get a lot of the good stuff with much less commitment that way.

mschwaig··on Dream Vendor "Canna_Bars" Sentenced to Prison
I did read the article. I am interested in how forensic evicende like that is gathered in general and how reliable it is in general. It's debatable what role that fingerprint played in that investigation, but I did not want to call into question that particular outcome.

For example my impression is that DNA evidence is very reliable while for example optically matching hairs or matching bite marks, which I think was done in the past in a similar 'does A match B setup' is fairly unreliable.

It's interesting to me both from both the 'what bar does evidence have to meet to make sure there are no false convictions' side as well as the 'what are the privacy implications of posting pictures with fingerprints in them' side.

mschwaig··on Dream Vendor "Canna_Bars" Sentenced to Prison
> The FDL [HSI Forensic Document Laboratory] returned the request after conducting a comparative analysis of the friction ridge detail of the fingerprints from the Imgur album and the fingerprint samples taken after police had arrested Porras for a different crime. The fingerprints in the Imgur album matched the prints they already had on file for Porras.

It doesn't sound like that to me, but maybe I am misunderstanding what a comparative analysis would entail.

mschwaig··on Dream Vendor "Canna_Bars" Sentenced to Prison
'So we have these fingerprints, and we think they belong to this guy we already have prints on file for. Can you give us a yes/no answer if they match up?'

seems like a pretty low bar for evidence. Seems like the kind of thing that could heavily skew towards telling you what you want to hear. Maybe someone else knows if it actually works like that, the writeup made it sound like that to me.

I'm just some guy who saw a tv documentatary at some point about how forensic techniques that worked like that got called into question when conflicting DNA evidence started turning up.

mschwaig··on Ask HN: Tips for students before starting their first job
I think an organization should be able to deliver on what it promises when hiring someone even to an intern and both parties expectations should be expressed in good faith as clearly as possible. Frankly if someone told me they were cleaning toilets unexpectedly in their software development internship my advice would be to look for ways to get out of that internship if they can because engaging with that company is clearly a waste of time.
mschwaig··on A Nix terminology primer by a newcomer
If you want to know what the result could look like I would recommend the following blog post by Christine Dodrill where she shows off her setup for working with Go code in Nix: https://christine.website/blog/i-was-wrong-about-nix-2020-02...

It's more focused on the result then on how you get there, but that result really impressed me.

mschwaig··on The Italian Covid contact-tracing app is now developed in open source
You can find an report on the contact tracing app published by the Austrian Red Cross on this site: https://noyb.eu/en/report-red-cross-corona-app-reviewed-noyb

Note that their app was released quite early, specifically before Apple and Google announced their contact tracing plans, and media reports indicate they want to start using those APIs in the first half of June, which will be a major change.

My department at Johannes Kepler University Linz also published an analysis of the NOVID20 SDK(https://novid20.org) when the code for that was first released: https://ins.jku.at/publications/2020/Roland_2020_NOVID20_Ana...

mschwaig··on Digital hoarders: Our terabytes are put to use for the betterment of mankind
On Linux ZFS has has an encryption feature developed by datto.com.

They developed this feature for their own hosted encrypted backup service.

If you have you data encryped in ZFS like that locally, you can use zfs send to send them encrypted snapshots of your data while only ever having to transmit the diffs.

I am in the process of setting up something like this with my own backup server right now. I'm not 100 % confident yet that I'll get it working though.

Have you looked into tarsnap.com?

mschwaig··on Glibc malloc inefficiency (2016)
Are there implementations that actually do this?

I would think the page level granularity of virtual memory makes it not that useful for this purpose, since the used and unused parts of the two pages would have to line up nicely and larger objects tend to cause less fragmentation.

mschwaig··on Glibc malloc inefficiency (2016)
If I remember correctly you couldn't do this by just re-linking with another manual memory manager though because the application could hold pointers to things in ways you don't understand and then you can't move them, so there has to be some additional indirection on every pointer access that resolves the real location of data in memory.

So I would think this requires some compiler support or some sort of runtime.

If you know more about this or know any cool implementations of it please elaborate!

mschwaig··on Glibc malloc inefficiency (2016)
I fully agree that moving is key.

Just to further clarify the terms if someone is looking for more info on this:

In the context of system memory people mostly refer to this as compaction and not defragmentation.

mschwaig··on Ffsend – Share Files from the CLI: A Firefox Send Client Written in Rust
Wow, that's great! Thanks.
mschwaig··on Ffsend – Share Files from the CLI: A Firefox Send Client Written in Rust
I mostly use Firefox Send to transmit data between my own devices and devices I do not trust. I wish the web client could generate QR codes to make that easier.

Probably I could combine Fsend and another CLI tool to enable that use case. Right now I'm manually typing links into different devices.

EDIT: Fsend can do this by itself!

mschwaig··on My Favourite Git Commit
Generally speaking sure, there's no need to make things more complicated than they are, but the author even found some evidence in the history that indicates other people found this message useful.

The powerful thing about this is having everyone put this kind of info in the same place IF they think it might be useful to the next person.

mschwaig··on Dark matter nightmare: What if we are just using the wrong equations?
I don't understand what the author means. Maybe someone can help me understand.

> Now, what we do when we want to explain what a galaxy does, or a galaxy cluster, or even the whole universe, is not to plug the matter and energy of every single planet and star into the equations. This would be computationally unfeasible. Instead, we use an average of matter and energy, and use that as the source for gravity.

Does this mean instead of individual objects we make our calculations with x units of mass and energy in every given patch of space and this may be an issue, or am I getting this wrong?

mschwaig··on New Radiotracer Can Identify Nearly 30 Types of Cancer
1 rem of radiation exposure causes cancer with a probability of 0.05 % according to Wikipedia[1].

It seems such a scan causing a cancer would be due to a very low probability event on a cellular level. From that point of view the above calculation looks reasonable. It is only after that when the additional macroscopic influences caused by a specific person's body/environment come into play that your point applies.

This was interesting so I started from that 0.05 % per 1 rem and did the inverse calculation. For 2500 rem this gives about 1-(1-0.0005)^2500 = 71 % probability of developing cancer. I also made a plot from 0 up to 10000 REM[2]. The incident rate seems to be pretty much approaching 100 % around 10k, so our results differ by about a factor of 4.

[1]https://en.m.wikipedia.org/wiki/Roentgen_equivalent_man#cite...

[2]https://www.wolframalpha.com/input/?i=1+-+(1+-+0.0005)%5Ex+f...

EDIT: The initially mentioned 2500 rem figure must be over a long enough time for the exposure not to cause more immediate issues than cancer.

mschwaig··on The Zig Programming Language
In their phylosophy C and zig both aim to do very little behind the scenes beyond what you explicitly express in your code. On a technical level Zig re-uses fancy C compiler infrastructure in the form of LLVM. So that gets them pretty close. The advantage tha zig has over C is that it gets designed decades later when we have learned so much about what is good or bad or fast or slow about C.
mschwaig··on The Zig Programming Language
I am amazed how much money and effort goes into building software on top of the ancient wasp nest that is C. People boldly taking on that issue deserve our support.
mschwaig··on Upcoming Changes to PNG Support at Twitter
> These changes will be applied to all images uploaded to Twitter from February 11th and forward, regardless of the category the image is for.

Looks like they only do the conversion for newly uploaded images beginning Feburary 11th.

mschwaig··on Zig: software should be perfect [video]
Yes for most userland applications removing hidden allocations is not a concern, which is why for most general purpose programming languages this is way down the priority list.

Most languages make allocations behind your back so that your code can focus on the logic you actually care about since you could not do anything about running ot of memory anyways.

However there are projects where that level of control matters. For those projects C is currently still the default choice, even though it was designed more than 40 years ago. Some choices made back then might be huge liabilities for code we are writing now, because we still need that kind of language. A modern alternative to C could provide a huge value to all of us, mostly through more correct, secure and/or performant software.

mschwaig··on Zig: software should be perfect [video]
The definition of 'perfect software' used in the talk is 'it gives you the correct output for every input in the input domain'. To that end no funny business like hidden allocations or hidden control flow should happen behind your back, because an out of memory error or some exception your code does not deal with explicitly would not be a correct output according to that definition. Of course you do not need that level of control for most projects.
mschwaig··on Tell recruiters politely “no” with a simple link
Can we please call this a 'recruiting canary'?
← PreviousPage 2 of 5Next →