Home liberachat/#haskell: Logs Calendar

Logs on 2024-08-09 (liberachat/#haskell)

00:01:56 × nunggu quits (~q@user/nunggu) (Ping timeout: 260 seconds)
00:07:50 × xff0x quits (~xff0x@2405:6580:b080:900:465e:7eef:8460:d9d2) (Quit: xff0x)
00:13:33 spew joins (~spew@201.141.102.132)
00:16:55 × g00gler quits (uid125351@id-125351.uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
00:39:50 <probie> zzz: That's also not really an argument over names though. It's about not wanting to have something which is a monadic operator (for those unfamiliar with APL, that has nothing to do with monads) and a dyadic function
00:45:33 <zero> probie: aren't all APL symbols monadic and dyadic depending on context?
00:47:45 <zero> wait what do you mean by operator vs function?
00:47:52 <Axman6> raehik: Where does the "etc" come from in your second example on https://github.com/raehik/symparsec?tab=readme-ov-file?
00:48:53 <Axman6> Also that package is so tempting... but I know I would only do horrible, awful things with it
00:49:03 <probie> zero: A monadic operator is written to the right of its its argument, whilst a monadic function goes to the left of it
00:49:20 <zero> probie: oh i see
00:51:05 <zero> i like J syntax
00:51:45 <zero> they ironed out much of the creases
00:51:56 <probie> most (but not all) operators take functions as arguments, but there are some (like `⍨`) which is an operator that can take data. Most APLs treat functions and data separately
00:52:51 <raehik> Axman6: oops that's a typo from rewriting. it's meant to be ""
00:54:29 <probie> The "APL" I think has the best syntax is BQN (also, BQN will let you have arrays of functions, which is something most APLs don't)
00:54:30 <raehik> I still think symparsec is excellent for making generics even safer. like I straight up promoted a runtime check to compile time in a lib of mine
00:54:42 <Axman6> Great, I thought so. I can make a PR if you like =) (I actually thing making the input "xFF_etc" is better here)
00:56:45 <raehik> I just pushed the fix sorry to steal your PR chance xd
00:57:02 <Axman6> D:
00:57:05 <Axman6> Rude
00:57:12 <raehik> good call, I considered that and made another change to have a suffix instead of empty
00:58:23 <Axman6> Also the next example doesn't make sense any more right?
00:58:39 <Axman6> oh it doesew
00:59:15 <raehik> I don't explain the return kind shape so it's not completely clear
00:59:17 <Axman6> How hard would a JSON parser be? I don't want this, but I would love to see it
01:00:18 <Axman6> Also, is Literal necessary? Could you just have Symbols?
01:00:43 <raehik> the current problem with symparsec is the minimal parser choice functionality (no backtracking, only certain choice "types" permitted)
01:01:07 <raehik> and probably no mutually recursive parsers (I can't figure them out)
01:01:47 <Axman6> I can't see any reason why recursive types could ever cause any problems =)
01:02:25 <raehik> I'm not sure the Or parser would work with a complex schema like JSON (I don't think so)
01:02:48 <raehik> regarding Literal: we need it for the bookkeeping
01:03:42 <raehik> you can't connect a `sym :: Symbol` together with another type-level parser because of how parser sequencing works
01:05:09 <Axman6> Fair enough
01:08:22 <raehik> symparsec is kind of designed for simple parsers and to be simple itself. I think if you were clever you could put backtracking directly in the parser runner
01:09:01 <raehik> but it would be scary and rolling my own singletons was enough for me to pause the project for now! :)
01:09:55 ddellacosta joins (~ddellacos@ool-44c73d29.dyn.optonline.net)
01:11:26 × TonyStone quits (~TonyStone@user/TonyStone) (Remote host closed the connection)
01:12:42 × spew quits (~spew@201.141.102.132) (Read error: Connection reset by peer)
01:13:00 ticat joins (~ticat@156.251.248.134)
01:22:14 peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com)
01:26:59 × ticat quits (~ticat@156.251.248.134) (Quit: Client closed)
01:43:27 × ZharMeny quits (~user@user/ZharMeny) (Quit: No Space Left on Device)
01:45:58 bilegeek joins (~bilegeek@2600:1008:b047:89f7:6723:6fe8:c1e7:6c2d)
01:46:24 × peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 252 seconds)
01:49:37 × ezzieyguywuf quits (~Unknown@user/ezzieyguywuf) (Quit: Lost terminal)
01:54:22 ezzieyguywuf joins (~Unknown@user/ezzieyguywuf)
01:57:16 starburst joins (~starburst@2601:602:480:9390::707d)
01:57:18 <starburst> ayaya
01:58:45 × dolio quits (~dolio@130.44.140.168) (Quit: ZNC 1.8.2 - https://znc.in)
02:00:16 dolio joins (~dolio@130.44.140.168)
02:00:24 JuanDaugherty joins (~juan@user/JuanDaugherty)
02:03:57 × dolio quits (~dolio@130.44.140.168) (Client Quit)
02:07:11 dolio joins (~dolio@130.44.140.168)
02:08:45 × nadja quits (~dequbed@banana-new.kilobyte22.de) (Ping timeout: 252 seconds)
02:09:15 nadja joins (~dequbed@banana-new.kilobyte22.de)
02:19:22 <albet70> whats the functions name to let [1..9] [11..19] [21..29] ... to be [[1,11,21..], [2,12,22..]...]?
02:19:54 <albet70> zip?
02:20:21 <albet70> or just use list comprehension?
02:21:28 × starburst quits (~starburst@2601:602:480:9390::707d) (Quit: Client closed)
02:26:02 <mauke> > transpose [[1..9], [11..19], [21..29]]
02:26:04 <lambdabot> [[1,11,21],[2,12,22],[3,13,23],[4,14,24],[5,15,25],[6,16,26],[7,17,27],[8,18...
02:26:27 <mauke> zipN = transpose
02:27:27 <edwardk> :t Data.List.transpose
02:27:28 <lambdabot> [[a]] -> [[a]]
02:27:39 <edwardk> that's your friend here
02:29:09 × td_ quits (~td@i53870904.versanet.de) (Ping timeout: 248 seconds)
02:30:47 td_ joins (~td@i53870929.versanet.de)
02:32:54 <edwardk> raehik: what is driving you to symparsec?
02:32:54 <albet70> thanks :)
02:33:29 <edwardk> raehik: e.g. does it _actually_ have to map from Symbol -> Type? or would using an actual parsing combinator library at compile time via template haskell be easier for what you want to do?
02:34:07 <edwardk> usually i go quasi-quote -> edsl, build what i want, and then generate haskell rather than go into singleton typing hell
02:35:50 <raehik> edwardk: I was writing some generics that want to operate on field names
02:36:04 <edwardk> er wait, you're writing this library, not using this library. misparsed
02:36:14 <raehik> I am also using the library :)
02:36:21 <edwardk> hah
02:36:44 <raehik> the singletons aren't necessary at all but once I figured they were possible, I wanted to have a go
02:37:04 <edwardk> ok, so that leaves you with much less palatable fallbacks. e.g. custom plugin to generate instances that do what you want
02:38:42 <raehik> I did manage to do what I want with symparsec
02:39:30 <raehik> It suffers from poor ergonomics but it all works and in Haskell land. (I don't know how to do TH or GHC plugins)
02:39:32 <raehik> https://hackage.haskell.org/package/generic-data-functions-0.6.0/docs/Generic-Data-Function-FoldMap.html#v:genericFoldMapSum
02:39:40 <edwardk> general purpose recursion is probably the sort of thing that would need you to build a letrec equivalent and/or extend an environment of parsers
02:42:52 <raehik> kinda waiting for someone to take a look at symparsec and be like "oh you can do much better in like 50 lines" :D
02:43:19 <raehik> just like I did with csongor's symbol library (which was made before we could deconstruct Symbols)
02:44:09 <raehik> (oops I mean symbols library)
02:46:23 <edwardk> hah
02:46:42 × ell quits (~ellie@user/ellie) (Quit: Leaving)
02:46:57 <edwardk> i mean, you could use my variant on singletons maybe. https://github.com/ekmett/haskell/tree/master/types
02:47:31 <edwardk> that transforms symbols into very introspectable things by making them equivalent to type level strings
02:47:35 ell joins (~ellie@user/ellie)
02:47:52 <edwardk> as in lists of type level chars
02:51:04 <raehik> I wrote my own explicit singletons that doesn't hide kind in a Sing type family (because it was hard to troubleshoot what I was doing wrong) instead https://hackage.haskell.org/package/singleraeh
02:53:10 <raehik> I wondered if there was another way to design a type-level parser lib that doesn't require writing the same thing twice for type and term level... but my approach is easiest for type-level hijinks and that's what I wanted most
02:54:43 <edwardk> fair nuff
02:55:07 <edwardk> mostly i just abuse reflection and little scoping tricks to fabricate the types i need with the instances i need
02:56:04 <edwardk> that's generally been enough for me to generate code that depends on terms that needs to manifest as types by bringing into scope reflection'ed dictionaries and unsafeCoerced type equalities
02:56:25 <edwardk> but i am willing to cheat my butt off to get around haskell's non-dependently typed nature
02:57:36 <raehik> I have read the reflection lib docs enough to know that about you haha :)
03:11:50 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 255 seconds)
03:12:45 Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915)
03:16:28 peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com)
03:22:42 xff0x joins (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp)
03:36:30 <edwardk> hahahahha
03:47:30 × peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 252 seconds)
03:49:23 × JuanDaugherty quits (~juan@user/JuanDaugherty) (Quit: JuanDaugherty)
04:01:18 aforemny joins (~aforemny@2001:9e8:6ccc:fd00:728:dd11:4e8c:d31a)
04:02:52 × aforemny_ quits (~aforemny@2001:9e8:6cec:9200:56df:dd94:8882:31ea) (Ping timeout: 265 seconds)
04:02:56 × kupi quits (uid212005@id-212005.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
04:29:32 × RedFlamingos quits (~RedFlamin@user/RedFlamingos) (Quit: RedFlamingos)
04:40:44 thailigur joins (~thailigur@172.86.68.44)
04:42:14 × thailigur quits (~thailigur@172.86.68.44) (Remote host closed the connection)
04:42:29 thailigur joins (~thailigur@5.211.73.48)
05:02:29 × monochrom quits (trebla@216.138.220.146) (Quit: ZNC 1.9.0+deb2build3 - https://znc.in)
05:03:42 × tabaqui quits (~root@87.200.123.114) (Quit: WeeChat 4.3.5)
05:05:57 RedFlamingos joins (~RedFlamin@user/RedFlamingos)
05:08:57 monochrom joins (trebla@216.138.220.146)
05:11:32 × itaipu quits (~itaipu@168.121.98.135) (Ping timeout: 255 seconds)
05:30:05 × Sgeo_ quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
05:34:22 michalz joins (~michalz@185.246.207.193)
05:34:27 × bilegeek quits (~bilegeek@2600:1008:b047:89f7:6723:6fe8:c1e7:6c2d) (Quit: Leaving)
05:35:03 × euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 244 seconds)
05:35:11 × thailigur quits (~thailigur@5.211.73.48) (Ping timeout: 252 seconds)
05:36:02 thailigur joins (~thailigur@31.2.130.189)
05:36:08 euleritian joins (~euleritia@dynamic-176-006-128-242.176.6.pool.telefonica.de)
05:49:49 × ChaiTRex quits (~ChaiTRex@user/chaitrex) (Remote host closed the connection)
05:50:15 ChaiTRex joins (~ChaiTRex@user/chaitrex)
05:57:54 danse-nr3 joins (~danse-nr3@user/danse-nr3)
06:02:37 × xff0x quits (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) (Quit: xff0x)
06:12:39 sawilagar joins (~sawilagar@user/sawilagar)
06:14:53 × euphores quits (~SASL_euph@user/euphores) (Quit: Leaving.)
06:17:43 jinsun is now known as Guest876
06:17:43 jinsun_ joins (~jinsun@user/jinsun)
06:17:43 × Guest876 quits (~jinsun@user/jinsun) (Killed (molybdenum.libera.chat (Nickname regained by services)))
06:17:43 jinsun_ is now known as jinsun
06:21:09 euphores joins (~SASL_euph@user/euphores)
06:21:54 × ft quits (~ft@p4fc2aa15.dip0.t-ipconnect.de) (Quit: leaving)
06:22:55 × raehik quits (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net) (Ping timeout: 264 seconds)
06:22:56 × echoreply quits (~echoreply@45.32.163.16) (Quit: WeeChat 2.8)
06:24:17 echoreply joins (~echoreply@45.32.163.16)
06:25:16 Digitteknohippie joins (~user@user/digit)
06:25:48 × Digit quits (~user@user/digit) (Ping timeout: 245 seconds)
06:27:41 × euleritian quits (~euleritia@dynamic-176-006-128-242.176.6.pool.telefonica.de) (Read error: Connection reset by peer)
06:27:59 euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
06:29:23 CiaoSen joins (~Jura@2a05:5800:2da:c00:e6b9:7aff:fe80:3d03)
06:35:25 rosco joins (~rosco@175.136.158.234)
06:38:30 alexherbo2 joins (~alexherbo@2a02-8440-3317-c12e-59ca-c9f6-a2c0-ca17.rev.sfr.net)
06:42:19 sord937 joins (~sord937@gateway/tor-sasl/sord937)
06:49:19 lortabac joins (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4)
07:05:13 cfricke joins (~cfricke@user/cfricke)
07:06:24 acidjnk_new3 joins (~acidjnk@p200300d6e72cfb71e8c7be36caf04b72.dip0.t-ipconnect.de)
07:13:24 FragByte joins (~christian@user/fragbyte)
07:14:51 × thailigur quits (~thailigur@31.2.130.189) (Ping timeout: 252 seconds)
07:15:03 thailigur joins (~thailigur@5.211.226.57)
07:15:25 × cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 4.2.2)
07:17:15 × alexherbo2 quits (~alexherbo@2a02-8440-3317-c12e-59ca-c9f6-a2c0-ca17.rev.sfr.net) (Remote host closed the connection)
07:17:37 alexherbo2 joins (~alexherbo@2a02-8440-3317-c12e-7182-1a68-9319-87e9.rev.sfr.net)
07:20:36 cfricke joins (~cfricke@user/cfricke)
07:20:55 × alexherbo2 quits (~alexherbo@2a02-8440-3317-c12e-7182-1a68-9319-87e9.rev.sfr.net) (Remote host closed the connection)
07:21:49 × thailigur quits (~thailigur@5.211.226.57) (Read error: Connection reset by peer)
07:22:30 thailigur joins (~thailigur@151.240.87.209)
07:24:40 kuribas joins (~user@2a02:1810:2825:6000:22f5:5d2b:a63a:1884)
07:26:18 vpan joins (~vpan@212.117.1.172)
07:26:36 vpan is now known as Guest6458
07:27:27 Guest6458 is now known as vpan
07:32:11 × cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 4.2.2)
07:47:46 × thailigur quits (~thailigur@151.240.87.209) (Read error: Connection reset by peer)
07:48:03 thailigur joins (~thailigur@172.86.68.44)
07:55:25 Digitteknohippie is now known as Digit
07:58:09 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
08:00:31 × thailigur quits (~thailigur@172.86.68.44) (Remote host closed the connection)
08:00:57 thailigur joins (~thailigur@172.86.68.44)
08:01:49 × ChaiTRex quits (~ChaiTRex@user/chaitrex) (Remote host closed the connection)
08:02:14 ChaiTRex joins (~ChaiTRex@user/chaitrex)
08:03:38 × danse-nr3 quits (~danse-nr3@user/danse-nr3) (Quit: on the move)
08:05:31 × thailigur quits (~thailigur@172.86.68.44) (Ping timeout: 264 seconds)
08:06:08 thailigur joins (~thailigur@172.86.68.44)
08:11:41 JuanDaugherty joins (~juan@user/JuanDaugherty)
08:13:19 × thailigur quits (~thailigur@172.86.68.44) (Ping timeout: 264 seconds)
08:14:33 thailigur joins (~thailigur@172.86.68.44)
08:15:44 danse-nr3 joins (~danse-nr3@user/danse-nr3)
08:18:44 × thailigur quits (~thailigur@172.86.68.44) (Ping timeout: 252 seconds)
08:19:08 thailigur joins (~thailigur@172.86.68.44)
08:26:45 × tzh quits (~tzh@c-76-115-131-146.hsd1.or.comcast.net) (Quit: zzz)
08:31:34 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
08:38:23 abyxq joins (~abyxq@user/abyxq)
08:52:22 × econo_ quits (uid147250@id-147250.tinside.irccloud.com) (Quit: Connection closed for inactivity)
08:52:47 ubert joins (~Thunderbi@178.165.184.113.wireless.dyn.drei.com)
08:56:45 × Inst quits (~Inst@user/Inst) (Read error: Connection reset by peer)
08:57:45 × thailigur quits (~thailigur@172.86.68.44) (Quit: Quit)
08:58:51 × danse-nr3 quits (~danse-nr3@user/danse-nr3) (Quit: oops)
09:01:00 Inst joins (~Inst@user/Inst)
09:03:19 gehmehgeh joins (~user@user/gehmehgeh)
09:03:52 gehmehgeh is now known as gmg
09:11:31 × abyxq quits (~abyxq@user/abyxq) (Ping timeout: 252 seconds)
09:12:32 abyxq joins (~abyxq@185.238.219.55)
09:14:19 falafel joins (~falafel@2a0c:5a87:3104:4c01::aa34)
09:14:21 cpressey joins (~weechat@176.254.71.203)
09:15:20 × abyxq quits (~abyxq@185.238.219.55) (Changing host)
09:15:20 abyxq joins (~abyxq@user/abyxq)
09:22:48 danse-nr3 joins (~danse-nr3@user/danse-nr3)
09:26:34 × monochrom quits (trebla@216.138.220.146) (Ping timeout: 252 seconds)
09:26:36 monochrm joins (trebla@216.138.220.146)
09:27:01 monochrm is now known as monochrom
09:31:11 cfricke joins (~cfricke@user/cfricke)
09:36:51 × falafel quits (~falafel@2a0c:5a87:3104:4c01::aa34) (Ping timeout: 265 seconds)
09:37:31 × tcard_ quits (~tcard@2400:4051:5801:7500:1e90:74c3:2754:ce8a) (Quit: Leaving)
09:45:00 × ThePenguin quits (~ThePengui@cust-95-80-24-166.csbnet.se) (Remote host closed the connection)
09:45:16 tcard joins (~tcard@2400:4051:5801:7500:1e90:74c3:2754:ce8a)
09:45:35 ThePenguin joins (~ThePengui@cust-95-80-24-166.csbnet.se)
09:47:03 × cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 4.2.2)
09:48:28 dans37269 joins (~danse-nr3@user/danse-nr3)
09:49:30 thyriaen joins (~thyriaen@2001:4bc9:1fb8:12d1:6245:cbff:fe9f:48b1)
09:50:34 × danse-nr3 quits (~danse-nr3@user/danse-nr3) (Ping timeout: 260 seconds)
09:53:32 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
09:57:45 × driib3 quits (~driib@vmi931078.contaboserver.net) (Quit: The Lounge - https://thelounge.chat)
09:58:23 driib3 joins (~driib@vmi931078.contaboserver.net)
10:04:30 × sp1ff quits (~user@c-73-11-70-111.hsd1.wa.comcast.net) (Remote host closed the connection)
10:04:55 × CiaoSen quits (~Jura@2a05:5800:2da:c00:e6b9:7aff:fe80:3d03) (Ping timeout: 264 seconds)
10:05:05 × thyriaen quits (~thyriaen@2001:4bc9:1fb8:12d1:6245:cbff:fe9f:48b1) (Remote host closed the connection)
10:08:49 × lortabac quits (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) (Ping timeout: 248 seconds)
10:11:08 cfricke joins (~cfricke@user/cfricke)
10:12:42 × vpan quits (~vpan@212.117.1.172) (Quit: Leaving.)
10:12:48 × Digit quits (~user@user/digit) (Ping timeout: 276 seconds)
10:15:22 lortabac joins (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4)
10:27:47 × lortabac quits (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) (Quit: WeeChat 4.2.2)
10:39:19 × JuanDaugherty quits (~juan@user/JuanDaugherty) (Quit: JuanDaugherty)
10:41:09 × zero quits (~z@user/zero) (Quit: quit)
10:42:32 zero joins (~z@user/zero)
10:46:50 alexherbo2 joins (~alexherbo@2a02-8440-3317-c12e-1d26-3004-5564-597a.rev.sfr.net)
10:49:19 Digit joins (~user@179.67.90.146.dyn.plus.net)
10:49:35 falafel joins (~falafel@2a0c:5a87:3104:4c01::aa34)
10:54:58 Digitteknohippie joins (~user@179.67.90.146.dyn.plus.net)
10:57:08 × Digit quits (~user@179.67.90.146.dyn.plus.net) (Ping timeout: 255 seconds)
10:58:32 lortabac joins (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4)
11:09:31 × Digitteknohippie quits (~user@179.67.90.146.dyn.plus.net) (Changing host)
11:09:31 Digitteknohippie joins (~user@user/digit)
11:09:55 Digitteknohippie is now known as Digit
11:11:18 × abyxq quits (~abyxq@user/abyxq) (Ping timeout: 276 seconds)
11:13:06 abyxq joins (~abyxq@user/abyxq)
11:21:20 × alexherbo2 quits (~alexherbo@2a02-8440-3317-c12e-1d26-3004-5564-597a.rev.sfr.net) (Remote host closed the connection)
11:31:44 CiaoSen joins (~Jura@2a05:5800:2da:c00:e6b9:7aff:fe80:3d03)
11:46:21 alexherbo2 joins (~alexherbo@2a02-8440-3317-c12e-6155-3ef4-109a-60a1.rev.sfr.net)
11:51:26 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
11:53:46 × falafel quits (~falafel@2a0c:5a87:3104:4c01::aa34) (Ping timeout: 244 seconds)
12:02:07 Unhammer parts (~Unhammer@user/unhammer) (WeeChat 2.3)
12:05:50 waleee joins (~waleee@h-176-10-144-38.NA.cust.bahnhof.se)
12:06:12 × cpressey quits (~weechat@176.254.71.203) (Ping timeout: 265 seconds)
12:15:27 × dans37269 quits (~danse-nr3@user/danse-nr3) (Quit: meal)
12:15:54 jvml joins (~user@172.56.70.56)
12:19:16 × waleee quits (~waleee@h-176-10-144-38.NA.cust.bahnhof.se) (Ping timeout: 252 seconds)
12:29:29 Achylles joins (~Achylles@45.182.57.106)
12:30:55 × abyxq quits (~abyxq@user/abyxq) (Quit: leaving)
12:31:57 × alexherbo2 quits (~alexherbo@2a02-8440-3317-c12e-6155-3ef4-109a-60a1.rev.sfr.net) (Remote host closed the connection)
12:32:04 falafel joins (~falafel@2a0c:5a87:3104:4c01::aa34)
12:33:14 danse-nr3 joins (~danse-nr3@user/danse-nr3)
12:33:30 machinedgod joins (~machinedg@d50-99-47-73.abhsia.telus.net)
12:35:12 × krei-se quits (~krei-se@p57af2d39.dip0.t-ipconnect.de) (Ping timeout: 265 seconds)
12:36:51 × euphores quits (~SASL_euph@user/euphores) (Quit: Leaving.)
12:37:58 × falafel quits (~falafel@2a0c:5a87:3104:4c01::aa34) (Ping timeout: 272 seconds)
12:39:18 krei-se joins (~krei-se@p57af2d39.dip0.t-ipconnect.de)
12:44:02 euphores joins (~SASL_euph@user/euphores)
12:44:26 × Achylles quits (~Achylles@45.182.57.106) (Quit: Leaving)
12:46:45 × ddellacosta quits (~ddellacos@ool-44c73d29.dyn.optonline.net) (Ping timeout: 248 seconds)
12:56:23 × jespada quits (~jespada@cpc121308-nmal25-2-0-cust15.19-2.cable.virginm.net) (Ping timeout: 255 seconds)
12:58:08 jespada joins (~jespada@cpc121308-nmal25-2-0-cust15.19-2.cable.virginm.net)
12:59:49 hseg joins (~gesh@46.120.21.97)
13:05:56 × jvml quits (~user@172.56.70.56) (Quit: ERC 5.4 (IRC client for GNU Emacs 28.2))
13:07:19 cpressey joins (~weechat@176.254.71.203)
13:11:37 × cpressey quits (~weechat@176.254.71.203) (Client Quit)
13:18:25 abyxq joins (~abyxq@user/abyxq)
13:22:18 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
13:26:55 <Athas> I have been working on some Haskell exercises: https://github.com/diku-dk/ap-e2024-pub/tree/main/week1
13:27:00 × rosco quits (~rosco@175.136.158.234) (Quit: Lost terminal)
13:27:06 <Athas> I think this is actually the first time I have written didactic material for Haskell.
13:31:14 × CiaoSen quits (~Jura@2a05:5800:2da:c00:e6b9:7aff:fe80:3d03) (Ping timeout: 260 seconds)
13:31:45 × pointlessslippe1 quits (~pointless@212.82.82.3) (Ping timeout: 265 seconds)
13:38:38 pointlessslippe1 joins (~pointless@212.82.82.3)
13:40:02 ystael joins (~ystael@user/ystael)
13:40:04 <danse-nr3> nice stuff
13:40:14 <danse-nr3> in a meeting will read better later
13:46:31 × pointlessslippe1 quits (~pointless@212.82.82.3) (Ping timeout: 252 seconds)
13:48:15 dans77453 joins (~danse-nr3@user/danse-nr3)
13:50:09 × danse-nr3 quits (~danse-nr3@user/danse-nr3) (Ping timeout: 248 seconds)
13:50:24 <dans77453> so, what's the plan about those Athas?
13:50:28 <dans77453> organized by weeks, they seem to hint at a course
13:50:34 skyesoss joins (~Thunderbi@c-73-208-45-119.hsd1.il.comcast.net)
13:50:38 <Athas> dans77453: yes, it's a course.
13:51:13 <Athas> The didactive vision is that the students will do tutorial-style exercises (with solutions) where they write code from scratch, and then do take-home assignments where they have to add more functionality.
13:51:53 <Athas> I am trying to take a very concrete, code-oriented perspective, since my experience is that most students cannot understand the abstract principles in isolation.
13:53:30 <dans77453> maybe not for me but good initiative
14:01:14 <sprout> you should run the exercises through chatgpt :)
14:04:39 <dans77453> -.-
14:05:15 pointlessslippe1 joins (~pointless@212.82.82.3)
14:05:21 <dans77453> well actually, not a bad idea. Some student is definitely gonna do that
14:08:15 <EvanR> Athas, you haven't written a monad tutorial??
14:10:32 <Athas> EvanR: I felt there were enough already.
14:10:38 AlexNoo_ is now known as AlexNoo
14:10:41 <Athas> sprout: why? They're exercises?
14:10:55 zero is now known as zzz
14:11:00 <sprout> Athas: because students are going to do that?
14:11:13 <Athas> They can also just not do the exercises. They're not mandatory.
14:11:16 <Athas> That's even easier.
14:11:47 <sprout> I would be interested anyway
14:11:51 <sprout> but ah well
14:12:28 Sgeo joins (~Sgeo@user/sgeo)
14:12:47 <EvanR> sprout, you do it
14:12:53 <sprout> nah
14:12:56 <EvanR> lol
14:13:08 <sprout> I've got my own shitty interpreter to work on
14:13:27 <EvanR> I asked chat-gpt to make a shitty interpreter. It did
14:14:29 <dans77453> what's the interpreter about sprout?
14:14:47 <sprout> https://egel-lang.github.io/
14:14:57 <sprout> cheap and dirty fuctional programs
14:15:07 <sprout> or small and dirty
14:15:20 <dans77453> i thought that was called javascript. But lemme peek
14:15:50 <sprout> this is the best example I have so far of what I want: https://egel.dev/self
14:16:07 <sprout> (fingers crossed that loads)
14:16:14 <dans77453> nice syntax
14:16:23 <dans77453> what's the 'import System' about?
14:16:27 <sprout> a gopher/www server in a few untidy lines
14:16:36 <sprout> dans77453: pull in the system namespace
14:17:01 <sprout> stuff like + and print
14:17:04 <dans77453> hmm pulling a namespace in a specific scope is cool
14:17:25 <sprout> it's probably overkill but for the moment I like to keep stuff clean
14:17:42 <sprout> users probably would want that namespace by default
14:18:18 <sprout> there's about a dozen lines of decorum I could cut by making it all more friendly
14:18:25 <sprout> but ah well
14:18:40 <dans77453> heh
14:19:48 × euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 276 seconds)
14:20:03 euleritian joins (~euleritia@dynamic-176-006-130-193.176.6.pool.telefonica.de)
14:24:49 <dans77453> some other day someone in #emacs was arguing devs like to keep bugs around in order to keep their jobs. Nonsense
14:25:29 <dans77453> for each development project there is an infinitely forking tree with infinite branches of stuff to be done
14:25:52 <dans77453> like an hydra :P
14:26:58 <sprout> it's just time management
14:27:21 <sprout> a lot of writing software or compilers boils down to: this will do for the moment
14:28:19 × hseg quits (~gesh@46.120.21.97) (Ping timeout: 264 seconds)
14:28:20 <dans77453> of course, i've long learned minimalism, but... we all know there is so much more we would like to do
14:28:55 <EvanR> that conspiratorial thinking is so gross
14:31:36 × abyxq quits (~abyxq@user/abyxq) (Quit: leaving)
14:31:38 <dans77453> i am more concerned about the "elitism" label to be honest
14:33:09 <EvanR> yeah wtf
14:33:58 <EvanR> we should select and promote people who are most qualified to do the job in question, but make sure they're not elite? lol
14:34:11 <EvanR> don't trust experts
14:35:11 <dans77453> you are talking meritocracy, but i saw that attached to free software devs in general, which are a chaotic crowd. Anyways, getting too offtopic i'm afraid
14:36:10 <EvanR> a common hottake against haskell is the people who know it are elitist which is bad
14:36:15 BitByte joins (~BitByte@2804:880:130e:5700:b184:6405:971d:7d3d)
14:37:53 <zzz> who holds that opinion? people who know haskell?
14:38:25 <EvanR> usually not xD
14:39:03 <EvanR> that would place you in your own crosshairs
14:39:19 <zzz> why should the opinion of people who don't know something count?
14:39:50 <EvanR> should not but often does anyway
14:39:53 <sprout> 'don't discuss the ignorant, people observing might not know the difference'
14:40:05 <sprout> Twain I think
14:40:08 itaipu joins (~itaipu@168.121.98.114)
14:40:36 <dans77453> i was trying to deepen the matter in #emacs but we didn't get too far. Someone pulled in generational divides, having "weird and uncommon" ways... i don't recall what else
14:40:43 <dans77453> good points zzz, sprout
14:41:14 <EvanR> conform to the common ways, it's safer. Use emacs!
14:41:27 <dans77453> that would be vscode actually
14:41:33 <EvanR> lol
14:41:44 <zzz> :wq!
14:42:12 <dans77453> but well, i think it matters how a community is perceived by the rest of the society
14:43:29 raehik joins (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net)
14:44:03 <EvanR> https://www.wired.com/story/inside-the-cult-of-the-haskell-programmer/
14:44:20 <zzz> here's a wonderful phrase from http://ereserve.library.utah.edu/Annual/SOC/3568/Bench/myth.pdf : "Although I am tempted to give this response, I never do. This is because, although true, it never persuades."
14:44:34 <dans77453> =D
14:44:35 <dans77453> although facts shows the efforts haskellers make to increase the accessibility of their knowledge, i think haskell's values make it harder to fight "elitism" back. On the other hand i am concerned by seeing that applied to /all/ free dev
14:45:12 × jespada quits (~jespada@cpc121308-nmal25-2-0-cust15.19-2.cable.virginm.net) (Quit: My Mac has gone to sleep. ZZZzzz…)
14:46:40 <EvanR> haskell's values make it hard to mutate them
14:46:51 <zzz> i just got here and may be missing some context. in which ways is haskell being accused of elitism?
14:47:07 <dans77453> not haskell, free software development in general
14:47:23 <dans77453> #emacs, #linux
14:47:32 <zzz> can't anyone develop FOSS?
14:48:04 <dans77453> huh... i assume who comes from proprietary tech finds that harder
14:48:18 <zzz> why would that be?
14:48:29 <dans77453> just because they are used differently
14:48:39 <dans77453> *accustomed
14:49:17 <zzz> proprietary tech is less elitist than foss?
14:49:35 <dans77453> it's more ... statistically common for sure
14:49:58 <zzz> you think proprietary tech is more common? i seriously doubt that
14:50:03 <EvanR> yes, windows was always workingclass man's platform
14:50:17 <EvanR> regardless of how widely deployed
14:50:49 × dans77453 quits (~danse-nr3@user/danse-nr3) (Remote host closed the connection)
14:50:59 <EvanR> linux was european communism cancer (according to steve ballmer)
14:51:03 danse-nr3 joins (~danse-nr3@user/danse-nr3)
14:51:12 <Rembane> EvanR: I need that on a t-shirt!
14:51:32 <EvanR> nevermind that contradiction
14:52:28 <zzz> i think we need to define our terms. what does elitist mean? what does beomg more common mean? the *vast* majority of servers in the world are running linux. the phone i'm writing this in is running linux
14:52:31 <Rembane> That the first slide in the Wired article isn't typeset with Comic Sans MS is just wrong
14:52:35 <EvanR> if you ever heard free software explained as, use this to really understand computing. Well that may come off as elitist. You actually know what you're doing? Leet
14:52:37 <raehik> I'm doing some low level bytestring manip where I poke bytes to a fresh ForeignPtr buffer which will eventually become a ByteString-- but it's failable, and if so we should free the buffer. Can I safely assume the garbage collector will do this for me if I simply discard the ForeignPtr?
14:53:14 <danse-nr3> hm i assume even communism can be considered elitist somehow...
14:53:26 BitBitotabit5 joins (~BitBitota@2804:880:130e:5700:b184:6405:971d:7d3d)
14:53:30 <EvanR> raehik, not unless you attached a finalizer
14:53:41 <EvanR> whcih explicitly frees the buffer
14:53:47 <EvanR> or used a bracket pattern which does it
14:54:14 × BitBitotabit5 quits (~BitBitota@2804:880:130e:5700:b184:6405:971d:7d3d) (Write error: Broken pipe)
14:54:21 <zzz> danse-nr3: communist regimes tend to create elites, yes
14:54:29 <zzz> famously so
14:54:37 <danse-nr3> isn't that a contradiction in terms?
14:54:42 <EvanR> yes :)
14:54:42 <zzz> not at all
14:54:55 <danse-nr3> oligarchies, possibly. It's slightly different
14:55:30 <danse-nr3> 'cause some communism is very centralised
14:56:17 <zzz> communism is generally against class-based elitism, but because it's class based, not because it's elitism
14:56:30 × lortabac quits (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) (Quit: WeeChat 4.2.2)
14:56:30 <danse-nr3> hmm
14:57:01 <danse-nr3> aren't you collapsing meritocracy and elitism again?
14:57:01 <raehik> EvanR: right I think I see, finalizeForeignPtr and withForeignPtr exist. thanks
14:57:02 <EvanR> raehik, a ForeignPtr points to something outside the haskell runtime, the gc doesn't know what to do with the foreign object. But there is a facility of finalizers
14:57:27 <EvanR> which let you specify
14:58:06 <zzz> danse-nr3: no
14:58:13 Cbit joins (~Cbit@2804:880:130e:5700:b184:6405:971d:7d3d)
14:58:25 <danse-nr3> i'll move to -offtopic
14:59:07 <zzz> i see how it can cause ambiguity though
14:59:47 <zzz> yes, better
15:02:20 <EvanR> one thing I heard about programming is that is it hard coming up with so many variable names. This was in context of an imperative language which encouraged a lot of local variables to hold the temporary results before doing the next action
15:02:36 <EvanR> do you find that this is more, less, or the same size problem in haskell
15:02:44 <EvanR> if any
15:03:01 <int-e> just know your a, b, c, and x, y, z and you'll be fine 80% of the time.
15:03:09 <int-e> f, g, h are also handy
15:03:38 <EvanR> great you don't need to name local variables lol
15:04:05 <EvanR> but what about top level bindings
15:04:21 <int-e> those are hard
15:05:57 <int-e> Unless you subscribe to the HT school of naming: Mod.f, Mod.T
15:06:03 <EvanR> lol
15:06:12 <EvanR> leverage hard the module names?
15:06:21 <zzz> what's in a name? would a rose by any other name not smell as sweet?
15:06:28 <zzz> paraphrasing the bard
15:06:43 <EvanR> I am inspired to great several cool and useful tools on hackage with that naming convention
15:07:33 <int-e> zzz: I'm sure a flumphrobble would not smell as sweet
15:08:19 <danse-nr3> after a bit working in haskell, i came to the conclusion that meaningless names stress me more than meaningful ones. And in haskell, often, i can avoid meaningless names
15:09:50 <zzz> danse-nr3: haskell is *very* good at letting you know what a function is, independently of which name you give it
15:10:21 <danse-nr3> well that depends how it's written i guess
15:10:22 <EvanR> by reading the source code? xD
15:10:29 <int-e> EvanR: actually this reminds me of one of the better bugs I've seen on haskell-cafe (ages ago): somebody produced a recursive binding because they had both a,b,c and r,g,b as variable names.
15:10:45 <danse-nr3> :P
15:10:46 <zzz> EvanR: yes but not only
15:10:55 <zzz> referential transparency is great
15:11:02 <danse-nr3> yeah i get what you mean zzz
15:11:09 <danse-nr3> but expressive types are not everywhere
15:11:15 <EvanR> I have been confused by binding the same variable multiple times xD
15:11:18 <zzz> navigating hoogle is a breeze compared to other languages
15:11:24 <EvanR> usually gets caught by the compiler because types don't match
15:11:27 <danse-nr3> (nor safe functions are)
15:11:59 <danse-nr3> i think a beginner could have a different opinion zzz
15:12:12 <danse-nr3> (about navigating hoogle or hackage)
15:12:19 <zzz> EvanR: overloading is discouraged, and ghc warns you about it
15:12:31 <EvanR> ?
15:12:37 <danse-nr3> yea we've got that as an error
15:12:47 <danse-nr3> and i'm glad about that
15:12:49 <zzz> danse-nr3: that applies to a beginner in anything
15:13:08 <danse-nr3> hmm... some are friendlier than others
15:13:10 <zzz> it's a poor argument
15:13:15 <zzz> danse-nr3: how so?
15:13:26 <EvanR> typeclasses is overloading, and multiple definitions with the wrong type is just wrong
15:13:57 <danse-nr3> zzz meant shadowing
15:14:01 <EvanR> oh yeah
15:14:15 <EvanR> call me the shadowmaster
15:14:21 <danse-nr3> XD
15:14:26 <zzz> EvanR: it's a mistake to equate class instances with overloading imo
15:14:44 <EvanR> sure
15:14:55 <EvanR> but you can undiscouragedly overload + in haskell
15:15:02 <danse-nr3> sure, one is derivation, the other is overloading
15:15:06 <EvanR> via some mechanism that's obviously not equated
15:16:03 <EvanR> meanwhile many languages actively discourage you from wanting to overload +
15:16:10 <zzz> EvanR: you can create a sum function in most languages and overload it
15:16:17 <EvanR> by not having that feature, or otherwise
15:16:38 <EvanR> creating a function called sum and overloading + isn't the same thing
15:16:46 <zzz> yes it is
15:16:47 <EvanR> no
15:16:56 <zzz> it just happens to be called + in haskell
15:16:57 ft joins (~ft@p4fc2aa15.dip0.t-ipconnect.de)
15:17:32 <EvanR> you were talking about shadowing anyway so this is a timeline which needs to get purged
15:18:12 <zzz> fair enough
15:26:29 <EvanR> and I think we were talking about this rogue phenomenon which isn't really shadowing because recursive bindings don't really have a seniority https://paste.tomsmeding.com/a43p42FI
15:36:51 <zzz> ah, i missed that
15:37:38 × cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 4.2.2)
15:38:34 <zzz> my mind keeps going back to this idea https://www.unison-lang.org/docs/the-big-idea/
15:39:26 <zzz> i understand it's tangential to this discussion but still
15:39:50 <danse-nr3> no worries, discussion is dead anyways
15:39:57 <zzz> the less names matter in a language the happier i am
15:43:25 <haskellbridge> <mauke> This is why I only code in Brainfuck
15:44:47 JuanDaugherty joins (~juan@user/JuanDaugherty)
15:45:05 ZharMeny joins (~user@user/ZharMeny)
15:47:45 × euleritian quits (~euleritia@dynamic-176-006-130-193.176.6.pool.telefonica.de) (Read error: Connection reset by peer)
15:47:54 <EvanR> "naming things is hard", clearly the code should make reference using glowing strands of graphics. That don't get tangled up somehow
15:48:03 euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
15:48:14 <raehik> bytestring's createFpAndTrim can potentially malloc 2 buffers and return the smaller one. I don't see an explicit free/finalizer call/bracketing for the larger buffer in such a case. How does this work? https://hackage.haskell.org/package/bytestring-0.12.1.0/docs/src/Data.ByteString.Internal.Type.html#createFpAndTrim
15:49:16 <raehik> I ask because I've effectively reimplemented createFpAndTrim with a custom action and it works, but I wonder if I've aimed a gun at a foot
15:50:06 <EvanR> createFpAndTrim seems to be so low level that it has no guardrails at all
15:50:16 <c_wraith> It's using a ForeignPtr, not a Ptr
15:50:22 <c_wraith> that means there's a finalizer attached
15:50:23 <EvanR> if the thread crashes during or after, you leak the buffers
15:50:51 <EvanR> oh foreignpointer to malloc automatically has finalizers?
15:51:12 <c_wraith> You only use a ForeignPtr if you've got finalizers to attach
15:51:34 <EvanR> I don't see where it is attached in this case
15:51:34 <c_wraith> But you'd need to find an inspect mallocPlainForeignPtrBytes to be sure
15:52:04 jespada joins (~jespada@cpc121308-nmal25-2-0-cust15.19-2.cable.virginm.net)
15:52:34 <c_wraith> Oh dear. "an optimised ForeignPtr representation with no finalizer is used. Attempts to add a finalizer will cause an exception to be thrown."
15:53:13 <haskellbridge> <mauke> https://hackage.haskell.org/package/base-4.20.0.1/docs/GHC-ForeignPtr.html#v:mallocForeignPtr
15:53:21 <raehik> mallocByteString creates ForeignPtrs with PlainPtr
15:53:33 <EvanR> ok I'm wrong about "no guardrails" xD
15:53:51 <EvanR> mallocPlainForeignPtrBytes stops you from adding a finalizer
15:55:23 <raehik> mauke: looks like I can't select the buffer size there, it's down to the Storable instance
15:55:24 <c_wraith> Interestingly, PlainPtr looks like it still gets garbage collected - you just can't hook in a finalizer to run native code
15:55:49 <c_wraith> So there is no bracket to clean up the larger buffer immediately, but it's part of GHC's heap
15:55:56 <c_wraith> it gets cleaned up eventually.
15:55:58 <haskellbridge> <mauke> ? This is just for documentation
15:56:04 <raehik> I see! I wondered if that was the case
15:56:16 <raehik> mauke: oh apologies, I thought you were suggesting a different approach
15:56:59 <haskellbridge> <mauke> This is the function that the other variants are described as being similar to
15:57:00 <raehik> another thing, bytestring uses withForeignPtr instead of unsafeWithForeignPtr. that figures because the user passes in the IO action, which could fail
15:57:24 <EvanR> PlainForeignPtr or MallocPtr would do what you want, but it's not
15:57:35 <raehik> if I write an action that's just Haskell (no FFI) and can't obviously fail, am I clear to use unsafeWithForeignPtr?
15:57:49 <haskellbridge> <mauke> Where similar to = automatic memory management
15:58:17 <EvanR> can't obviously fail = obviously can't fail? xD
15:58:32 <haskellbridge> <mauke> Can I throwTo your thread?
15:59:09 andrewchawk joins (~andrewcha@170.52.55.98)
15:59:23 <raehik> mauke: I don't know of that function. if you can find the thread ID I imagine so
15:59:26 jespada_ joins (~jespada@cpc121308-nmal25-2-0-cust15.19-2.cable.virginm.net)
16:00:09 <c_wraith> raehik: throwTo only can introduce exceptions at specific points - those points being when an allocation happens
16:00:14 <andrewchawk> Good God. I just joined, and I already see a bit of activity. IRC really must still be alive. :-)
16:00:16 <zzz> raehik: you can. doesn't mean that you should
16:00:33 <EvanR> IRC never dies it just stands in the back
16:00:39 × jespada quits (~jespada@cpc121308-nmal25-2-0-cust15.19-2.cable.virginm.net) (Ping timeout: 252 seconds)
16:00:45 <haskellbridge> <mauke> throwTo lets other people inject arbitrary exceptions into otherwise harmless IO actions
16:00:48 <c_wraith> You could safely use unsafeWithForeignPtr if the haskell code never allocates.
16:01:00 × JuanDaugherty quits (~juan@user/JuanDaugherty) (Quit: JuanDaugherty)
16:01:18 <raehik> I see. thanks c_wraith , it's a lot more finicky than I thought
16:01:23 <EvanR> I think raehik is trying to write to most unsafe haskell imaginable
16:01:36 <EvanR> because unsafe = speed
16:01:43 × kuribas quits (~user@2a02:1810:2825:6000:22f5:5d2b:a63a:1884) (Quit: ERC (IRC client for Emacs 27.1))
16:02:01 <haskellbridge> <mauke> Is that true even in the threaded runtime? The only at allocations part
16:02:05 <c_wraith> they haven't asked about accursedUnutterablePerformIO yet!
16:02:40 <raehik> EvanR: these libraries have exposed these functions, and I simply wish to understand them :)
16:03:09 <andrewchawk> EvanR: :-)
16:03:12 <EvanR> famous last words in lovecraft
16:03:18 <c_wraith> mauke: yes. Even the GC can't interrupt code that doesn't allocate. You can hang a program on the threaded runtime by starting a thread that runs forever and does no allocation
16:03:35 <zzz> pure $ unsafePerformIO $ peek nullPtr
16:04:13 <EvanR> that doesn't obviously fail depending on what pure means
16:04:22 <zzz> :: IO ()
16:04:45 <c_wraith> so it's a segfault only if you force the () value
16:05:12 <raehik> the docs for unsafeWithForeignPtr seem lacking perhaps. no mention of how thread interrupts and allocations can impact soundness
16:06:08 <EvanR> that's documented in Control.Exception docs? And or Control.Concurrent
16:06:59 <EvanR> and or the paper on haskell's asynchronous exception system
16:07:08 alexherbo2 joins (~alexherbo@2a02-8440-3317-c12e-b11a-79e1-1830-8594.rev.sfr.net)
16:09:12 <zzz> vs :: IO Word
16:09:31 × dsrt^ quits (dsrt@c-98-242-74-66.hsd1.ga.comcast.net) (Ping timeout: 244 seconds)
16:15:00 × andrewchawk quits (~andrewcha@170.52.55.98) (Changing host)
16:15:00 andrewchawk joins (~andrewcha@user/andrewchawk)
16:21:06 × machinedgod quits (~machinedg@d50-99-47-73.abhsia.telus.net) (Ping timeout: 248 seconds)
16:30:17 JuanDaugherty joins (~juan@user/JuanDaugherty)
16:33:17 <raehik> I wonder if a library that assists buffer updates in ST-land would be work & be handy. my buffer filling action only calls writeXOffPtr which could be placed into IO. and if this helps me use unsafeWithForeignPtr safely (can't allocate in ST, as far as I understand?) it'd be useful
16:34:03 <raehik> s/which could be placed into IO/which could be placed into ST (currently in IO)
16:36:08 <raehik> wait maybe primitive already does this :o
16:36:53 <geekosaur> the alternative is something might allow local allocation in ST by tagging the result with the existential? not sure how safe that is
16:37:53 spew joins (~spew@201.141.102.132)
16:38:00 <raehik> being able to do both seems useful
16:38:45 × danse-nr3 quits (~danse-nr3@user/danse-nr3) (Ping timeout: 248 seconds)
16:39:07 <EvanR> can't you allocate a buffer of unboxed Word8 in ST
16:39:10 <raehik> I think primitive does a lot of this, but the interfacing with bytestring is so messy because of the arbitrary internals exporting. some high-level things just, don't get exported
16:40:20 Tuplanolla joins (~Tuplanoll@91-159-69-59.elisa-laajakaista.fi)
16:41:02 <raehik> EvanR: not sure how to allocate in ST at all. all the malloc-likes I can find need IO
16:41:32 <raehik> I'm not _completely_ clear on what "allocate" refers to so might be looking in the wrong place
16:42:20 <EvanR> the Array and unboxed array library is parameterized on the prim monad either IO or ST
16:42:28 <EvanR> so it's the same API
16:43:01 <raehik> oh yup, you're right
16:43:23 × alexherbo2 quits (~alexherbo@2a02-8440-3317-c12e-b11a-79e1-1830-8594.rev.sfr.net) (Remote host closed the connection)
16:43:28 <EvanR> but an unboxed array is not what constitutes a ByteString so to get a ByteString in the end you need to make a copy, probably.
16:44:55 <raehik> ok, assuming that counts as an interruptible allocation I suppose unsafeWithForeignPtr should only be applied with the utmost caution
16:47:19 alexherbo2 joins (~alexherbo@2a02-8440-3317-c12e-51f5-a487-8417-dd3a.rev.sfr.net)
16:47:43 <raehik> then really all I want is a library on top of Data.ByteString.Internal that makes it easier to initialize and manipulate bytestring buffers :)
16:48:47 <EvanR> there is malloc, peek and poke
16:48:48 × JuanDaugherty quits (~juan@user/JuanDaugherty) (Quit: JuanDaugherty)
16:48:53 <EvanR> go to town
16:50:03 <EvanR> you can't literally manipulate the buffer backing a ByteString because that type is supposed to be immutable
16:50:25 <EvanR> but when you're done you can logically "freeze" the buffer you were working with as long as it's not within the garbage collector
16:50:46 <EvanR> and wrap it in the ByteString secret constructors
16:50:49 <raehik> right I mean manipulating a buffer that will become a bytestring later
16:51:08 <raehik> primitive has tons of tools for manipulating regular buffers
16:51:27 <EvanR> regular buffer?
16:51:41 <raehik> arbitrary buffers
16:51:48 × noumenon quits (~noumenon@113.51-175-156.customer.lyse.net) (Read error: Connection reset by peer)
16:52:00 <EvanR> malloced buffer? haskell managed buffers?
16:52:17 <EvanR> foreign buffer
16:52:18 <raehik> primitive mostly deals in Ptr and that's it
16:52:21 <raehik> (I think)
16:52:40 <EvanR> then it deals in pointers and not buffers xD
16:52:54 <raehik> oh sorry I use those interchangeably
16:53:03 <raehik> Ptr Word8 is a buffer to me
16:53:08 <EvanR> the C channel would have your head
16:53:08 × spew quits (~spew@201.141.102.132) (Read error: Connection reset by peer)
16:53:22 × sawilagar quits (~sawilagar@user/sawilagar) (Remote host closed the connection)
16:53:46 sawilagar joins (~sawilagar@user/sawilagar)
16:54:52 econo_ joins (uid147250@id-147250.tinside.irccloud.com)
16:55:10 <EvanR> but if your buffer is somewhere stable and not subject to GC, you can make it a bytestring via ForeignPtr, after using that library
16:57:56 gioyik joins (~gioyik@gateway/tor-sasl/gioyik)
16:58:28 danse-nr3 joins (~danse-nr3@user/danse-nr3)
17:00:29 <raehik> yes my use case is these buffers will always be going to bytestrings eventually. bytestring lib has internals for this but 1/2 of them aren't exported. reimplementing unexported functions and a tiny bit of glue would greatly simplify it
17:02:06 bo1 joins (~bo1@2804:880:130e:5700:b184:6405:971d:7d3d)
17:02:08 <EvanR> there's been a string of packages which do 1 thing, convert an unboxed array of Word8 into ByteString using internal unsafe unstable stuff to avoid a copy
17:02:13 × krei-se quits (~krei-se@p57af2d39.dip0.t-ipconnect.de) (Quit: ZNC 1.9.1 - https://znc.in)
17:02:24 <EvanR> or maybe it was the other way around
17:04:26 <EvanR> whatever the wisdom of wanting to do this, it seems the simplest way to cooperate with existing haskell
17:06:00 <raehik> that's interesting. I don't think it would be the most performant approach
17:06:51 <raehik> I'm not averse to doing safe IO work for performance & don't think it should be "frowned upon". the vector pkg is excellent in this regard
17:08:41 tzh joins (~tzh@c-76-115-131-146.hsd1.or.comcast.net)
17:11:29 CiaoSen joins (~Jura@2a05:5800:2da:c00:e6b9:7aff:fe80:3d03)
17:24:40 <geekosaur> there also used to be a patched ByteString that used unboxed vectors internally; sadly, it never caught on
17:25:30 × andrewchawk quits (~andrewcha@user/andrewchawk) (Remote host closed the connection)
17:25:45 andrewchawk joins (~andrewcha@170.52.55.98)
17:26:52 × haskellbridge quits (~hackager@syn-024-093-192-219.res.spectrum.com) (Remote host closed the connection)
17:27:13 krei-se joins (~krei-se@p57af2d39.dip0.t-ipconnect.de)
17:27:29 haskellbridge joins (~hackager@syn-024-093-192-219.res.spectrum.com)
17:27:29 ChanServ sets mode +v haskellbridge
17:30:14 × raehik quits (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net) (Ping timeout: 260 seconds)
17:32:02 × andrewchawk quits (~andrewcha@170.52.55.98) (Ping timeout: 252 seconds)
17:33:48 × BitByte quits (~BitByte@2804:880:130e:5700:b184:6405:971d:7d3d) (Quit: Client closed)
17:42:27 × CrunchyFlakes quits (~CrunchyFl@146.52.130.128) (Read error: Connection reset by peer)
17:42:38 andrewchawk joins (~andrewcha@170.52.55.98)
17:43:13 × andrewchawk quits (~andrewcha@170.52.55.98) (Changing host)
17:43:13 andrewchawk joins (~andrewcha@user/andrewchawk)
17:44:15 raehik joins (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net)
17:45:03 CrunchyFlakes joins (~CrunchyFl@ip92348280.dynamic.kabel-deutschland.de)
17:45:29 × Cbit quits (~Cbit@2804:880:130e:5700:b184:6405:971d:7d3d) (Ping timeout: 256 seconds)
17:46:52 <EvanR> the filepath package is an implementation of the abstract filepath proposal. Does it get any use? Is it universally used now?
17:48:39 dans41958 joins (~danse-nr3@user/danse-nr3)
17:50:41 × danse-nr3 quits (~danse-nr3@user/danse-nr3) (Ping timeout: 248 seconds)
17:51:43 × Buliarous quits (~gypsydang@46.232.210.139) (Remote host closed the connection)
17:52:42 <geekosaur> the old filepath package (pre-proposal) got little use. the new one (implementing the proposal) gets a fair amount of use and more things are switching to it
17:56:37 × CiaoSen quits (~Jura@2a05:5800:2da:c00:e6b9:7aff:fe80:3d03) (Ping timeout: 248 seconds)
17:58:57 × ubert quits (~Thunderbi@178.165.184.113.wireless.dyn.drei.com) (Quit: ubert)
17:59:10 ubert joins (~Thunderbi@178.165.184.113.wireless.dyn.drei.com)
18:00:08 <EvanR> they are both called filepath?
18:00:48 × sawilagar quits (~sawilagar@user/sawilagar) (Ping timeout: 245 seconds)
18:06:03 × ubert quits (~Thunderbi@178.165.184.113.wireless.dyn.drei.com) (Ping timeout: 252 seconds)
18:14:44 × raehik quits (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net) (Ping timeout: 260 seconds)
18:17:53 × pavonia quits (~user@user/siracusa) (Quit: Bye!)
18:19:59 <geekosaur> yes. the new one bumped the minor version to 100
18:20:00 × andrewchawk quits (~andrewcha@user/andrewchawk) (Remote host closed the connection)
18:20:19 andrewchawk joins (~andrewcha@170.52.55.98)
18:20:25 <geekosaur> so the last old version is 1.4.2.2 and the first new one is 1.4.100.0
18:20:34 <geekosaur> (they do share API)
18:22:04 L29Ah parts (~L29Ah@wikipedia/L29Ah) ()
18:25:00 <EvanR> it looks cool but how do you like... open a file using an OsPath
18:27:11 × ThePenguin quits (~ThePengui@cust-95-80-24-166.csbnet.se) (Remote host closed the connection)
18:27:47 ThePenguin joins (~ThePengui@cust-95-80-24-166.csbnet.se)
18:31:19 × andrewchawk quits (~andrewcha@170.52.55.98) (Quit: Leaving)
18:31:45 Cbit joins (~Cbit@2804:880:130e:5700:b184:6405:971d:7d3d)
18:31:49 × bo1 quits (~bo1@2804:880:130e:5700:b184:6405:971d:7d3d) (Quit: Client closed)
18:32:15 × Cbit quits (~Cbit@2804:880:130e:5700:b184:6405:971d:7d3d) (Client Quit)
18:39:05 skyesoss1 joins (~Thunderbi@c-73-208-45-119.hsd1.il.comcast.net)
18:45:17 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
18:46:42 × skyesoss1 quits (~Thunderbi@c-73-208-45-119.hsd1.il.comcast.net) (Quit: skyesoss1)
18:49:00 Ellenor joins (ellenor@callbox.trd.is)
18:54:59 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
19:00:32 × mesaoptimizer quits (~mesaoptim@user/PapuaHardyNet) (Ping timeout: 244 seconds)
19:04:49 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
19:05:08 sawilagar joins (~sawilagar@user/sawilagar)
19:10:10 peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com)
19:12:08 mesaoptimizer joins (~mesaoptim@user/PapuaHardyNet)
19:19:44 × thaumavorio quits (~thaumavor@thaumavor.io) (Quit: ZNC 1.8.2 - https://znc.in)
19:21:00 thaumavorio joins (~thaumavor@thaumavor.io)
19:22:22 raehik joins (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net)
19:25:55 × peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 264 seconds)
19:30:20 kupi joins (uid212005@id-212005.hampstead.irccloud.com)
19:35:39 × alexherbo2 quits (~alexherbo@2a02-8440-3317-c12e-51f5-a487-8417-dd3a.rev.sfr.net) (Remote host closed the connection)
19:47:43 × dans41958 quits (~danse-nr3@user/danse-nr3) (Quit: good night)
19:52:33 L29Ah joins (~L29Ah@wikipedia/L29Ah)
19:56:01 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
20:02:49 ddellacosta joins (~ddellacos@ool-44c73d29.dyn.optonline.net)
20:03:31 falafel joins (~falafel@2a0c:5a87:3104:4c01::aa34)
20:06:19 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
20:09:37 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
20:13:38 × skyesoss quits (~Thunderbi@c-73-208-45-119.hsd1.il.comcast.net) (Quit: skyesoss)
20:19:56 <probie> EvanR: https://hackage.haskell.org/package/file-io
20:21:15 <EvanR> noice
20:24:27 × falafel quits (~falafel@2a0c:5a87:3104:4c01::aa34) (Ping timeout: 276 seconds)
20:27:47 × euphores quits (~SASL_euph@user/euphores) (Quit: Leaving.)
20:28:38 machinedgod joins (~machinedg@d50-99-47-73.abhsia.telus.net)
20:33:05 ubert joins (~Thunderbi@178.165.184.113.wireless.dyn.drei.com)
20:33:06 spew joins (~spew@201.141.102.132)
20:33:23 peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com)
20:33:45 × spew quits (~spew@201.141.102.132) (Client Quit)
20:40:46 × raehik quits (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net) (Ping timeout: 244 seconds)
20:42:15 × peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 252 seconds)
20:43:18 × ubert quits (~Thunderbi@178.165.184.113.wireless.dyn.drei.com) (Ping timeout: 276 seconds)
20:43:41 waleee joins (~waleee@h-176-10-144-38.NA.cust.bahnhof.se)
20:44:01 × hueso quits (~root@user/hueso) (Quit: No Ping reply in 180 seconds.)
20:45:20 hueso joins (~root@user/hueso)
20:45:59 euphores joins (~SASL_euph@user/euphores)
20:48:26 × gioyik quits (~gioyik@gateway/tor-sasl/gioyik) (Quit: WeeChat 4.3.5)
20:56:51 × hueso quits (~root@user/hueso) (Quit: No Ping reply in 180 seconds.)
20:58:00 hueso joins (~root@user/hueso)
20:58:53 L29Ah parts (~L29Ah@wikipedia/L29Ah) ()
21:02:21 × kimiamania quits (~65804703@user/kimiamania) (Quit: PegeLinux)
21:02:44 kimiamania joins (~65804703@user/kimiamania)
21:13:49 ZharMeny` joins (~user@user/ZharMeny)
21:17:19 × ZharMeny quits (~user@user/ZharMeny) (Ping timeout: 260 seconds)
21:18:10 × ddellacosta quits (~ddellacos@ool-44c73d29.dyn.optonline.net) (Ping timeout: 248 seconds)
21:24:49 × michalz quits (~michalz@185.246.207.193) (Remote host closed the connection)
21:40:36 × sord937 quits (~sord937@gateway/tor-sasl/sord937) (Quit: sord937)
21:47:26 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
21:53:16 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
22:05:31 × sawilagar quits (~sawilagar@user/sawilagar) (Ping timeout: 264 seconds)
22:06:29 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
22:28:00 L29Ah joins (~L29Ah@wikipedia/L29Ah)
22:35:51 raehik joins (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net)
22:39:37 dsrt^ joins (dsrt@c-98-242-74-66.hsd1.ga.comcast.net)
22:45:30 JuanDaugherty joins (~juan@user/JuanDaugherty)
22:48:17 × raehik quits (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net) (Ping timeout: 248 seconds)
22:50:45 pavonia joins (~user@user/siracusa)
23:01:26 × JuanDaugherty quits (~juan@user/JuanDaugherty) (Quit: JuanDaugherty)
23:15:48 × oo_miguel quits (~Thunderbi@78.10.207.46) (Ping timeout: 245 seconds)
23:36:44 × machinedgod quits (~machinedg@d50-99-47-73.abhsia.telus.net) (Ping timeout: 260 seconds)
23:38:41 × acidjnk_new3 quits (~acidjnk@p200300d6e72cfb71e8c7be36caf04b72.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
23:47:51 × Tuplanolla quits (~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) (Quit: Leaving.)
23:52:57 × terrorjack4 quits (~terrorjac@static.163.82.63.178.clients.your-server.de) (Quit: The Lounge - https://thelounge.chat)
23:55:03 terrorjack4 joins (~terrorjac@static.163.82.63.178.clients.your-server.de)
23:56:37 × dsrt^ quits (dsrt@c-98-242-74-66.hsd1.ga.comcast.net) (Ping timeout: 248 seconds)
23:56:48 dsrt^ joins (~dsrt@c-98-242-74-66.hsd1.ga.comcast.net)

All times are in UTC on 2024-08-09.