Fork me on GitHub
#off-topic
<
2018-06-04
>
borkdude09:06:29

anyone doing cool stuff with the nix package manager?

pesterhazy09:06:04

@borkdude it's a ton of fun

borkdude10:06:50

@pesterhazy how are you using it?

pesterhazy11:06:00

there's four ways you can use it - nixos on a laptop - nixos on a server - using nix on Ubuntu/Fedora/MacOS as an overlay to install some tools - using nix to build a dev env

bendlas11:06:37

@borkdude definitely, I've even got some clojure tooling for it, laying around ...

pesterhazy11:06:59

surprisingly to me the most useful option is to install it a a Linux distro on a laptop, the declarative configuration style is super useful

pesterhazy11:06:45

personally for Clojure/Java nix is really not as significant, given that Maven repos work well

pesterhazy11:06:31

the downside of NixOS is that you need to adapt every program to make it work (even if the adaption is often a simple patch)

pesterhazy11:06:46

it's a bit exhausting

bendlas11:06:10

You can get most software working unmodified with buildFHSUserEnv, though ..

pesterhazy11:06:31

right, but even then you need a nix expression to get it to run

bendlas11:06:00

well, that can be the same one for every program, you just add dependencies, as you would with any other PM

pesterhazy11:06:16

don't get me wrong, the project is super impressive

borkdude11:06:20

@pesterhazy do you mean install NixOS on a laptop?

pesterhazy11:06:39

we organized the first nixos conference here in Berlin a few years back

pesterhazy11:06:56

I remember reading the Nix paper and being blown away by it

borkdude11:06:10

NixOS for a linux server, recommended?

pesterhazy11:06:11

@borkdude yeah as the main distro

borkdude11:06:33

what’s the benefit of NixOS compared to just Debian or whatever + installing nix?

pesterhazy11:06:45

on the server it depends on what you need, but Debian has a lot more resources out there

bendlas11:06:09

yep, I definitely want to make it to next nix conf. I've been using it exclusively for 3 years now, after I didn't get what I wanted from Gentoo or Arch and I'm happy now

borkdude11:06:21

or maybe Ubuntu since this server doesn’t have to be very stable, it’s for personal use

pesterhazy11:06:23

to me it's not worth it, in this day and age of containers

bendlas11:06:37

I'm also helping maintain NixOS, so if anybody wants to do stuff with Nix and Clojure, I'd like to be involved ..

borkdude11:06:41

I wanted to use nix to replace docker stuff

pesterhazy11:06:03

@borkdude if you want to learn the ins and outs of Unix, bash scripting and build systems, I recommend nix

pesterhazy11:06:47

if that's not something you're interested in, Ubuntu + Docker is probably easier

borkdude11:06:31

@pesterhazy three options: 1) NixOS, 2) Ubuntu + nix, 3) Ubuntu + Docker. Right now I’m thinking of 2, since there’s only one thing to learn and I’m not restricted by NixOS (I’m not yet sure what it involves, need to study it more).

borkdude11:06:11

I already use Docker, but I like the idea of nix after playing around with it this morning

pesterhazy11:06:59

conceptually nix is superior to docker but unfortunately it doesn't have the hype factor

borkdude11:06:05

it’s probably also more light weight than running Docker containers

bendlas11:06:43

it's been around since 2007 and it's been super stable for me, where as with docker, I've run into weird networking bugs ...

bendlas11:06:08

Nix also has containers built in, but it's not based on docker, but systemd-container. see nixos-container

pesterhazy11:06:25

you can also build docker containers based on nix

pesterhazy11:06:06

I agree that nix is pretty stable (and nixos is surprisingly complete)

borkdude11:06:34

if you want to do a nix-shell foo.nix with a shell hook, but you want it to execute just one thing, just add exit to the hook?

borkdude11:06:45

or does nix have a different command than nix-shell for this?

borkdude11:06:48

e.g. I want to execute a lumo script, but don’t need to stay in the shell

bendlas11:06:59

hooks are rather meant for setting up ENV vars and such ..

bendlas11:06:07

@borkdude otherwise, that's what the --run and --command flags on nix-shell are for ..

bendlas11:06:10

there is also a property, to specify the command right in the shell.nix expression (replacing bash), but I don't know it from the top of my head ...

borkdude11:06:51

I need to do e.g. this:

#! /usr/bin/env nix-shell
#! nix-shell -i bash -p nodejs-9_x yarn

yarn install

borkdude11:06:35

cool, I think --command is what I want

bendlas16:06:16

nix-shell -I "nixpkgs=/path/to/nixpkgs" -p yarn

bendlas16:06:23

or even nix-shell -I "nixpkgs=" -p yarn

hlolli13:06:59

@borkdude are you useing unstable?

hlolli13:06:25

let
  unstable = import <nixos-unstable> {};
....
environment.systemPackages  with pkgs; [ unstable.yarn ...

valtteri14:06:38

Microsoft is buying GitHub. 🙀 I really hope the talks that M$ has changed are true and they don’t destroy it.

valtteri14:06:44

(I still remember what you did to Nokia!)

emil0r14:06:42

If it was still under Balmer I would understand the sentiment. I believe it’s more prudent to adopt a wait and see stance in this case

borkdude14:06:02

@hlolli I probably need to spend more time how to configure these packages, I only did a short tutorial this morning, but was already impressed 🙂

cvic14:06:03

Well, time to move to Gitlab

hlolli14:06:45

I'm very much a newb in alternatives to github, sourceforge was dying as I started to program. I know mecurial tough. But I'm confused that the link says gitea but you say gitlab, is it the same thing? @victor.cleja

tatut14:06:28

gitlab is pretty nice

dpsutton14:06:43

it was prefaced with an or

tatut14:06:54

and they have a simple “import from github” functionality, which is under heavy use right now

hlolli14:06:17

Gitea is a community managed fork of Gogs, lightweight code hosting solution written in Go and published under the MIT license. this isn't gitlab tough ? @tatut

hlolli14:06:54

haha OR ooops

hlolli14:06:03

now I see what @dpsutton ment

hlolli14:06:13

dyslexia induced caffine shortage

dpsutton14:06:30

i had the same initial reaction

3Jane14:06:49

@hlolli as I understand it, basically you have git, and then you have various hosting providers who host your “master” repos + add extra sugar around that (like profiles, stats, access restrictions, ticketing systems and whatnot)

👍 4
hlolli14:06:04

exacly, and I think many free software hackers will want to ditch the provider "GitHub Inc." today 😛 or anyone who doesn't like microsoft.

jgh14:06:36

feels a little weird having one of the tech vacuums in charge of everybody's code

3Jane14:06:38

we’ll see. it provides the value of a social network, so there will need to be a critical mass of people migrating away.

jgh14:06:08

even if im not exactly against Microsoft, I am against a FAANG* having access to code repos

jgh14:06:48

(obviously public repos are a different story, but i use the private repos on github extensively)

jgh14:06:55

(and so do lots of companies)

3Jane14:06:16

if you’re running on a scripting language, Amazon already has all your base

jgh14:06:43

i am not.

jgh14:06:52

(also i use digitalocean ;))

3Jane14:06:01

(high five!)

tbaldridge14:06:06

I've hated MS for years, but that mostly stopped when they got their latest CEO. The MS of today is way different from the way it was 15 years ago

☝️ 8
dpsutton14:06:18

i trust Microsoft to obey licenses of code repos more than a random startup though

tbaldridge14:06:40

Gitlab, Bitbucket, etc are still great, but I doubt people will switch enmass yet.

jgh14:06:41

sure but random startup has a lot less power to do something abusive with those code repos

3Jane14:06:55

…and a loss of reputation can end a startup, but not Microsoft.

3Jane14:06:23

We’ll see 🙂 too early to tell, not worth panicking. But I will take a look at gitlab because why not?

tbaldridge14:06:31

Except when a small company gets sued it just dies and some VCs move on. With MS the stock falls and then a lot of people get really mad

dpsutton14:06:47

accusing microsoft of stealing hosted code would open a flood gate of lawsuits and end microsoft as well. there are 58 million repos on github

tbaldridge14:06:20

Yeah, and let's remember who MS is in this situation. They OSSed a lot of .NET under a very permissive license.

tbaldridge14:06:38

And they recently worked with Github to get the point where it can handle the entire Windows codebase

jgh14:06:07

again it's not so much about MS as it is any of the giant tech conglomerates. I guess MS is actually one of the better options out of the lot. At least it isn't Facebook.

tbaldridge14:06:19

Or Oracle 😄

😱 4
tbaldridge14:06:53

I know people who've used Bitbucket, Beanstalk, Gitlab, etc for years.

tbaldridge14:06:17

I guess I don't see that much has changed.

jgh14:06:31

bitbucket is ok, ill probably give gitlab a go. Still looking for the import tool though.

3Jane14:06:08

yeah, if it was Oracle, I’d be really worried.

tbaldridge14:06:17

I've liked Bitbucket in the past because they have free private OSS repos

jgh14:06:18

damn. circleci doesnt have gitlab integration.

borkdude14:06:00

BitBucket is nice for private repos but if you have a VPS running somewhere it’s not that hard to setup something and you can already push code using ssh when git is installed. It’s the social aspect of Github that is important for OSS, and alternatives should have something comparable in that area

borkdude14:06:46

(or you need JIRA in conjunction, yay)

tbaldridge14:06:49

Monopolies always stifle innovation and carry the risk of sudden change if the owning company changes. I just find it funny that no one cared until the past few days.

hlolli14:06:15

Well, if things go south and peeps move away from github, I will still miss the time, when just searching for github repo ment finding the source code, distopian future, searching many source control sites. But if we don't want to suffer a bit for freedom, we don't deserve it, like someone wise said.

jgh14:06:54

I take issue with "dystopian future". We're in the dystopian present, thank you very much.

✔️ 4
hlolli14:06:09

true 😄, the conveinence of monopoly. You can see conveinence living North-Korea, the government take care of everything for you. totally not justifyable or worth the conveinence.

borkdude14:06:56

I feel a new startup coming… something that can index a plethora of public git repos and provides great search on top of it and adds more social features like Trello, Slack-ish chat, etc.

burke06:06:23

https://bithublab.org/ only search but no social features 🙈

jgh14:06:31

and then it gets acquired by facebook for $37 billion dollars

borkdude14:06:44

right, but your code is still safe 😛

jgh14:06:16

what does it matter, facebook knows what we will think and what ideas we will have anyway

borkdude14:06:16

only search would already be worth it

borkdude15:06:00

Maybe searching in Bing becomes interesting now… I never used it before 😛

3Jane15:06:56

oh ho. I can see you’re not a bachelor.

borkdude15:06:11

what do you mean?

danm15:06:25

I seem to recall there was something a while back about how bing was the best search engine for porn, for some reason. Had a lot more specifically explicit images indexed and tagged than anyone else or something

borkdude15:06:04

thanks for explaining 😛

3Jane15:06:44

I’m sure I don’t know of any such thing! I meant … yeah that’s what I meant.

😂 4
tbaldridge18:06:17

Later on the OP admits that things have changed in the code and the case is a lot harder to prove.

tbaldridge18:06:46

and as someone else pointed out a DCMA notice would probably get the attention of MS.

tbaldridge18:06:13

I mean sure MS has lawyers, but large corporations (including MS when I worked there) are pretty wary of violating OSS licenses, the last thing they want was someone being able to claim ownership of some product. IDK, seems like something that could be cleared up by a few phone class and a PR saying "please mention my name under prior work"

tbaldridge18:06:58

But hey, this stuff happens all the time in OSS. How many projects technically rip-off Clojure's data structures and fail to copy in bits of the EPL attributing the code to Rich?

sundarj19:06:13

that's true

justinlee19:06:17

well if they just copy the way the functionality of the data structures i doubt copyright would cover that as a derivative work

☝️ 4
mpenet19:06:35

Does clojure source mention Bagwell?

tbaldridge19:06:06

@lee.justin.m That's pretty much the problem of the twitter example. "There were similarities in algorithms and function names"

justinlee19:06:15

obviously copyright isn’t everything. rich wasn’t required to mention bagwell, but he did and that’s the Right Thing To Do.

justinlee19:06:15

well maybe it isn’t obvious, but I don’t think it was required.

sundarj19:06:46

remixing in and of itself isn't a bad thing (quite the opposite; everything is a remix), it's when it becomes plagiarism through lack of attribution that it becomes a dick move (and sometimes illegal)

souenzzo19:06:56

There is how to allow binding of any var for testing proposes?

souenzzo20:06:39

Im using with-redefs but getting concurrence problems

souenzzo20:06:59

(two tests redefing at the same time)

fellshard21:06:23

"It's the most wonderful time of the year!"