Logs on 2024-07-05 (liberachat/#haskell)
| 00:02:49 | <monochrom> | I'm drunk so I think we need row polymorphism over those 20 row polymorphism libraries! |
| 00:02:54 | <monochrom> | @quote monochrom debate |
| 00:02:54 | <lambdabot> | monochrom says: All pointless debates can be settled by going polymorphic. |
| 00:05:47 | <EvanR> | celebrating america day? |
| 00:11:02 | × | gmg quits (~user@user/gehmehgeh) (Quit: Leaving) |
| 00:14:49 | × | sawilagar quits (~sawilagar@user/sawilagar) (Ping timeout: 256 seconds) |
| 00:16:19 | → | xff0x joins (~xff0x@2405:6580:b080:900:5277:df26:6b07:8b52) |
| 00:21:01 | → | pyooque joins (~puke@user/puke) |
| 00:21:01 | × | puke quits (~puke@user/puke) (Killed (copper.libera.chat (Nickname regained by services))) |
| 00:21:01 | pyooque | is now known as puke |
| 00:22:15 | × | puke quits (~puke@user/puke) (Max SendQ exceeded) |
| 00:23:30 | → | puke joins (~puke@user/puke) |
| 00:24:43 | × | puke quits (~puke@user/puke) (Max SendQ exceeded) |
| 00:26:00 | → | puke joins (~puke@user/puke) |
| 00:30:56 | × | califax quits (~califax@user/califx) (Quit: ZNC 1.8.2 - https://znc.in) |
| 00:31:20 | → | califax joins (~califax@user/califx) |
| 00:33:27 | × | malte quits (~malte@mal.tc) (Ping timeout: 252 seconds) |
| 00:34:45 | → | dysthesis joins (~dysthesis@user/dysthesis) |
| 00:34:45 | <dmj`> | lain`: you'd think the compiler would have that by now |
| 00:43:54 | → | malte joins (~malte@mal.tc) |
| 01:01:51 | × | Tuplanolla quits (~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) (Quit: Leaving.) |
| 01:13:07 | → | tomku joins (~tomku@syn-141-126-184-057.res.spectrum.com) |
| 01:14:22 | × | tomku|two quits (~tomku@syn-141-126-184-057.res.spectrum.com) (Ping timeout: 264 seconds) |
| 01:15:14 | → | AlexNoo_ joins (~AlexNoo@178.34.160.84) |
| 01:15:46 | × | AlexZenon quits (~alzenon@178.34.160.84) (Ping timeout: 268 seconds) |
| 01:16:57 | × | AlexNoo quits (~AlexNoo@178.34.160.84) (Ping timeout: 255 seconds) |
| 01:22:13 | → | AlexZenon joins (~alzenon@178.34.160.84) |
| 01:43:47 | × | joeyadams quits (~joeyadams@2603:6010:5100:2ed:ef2:fbb7:f346:1550) (Quit: Leaving) |
| 02:05:53 | <jackdk> | I have a record that contains a very large field, and code that tries to overwrite that field with an empty value (so I can keep the record around without a massive space leak), but nothing yet forces the thunk which does the update. Are there any common idioms for forcing a record field? At this stage there are no bang patterns in play |
| 02:07:01 | <geekosaur> | usually you just declare the field to be strict, I think |
| 02:07:06 | <jackdk> | I suppose I could do `let record' = record { field = mempty } in seq (field record') record'` but maybe there's something better? |
| 02:07:09 | <jackdk> | yeah ok |
| 02:16:49 | × | xff0x quits (~xff0x@2405:6580:b080:900:5277:df26:6b07:8b52) (Ping timeout: 268 seconds) |
| 02:25:21 | <monochrom> | https://vaibhavsagar.com/blog/2024/07/03/ghci-in-the-browser/ haha "as long as ... you are willing to download ~700MB of WASM." |
| 02:26:53 | <haskellbridge> | <vaibhavsagar> we really should do something about that |
| 02:27:18 | <monochrom> | ohai... heh |
| 02:27:45 | <geekosaur> | so you can kill the other half of maerwald's phone? 😈 |
| 02:27:56 | <monochrom> | hahaha |
| 02:28:50 | <haskellbridge> | <vaibhavsagar> tbf I don't think that had anything to with the size of the WASM bundle |
| 02:28:59 | <jackdk> | vaibhavsagar: just tell them it's an LLM and they'll happily download binary blobs of arbitrary size |
| 02:29:21 | <haskellbridge> | <vaibhavsagar> that's a stunningly good idea |
| 02:29:42 | <haskellbridge> | <vaibhavsagar> LLMda |
| 02:29:58 | <monochrom> | Hot take: Haskell compiler : small language model :: C++ compiler :: large language model |
| 02:30:58 | <haskellbridge> | <vaibhavsagar> my WASM blob includes a full installation of g++ |
| 02:31:10 | <haskellbridge> | <vaibhavsagar> so it should maybe be the other way round |
| 02:32:02 | <monochrom> | Oh I'm joking on (small/large language) not (small/large model) :) |
| 02:32:45 | <monochrom> | OK so GHC is a large model for a small language, sosad |
| 02:33:38 | × | dysthesis quits (~dysthesis@user/dysthesis) (Ping timeout: 260 seconds) |
| 02:38:51 | × | td_ quits (~td@i5387093F.versanet.de) (Ping timeout: 255 seconds) |
| 02:40:28 | → | td_ joins (~td@i53870914.versanet.de) |
| 02:51:37 | × | tomku quits (~tomku@syn-141-126-184-057.res.spectrum.com) (Remote host closed the connection) |
| 02:51:50 | → | tomku joins (~tomku@syn-141-126-184-057.res.spectrum.com) |
| 02:59:21 | → | Sgeo_ joins (~Sgeo@user/sgeo) |
| 03:02:33 | × | Sgeo quits (~Sgeo@user/sgeo) (Ping timeout: 256 seconds) |
| 03:05:17 | × | khumba quits (~khumba@user/khumba) () |
| 03:07:54 | → | xff0x joins (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) |
| 03:15:41 | → | aforemny_ joins (~aforemny@i59F516DC.versanet.de) |
| 03:16:38 | × | aforemny quits (~aforemny@i59F516FF.versanet.de) (Ping timeout: 256 seconds) |
| 03:36:29 | × | tomku quits (~tomku@syn-141-126-184-057.res.spectrum.com) (Ping timeout: 240 seconds) |
| 03:38:45 | → | tomku joins (~tomku@syn-141-126-184-057.res.spectrum.com) |
| 03:43:12 | × | tomku quits (~tomku@syn-141-126-184-057.res.spectrum.com) (Ping timeout: 252 seconds) |
| 03:43:59 | → | tomku joins (~tomku@syn-141-126-184-057.res.spectrum.com) |
| 03:46:36 | <haskellbridge> | <aaron> jackdk: Why do you need to force the field? Don't you just need to force record'? |
| 03:47:43 | <jackdk> | aaron: it's a record update of a record update, so AIUI I'd need to force the outer field so the inner update happens promptly |
| 03:52:42 | <haskellbridge> | <aaron> Oh, as in updating a nested record? |
| 04:00:25 | <haskellbridge> | <aaron> jackdk: for forcing a field I guess you can do let !field = x in record { field } |
| 04:00:52 | <jackdk> | Sounds good, thanks |
| 04:07:56 | <EvanR> | force field |
| 04:10:17 | <haskellbridge> | <aaron> -XForceField |
| 04:12:51 | × | dunj3 quits (~dunj3@kingdread.de) (Quit: ZNC 1.8.2+deb2+b1 - https://znc.in) |
| 04:13:30 | → | dunj3 joins (~dunj3@kingdread.de) |
| 04:14:36 | × | Square quits (~Square@user/square) (Ping timeout: 268 seconds) |
| 04:18:55 | × | euleritian quits (~euleritia@dynamic-176-002-133-146.176.2.pool.telefonica.de) (Read error: Connection reset by peer) |
| 04:19:13 | → | euleritian joins (~euleritia@77.22.252.56) |
| 04:23:40 | <haskellbridge> | <aaron> jackdk: also if you use lenses you can do "set fieldLens $! value" |
| 04:24:19 | <jackdk> | that would still need the outer record to be forced via `seq` or something, right? |
| 04:27:47 | <haskellbridge> | <aaron> er, fieldLens would have to be the lens for the nested record, not the field within it |
| 04:28:50 | <haskellbridge> | <aaron> wonder if there's a combinator for making a lens strict |
| 04:40:35 | × | chexum quits (~quassel@gateway/tor-sasl/chexum) (Read error: Connection reset by peer) |
| 04:40:57 | → | chexum joins (~quassel@gateway/tor-sasl/chexum) |
| 04:56:23 | → | michalz joins (~michalz@185.246.207.200) |
| 04:58:41 | → | aaronv joins (~aaronv@user/aaronv) |
| 05:02:46 | × | dfg quits (~dfg@user/dfg) (Remote host closed the connection) |
| 05:03:36 | → | dfg joins (~dfg@dfg.rocks) |
| 05:03:37 | × | dfg quits (~dfg@dfg.rocks) (Changing host) |
| 05:03:37 | → | dfg joins (~dfg@user/dfg) |
| 05:04:56 | × | dfg quits (~dfg@user/dfg) (Remote host closed the connection) |
| 05:05:11 | → | dfg joins (~dfg@user/dfg) |
| 05:15:24 | → | rosco joins (~rosco@175.136.155.137) |
| 05:27:56 | × | euphores quits (~SASL_euph@user/euphores) (Quit: Leaving.) |
| 05:30:17 | × | Sgeo_ quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 05:31:21 | × | Maeda quits (~Maeda@91-161-10-149.subs.proxad.net) (Quit: Yup, exiting...) |
| 05:44:08 | → | euphores joins (~SASL_euph@user/euphores) |
| 05:44:51 | → | acidjnk_new3 joins (~acidjnk@p200300d6e72cfb277d28f4d2e7a5b949.dip0.t-ipconnect.de) |
| 05:45:38 | × | chexum quits (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection) |
| 05:45:54 | → | chexum joins (~quassel@gateway/tor-sasl/chexum) |
| 05:50:08 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 05:52:28 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 05:54:09 | × | FragByte quits (~christian@user/fragbyte) (Ping timeout: 255 seconds) |
| 06:01:21 | × | tomku quits (~tomku@syn-141-126-184-057.res.spectrum.com) (Remote host closed the connection) |
| 06:01:39 | → | tomku joins (~tomku@syn-141-126-184-057.res.spectrum.com) |
| 06:08:48 | × | califax quits (~califax@user/califx) (Remote host closed the connection) |
| 06:09:11 | → | califax joins (~califax@user/califx) |
| 06:16:39 | → | Guest44 joins (~Guest54@122.115.224.163) |
| 06:22:38 | × | phma quits (~phma@2001:5b0:211f:df58:db5:77f1:4b7c:c21a) (Read error: Connection reset by peer) |
| 06:23:02 | × | aaronv quits (~aaronv@user/aaronv) (Remote host closed the connection) |
| 06:23:21 | → | aaronv joins (~aaronv@user/aaronv) |
| 06:23:52 | → | phma joins (phma@2001:5b0:210f:75d8:5712:dd76:7969:de0f) |
| 06:28:50 | × | ft quits (~ft@p4fc2ab80.dip0.t-ipconnect.de) (Quit: leaving) |
| 06:40:51 | → | lortabac joins (~lortabac@78.211.149.172) |
| 06:45:44 | × | lortabac quits (~lortabac@78.211.149.172) (Ping timeout: 256 seconds) |
| 06:47:08 | → | lortabac joins (~lortabac@78.210.203.177) |
| 06:53:19 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 06:53:24 | × | Yumemi quits (~Yumemi@2001:bc8:47a0:1b14::1) (Quit: .) |
| 06:53:49 | → | Yumemi joins (~Yumemi@2001:bc8:47a0:1b14::1) |
| 06:55:42 | → | oo_miguel joins (~Thunderbi@78.10.207.46) |
| 07:03:48 | × | Guest44 quits (~Guest54@122.115.224.163) (Ping timeout: 250 seconds) |
| 07:07:05 | → | gmg joins (~user@user/gehmehgeh) |
| 07:34:18 | → | codaraxis__ joins (~codaraxis@user/codaraxis) |
| 07:35:04 | × | visilii quits (~visilii@213.24.125.33) (Quit: ZNC - https://znc.in) |
| 07:35:23 | → | visilii joins (~visilii@213.24.125.33) |
| 07:38:06 | × | codaraxis___ quits (~codaraxis@user/codaraxis) (Ping timeout: 255 seconds) |
| 07:40:35 | × | aaronv quits (~aaronv@user/aaronv) (Ping timeout: 260 seconds) |
| 07:40:36 | → | sord937 joins (~sord937@gateway/tor-sasl/sord937) |
| 07:42:21 | → | misterfish joins (~misterfis@094190207253.static.ipv4.heldenvannu.net) |
| 07:58:19 | × | lortabac quits (~lortabac@78.210.203.177) (Quit: WeeChat 4.2.2) |
| 07:59:54 | → | aaronv joins (~aaronv@user/aaronv) |
| 08:05:00 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 08:05:37 | × | aaronv quits (~aaronv@user/aaronv) (Quit: Leaving) |
| 08:16:31 | → | chele joins (~chele@user/chele) |
| 08:18:18 | × | bliminse quits (~bliminse@user/bliminse) (Quit: leaving) |
| 08:27:24 | → | lortabac joins (~lortabac@78.210.203.177) |
| 08:32:53 | → | danse-nr3 joins (~danse-nr3@151.47.146.33) |
| 08:40:13 | <c_wraith> | over an arbitrary data type? |
| 08:41:25 | → | Tuplanolla joins (~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) |
| 08:43:52 | → | cfricke joins (~cfricke@user/cfricke) |
| 08:48:40 | × | danse-nr3 quits (~danse-nr3@151.47.146.33) (Ping timeout: 246 seconds) |
| 08:49:41 | × | misterfish quits (~misterfis@094190207253.static.ipv4.heldenvannu.net) (Ping timeout: 240 seconds) |
| 08:55:56 | → | lxsameer joins (~lxsameer@Serene/lxsameer) |
| 08:56:35 | → | misterfish joins (~misterfis@094190207253.static.ipv4.heldenvannu.net) |
| 08:57:05 | → | danse-nr3 joins (~danse-nr3@151.47.146.33) |
| 09:03:43 | <c_wraith> | Turns out you can write one, within certain limitations. nevermind me being like 5 hours late. |
| 09:03:44 | → | __monty__ joins (~toonn@user/toonn) |
| 09:14:26 | <albet70> | there's a list [1..99], get the summary of items from right to left below N, when N is 200, its [98,99], except scanr and traverse, is there other good way? |
| 09:15:03 | → | qqq joins (~qqq@92.43.167.61) |
| 09:16:20 | → | zetef joins (~quassel@2a02:2f00:5202:1200:3fa2:e908:b522:fa2f) |
| 09:16:20 | × | zetef quits (~quassel@2a02:2f00:5202:1200:3fa2:e908:b522:fa2f) (Client Quit) |
| 09:19:14 | × | qqq quits (~qqq@92.43.167.61) (Client Quit) |
| 09:21:50 | <ncf> | wut |
| 09:22:09 | → | sawilagar joins (~sawilagar@user/sawilagar) |
| 09:22:15 | → | qqe joins (~qqq@92.43.167.61) |
| 09:27:32 | <[exa]> | albet70: walk the "diagonal" of the matrix of all sums (that gives you roughly O(n) alg) |
| 09:27:52 | × | driib3 quits (~driib@vmi931078.contaboserver.net) (Quit: The Lounge - https://thelounge.chat) |
| 09:28:26 | → | driib3 joins (~driib@vmi931078.contaboserver.net) |
| 09:28:27 | <[exa]> | albet70: funnily, https://en.wikipedia.org/wiki/3SUM |
| 09:32:40 | × | qqe quits (~qqq@92.43.167.61) (Quit: leaving) |
| 09:33:07 | → | qqe joins (~qqq@92.43.167.61) |
| 09:34:22 | × | flounders_ quits (~flounders@24.246.176.178) (Quit: WeeChat 4.1.2) |
| 09:34:25 | × | qqe quits (~qqq@92.43.167.61) (Client Quit) |
| 09:34:43 | → | qqe joins (~qqq@92.43.167.61) |
| 09:40:42 | × | mikess quits (~mikess@user/mikess) (Ping timeout: 252 seconds) |
| 09:44:08 | → | bliminse joins (~bliminse@user/bliminse) |
| 09:57:47 | × | mzg quits (mzg@abusers.hu) (Remote host closed the connection) |
| 09:59:03 | × | tzh quits (~tzh@c-76-115-131-146.hsd1.or.comcast.net) (Quit: zzz) |
| 10:01:28 | × | lortabac quits (~lortabac@78.210.203.177) (Quit: WeeChat 4.2.2) |
| 10:09:50 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 10:13:36 | → | mzg joins (~mzg@abusers.hu) |
| 10:16:47 | × | rosco quits (~rosco@175.136.155.137) (Quit: Lost terminal) |
| 10:18:29 | × | mzg quits (~mzg@abusers.hu) (Ping timeout: 240 seconds) |
| 10:23:46 | → | mzg joins (mzg@abusers.hu) |
| 10:24:34 | × | misterfish quits (~misterfis@094190207253.static.ipv4.heldenvannu.net) (Ping timeout: 264 seconds) |
| 10:24:40 | → | vpan joins (~vpan@212.117.1.172) |
| 10:28:11 | → | ubert joins (~Thunderbi@p200300ecdf008f4b372e113240d6a5e8.dip0.t-ipconnect.de) |
| 10:31:06 | × | Fijxu quits (~Fijxu@user/fijxu) (Quit: XD!!) |
| 10:33:27 | → | Fijxu joins (~Fijxu@user/fijxu) |
| 10:54:15 | × | xff0x quits (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) (Ping timeout: 264 seconds) |
| 11:13:31 | → | lortabac joins (~lortabac@78.210.203.177) |
| 11:22:10 | × | danse-nr3 quits (~danse-nr3@151.47.146.33) (Ping timeout: 264 seconds) |
| 11:23:40 | → | wlhn joins (~wlhn@dl46fx8hbfttwvhb-h1ly-3.rev.dnainternet.fi) |
| 11:26:38 | → | waleee joins (~waleee@h-176-10-144-38.NA.cust.bahnhof.se) |
| 11:40:32 | × | sp1ff quits (~user@c-73-11-70-111.hsd1.wa.comcast.net) (Read error: Connection reset by peer) |
| 11:59:56 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 12:03:15 | → | misterfish joins (~misterfis@84.53.85.146) |
| 12:05:11 | × | euleritian quits (~euleritia@77.22.252.56) (Ping timeout: 268 seconds) |
| 12:06:12 | → | euleritian joins (~euleritia@dynamic-176-002-131-122.176.2.pool.telefonica.de) |
| 12:08:13 | × | euleritian quits (~euleritia@dynamic-176-002-131-122.176.2.pool.telefonica.de) (Read error: Connection reset by peer) |
| 12:08:39 | → | euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
| 12:10:18 | → | noumenon joins (~noumenon@2a01:799:cd8:e700:aa7e:eaff:fede:ff94) |
| 12:23:33 | × | meooow_ quits (~meooow@2400:6180:100:d0::ad9:e001) (Quit: q) |
| 12:23:48 | → | meooow joins (~meooow@165.232.184.169) |
| 12:24:46 | → | Square joins (~Square@user/square) |
| 12:29:59 | → | danse-nr3 joins (~danse-nr3@151.47.162.188) |
| 12:35:57 | × | waleee quits (~waleee@h-176-10-144-38.NA.cust.bahnhof.se) (Ping timeout: 268 seconds) |
| 12:35:58 | × | euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 264 seconds) |
| 12:36:38 | → | euleritian joins (~euleritia@dynamic-176-002-131-122.176.2.pool.telefonica.de) |
| 12:38:14 | × | danse-nr3 quits (~danse-nr3@151.47.162.188) (Remote host closed the connection) |
| 12:38:39 | → | danse-nr3 joins (~danse-nr3@151.47.162.188) |
| 12:50:22 | × | RedFlamingos quits (~RedFlamin@user/RedFlamingos) (Ping timeout: 264 seconds) |
| 13:01:53 | × | lortabac quits (~lortabac@78.210.203.177) (Quit: WeeChat 4.2.2) |
| 13:13:49 | × | Ranhir quits (~Ranhir@157.97.53.139) (Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/) |
| 13:16:23 | <haskellbridge> | <thirdofmay18081814goya> what's a good data type for a form that has specified fields? two of these fields are subforms and the rest of the fields are booleans, integers or string. it's a google compute instance declaration |
| 13:17:41 | → | ystael joins (~ystael@user/ystael) |
| 13:21:09 | → | lol__ joins (~lol@2603:3016:1e01:b940:39da:d80d:3ccf:6868) |
| 13:21:12 | × | Leary quits (~Leary@user/Leary/x-0910699) (Remote host closed the connection) |
| 13:21:13 | → | zmt01 joins (~zmt00@user/zmt00) |
| 13:21:26 | → | Leary joins (~Leary@user/Leary/x-0910699) |
| 13:21:34 | × | misterfish quits (~misterfis@84.53.85.146) (Ping timeout: 264 seconds) |
| 13:22:18 | × | lain` quits (lain`@user/lain/x-9874679) (Read error: Connection reset by peer) |
| 13:22:33 | → | lain` joins (lain`@user/lain/x-9874679) |
| 13:22:52 | → | misterfish joins (~misterfis@84.53.85.146) |
| 13:24:31 | × | lol_ quits (~lol@2603:3016:1e01:b940:61bf:729d:7923:1c8b) (Ping timeout: 260 seconds) |
| 13:24:33 | × | zmt00 quits (~zmt00@user/zmt00) (Ping timeout: 260 seconds) |
| 13:26:00 | → | Ranhir joins (~Ranhir@157.97.53.139) |
| 13:26:47 | AlexNoo_ | is now known as AlexNoo |
| 13:27:44 | → | xff0x joins (~xff0x@2405:6580:b080:900:c64a:ce6b:6071:dfe5) |
| 13:32:23 | × | Square quits (~Square@user/square) (Ping timeout: 268 seconds) |
| 13:41:20 | × | tomku quits (~tomku@syn-141-126-184-057.res.spectrum.com) (Remote host closed the connection) |
| 13:41:28 | <stefan-__> | when having shared values as in https://play.haskell.org/saved/1cyqlqTB .. what is the preferred procedere when for example "item1.label" needs to get updated? |
| 13:41:35 | → | tomku joins (~tomku@syn-141-126-184-057.res.spectrum.com) |
| 13:43:51 | → | Camdar joins (~Camdar@n11923770052.netvigator.com) |
| 13:44:25 | <Camdar> | hello, is this somewhere I can get help with megaparsec |
| 13:44:25 | <stefan-__> | or would it for example better to just use the identifiers in the tree/list, together with a "Map ItemId Item"? |
| 13:45:38 | × | incertia quits (~incertia@209.122.137.252) (Ping timeout: 268 seconds) |
| 13:49:50 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 260 seconds) |
| 13:52:50 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 13:54:49 | → | waleee joins (~waleee@h-176-10-144-38.NA.cust.bahnhof.se) |
| 13:55:27 | × | Camdar quits (~Camdar@n11923770052.netvigator.com) (Quit: Client closed) |
| 14:07:31 | <stefan-__> | Cam |
| 14:07:43 | <stefan-__> | oh, already gone |
| 14:12:34 | × | waleee quits (~waleee@h-176-10-144-38.NA.cust.bahnhof.se) (Ping timeout: 264 seconds) |
| 14:14:55 | → | ft joins (~ft@p4fc2ab80.dip0.t-ipconnect.de) |
| 14:25:18 | × | sord937 quits (~sord937@gateway/tor-sasl/sord937) (Ping timeout: 260 seconds) |
| 14:26:36 | → | soverysour joins (~soverysou@81.196.150.219) |
| 14:26:37 | × | soverysour quits (~soverysou@81.196.150.219) (Changing host) |
| 14:26:37 | → | soverysour joins (~soverysou@user/soverysour) |
| 14:29:04 | → | sord937 joins (~sord937@gateway/tor-sasl/sord937) |
| 14:31:04 | <haskellbridge> | <thirdofmay18081814goya> what's a state-of-the-art implementation of a parser i can use as a reference to improve my haskell |
| 14:34:21 | × | soverysour quits (~soverysou@user/soverysour) (Ping timeout: 268 seconds) |
| 14:44:19 | × | danse-nr3 quits (~danse-nr3@151.47.162.188) (Ping timeout: 260 seconds) |
| 14:46:29 | × | misterfish quits (~misterfis@84.53.85.146) (Ping timeout: 240 seconds) |
| 14:57:25 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 14:58:23 | × | mesaoptimizer quits (~mesaoptim@user/PapuaHardyNet) (Quit: mesaoptimizer) |
| 14:58:32 | → | mesaoptimizer joins (~mesaoptim@user/PapuaHardyNet) |
| 14:59:50 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 260 seconds) |
| 15:02:19 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 15:03:33 | × | Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 15:08:03 | × | euleritian quits (~euleritia@dynamic-176-002-131-122.176.2.pool.telefonica.de) (Ping timeout: 264 seconds) |
| 15:09:41 | → | euleritian joins (~euleritia@dynamic-176-002-131-122.176.2.pool.telefonica.de) |
| 15:10:34 | × | cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 4.2.2) |
| 15:10:46 | → | Joao[3] joins (~Joao003@190.108.99.178) |
| 15:13:53 | × | Joao[3] quits (~Joao003@190.108.99.178) (Read error: Connection reset by peer) |
| 15:14:52 | → | Joao[3] joins (~Joao003@190.108.99.178) |
| 15:16:34 | → | soverysour joins (~soverysou@user/soverysour) |
| 15:17:51 | × | tomku quits (~tomku@syn-141-126-184-057.res.spectrum.com) (Ping timeout: 252 seconds) |
| 15:19:08 | → | ubert1 joins (~Thunderbi@p200300ecdf008f96cbf35d83d33dbb30.dip0.t-ipconnect.de) |
| 15:19:23 | → | tomku joins (~tomku@syn-141-126-184-057.res.spectrum.com) |
| 15:19:59 | → | danse-nr3 joins (~danse-nr3@151.47.162.188) |
| 15:20:00 | × | ubert quits (~Thunderbi@p200300ecdf008f4b372e113240d6a5e8.dip0.t-ipconnect.de) (Ping timeout: 268 seconds) |
| 15:20:00 | ubert1 | is now known as ubert |
| 15:21:25 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 15:21:27 | × | danse-nr3 quits (~danse-nr3@151.47.162.188) (Remote host closed the connection) |
| 15:21:32 | × | soverysour quits (~soverysou@user/soverysour) (Ping timeout: 268 seconds) |
| 15:21:51 | → | danse-nr3 joins (~danse-nr3@151.47.162.188) |
| 15:22:37 | × | Joao[3] quits (~Joao003@190.108.99.178) (Quit: Bye!) |
| 15:24:18 | → | soverysour joins (~soverysou@81.196.150.219) |
| 15:24:19 | × | soverysour quits (~soverysou@81.196.150.219) (Changing host) |
| 15:24:19 | → | soverysour joins (~soverysou@user/soverysour) |
| 15:34:20 | × | myxos quits (~myxos@syn-065-028-251-121.res.spectrum.com) (Remote host closed the connection) |
| 15:34:23 | × | robotsnowfall quits (~robotsnow@user/robotsnowfall) (Quit: ZNC 1.9.0 - https://znc.in) |
| 15:34:46 | → | robotsnowfall joins (~robotsnow@user/robotsnowfall) |
| 15:35:02 | → | myxos joins (~myxos@syn-065-028-251-121.res.spectrum.com) |
| 15:35:28 | × | robotsnowfall quits (~robotsnow@user/robotsnowfall) (Client Quit) |
| 15:36:04 | → | robotsnowfall joins (~robotsnow@user/robotsnowfall) |
| 15:38:48 | → | incertia joins (~incertia@209.122.137.252) |
| 15:43:34 | × | danse-nr3 quits (~danse-nr3@151.47.162.188) (Read error: Connection reset by peer) |
| 15:43:50 | → | danse-nr3 joins (~danse-nr3@151.47.148.201) |
| 15:47:16 | × | chele quits (~chele@user/chele) (Remote host closed the connection) |
| 15:52:54 | × | robotsnowfall quits (~robotsnow@user/robotsnowfall) (Quit: ZNC 1.9.1 - https://znc.in) |
| 15:53:25 | → | robotsnowfall joins (~robotsnow@user/robotsnowfall) |
| 16:01:21 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 16:03:48 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection) |
| 16:05:14 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 16:05:19 | × | robotsnowfall quits (~robotsnow@user/robotsnowfall) (Quit: ZNC 1.9.1 - https://znc.in) |
| 16:06:54 | → | robotsnowfall joins (~robotsnow@user/robotsnowfall) |
| 16:08:16 | × | noumenon quits (~noumenon@2a01:799:cd8:e700:aa7e:eaff:fede:ff94) (Quit: Leaving) |
| 16:10:12 | → | mikess joins (~mikess@user/mikess) |
| 16:12:15 | × | robotsnowfall quits (~robotsnow@user/robotsnowfall) (Quit: ZNC 1.9.1 - https://znc.in) |
| 16:13:33 | → | robotsnowfall joins (~robotsnow@user/robotsnowfall) |
| 16:13:49 | <hololeap> | is it considered bad practice to pass a non-unary constructor around with "undefined" where the data should be? I was considering doing this so that one module decides which constructor is used, then another module fills in the blanks in a "case" statement |
| 16:15:07 | <c_wraith> | there is probably a better way for most use cases. |
| 16:15:46 | <hololeap> | I also know of e.g. barbies which would give a way to have the same data structures in uninitialized/initialized states, but it feels like overkill |
| 16:15:52 | <c_wraith> | also, that doesn't always work. There are constructors with strict fields. |
| 16:16:47 | <hololeap> | ok, it's probably best then to choose the constructor in the same module that is filling in the data |
| 16:16:59 | <hololeap> | just spitballing ideas |
| 16:17:24 | × | qqe quits (~qqq@92.43.167.61) (Ping timeout: 255 seconds) |
| 16:17:25 | <c_wraith> | I still don't really understand what you want. |
| 16:17:29 | <danse-nr3> | me neither |
| 16:17:35 | <hololeap> | c_wraith: it sounds like you do |
| 16:18:05 | <c_wraith> | well I understand what you're suggesting as a solution. But I don't understand the problem you're suggesting it as a solution to |
| 16:19:51 | <danse-nr3> | for Either Int Int, for instance, you can have one function opting for Left and Right and another function providing the Int, just to make a silly example about what you described |
| 16:20:28 | <haskellbridge> | <thirdofmay18081814goya> what are some very small haskell repositories that exemplify good haskell |
| 16:21:29 | <danse-nr3> | how can they "exemplify good haskell" when, by being very small, they would include just a fraction of it? |
| 16:21:57 | <c_wraith> | hololeap: like, talking about uninitialized states makes me think you're trying to avoid having different data types for request/response to some api. Is that even remotely close? |
| 16:21:58 | × | tomku quits (~tomku@syn-141-126-184-057.res.spectrum.com) (Ping timeout: 268 seconds) |
| 16:22:22 | <hololeap> | the way I have this program organized is to have a big ADT in its own module that represents all the valid modes of the program, and the actual work being done is separated into other modules. my original idea was to have the ADT module also include conversion functions that translate the ADT to types that are specialized for the other parts of the code. however the ADT module does not contain any of the code necessary to fill in the blanks for these |
| 16:22:22 | <hololeap> | constructors |
| 16:23:10 | <hololeap> | it's not really a "problem" I'm trying to solve, just painting myself into a corner with the way I'm organizing things :p |
| 16:23:35 | → | tomku joins (~tomku@syn-141-126-184-057.res.spectrum.com) |
| 16:24:07 | <haskellbridge> | <thirdofmay18081814goya> danse-nr3: personal preferences, instance of bits of haskell code that follow best practices |
| 16:24:12 | <hololeap> | hope that made sense |
| 16:24:23 | <haskellbridge> | <thirdofmay18081814goya> * instances of bits of haskell code that follow best practices according to whoever |
| 16:24:44 | <danse-nr3> | that would just be misleading |
| 16:25:07 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 16:25:53 | <danse-nr3> | if not deceptive |
| 16:25:58 | <c_wraith> | hololeap: In some sense it's bad for type safety to make uninitialized values the same type as usable values. |
| 16:26:45 | → | akira-sijk joins (~akira-sij@27.47.33.155) |
| 16:27:33 | <danse-nr3> | but also it sounds like a problem in organising dependencies. This big ADT type is made of smaller types i guess. Do conversions need to take the whole ADT in order to produce what is modularly needed? |
| 16:28:16 | <c_wraith> | hololeap: But I'm overall unimpressed with the barbies-like approaches as well. I find they really lack the granularity to express "I know these three fields, but not those five" |
| 16:28:42 | <hololeap> | good points |
| 16:28:46 | × | soverysour quits (~soverysou@user/soverysour) (Ping timeout: 264 seconds) |
| 16:29:07 | ← | akira-sijk parts (~akira-sij@27.47.33.155) () |
| 16:29:16 | × | rdcdr quits (~rdcdr@user/rdcdr) (Quit: ZNC 1.8.2+deb3.1 - https://znc.in) |
| 16:29:26 | → | destituion joins (~destituio@2a02:2121:6bc:1a95:cb10:e092:4032:88f5) |
| 16:29:44 | <c_wraith> | in the end, I just create new types for new cases. If all I know are these three fields, I dig into *why* that's true, then create a new data type that contains those three fields and document when it's the right thing to use. |
| 16:30:04 | × | destituion quits (~destituio@2a02:2121:6bc:1a95:cb10:e092:4032:88f5) (Remote host closed the connection) |
| 16:31:03 | <c_wraith> | If I'm getting a lot of ad-hoc types out of that, it's time to consider refactoring so that the cases all follow clearly-delineated patterns |
| 16:31:08 | <hololeap> | danse-nr3: to some degree, yes. it's a CLI program and the way that arguments interact with each other is fairly complex, so I have it separated into: 1) a model of the possible command line options given by the user 2) conversion/parsing/validation to an ADT of possible valid modes of the program 3) conversion of this ADT to types that control the behavior of other parts that are doing the actual work |
| 16:32:05 | <hololeap> | anyway, I think the most straightforward thing to do here is to move step 3 to the same modules where the work is being done |
| 16:33:19 | <hololeap> | thanks for the insights c_wraith, danse-nr3 |
| 16:33:24 | <danse-nr3> | it's three types where i would personally wish to have just one that makes sense. Arguments interacting with each other in a fairly complex way is probably not the best usability |
| 16:34:37 | <danse-nr3> | once you can get a top level sum type, for instance, that paves the path towards eventually splitting commands into separate concerns |
| 16:37:32 | <hololeap> | true, but it's an old open source utility that I'm working on, so I'm sort of evolving it slowly in the direction it needs to go, rather than just rewriting it, partially because I'm dogfooding it and assessing things as I go. the feature drift is a bit of a necessary evil at this point, and keeping the command line similar to what it has been in the past is a priority just so I don't confuse current users of it |
| 16:38:20 | × | euleritian quits (~euleritia@dynamic-176-002-131-122.176.2.pool.telefonica.de) (Read error: Connection reset by peer) |
| 16:38:37 | → | euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
| 16:39:08 | <hololeap> | it also has the requirement of only depending on packages that come bundled with GHC, so for optparse-applicative esque commands, I'd have to roll my own |
| 16:40:59 | × | vpan quits (~vpan@212.117.1.172) (Quit: Leaving.) |
| 16:41:54 | <hololeap> | anyway, I really just wanted some advice on the uninitialized constructor idea, and I got it, so I'll get back to coding. thanks again! |
| 16:42:08 | <danse-nr3> | \o good work |
| 16:42:58 | <haskellbridge> | <sm> command line parsing gets tricky ! |
| 16:47:08 | → | soverysour joins (~soverysou@user/soverysour) |
| 16:48:34 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 260 seconds) |
| 16:51:16 | × | sord937 quits (~sord937@gateway/tor-sasl/sord937) (Quit: sord937) |
| 16:53:47 | → | destituion joins (~destituio@2a02:2121:6bc:1a95:cb10:e092:4032:88f5) |
| 16:55:44 | → | misterfish joins (~misterfis@84.53.85.146) |
| 17:06:33 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 17:12:29 | × | pavonia quits (~user@user/siracusa) (Quit: Bye!) |
| 17:20:14 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 17:32:33 | ← | L29Ah parts (~L29Ah@wikipedia/L29Ah) () |
| 17:35:18 | → | madhavanmiui joins (~madhavanm@2409:40f4:304d:5ad7:8000::) |
| 17:35:59 | × | madhavanmiui quits (~madhavanm@2409:40f4:304d:5ad7:8000::) (Client Quit) |
| 17:37:29 | → | codaraxis___ joins (~codaraxis@user/codaraxis) |
| 17:41:31 | × | codaraxis__ quits (~codaraxis@user/codaraxis) (Ping timeout: 268 seconds) |
| 17:47:53 | → | rdcdr joins (~rdcdr@user/rdcdr) |
| 17:52:31 | × | danse-nr3 quits (~danse-nr3@151.47.148.201) (Quit: Leaving) |
| 17:57:10 | → | Inst joins (~Inst@user/Inst) |
| 17:57:40 | <Inst> | just curious, when you have isString or isList typeclasses, are these hardcoded literals or, when GHC gets to the literals, it generates a String or List and does the conversion as needed? |
| 18:00:17 | × | nurupo quits (~nurupo.ga@user/nurupo) (Quit: nurupo.ga) |
| 18:00:36 | → | nurupo joins (~nurupo.ga@user/nurupo) |
| 18:02:01 | <geekosaur> | it compiles them to fromString/fromList called on a normal string/list |
| 18:02:22 | <geekosaur> | much as it does for numeric literals (fromInteger/fromRational) |
| 18:13:00 | × | rdcdr quits (~rdcdr@user/rdcdr) (Quit: ZNC 1.8.2+deb3.1 - https://znc.in) |
| 18:15:07 | × | soverysour quits (~soverysou@user/soverysour) (Ping timeout: 268 seconds) |
| 18:15:17 | → | fun-safe-math joins (~fun-safe-@24.21.106.247) |
| 18:16:04 | <haskellbridge> | <iqubic (she/her)> What do people recommend for generating random values? I know that some of this stuff will have to be in IO, but I think most of the functions can be pure by doing something like "generator -> (Int, generator)" |
| 18:17:19 | <probie> | Inst: "foo :: Text" is the same as if you'd written "(fromString "foo") :: Text", however that doesn't actually mean there will be a `String` in the compiled code. GHC normally does a very good job optimising it all away and just leaving you with the `Text` value you'd expect |
| 18:17:52 | <haskellbridge> | <iqubic (she/her)> Overloaded strings are pretty OP. |
| 18:18:49 | → | Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915) |
| 18:19:10 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 246 seconds) |
| 18:21:09 | → | noumenon joins (~noumenon@2a01:799:cd8:e700:aa7e:eaff:fede:ff94) |
| 18:21:46 | Lord_of_Life_ | is now known as Lord_of_Life |
| 18:26:00 | <jle`> | was there a recent ghc version where $$(myTH) can now be written as $$myTH ? or was it always permitted and i just didn't know |
| 18:26:37 | <haskellbridge> | <iqubic (she/her)> Jle`: You're back!!! |
| 18:27:14 | <jle`> | hi! i have been floating in and out for the past few months heh |
| 18:32:22 | → | rdcdr joins (~rdcdr@user/rdcdr) |
| 18:37:02 | <geekosaur> | jle`, that's always ttbomk been permitted |
| 18:37:36 | <dmj`> | if its a function I think it needs parens $(myTH a b), o/w it can just be $myTH |
| 18:38:14 | <geekosaur> | yes |
| 18:39:09 | × | euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 255 seconds) |
| 18:39:11 | <haskellbridge> | <iqubic (she/her)> What should I use for random numbers? |
| 18:39:25 | → | euleritian joins (~euleritia@dynamic-176-002-131-122.176.2.pool.telefonica.de) |
| 18:41:05 | <hc> | Depends on what you want to use them for |
| 18:42:55 | <jle`> | dmj`: omg this whole time |
| 18:44:54 | <dmj`> | ¯\_(ツ)_/¯ |
| 18:45:12 | <darkling> | iqubic: 7 is a good number. Use that. |
| 18:46:37 | <haskellbridge> | <iqubic (she/her)> hc: I'm writing a program to simulate playing card games, and I want a way shuffle a "deck of cards" (it's just a list/vector of cards) |
| 18:47:22 | <geekosaur> | `random` is probably good enough for your use case |
| 18:47:53 | <haskellbridge> | <iqubic (she/her)> What is "random"? |
| 18:48:05 | <geekosaur> | @hackage random |
| 18:48:05 | <lambdabot> | https://hackage.haskell.org/package/random |
| 18:48:31 | <Leary> | Or MonadRandom. |
| 18:49:16 | <haskellbridge> | <iqubic (she/her)> MonadRandom seems like half a dozen different but related things. |
| 18:50:30 | → | waleee joins (~waleee@h-176-10-144-38.NA.cust.bahnhof.se) |
| 18:51:30 | × | rdcdr quits (~rdcdr@user/rdcdr) (Ping timeout: 268 seconds) |
| 18:53:41 | <haskellbridge> | <iqubic (she/her)> "RandomGenM", "StatefulGen", "MonadInterleve", and "MonadRandom" all exist, and I'm not sure what the differences are... |
| 19:02:39 | <EvanR> | the classic shuffle algorithm requires a source of random dice rolls, which MonadRandom simplifies |
| 19:03:28 | <haskellbridge> | <iqubic (she/her)> I was thinking of doing something like a Fisher-Yates shuffle, but I'm not sure which of those 4 options I should use. |
| 19:12:13 | → | target_i joins (~target_i@user/target-i/x-6023099) |
| 19:20:48 | <dmj`> | > let deck = [1..52] in do { nums <- replicateM 52 (randomRIO (1,100)); pure $ fmap fst $ sortBy (compare `on` snd) (zip deck nums) } |
| 19:20:49 | <lambdabot> | error: |
| 19:20:49 | <lambdabot> | • Ambiguous type variable ‘m0’ arising from a use of ‘show_M259786827563... |
| 19:20:49 | <lambdabot> | prevents the constraint ‘(Show (m0 [Integer]))’ from being solved. |
| 19:30:52 | × | euleritian quits (~euleritia@dynamic-176-002-131-122.176.2.pool.telefonica.de) (Read error: Connection reset by peer) |
| 19:31:11 | → | euleritian joins (~euleritia@77.22.252.56) |
| 19:37:33 | → | L29Ah joins (~L29Ah@wikipedia/L29Ah) |
| 19:38:29 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 19:42:18 | <haskellbridge> | <iqubic (she/her)> I see what you've done there, but you can't show me the results because it's in IO |
| 19:48:22 | <dmj`> | iqubic: try it in ghci |
| 19:48:36 | → | rdcdr joins (~rdcdr@user/rdcdr) |
| 19:58:08 | <haskellbridge> | <iqubic (she/her)> I think GHCI would have some defaulting stuff. |
| 19:58:20 | <haskellbridge> | <iqubic (she/her)> What does randomRIO do? |
| 19:58:25 | → | rdcdr_ joins (~rdcdr@75-172-0-68.tukw.qwest.net) |
| 19:59:28 | × | rdcdr_ quits (~rdcdr@75-172-0-68.tukw.qwest.net) (Client Quit) |
| 19:59:48 | × | rdcdr quits (~rdcdr@user/rdcdr) (Ping timeout: 260 seconds) |
| 20:00:20 | → | rdcdr joins (~rdcdr@user/rdcdr) |
| 20:04:53 | × | lxsameer quits (~lxsameer@Serene/lxsameer) (Ping timeout: 240 seconds) |
| 20:05:43 | <tomsmeding> | iqubic: https://hackage.haskell.org/package/random-1.2.1.2/docs/System-Random.html#v:randomRIO ;) |
| 20:10:32 | × | rdcdr quits (~rdcdr@user/rdcdr) (Read error: Connection reset by peer) |
| 20:12:55 | × | euleritian quits (~euleritia@77.22.252.56) (Read error: Connection reset by peer) |
| 20:13:20 | → | euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
| 20:13:57 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 20:27:31 | <dmj`> | it gives you random stuff |
| 20:34:38 | × | euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer) |
| 20:34:51 | → | euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
| 20:42:12 | <haskellbridge> | <iqubic (she/her)> Actually what I'm looking for is a way to get a random element from a list. |
| 20:43:47 | <geekosaur> | https://wiki.haskell.org/Random_shuffle |
| 20:43:52 | <mauke> | https://perldoc.perl.org/perlfaq5#How-do-I-select-a-random-line-from-a-file%3F |
| 20:46:27 | <haskellbridge> | <iqubic (she/her)> I'm not sure the perldocs are gonna help me. |
| 20:47:23 | <mauke> | well, the obvious answer is to generate a number in the range (0, length xs - 1) and index into the list |
| 20:47:43 | <mauke> | if you want to treat the list as a stream instead, the perldoc algo would apply |
| 20:49:53 | <mauke> | it stores line N of the file with probability 1/N |
| 20:50:26 | <mauke> | so the first line is always retained; the second line overwrites it with probability 1/2; the third line overwrites that with probability 1/3; and so on |
| 20:51:48 | <mauke> | in the end, each line has probability 1/number-of-lines to be the stored winner |
| 20:54:43 | → | pavonia joins (~user@user/siracusa) |
| 20:57:38 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 20:58:27 | × | tabaqui quits (~root@91.74.190.107) (Ping timeout: 264 seconds) |
| 21:01:27 | × | kimiamania quits (~65804703@user/kimiamania) (Quit: PegeLinux) |
| 21:01:49 | → | kimiamania joins (~65804703@user/kimiamania) |
| 21:02:28 | × | td_ quits (~td@i53870914.versanet.de) (Quit: waking up from the american dream ...) |
| 21:07:27 | × | euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 264 seconds) |
| 21:07:35 | → | codaraxis__ joins (~codaraxis@user/codaraxis) |
| 21:09:12 | × | target_i quits (~target_i@user/target-i/x-6023099) (Quit: leaving) |
| 21:09:23 | → | td_ joins (~td@i53870914.versanet.de) |
| 21:10:41 | → | rdcdr joins (~rdcdr@user/rdcdr) |
| 21:11:41 | × | codaraxis___ quits (~codaraxis@user/codaraxis) (Ping timeout: 256 seconds) |
| 21:16:31 | → | tabaqui joins (~root@87.201.238.61) |
| 21:16:55 | → | euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
| 21:22:31 | × | __monty__ quits (~toonn@user/toonn) (Quit: leaving) |
| 21:26:19 | → | rdcdr_ joins (~rdcdr@75-172-0-68.tukw.qwest.net) |
| 21:27:13 | × | rdcdr quits (~rdcdr@user/rdcdr) (Ping timeout: 268 seconds) |
| 21:28:45 | × | benjaminl quits (~benjaminl@user/benjaminl) (Ping timeout: 268 seconds) |
| 21:32:14 | <EvanR> | clever |
| 21:33:41 | × | noumenon quits (~noumenon@2a01:799:cd8:e700:aa7e:eaff:fede:ff94) (Quit: Leaving) |
| 21:37:45 | × | rdcdr_ quits (~rdcdr@75-172-0-68.tukw.qwest.net) (Ping timeout: 256 seconds) |
| 21:39:59 | → | dysthesis joins (~dysthesis@user/dysthesis) |
| 21:40:03 | → | benjaminl joins (~benjaminl@user/benjaminl) |
| 21:50:59 | × | mud quits (~mud@user/kadoban) (Ping timeout: 264 seconds) |
| 21:53:52 | → | mud joins (~mud@user/kadoban) |
| 21:57:23 | × | michalz quits (~michalz@185.246.207.200) (Quit: ZNC 1.9.0 - https://znc.in) |
| 22:00:40 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 22:08:17 | → | rdcdr joins (~rdcdr@user/rdcdr) |
| 22:18:11 | × | rdcdr quits (~rdcdr@user/rdcdr) (Quit: ZNC 1.8.2+deb3.1 - https://znc.in) |
| 22:18:35 | → | rdcdr joins (~rdcdr@user/rdcdr) |
| 22:19:17 | <monochrom> | Nice algorithm :) |
| 22:27:46 | <int-e> | It even has names attached to it: https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle |
| 22:29:57 | × | rdcdr quits (~rdcdr@user/rdcdr) (Quit: ZNC 1.8.2+deb3.1+deb12u1 - https://znc.in) |
| 22:31:09 | → | rdcdr joins (~rdcdr@user/rdcdr) |
| 22:50:02 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
| 22:56:19 | × | acidjnk_new3 quits (~acidjnk@p200300d6e72cfb277d28f4d2e7a5b949.dip0.t-ipconnect.de) (Ping timeout: 268 seconds) |
| 23:02:51 | → | Square joins (~Square@user/square) |
| 23:03:37 | × | rdcdr quits (~rdcdr@user/rdcdr) (Read error: Connection reset by peer) |
| 23:03:48 | → | rdcdr_ joins (~rdcdr@75-172-0-68.tukw.qwest.net) |
| 23:21:52 | × | robotsnowfall quits (~robotsnow@user/robotsnowfall) (Quit: ZNC 1.9.1 - https://znc.in) |
| 23:22:04 | × | rdcdr_ quits (~rdcdr@75-172-0-68.tukw.qwest.net) (Quit: ZNC 1.8.2+deb3.1+deb12u1 - https://znc.in) |
| 23:22:31 | → | robotsnowfall joins (~robotsnow@user/robotsnowfall) |
| 23:26:00 | <hololeap> | I've got a little utility I made which runs an external program, and it's supposed to dump the output of stdout and stderr directly to the terminal. it works, but is only outputting in real time if I run it with `cabal repl src-exe/Main.hs` |
| 23:26:15 | <hololeap> | I tried putting this as the first line of main: forM_ [stdout,stderr] (`hSetBuffering` NoBuffering) |
| 23:26:35 | <hololeap> | but it still only works properly in the repl |
| 23:30:21 | <hololeap> | does that mean that something else (perhaps a library I'm using) is undoing my hSetBuffering, or is there something else I should be aware of? |
| 23:30:51 | <geekosaur> | the program you run itself might be buffering; see `man 1 stdbuf` |
| 23:31:05 | × | sawilagar quits (~sawilagar@user/sawilagar) (Ping timeout: 256 seconds) |
| 23:33:19 | <mauke> | how are you running the program? |
| 23:37:35 | <hololeap> | it doesn't seem like /usr/bin/stdbuf -o0 -e0 ... made a difference |
| 23:38:34 | <hololeap> | mauke: I've tried sourceProcessWithStreams from conduit-extra, and readProcessWithExitCode from System.Process |
| 23:39:23 | <hololeap> | I'm using { std_out = UseHandle stdout, std_err = UseHandle stderr } |
| 23:40:18 | <mauke> | ok, that's the inner layer. how are you running the haskell program? |
| 23:40:44 | <hololeap> | $(cabal list-bin exe:vid-dl) |
| 23:41:09 | <hololeap> | should I try stdbuf on that? |
| 23:41:27 | <hololeap> | stdbuf -o0 -e0 $(cabal list-bin exe:vid-dl) |
| 23:41:44 | <mauke> | readProcessWithExitCode captures output |
| 23:41:56 | <mauke> | I don't see how that would write directly to the terminal |
| 23:42:19 | <hololeap> | oh, good point. that wouldn't help |
| 23:42:34 | → | rdcdr joins (~rdcdr@user/rdcdr) |
| 23:43:02 | <mauke> | sourceProcessWithStreams also captures output |
| 23:43:03 | <geekosaur> | stdbuf won't work (or won't work well) with Haskell programs because they don't use C's stdio layer |
| 23:43:04 | <hololeap> | I probably wanted createProcess |
| 23:44:04 | <hololeap> | I was obviously confused when I wrote this |
| 23:44:11 | <mauke> | createProcess also captures output |
| 23:44:32 | <mauke> | ok, that's actually optional |
| 23:44:36 | <mauke> | but why not just callProcess? |
| 23:45:38 | <hololeap> | simply because I don't want to have an exception raised if it's a non-zero exit |
| 23:46:01 | <hololeap> | I want to print the exit code and continue a loop |
| 23:46:21 | <mauke> | ah, I see |
| 23:46:36 | × | ystael quits (~ystael@user/ystael) (Ping timeout: 252 seconds) |
| 23:47:38 | <mauke> | rawSystem it is |
| 23:48:52 | <mauke> | I like how rawSystem is "deprecated", but has no equivalent elsewhere in System.Process |
| 23:50:11 | <mauke> | and the semantics of CmdSpec are undocumented |
| 23:54:50 | <mauke> | I wonder if manually importing posix_spawn via the FFI would be actually easier |
| 23:58:08 | <hololeap> | ok, I got it working. it's literally this simple: (\exe args -> withCreateProcess (proc exe args) (\_ _ _ -> waitForProcess)) :: FilePath -> [String] -> IO ExitCode |
| 23:58:13 | <geekosaur> | have you looked in System.Posix.Process? |
| 23:59:15 | <hololeap> | I didn't need conduit or stdbuf |
| 23:59:57 | <hololeap> | or even modifying the CreateProcess record |
All times are in UTC on 2024-07-05.