<clever>
if both networks are on the same channel, you can use a special command to create a second wlan interface, and then control each independantly
<clever>
also depends on the driver
<clever>
simpson: i just leave /etc/wpa_supplicant.conf untouched by nix, and do wpa_passphrase name pw >> /etc/wpa_supplicant.conf
<clever>
anelson-: for example, nix-shell '<nixpkgs>' -A haskell.packages.ghcjs.acme-kitchen-sink.env
<clever>
anelson-: you must use the .env attribute on the derivation when using nix-shell
<clever>
more so the caller wont loose the reference unexpectedly
<clever>
it adds it to a queue, and the event loop will delete it when you return control back to the event loop
<clever>
QT has a this->deleteLater() to prevent that kind of issue
<clever>
yeah
<clever>
and if the member function never uses "this", you can call functions on a null pointer
<clever>
Ralith: for non-virtual functions, the compiler is dumb, and will just set "this" to whatever you dereferenced, even if its invalid
<clever>
and you would have to mess with "this" every time you use it
<clever>
the value of "this" would include the type
<clever>
oh, yeah, this could pose a problem
<clever>
*args[1]->listElems()[n]
<clever>
and if its a thunk, it will run it, and apply the above check
<clever>
this will throw an error if the Value in [1] isnt a list
<clever>
state.forceList(*args[1], pos);
<clever>
nearly all access to the Value objects goes thru a small api
<clever>
that could work, but due to the lazy evaluation, it might always be too late to apply
<clever>
brb
<clever>
how would you use them in nixexpr?
<clever>
Ralith: how will tagged pointers, that have been copied to 4 different places, handle the type of the object changing?
<clever>
then if any of them are accessed, the type held inside the Value changes from Thunk to something else
<clever>
it copies the Value* for f, into the slots a, b, c, and all 3 have the same address pointing to the same Value object
<clever>
when i do let f = complex_function in { a = f; b = f; c = f; }
<clever>
they cant do what nix requires
<clever>
yeah
<clever>
thats the problem i can see with trying to use them in nix
<clever>
so that all references to the function* become references to the first byte of the char[20]
<clever>
Ralith: and then i want to dynamicaly replace that function* with a full char[20], without changing the address
<clever>
Ralith: but if i start out with a function* that is stored at a multiple of 16, and type embeded into it
<clever>
Ralith: i believe a tagged pointer is basicaly taking a char* that was allocated to a multiple of 16, and then using the low-order bits to store some type info?
<clever>
Ralith: and nix doesnt know what the size will become, or the back-references
<clever>
Ralith: upon running, that mutates into another type, and all references must follow that change
<clever>
Ralith: the problem, is that things start out refering to a Value of type thunk, which is a function pointer + argument pointer
<clever>
because all allocations are rounded to the next 16 bytes for ex
<clever>
Ralith: ooo, yeah
<clever>
joepie91: every string in nix contains a list of context, what storepaths it depends on
<clever>
Ralith: ah, like putting the type directly before the value?
<clever>
thats what list1 and list2 are doing
<clever>
joepie91: first, you have the Value object for the string, then you have a normal char* containing the storepath, then you have a char** containing the context
<clever>
joepie91: for example, "${pkgs.hello}" is at least 3 heap objects, maybe more like 10 or 20
<clever>
joepie91: strings are also fatter then you think
<clever>
joepie91: so thats 5 heap allocations
<clever>
so [ 1 2 3 ] is 4 Value objects on the heap, a list, and 3 int objects, and the list points to an array of 3 Value pointers
<clever>
joepie91: the Value object then contains the type enum, and the int value
<clever>
joepie91: the list always containers pointers to Value objects on the heap
<clever>
joepie91: all lists greater then 2 in size are a pointer + size, but i believe nix expects a 1:1 mapping between Value instances, and the backing list
<clever>
Infinisil: when you delete a given Value object, nix wants to delete the entire list it points to
<clever>
Infinisil: and now that i think of it, nix has no way to know that the list is being depended on twice, as different sizes
<clever>
Infinisil: no such builtin
<clever>
is there a builtin to get the first N elements of a list?
<clever>
joepie91: hmmm, let me see...
<clever>
so map is just a matter of pre-allocating a list, and then setting out[x] = f in[x];
<clever>
but also, the map function knows the output size ahead of time
<clever>
yeah, recursively doing list ++ [ a ] will be a bit expensive, as it has to re-copy the pointers each time, and gc the old list
<clever>
so the cost is just copying arround $total pointers
<clever>
but because the Value objects are immutable, you can share the Value* between the source and destination
<clever>
if you want to append 2 lists together, you need to copy the pointers from the 2 lists, into a 3rd new list
<clever>
Ralith: yeah, its a contiguous array of Value*
<clever>
it makes lists smaller then 3 slightly faster to read, because there is one less level of indirection in ram
<clever>
listn, stores a pointer and size within the union
<clever>
joepie91: so, as a speed thing, the list1 and list2 types directly store the values in the union, right after the type enum
<clever>
joepie91: behind the scenes, nix uses a union type to hold the real value, and a lot of them are pairs of pointers (like a function* and argument*)
<clever>
joepie91: nix has 3 types of list, list1, list2, and listn
<clever>
joepie91: another random implementation detail
<clever>
joepie91: at parse time, it turns things into a massive chain of classes
<clever>
joepie91: which saves nix having to do a strcmp against "name"
<clever>
joepie91: so nix can just ask for the attribute at key State.sName
<clever>
and certain key names like "name" are specially pre-allocated, and their id# is stored in a global variable
<clever>
joepie91: behind the scenes, it looks the keyname (a string) up in a set, and then does int compares while iterating over the key=value pairs
<clever>
joepie91: there is one neat optimization ive noticed in nix, all attribute sets use ints as keys
<clever>
joepie91: another thought, if i can serialize the un-evaluated thunk, could i cache its result to disk?
<clever>
joepie91: if you can merge identical values, you can shrink the heap, and if you can safely merge identical thunks you could maybe speed up cpu time
<clever>
joepie91: one thing i was thinking about, if we can find back-references within the heap, could we dedup the heap?
<clever>
it may also be that the nixos modules i'm using are overly complex
<clever>
but if you just split them up into multiple networks, its fine
<clever>
Ralith: within a single deployment, i dont think it can pass 50
<clever>
it does
<clever>
and it scales linearly
<clever>
evaling a single node needs 2.1gig
<clever>
joepie91: 10 nixos machines in the nixops, each with 10 nixos containers
<clever>
and the GC in nix refuses to use more then 17gig
<clever>
joepie91: i discovered that one of my nixops deployment files needs 33gig of ram to eval
<clever>
joepie91: where you the one doing the entire syntax of nix?
2017-08-23
<clever>
neonfuz1, joepie91: when you do nix-env (-i|-e), it will read ~/.nix-profile/manifest.nix, apply the changes in ram, then build a new profile based on the resulting manifest (which also contains the new manifest.nix)
<clever>
|nix-shell)
<clever>
joepie91: the home directory of the user running (nix-build|nix-env
<clever>
dy2k: youll need to open an issue on nixpkgs
<clever>
and nix doesnt allow setuid files
<clever>
they put their own copy of ksu into the package, setuid'd
<clever>
ahhh, i see the problem
<clever>
dy2k: it looks like you just need to fill that in with a random value, and gitlab will use it to encrypt everything in the database
<clever>
only the official binary made by mozilla should have that level of trust
<clever>
__monty__: i think part of it, is so if nix makes a mistake while compiling it (bad deps or compile flags) and the binary is broken, it wont ruin mozilla's public image
<clever>
that goes into configuration.nix
<clever>
dy2k: did you try just doing services.gitlab.enable = true; ?
<clever>
and because its right in nix-env, there is no way to ever reuse that set in anything
<clever>
this is the function responsible for turning the directory into a set
<clever>
now i grep for the clang path inside ycmd
<clever>
and tracing the line up, i find /nix/store/g5ikya205nfy0h22a1lkkzs1lb7l9r1j-ycmd-2017-03-27
<clever>
so i just / to search for clang
<clever>
that shows the entire tree of deps starting at the root
<clever>
oops, doubled up
<clever>
so next, i run this command, on any one of the roots the previous command gave: nix-store -q --tree nix-store -q --tree /nix/var/nix/profiles/system-323-link
<clever>
kini: i havent looked into why, but you complete me does that
<clever>
no mater how much i GC, it will never go away, i must remove it from a config file and reboot
<clever>
and its a dep of the currently running nixos image
<clever>
its a dep of nixos itself
<clever>
so, it is a dependency of something i nix-env -i'd
<clever>
boomshroom: this will override llvm to add ninja to its build inputs, then open a shell suitable for building llvm, with that ninja
<clever>
boomshroom: but you could do this: nix-shell -E 'with import <nixpkgs> {}; llvm.overrideAttrs (drv: { buildInputs = drv.buildInputs ++ [ ninja ]; })'
<clever>
boomshroom: nix-shell can only do one of those at once
2017-08-22
<clever>
then check config.nix into git
<clever>
just set a rule that you only ever nix-env -ieA nixos.mystuff
<clever>
bendlas: that is basicaly what nix-env does, it manages a buildEnv in ~/.nix-profile/
<clever>
so you can add it to the config.nix, and then nix-env -iA it, to skip updating everything
<clever>
and nix-env -e firefox to imperatively remove something
<clever>
the major difference from the old buildEnv, is that these remain as seperate entities within nix-env, and you can just nix-env -iA nixos.firefox to upgrade something imperatively
<clever>
pstn: if it has privateNetworking = true; then it has no internet access, until you configure it seperately
<clever>
lejonet: checking the gist ...
<clever>
lol
<clever>
they just sent me an email, "how are you?"
<clever>
and mozilla has ears everywhere
<clever>
lejonet: can you make a gist containing the config you are using?
<clever>
lejonet: it uses buildEnv, so it should create a directory of symlinks when it needs to merge things
<clever>
dash: then it does both things at once
<clever>
dash: you could create a 2nd module, that sets nixpkgs.overlays and imports the 1st module
<clever>
lejonet: is it giving a warning at nixos-rebuild?
<clever>
dash: you can just add custom modules to the imports list
<clever>
but the kernel rejects any mach-o with a different dyld path
<clever>
the mach-o files have a field containing /usr/bin/dyld, which acts like ld.so
<clever>
ahh, then the kernel actively stops us from ever having such features :P
<clever>
and every time it updates itself, it unpatches itself
<clever>
except, it has to be patchelf'd to run on nixos
<clever>
Ankhers: so if they had just kept the phone as packets longer, it could have routed around the hole on its own
<clever>
Ankhers: and internet access was fully working, and ran over the same fiber
<clever>
do they turn it back into analog somewhere upstream?, and the failure was beyond that?
<clever>
Ankhers: and the strange part, is that my telephone goes over fiberoptic, the analog terminates in the basement, how am i hearing static on the line?
<clever>
Ankhers: atlantic canada
<clever>
the land-lines didnt even have a dial tone or busy tone, just static
<clever>
somebody managed to knock out telephone and tv service, for 3+ provinces
<clever>
something similar happened here about 2 weeks ago, on a bigger scale
<clever>
brb
<clever>
what have you tried so far?
<clever>
lejonet: how are you trying to install it?
<clever>
lejonet: what program are you running that does the conversion?
<clever>
lejonet: everything else is in /nix/store/
<clever>
lejonet: the only thing in /run is the symlink current-system
<clever>
lejonet: what about rxvt_unicode ?
<clever>
lejonet: so if you create a package containign share/terminfo/foo and add that to systemPackages, you will get a /run/current-system/sw/share/terminfo/foo