HNHacker News
TopNewBestAskShowJobs

jbboehr

242 karma · joined July 23, 2015

Hell is other people’s code.
submissionscomments
jbboehr··on NixOS 18.03 Released
There is a `/bin/sh` and `/usr/bin/env` provided - so you can use `/usr/bin/env bash`.

There is also this function which may be necessary for certain software: https://nixos.org/nixpkgs/manual/#sec-fhs-environments

You can compile some software manually in place using, for example, `nix-shell -p libssh2 -p zlib` without having to write a derivation. However, without writing a derivation, it may cease to function after a garbage collection or an upgrade.

Writing a derivation isn't too bad, here's one for one of my repos: https://github.com/jbboehr/handlebars.c/blob/master/derivati...

jbboehr··on NixOS 18.03 Released
Brings a bunch of fixes to building Rust packages, and it can even be used with the Rust nightly from the Mozilla nixpkgs overlay like this:

    let
	  defaultPkgs = import <nixpkgs> {};
	  defaultRust = defaultPkgs.latest.rustChannels.nightly.rust;
	  defaultCargo = defaultPkgs.latest.rustChannels.nightly.cargo;
	  defaultBuildRustPackage = defaultPkgs.callPackage (import <nixpkgs/pkgs/build-support/rust>) {
		rust = {
			rustc = defaultRust;
			cargo = defaultCargo;
		};
	  };
	in
	  { pkgs ? defaultPkgs, rust ? defaultRust, buildRustPackage ? defaultBuildRustPackage }:

	  pkgs.callPackage ./derivation.nix {
		inherit rust buildRustPackage;
	  }
jbboehr··on Toyorm – ORM for Go
IIRC the tooling is not smart enough to resolve them when you import a subpackage directly.

I was working on a go project and I had to convert all of the relative imports to absolute imports for some reason, but the exact cause escapes my memory.

jbboehr··on Toyorm – ORM for Go
Part of is is probably because subfolders are subpackages and relative imports don't work and absolute imports have other issues - like causing issues with forking.
jbboehr··on Time for developers to address the chaos of Node.js and NPM
I'm kind of surprised no one has tried to make a standard library for node - although I guess underscore/lodash come close.

The package situation is a serious problem for distro maintainers, which AFAICT have basically given up packaging any npm packages the traditional way. Luckily Nix[1] and Guix[2] can most likely support automatic importing from npm.

Incidentally, one of the many things I love about typescript is that it has zero non-dev dependencies [3].

[1] https://github.com/svanderburg/node2nix [2] https://lists.gnu.org/archive/html/guix-devel/2017-03/msg008... [3] https://www.npmjs.com/package/typescript?activeTab=dependenc...

jbboehr··on Prove you are not an evil corporate person
Looks like it's possible to have a "Lesser" AGPL. libbitcoin[1] uses such a license.

Also licensing things under a dual AGPL/commercial license seems perfect for things like databases. Mongo uses it IIRC.

[1] https://github.com/libbitcoin/libbitcoin/blob/master/COPYING

jbboehr··on Guide to Using YubiKey as a SmartCard for GPG and SSH
Here are also some guides for instructions specific to NixOS [1] and Windows [2].

[1] https://rzetterberg.github.io/yubikey-gpg-nixos.html

[2] https://developers.yubico.com/PGP/SSH_authentication/Windows...

jbboehr··on I Do Not Like Go
Go from the very beginning has irritated me, for these reasons and more. There is already a lot of Rust love around here, but I would recommend giving it a chance over Go.
jbboehr··on How poverty changes your mindset
We already have an issue with business consolidation in the US and the decline of small businesses, I would be wary about anything that might contribute to it, as an inheritance tax might.
jbboehr··on Nix 2.0 Released
If you use a content-addressable scheme (fetchurl with sha256, for example), it will retain the source archives until you run garbage collect.

If you use builtins.fetchTarball, I don't think this is the case.

Since this all uses CAS, you can use the nix prefetch scripts to import an arbitrary file:// or other URI into the nix store.

← PreviousPage 6 of 6