Logs on 2022-08-13 (liberachat/#haskell)
| 00:00:12 | × | king_gs quits (~Thunderbi@2806:103e:29:da7a:1909:1570:14f1:22f) (Ping timeout: 268 seconds) |
| 00:01:57 | → | geekosaur joins (~geekosaur@xmonad/geekosaur) |
| 00:02:27 | × | o-90 quits (~o-90@gateway/tor-sasl/o-90) (Remote host closed the connection) |
| 00:04:03 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection) |
| 00:04:45 | × | gurkenglas quits (~gurkengla@p548ac72e.dip0.t-ipconnect.de) (Ping timeout: 244 seconds) |
| 00:05:29 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 00:16:31 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 252 seconds) |
| 00:18:42 | × | ec quits (~ec@gateway/tor-sasl/ec) (Remote host closed the connection) |
| 00:20:30 | → | ec joins (~ec@gateway/tor-sasl/ec) |
| 00:26:14 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 00:26:14 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 00:26:14 | → | wroathe joins (~wroathe@user/wroathe) |
| 00:27:28 | × | mikoto-chan quits (~mikoto-ch@164.5.249.78) (Read error: Connection reset by peer) |
| 00:32:04 | → | vysn joins (~vysn@user/vysn) |
| 00:33:06 | × | cheater quits (~Username@user/cheater) (Ping timeout: 264 seconds) |
| 00:33:30 | × | waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 268 seconds) |
| 00:35:00 | → | cheater joins (~Username@user/cheater) |
| 00:36:13 | → | rethinkpad joins (~rethinkpa@185.156.46.152) |
| 00:38:43 | × | mmhat quits (~mmh@p200300f1c706f761ee086bfffe095315.dip0.t-ipconnect.de) (Quit: WeeChat 3.6) |
| 00:41:51 | → | Core4402 joins (~nico@186.141.197.86) |
| 00:42:42 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 264 seconds) |
| 00:44:45 | × | nicos quits (~nico@190.247.245.154) (Ping timeout: 252 seconds) |
| 00:46:25 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 00:47:07 | × | matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 244 seconds) |
| 00:53:49 | × | Core4402 quits (~nico@186.141.197.86) (Ping timeout: 268 seconds) |
| 00:59:01 | × | TonyStone quits (~TonyStone@2603-7080-8607-c36a-1069-803a-a882-c346.res6.spectrum.com) (Ping timeout: 244 seconds) |
| 00:59:26 | → | nilradical joins (~nilradica@user/naso) |
| 01:01:47 | → | matthewmosior joins (~matthewmo@173.170.253.91) |
| 01:03:14 | → | ryantrinkle joins (~ryan@2607:f00:3:14c0:7c6b:7160:d1ff:3f7) |
| 01:03:22 | <ryantrinkle> | any recommendation for how to get a graph of haskell modules? |
| 01:03:31 | <ryantrinkle> | i'm using graphmod and it's alright but also not really designed as a library |
| 01:03:56 | <ryantrinkle> | (actually, it's very cool, not just alright; but i'm looking for something with a clean haskell interface rather than dot) |
| 01:05:04 | × | dolio quits (~dolio@130.44.130.54) (Ping timeout: 268 seconds) |
| 01:06:34 | → | dolio joins (~dolio@130.44.130.54) |
| 01:06:48 | × | ystael quits (~ystael@user/ystael) (Ping timeout: 268 seconds) |
| 01:07:02 | → | ystael joins (~ystael@user/ystael) |
| 01:08:09 | → | vglfr joins (~vglfr@145.224.94.75) |
| 01:08:13 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 252 seconds) |
| 01:08:21 | <d34df00d> | dmj: probably a really silly question, but what do you think about compiling miso to wasm via the llvm backend of ghc instead of relying on ghcjs? |
| 01:08:42 | <d34df00d> | Dunno how feasible it is though. I remember lots of pains when I tried to just even pass any options to the llvm backend from ghc. |
| 01:09:00 | <d34df00d> | My gut feel is also that wasm via llvm would be a tad faster than the js that ghcjs produces. |
| 01:10:17 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 01:11:36 | → | TonyStone joins (~TonyStone@2603-7080-8607-c36a-b4e0-8ace-bf5e-83e4.res6.spectrum.com) |
| 01:16:25 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 01:18:00 | → | mikoto-chan joins (~mikoto-ch@164.5.249.78) |
| 01:24:29 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.5) |
| 01:25:48 | → | causal joins (~user@50.35.83.177) |
| 01:33:22 | × | causal quits (~user@50.35.83.177) (Quit: WeeChat 3.6) |
| 01:35:50 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 268 seconds) |
| 01:37:33 | × | cheater quits (~Username@user/cheater) (Ping timeout: 252 seconds) |
| 01:42:07 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 02:01:36 | → | waldo joins (~waldo@user/waldo) |
| 02:03:45 | → | cheater joins (~Username@user/cheater) |
| 02:05:17 | × | matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 255 seconds) |
| 02:06:04 | × | nattiestnate quits (~nate@180.243.14.16) (Quit: WeeChat 3.6) |
| 02:12:33 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 02:17:59 | → | matthewmosior joins (~matthewmo@173.170.253.91) |
| 02:18:28 | → | nate4 joins (~nate@98.45.169.16) |
| 02:18:59 | × | vglfr quits (~vglfr@145.224.94.75) (Ping timeout: 252 seconds) |
| 02:23:23 | × | nate4 quits (~nate@98.45.169.16) (Ping timeout: 252 seconds) |
| 02:29:58 | × | nilradical quits (~nilradica@user/naso) () |
| 02:30:40 | × | td_ quits (~td@muedsl-82-207-238-237.citykom.de) (Ping timeout: 268 seconds) |
| 02:31:36 | → | razetime joins (~quassel@117.254.35.202) |
| 02:31:51 | → | td_ joins (~td@muedsl-82-207-238-051.citykom.de) |
| 02:36:08 | × | matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 244 seconds) |
| 02:36:37 | → | matthewmosior joins (~matthewmo@173.170.253.91) |
| 02:47:17 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 268 seconds) |
| 02:53:42 | → | nicos joins (~nico@190.247.245.154) |
| 02:56:21 | → | Kaipei joins (~Kaiepi@142.68.249.28) |
| 02:57:51 | × | Kaiepi quits (~Kaiepi@142.68.249.28) (Ping timeout: 252 seconds) |
| 02:58:57 | × | nicos quits (~nico@190.247.245.154) (Quit: CoreIRC for Android - www.coreirc.com) |
| 03:03:12 | → | Kaiepi joins (~Kaiepi@142.68.249.28) |
| 03:03:13 | × | jpds quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection) |
| 03:03:22 | × | ec quits (~ec@gateway/tor-sasl/ec) (Remote host closed the connection) |
| 03:04:05 | → | ec joins (~ec@gateway/tor-sasl/ec) |
| 03:04:07 | → | jpds joins (~jpds@gateway/tor-sasl/jpds) |
| 03:05:11 | × | Kaipei quits (~Kaiepi@142.68.249.28) (Ping timeout: 252 seconds) |
| 03:06:45 | × | jero98772 quits (~jero98772@2800:484:1d80:d8ce:efcc:cbb3:7f2a:6dff) (Remote host closed the connection) |
| 03:07:13 | × | ChaiTRex quits (~ChaiTRex@user/chaitrex) (Remote host closed the connection) |
| 03:07:13 | × | ec quits (~ec@gateway/tor-sasl/ec) (Remote host closed the connection) |
| 03:07:13 | × | adanwan quits (~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection) |
| 03:07:13 | × | azimut quits (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection) |
| 03:07:13 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection) |
| 03:07:36 | → | adanwan joins (~adanwan@gateway/tor-sasl/adanwan) |
| 03:07:43 | → | ec joins (~ec@gateway/tor-sasl/ec) |
| 03:07:49 | → | ChaiTRex joins (~ChaiTRex@user/chaitrex) |
| 03:07:54 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 03:08:16 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 03:09:11 | × | ec quits (~ec@gateway/tor-sasl/ec) (Remote host closed the connection) |
| 03:10:16 | → | ec joins (~ec@gateway/tor-sasl/ec) |
| 03:14:44 | → | toastytime joins (~toastytim@2603-6081-19f0-7e30-05ee-e4d3-a53d-8390.res6.spectrum.com) |
| 03:16:49 | → | vglfr joins (~vglfr@145.224.94.75) |
| 03:21:19 | × | Kaiepi quits (~Kaiepi@142.68.249.28) (Ping timeout: 252 seconds) |
| 03:21:55 | → | stiell joins (~stiell@gateway/tor-sasl/stiell) |
| 03:25:31 | × | waldo quits (~waldo@user/waldo) (Ping timeout: 268 seconds) |
| 03:25:32 | × | rethinkpad quits (~rethinkpa@185.156.46.152) (Quit: Leaving) |
| 03:26:40 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection) |
| 03:29:18 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection) |
| 03:29:18 | × | azimut quits (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection) |
| 03:29:45 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 03:31:30 | ← | toastytime parts (~toastytim@2603-6081-19f0-7e30-05ee-e4d3-a53d-8390.res6.spectrum.com) () |
| 03:31:35 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 03:36:39 | × | haritz quits (~hrtz@user/haritz) (Ping timeout: 268 seconds) |
| 03:37:51 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection) |
| 03:39:01 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 03:42:15 | × | azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 268 seconds) |
| 03:46:48 | × | lemonsnicks quits (~lemonsnic@cpc159519-perr18-2-0-cust114.19-1.cable.virginm.net) (Quit: ZNC 1.8.2 - https://znc.in) |
| 03:47:07 | → | lemonsnicks joins (~lemonsnic@cpc159519-perr18-2-0-cust114.19-1.cable.virginm.net) |
| 03:51:27 | × | vysn quits (~vysn@user/vysn) (Quit: WeeChat 3.5) |
| 03:52:20 | × | lottaquestions quits (~nick@2607:fa49:503e:7100:3481:111f:f558:e90a) (Remote host closed the connection) |
| 03:52:46 | → | lottaquestions joins (~nick@2607:fa49:503e:7100:276:d569:54ed:ceaf) |
| 03:55:07 | × | razetime quits (~quassel@117.254.35.202) (Ping timeout: 268 seconds) |
| 03:55:38 | × | etoast quits (~exaltedto@user/exaltedtoast) (Quit: Tschüss) |
| 04:03:11 | × | matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 255 seconds) |
| 04:12:27 | <famubu[m]> | Hi. I was trying to do program that evaluates a postfix expression using state monad but ran into some errors. I am a beginner in haskell. I've pasted the program and a description at https://bpa.st/LL3Q |
| 04:14:24 | → | Jeanne-Kamikaze joins (~Jeanne-Ka@142.147.89.202) |
| 04:14:48 | <glguy> | famubu[m]: line 65 needs to be a let binding instead of a <- |
| 04:15:05 | <glguy> | newst <- foo x curst -- becomes -- let newst = foo x curst |
| 04:15:26 | <glguy> | or you could replace: put newst -- with -- put (foo x curst) |
| 04:17:10 | ← | Solid parts (~slot@xmonad/slotThe) (WeeChat 3.6) |
| 04:17:21 | → | matthewmosior joins (~matthewmo@173.170.253.91) |
| 04:22:31 | × | chexum quits (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection) |
| 04:23:27 | → | chexum joins (~quassel@gateway/tor-sasl/chexum) |
| 04:26:25 | → | waldo joins (~waldo@user/waldo) |
| 04:26:59 | <famubu[m]> | Thanks that got rid of the error. |
| 04:27:08 | <famubu[m]> | To get ther result, should I be using `runState` function? |
| 04:28:47 | × | Jeanne-Kamikaze quits (~Jeanne-Ka@142.147.89.202) (Quit: Leaving) |
| 04:34:41 | × | matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 255 seconds) |
| 04:35:23 | × | luffy quits (~chenqisu1@183.217.201.23) (Ping timeout: 252 seconds) |
| 04:36:56 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 04:39:56 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 04:41:48 | × | chexum quits (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection) |
| 04:42:02 | → | chexum joins (~quassel@gateway/tor-sasl/chexum) |
| 04:43:07 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 04:47:24 | → | matthewmosior joins (~matthewmo@173.170.253.91) |
| 04:48:13 | × | jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 252 seconds) |
| 04:48:56 | <monochrom> | Tes. |
| 04:49:30 | <ski> | famubu[m] : one of `runState',`evalState',`execState' |
| 04:49:57 | → | razetime joins (~quassel@117.254.35.202) |
| 04:50:09 | <ski> | instead of the `get' and `put' pair, you could here use `modify' |
| 04:53:00 | <ski> | instead of using `head' and `tail', it would be better to use pattern-matching, to check the list/stack has the requisite elements. similarly, instead of having `isOp :: Char -> Bool' and `chrToOp :: (Num a,Fractional a) => Char -> (a -> a -> a)' you could be using `chrToMaybeOp :: (Num a,Fractional a) => Char -> Maybe (a -> a -> a)', and then use pattern-matching (`case'-`of') with the call of that |
| 04:58:32 | <ski> | @where parse-don't-validate |
| 04:58:32 | <lambdabot> | I know nothing about parse-don't-validate. |
| 04:58:41 | <ski> | @where+ parse-don't-validate "Parse, don't validate" by lexi-lambda in 2019-11-05 at <https://lexi-lambda.github.io/blog/2019/11/05/parse-don-t-validate/> |
| 04:58:41 | <lambdabot> | It is forever etched in my memory. |
| 05:12:55 | × | zebrag quits (~chris@user/zebrag) (Remote host closed the connection) |
| 05:17:45 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 268 seconds) |
| 05:21:16 | → | Kaiepi joins (~Kaiepi@142.68.249.28) |
| 05:23:04 | → | frost joins (~frost@user/frost) |
| 05:35:53 | → | etoast joins (~exaltedto@user/exaltedtoast) |
| 05:38:28 | wagle_ | is now known as wagle |
| 05:42:01 | → | zxx7529 joins (~Thunderbi@user/zxx7529) |
| 05:50:24 | × | matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 244 seconds) |
| 05:52:45 | × | Me-me quits (~me-me@tunnel690570-pt.tunnel.tserv12.mia1.ipv6.he.net) (Changing host) |
| 05:52:45 | → | Me-me joins (~me-me@user/me-me) |
| 05:56:51 | × | adanwan quits (~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection) |
| 05:57:22 | → | adanwan joins (~adanwan@gateway/tor-sasl/adanwan) |
| 05:58:11 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 05:58:28 | → | coot joins (~coot@213.134.176.158) |
| 06:00:57 | × | kitty4 quits (~kitty@096-039-147-043.res.spectrum.com) (Ping timeout: 268 seconds) |
| 06:01:13 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 06:04:48 | × | zxx7529 quits (~Thunderbi@user/zxx7529) (Remote host closed the connection) |
| 06:16:57 | × | mikoto-chan quits (~mikoto-ch@164.5.249.78) (Ping timeout: 252 seconds) |
| 06:18:43 | → | matthewmosior joins (~matthewmo@173.170.253.91) |
| 06:19:58 | → | nate4 joins (~nate@98.45.169.16) |
| 06:20:11 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection) |
| 06:20:11 | × | chexum quits (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection) |
| 06:20:34 | → | chexum joins (~quassel@gateway/tor-sasl/chexum) |
| 06:22:22 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 06:24:58 | × | nate4 quits (~nate@98.45.169.16) (Ping timeout: 268 seconds) |
| 06:27:51 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection) |
| 06:27:51 | × | adanwan quits (~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection) |
| 06:28:15 | → | adanwan joins (~adanwan@gateway/tor-sasl/adanwan) |
| 06:28:54 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 06:29:39 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 06:34:15 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 268 seconds) |
| 06:34:29 | <famubu[m]> | I was trying to convert the string `"12 15"` to `[12, 15]` with `map read . words $ "12 15`. But it gives `Exception: Prelude.read: no parse`. Found out that it's because `read` cannot figure out the type into which the conversion should be done. How can that be fixed in this case? |
| 06:34:48 | famubu[m] | forgot the endng quote for the string.. |
| 06:35:42 | × | dtman34 quits (~dtman34@2601:446:4400:2ad9:d479:9e91:5e69:3014) (Quit: ZNC 1.8.2+deb2+b1 - https://znc.in) |
| 06:36:02 | → | dtman34 joins (~dtman34@2601:446:4400:2ad9:a35d:f509:3d33:3205) |
| 06:37:20 | × | waldo quits (~waldo@user/waldo) (Ping timeout: 268 seconds) |
| 06:37:40 | × | coot quits (~coot@213.134.176.158) (Quit: coot) |
| 06:38:30 | <int-e> | famubu[m]: if you try that in ghci you'll need a type signature, otherwise it'll default to [()] as the result type |
| 06:38:36 | → | waldo joins (~waldo@user/waldo) |
| 06:39:34 | <int-e> | So this'll work without type signature: `map read . words $ "() ()"` |
| 06:39:59 | <int-e> | in programs... context will usually determine the type and `map read . words` will just work. |
| 06:40:06 | <hololeap> | ski: that's a good article, well written |
| 06:42:18 | <hololeap> | wouldn't it be something like: (Num a, Read a) => [a] |
| 06:42:26 | × | cosimone quits (~user@93-44-186-171.ip98.fastwebnet.it) (Remote host closed the connection) |
| 06:42:29 | <hololeap> | as opposed to () |
| 06:43:44 | <hololeap> | > map (read :: String -> Int) . words $ "12 15" |
| 06:43:45 | <int-e> | hololeap: There's no Num in play here. (If there was, it would default to Integer) |
| 06:43:47 | <lambdabot> | error: |
| 06:43:47 | <lambdabot> | Ambiguous occurrence ‘map’ |
| 06:43:47 | <lambdabot> | It could refer to |
| 06:43:57 | <int-e> | @undef |
| 06:43:57 | <lambdabot> | Undefined. |
| 06:44:03 | <int-e> | > map (read :: String -> Int) . words $ "12 15" |
| 06:44:05 | <lambdabot> | [12,15] |
| 06:44:15 | <hololeap> | yeah fair, it wouldn't know it was a Num just from the string |
| 06:44:39 | → | cosimone joins (~user@93-44-186-171.ip98.fastwebnet.it) |
| 06:44:41 | <int-e> | ghci has extended defaulting rules that pick () for Read a => a. |
| 06:46:37 | <ski> | > replicateM 2 (StateT (reads :: ReadS Int)) `runStateT` "12 15" |
| 06:46:38 | <lambdabot> | [([12,15],"")] |
| 06:47:13 | <int-e> | ouch |
| 06:47:16 | <ski> | (could also use `many') |
| 06:47:51 | <ski> | hololeap : don't thank me, i didn't write it |
| 06:48:11 | <hololeap> | I didn't :) |
| 06:48:20 | <ski> | hehe |
| 06:49:24 | <hololeap> | that makes me wonder if there's some kind of best-guess "duck typing" lib for strings in haskell |
| 06:49:42 | <ski> | @quote stark |
| 06:49:42 | <lambdabot> | AlanPerlis says: The string is a stark data structure and everywhere it is passed there is much duplication of process. It is a perfect vehicle for hiding information. |
| 06:50:06 | → | mmhat joins (~mmh@p200300f1c706f761ee086bfffe095315.dip0.t-ipconnect.de) |
| 06:55:03 | <hololeap> | famubu[m]: it's nicer to use the TypeApplications extension IMO: map (read @Int) . words $ "12 15" |
| 06:56:39 | <hololeap> | % map (read @Int) . words $ "12 15" |
| 06:56:39 | <yahb2> | <interactive>:4:6: error: ; Pattern syntax in expression context: read@Int ; Did you mean to enable TypeApplications? |
| 06:56:55 | <ski> | % :set -XTypeApplications |
| 06:56:55 | <yahb2> | <no output> |
| 06:56:56 | <hololeap> | yahb2 doesn't have that enabled by default... |
| 06:57:00 | <hololeap> | % map (read @Int) . words $ "12 15" |
| 06:57:01 | <yahb2> | [12,15] |
| 06:57:50 | <hololeap> | the classic example of this problem is (read . show) |
| 06:58:08 | <hololeap> | % :t "abcd" |
| 06:58:08 | <yahb2> | "abcd" :: [Char] |
| 06:58:13 | <hololeap> | % :t show "abcd" |
| 06:58:13 | <yahb2> | show "abcd" :: String |
| 06:58:19 | <hololeap> | % :t read . show $ "abcd" |
| 06:58:19 | <yahb2> | read . show $ "abcd" :: Read c => c |
| 06:58:30 | <hololeap> | (it doesn't know what c is) |
| 06:58:40 | <hololeap> | % :t read @Int . show $ "abcd" |
| 06:58:40 | <yahb2> | read @Int . show $ "abcd" :: Int |
| 06:58:47 | <hololeap> | haha |
| 06:58:56 | <hololeap> | it's an Int |
| 06:59:33 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 06:59:35 | <hololeap> | % read @String . show $ "abcd" |
| 06:59:35 | <yahb2> | "abcd" |
| 07:00:16 | hololeap | is just rambling to nobody, most likely |
| 07:00:40 | <int-e> | > fix read -- the unproductive cousin of `fix show` |
| 07:00:43 | <lambdabot> | "*Exception: <<loop>> |
| 07:01:23 | <hololeap> | actually, I'm curious |
| 07:01:35 | <hololeap> | is there another use for fix than |
| 07:01:48 | <hololeap> | fix :: (a -> b) -> a -> b |
| 07:02:02 | <ski> | you can fix an error |
| 07:02:22 | <ski> | no, that's not a valid type of `fix' |
| 07:02:29 | × | monochrom quits (trebla@216.138.220.146) (Quit: NO CARRIER) |
| 07:02:45 | <int-e> | > fix ((0:) . scanl (+) 1) |
| 07:02:47 | <lambdabot> | [0,1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765,10946,... |
| 07:03:47 | <int-e> | I hardly ever use `fix` in real code; recursive definitions are usually clearer. |
| 07:04:05 | <ski> | i've occasionally used it for a local loop |
| 07:04:28 | × | razetime quits (~quassel@117.254.35.202) (Ping timeout: 268 seconds) |
| 07:04:46 | <hololeap> | I think I meant this: fix :: ((a -> b) -> a -> b) -> a -> b |
| 07:05:02 | <ski> | yea, i was wondering if so |
| 07:05:08 | → | razetime joins (~quassel@117.254.35.202) |
| 07:05:14 | <int-e> | hololeap: sure, you can do that |
| 07:05:26 | <ski> | (but probably more memorable for you to work that out yourself) |
| 07:05:36 | <hololeap> | that just seems to be the only useful way to use fix |
| 07:05:44 | <hololeap> | I was wondering if there were others |
| 07:06:00 | <int-e> | > map (fix (\f x -> if x < 2 then x else f (x-1) + f (x-2))) [0..5] |
| 07:06:03 | <lambdabot> | [0,1,1,2,3,5] |
| 07:06:17 | <ski> | > (`fix` 5) (\fact n -> if n == 0 then 1 else n * fact (n - 1)) |
| 07:06:19 | <lambdabot> | 120 |
| 07:06:26 | <int-e> | ...argh |
| 07:06:31 | ski | smiles |
| 07:06:46 | <int-e> | (that's for using `fix` as an infix operator) |
| 07:06:52 | <ski> | (i know) |
| 07:06:54 | <hololeap> | those both have the same type signature I just wrote |
| 07:07:19 | <hololeap> | the use of fix does, anyway |
| 07:07:20 | <int-e> | hololeap: yes, that was the point |
| 07:07:34 | <hololeap> | % :t fix |
| 07:07:34 | <yahb2> | <interactive>:1:1: error: Variable not in scope: fix |
| 07:07:44 | <hololeap> | import more stuff yahb2 |
| 07:08:05 | <int-e> | hololeap: see the earlier fibonacci example with `scanl` for a different use of `fix`. |
| 07:08:20 | <jackdk> | % :m + Data.Functino |
| 07:08:20 | <yahb2> | <no location info>: error: ; Could not find module ‘Data.Functino’ ; Perhaps you meant ; Data.Function (from base-4.14.3.0) ; Data.Functor (from base-4.14.3.0) |
| 07:08:23 | <jackdk> | % :m + Data.Function |
| 07:08:23 | <yahb2> | <no output> |
| 07:08:25 | <hololeap> | oh, right, I didn't really grok that |
| 07:08:30 | <jackdk> | % fix error |
| 07:08:30 | <yahb2> | *** Exception: *** Exception: *** Exception: *** Exception: *** Exception: *** Exception: *** Exception: *** Exception: *** Exception: *** Exception: *** Exception: *** Exception: *** Exception: **... |
| 07:09:04 | <ski> | @let infixl 0 `asTypeIn`; a `asTypeIn` f = a where _ = f a |
| 07:09:05 | <lambdabot> | Defined. |
| 07:09:08 | <int-e> | hololeap: Well, the type there is ([Integer] -> [Integer]) -> [Integer], so it's actually working on a (lazy) value. |
| 07:09:09 | <ski> | @type fix `asTypeIn` \fix -> map (fix (\f x -> if x < 2 then x else f (x - 1) + f (x - 2))) [0 .. 5] |
| 07:09:10 | <lambdabot> | (Ord b, Num b, Enum b) => ((b -> b) -> b -> b) -> b -> b |
| 07:09:15 | <hololeap> | :t ((0:) . scanl (+) 1) |
| 07:09:17 | <lambdabot> | Num a => [a] -> [a] |
| 07:09:41 | <hololeap> | I see, which is why it ended in .... |
| 07:09:41 | <ski> | int-e : noticed `asTypeIn' is gone, but not `asAppliedTo' |
| 07:10:01 | × | razetime quits (~quassel@117.254.35.202) (Ping timeout: 268 seconds) |
| 07:10:09 | <hololeap> | so without making it CPS it is guaranteed to be a bottom? |
| 07:11:08 | <hololeap> | difficult question... |
| 07:11:10 | <ski> | > fix ((0 :) . (1 :) . (zipWith (+) `ap` tail)) |
| 07:11:12 | <lambdabot> | [0,1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765,10946,... |
| 07:11:15 | <ski> | @quote Aztec |
| 07:11:15 | <lambdabot> | quicksilver says: zip`ap`tail - the Aztec god of consecutive numbers |
| 07:11:38 | × | ChaiTRex quits (~ChaiTRex@user/chaitrex) (Quit: ChaiTRex) |
| 07:11:43 | → | zeenk joins (~zeenk@2a02:2f04:a311:2d00:6865:d863:4c93:799f) |
| 07:12:12 | <ski> | CPS ? |
| 07:12:21 | <hololeap> | continuation passing style |
| 07:12:25 | <ski> | i know |
| 07:12:31 | <ski> | i didn't understand the question |
| 07:12:42 | <hololeap> | fix :: (a -> a) -> a |
| 07:13:09 | <int-e> | What's "it"? |
| 07:13:24 | <hololeap> | if you define 'a' as 'a -> b', it basically makes a CPS loop |
| 07:13:37 | <ski> | not the same `a' |
| 07:13:39 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 07:13:43 | <hololeap> | right |
| 07:14:07 | <ski> | (and even if you were talking about `a = a -> b', i still don't see what that would have to do with CPS) |
| 07:14:25 | <hololeap> | so when 'a' is a function you can control the program's flow, whereas if it is some (lazy) value being generated there is no way to control it |
| 07:14:38 | <hololeap> | so it loops forever |
| 07:14:48 | <ski> | what does "control the program's flow" mean, here ? |
| 07:15:02 | <ski> | i thought the fibonacci example showed that you could control it |
| 07:15:14 | <hololeap> | you pass a function in as a variable, and you can choose to call it, or not |
| 07:15:20 | → | monochrom joins (trebla@216.138.220.146) |
| 07:15:24 | <hololeap> | fix $ \loop x -> ... |
| 07:15:35 | <hololeap> | you can examine x and choose to run loop, or not |
| 07:15:51 | <ski> | you produce a list, and you can choose how many elements you want to generate / look at |
| 07:16:04 | <hololeap> | whereas, fix $ \x -> ... |
| 07:16:14 | <hololeap> | what can you do, except transform x somehow? |
| 07:16:25 | <ski> | `(:)' is non-strict |
| 07:16:39 | <ski> | that's what makes `fix (1 :)' non-bottom |
| 07:16:53 | <hololeap> | ok, I think I'm not getting the terminology correct here |
| 07:16:59 | <int-e> | > fix (\xs -> map (\n -> if n < 2 then n else xs !! (n-1) + xs !! (n-2)) [0..]) |
| 07:17:00 | <lambdabot> | [0,1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765,10946,... |
| 07:17:02 | <hololeap> | I think I used "bottom" inaccurately |
| 07:17:28 | <int-e> | "control flow" is misleading when your program is defining a bunch of constants. |
| 07:18:18 | <ski> | @let infixr 5 /\/; (/\/) :: [a] -> [a] -> [a]; [ ] /\/ ys = ys; (x:xs) /\/ ys = x : ys /\/ xs |
| 07:18:19 | <lambdabot> | Defined. |
| 07:18:25 | → | hgolden joins (~hgolden2@cpe-172-251-233-141.socal.res.rr.com) |
| 07:18:35 | → | titibandit joins (~titibandi@xdsl-87-78-231-157.nc.de) |
| 07:18:39 | <famubu[m]> | Thanks. Hadn't known about the TypeApplications extension. |
| 07:18:39 | <int-e> | (beware of that variant; not only is it inefficient, it'll also overflow because it produces [Int] rather than [Integer]) |
| 07:18:49 | <ski> | > fix (\abacaba -> repeat 0 /\/ map succ abacaba) |
| 07:18:51 | <lambdabot> | [0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1... |
| 07:19:07 | <hololeap> | > fix (\loop (x:xs) -> if x > 5 then [] else x : loop xs) (1..) |
| 07:19:09 | <lambdabot> | <hint>:1:59: error: parse error on input ‘..’ |
| 07:19:36 | <Lears> | hololeap: I've often used fix like `fix \~Foo{bar,baz} -> Foo{ bar = ..., baz = ... }` for mutually recursive records. |
| 07:19:38 | <hololeap> | > fix (\loop (x:xs) -> if x > 5 then [] else x : loop xs) [1..] |
| 07:19:40 | <lambdabot> | [1,2,3,4,5] |
| 07:19:45 | <ski> | > fix (\abbcbccd -> 0 : tail (abbcbccd /\/ map succ abbcbccd)) |
| 07:19:47 | <lambdabot> | [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,1,2,2,3,2,3... |
| 07:20:03 | <hololeap> | see, you can control the flow by terminating the loop |
| 07:20:42 | <hololeap> | > fix (\abbcbccd -> 0 : tail (abbcbccd /\/ map succ abbcbccd)) |
| 07:20:43 | <lambdabot> | [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,1,2,2,3,2,3... |
| 07:20:54 | <hololeap> | can't stop that, except by consuming it lazily |
| 07:20:59 | <jackdk> | Lears: that's a cool trick, I've never seen it before |
| 07:21:14 | → | perdent joins (~perdent@124.188.233.11) |
| 07:21:38 | <ski> | > takeWhile (<= 5) (fix ((1 :) . map succ)) -- also terminating the loop, hololeap |
| 07:21:41 | <lambdabot> | [1,2,3,4,5] |
| 07:21:42 | <int-e> | :t (/\/) |
| 07:21:43 | <lambdabot> | [a] -> [a] -> [a] |
| 07:21:50 | <ski> | "interleave" |
| 07:22:19 | <hololeap> | right, because takeWhile is consuming the result lazily. I was asking a question about fix as a standalone |
| 07:22:23 | <ski> | @quote waiting.to.happen |
| 07:22:23 | <lambdabot> | elliott says: race condition waiting to happen |
| 07:22:29 | <ski> | bah |
| 07:22:42 | <ski> | @quote being.like.loops |
| 07:22:42 | <lambdabot> | Cale says: You should think of lists as being like loops which are waiting to happen. |
| 07:23:06 | → | kitty4 joins (~kitty@096-039-147-043.res.spectrum.com) |
| 07:23:20 | → | ChaiTRex joins (~ChaiTRex@user/chaitrex) |
| 07:24:57 | <ski> | Lears : for a data type that you've already defined ior are also using elsewhere ? or just for this loop ? |
| 07:26:17 | → | razetime joins (~quassel@117.254.35.202) |
| 07:26:52 | <hololeap> | Lears: I don't think I understand that :/ |
| 07:27:08 | <hololeap> | how would you use that? |
| 07:27:20 | <Lears> | ski: I'm not sure I understand the question. |
| 07:28:03 | <Lears> | hololeap: It's equivalent to let bar_ = ...; baz_ = ... in Foo{ bar = bar_, baz = baz_ }, but you can use the real names. |
| 07:28:59 | <hololeap> | I would probably just use RecordWildcards or something like that |
| 07:30:06 | <hololeap> | also, that line hurts my head :) |
| 07:30:12 | → | razetime_ joins (~quassel@117.254.35.202) |
| 07:30:30 | <hololeap> | why are you using ~ on Foo |
| 07:30:46 | <Lears> | It needs to be a lazy match on the constructor, or it'll bottom. |
| 07:31:19 | <hololeap> | I think I'm just struggling with how it _doesnt_ bottom even with the lazy match |
| 07:31:29 | <hololeap> | it's a very tight knot |
| 07:32:23 | → | ashpil joins (~ashpil@c-65-50-153-147.hs.gigamonster.net) |
| 07:33:08 | <hololeap> | cool, though, now that I'm starting to understand it |
| 07:33:54 | × | mmhat quits (~mmh@p200300f1c706f761ee086bfffe095315.dip0.t-ipconnect.de) (Quit: WeeChat 3.6) |
| 07:34:02 | <hololeap> | it waits to get it's first Foo in the lambda because of laziness, then grabs a Foo from the lambda's contents |
| 07:34:06 | <hololeap> | *its |
| 07:34:30 | <hololeap> | is that basically the way it works? |
| 07:35:49 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 07:35:58 | <int-e> | @undef |
| 07:35:58 | <lambdabot> | Undefined. |
| 07:36:06 | <int-e> | :t undefined `asArgOf` show |
| 07:36:07 | <lambdabot> | Show a => a |
| 07:37:29 | <int-e> | ski: I think that's a better name, which was my main issue with `asTypeIn`, too close to `asTypeOf`, too hard to understand what `In` is supposed to do. |
| 07:37:33 | ← | ashpil parts (~ashpil@c-65-50-153-147.hs.gigamonster.net) () |
| 07:38:26 | → | kenran joins (~kenran@200116b82bb6f0004ceffc356ad80ff5.dip.versatel-1u1.de) |
| 07:40:33 | × | razetime quits (~quassel@117.254.35.202) (Ping timeout: 252 seconds) |
| 07:40:49 | × | razetime_ quits (~quassel@117.254.35.202) (Ping timeout: 268 seconds) |
| 07:41:01 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 07:44:22 | <Lears> | hololeap: It's a bit vague, but it doesn't sound wrong. With the lazy match, it doesn't need to see a Foo constructor before it continues to the body, it just needs to bind bar and baz to the presumed contents. Then with those in hand, it can build the result just like regular mutual recursion. |
| 07:45:19 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 252 seconds) |
| 07:45:42 | × | titibandit quits (~titibandi@xdsl-87-78-231-157.nc.de) (Remote host closed the connection) |
| 07:48:45 | <c_wraith> | but... why is it using fix? |
| 07:48:57 | <c_wraith> | Can't that just be done with let? |
| 07:49:04 | → | acidjnk joins (~acidjnk@p200300d6e7137a17a1f5c99515dc5cac.dip0.t-ipconnect.de) |
| 07:49:09 | <int-e> | @src fix |
| 07:49:09 | <lambdabot> | fix f = let x = f x in x |
| 07:50:00 | <int-e> | c_wraith: I think the question is more about how `fix` can be used and less about whether it should be used. |
| 07:50:01 | <hololeap> | can't it just be done like: Foo { bar = ..., baz = ... } |
| 07:51:21 | <hololeap> | what makes it "mutually recursive"? |
| 07:51:32 | <ski> | Lears : sorry, i was talking about the data type that `Foo' belongs to |
| 07:51:51 | <int-e> | . o O ( The primary use of `fix` is to define the Fibonacci numbers. ) |
| 07:52:01 | <Lears> | It's like a `rec { ... }` recursive record from some other languages like nix. bar and baz can be defined in terms of one another. |
| 07:52:01 | → | benin0 joins (~benin@183.82.176.32) |
| 07:52:26 | <ski> | int-e : well, i suppose the proximity to `asTypeOf' was intentional ("what's the type of `fix', as used in the body of the following lambda ?") |
| 07:52:43 | <c_wraith> | int-e: meh. the primary use of fix is to define and use a loop in-line in a do block, instead of as two separate things |
| 07:52:52 | × | img quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in) |
| 07:54:49 | <hololeap> | Lears: I see |
| 07:55:40 | <int-e> | c_wraith: see, I'd never do that |
| 07:55:44 | → | img joins (~img@user/img) |
| 07:56:13 | × | Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 07:56:53 | <int-e> | c_wraith: Though it's not unreasonable, I guess. And it saves two lines over the `= go where go = do` thing I do instead. |
| 07:57:30 | <int-e> | Maybe if `fix` was exported by the Prelude, my habits would be different. :P |
| 07:58:46 | <Lears> | ski: I'm still not really sure what you're asking, but I might use this with any data type. One of the best uses I've made of it was for an extensible parser record, something like: `ExtParser{ whitespace :: Parser (), atom :: Parser Expr, ... }`, where mutual recursion of the fields was essentially mandatory. |
| 07:59:07 | <c_wraith> | Lears: can't you do it without fix? |
| 07:59:53 | × | machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 255 seconds) |
| 08:00:05 | <ski> | Lears : `Foo' is a data constructor (defined using record syntax) of some `data' type. i was asking whether this data type was defined specifically in order to be able to make your mutually recursive loop, and whether it would be used anywhere else than for that |
| 08:00:07 | <Lears> | fix is not a language construct; naturally, anything you can do with it, you can do without. But I found the combination of fix with NamedFieldPuns to be the cleanest way. |
| 08:01:06 | <int-e> | > let foo@(a, b) = (b+1, 0) in foo |
| 08:01:08 | <lambdabot> | (1,0) |
| 08:01:14 | <hololeap> | c_wraith: I had only ever used fix in that way as well, and I asked if there were other ways to use it |
| 08:04:10 | <int-e> | % :set -XRecordWildCards |
| 08:04:10 | <yahb2> | <no output> |
| 08:04:18 | <int-e> | % data Foo = Foo { aaa :: Int, bbb :: Int } deriving Show |
| 08:04:18 | <yahb2> | <no output> |
| 08:04:24 | <int-e> | % let foo@Foo{..} = Foo{ aaa = bbb + 1, bbb = 0 } in foo |
| 08:04:24 | <yahb2> | Foo {aaa = 1, bbb = 0} |
| 08:05:09 | × | kenran quits (~kenran@200116b82bb6f0004ceffc356ad80ff5.dip.versatel-1u1.de) (Quit: WeeChat info:version) |
| 08:05:10 | <c_wraith> | hololeap: https://paste.tomsmeding.com/ns0C3OSx |
| 08:05:29 | <hololeap> | % let aaa = bbb + 1; bbb = 0; in Foo{..} |
| 08:05:29 | <yahb2> | Foo {aaa = 1, bbb = 0} |
| 08:06:42 | <int-e> | Ah, even simpler |
| 08:06:43 | <ski> | c_wraith : yes, i do that occasionally, as well |
| 08:07:27 | <int-e> | (and easier to lay out) |
| 08:08:07 | <hololeap> | c_wraith: yeah I was thinking you could use a Monad instead of a function |
| 08:08:28 | <c_wraith> | it's still a function. |
| 08:08:45 | <c_wraith> | it's being applied to a function of type IO () -> IO () |
| 08:08:54 | <hololeap> | `loop` doesn't have the type signature of a function |
| 08:09:02 | <ski> | % let foo@Foo {aaa = const 0 -> bbb,bbb = (+ 1) -> aaa} = Foo {..} in foo |
| 08:09:02 | <yahb2> | Foo {aaa = 1, bbb = 0} |
| 08:09:06 | <hololeap> | well I guess it does... |
| 08:09:19 | <c_wraith> | loop doesn't. but loop isn't the parameter to fix |
| 08:09:47 | <hololeap> | right, usually `loop` refers to a function when I use fix |
| 08:09:48 | <ski> | i believe hololeap was earlier talking about the cyclic result |
| 08:13:27 | × | Vajb quits (~Vajb@2001:999:70c:2b99:3e15:6929:5bc6:c014) (Read error: Connection reset by peer) |
| 08:13:53 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3ad-40.dhcp.inet.fi) |
| 08:15:21 | <hololeap> | :t \f x -> fix $ \loop -> if f x then mempty else x <> loop |
| 08:15:23 | <lambdabot> | Monoid a => (a -> Bool) -> a -> a |
| 08:16:27 | <hololeap> | :t (\f x -> fix $ \loop -> if f x then mempty else x <> loop) (>=5) [1..] |
| 08:16:28 | <lambdabot> | (Ord a, Num a, Num [a], Enum a) => [a] |
| 08:16:35 | <hololeap> | > (\f x -> fix $ \loop -> if f x then mempty else x <> loop) (>=5) [1..] |
| 08:16:36 | <lambdabot> | error: |
| 08:16:36 | <lambdabot> | • No instance for (Num [Integer]) arising from a use of ‘e_151’ |
| 08:16:36 | <lambdabot> | • In the expression: e_151 |
| 08:16:54 | × | acidjnk quits (~acidjnk@p200300d6e7137a17a1f5c99515dc5cac.dip0.t-ipconnect.de) (Ping timeout: 264 seconds) |
| 08:17:06 | <hololeap> | hm, sorry just playing around |
| 08:17:07 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3ad-40.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 08:17:51 | × | kitty4 quits (~kitty@096-039-147-043.res.spectrum.com) (Ping timeout: 268 seconds) |
| 08:18:06 | → | Vajb joins (~Vajb@2001:999:70c:2b99:3e15:6929:5bc6:c014) |
| 08:22:03 | → | kitty4 joins (~kitty@096-039-147-043.res.spectrum.com) |
| 08:25:59 | × | matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 255 seconds) |
| 08:28:52 | × | img quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in) |
| 08:29:11 | <jackdk> | anyone here familiar with `linear-base`? I'm curious why `hIsEOF :: Handle %1 -> RIO (Ur Bool, Handle)` is typed that way as opposed to `hIsEOF :: Handle -> RIO (Ur Bool)` - seems like as a query it shouldn't be necessary to consume and reissue the `Handle` |
| 08:30:50 | → | ddellaco1 joins (~ddellacos@89.45.90.53) |
| 08:31:06 | <hololeap> | maybe it needs exclusive control of the handle while it checks for eof? |
| 08:32:00 | <hololeap> | that doesn't really guarantee that, though |
| 08:32:42 | <geekosaur> | my guess is it's related to linearity |
| 08:33:04 | <hololeap> | right, linear types |
| 08:33:11 | <geekosaur> | so the caller doesnt have to use it twice |
| 08:33:13 | <int-e> | jackdk: don't you need to do that in order to ensure the right order of effects? |
| 08:33:17 | → | img joins (~img@user/img) |
| 08:34:13 | <int-e> | Hmm, or does RIO enforce that... then maybe it's to ensure that the file is still open? |
| 08:34:14 | × | raym quits (~raym@user/raym) (Quit: kernel update, rebooting...) |
| 08:35:03 | <geekosaur> | I would hope sequencing was part of RIO |
| 08:35:11 | × | ddellaco1 quits (~ddellacos@89.45.90.53) (Ping timeout: 252 seconds) |
| 08:35:12 | <jackdk> | I don't know, I'm new to it. I would've assumed the monad gave you sequencing, and you know the file is open because `hClose :: Handle %1 -> RIO ()` would consume it |
| 08:36:21 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 268 seconds) |
| 08:36:32 | <int-e> | Are you saying the type checker would accept hIsEOF h >> hClose h, but not hClose h >> hIsEOF h, if you had hIsEOF :: Handle -> RIO (Ur Bool)? |
| 08:36:40 | <int-e> | that seems unlikely. |
| 08:37:00 | → | raym joins (~raym@user/raym) |
| 08:37:10 | → | ddellaco1 joins (~ddellacos@89.45.90.131) |
| 08:39:04 | × | img quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in) |
| 08:41:57 | → | img joins (~img@user/img) |
| 08:44:10 | × | img quits (~img@user/img) (Client Quit) |
| 08:46:12 | → | Pickchea joins (~private@user/pickchea) |
| 08:46:44 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 08:47:05 | → | img joins (~img@user/img) |
| 08:47:13 | <jackdk> | That's what I would expect, but I tried rewriting `hIsEOF` in `linear-base` with the type I specified, and it seems to refuse both programs. Unsure if this is a limitation of current linear types or indicative of an actual error in my thinking |
| 08:48:38 | × | img quits (~img@user/img) (Client Quit) |
| 08:48:39 | × | ddellaco1 quits (~ddellacos@89.45.90.131) (Ping timeout: 268 seconds) |
| 08:51:30 | → | img joins (~img@user/img) |
| 08:52:26 | <int-e> | jackdk: Rejecting both is what I secretly hoped for. |
| 08:53:08 | <jackdk> | what am I missing? |
| 08:53:47 | <int-e> | I mean, I was confident that `hIsEOF h >> hClose h` and `hClose h >> hIsEOF h` would be treated the same by the type checker. And the only way to make sure that `h` can't be used after `hClase h` is to reject both of them. |
| 08:56:06 | × | perdent quits (~perdent@124.188.233.11) (Quit: Client closed) |
| 08:56:07 | <jackdk> | I feel like I half-understand why that must be true |
| 08:58:31 | → | matthewmosior joins (~matthewmo@173.170.253.91) |
| 09:00:09 | × | nki[m] quits (~nkimnkaga@2001:470:69fc:105::2:3a8d) (Quit: You have been kicked for being idle) |
| 09:00:15 | → | zxx7529 joins (~Thunderbi@user/zxx7529) |
| 09:01:57 | → | ddellaco1 joins (~ddellacos@89.45.90.170) |
| 09:02:12 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 09:03:07 | × | matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 244 seconds) |
| 09:03:36 | <Lears> | Isn't it just that h can only be used once and hClose uses it once, hence it can't be used elsewhere? Passing it to an unrestricted function could result in it being used any number of times. |
| 09:03:47 | × | waldo quits (~waldo@user/waldo) (Ping timeout: 252 seconds) |
| 09:04:38 | <Lears> | Though I'm not that familiar with linear types myself. |
| 09:06:21 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 252 seconds) |
| 09:08:29 | → | chomwitt joins (~chomwitt@2a02:587:dc15:5e00:f956:e7c7:43ea:328a) |
| 09:09:37 | × | kitty4 quits (~kitty@096-039-147-043.res.spectrum.com) (Ping timeout: 268 seconds) |
| 09:10:48 | × | tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz) |
| 09:15:05 | → | coot joins (~coot@213.134.176.158) |
| 09:15:22 | ← | jakalx parts (~jakalx@base.jakalx.net) () |
| 09:16:12 | → | matthewmosior joins (~matthewmo@173.170.253.91) |
| 09:16:36 | → | kitty4 joins (~kitty@096-039-147-043.res.spectrum.com) |
| 09:17:34 | <int-e> | Lears: After reading a bit on this, yeah, that's the reason. |
| 09:18:17 | × | chomwitt quits (~chomwitt@2a02:587:dc15:5e00:f956:e7c7:43ea:328a) (Ping timeout: 268 seconds) |
| 09:18:35 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 09:19:24 | → | chomwitt joins (~chomwitt@2a02:587:dc15:5e00:1855:2a35:cc0e:e682) |
| 09:22:29 | <ski> | Mercury (and ATS) has ways of indicating that you can pass a unique reference to a function, but it'll "hand it back" afterwards (without specifiying it as an explicit part of the result) |
| 09:22:44 | <ski> | ("borrowing", if you will, i guess) |
| 09:23:30 | <ski> | (i don't recall if Clean also has this. my memory says no, but i might be mistaken) |
| 09:24:16 | → | mastarija joins (~mastarija@2a05:4f46:e03:6000:20af:4cb5:fc31:abbc) |
| 09:26:13 | → | hrberg joins (~quassel@171.79-160-161.customer.lyse.net) |
| 09:29:04 | → | luffy joins (~chenqisu1@183.217.201.23) |
| 09:37:24 | × | ddellaco1 quits (~ddellacos@89.45.90.170) (Ping timeout: 268 seconds) |
| 09:38:34 | → | gurkenglas joins (~gurkengla@p548ac72e.dip0.t-ipconnect.de) |
| 09:39:18 | → | ddellaco1 joins (~ddellacos@89.45.90.118) |
| 09:44:46 | × | ddellaco1 quits (~ddellacos@89.45.90.118) (Ping timeout: 268 seconds) |
| 09:54:01 | × | nosewings quits (~ngpc@cpe-76-186-194-45.tx.res.rr.com) (Ping timeout: 252 seconds) |
| 09:57:48 | × | adanwan quits (~adanwan@gateway/tor-sasl/adanwan) (Ping timeout: 268 seconds) |
| 09:58:14 | → | adanwan joins (~adanwan@gateway/tor-sasl/adanwan) |
| 10:02:30 | × | kitty4 quits (~kitty@096-039-147-043.res.spectrum.com) (Ping timeout: 264 seconds) |
| 10:10:38 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection) |
| 10:11:15 | → | FinnElija joins (~finn_elij@user/finn-elija/x-0085643) |
| 10:15:07 | → | kitty4 joins (~kitty@096-039-147-043.res.spectrum.com) |
| 10:21:29 | → | nate4 joins (~nate@98.45.169.16) |
| 10:22:29 | → | irfan joins (~irfan@user/irfan) |
| 10:22:54 | → | yvan-sraka joins (~yvan-srak@105.67.135.250) |
| 10:24:24 | → | pagnol joins (~me@2a02-a453-dccb-1-6cd5-d678-3a95-67d0.fixed6.kpn.net) |
| 10:24:31 | → | wootehfoot joins (~wootehfoo@user/wootehfoot) |
| 10:26:17 | × | ChaiTRex quits (~ChaiTRex@user/chaitrex) (Remote host closed the connection) |
| 10:26:17 | × | jpds quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection) |
| 10:26:17 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection) |
| 10:26:24 | × | ec quits (~ec@gateway/tor-sasl/ec) (Remote host closed the connection) |
| 10:26:42 | × | nate4 quits (~nate@98.45.169.16) (Ping timeout: 268 seconds) |
| 10:26:55 | → | ChaiTRex joins (~ChaiTRex@user/chaitrex) |
| 10:27:30 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 10:27:56 | × | gurkenglas quits (~gurkengla@p548ac72e.dip0.t-ipconnect.de) (Ping timeout: 268 seconds) |
| 10:28:03 | → | jpds joins (~jpds@gateway/tor-sasl/jpds) |
| 10:28:06 | → | ec joins (~ec@gateway/tor-sasl/ec) |
| 10:30:20 | × | yvan-sraka quits (~yvan-srak@105.67.135.250) (Remote host closed the connection) |
| 10:31:47 | × | mastarija quits (~mastarija@2a05:4f46:e03:6000:20af:4cb5:fc31:abbc) (Quit: Leaving) |
| 10:32:03 | → | mastarija joins (~mastarija@2a05:4f46:e03:6000:20af:4cb5:fc31:abbc) |
| 10:32:26 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 10:32:43 | → | MajorBiscuit joins (~MajorBisc@46-229-126.internethome.cytanet.com.cy) |
| 10:33:24 | × | m1dnight quits (~christoph@78-22-0-121.access.telenet.be) (Quit: WeeChat 3.6) |
| 10:35:52 | × | img quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in) |
| 10:36:47 | × | mastarija quits (~mastarija@2a05:4f46:e03:6000:20af:4cb5:fc31:abbc) (Client Quit) |
| 10:38:09 | × | califax quits (~califax@user/califx) (Remote host closed the connection) |
| 10:38:52 | → | img joins (~img@user/img) |
| 10:39:48 | → | califax joins (~califax@user/califx) |
| 10:41:04 | × | califax quits (~califax@user/califx) (Remote host closed the connection) |
| 10:44:35 | × | kitty4 quits (~kitty@096-039-147-043.res.spectrum.com) (Ping timeout: 268 seconds) |
| 10:45:50 | × | econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity) |
| 10:52:17 | → | califax joins (~califax@user/califx) |
| 10:53:34 | → | haritz joins (~hrtz@2a02:8010:65b5:0:6009:6384:e3cb:2220) |
| 10:53:34 | × | haritz quits (~hrtz@2a02:8010:65b5:0:6009:6384:e3cb:2220) (Changing host) |
| 10:53:34 | → | haritz joins (~hrtz@user/haritz) |
| 10:53:48 | × | sander quits (~sander@user/sander) (Remote host closed the connection) |
| 10:54:10 | → | gurkenglas joins (~gurkengla@p548ac72e.dip0.t-ipconnect.de) |
| 10:56:07 | → | sander joins (~sander@user/sander) |
| 10:57:25 | → | acidjnk joins (~acidjnk@p200300d6e7137a17f898ec8a19fe3297.dip0.t-ipconnect.de) |
| 11:00:42 | × | ec quits (~ec@gateway/tor-sasl/ec) (Remote host closed the connection) |
| 11:01:07 | → | ec joins (~ec@gateway/tor-sasl/ec) |
| 11:01:33 | <gurkenglas> | I have a kind of function in mind. Its thing is sorta... that you have the data of how it was constructed, that you can memoize it, that you have hope of proving two of them equal |
| 11:01:35 | × | shriekingnoise quits (~shrieking@186.137.167.202) (Quit: Quit) |
| 11:01:57 | <gurkenglas> | it might be some sort of dual of linearly-typed functions |
| 11:02:44 | <gurkenglas> | a linearly typed function uses its argument once, a _ function "uses everything except the argument once"? |
| 11:04:36 | <gurkenglas> | "you can memoize it" not in the sense that you can write down the outputs for each input to not run it twice on the same input, but in the sense that running it n times takes as long as running it once plus O(n) |
| 11:06:03 | × | coot quits (~coot@213.134.176.158) (Quit: coot) |
| 11:06:54 | <gurkenglas> | Do you see what I mean? Can you guess what it'd be called? Do you have suggestions for how to investigate these? |
| 11:06:59 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 252 seconds) |
| 11:08:59 | → | ddellaco1 joins (~ddellacos@89.45.90.235) |
| 11:15:39 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 11:15:44 | → | mthunter joins (~mthunter2@user/mthunter) |
| 11:17:00 | × | adanwan quits (~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection) |
| 11:17:26 | → | adanwan joins (~adanwan@gateway/tor-sasl/adanwan) |
| 11:17:58 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 268 seconds) |
| 11:19:56 | → | FinnElija joins (~finn_elij@user/finn-elija/x-0085643) |
| 11:19:57 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 11:20:32 | × | califax quits (~califax@user/califx) (Remote host closed the connection) |
| 11:20:52 | → | califax joins (~califax@user/califx) |
| 11:21:34 | → | m1dnight joins (~christoph@78-22-0-121.access.telenet.be) |
| 11:22:23 | × | matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 255 seconds) |
| 11:24:09 | × | ChaiTRex quits (~ChaiTRex@user/chaitrex) (Remote host closed the connection) |
| 11:24:37 | → | ChaiTRex joins (~ChaiTRex@user/chaitrex) |
| 11:24:57 | × | icebreaker quits (~icebreake@user/icebreaker) (Remote host closed the connection) |
| 11:30:13 | × | zxx7529 quits (~Thunderbi@user/zxx7529) (Ping timeout: 268 seconds) |
| 11:30:15 | × | gurkenglas quits (~gurkengla@p548ac72e.dip0.t-ipconnect.de) (Ping timeout: 268 seconds) |
| 11:30:17 | × | MajorBiscuit quits (~MajorBisc@46-229-126.internethome.cytanet.com.cy) (Ping timeout: 268 seconds) |
| 11:35:12 | × | mrmr quits (~mrmr@user/mrmr) (Quit: Ping timeout (120 seconds)) |
| 11:35:30 | → | mrmr joins (~mrmr@user/mrmr) |
| 11:35:31 | → | matthewmosior joins (~matthewmo@173.170.253.91) |
| 11:35:56 | <zzz> | how do i make a custom type of mine a numeric literal? is it possible? |
| 11:38:19 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 268 seconds) |
| 11:39:30 | × | jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 268 seconds) |
| 11:39:40 | × | matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 244 seconds) |
| 11:39:56 | → | FinnElija joins (~finn_elij@user/finn-elija/x-0085643) |
| 11:44:46 | × | img quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in) |
| 11:46:25 | × | jpds quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection) |
| 11:46:26 | × | ChaiTRex quits (~ChaiTRex@user/chaitrex) (Remote host closed the connection) |
| 11:46:27 | → | MajorBiscuit joins (~MajorBisc@46-229-126.internethome.cytanet.com.cy) |
| 11:46:54 | → | ChaiTRex joins (~ChaiTRex@user/chaitrex) |
| 11:46:59 | → | jpds joins (~jpds@gateway/tor-sasl/jpds) |
| 11:47:05 | → | pmarg joins (~pmarg@2a01:799:159f:9b00:17c2:9fe8:3b24:da93) |
| 11:48:46 | <pavonia> | :t (123, 0.456) |
| 11:48:48 | <lambdabot> | (Fractional b, Num a) => (a, b) |
| 11:49:03 | <pavonia> | zzz: Implement one of those classes for your type |
| 11:49:25 | → | img joins (~img@user/img) |
| 11:50:01 | <pavonia> | :t (0.456, "abc", 123) |
| 11:50:04 | <lambdabot> | (Fractional a, Num c) => (a, [Char], c) |
| 11:52:07 | → | mbuf joins (~Shakthi@122.165.55.71) |
| 11:52:44 | → | ccntrq joins (~Thunderbi@172.209.94.92.rev.sfr.net) |
| 11:52:52 | → | matthewmosior joins (~matthewmo@173.170.253.91) |
| 11:55:19 | × | frost quits (~frost@user/frost) (Quit: Client closed) |
| 11:59:07 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 12:02:02 | <qrpnxz> | Haskell: Our functions are actually functions.™ 🙂 |
| 12:03:40 | → | yvan-sraka joins (~yvan-srak@105.67.135.250) |
| 12:05:29 | → | benin00 joins (~benin@2401:4900:2325:5674:b133:d14b:76b3:3d8) |
| 12:06:07 | <ski> | zzz : specifically, implement `fromInteger' and possibly `fromRational' (and, preferably, also the other methods of the relevant classes) |
| 12:07:01 | × | ec quits (~ec@gateway/tor-sasl/ec) (Remote host closed the connection) |
| 12:07:16 | → | ec joins (~ec@gateway/tor-sasl/ec) |
| 12:07:29 | × | benin0 quits (~benin@183.82.176.32) (Ping timeout: 252 seconds) |
| 12:07:29 | benin00 | is now known as benin0 |
| 12:08:35 | <ski> | @tell gurkenglas memoize your type of function, how ? (example, maybe ?) |
| 12:08:35 | <lambdabot> | Consider it noted. |
| 12:09:43 | × | pagnol quits (~me@2a02-a453-dccb-1-6cd5-d678-3a95-67d0.fixed6.kpn.net) (Ping timeout: 268 seconds) |
| 12:10:19 | zzz | facepalms |
| 12:10:21 | <zzz> | of course |
| 12:11:29 | × | ec quits (~ec@gateway/tor-sasl/ec) (Remote host closed the connection) |
| 12:11:53 | → | ec joins (~ec@gateway/tor-sasl/ec) |
| 12:12:13 | × | vglfr quits (~vglfr@145.224.94.75) (Ping timeout: 244 seconds) |
| 12:13:57 | <ski> | if you want to fail at compile-time for some attempted literals, you could also try TH, possibly with quasi-quoters |
| 12:14:22 | <zzz> | haskell is so nice that i sometimes forget how much |
| 12:19:27 | × | ddellaco1 quits (~ddellacos@89.45.90.235) (Ping timeout: 244 seconds) |
| 12:21:19 | → | ddellaco1 joins (~ddellacos@89.45.90.157) |
| 12:24:36 | → | sr83402380 joins (~sr8340238@cpc142034-slou6-2-0-cust488.17-4.cable.virginm.net) |
| 12:25:34 | <sr83402380> | I get this error when trying to run stack build https://paste.tomsmeding.com/NqyTEFxE could someone explain what this means? |
| 12:25:59 | × | Everything quits (~Everythin@37.115.210.35) (Quit: leaving) |
| 12:28:48 | × | ddellaco1 quits (~ddellacos@89.45.90.157) (Ping timeout: 268 seconds) |
| 12:30:39 | → | ddellaco1 joins (~ddellacos@89.45.90.66) |
| 12:30:55 | <sr83402380> | I have a .cabal file there and I also have a stack.yaml file |
| 12:37:07 | → | coot joins (~coot@213.134.176.158) |
| 12:38:40 | × | Pickchea quits (~private@user/pickchea) (Ping timeout: 268 seconds) |
| 12:40:45 | → | vglfr joins (~vglfr@145.224.94.75) |
| 12:40:47 | <sr83402380> | nvm |
| 12:40:51 | × | sr83402380 quits (~sr8340238@cpc142034-slou6-2-0-cust488.17-4.cable.virginm.net) (Remote host closed the connection) |
| 12:44:51 | × | MajorBiscuit quits (~MajorBisc@46-229-126.internethome.cytanet.com.cy) (Ping timeout: 268 seconds) |
| 12:46:08 | × | luffy quits (~chenqisu1@183.217.201.23) (Ping timeout: 268 seconds) |
| 12:50:45 | → | benin04 joins (~benin@183.82.206.125) |
| 12:52:23 | × | benin0 quits (~benin@2401:4900:2325:5674:b133:d14b:76b3:3d8) (Ping timeout: 255 seconds) |
| 12:52:23 | benin04 | is now known as benin0 |
| 12:54:03 | × | Flow quits (~none@gentoo/developer/flow) (Quit: WeeChat 3.5) |
| 12:54:13 | → | mastarija joins (~mastarija@2a05:4f46:e03:6000:40d3:9ecb:e074:4af3) |
| 12:54:52 | → | Flow joins (~none@gentoo/developer/flow) |
| 12:55:05 | × | matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 255 seconds) |
| 12:57:15 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 268 seconds) |
| 12:57:46 | → | waldo joins (~waldo@user/waldo) |
| 12:58:14 | × | mastarija quits (~mastarija@2a05:4f46:e03:6000:40d3:9ecb:e074:4af3) (Client Quit) |
| 12:58:25 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 12:58:32 | → | mastarija joins (~mastarija@2a05:4f46:e03:6000:40d3:9ecb:e074:4af3) |
| 13:00:17 | × | coot quits (~coot@213.134.176.158) (Ping timeout: 268 seconds) |
| 13:02:57 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 13:04:54 | × | acidjnk quits (~acidjnk@p200300d6e7137a17f898ec8a19fe3297.dip0.t-ipconnect.de) (Ping timeout: 264 seconds) |
| 13:07:28 | <zzz> | GeneralizedNewtypeDeriving + default <3 |
| 13:08:15 | → | mastarij1 joins (~mastarija@2a05:4f46:e03:6000:fc8c:bae4:d1f2:2372) |
| 13:08:36 | × | mastarija quits (~mastarija@2a05:4f46:e03:6000:40d3:9ecb:e074:4af3) (Quit: Leaving) |
| 13:09:05 | × | mastarij1 quits (~mastarija@2a05:4f46:e03:6000:fc8c:bae4:d1f2:2372) (Client Quit) |
| 13:09:22 | → | mastarija joins (~mastarija@2a05:4f46:e03:6000:fc8c:bae4:d1f2:2372) |
| 13:10:00 | <zzz> | now i just need a way to tell ghc "benckmark my program with all possible combinations of these types" |
| 13:10:37 | × | mastarija quits (~mastarija@2a05:4f46:e03:6000:fc8c:bae4:d1f2:2372) (Client Quit) |
| 13:10:39 | → | matthewmosior joins (~matthewmo@173.170.253.91) |
| 13:11:20 | → | mastarija joins (~mastarija@2a05:4f46:e03:6000:fc8c:bae4:d1f2:2372) |
| 13:13:21 | → | darklambda joins (~whateverg@58.182.140.104) |
| 13:16:09 | × | yvan-sraka quits (~yvan-srak@105.67.135.250) (Remote host closed the connection) |
| 13:19:01 | <mastarija> | I'm having some issues with overlapping instances for servant authentication : https://paste.tomsmeding.com/c6iWXrNQ |
| 13:19:28 | <mastarija> | I've cleaned the data type in question and possible instances that ghc can't choose between |
| 13:19:37 | <mastarija> | I don't quite see what's confusing it |
| 13:23:38 | → | odnes joins (~odnes@109-178-141-43.pat.ren.cosmote.net) |
| 13:23:39 | × | odnes quits (~odnes@109-178-141-43.pat.ren.cosmote.net) (Remote host closed the connection) |
| 13:24:15 | × | darklambda quits (~whateverg@58.182.140.104) (Read error: Connection reset by peer) |
| 13:24:19 | → | darklamb1a joins (~whateverg@58.182.140.104) |
| 13:25:19 | <mastarija> | I did add couple of custom combinators, but I don't think that should confuse it |
| 13:27:21 | × | darklamb1a quits (~whateverg@58.182.140.104) (Client Quit) |
| 13:34:06 | → | szkl joins (uid110435@id-110435.uxbridge.irccloud.com) |
| 13:35:30 | × | ddellaco1 quits (~ddellacos@89.45.90.66) (Ping timeout: 264 seconds) |
| 13:35:58 | → | nilradical joins (~nilradica@user/naso) |
| 13:36:59 | → | ddellaco1 joins (~ddellacos@89.46.114.248) |
| 13:37:52 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 268 seconds) |
| 13:37:59 | × | stiell quits (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection) |
| 13:41:25 | → | stiell joins (~stiell@gateway/tor-sasl/stiell) |
| 13:51:25 | <nilradical> | did john carmack ever release his haskell port of wolf3d |
| 13:58:30 | <qrpnxz> | there a way to tell the linter that a function's result is meant to be ignored? I have a function that throws so returns a polymorphic type, but linter thinks i perhaps wanted to use that unusable value lol |
| 14:00:08 | × | mastarija quits (~mastarija@2a05:4f46:e03:6000:fc8c:bae4:d1f2:2372) (Ping timeout: 268 seconds) |
| 14:00:50 | <ski> | hm, ooc, how are you "using" it ? |
| 14:01:00 | <ski> | (disclaimer, i dunno knobs on linter) |
| 14:01:16 | → | yvan-sraka joins (~yvan-srak@105.67.135.250) |
| 14:01:42 | <qrpnxz> | idk what ooc means, but i just call the function idk what you mean |
| 14:01:42 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 14:04:09 | <ski> | ("out of curiosity") |
| 14:04:59 | <ski> | does the function compute an action ? like you're saying `_ <- ...' or `...' in `do' ? |
| 14:05:15 | <ski> | or you're using `let' or `where' ? (`case' ?) |
| 14:05:59 | <qrpnxz> | nah i just ..., if i did _ <- ... the warning would go away sure, but i dont' want to do that since i'm not ignoring anything, the function doesn't return! |
| 14:06:24 | <zzz> | is this hlint? |
| 14:06:47 | <qrpnxz> | uhhh, probably let me check |
| 14:07:05 | <qrpnxz> | i think so |
| 14:07:49 | <qrpnxz> | ah wait it's not a linter hint, it's a ghc warning |
| 14:07:51 | <qrpnxz> | oh boy |
| 14:07:56 | <ski> | is it the last command in a `do' ? |
| 14:07:57 | <qrpnxz> | now i've lost hope haha |
| 14:08:02 | <qrpnxz> | ski: no |
| 14:08:09 | <Lears> | There's -Wno-unused-do-binds or something like that. |
| 14:08:25 | <ski> | still wondering what in your code's triggering the warning |
| 14:08:25 | <qrpnxz> | yeah, but i do want the warnings in general, so i rather not do that |
| 14:09:11 | <qrpnxz> | ski: it's triggered because i have like `... >> throw bad >> ...` and ghc sees i never use the result of throw (this is my own throw, not base throw) so it complains |
| 14:09:33 | <ski> | and the point of the `>> ...' ? |
| 14:10:08 | <qrpnxz> | hmm, point was to match types, but i see your point now lol |
| 14:10:11 | × | hippoid quits (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) (Quit: WeeChat 3.5) |
| 14:10:16 | <ski> | (the `throw' is conditional ?) |
| 14:11:19 | <ski> | heh, not sure i had a point, as such, just curious about what the source was |
| 14:11:19 | <qrpnxz> | yes, i throw on error, but you are right, that following statement was pointless is what the real problem was. Removed it and the warning went away. |
| 14:11:49 | <ski> | yay |
| 14:11:55 | <qrpnxz> | 🥳 |
| 14:12:20 | ← | mthunter parts (~mthunter2@user/mthunter) () |
| 14:12:58 | <ski> | (fwiw, dunno what you meant by "match types", either) |
| 14:13:37 | → | jesone joins (~jesone@2601:192:7f:da30::fcf8) |
| 14:14:28 | <qrpnxz> | in my subconcious i treated throw as not polymorphic, so i put a statement afterward that was the right type for that place in the code. |
| 14:17:51 | <zzz> | hlint warns me if i name some_thing like this. hlint: WHY NOT CAMELCASE??? |
| 14:18:03 | <zzz> | shut up hlint |
| 14:18:39 | <qrpnxz> | lol |
| 14:18:40 | → | Pickchea joins (~private@user/pickchea) |
| 14:19:00 | × | yvan-sraka quits (~yvan-srak@105.67.135.250) (Remote host closed the connection) |
| 14:19:12 | <Lears> | hlint is opinionated. You're supposed to hit it with a stick until it only says what you want to hear. |
| 14:19:42 | <zzz> | yup |
| 14:19:48 | <qrpnxz> | xd, i like opinionated for the most part |
| 14:20:06 | × | waldo quits (~waldo@user/waldo) (Quit: quit) |
| 14:21:21 | <zzz> | hlint: "Found: Something _ _ ; Why not: Something {}" |
| 14:21:50 | <zzz> | well, i could explain why not. but there is no input field for my explanation |
| 14:22:00 | <zzz> | stupid hlint |
| 14:22:41 | <geekosaur> | best part of vs code: on every stupid hlint hint there's an action "disable this hint" |
| 14:23:00 | → | nate4 joins (~nate@98.45.169.16) |
| 14:24:32 | <ski> | i don't care too much about some things hlint is complaining about |
| 14:24:45 | <ski> | qrpnxz : ic, ty |
| 14:25:13 | <qrpnxz> | zzz: lol i felt that |
| 14:25:51 | <qrpnxz> | geekosaur: best part of vs code: i write garbage and then apply all hints to make it look nice automatically |
| 14:25:59 | <qrpnxz> | 😁 |
| 14:27:08 | → | machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net) |
| 14:27:15 | <Rembane_> | I used brittany for that when writing Haskell, but I don't know if brittany is maintained anymore. |
| 14:27:55 | × | nate4 quits (~nate@98.45.169.16) (Ping timeout: 252 seconds) |
| 14:29:08 | × | matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 244 seconds) |
| 14:30:46 | <qrpnxz> | last version november 2021 |
| 14:31:08 | <qrpnxz> | "Added support for GHC 9.0. Dropped support for all other versions of GHC" |
| 14:32:20 | <zzz> | hlint asks me why not combine a bunch of local bindings from different functions that look the same, completely unaware of free variables |
| 14:32:53 | <qrpnxz> | brittany looks pretty good in the demo video |
| 14:34:25 | × | jesone quits (~jesone@2601:192:7f:da30::fcf8) (Remote host closed the connection) |
| 14:34:32 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 14:34:32 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 14:34:32 | → | wroathe joins (~wroathe@user/wroathe) |
| 14:35:50 | × | ddellaco1 quits (~ddellacos@89.46.114.248) (Ping timeout: 268 seconds) |
| 14:37:21 | → | ddellaco1 joins (~ddellacos@89.45.90.209) |
| 14:40:58 | <nilradical> | relude has a custom hlint file that is really handy |
| 14:41:53 | → | jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) |
| 14:43:41 | × | ddellaco1 quits (~ddellacos@89.45.90.209) (Ping timeout: 252 seconds) |
| 14:45:19 | → | bontaq joins (~user@ool-45779fe5.dyn.optonline.net) |
| 14:45:41 | → | ddellaco1 joins (~ddellacos@89.45.90.170) |
| 14:46:05 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 14:46:21 | <geekosaur> | hlint kept suggesting more obtuse and generally longer substitutions for me |
| 14:46:50 | <geekosaur> | no thank you, I want to understand that code in 6 months |
| 14:52:57 | → | waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) |
| 14:53:02 | → | acidjnk joins (~acidjnk@p200300d6e7137a17b9b7690179552a14.dip0.t-ipconnect.de) |
| 14:54:38 | → | zebrag joins (~chris@user/zebrag) |
| 14:55:07 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 14:58:56 | → | matthewmosior joins (~matthewmo@173.170.253.91) |
| 14:59:55 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 268 seconds) |
| 15:01:41 | → | kenran joins (~kenran@200116b82bfce100213ee5ca9c704528.dip.versatel-1u1.de) |
| 15:03:20 | × | matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 255 seconds) |
| 15:07:40 | → | gurkenglas joins (~gurkengla@p548ac72e.dip0.t-ipconnect.de) |
| 15:08:16 | → | alp_ joins (~alp@user/alp) |
| 15:10:59 | × | adanwan quits (~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection) |
| 15:11:08 | × | pmarg quits (~pmarg@2a01:799:159f:9b00:17c2:9fe8:3b24:da93) (Ping timeout: 268 seconds) |
| 15:11:25 | → | adanwan joins (~adanwan@gateway/tor-sasl/adanwan) |
| 15:13:46 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 15:16:05 | × | Pickchea quits (~private@user/pickchea) (Quit: Leaving) |
| 15:16:12 | → | matthewmosior joins (~matthewmo@173.170.253.91) |
| 15:17:53 | → | king_gs joins (~Thunderbi@2806:103e:29:da7a:8e16:45ff:feeb:cfcf) |
| 15:18:44 | × | pavonia quits (~user@user/siracusa) (Quit: Bye!) |
| 15:19:11 | × | king_gs quits (~Thunderbi@2806:103e:29:da7a:8e16:45ff:feeb:cfcf) (Client Quit) |
| 15:23:58 | × | mbuf quits (~Shakthi@122.165.55.71) (Quit: Leaving) |
| 15:24:14 | <zzz> | wait. since when can we write `t :: Bool = True |
| 15:24:25 | <zzz> | ` ? |
| 15:25:49 | <ski> | `PatternSignatures', or `ScopedTypeVariables' |
| 15:25:53 | <geekosaur> | I think that's part of ScopedTy[peVariables and therefore of GHC2021 |
| 15:26:10 | <ski> | (also `<pat> :: <type> <- <expr>' commands) |
| 15:26:26 | → | pmarg joins (~pmarg@224.80-203-5.customer.lyse.net) |
| 15:26:46 | × | pmarg quits (~pmarg@224.80-203-5.customer.lyse.net) (Remote host closed the connection) |
| 15:27:43 | <ski> | (also, i'd like to be able to write result type ascriptions, like `foo (x :: A) :: B = ..x..' ..) |
| 15:28:22 | <monochrom> | Did you get that influence from SML? :) |
| 15:28:39 | <monochrom> | Although, SML got that influence from Algol etc... |
| 15:28:49 | → | razetime joins (~quassel@117.254.35.202) |
| 15:28:57 | → | razetime_ joins (~quassel@117.254.35.202) |
| 15:28:57 | <ski> | hm .. probably |
| 15:29:06 | × | kenran quits (~kenran@200116b82bfce100213ee5ca9c704528.dip.versatel-1u1.de) (Quit: WeeChat info:version) |
| 15:29:06 | <ski> | (although i learned SML after Haskell) |
| 15:29:22 | <zzz> | ah ok |
| 15:29:46 | × | razetime quits (~quassel@117.254.35.202) (Client Quit) |
| 15:29:50 | × | razetime_ quits (~quassel@117.254.35.202) (Client Quit) |
| 15:30:04 | → | razetime joins (~quassel@117.254.35.202) |
| 15:30:13 | <ski> | hm, Algol assigns result value to function name, like Pascal (and Ada, iirc), does ? |
| 15:30:37 | <zzz> | ski: yeah that would be nice |
| 15:31:56 | <fr33domlover[m]> | Is there a library for types parameterized by container type? e.g. `data T f = T (f Int)` ? I'm looking for a way to automatically derive Eq, Ord, etc. instance for a type like that |
| 15:32:16 | <fr33domlover[m]> | I recall a library but can't find it or recall its name :-/ |
| 15:32:44 | <ski> | (while we're at it, we could also allow "declaration follows use"-style signatures (a la C), like `map (_ :: a -> b) (_ :: [a]) :: [b]',`primes !! _ :: Integer', .. or maybe not) |
| 15:33:04 | <monochrom> | Yeah Pascal got that from Algol, too. |
| 15:33:11 | <ski> | figured |
| 15:33:21 | <zzz> | ski: haskell needs an alternative syntax |
| 15:33:29 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 15:33:44 | <fr33domlover[m]> | Yay found it https://hackage.haskell.org/package/barbies :P |
| 15:34:01 | <APic> | yay |
| 15:34:08 | <zzz> | \o/ |
| 15:34:39 | <ski> | i sorta like that, except that i think you should give your own name for the result (separately from the function name) .. or at least, you ought to be able to. (MPD (Multi-Processing, Parallel, Distributed) (a derivative of SR), a minor language i encountered, does this) |
| 15:35:09 | <ski> | also, the Mercury `foo(X,Y) = Z :- ..X..Y..Z..' is very similar |
| 15:35:49 | <ski> | (or `foo x y = z where ..x..y..; z = ..x..y..', in Haskell terms) |
| 15:36:15 | <qrpnxz> | lmao https://hackage.haskell.org/package/bytestring-0.11.3.1/docs/src/Data.ByteString.Internal.html#accursedUnutterablePerformIO |
| 15:36:39 | <monochrom> | > f x y = let f = [x,y] in f |
| 15:36:41 | <lambdabot> | <hint>:1:7: error: parse error on input ‘=’ |
| 15:36:45 | <monochrom> | Oh oops |
| 15:36:52 | → | mastarija joins (~mastarija@2a05:4f46:e03:6000:80e6:5d48:fb8:8fa0) |
| 15:37:05 | <monochrom> | > let (f x y = let f = [x,y] in f) in f 3 4 |
| 15:37:06 | <lambdabot> | <hint>:1:12: error: parse error on input ‘=’ |
| 15:37:28 | <qrpnxz> | hm, that looks fine though |
| 15:37:30 | <monochrom> | Sorry! I'll stop. :) |
| 15:38:18 | <mastarija> | can anyone help me decypher this servant error? https://paste.tomsmeding.com/c6iWXrNQ |
| 15:38:19 | <qrpnxz> | > let { f x y = let f = [x,y] in f } in f 3 4 |
| 15:38:21 | <lambdabot> | [3,4] |
| 15:38:32 | <monochrom> | Yeah, that. Heaven on Earth. :) |
| 15:38:38 | <qrpnxz> | 😁 |
| 15:38:46 | <mastarija> | I don't get what's confusing him with those instances. |
| 15:39:07 | <mastarija> | I've made errors more readable if you scroll down |
| 15:39:14 | <int-e> | . o O ( Somebody used overlapping instances and you're paying the price.) |
| 15:39:19 | <ski> | > let f x ((x :) . (: []) -> f) = f in f 3 4 |
| 15:39:21 | <lambdabot> | [3,4] |
| 15:39:32 | <qrpnxz> | wot |
| 15:39:43 | <ski> | look ma, shadowing ! |
| 15:40:07 | <qrpnxz> | that pattern match blow my mind, does not look legal |
| 15:41:06 | <monochrom> | It's "view patterns". |
| 15:41:11 | <int-e> | > let compute x | x <- x-1, x <- 4*x, x <- x `div` 7 = x in compute 42 |
| 15:41:13 | <lambdabot> | 23 |
| 15:41:32 | <qrpnxz> | oh i've heard of those let's see |
| 15:41:38 | <mastarija> | int-e, any way around those overlapping instances perhaps? |
| 15:44:22 | <qrpnxz> | without knowing servant deeply and your code as well, personally i can't help you with that. What might help is being more specific with our types (annotating) perhaps? That helps GHC choose the instance. |
| 15:44:37 | <qrpnxz> | s/our/your |
| 15:45:00 | <mastarija> | :( |
| 15:45:45 | <int-e> | Me neither, though the instance heads look like there *is* a genuine overlap which may require IncoherenInstances and prayers to be accepted. |
| 15:46:05 | <int-e> | +t |
| 15:46:18 | × | acidjnk quits (~acidjnk@p200300d6e7137a17b9b7690179552a14.dip0.t-ipconnect.de) (Ping timeout: 264 seconds) |
| 15:47:09 | Hash | is now known as OpenSores |
| 15:49:53 | OpenSores | is now known as Hash |
| 15:50:01 | <int-e> | it's funny how lines 56-59 aren't more specific than lines 49-50 (the rest of it doesn't matter) |
| 15:50:51 | <mastarija> | Damn, and the day was going so well :/ |
| 15:53:06 | <int-e> | I guess the "problem" is that a and a' are the same, so both (a Servant.API.Alternative.:<|>) and (a' Servant.API.Alternative.:<|>) can stand in for `m`. |
| 15:53:29 | <mastarija> | Is there a way to "debug" type inference? |
| 15:53:37 | <mastarija> | Like, going step by step |
| 15:53:46 | <mastarija> | That would be a nice feature |
| 15:54:03 | → | pt_owl joins (~noone@p200300e277470aa2231dde224d8a36df.dip0.t-ipconnect.de) |
| 15:54:24 | <int-e> | So /maybe/ this can be avoided by grouping all the :<|> differently. That... doesn't seem like a fun idea to investigate. |
| 15:55:28 | <mastarija> | I'm using generics that turn records into a tree of (:<|>) |
| 15:55:54 | <mastarija> | Funny thing is, only one sub api is causing this problem. If I comment it out then others work |
| 15:56:04 | <mastarija> | But I don't have anything special in that API... |
| 15:56:39 | <zzz> | mastarija: DerivingStrategies not enough? :p |
| 15:57:23 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 252 seconds) |
| 15:57:41 | <zzz> | oops nvm that. i miread |
| 15:57:44 | <zzz> | *misread |
| 15:57:56 | → | econo joins (uid147250@user/econo) |
| 15:58:42 | <int-e> | mastarija: Well, some of the old/new pairs to the left of a :<|> are the same as it goes down that tree... maybe that doesn't happen for the other services? |
| 15:59:34 | <int-e> | And by "some" I guess I mean "all". (This is me looking at the cleaned data type.) |
| 16:00:06 | × | lyiriyah[m] quits (~lyiriyahm@2001:470:69fc:105::cc0) (Quit: You have been kicked for being idle) |
| 16:00:26 | → | mrmr7 joins (~mrmr@user/mrmr) |
| 16:00:39 | × | mjs2600 quits (~mjs2600@c-24-91-3-49.hsd1.vt.comcast.net) (Quit: ZNC 1.8.2 - https://znc.in) |
| 16:01:10 | <mastarija> | hm.. well in this case I'd expect them to stay the same :/ |
| 16:01:58 | × | ezzieyguywuf quits (~Unknown@user/ezzieyguywuf) (Remote host closed the connection) |
| 16:02:10 | × | mrmr quits (~mrmr@user/mrmr) (Ping timeout: 268 seconds) |
| 16:02:10 | mrmr7 | is now known as mrmr |
| 16:02:11 | → | mjs2600 joins (~mjs2600@c-24-91-3-49.hsd1.vt.comcast.net) |
| 16:03:50 | → | ezzieyguywuf joins (~Unknown@user/ezzieyguywuf) |
| 16:04:04 | <int-e> | Instance resolution is such a blunt knife to cut with once you enter overlapping instances territory. https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/instances.html#instance-overlap |
| 16:04:10 | × | adanwan quits (~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection) |
| 16:04:47 | → | adanwan joins (~adanwan@gateway/tor-sasl/adanwan) |
| 16:08:22 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 268 seconds) |
| 16:13:04 | <mastarija> | int-e, hm... it can't decide between `AddSetCookies ('S n) (m old) (m new)` and `AddSetCookies ('S n) (a :<|> b) (a' :<|> b')` where m is a functor. |
| 16:13:12 | <mastarija> | :<|> is indeed a functor |
| 16:13:27 | <mastarija> | However, it is more specific than just `m a` |
| 16:13:31 | <int-e> | mastarija: The context is irrelevant for instance selection |
| 16:13:43 | <mastarija> | Therefore I'd expect that to resolve... |
| 16:13:49 | <mastarija> | int-e: what do you mean by that? |
| 16:13:57 | <int-e> | s/irrelevant/ignored/ |
| 16:13:59 | <mastarija> | Oh... |
| 16:14:14 | <mastarija> | So constraints don't matter |
| 16:14:20 | × | ccntrq quits (~Thunderbi@172.209.94.92.rev.sfr.net) (Remote host closed the connection) |
| 16:14:48 | <mastarija> | Ok, still. `:<|>` seems more specific than `m` |
| 16:15:12 | <int-e> | right. Which is how m = (a :<|>) [abusing syntax] becomes valid when a = a'. |
| 16:15:26 | × | benin0 quits (~benin@183.82.206.125) (Quit: The Lounge - https://thelounge.chat) |
| 16:15:49 | <int-e> | I agree that it /looks/ more specific. I don't really understand ghc's rules for that though. |
| 16:16:13 | <ski> | there's overlap, but one isn't more specific than the other (you need to instantiate both sides to get to the overlap) |
| 16:17:06 | <mastarija> | ski: what do you mean instantiate both sides? |
| 16:17:09 | <ski> | m = (a :<|>) as well as a = a' |
| 16:17:12 | × | nilradical quits (~nilradica@user/naso) (Read error: Connection reset by peer) |
| 16:17:13 | → | ccntrq joins (~Thunderbi@172.209.94.92.rev.sfr.net) |
| 16:17:41 | <ski> | mastarija : make more specific / specialize |
| 16:18:03 | → | nilradical joins (~nilradica@user/naso) |
| 16:18:12 | × | ccntrq quits (~Thunderbi@172.209.94.92.rev.sfr.net) (Client Quit) |
| 16:18:37 | <mastarija> | ski: all of the types listed here are quite concrete https://paste.tomsmeding.com/c6iWXrNQ |
| 16:18:42 | <ski> | AddSetCookies ('S n) (a :<|> b) (a :<|> b') -- this is the overlap. note it's not identical (in structure) to either side |
| 16:20:35 | <mastarija> | one of suggested instances ghc offers is `AddSetCookies ('S n) (a :<|> b) (a' :<|> b')` |
| 16:20:57 | <mastarija> | It's not missing the tick on second a |
| 16:21:46 | × | mvk quits (~mvk@2607:fea8:5ce3:8500::a1ec) (Ping timeout: 244 seconds) |
| 16:22:07 | <zzz> | ski: apparently we can also do `f :: A | someGuard = ... ; ...` |
| 16:22:17 | × | matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 244 seconds) |
| 16:22:29 | <ski> | sure |
| 16:22:54 | × | nilradical quits (~nilradica@user/naso) (Ping timeout: 264 seconds) |
| 16:23:27 | <ski> | (guards on pattern bindings can be useful, at times) |
| 16:25:16 | → | matthewmosior joins (~matthewmo@173.170.253.91) |
| 16:25:28 | <ski> | mastarija : yes, so it doesn't know which to pick (and there's none most specific) |
| 16:26:05 | <mastarija> | ah.. I've noticed now |
| 16:27:09 | → | nilradical joins (~nilradica@user/naso) |
| 16:27:57 | <mastarija> | Line 4-12 and 26-34 are the same `a` and he doesn't know if `m` in `AddSetCookies ('S n) (m old) (m new)` is perhaps `(:<|> a)` and therefore can't choose... |
| 16:29:44 | × | matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 255 seconds) |
| 16:33:08 | <mastarija> | is there a way to further evaluate a kind of a type? |
| 16:33:40 | <mastarija> | I used :kind! ToServantApi (MyAPI Double) |
| 16:33:53 | <mastarija> | But that only evaluated the "first layer" |
| 16:34:03 | <mastarija> | other type level functions weren't evaluated |
| 16:34:56 | × | ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 268 seconds) |
| 16:35:08 | <mastarija> | or rather, "deeper" type families weren't evaluated |
| 16:35:50 | → | ec joins (~ec@gateway/tor-sasl/ec) |
| 16:36:09 | ← | jakalx parts (~jakalx@base.jakalx.net) (Error from remote client) |
| 16:36:58 | → | ComingFromCPP joins (~ComingFro@2601:43:200:154f:e4ab:469f:ada2:4ef9) |
| 16:37:14 | <ComingFromCPP> | Hello All! I've put together some questions: |
| 16:37:14 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 16:37:15 | <ComingFromCPP> | when to use difference environment and build tools, such as |
| 16:37:15 | <ComingFromCPP> | nix |
| 16:37:16 | <ComingFromCPP> | url: github.com/input-output-hk/haskell.nix |
| 16:37:16 | <ComingFromCPP> | url: github.com/jonascarpay/template-haskell |
| 16:37:17 | <ComingFromCPP> | url: github.com/utdemir/hs-nix-template |
| 16:37:17 | <ComingFromCPP> | cabal |
| 16:37:17 | <ComingFromCPP> | url: haskell.org/cabal |
| 16:37:18 | <ComingFromCPP> | setup: unknown cross-platform method, maybe via nix? |
| 16:37:18 | <ComingFromCPP> | stack |
| 16:37:19 | <ComingFromCPP> | setup: curl -sSL https://get.haskellstack.org/ | sh |
| 16:37:20 | <ComingFromCPP> | how to cross-compile, i.e. |
| 16:37:20 | <ComingFromCPP> | use cabal? |
| 16:37:20 | <ComingFromCPP> | use nix? |
| 16:37:21 | <ComingFromCPP> | how to debug a program, i.e. |
| 16:37:21 | <ComingFromCPP> | static analysis? |
| 16:37:22 | <ComingFromCPP> | performance analysis? |
| 16:37:23 | <ComingFromCPP> | exception best-practices? |
| 16:37:29 | <hpc> | @where paste |
| 16:37:30 | <lambdabot> | Help us help you: please paste full code, input and/or output at e.g. https://paste.tomsmeding.com |
| 16:38:21 | → | matthewmosior joins (~matthewmo@173.170.253.91) |
| 16:38:38 | <ComingFromCPP> | https://paste.tomsmeding.com/3spfP4SN |
| 16:39:07 | <ComingFromCPP> | It's not code, just notes and beginner questions to set up a good Haskell environment that my company and I can use |
| 16:39:25 | <mastarija> | right now we have `AddSetCookies ('S n) (m old) (m new)` and `AddSetCookies ('S n) (a :<|> b) (a' :<|> b')` |
| 16:39:48 | <mastarija> | do you think adding orphan instance `AddSetCookies ('S n) (a :<|> b) (a :<|> b')` could help solve this issue? |
| 16:40:23 | <mastarija> | I think it would ... |
| 16:40:26 | <mastarija> | Gonna try it |
| 16:40:35 | <hpc> | on setting up a dev environment, everything ultimately ends up using cabal |
| 16:40:43 | <hpc> | so you may want to start with just understanding that on its own |
| 16:41:08 | <hpc> | stack takes cabal and adds installing ghc and pinning the versions of everything to a known good set |
| 16:41:49 | <hpc> | nix is a general-purpose packaging system that's interesting on its own, and hard to describe concisely |
| 16:41:58 | <hpc> | you may want to try ghcup to start |
| 16:42:25 | <hpc> | it'll get you exposed to everything in the easiest to install way, and least "wrapped" by other tools |
| 16:43:15 | <ComingFromCPP> | Dependency projects are managed in Cabal, right? (Or are they somewhere else?) |
| 16:43:36 | <hpc> | yeah, cabal is the thing that goes "install dependencies, build package, install package" |
| 16:43:37 | <ski> | ComingFromCPP : "The Cabal/Stack Disambiguation Guide" <https://gist.github.com/merijn/8152d561fb8b011f9313c48d876ceb07> might be useful |
| 16:43:56 | → | harveypwca joins (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) |
| 16:44:09 | <hpc> | for the rest of your questions... i personally avoid exceptions entirely so i couldn't say what's best there |
| 16:44:37 | <[exa]> | ComingFromCPP: this is quite useful https://wiki.haskell.org/How_to_write_a_Haskell_program (despite the page name sounds very beginnerish, it's a super useful collection of practices) |
| 16:44:38 | <hpc> | for profiling and such, you might like to start with quickcheck and criterion |
| 16:45:20 | <hpc> | that'll get you a nice start, before going down the rabbit hole of other tools |
| 16:45:51 | <ski> | @wiki ThreadScope |
| 16:45:51 | <lambdabot> | https://wiki.haskell.org/ThreadScope |
| 16:47:33 | <ComingFromCPP> | We do very little building of the code locally; It's all CI/CD jobs. I'm perfectly OK postponing learning CI for Haskell, but It's very important that there are no caveats to it. Coming from C++, configuring and running the build system is about 20% of our work. Layer on CI and instrumentation, I'm lucky that I still get to spend most of my time |
| 16:47:34 | <ComingFromCPP> | actually programming. |
| 16:48:06 | <ComingFromCPP> | Are there any similar caveats to CI/CD on Haskell? Or is it a more simple, set up your docker or nix environment, use x and y tools, and let it run. |
| 16:48:34 | <hpc> | it's generally that simple, yeah |
| 16:48:59 | <ComingFromCPP> | Wow |
| 16:49:22 | <mastarija> | ski: muhuhaha! adding the orphan instance `AddSetCookies ('S n) (a :<|> b) (a :<|> b')` did the trick! :D |
| 16:49:34 | <ski> | mastarija : najs |
| 16:49:59 | <mastarija> | I'd say that's a bug |
| 16:50:17 | <mastarija> | Because it's perfectly fine for one part of the tree to stay the same |
| 16:50:26 | <ski> | (one could even argue overlapping instances is a bug) |
| 16:50:48 | ski | has no idea what all this servant stuff actually means |
| 16:50:57 | <mastarija> | Well, if there are no better solutions at the moment, it's a necessity |
| 16:51:43 | <mastarija> | are there any proposd alternatives to overlapping? |
| 16:52:48 | <ski> | "don't do that" ? manually build record dictionaries ? |
| 16:53:29 | <mastarija> | manual labor is for peasants, not for FP aristocracy |
| 16:53:46 | <mastarija> | is ski a reference to S K I combinators? |
| 16:53:59 | <mastarija> | :D |
| 16:54:00 | <ski> | aye |
| 16:54:31 | <ski> | (too set in stone to change now) |
| 16:54:33 | <Rembane_> | ski: Is this why you are so fast down snow covered slopes? |
| 16:54:40 | ski | doesn't ski |
| 16:55:04 | <ComingFromCPP> | One last question: I'm reading "learn you a haskell" and having *a ton* of fun with it. However, for the next steps, what are some very common projects that are useful? Some common things that I use frequently are: |
| 16:55:04 | <ComingFromCPP> | - websockets |
| 16:55:05 | <ComingFromCPP> | - asynchronous tcp and udp sockets |
| 16:55:05 | <ComingFromCPP> | - asynchronous message-passing (or any similar model, such as the actor model or just raw executor/lock) |
| 16:55:06 | <ComingFromCPP> | - GPIO utilities (bonus points for being non-reliant on the kernel) |
| 16:55:06 | <ComingFromCPP> | - Some way of exposing code to a UI for the design team (namely angular) |
| 16:57:56 | <[exa]> | ComingFromCPP: asynchronous IO is "free" with haskell because RTS contains a very efficient eventloop implementation that you can use for free. Most of haskell networking is in fact super easy thanks to that. There are packages for websockets, and very nice packages for doing webs and JSON APIs (you can start with scotty and when you feel adventurous try servant). |
| 16:58:52 | <ski> | PCPH, "Parallel and Concurrent Programming in Haskell" by Simon Marlow in 2013 at <https://web.archive.org/web/20180121171509/http://chimera.labs.oreilly.com/books/1230000000929>,<https://www.oreilly.com/library/view/parallel-and-concurrent/9781449335939/>, might be interesting |
| 16:58:58 | → | instantaphex joins (~jb@c-73-171-252-84.hsd1.fl.comcast.net) |
| 16:59:14 | <[exa]> | re message passing, std library has channels and shared data and software transactional memory and similar stuff, which is pretty much okay for all non-distributed async programming |
| 16:59:24 | → | liz joins (~liz@host86-157-124-38.range86-157.btcentralplus.com) |
| 16:59:42 | <ski> | @where CIS194 |
| 16:59:42 | <lambdabot> | https://www.seas.upenn.edu/~cis194/spring13/lectures.html |
| 17:00:00 | <ski> | ^ some more basic exercises, if you were missing them, browsing LYAH |
| 17:00:02 | <ComingFromCPP> | Woah -- transactional memory? That's in the standards track for some-time-in-the-next-9-years for C++. |
| 17:00:09 | <ski> | sure |
| 17:00:20 | <ski> | that's the `STM |
| 17:00:27 | <ski> | ' monad. with `TVar's |
| 17:01:03 | <ComingFromCPP> | Bookmarking and planning to read these links. Please send any/all good resources you have. Being fluent in the languages I use is important to me. |
| 17:01:43 | <mastarija> | how do I do this "* ski doesn't ski" thing? |
| 17:01:52 | <ski> | there's also basic `MVar's (concurrent boxes with locks, may be empty), `Chan's (concurrent channels), `QSem',`QSemN' (semaphores) |
| 17:02:00 | <ski> | /me looks at mastarija |
| 17:02:10 | mastarija | shitting pants |
| 17:02:15 | <mastarija> | Nice :D |
| 17:02:44 | × | califax quits (~califax@user/califx) (Remote host closed the connection) |
| 17:03:20 | → | pagnol joins (~me@213-205-209-87.ftth.glasoperator.nl) |
| 17:03:32 | <ski> | (there's also `atomicModifyIORef', for plain `IORef's (references to mutable cells)) |
| 17:04:00 | <ComingFromCPP> | Most of my experience in asynchrony comes from the excellent Boost.Asio |
| 17:04:19 | <ski> | ComingFromCPP : "Tackling the Awkward Squad" paper might be interesting to give a glance |
| 17:04:25 | → | Pickchea joins (~private@user/pickchea) |
| 17:04:31 | <ComingFromCPP> | Are there any corollaries in Haskell? I.e., an "IO Context" with executors? |
| 17:04:59 | <ComingFromCPP> | Or does that not compute in FP land |
| 17:05:13 | <[exa]> | ComingFromCPP: do you have an example of what "corollaries" are? |
| 17:05:23 | <ski> | @wiki Research papers/Parallelism and concurrency |
| 17:05:24 | <lambdabot> | https://wiki.haskell.org/Research_papers/Parallelism_and_concurrency |
| 17:05:33 | → | califax joins (~califax@user/califx) |
| 17:05:44 | <[exa]> | I'm not sure if I ever heard that word for any concurrent stuff |
| 17:06:27 | × | alp_ quits (~alp@user/alp) (Ping timeout: 268 seconds) |
| 17:06:44 | <ComingFromCPP> | Anything that would map somewhat conceptually to how Asio sets up its logic; i.e. there is some IO Context type, which different functions can derive from, to produce IO on sockets |
| 17:07:37 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 17:08:10 | × | off^ quits (~off@206.85.120.17) (Ping timeout: 268 seconds) |
| 17:08:10 | <[exa]> | I guess this is mostly handled by the RTS for you |
| 17:09:11 | × | califax quits (~califax@user/califx) (Remote host closed the connection) |
| 17:09:13 | <ComingFromCPP> | wow, ok, time to read them! |
| 17:09:25 | <ComingFromCPP> | then*. See you around! |
| 17:09:45 | <[exa]> | if I guess right what asio Context does (from a quick peek at the docs), it basically holds all open fds/sockets and runs the eventloop |
| 17:09:45 | <ski> | feel free to stick around and lurk |
| 17:09:56 | <[exa]> | which is precisely what RTS does transparently |
| 17:10:30 | <[exa]> | and yeah, +1 for lurking. |
| 17:11:07 | → | califax joins (~califax@user/califx) |
| 17:11:31 | <ComingFromCPP> | [exa] yes, that's the "asynchronous core" of boost.asio, and it's wonderful that this RTS is similar |
| 17:12:51 | <[exa]> | yeah well these eventloops are pretty common (check out e.g. libev) |
| 17:13:48 | ski | . o O ( "green threads" ) |
| 17:14:20 | <[exa]> | the nice thing about haskell concurrency is that it's really easy to use. as in, spawning a async green thread that takes care about a socket is literally: forkIO (doSomethingWithSocket s) |
| 17:15:01 | × | adanwan quits (~adanwan@gateway/tor-sasl/adanwan) (Ping timeout: 268 seconds) |
| 17:15:03 | × | nilradical quits (~nilradica@user/naso) () |
| 17:17:43 | → | adanwan joins (~adanwan@gateway/tor-sasl/adanwan) |
| 17:21:44 | <ComingFromCPP> | [exa] Looking over this project: https://github.com/aycanirican/hlibev/tree/master/Examples How is it that these wrapper function are being called in a purely functional environment? Aren't there possible side effects? |
| 17:22:47 | <ski> | hm, which wrapper functions (which file) ? |
| 17:23:29 | <ComingFromCPP> | haskell side appears to be here: https://github.com/aycanirican/hlibev/blob/master/Network/Libev.hsc |
| 17:23:33 | <ski> | effects vs. side-effects is a matter of perspective, if you've proper separation |
| 17:23:43 | <ComingFromCPP> | c wrapper here: https://github.com/aycanirican/hlibev/blob/master/wrapper.c |
| 17:24:13 | <ski> | ah, you mean like FFI wrapping |
| 17:24:25 | <mastarija> | ComingFromCPP: I see everything done in IO |
| 17:24:30 | <mastarija> | that deservs it |
| 17:24:45 | <mastarija> | you can also mark your wrapped functions safe or unsafe |
| 17:26:24 | <ski> | very roughly put, everything that might do "general side-effects" (that's quite vague, but includes mutable reference cells, mutable arrays, throwing and catching exceptions, doing I/O, concurrency, ..) is "tainted" with an `IO' in the return type. and you can't get rid of it. so the program consists of a "purely functional" core, with an effectful shell around it (preferably not too thick a one, but it |
| 17:26:30 | <ski> | depends on the application) |
| 17:27:20 | <ski> | (and FFI wrapping also involves `IO', the "sin-bin" "monad") |
| 17:27:45 | × | califax quits (~califax@user/califx) (Remote host closed the connection) |
| 17:29:05 | <ski> | (you could say we're taking the "separation of internal machinery from user interaction" quite seriously) |
| 17:30:35 | → | califax joins (~califax@user/califx) |
| 17:30:58 | <[exa]> | ComingFromCPP: btw you probably won't need to wrap libev in haskell unless you plan to open like 10k sockets per process at once |
| 17:31:15 | <ComingFromCPP> | We would need that, yes |
| 17:31:31 | <ComingFromCPP> | Though, we'd probably use our own code, and make an FFI for it |
| 17:32:02 | <ski> | (but, i should hasten to add, everything is still "purely functional", there's no "side-effects" (but there's "effects"). what this means is that you can use the same refactoring and reasoning principles and laws everywhere, including `IO' stuff. the main point of `IO' (apart from imposing an explicit sequencing) is to know when you're *not* using it) |
| 17:32:10 | <mastarija> | ComingFromCPP: there's also the ST monad that you can run and get a pure value |
| 17:32:48 | <ComingFromCPP> | Although, isn't this concurrency baked in to the runtime? Isn't libev or similar just, baked in? |
| 17:33:05 | <[exa]> | ComingFromCPP: tbh maybe better have a tiny proxy in front of the thing (haproxy?) and spread over a few workers, not sure if you want 10k client connections to hang from a single process |
| 17:33:13 | <ski> | `ST' is for local mutable state, that's not visible/detectable from outside (this does not include local caches expected to survive across multiple calls) |
| 17:33:37 | <[exa]> | ComingFromCPP: yeah a small alternative of libev (maybe even libev? I didn't check) powers the RTS concurrency |
| 17:34:03 | × | Alex_test quits (~al_test@178.34.151.166) (Ping timeout: 268 seconds) |
| 17:34:33 | <[exa]> | ComingFromCPP: there's a webserver called warp which is fully haskell+rts and it is pretty powerful, they even did some benchmarking. might be interesting to see for you, to compare their benchmark results with your expectations |
| 17:34:40 | × | AlexZenon quits (~alzenon@178.34.151.166) (Ping timeout: 268 seconds) |
| 17:34:47 | <ComingFromCPP> | We would need the option to use any number of sockets on any number of connections. I'm responsible for making all of our use-cases, our affiliate's use-cases, and tests run without failure. |
| 17:35:19 | → | AlexZenon joins (~alzenon@178.34.151.166) |
| 17:35:33 | × | califax quits (~califax@user/califx) (Remote host closed the connection) |
| 17:35:59 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 268 seconds) |
| 17:36:06 | <[exa]> | with "any number of sockets", I guess until you hit the OS limits? |
| 17:36:22 | <ComingFromCPP> | kind of. this isn't always possible with poll alone on iOS in particular, so there's some magic above it that multiplexes sockets |
| 17:36:52 | <ComingFromCPP> | but, yes, any number. there is no hard limit. |
| 17:37:08 | × | razetime quits (~quassel@117.254.35.202) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
| 17:37:13 | → | califax joins (~califax@user/califx) |
| 17:38:30 | × | mastarija quits (~mastarija@2a05:4f46:e03:6000:80e6:5d48:fb8:8fa0) (Ping timeout: 264 seconds) |
| 17:38:31 | → | FinnElija joins (~finn_elij@user/finn-elija/x-0085643) |
| 17:38:38 | <[exa]> | ComingFromCPP: looks pretty capable tbh http://www.aosabook.org/en/posa/warp.html |
| 17:39:17 | → | Alex_test joins (~al_test@178.34.151.166) |
| 17:39:35 | <ski> | "Escaping Hell with Monads" by Philip Nilsson in 2017-05-08 at <https://philipnilsson.github.io/Badness10k/escaping-hell-with-monads/> is a brief monad non-tutorial, to get a very rough idea of the scope of the concept what it does (what kinds of boiler-plate it can help remove). as for tutorials, most of the monad tutorials out there are not very good (often more confusing than helping). i somewhat like the |
| 17:39:40 | <ski> | (brief, but to the point) "What the hell are Monads?" by Noel Winstanley in 1999-02 at <https://www-users.mat.umk.pl//~fly/materialy/fp/haskell-doc/Monads.html> (possibly this is the first general monad tutorial, not counting papers) |
| 17:40:08 | <ski> | as for why there's so many non-useful tutorials, see |
| 17:40:10 | <ski> | @where burrito |
| 17:40:10 | <lambdabot> | http://byorgey.wordpress.com/2009/01/12/abstraction-intuition-and-the-monad-tutorial-fallacy/ |
| 17:40:36 | → | yvan-sraka joins (~yvan-srak@105.67.135.250) |
| 17:41:17 | <[exa]> | ComingFromCPP: the benchmark there is for something slightly different but obviously you'll get roughly the same performance with websockets (they are imo even a bit simpler because you don't need to care that much about accept()er token) |
| 17:41:20 | × | matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 244 seconds) |
| 17:41:28 | <ski> | @where AAM |
| 17:41:28 | <lambdabot> | http://www.haskell.org/haskellwiki/All_About_Monads |
| 17:41:29 | <ski> | @where Typeclassopedia |
| 17:41:29 | <lambdabot> | http://www.haskell.org/haskellwiki/Typeclassopedia |
| 17:41:33 | <ski> | are useful |
| 17:42:09 | <ComingFromCPP> | [exa] that project, warp, looks inspiring. However, we never touch HTTP (or any protocol over L4). It may be helpful to note that the particular application space I work in is bonding several internet connections over a VPN |
| 17:42:10 | → | zincy joins (~tom@2a00:23c8:970c:4801:311e:408a:9fbc:9900) |
| 17:42:24 | <ski> | but, before tackling monads, you should know about parametric polymorphism (generics / "templates"), higher-order functions, `data' types, type classes & ad-hoc overloading |
| 17:42:37 | <ComingFromCPP> | Raw sockets, or abstractions, are the only relevant medium |
| 17:42:37 | × | Pickchea quits (~private@user/pickchea) (Ping timeout: 252 seconds) |
| 17:42:57 | <albet70> | what's the benefit to use CPS in programming? |
| 17:42:58 | → | king_gs joins (~Thunderbi@2806:103e:29:da7a:a700:e259:637b:75e8) |
| 17:43:36 | <ski> | (oh, and it should be emphasized that `IO' is just a very particular type (which happens to be a monad, as well as having lots of other operations). the "monad" concept is quite a bit more general) |
| 17:43:54 | × | harveypwca quits (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) (Quit: Leaving) |
| 17:44:07 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 17:45:02 | <ComingFromCPP> | ski fortunately, C++ have very robust support for for these pre-reqs for monads. I'll get reading on them. |
| 17:45:04 | <ski> | albet70 : virtualizing data structures, exotic control structures (quite a bit there ..), automagically right-associating binds .. |
| 17:45:56 | <ski> | oh, and if you have any questions, you're welcome to ask in here. both beginner and more advanced questions are welcome, as well as both more theoretical and more applied |
| 17:46:47 | <ski> | hm, reminds me of |
| 17:46:48 | <ski> | @where prerequisite |
| 17:46:49 | <lambdabot> | "Prerequisite for Learning Haskell" <http://www.vex.net/~trebla/haskell/prerequisite.xhtml> |
| 17:46:58 | <ski> | although you probably won't have much trouble there |
| 17:47:01 | <albet70> | and what's "control structure"? |
| 17:48:05 | <qrpnxz> | ByteString low-level unsafe procedures: return boxed bytes. I'm crying 😢. |
| 17:48:21 | <Bulby[m]> | i've done too much rust |
| 17:48:23 | <Bulby[m]> | maybe and some mixe |
| 17:48:31 | <Bulby[m]> | "is it nothing or none" |
| 17:48:48 | <qrpnxz> | nonthing |
| 17:48:51 | <qrpnxz> | :) |
| 17:49:21 | <ski> | albet70 : exceptions, coroutines, (cooperative) concurrency, backtracking, "parallel/lock-step iteration", .. |
| 17:49:25 | <Bulby[m]> | i love json |
| 17:49:39 | <Bulby[m]> | i'm setting up json for nbt data reader so I can read it easier |
| 17:50:20 | <ski> | `NONE' is SML, `None' is OCaml |
| 17:51:47 | <ComingFromCPP> | How is a monad differed from `optional`, or the `variant`/`visit` pattern? https://en.cppreference.com/w/cpp/utility/optional and https://blog.nickelp.ro/posts/p2162/ |
| 17:51:59 | <ski> | `optional' is one example of a monad |
| 17:52:29 | <ski> | "monad" is an interface, like "priority queue". `optional' is a particular implementation of it (like an array-backed PQ) |
| 17:53:14 | <ski> | difference is that most operations on PQs are in the abstract interface, not specific to the implementation. for monads, most operations that make it useful are not in the "monad" interface |
| 17:53:27 | <qrpnxz> | albet70: one neat use of CPS pretty common in haskell is this function called bind looks like (>>=) :: m a -> (a -> m b) -> m b 😉. Another nice use case is structured programming; consider the `with` pattern: withFile, withAsync, unsafeWithForeignPtr, the type of the warp request handler, withAcquire from resourcet, all these are continuation based for safety and you get a scoped effect. |
| 17:53:44 | × | m1dnight quits (~christoph@78-22-0-121.access.telenet.be) (Quit: WeeChat 3.6) |
| 17:54:21 | <ski> | monads provide "(dynamic) sequencing" (for an abstract notion of "sequencing". e.g. for the "list" (or sequence, or backtracking) monad, "sequencing" actually means "loop nesting". for exception monad, it means "short-circuiting") |
| 17:56:00 | <Bulby[m]> | if I have an `Either A A` can I convert it to an `A` |
| 17:56:06 | <Bulby[m]> | i got the `Either A A` from bimapping |
| 17:56:20 | <qrpnxz> | sure, use `either` |
| 17:56:25 | <qrpnxz> | `either id id` |
| 17:56:39 | <qrpnxz> | from Data.Either |
| 17:56:42 | <ski> | (there's also a weaker / more general concept, called "idiom" or "applicative functor", that provide "static sequencing" (the "effect structure" is fixed, can't be affected by intermediate run-time values). most build systems are applicative, some are monadic (where during the building process you can compute new rules, which will get incorporated into the present build plan)) |
| 17:56:45 | <Bulby[m]> | oh i can replace the bimap with that too right |
| 17:57:00 | <ski> | @where applicative-vs-monadic |
| 17:57:00 | <lambdabot> | "Applicative vs Monadic build systems" by ndm in 2014-07-23 at <https://neilmitchell.blogspot.se/2014/07/applicative-vs-monadic-build-systems.html>. (cf. "static sequencing" vs. "dynamic sequencing") |
| 17:57:34 | <ski> | Bulby[m] : probably. `either f g . bimap h i = either (f . h) (g . i)' |
| 17:57:39 | → | m1dnight joins (~christoph@78-22-0-121.access.telenet.be) |
| 17:58:00 | <Bulby[m]> | yeah, it works |
| 17:58:07 | <Bulby[m]> | i'm using scientific and I don't care about repeating part |
| 17:58:31 | <Bulby[m]> | altho if i have a double do they repeat? |
| 17:58:56 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection) |
| 17:58:56 | × | adanwan quits (~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection) |
| 17:59:01 | <albet70> | qrpnxz , like this https://ro-che.info/articles/2019-06-07-why-use-contt |
| 17:59:14 | → | adanwan joins (~adanwan@gateway/tor-sasl/adanwan) |
| 17:59:25 | → | FinnElija joins (~finn_elij@user/finn-elija/x-0085643) |
| 18:00:06 | <qrpnxz> | yes |
| 18:00:15 | <Bulby[m]> | oh i just realized I could just directly call to json on the float/double oh well |
| 18:00:25 | × | m1dnight quits (~christoph@78-22-0-121.access.telenet.be) (Client Quit) |
| 18:00:51 | <ski> | ComingFromCPP : `variant' there is probably more or less the same as `Either' here (tagged/discriminated/disjoint union (not type-tagged), aka sum/variant type). as a monad, it is the exception monad |
| 18:00:52 | → | m1dnight joins (~christoph@78-22-0-121.access.telenet.be) |
| 18:01:02 | <ski> | ComingFromCPP : `visit' referring to Visitor pattern ? |
| 18:01:42 | × | adanwan quits (~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection) |
| 18:02:03 | <albet70> | const liftA2 = f => ma => mb => bind(ma)(a => bind(mb)(b => pure(f(a)(b)))) |
| 18:02:17 | <ComingFromCPP> | How would this be written in haskell? https://paste.tomsmeding.com/MDYtkAhv |
| 18:02:24 | → | acidjnk joins (~acidjnk@p200300d6e7137a570d798ae271e642ee.dip0.t-ipconnect.de) |
| 18:02:31 | → | adanwan joins (~adanwan@gateway/tor-sasl/adanwan) |
| 18:02:33 | <albet70> | f a b c = b (\ d -> a (\ e -> c (e d))) |
| 18:02:34 | <ski> | Visitor pattern is an ugly (CPS) work-around for absence of proper (destructuring, binding) pattern-matching (preferably nestable) on variant/sum types |
| 18:02:47 | <albet70> | are this liftA2 and f are same? |
| 18:04:01 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 18:04:12 | <albet70> | liftA2 f ma mb = ma >>= \a -> mb >>= \b -> pure $ f a b |
| 18:04:13 | <ski> | albet70 : no. `f' is `(<**>)' on `Cont o' |
| 18:04:33 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection) |
| 18:04:45 | <ski> | @src liftM2 |
| 18:04:45 | <lambdabot> | liftM2 f m1 m2 = do |
| 18:04:45 | <lambdabot> | x1 <- m1 |
| 18:04:45 | <lambdabot> | x2 <- m2 |
| 18:04:45 | <lambdabot> | return (f x1 x2) |
| 18:05:09 | <ski> | @undo liftM2 f m1 m2 = do {x1 <- m1; x2 <- m2; return (f x1 x2)} |
| 18:05:09 | <lambdabot> | liftM2 f m1 m2 = m1 >>= \ x1 -> m2 >>= \ x2 -> return (f x1 x2) |
| 18:05:18 | <albet70> | f a b c = a (\e -> b (\d -> c (e d))) |
| 18:05:40 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 18:05:43 | <ski> | er, sorry. it's `flip (<*>)', not `(<**>)' |
| 18:06:09 | <ComingFromCPP> | ski re. visitor pattern, yes. Also, I found this particularly helpful: "monads provide "(dynamic) sequencing" (for an abstract notion of "sequencing". e.g. for the "list" (or sequence, or backtracking) monad, "sequencing" actually means "loop nesting". for exception monad, it means "short-circuiting")" |
| 18:06:17 | <ski> | well, that `f' is `(<*>)' on `Cont o' |
| 18:08:13 | × | m1dnight quits (~christoph@78-22-0-121.access.telenet.be) (Quit: WeeChat 3.6) |
| 18:09:08 | <ski> | ComingFromCPP : monads are probably best learned, not by focusing too much on the "big picture" (what a monad really is, how to think about it) first, but rather seeing a whole bunch of the most common monads, learn to appreciate the commonalities across what are wildly differing concepts. (the main point of abstracting and talking about "monads" and defining a `Monad' type class for capturing them, is to be |
| 18:09:14 | <ski> | able to write generic library operations that work for all monads) |
| 18:10:07 | → | m1dnight joins (~christoph@78-22-0-121.access.telenet.be) |
| 18:10:09 | → | matthewmosior joins (~matthewmo@173.170.253.91) |
| 18:10:13 | <Bulby[m]> | with aeson can I pretty encode (i.e. with indentation) |
| 18:11:13 | <ski> | (that's one mistake that many of all these (confusing) monad tutorials make. trying to think up analogies and things to liken them to. quite likely you won't find something appropriate of that sort. but at some point, after engrossing yourself in examples, and how to actuall *use* monads, and learning what they're good for, it'll "click") |
| 18:11:48 | → | Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915) |
| 18:12:20 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 255 seconds) |
| 18:12:45 | <ski> | ComingFromCPP : sorry, i forgot what "emplace" means/does |
| 18:13:16 | → | waldo joins (~waldo@user/waldo) |
| 18:13:55 | <ski> | is `is' filled with just `0's, or does it increment ? (i guess the name `iota' implies it'll increment ?) |
| 18:14:31 | Lord_of_Life_ | is now known as Lord_of_Life |
| 18:14:37 | <ski> | hm, i guess `evens' will contain the even elements (presumably in-order) |
| 18:15:37 | <ComingFromCPP> | emplace constructs an element in-place, usually with move construction; it's a form of assignment |
| 18:15:41 | <ski> | > let is = [0 .. 99]; evens = filter even is in is -- this uses (linked, non-strict, immutable) lists |
| 18:15:42 | <lambdabot> | [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,2... |
| 18:15:57 | <ski> | er, would help to return the new list :p |
| 18:16:02 | <ski> | > let is = [0 .. 99]; evens = filter even is in evens |
| 18:16:03 | <lambdabot> | [0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52... |
| 18:16:04 | → | jmdaemon joins (~jmdaemon@user/jmdaemon) |
| 18:16:25 | <ComingFromCPP> | is increments (iota does that) |
| 18:16:29 | × | m1dnight quits (~christoph@78-22-0-121.access.telenet.be) (Quit: WeeChat 3.6) |
| 18:16:47 | <albet70> | @djinn (a->b->c) ->(e->a)->(e->b)->e->c |
| 18:16:47 | <lambdabot> | f a b c d = a (b d) (c d) |
| 18:16:48 | <ComingFromCPP> | yeah, it's just even numbers between 0 and 100, without writing it by hand is all |
| 18:16:59 | <ski> | mm, i was wondering if maybe `is' shared storage with `evens' (the latter pointing into the former). but now i think that's not the case |
| 18:17:33 | <ComingFromCPP> | that's a very interesting question (it doesn't, here, but iota usually doesn't share space) |
| 18:17:45 | <int-e> | ski: well the Integer values will be shared |
| 18:17:47 | <ComingFromCPP> | iota is *usually* used to *represent* a transformation, without doing it |
| 18:17:56 | <ski> | int-e : in the C++ ? |
| 18:18:04 | <int-e> | Oh there's C++? |
| 18:18:14 | <ski> | <https://paste.tomsmeding.com/MDYtkAhv> |
| 18:18:25 | → | m1dnight joins (~christoph@78-22-0-121.access.telenet.be) |
| 18:18:34 | <int-e> | Then no. |
| 18:19:43 | <int-e> | There's nothing to point to in the case of `int`. |
| 18:20:50 | <ski> | righto |
| 18:20:56 | <albet70> | @jinn (((a->b->c) -> r) -> r) -> ((a->r)->r) -> ((b->r) -> r) -> (c->r)->r |
| 18:20:57 | <lambdabot> | f a b c d = c (\ e -> b (\ f -> a (\ g -> d (g f e)))) |
| 18:21:05 | <ComingFromCPP> | there are easy ways to have an iota "view" over some set of data structures but that's not the case here, no |
| 18:22:18 | <ski> | Haskell lists are intended to be accessed sequentially. preferably in an incremental fashion. and not holding on to earlier cells, so that the whole list doesn't need to be materialized all at the same time (can matter if the list is long). ("fusion" optimization can sometimes even completely dematerialize the list cells, fusing the producer with the consumer in a tight loop). lists are commonly best thought |
| 18:22:24 | <ski> | of as *control* structures ("iterations/loops"), rather than data structures |
| 18:22:56 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 18:23:07 | <ComingFromCPP> | Is this why a list is a monad? |
| 18:23:53 | <ski> | if you're not accessing them sequentially, you probably want a different data structure (`Seq',`Map',`Array',`Vector',..). if you're not doing incremental, or if you're holding on to the front, you *might* want to change. or maybe not |
| 18:24:30 | → | nate4 joins (~nate@98.45.169.16) |
| 18:25:01 | <ComingFromCPP> | What are the differences between arrays, vectors and lists? Or, even then, what's the difference of a "list of functions" and a map? |
| 18:25:33 | <ski> | well, strict lists (fully materialized all at the same time) would also form a monad. but you'd not automatically get nice backtracking behaviour with good potential for intermediate list cells only living relatively shortly |
| 18:27:00 | × | m1dnight quits (~christoph@78-22-0-121.access.telenet.be) (Quit: WeeChat 3.6) |
| 18:27:09 | × | instantaphex quits (~jb@c-73-171-252-84.hsd1.fl.comcast.net) (Ping timeout: 268 seconds) |
| 18:28:23 | <ski> | `Array' is immutable arrays (with non-strict elements. you can e.g. define an array recursively, for top-down dynamic programming). there's also `IOArray' (and `STArray') for mutable ones. they can be indexed by arbitrary ranges, and be multi-dimensional. `Vector' was introduced later, is indexed by natural numbers, and one-dimensional. they have a lot of automatic fusion goodies |
| 18:28:35 | <qrpnxz> | does ghc have a primitive somewhere that has the system endianness? |
| 18:29:11 | × | nate4 quits (~nate@98.45.169.16) (Ping timeout: 252 seconds) |
| 18:29:26 | <ski> | `Map' is a finite (partial) map, mapping keys to values (occasionally people use lists of pairs instead for simplicity. but if the association list grows longer, probably you want `Map', or `IntMap' or some kind of trie or something) |
| 18:30:52 | <ski> | (iirc, `Map' is implemented internally as a kind of tree. it's immutable. when you produce a modified version, most of the structure (apart from the path(s) down to the changed elements, and possible tree restructuring/reassociation) will be shared) |
| 18:31:17 | <int-e> | :t GHC.ByteOrder.targetByteOrder |
| 18:31:19 | <lambdabot> | GHC.ByteOrder.ByteOrder |
| 18:31:56 | <int-e> | % GHC.ByteOrder.ByteOrder |
| 18:31:56 | <yahb2> | <interactive>:28:1: error: ; Not in scope: data constructor ‘GHC.ByteOrder.ByteOrder’ ; No module named ‘GHC.ByteOrder’ is imported. |
| 18:31:57 | <ski> | (if you want to, you could have a `Map' in a mutable cell, and then swap it out (e.g. atomically, if needed) for the new version. the new version won't actually be computed until you look at it) |
| 18:32:15 | <int-e> | err |
| 18:32:20 | <int-e> | % GHC.ByteOrder.targetByteOrder |
| 18:32:20 | <yahb2> | LittleEndian |
| 18:32:29 | <ski> | ComingFromCPP : not sure what you had in mind with "list of functions" |
| 18:32:43 | → | pavonia joins (~user@user/siracusa) |
| 18:34:22 | × | ComingFromCPP quits (~ComingFro@2601:43:200:154f:e4ab:469f:ada2:4ef9) (Ping timeout: 252 seconds) |
| 18:35:59 | → | m1dnight joins (~christoph@78-22-0-121.access.telenet.be) |
| 18:37:12 | × | irfan quits (~irfan@user/irfan) (Quit: leaving) |
| 18:38:22 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 18:38:48 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 268 seconds) |
| 18:39:18 | → | kenran joins (~kenran@200116b82bfce1004033fa24eb56acab.dip.versatel-1u1.de) |
| 18:40:05 | → | tzh joins (~tzh@c-24-21-73-154.hsd1.or.comcast.net) |
| 18:46:59 | × | acidjnk quits (~acidjnk@p200300d6e7137a570d798ae271e642ee.dip0.t-ipconnect.de) (Ping timeout: 255 seconds) |
| 18:47:29 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 18:57:58 | → | jgeerds joins (~jgeerds@55d46bad.access.ecotel.net) |
| 18:58:23 | → | instantaphex joins (~jb@c-73-171-252-84.hsd1.fl.comcast.net) |
| 18:58:49 | → | off^ joins (~off@206.85.120.17) |
| 18:59:13 | × | pagnol quits (~me@213-205-209-87.ftth.glasoperator.nl) (Ping timeout: 268 seconds) |
| 18:59:46 | → | alp_ joins (~alp@user/alp) |
| 19:03:28 | × | instantaphex quits (~jb@c-73-171-252-84.hsd1.fl.comcast.net) (Ping timeout: 268 seconds) |
| 19:15:23 | × | waldo quits (~waldo@user/waldo) (Quit: quit) |
| 19:25:39 | × | jgeerds quits (~jgeerds@55d46bad.access.ecotel.net) (Remote host closed the connection) |
| 19:26:45 | × | alp_ quits (~alp@user/alp) (Ping timeout: 252 seconds) |
| 19:35:32 | × | vglfr quits (~vglfr@145.224.94.75) (Read error: Connection reset by peer) |
| 19:38:46 | × | gmg quits (~user@user/gehmehgeh) (Remote host closed the connection) |
| 19:39:29 | → | vglfr joins (~vglfr@145.224.94.75) |
| 19:39:31 | → | gmg joins (~user@user/gehmehgeh) |
| 19:41:05 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection) |
| 19:42:53 | × | off^ quits (~off@206.85.120.17) (Ping timeout: 252 seconds) |
| 19:43:21 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 19:43:47 | <byorgey> | zzz: just now saw your message asking how swarm is going. It's going great. Expect a public alpha release Soon (TM). |
| 19:44:26 | <byorgey> | But the semester is about to start so "soon" could be a few months. |
| 19:45:20 | <d34df00d> | I have some code like `foo :: Context -> IO (); foo ctx = do f1 ctx; f2 ctx; f3 ctx`. How do I leverage function type being a MonadReader without too much boilerplate, to avoid mentioning `ctx` everywhere? |
| 19:46:44 | <c_wraith> | it's not pretty. I wouldn't bother. |
| 19:46:49 | <dolio> | It's not going to make that example shorter. |
| 19:47:19 | <d34df00d> | :( |
| 19:47:22 | <d34df00d> | Welp. |
| 19:48:46 | <dolio> | It's more worth it if you dont' need the context much, so you can factor a significant portion of your definitions to be in terms of ReaderT and such. |
| 19:48:58 | × | canta quits (~canta@user/canta) (Ping timeout: 240 seconds) |
| 19:49:32 | <dolio> | Also, IO operations aren't generic, so they're a lot more annoying. |
| 19:51:32 | <Lears> | d34df00d: Don't use Monad, use Monoid. That's `foo = f1 <> f2 <> f3`. |
| 19:52:15 | <dolio> | There's no monoid instance for IO, though, right? |
| 19:52:49 | <Lears> | % print () <> print () |
| 19:52:49 | <yahb2> | () ; () |
| 19:53:38 | <dolio> | Oh, Monoid a => Monoid (IO a). |
| 19:55:03 | <d34df00d> | Hmm, that might work. |
| 19:55:07 | <d34df00d> | Thanks! |
| 19:59:31 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 20:03:56 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 20:04:53 | × | vglfr quits (~vglfr@145.224.94.75) (Ping timeout: 252 seconds) |
| 20:05:30 | → | nattiestnate joins (~nate@180.243.14.16) |
| 20:07:21 | × | yvan-sraka quits (~yvan-srak@105.67.135.250) (Remote host closed the connection) |
| 20:16:38 | <Bulby[m]> | do bytestrings not have a splitAt thing |
| 20:17:05 | <Bulby[m]> | they do |
| 20:17:47 | <Bulby[m]> | right with the other functions |
| 20:17:47 | <Bulby[m]> | odd |
| 20:20:00 | → | E23[m] joins (~mkomlofsk@2001:470:69fc:105::2:4224) |
| 20:21:30 | <monochrom> | "how to split a bytestring without even being odd" :) |
| 20:22:23 | × | matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 255 seconds) |
| 20:23:00 | <Bulby[m]> | oh is zlib deflate |
| 20:26:03 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer) |
| 20:27:56 | → | acidjnk joins (~acidjnk@p200300d6e7137a57bcb77a9a2e56f2aa.dip0.t-ipconnect.de) |
| 20:28:59 | <Bulby[m]> | https://docs.oracle.com/javase/7/docs/api/java/util/zip/InflaterInputStream.html |
| 20:29:02 | <Bulby[m]> | java is being very unhelpful |
| 20:34:34 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 20:35:31 | → | matthewmosior joins (~matthewmo@173.170.253.91) |
| 20:45:56 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
| 20:48:26 | × | king_gs quits (~Thunderbi@2806:103e:29:da7a:a700:e259:637b:75e8) (Remote host closed the connection) |
| 20:48:44 | → | king_gs joins (~Thunderbi@2806:103e:29:da7a:a700:e259:637b:75e8) |
| 20:50:08 | → | jgeerds joins (~jgeerds@55d46bad.access.ecotel.net) |
| 20:50:33 | × | kenran quits (~kenran@200116b82bfce1004033fa24eb56acab.dip.versatel-1u1.de) (Quit: WeeChat info:version) |
| 20:51:36 | × | m1dnight quits (~christoph@78-22-0-121.access.telenet.be) (Quit: WeeChat 3.6) |
| 20:52:26 | <qrpnxz> | there a way to define a default type in a type class? Like if i had `class C t { type T t :: Type }`, there a way to have a default for `T t`? |
| 20:55:04 | → | m1dnight joins (~christoph@78-22-0-121.access.telenet.be) |
| 20:56:13 | × | ddellaco1 quits (~ddellacos@89.45.90.170) (Ping timeout: 252 seconds) |
| 20:58:03 | → | off^ joins (~off@206.85.120.17) |
| 20:58:47 | → | ComingFromCPP joins (~ComingFro@2601:43:200:154f:4c0a:73b1:5013:f412) |
| 20:58:56 | <Lears> | qrpnxz: `type T t = ...`? |
| 20:59:33 | × | ComingFromCPP quits (~ComingFro@2601:43:200:154f:4c0a:73b1:5013:f412) (Client Quit) |
| 21:00:00 | <qrpnxz> | if i try like `type T t = t` i get `T is not a (visible) associated type of class C`, idk if that makes sense to you |
| 21:02:24 | <qrpnxz> | i think i'm just going to redesign the class, probably split it in two and use multi parameter. More flexible anyhow. |
| 21:02:25 | × | Vajb quits (~Vajb@2001:999:70c:2b99:3e15:6929:5bc6:c014) (Read error: Connection reset by peer) |
| 21:02:34 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3ad-40.dhcp.inet.fi) |
| 21:03:06 | <Lears> | (visible) sounds like it's not in scope somehow. |
| 21:04:15 | <qrpnxz> | it's probably just straight up not valid syntax to do that |
| 21:04:28 | <Lears> | % class C t where { type T t; type T t = t } |
| 21:04:28 | <yahb2> | <no output> |
| 21:04:54 | <Lears> | Looks fine here. |
| 21:05:45 | <int-e> | % class D t where { type U t = t } |
| 21:05:45 | <yahb2> | <interactive>:40:24: error: ; ‘U’ is not a (visible) associated type of class ‘D’ |
| 21:05:45 | <qrpnxz> | i was trying class C t where { Type T t = t; }. |
| 21:05:52 | <int-e> | I guess that's... right. |
| 21:08:13 | <Bulby[m]> | using binary to convert a bytestring to a bytestring feels incorrect |
| 21:08:18 | <Bulby[m]> | i probably should use an actual parsing lib |
| 21:08:41 | × | dcoutts_ quits (~duncan@host86-153-135-25.range86-153.btcentralplus.com) (Ping timeout: 252 seconds) |
| 21:09:06 | <Bulby[m]> | i love megaparsec! |
| 21:09:18 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 268 seconds) |
| 21:11:19 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 21:12:23 | × | gmg quits (~user@user/gehmehgeh) (Quit: Leaving) |
| 21:15:00 | → | MajorBiscuit joins (~MajorBisc@46-229-126.internethome.cytanet.com.cy) |
| 21:15:38 | <Bulby[m]> | god |
| 21:15:45 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 21:15:50 | <Bulby[m]> | is there a lib that implements plain inflate that works on bytestrings |
| 21:16:24 | <monochrom> | zlib doesn't work on bytestrings? (I really don't know, just checking.) |
| 21:16:47 | → | vglfr joins (~vglfr@145.224.94.75) |
| 21:16:50 | <hpc> | compress :: ByteString -> ByteString |
| 21:16:55 | <hpc> | decompress :: ByteString -> ByteString |
| 21:16:58 | <hpc> | it definitely does |
| 21:17:03 | <Bulby[m]> | that does but i have no ideaif it is plain inflate |
| 21:17:13 | <Bulby[m]> | idk what java even uses |
| 21:17:15 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 21:17:23 | <Bulby[m]> | its docs are absolutely zero help |
| 21:17:24 | <monochrom> | Then again zlib is gzip not "inflate" zip (pkzip) |
| 21:17:34 | <Bulby[m]> | pkzip? |
| 21:17:38 | <Bulby[m]> | interesting |
| 21:18:00 | <Bulby[m]> | no results on hackage so no lib advertises it |
| 21:18:13 | <monochrom> | "inflate deflate" came from pkzip, which today no one knows, it's just called "zip" now. |
| 21:18:26 | <monochrom> | Yeah I don't think hackage has zip. |
| 21:18:29 | <Bulby[m]> | so it's normal zip? |
| 21:18:37 | <monochrom> | yeah I would think so. |
| 21:18:45 | <Bulby[m]> | i've definitely used libs that can do zip archives |
| 21:18:53 | <Bulby[m]> | however i'm dealing with plain inflate |
| 21:19:02 | <Bulby[m]> | or whatever this means |
| 21:19:03 | <Bulby[m]> | https://github.com/jmc2obj/j-mc-2-obj/blob/master/src/org/jmc/Region.java#L234 |
| 21:20:07 | <monochrom> | Ah I see what you mean now. |
| 21:20:36 | <monochrom> | deflated data without headers containers etc |
| 21:21:07 | <monochrom> | But I know nothing about compression libraries on hackage, apart from having heard of zlib. |
| 21:21:28 | <Bulby[m]> | oh |
| 21:21:29 | <Bulby[m]> | https://hackage.haskell.org/package/zlib-0.6.3.0/docs/Codec-Compression-Zlib-Raw.html |
| 21:21:30 | <Bulby[m]> | "raw deflate format." |
| 21:21:47 | <monochrom> | OK nice, that may help heh |
| 21:21:48 | <qrpnxz> | hmm, don't like that zlib api too much. Async exceptions, implicit streaming. |
| 21:22:00 | <Bulby[m]> | i'm tired |
| 21:22:03 | <monochrom> | Yeah we all agree. |
| 21:22:51 | <monochrom> | But it predates all the conduit pipes streaming ideas we have today. |
| 21:23:09 | <Bulby[m]> | i don't care i just want decompression |
| 21:23:10 | <monochrom> | Back then lazy I/O was very popular. |
| 21:23:16 | <Bulby[m]> | it's not a library so it doesn't have to be good |
| 21:23:29 | <Bulby[m]> | plus i already should have the lazy bytestring in memory |
| 21:23:51 | <monochrom> | Data.ByteString.Lazy exists because solely of the desire to do lazy I/O and it came from that era. |
| 21:24:04 | <Bulby[m]> | 🤷 |
| 21:24:12 | <Bulby[m]> | idrc lol |
| 21:24:23 | <Bulby[m]> | i'm just reading minecraft chunks |
| 21:24:24 | <monochrom> | It was a much simpler time. >:) |
| 21:25:08 | <qrpnxz> | lazy bytestring is a slightly tweaked [ByteString] pretty much. And you know, [ByteString] pretty useful haha so of course lazy bytestring also |
| 21:28:03 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3ad-40.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 21:28:08 | <Bulby[m]> | i feel like I have used conduit before but can't find the code to prove it |
| 21:28:21 | <Bulby[m]> | nvm |
| 21:28:22 | <Bulby[m]> | https://github.com/TheDrawingCoder-Gamer/nylon/blob/master/src/Nylon/Installer.hs |
| 21:28:37 | <Bulby[m]> | probably doesn't work |
| 21:28:54 | × | tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Ping timeout: 264 seconds) |
| 21:30:56 | <Bulby[m]> | god i've done a lot of langs |
| 21:31:10 | <Bulby[m]> | just looking at github i've done quite a few |
| 21:31:18 | <Bulby[m]> | altho some are dead forks |
| 21:31:44 | × | king_gs quits (~Thunderbi@2806:103e:29:da7a:a700:e259:637b:75e8) (Quit: king_gs) |
| 21:32:01 | → | tzh joins (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) |
| 21:33:23 | → | Vajb joins (~Vajb@2001:999:70c:2b99:3e15:6929:5bc6:c014) |
| 21:35:49 | × | adanwan quits (~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection) |
| 21:36:23 | → | dcoutts_ joins (~duncan@host86-153-135-25.range86-153.btcentralplus.com) |
| 21:36:27 | → | adanwan joins (~adanwan@gateway/tor-sasl/adanwan) |
| 21:39:00 | × | matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 244 seconds) |
| 21:41:12 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 21:47:04 | × | adanwan quits (~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection) |
| 21:47:22 | → | adanwan joins (~adanwan@gateway/tor-sasl/adanwan) |
| 21:48:21 | × | wootehfoot quits (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer) |
| 21:54:58 | × | acidjnk quits (~acidjnk@p200300d6e7137a57bcb77a9a2e56f2aa.dip0.t-ipconnect.de) (Ping timeout: 268 seconds) |
| 21:55:14 | → | yvan-sraka joins (~yvan-srak@105.67.135.250) |
| 22:06:18 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 22:07:50 | → | matthewmosior joins (~matthewmo@173.170.253.91) |
| 22:13:25 | → | nate4 joins (~nate@98.45.169.16) |
| 22:16:38 | × | chomwitt quits (~chomwitt@2a02:587:dc15:5e00:1855:2a35:cc0e:e682) (Ping timeout: 268 seconds) |
| 22:18:16 | → | kannon joins (~NK@c-73-158-0-130.hsd1.ca.comcast.net) |
| 22:23:23 | <kannon> | https://paste.tomsmeding.com/lYOKTfBH hello I commented out the else statement in the remove function, and the error (only error?) was on my function 'f' . why would the error be found there if haskell didn't like the commenting of the else statement? |
| 22:23:50 | <monochrom> | Ugh, "else" is mandatory, not optional. |
| 22:24:55 | <kannon> | ok thanks but why would the error be on line 17? |
| 22:25:17 | <kannon> | for a different function call? |
| 22:25:26 | <hpc> | the location in the error message isn't where things went wrong |
| 22:25:27 | <monochrom> | The computer sees "... then funcname param1 param2 parm3 param4 = forbid x y" this is not what you think. |
| 22:25:30 | <hpc> | it's where the compiler was surprised |
| 22:25:49 | <monochrom> | And yes your "f" now becomes param4 of your "remove". |
| 22:25:58 | <Bulby[m]> | oh no my ocaml is seeping in |
| 22:26:09 | <Bulby[m]> | let in let in let in |
| 22:26:35 | <monochrom> | let-in is cool :) |
| 22:26:50 | <Bulby[m]> | oh well, perhaps it means the compiler has less to optimize |
| 22:26:58 | × | yvan-sraka quits (~yvan-srak@105.67.135.250) (Remote host closed the connection) |
| 22:27:00 | <monochrom> | ocaml is not seeping in until you write "letrec" :) |
| 22:27:07 | <kannon> | the compiler sees 'f' as an additional parameter of the remove function? |
| 22:27:18 | <Bulby[m]> | letrec is all lets, no? |
| 22:27:36 | <hpc> | kannon: it doesn't know what to think of it, but everything up until then was valid haskell |
| 22:27:40 | <hpc> | if not the haskell you intended |
| 22:27:50 | × | adanwan quits (~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection) |
| 22:27:50 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection) |
| 22:28:02 | <monochrom> | There was a time I wrote Haskell code and Java code interleavingly. One day I found myself writing "public class MyMonadClass where" in both Haskell and Java. |
| 22:28:14 | → | adanwan joins (~adanwan@gateway/tor-sasl/adanwan) |
| 22:28:30 | <monochrom> | "unified electro-weak-haskell-java force" |
| 22:28:38 | <Bulby[m]> | i hate how verbose java is compared to kotlin and scala |
| 22:28:59 | <monochrom> | Oh hey you have the benefit of hindsight. |
| 22:29:07 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 22:29:28 | <kannon> | hpc: so the omission of the else statement is valid? |
| 22:29:34 | <monochrom> | Look at the bright side. You love how concise kotlin and scala are as successors of java. :) |
| 22:29:59 | <Bulby[m]> | successors right |
| 22:30:05 | <Bulby[m]> | if they were successors more people would use them 😢 |
| 22:30:25 | <monochrom> | Right? One could say "I hate how verbose COBOL is compared to APL" but that's not how advancement works. :) |
| 22:30:45 | <Bulby[m]> | public static final int |
| 22:30:54 | <hpc> | kannon: to ghc, you haven't omitted the else |
| 22:30:58 | <hpc> | you just haven't gotten to it yet |
| 22:31:06 | <darkling> | I really must try out APL some day. |
| 22:31:06 | <hpc> | but there's this equals sign that doesn't belong |
| 22:31:25 | <Bulby[m]> | but then most people use java when targeting jvm |
| 22:31:34 | <Bulby[m]> | so you have to either write in java or port your code to java |
| 22:31:39 | <Bulby[m]> | porting is painful |
| 22:31:43 | <Bulby[m]> | public static final int |
| 22:31:46 | <Bulby[m]> | public static final int |
| 22:32:00 | <monochrom> | UCOJEL = Unified COBOL-Java Enterprise Language = "MULTIPLY X BY Y GIVING PUBLIC STATIC FINAL INT Z" >:) |
| 22:32:36 | <hpc> | it's not enterprise unless it's in excel |
| 22:32:56 | <hpc> | =UCOJEL("MULTIPLY $A$1 BY $B$1 GIVING ...") |
| 22:33:02 | <darkling> | It's not Enterprise unless you have five layers of constructor singletons between you and the object you want... |
| 22:33:17 | <monochrom> | Haha hpc that's even better |
| 22:33:50 | <darkling> | Although that said, I did once discover by design process why it looks like that. It made sense at the time, but it was still horrible to make. |
| 22:33:54 | <Bulby[m]> | https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition |
| 22:34:01 | <darkling> | :) |
| 22:34:02 | <monochrom> | But perhaps we can add one more layer of SQL for finishing touch! |
| 22:34:11 | <monochrom> | I guess s/of/for/ |
| 22:34:12 | <darkling> | monochrom: Only one? Coward! |
| 22:34:26 | <int-e> | darkling: and 3 XML files. Or maybe a merry mix of XML, JSON, and yaml these days. |
| 22:35:05 | <darkling> | I once encountered a codebase that had Java files with XML embedded in them, and XLM files with Java embedded in them. |
| 22:35:21 | <monochrom> | This is heading in the direction of "on the 12th day of christmas"... |
| 22:35:22 | <darkling> | Oh, and lots of XSLT. |
| 22:35:45 | <hpc> | 12 days of christmas? that's a lot of negative leap seconds |
| 22:35:55 | <darkling> | After reading it for a day or two, I realised that they'd reimplemented flex and yacc in Java. XML, and XSLT... |
| 22:36:20 | <darkling> | At that point, I tried to find the nearest waste paper basket to vomit in. |
| 22:36:47 | <monochrom> | Sounds like the basket will have a space leak... |
| 22:36:50 | <kannon> | that's very informative hpc. ghc hasn't seen the else statement yet. considering allowed indentation and the empty line on 16, isn't that a design flaw? |
| 22:37:27 | <darkling> | The application was doing (highly constrained) NLP for synthetic organic chemistry papers, converting to a custom XML knowledge representation format. |
| 22:37:59 | <kannon> | why wouldnt an empty line signify the end of a if/then/else ? |
| 22:38:07 | <monochrom> | Well, at least the IUPAC names are highly mechanically NLP-able. :) |
| 22:38:51 | <darkling> | Synthesis papers are *very* formulaic. |
| 22:38:55 | <hpc> | empty lines are ignored so you can write longer definitions without it being a wall of text |
| 22:39:18 | <hpc> | also, i was mistaken about the error being on the equals sign |
| 22:39:33 | <darkling> | "To 10ml of X was aded 120 mg of Y, and heated under Z atmosphere to W °C..." |
| 22:39:36 | <hpc> | it's saying it didn't expect the 'f', /because/ it expected indentation |
| 22:39:47 | <monochrom> | Considering layout, I was likely mistaken too. |
| 22:39:49 | <hpc> | (or else, at slightly lower indentation) |
| 22:39:56 | <hpc> | so all working as intended |
| 22:40:07 | <hpc> | and the surprise is right where it should be |
| 22:40:11 | <monochrom> | But arguing parse error messages is futile. There is no way to win. |
| 22:40:43 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 252 seconds) |
| 22:40:45 | <kannon> | ok else is required to finish if/then/else. thanks a lot hpc |
| 22:40:51 | <qrpnxz> | can now sum 1 billion random 16-bit words from stdin in 8.8 seconds. 😃 |
| 22:41:01 | <qrpnxz> | tests are going well |
| 22:41:03 | <kannon> | and monochrom |
| 22:43:01 | <qrpnxz> | (with 1.7MB of memory btw) |
| 22:43:18 | <d34df00d> | How can ghc derive Eq for smth like `data Foo = Foo { foo :: forall a. Num a => a }`? |
| 22:43:31 | <monochrom> | I think it can't. |
| 22:43:33 | <d34df00d> | If I understand correctly, foo :: forall a. Num a => a is effectively a function from dictionaries of Num a to a. |
| 22:43:39 | <d34df00d> | monochrom: it can with standalone deriving. |
| 22:44:00 | → | Inst joins (~Inst@2601:6c4:4080:3f80:38a1:ad8c:aa85:4bd8) |
| 22:44:05 | <Inst> | hi, a question guys before I leave |
| 22:44:17 | <Inst> | I've been irritating everyone with my blackjack solver that fucks up because I'm running a brute force minimax algorithm |
| 22:44:23 | <Inst> | and it requires tremendous amounts of memory |
| 22:44:31 | <Inst> | I've decided to wholly rewrite it in main.hs |
| 22:44:34 | <Inst> | using Vectors instead |
| 22:45:14 | <monochrom> | Then it would be interesing to see what it actually derives. |
| 22:45:35 | <d34df00d> | monochrom: I just did -ddump-deriv, and it derives smth reasonable: |
| 22:45:38 | <Inst> | in terms of memory, is it better to use a memoizing approach to initialize the vector using an accumulator |
| 22:45:43 | <d34df00d> | instance GHC.Classes.Eq Ghci13.Foo where (GHC.Classes.==) (Ghci13.Foo a1_a45r) (Ghci13.Foo b1_a45s) = ((a1_a45r GHC.Classes.== b1_a45s)) |
| 22:45:45 | <Inst> | or to use iterate? |
| 22:45:57 | <monochrom> | In all likelihood it generates the lackbuster "instance Eq (forall a. Num a => a) => Eq Foo" so now it's tautologically useless. |
| 22:46:12 | <d34df00d> | monochrom: it's not. Foo 10 == Foo 10 is True, and Foo 10 == Foo 20 is False. |
| 22:46:52 | <d34df00d> | (also it doesn't even ask for -XQuantifiedConstraints, so the instance is probably simpler) |
| 22:47:27 | <d34df00d> | (I also misparsed what you meant by "tautologically useless" at first, sorry) |
| 22:47:37 | <monochrom> | Hrm. |
| 22:48:01 | <monochrom> | Does the GHC User's Guide say something about this? |
| 22:48:18 | <d34df00d> | I quickly skimmed it before asking and didn't find anything relevant. |
| 22:49:34 | <d34df00d> | …because, of course, one cannot just write simple weekend fun web apps without GADTs and RankNTypes and what not. |
| 22:53:11 | → | alp_ joins (~alp@user/alp) |
| 22:54:13 | × | alp_ quits (~alp@user/alp) (Client Quit) |
| 22:56:22 | → | shriekingnoise joins (~shrieking@186.137.167.202) |
| 22:58:38 | <kannon> | hpc if you're around later I have other questions about upvoted answer, where I found the forbid/remove programs, thanks: https://stackoverflow.com/questions/53217914/maybe-monad-and-a-list |
| 23:01:47 | <kannon> | at one point the author of forbid/remove says the structure is the same, I'm assuming they mean ' noneOrNothing :: (a -> Bool) -> [a] -> Maybe [a] ' |
| 23:04:00 | → | mikoto-chan joins (~mikoto-ch@164.5.249.78) |
| 23:06:38 | × | kannon quits (~NK@c-73-158-0-130.hsd1.ca.comcast.net) (Ping timeout: 255 seconds) |
| 23:07:18 | <qrpnxz> | naive parsing and summing words one by one take 2 minutes. So my chunking method run in 7.3% the time, or 13.6 times faster! |
| 23:09:09 | <qrpnxz> | well i should say naive, naive is with a list and that eats all memory and never finish. Streaming one by one take 2 minutes. unboxed chunked stream take 8.8 seconds |
| 23:09:20 | <qrpnxz> | *should not |
| 23:11:47 | × | forell quits (~forell@user/forell) (Quit: ZNC - https://znc.in) |
| 23:13:35 | → | forell joins (~forell@user/forell) |
| 23:14:26 | × | Tuplanolla quits (~Tuplanoll@91-159-69-12.elisa-laajakaista.fi) (Quit: Leaving.) |
| 23:18:09 | × | bontaq quits (~user@ool-45779fe5.dyn.optonline.net) (Ping timeout: 268 seconds) |
| 23:21:33 | <qrpnxz> | if i need to swap endianness it's only 12 seconds vs 8 😱 |
| 23:24:11 | <qrpnxz> | (and uses same memory (!)) |
| 23:24:28 | × | Maxdamantus quits (~Maxdamant@user/maxdamantus) (Ping timeout: 268 seconds) |
| 23:28:18 | × | Unhammer quits (~Unhammer@user/unhammer) (Ping timeout: 240 seconds) |
| 23:29:35 | × | MajorBiscuit quits (~MajorBisc@46-229-126.internethome.cytanet.com.cy) (Ping timeout: 255 seconds) |
| 23:38:38 | <monochrom> | Hrm, if you use an ARM CPU, there is a flag you can toggle to switch endianness >:) |
| 23:39:13 | <monochrom> | Dr. Strange in The Multiverse of Endian Madness :) |
| 23:39:33 | <geekosaur> | mips had that too |
| 23:39:37 | <darkling> | PPC allowed that too. |
| 23:39:59 | <monochrom> | >_< |
| 23:40:18 | × | gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer) |
| 23:40:37 | <darkling> | It wasn't until I tried writing arbitrary-length arithmetic code for Z80 last year that I realised why little-endinan is so much better. |
| 23:40:37 | → | bontaq joins (~user@ool-45779fe5.dyn.optonline.net) |
| 23:40:53 | <monochrom> | :) |
| 23:41:18 | <geekosaur> | Z80? haven't touched that since the early 80s |
| 23:41:27 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 23:41:33 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Client Quit) |
| 23:41:43 | <darkling> | I've got a SpecNext -- Z80N |
| 23:42:19 | × | jgeerds quits (~jgeerds@55d46bad.access.ecotel.net) (Ping timeout: 252 seconds) |
| 23:42:39 | <darkling> | I've got a meta-assembler sitting on the shelf since last year with Z80N as the first working target. I should probably revisit that and get it to releasable form. |
| 23:44:51 | <darkling> | Got a bunch of rewriting in the parser to make it useful for ARM3 first, though. :( |
| 23:45:56 | → | gentauro joins (~gentauro@user/gentauro) |
| 23:46:28 | → | kitty4 joins (~kitty@096-039-147-043.res.spectrum.com) |
| 23:46:39 | <qrpnxz> | monochrom: bruh, i legit have a cracked `endianness` thing that does unsafePerformIO to figure it out, and the comment says "not expecting endianness to change at runtime, are we?". You've destroyed me 😭 |
| 23:48:09 | <qrpnxz> | toggling that flag sounds hella unsafe. Can userspace even touch that? |
| 23:48:33 | <darkling> | It's usually a very early boot-time thing. |
| 23:48:42 | <qrpnxz> | makes sense lol |
| 23:49:00 | <darkling> | Firmware option, I think. |
| 23:50:28 | <darkling> | I don't know if it flips the instruction byte order. (On any of the mentioned architectures). |
| 23:51:02 | <darkling> | AFAIK, most people just go for little-endian. BE is an oddity. |
| 23:51:36 | <qrpnxz> | i believe powerpc was BE |
| 23:51:46 | <geekosaur> | both-endian |
| 23:51:50 | <qrpnxz> | lol |
| 23:51:53 | <geekosaur> | with a cpu flag as mentioned |
| 23:52:25 | <geekosaur> | I have no clue what they were thinking |
| 23:52:56 | <darkling> | Yeah, I remember seeing ads for the first revision of the PPC platform (PREP?) from IBM. |
| 23:53:01 | <qrpnxz> | so called network order is BE. No idea why. atm i'm working on a parser for a network protocol called packstream that also does BE |
| 23:53:06 | <darkling> | Definiotely endian-switchable. |
| 23:53:12 | <geekosaur> | because Sun was BE |
| 23:53:20 | <geekosaur> | originally MC68020 then SPARC |
| 23:54:46 | <geekosaur> | and many of the core TCP/IP protocols came out of Stanford (now look up what Sun originally stood for: Stanford University Networking) |
| 23:55:22 | <darkling> | PDP-11(?) had some funky endianness going on -- the CPU had 18-bit memory locations, with 36-bit registers, but split characters into 9-bit values packed into the 18-bit memory locations, so you could have any combination of LE(byte)+LE(char), LE(byte)+BE(char), ... |
| 23:56:05 | <geekosaur> | actually pdp11 was the sane one with bytes |
| 23:56:05 | <darkling> | So there was a middle-endian possibility that led to the string "UNIX" being displayed as "NUXI". |
| 23:56:17 | <geekosaur> | 18- and 36-bit stuff was on most of the other DEC models |
| 23:56:18 | <darkling> | Maybe I'm thinking of PDP-8. |
| 23:56:45 | <darkling> | It's been a while since I dug into the detail of the PDPs. |
| 23:56:57 | <geekosaur> | but pdp11 did have that weird mixed-endian 32-bit thing, yes |
| 23:59:56 | <geekosaur> | the 9-bit "byte" thing did affect other protocols; FTP still has TYPE L 8 to specify compatibility with those systems, although I think the last few were retired in 1995ish |
All times are in UTC on 2022-08-13.