HN user

jkarni

694 karma

Email: username at garnix.io

Posts25
Comments93
View on HN
cdn.netzpolitik.org 8mo ago

New Chat Control Proposal [pdf]

jkarni
3pts0
garnix.io 8mo ago

Fix Your FODs: A supply-chain attack on Nix

jkarni
2pts0
garnix-io.github.io 9mo ago

Nix CI Benchmarks

jkarni
3pts0
thenewstack.io 1y ago

SaaS Is Broken: Why Bring Your Own Cloud (BYOC) Is the Future

jkarni
2pts0
news.ycombinator.com 1y ago

Show HN: Garnix modules – CI and hosting rethought

jkarni
5pts0
www.youtube.com 1y ago

Nix in 100 Seconds [video]

jkarni
41pts16
lix.systems 1y ago

Lix 2.91 "Dragon's Breath"

jkarni
3pts0
garnix.io 2y ago

Contextual CLIs

jkarni
5pts0
garnix.io 2y ago

Garn, a TypeScript-based Nix front end

jkarni
54pts21
garnix.io 2y ago

Nixbovik Part 1: Nix Derived Melodies

jkarni
3pts0
garnix.io 3y ago

Nix, Caching, and CIs

jkarni
4pts0
news.ycombinator.com 3y ago

Show HN: Garnix, fast and easy CI for Nix

jkarni
120pts63
garnix.io 4y ago

Nix flakes, and how to convert to them

jkarni
5pts0
www.nytimes.com 4y ago

Ukraine calls for volunteers to disrupt Russian websites

jkarni
4pts0
radicle.xyz 7y ago

Radicle Architecture

jkarni
71pts18
www.radicle.xyz 7y ago

Radicle: A decentralized alternative to GitHub built on IPFS

jkarni
394pts82
turingjump.com 9y ago

To Tweet a Mockingbird

jkarni
3pts0
www.well-typed.com 10y ago

Efficient Amortised and Real-Time Queues in Haskell

jkarni
72pts15
haskell-servant.github.io 10y ago

Content-Type Bliss

jkarni
3pts0
haskell-servant.github.io 11y ago

Show HN: Servant – A Haskell web framework with type-level API DSL

jkarni
55pts3
alpmestan.com 11y ago

Rethinking webservice and APIs in Haskell: servant 0.2

jkarni
4pts0
marginalrevolution.com 12y ago

On the future of Dogecoin, BitCoin, and other cryptocurrencies of the non-realm

jkarni
2pts0
www.nytimes.com 12y ago

Far-Off Planets Like the Earth Dot the Galaxy

jkarni
1pts0
github.com 12y ago

Actualvim – Sublime Text 3 input mode powered by Vim itself

jkarni
107pts111
github.com 13y ago

Show HN: xp – The pipe wildcard

jkarni
5pts0

bubbles are notoriously unpredictable and generally don't happen when they are loudly and widely proclaimed to happen any minute now.

Is that true? It seemed to me that the most common opinion before the recent Chinese real estate crash was that it was a bubble; architect friends of mine who worked in China said the government had no doubt prices were unreasonably high; the thing they remained hopeful about is whether a soft landing was possible. Similarly it seems like it was by no means an uncommon opinion in the Japanese asset bubble, NFTs, beanie babies, and even the dotcom boom that this is (to use Greenspan’s phrase leading up to the dotcom bubble) “irrational exuberance”.

It’s still helpful to eg fold different phases in Nix, and different derivation output.

I work on garnix.io, which is exactly a Nix-based CI alternative for GitHub, and we had to build a lot of these small things to make the experience better.

It’s to allow interpolation of packages and environments. But in practice we don’t use it that often, so we were thinking of switching the main function to using just a second string argument. (In other words, I agree.)

This is coming from David Sinclair, who claimed resveratrol was the fountain of youth (it wasn't, but he still managed to sell his resveratrol company for hundreds of millions), and pushed rather hard also on NAD/NMN despite only very preliminary and limited results (he also has interests in NMN companies, and has been involved in removing it from the supplement market in favor of that company's right to market it as a drug). More likely than a cure for aging, Sinclair just found another cure for too few cars in his garage.

https://khn.org/news/a-fountain-of-youth-pill-sure-if-youre-...

https://www.nutraingredients-usa.com/Article/2022/11/15/FDA-...

There are lots of advantages and disadvantages to both, and use cases where one or the other shines. A proper response would probably be a blog post in length, but in brief, I find that Nix really makes everything explicit. You can see the source code and it reflects everything that went into a build; you can also control every bit of it. It is, however, consequently generally more verbose, and also requires a bit more learning. Nix also tends to compose much more cleanly than docker.

Maybe an analogy: nix is a package-lock.json. Docker is a package.json (with no version bounds) and a node_modules directory. You can just copy that node_modules directory around so everyone has the same setup, but it's much harder to introspect than a lock file, and the way you go about updating it is deleting the folder and rebuilding everything - no fine-grained control over one specific dependency.

You need to get caching right if the builds aren't going to take forever, which is a bit of work, especially since smart GC is hard, and it can be slow (the nix store gets big very quickly!). Then you also would ideally provide that cache (as a nix store cache) for yourself and others, so you don't have to rebuild it. But GH Actions doesn't do that, so you need to find a way on your own, or pay for a service like Cachix. Pushing the nix cache can be quite slow. Then the logs are formatted in a very nix-unaware way, which makes it hard to find what you want. And Github doesn't yet even have M1 Mac VMs, so you would get to test/cache that. (I think it's also not possible to do other architectures, like aarch64.)

Also, for whatever reason (in addition to the specific ones above), GitHub action runners are just slow...

In short: garnix is faster, has more features, and is easier to set up.

I do care. I also was born in a developing country. (Though the correlation between development of country and proportion of green/renewable energy usage is I think quite low (and might not even be positive?) [0].)

I think access to software and services shouldn't be be based on the country you happen to live in, and I wouldn't want to contribute to that. But I would have thought either using a hosted service, or else self-hosting in a different country, are almost always options. Why is hosting CI on the other side of the planet for you a no-go?

(Also, I think right now a license that simply says "must be run with renewable energy" is infeasible almost everywhere still.)

[0] https://en.wikipedia.org/wiki/List_of_countries_by_renewable...

I think you're absolutely right that there are nuances such as what you described. More: I imagine there are very few offices/homes that run completely on clean energy - in the most naive formulation of the license, no one could test the software locally!

Likely first you'd need some progressive system (e.g.: no less than 80% now, no less than 100% by 2030).

But I disagree with you on that people in many countries would not be allowed to use the software - you would still be able to use the service (i.e., visit garnix.io, have it build things), or even host it yourself in a different country. Yes, countries with more green energy (rather than exclusively cheap energy) would benefit. But the countries with high green/renewable energy aren't even primarily rich ones [0], so I don't feel too bad about that.

Note that this argument only applies to services such as garnix, where you can still use the service (so it would be a bad license for, for example, a text editor).

[0] https://en.wikipedia.org/wiki/List_of_countries_by_renewable...

The main difference is that you don't have to host anything. For most people, setting up servers (likely for multiple architectures) is time consuming, expensive, and wasteful (since your server is sitting idle while you/your team sleep).

There are of course situations in which you'd prefer that, though!

There's not really space for lock-in with garnix - you really only need a flake.nix file, nothing garnix specific (or more precisely: at most a very simple 5 line YAML file). The idea is that "normal nix" is enough.

I hadn't heard of Garth Nix!

It was in fact from the German. I like the suggestion that the CI should feel like "nothing at all" (rather than the painful slow trial-and-error process of setting up most CIs, which makes you very much aware of them).

I also happen to live very near where Marlene Dietrich lived, who has a famous song in which "und sonst gar nichts/nix" is the refrain ("and nothing else") [0]. When garnix becomes a noun of its own, as here, it reads instead as "and otherwise, garnix", which I find mildly funny.

[0] https://www.youtube.com/watch?v=ahyLLX0tmD8

It isn't open-source yet (and might never be). But it also might, as I said in a sibling comment, I've been thinking about a license that would require only running it (and derived software) on green energy; that way, if competition were to arise, cheaper/dirtier energy wouldn't be what we would be competing on. But figuring out whether that's plausible, and what the consequences of the decision would be, is hard.

(In general the idea of a license that's viral like GPL, but oriented towards green and renewable energy, seems like an interesting thought to me.)

Glad you're liking it!

I've been working on simplified hosting for nixosConfigurations; likely I'll launch paid plans along with that, since otherwise costs will be too high for me to shoulder, and anyhow free hosting leads to abuse or the moral hazard of accidentally using too many resources. I still have some hope for a donation-based system for individuals, and paid plans for companies, though.

I do think about open-sourcing it as well. I've been thinking about a license that would require only running it (and derived software) on green energy; that way, if competition were to arise, cheaper/dirtier energy wouldn't be what we would be competing on. But figuring out whether that's plausible, and what the consequences of the decision would be, is hard!

I don't fully understand it yet, but I think it resumes twice, adds the results, and divides by two.

the `| flip ()` is pattern matching on that effect term, I believe. So essentially: when you see `flip ()` inside anything in the argument of `expected_value`, capture the continuation there, run that argument once with `true` and once with `false`, add the results, divide by two.