Logs: liberachat/#haskell
| 2021-06-12 15:03:04 | <kuribas> | hmm, maybe using a lambda |
| 2021-06-12 15:04:05 | <kuribas> | ok, it's ugly but it works. |
| 2021-06-12 15:04:28 | → | Crypt9a2e joins (~Crypt9a2e@2409:4072:301:9da3:81fa:805a:fd5b:12a4) |
| 2021-06-12 15:05:00 | × | Crypt9a2e quits (~Crypt9a2e@2409:4072:301:9da3:81fa:805a:fd5b:12a4) (Read error: Connection reset by peer) |
| 2021-06-12 15:05:20 | → | Crypt9a2e joins (~Crypt9a2e@2409:4072:301:9da3:81fa:805a:fd5b:12a4) |
| 2021-06-12 15:05:21 | → | waleee joins (~waleee@h-98-128-228-119.NA.cust.bahnhof.se) |
| 2021-06-12 15:05:54 | → | bastelfreak joins (~bastelfre@basteles-bastelknecht.bastelfreak.org) |
| 2021-06-12 15:05:57 | <janus> | kuribas: prefix all your record fields with the name of their record. If your record is called StudentGroupBinding, it's fields could be prefixed with "sgb" |
| 2021-06-12 15:06:20 | <kuribas> | janus: that defeats the purpose for using them in the first place. |
| 2021-06-12 15:07:42 | <janus> | kuribas: i don't understand. the point of a record is to group a bunch of data and get one value that refers to them. if the fields have a prefix, that is still possible |
| 2021-06-12 15:08:33 | <kuribas> | I have types with a subset of fields. With recordWildCards I can do: toSmaller :: Bigger -> Smaller; toSmaller Bigger{..} = Smaller{..} |
| 2021-06-12 15:08:43 | <kuribas> | But it depends on them having the same name. |
| 2021-06-12 15:09:44 | <kuribas> | it saves a lot of boilerplate code. |
| 2021-06-12 15:11:08 | → | zebrag joins (~chris@user/zebrag) |
| 2021-06-12 15:11:18 | <janus> | ok, i can see how it breaks that usecase. many of my records have smart constructors that i am using with applicative syntax, so i can't be doing that anyway |
| 2021-06-12 15:11:44 | <janus> | i was told that the purescript records are much better, but i havn't tried them |
| 2021-06-12 15:12:22 | → | lavaman joins (~lavaman@98.38.249.169) |
| 2021-06-12 15:12:41 | <tomsmeding> | maerwald: lol |
| 2021-06-12 15:12:51 | <maerwald> | tomsmeding: not funny |
| 2021-06-12 15:12:53 | <tomsmeding> | and it's not even windows |
| 2021-06-12 15:13:21 | <janus> | kuribas: another approach is to have your data type be polymorphic and have "type Bigger = Polymorphic ExtraData" and "type Smaller = Polymorphic ()". then they can have the same fields ;) |
| 2021-06-12 15:13:30 | <maerwald> | tomsmeding: yes... I sorta had this vision... if someone married windows and unix principles, would that be nix? |
| 2021-06-12 15:13:43 | <maerwald> | powerful and bloated all the way |
| 2021-06-12 15:13:46 | × | hueso quits (~root@152.170.216.40) (Read error: Connection reset by peer) |
| 2021-06-12 15:14:03 | <kuribas> | janus: yeah, but bigger is autogenerated from a SQL schema :-) |
| 2021-06-12 15:14:42 | → | hueso joins (~root@152.170.216.40) |
| 2021-06-12 15:16:35 | → | nilof joins (~olofs@90-227-86-119-no542.tbcn.telia.com) |
| 2021-06-12 15:17:09 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 264 seconds) |
| 2021-06-12 15:20:52 | <DigitalKiwi> | doesn't seem to be nix related |
| 2021-06-12 15:20:54 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 2021-06-12 15:21:55 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 2021-06-12 15:23:20 | <DigitalKiwi> | ls /usr/bin/ |
| 2021-06-12 15:23:21 | <DigitalKiwi> | env |
| 2021-06-12 15:23:46 | <maerwald> | DigitalKiwi: I aborted and built it in 1/10th time with cabal |
| 2021-06-12 15:24:14 | <DigitalKiwi> | kiwi@mvp-nixos ~ []$ welke mkdir |
| 2021-06-12 15:24:18 | <DigitalKiwi> | /nix/store/wq2b68y4hi98zzm8p1jk7ybf23ly56m0-coreutils-8.32/bin/coreutils |
| 2021-06-12 15:24:33 | <tomsmeding> | wtf is 'welke' and why is that dutch |
| 2021-06-12 15:24:52 | <DigitalKiwi> | presumably it's which in dutch |
| 2021-06-12 15:24:55 | <tomsmeding> | it is |
| 2021-06-12 15:25:20 | <DigitalKiwi> | welke () { readlink -f "$(command -v "${1}")"} |
| 2021-06-12 15:25:21 | × | dunkeln quits (~dunkeln@94.129.65.28) (Ping timeout: 252 seconds) |
| 2021-06-12 15:26:01 | <tomsmeding> | when is that different from 'which'? |
| 2021-06-12 15:27:04 | <geekosaur> | when you start a new process to see it, you see what the next shell to open would see, not what your current shell sees |
| 2021-06-12 15:27:19 | <geekosaur> | this is why posix specifies "type" as a shell built-in |
| 2021-06-12 15:27:19 | × | zebrag quits (~chris@user/zebrag) (Remote host closed the connection) |
| 2021-06-12 15:27:23 | <DigitalKiwi> | kiwi@mvp-nixos ~ []$ which mkdir |
| 2021-06-12 15:27:25 | <DigitalKiwi> | /run/current-system/sw/bin/mkdir |
| 2021-06-12 15:27:30 | → | yoctocell_ joins (~yoctocell@h87-96-130-155.cust.a3fiber.se) |
| 2021-06-12 15:28:25 | × | yoctocell_ quits (~yoctocell@h87-96-130-155.cust.a3fiber.se) (Client Quit) |
| 2021-06-12 15:28:33 | × | haltux quits (~haltux@a89-154-181-47.cpe.netcabo.pt) (Ping timeout: 264 seconds) |
| 2021-06-12 15:28:56 | → | yoctocell joins (~yoctocell@h87-96-130-155.cust.a3fiber.se) |
| 2021-06-12 15:29:05 | <DigitalKiwi> | https://mostlyabsurd.com/files/2021-06-12-152839_2202x1023_scrot.png |
| 2021-06-12 15:30:06 | <DigitalKiwi> | the next message from them was a gist to welke lol |
| 2021-06-12 15:30:22 | → | wallymathieu joins (~wallymath@81-234-151-21-no94.tbcn.telia.com) |
| 2021-06-12 15:30:41 | <DigitalKiwi> | any more questions |
| 2021-06-12 15:30:48 | → | fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) |
| 2021-06-12 15:33:05 | → | dunkeln joins (~dunkeln@94.129.65.28) |
| 2021-06-12 15:33:21 | → | sedeki joins (~textual@user/sedeki) |
| 2021-06-12 15:34:23 | <DigitalKiwi> | anyway i think maerwald is probably having PATH issues since...it's not actually using nix |
| 2021-06-12 15:34:47 | → | zebrag joins (~chris@user/zebrag) |
| 2021-06-12 15:35:31 | → | zmt00 joins (~zmt00@user/zmt00) |
| 2021-06-12 15:37:32 | × | sedeki quits (~textual@user/sedeki) (Client Quit) |
| 2021-06-12 15:39:15 | × | da39a3ee5e6b4b0d quits (~textual@2403:6200:8876:2955:f1c5:68ee:212f:e12f) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 2021-06-12 15:39:24 | ← | jakalx parts (~jakalx@base.jakalx.net) (Error from remote client) |
| 2021-06-12 15:40:24 | <maerwald> | well, nix is in PATH |
| 2021-06-12 15:40:33 | <maerwald> | The rest is up to nix, not me |
| 2021-06-12 15:40:34 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 2021-06-12 15:40:51 | <DigitalKiwi> | https://www.youtube.com/watch?v=0XH3oMNKApI this is really about nix |
| 2021-06-12 15:41:06 | × | jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 268 seconds) |
| 2021-06-12 15:45:11 | <DigitalKiwi> | i don't know who's responsibility it is to make the PATH right |
| 2021-06-12 15:46:15 | <tomsmeding> | geekosaur: and... how is that different exactly? it's not like a new process would suddenly get a different environment than the current process magically |
| 2021-06-12 15:46:39 | <DigitalKiwi> | you very clearly do not want it to work though and i don't know enough to help nor do you want helped so *shrug* |
| 2021-06-12 15:47:22 | <geekosaur> | tomsmeding, PATH doesn't have to be exported from a shell to be used, plus there's caching of seen commands so changes aren't necessarily visible immediately |
| 2021-06-12 15:47:49 | <tomsmeding> | geekosaur: ah right |
| 2021-06-12 15:47:53 | × | dunkeln quits (~dunkeln@94.129.65.28) (Ping timeout: 268 seconds) |
| 2021-06-12 15:48:07 | <tomsmeding> | having an unexported modified PATH sounds like a recipe for trouble though |
| 2021-06-12 15:48:08 | <DigitalKiwi> | i can nixos-rebuild switch and that /run/current-system/sw/bin/mkdir will no longer point to /nix/store/wq2b68y4hi98zzm8p1jk7ybf23ly56m0-coreutils-8.32/bin/coreutils |
| 2021-06-12 15:48:38 | × | lbseale quits (~lbseale@user/ep1ctetus) (Read error: Connection reset by peer) |
| 2021-06-12 15:48:45 | <DigitalKiwi> | or even just nix-shell nix-env etc... |
| 2021-06-12 15:53:19 | × | fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Remote host closed the connection) |
| 2021-06-12 15:53:48 | <geekosaur> | tomsmeding, in general it is. csh auto-exported changes to $path for that reason, and you can still set that behavior in zsh iirc |
| 2021-06-12 15:53:55 | <DigitalKiwi> | kiwi@mvp-nixos ~ []$ echo $NIX_PATH |
| 2021-06-12 15:54:00 | <DigitalKiwi> | /home/kiwi/.nix-defexpr/channels:nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos:nixos-config=/etc/nixos/configuration.nix:/nix/var/nix/profiles/per-user/root/channelskiwi@mvp-nixos ~ []$ echo $PATH/home/kiwi/bin:/run/wrappers/bin:/home/kiwi/.nix-profile/bin:/etc/profiles/per-user/kiwi/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin |
| 2021-06-12 15:57:06 | <tomsmeding> | geekosaur: if a shell variable is already set to exported, then the variable isn't any different from the exported one, right? |
| 2021-06-12 15:57:24 | <tomsmeding> | so "auto-exporting changes to $path" sounds like a redundant statement to me assuming that PATH is exported anyway |
| 2021-06-12 15:57:39 | <geekosaur> | correct, but shell variables don't inherit that from being imported |
| 2021-06-12 15:57:47 | <geekosaur> | which is weird and counterintuitive |
| 2021-06-12 15:58:18 | → | ubert joins (~Thunderbi@p200300ecdf259ddf6d4493bcfbeaba19.dip0.t-ipconnect.de) |
| 2021-06-12 15:58:24 | <geekosaur> | so while a shell's $PATH comes in from the environment, it is not marked as exported; the shell has to do an explicit `export PATH` for its changes to get exported |
| 2021-06-12 15:59:20 | <tomsmeding> | ...no? $ bash -c 'echo $PATH' ; PATH="abc:$PATH" ; bash -c 'echo $PATH' |
| 2021-06-12 15:59:34 | <tomsmeding> | the second time it shows an abc-prefixed path for me |
| 2021-06-12 16:00:14 | <geekosaur> | are you sure something didn't do an export earlier, maybe in your dotfiles? |
| 2021-06-12 16:00:19 | <tomsmeding> | but perhaps this is shell-dependent (this example is in bash) |
| 2021-06-12 16:00:25 | <geekosaur> | it doesn't have to be repeated on every change. |
| 2021-06-12 16:00:26 | <tomsmeding> | oh right |
| 2021-06-12 16:00:33 | <tomsmeding> | oh that's dumb |
| 2021-06-12 16:00:37 | <geekosaur> | yeh |
| 2021-06-12 16:00:46 | <geekosaur> | weird and nonintuitive, like I said |
| 2021-06-12 16:01:25 | <geekosaur> | and rather than fix it, POSIX specified ways to see what's really going on |
| 2021-06-12 16:02:12 | → | lavaman joins (~lavaman@98.38.249.169) |
All times are in UTC.