Home liberachat/#haskell: Logs Calendar

Logs on 2026-04-06 (liberachat/#haskell)

00:02:18 Jackneill joins (~Jackneill@2A001110011A2F6C2EAC817956BEEA38.mobile.pool.telekom.hu)
00:06:31 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
00:08:21 × Jackneill quits (~Jackneill@2A001110011A2F6C2EAC817956BEEA38.mobile.pool.telekom.hu) (Remote host closed the connection)
00:11:30 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
00:12:04 × Square quits (~Square@user/square) (Ping timeout: 244 seconds)
00:12:15 × yin quits (~zero@user/zero) (Ping timeout: 265 seconds)
00:13:52 × bitdex_ quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 265 seconds)
00:15:19 × Tuplanolla quits (~Tuplanoll@88-114-89-88.elisa-laajakaista.fi) (Quit: Leaving.)
00:20:39 craunts795335385 joins (~craunts@152.32.99.2)
00:22:19 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
00:29:04 myxos joins (~myxos@67-1-178-42.tcso.qwest.net)
00:29:06 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
00:30:58 yin joins (~zero@user/zero)
00:36:25 × xff0x quits (~xff0x@2405:6580:b080:900:57f:7a23:16bf:5911) (Ping timeout: 248 seconds)
00:40:21 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
00:45:19 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
00:56:08 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
01:01:04 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 256 seconds)
01:07:57 × arandombit quits (~arandombi@user/arandombit) (Remote host closed the connection)
01:11:55 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
01:17:07 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
01:25:25 haritz joins (~hrtz@2a01:4b00:bc2e:7000:d5af:a266:ca31:5ef8)
01:25:25 × haritz quits (~hrtz@2a01:4b00:bc2e:7000:d5af:a266:ca31:5ef8) (Changing host)
01:25:25 haritz joins (~hrtz@user/haritz)
01:27:42 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
01:31:18 xff0x joins (~xff0x@fsb6a9491c.tkyc517.ap.nuro.jp)
01:32:42 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 255 seconds)
01:34:41 × Googulator quits (~Googulato@2a01-036d-0106-496b-154a-c7fc-9f43-bd2d.pool6.digikabel.hu) (Quit: Client closed)
01:34:58 Googulator joins (~Googulato@2a01-036d-0106-496b-154a-c7fc-9f43-bd2d.pool6.digikabel.hu)
01:39:14 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
01:44:43 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
01:55:01 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
02:00:34 × humasect quits (~humasect@dyn-192-249-132-90.nexicom.net) (Quit: Leaving...)
02:01:05 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds)
02:12:05 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
02:12:56 jmcantrell_ joins (~weechat@user/jmcantrell)
02:14:02 notzmv joins (~umar@user/notzmv)
02:19:04 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 268 seconds)
02:21:32 × jmcantrell_ quits (~weechat@user/jmcantrell) (Ping timeout: 268 seconds)
02:30:06 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
02:30:56 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
02:34:58 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
02:45:54 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
02:46:57 × machinedgod quits (~machinedg@d172-219-48-230.abhsia.telus.net) (Ping timeout: 255 seconds)
02:56:23 humasect joins (~humasect@dyn-192-249-132-90.nexicom.net)
03:11:29 × notzmv quits (~umar@user/notzmv) (Ping timeout: 268 seconds)
03:18:28 × rekahsoft quits (~rekahsoft@76.67.111.168) (Remote host closed the connection)
03:22:47 jmcantrell_ joins (~weechat@user/jmcantrell)
03:32:50 Pozyomka joins (~pyon@user/pyon)
03:39:59 × somemathguy quits (~somemathg@user/somemathguy) (Quit: WeeChat 4.1.1)
03:48:27 × Pozyomka quits (~pyon@user/pyon) (Quit: bbml)
03:54:45 × chromoblob quits (~chromoblo@user/chromob1ot1c) (Ping timeout: 244 seconds)
03:54:55 chromoblob joins (~chromoblo@user/chromob1ot1c)
04:05:42 peterbecich joins (~Thunderbi@71.84.33.135)
04:29:30 Googulator55 joins (~Googulato@2a01-036d-0106-496b-154a-c7fc-9f43-bd2d.pool6.digikabel.hu)
04:29:35 × Googulator quits (~Googulato@2a01-036d-0106-496b-154a-c7fc-9f43-bd2d.pool6.digikabel.hu) (Quit: Client closed)
04:30:20 Googulator55 is now known as Googulator
04:43:21 × danso_o quits (~danso@user/danso) (Quit: quittin time)
04:45:55 danso joins (~danso@user/danso)
04:56:56 × itaipu quits (~itaipu@168.121.97.28) (Ping timeout: 268 seconds)
04:57:16 × haritz quits (~hrtz@user/haritz) (Ping timeout: 244 seconds)
04:57:39 itaipu joins (~itaipu@168.121.97.28)
04:57:42 haritz joins (~hrtz@2a01:4b00:bc2e:7000:d5af:a266:ca31:5ef8)
04:57:42 × haritz quits (~hrtz@2a01:4b00:bc2e:7000:d5af:a266:ca31:5ef8) (Changing host)
04:57:42 haritz joins (~hrtz@user/haritz)
05:11:15 takuan joins (~takuan@d8D86B9E9.access.telenet.be)
05:16:16 × jmcantrell_ quits (~weechat@user/jmcantrell) (Ping timeout: 265 seconds)
05:17:58 jmcantrell_ joins (~weechat@user/jmcantrell)
05:20:00 × synchromesh quits (~john@2406:5a00:2412:2c00:14d5:f3ab:108b:4dd9) (Read error: Connection reset by peer)
05:20:30 synchromesh joins (~john@2406:5a00:2412:2c00:75ab:7cb0:db12:1e18)
05:26:15 × jmcantrell_ quits (~weechat@user/jmcantrell) (Ping timeout: 255 seconds)
05:43:50 × traxex quits (traxex@user/traxex) (Ping timeout: 256 seconds)
05:53:07 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
06:04:02 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
06:09:35 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 272 seconds)
06:10:44 dumbass808 joins (~dumbass80@user/dumbass808)
06:15:31 × haritz quits (~hrtz@user/haritz) (Quit: ZNC 1.8.2+deb3.1+deb12u1 - https://znc.in)
06:19:48 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
06:25:05 × arkeet quits (arkeet@moriya.ca) (Quit: ZNC 1.10.1 - https://znc.in)
06:25:31 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
06:26:52 × ChaiTRex quits (~ChaiTRex@user/chaitrex) (Remote host closed the connection)
06:27:15 ChaiTRex joins (~ChaiTRex@user/chaitrex)
06:27:21 arkeet joins (arkeet@moriya.ca)
06:31:18 tromp joins (~textual@2001:1c00:340e:2700:795f:6a6f:7cb5:ecd6)
06:35:50 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
06:39:46 × califax quits (~califax@user/califx) (Remote host closed the connection)
06:41:45 califax joins (~califax@user/califx)
06:45:15 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds)
06:48:06 × peterbecich quits (~Thunderbi@71.84.33.135) (Ping timeout: 265 seconds)
06:52:00 × dumbass808 quits (~dumbass80@user/dumbass808) (K-Lined)
06:56:00 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
07:03:19 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
07:08:57 Pozyomka joins (~pyon@user/pyon)
07:09:38 CiaoSen joins (~Jura@p549cb690.dip0.t-ipconnect.de)
07:11:56 × Pozyomka quits (~pyon@user/pyon) (Client Quit)
07:12:44 <gentauro> monochrom: «Maybe after AI hype, only rich people still know how to think? >:)» DING DING DING, and we have a winner ;)
07:14:02 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
07:14:32 <gentauro> if you HAVE to use these "parrots", opt for the ones that are "local first" (no leaking of IP nor private data) such as https://prismml.com/ and https://www.forbes.com/sites/jonmarkman/2026/04/02/prismml-introduces-the-first-commercially-viable-1-bit-llm/
07:16:48 gentauro and ensure to use "agentic" tools that don't leak as well https://infosec.exchange/@k3ym0/116161635202253362
07:19:11 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
07:24:10 × Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
07:30:05 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
07:34:57 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 255 seconds)
07:41:16 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
07:46:12 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 255 seconds)
07:55:38 × tromp quits (~textual@2001:1c00:340e:2700:795f:6a6f:7cb5:ecd6) (Quit: My iMac has gone to sleep. ZZZzzz…)
07:56:02 × chromoblob quits (~chromoblo@user/chromob1ot1c) (Read error: Connection reset by peer)
07:56:51 chromoblob joins (~chromoblo@user/chromob1ot1c)
07:57:03 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
07:57:41 <haskellbridge> <sm> thanks for the links
07:58:11 Pozyomka joins (~pyon@user/pyon)
07:58:31 <gentauro> sm: u welcome :)
07:58:31 × rainbyte quits (~rainbyte@181.47.219.3) (Read error: Connection reset by peer)
07:59:15 <gentauro> The PrismML peeps (CalTech prof + PhD's in Mathematics) seem like "the real deal" :o
08:00:10 rainbyte joins (~rainbyte@181.47.219.3)
08:00:12 <haskellbridge> <sm> sounds impressive
08:00:52 <haskellbridge> <sm> do you think that fingerprinting toot applies to non-browser tools (claude code etc) ?
08:02:06 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 256 seconds)
08:02:16 <gentauro> sm: yeah, they are the worst. Until recently, we had no clue what's was going on behind the scenes with claude
08:03:00 <haskellbridge> <sm> I should look check what Little Snitch is allowing from it
08:03:25 <gentauro> I guess with opencode and codex, you can at least see the source code. However, as soon as you add "skills" you are doomed
08:03:58 <haskellbridge> <sm> why's that ? Aren't skills just lazily-loaded custom prompts you define ?
08:06:00 × olivial quits (~benjaminl@user/benjaminl) (Ping timeout: 246 seconds)
08:06:04 <gentauro> sm: yes, but they are dynamic (hello malware). I can highly recommend watching this talk from Mike Perry (the "TOR dude") from 39c3 (I was lucky to see it live in Hamborg): https://media.ccc.de/v/39c3-a-quick-stop-at-the-hostileshop
08:06:38 gentauro tl;dw he just shows how he can bypass OpenAI restricting policies by using diff text encodings. And there is nothing they can do about now, nor in the future
08:12:11 <haskellbridge> <sm> TIL about https://mistral.ai (french LLM, much less commercial surveillance)
08:12:49 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
08:13:19 <haskellbridge> <sm> ah, hello there merijn
08:15:24 <gentauro> Mistral? Is that the new startup from Yann Lecunn?
08:15:51 <haskellbridge> <sm> https://en.wikipedia.org/wiki/Mistral_AI
08:16:39 olivial joins (~benjaminl@user/benjaminl)
08:17:23 <gentauro> sm: jaiks, the "investors" :|
08:17:34 <gentauro> why is the EU always sleeping?
08:18:15 <haskellbridge> <sm> they're tired from partying all night
08:18:17 wickedjargon joins (~user@2605:8d80:5430:634b:398a:72e0:e553:68f6)
08:19:21 <gentauro> sm: this is me partying all night https://en.wikipedia.org/wiki/Le_Chat_(AI) <- "Excuse mua. Can you please serve me another le beer?" (I'm very good at french around 01:00 - 03:00 AM)
08:19:53 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
08:25:33 × wickedjargon quits (~user@2605:8d80:5430:634b:398a:72e0:e553:68f6) (Remote host closed the connection)
08:26:24 wickedjargon joins (~user@2605:8d80:5430:634b:398a:72e0:e553:68f6)
08:31:03 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
08:31:41 × CiaoSen quits (~Jura@p549cb690.dip0.t-ipconnect.de) (Read error: Connection reset by peer)
08:31:56 CiaoSen joins (~Jura@p549cb690.dip0.t-ipconnect.de)
08:33:25 Tuplanolla joins (~Tuplanoll@88-114-89-88.elisa-laajakaista.fi)
08:37:49 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 265 seconds)
08:38:07 Guest62 joins (~Guest62@p200300ca8f13d0000071be933609493f.dip0.t-ipconnect.de)
08:42:35 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
08:47:34 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 268 seconds)
08:54:42 karenw joins (~karenw@user/karenw)
08:58:22 merijn joins (~merijn@62.45.136.136)
08:58:44 × mud quits (~mud@user/kadoban) (Read error: Connection reset by peer)
08:58:49 × tolt quits (~weechat-h@li219-154.members.linode.com) (Ping timeout: 248 seconds)
08:59:03 mud joins (~mud@user/kadoban)
08:59:15 tolt joins (~weechat-h@li219-154.members.linode.com)
09:00:25 × pavonia quits (~user@user/siracusa) (Ping timeout: 248 seconds)
09:00:55 pavonia joins (~user@user/siracusa)
09:02:10 × z-b quits (jobnbg@bot.kapsi.fi) (Ping timeout: 256 seconds)
09:03:19 × merijn quits (~merijn@62.45.136.136) (Ping timeout: 276 seconds)
09:05:13 × haskellbridge quits (~hackager@96.28.224.214) (Ping timeout: 248 seconds)
09:05:20 × socksbuny quits (~socks@oberon.raccoon.fun) (Ping timeout: 252 seconds)
09:05:46 × Hecate quits (~mariposa@user/hecate) (Read error: Connection reset by peer)
09:06:01 socksbuny joins (~socks@oberon.raccoon.fun)
09:06:15 haskellbridge joins (~hackager@96.28.224.214)
09:06:15 ChanServ sets mode +v haskellbridge
09:06:39 Hecate joins (~mariposa@user/hecate)
09:07:16 × tdammers quits (~tdammers@1-133-178-143.ftth.glasoperator.nl) (Ping timeout: 256 seconds)
09:07:20 zb joins (jobnbg@bot.kapsi.fi)
09:07:40 tdammers joins (~tdammers@1-133-178-143.ftth.glasoperator.nl)
09:13:51 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
09:19:14 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
09:27:05 × ChaiTRex quits (~ChaiTRex@user/chaitrex) (Remote host closed the connection)
09:27:30 ChaiTRex joins (~ChaiTRex@user/chaitrex)
09:28:23 <TMA> gentauro: I attribute some of the EU sleepiness to the finality of failure. If you start a business in EU and fail, you are forever a "bancrotee". It is not a "business experience" but "business ineptitude". And then there is the chance that the state will just nationalize your business.
09:29:53 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
09:31:07 × synchromesh quits (~john@2406:5a00:2412:2c00:75ab:7cb0:db12:1e18) (Read error: Connection reset by peer)
09:32:19 synchromesh joins (~john@2406:5a00:2412:2c00:75ab:7cb0:db12:1e18)
09:33:11 <TMA> if Donald Trump was an European, he would never recover from his first bankruptcy. Having six of them and still be considered successful by some is inconceivable
09:33:25 <gentauro> TMA: where do you live in the EU? At least in Denmark, they try as much as possible to "get rid" of public institutions (privatization). However, from time to time, when a (needed) business go wacko, they just "buy it back" (it's us who pay taxes that do it) -> https://fm.dk/nyheder/nyhedsarkiv/2025/september/statens-koeb-af-koebenhavns-lufthavne-as-er-nu-gennemfoert/ (run through Google Translate)
09:33:48 gentauro I mean, CPH can NOT live without an international airport, so I guess it's okay'ish
09:35:25 <gentauro> TMA: that is not correct. If you create a business, and you don't put up money to either create limited liability or joint stock companies, you are somehow asking for it yourself
09:35:25 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 272 seconds)
09:35:51 gentauro with those companies, you are only liable for the amount of capital you inyected into them
09:36:16 <gentauro> maybe this is a topic for #haskell-offtop?
09:38:24 <TMA> gentauro: of course, you protect your other assets. But the effect I speak of is social. If "your" company went under, noone would do business with any company you are associated with, because of the stigma your person carries. And yes, it is an offtopic stuff. I'll STFU.
09:38:40 × wickedjargon quits (~user@2605:8d80:5430:634b:398a:72e0:e553:68f6) (Read error: Connection reset by peer)
09:38:56 wickedjargon joins (~user@2605:8d80:5430:634b:398a:72e0:e553:68f6)
09:39:35 × humasect quits (~humasect@dyn-192-249-132-90.nexicom.net) (Remote host closed the connection)
09:43:18 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
09:46:01 <gentauro> TMA: fair point. I don't think you should stop writing. I normally get called out myself with the off-topic when it's not Haskell related ;) (it's just informative)
09:46:31 × werneta_ quits (~werneta@71.83.160.242) (Ping timeout: 264 seconds)
09:47:16 werneta joins (~werneta@71.83.160.242)
09:48:04 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 256 seconds)
09:49:27 __monty__ joins (~toonn@user/toonn)
09:53:50 × wickedjargon quits (~user@2605:8d80:5430:634b:398a:72e0:e553:68f6) (Remote host closed the connection)
09:54:25 <TMA> gentauro: Duly noted. I get called out often enough to be rattled only if the person starting the offtopic flame does the calling while simultaneously pretending they were not involved and threatening flame participants.
09:58:17 tromp joins (~textual@2001:1c00:340e:2700:795f:6a6f:7cb5:ecd6)
09:59:21 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
10:04:31 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
10:06:30 × jessicara quits (~shirogits@user/meow/jessicara) (Ping timeout: 268 seconds)
10:07:01 traxex joins (traxex@user/traxex)
10:08:21 × CiaoSen quits (~Jura@p549cb690.dip0.t-ipconnect.de) (Ping timeout: 268 seconds)
10:13:39 × ChaiTRex quits (~ChaiTRex@user/chaitrex) (Remote host closed the connection)
10:13:44 Chai-T-Rex joins (~ChaiTRex@user/chaitrex)
10:14:57 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
10:16:57 × xff0x quits (~xff0x@fsb6a9491c.tkyc517.ap.nuro.jp) (Ping timeout: 255 seconds)
10:21:55 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
10:26:26 Pixi` joins (~Pixi@user/pixi)
10:29:07 × Pixi quits (~Pixi@user/pixi) (Ping timeout: 264 seconds)
10:29:16 fp` joins (~user@2001-14ba-6e24-3000--198.rev.dnainternet.fi)
10:32:59 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
10:33:05 <fp`> Hey, I tried to create my own implementation of putStr using foldl, but it only prints the last character of the string. Is this because the accumulator never changes value, so ghc optimizes to only run my function on the last value of the [Char]?
10:33:10 <fp`> putStr' str = foldl (\acc c -> putChar c) (return ()) str
10:34:04 <ski> you're not using `acc'
10:34:31 <ski> so you're discarding all `c's but the last one
10:34:44 <ski> you need to use `>>' (or `do'-notation)
10:34:51 <ski> (or `>>=')
10:35:33 <ski> however, i would suggest using `foldr' (or `foldM', perhaps)
10:36:15 <ski> fp` : perhaps i could show an example, to make you understand what happens, above
10:36:39 <ski> putStr' ['a','b','c']
10:36:54 <ski> = foldl (\acc c -> putChar c) (return ()) ['a','b','c']
10:37:08 <ski> = foldl (\acc c -> putChar c) (putChar 'a') ['b','c']
10:37:15 <ski> = foldl (\acc c -> putChar c) (putChar 'b') ['c']
10:37:19 <ski> = foldl (\acc c -> putChar c) (putChar 'c') []
10:37:26 <ski> = putChar 'c'
10:37:45 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds)
10:37:46 <fp`> Mm I see
10:37:53 <ski> and then, only at this point, when `foldl' returns, do we actually start to execute the IO-action : putChar 'c'
10:38:32 <ski> so, you need to combine `acc' with the `putChar' call
10:38:52 <ski> otherwise you're just throwing away the old value of the accumulator, each time
10:40:18 <fp`> Why isn't putChar 'a' evaluated? Is this due to some laziness in evaluation?
10:40:39 <ski> it is evaluated (at the end, after `foldl' returns). and after that, it is executed
10:42:20 <ski> (but `IO'-actions (in this case, the `putChar' call has type `IO ()') are of an abstract data type, can't really be printed, so i just left the evaluation trace above at showing the `putChar' call)
10:42:52 <probie> fp`: Because `putChar 'a'` doesn't do anything until it's "evaluated" in the IO monad
10:43:03 <ski> until it's *executed*
10:43:09 <probie> > [putChar 'a', putChar 'b', putChar 'c'] !! 1
10:43:10 <lambdabot> <IO ()>
10:43:26 <probie> % [putChar 'a', putChar 'b', putChar 'c'] !! 1
10:43:26 <yahb2> b
10:43:30 <ski> evaluation of `IO'-actions only determine *which* action to (later, if at all) to perform. it doesn't actually perform/execute/do the action
10:44:18 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
10:44:43 <ski> the only two ways to *execute* (not evaluate) an `IO'-action is to (a) make it the value of `main' (or a part of that value); or (b) enter it into the interactor (like e.g. GHCi, or in this case the yahb2 bot)
10:48:08 <fp`> Mm so the way to make this folding impl of putStr would be to produce a queue of IO actions
10:48:19 <ski> (of course, only if your `IO'-action is a part of a branch of execution that's activated in `main' will it be executed)
10:48:30 <ski> yes, basically
10:48:53 <ski> but that "queue" can just be a single, compound, `IO'-action, that contains all the `putChar' calls, in sequence
10:49:02 <ski> and the `>>' operator is good for this
10:49:13 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
10:49:15 <ski> % putChar 'a' >> putChar 'b'
10:49:15 <yahb2> ab
10:49:20 <ski> @type putChar 'a' >> putChar 'b'
10:49:21 <lambdabot> IO ()
10:49:45 <ski> that is a single compound action, that performs those two sub-actions, in that order, when it is executed
10:50:01 × TimWolla quits (~timwolla@2a01:4f8:150:6153:beef::6667) (Quit: Bye)
10:50:40 <ski> so, try combining your `putChar c' with the `acc' action (representing everything you're planning to do with all the previous `Char'acters you've seen, so far, in the list), combining them with the `>>' operator
10:50:51 <ski> you could also use `do', if you prefer
10:50:59 <ski> % do putChar 'a'; putChar 'b'
10:50:59 <yahb2> ab
10:56:48 <fp`> Ok yeah I was able to come up with this after perusing the docs of IO, so the lambda should be (\acc c -> acc >> putChar c)
10:57:40 <fp`> And I guess if I wanted to make putStrLn', I'd just initialize the acc to putChar '\n'
10:58:18 TimWolla joins (~timwolla@2a01:4f8:150:6153:beef::6667)
10:59:03 <ski> yes, that's correct
10:59:11 <ski> now, try to use `foldr' rather than `foldl'
10:59:26 <ski> "I'd just initialize the acc to putChar '\n'" -- no
10:59:32 <ski> that would give you
10:59:51 <ski> putChar '\n' >> putChar 'a' >> putChar 'b' >> putChar 'c'
10:59:56 <fp`> Ah yeah
11:00:05 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
11:02:03 <fp`> But why foldr? My understanding is that one uses foldr for its laziness, which benefits for infinitely long lists, but surely people don't want to print infinitely long strings
11:02:31 × fun-safe-math quits (~fun-safe-@97.115.234.213) ()
11:02:40 <ski> using `foldr', you can do `putStr' in constant space. with `foldl', it's not constant space
11:03:39 <ski> this is because `foldr' can be incremental (depending on the callback you pass it), can return parts of the result, piecemeal, so that you can start executing sub-actions, before you've determined all the sub-actions
11:04:26 <ski> with `foldl', it *always* executes to the end (reaching the end of the list), before providing any result back to its caller. it's "bulky". so you can't start performing `IO'-sub-actions here, until you've seen the whole list
11:04:42 fun-safe-math joins (~fun-safe-@97.115.234.213)
11:04:53 <ski> let's assume you defined
11:05:05 <ski> putStr' str = foldl (\acc c -> acc >> putChar c) (return ()) str
11:05:21 <ski> then the evaluation trace looks like
11:05:21 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 272 seconds)
11:05:27 <ski> putStr' ['a','b','c']
11:05:44 <ski> = foldl (\acc c -> acc >> putChar c) (return ()) ['a','b','c']
11:05:54 <ski> = foldl (\acc c -> acc >> putChar c) (return () >> putChar 'a') ['b','c']
11:06:02 <ski> = foldl (\acc c -> acc >> putChar c) (return () >> putChar 'a' >> putChar 'b') ['c']
11:06:09 <ski> = foldl (\acc c -> acc >> putChar c) (return () >> putChar 'a' >> putChar 'b' >> putChar 'c') []
11:06:15 <ski> = return () >> putChar 'a' >> putChar 'b' >> putChar 'c'
11:06:30 <ski> and only at this point can we start performing, executing, the `putChar' actions
11:07:02 <ski> so, you can see that the accumulator keeps growing, as `foldl' continues looping through the list, requiring more and more space to be allocated
11:09:03 <gentauro> ski: what's the name of the `>>` operator? https://hackage-content.haskell.org/package/base-4.22.0.0/docs/Prelude.html#v:-62--62-
11:09:08 <ski> "then"
11:09:12 <gentauro> (Y)
11:09:22 <ski> and `>>=' is "bind"
11:09:53 <fp`> But why would foldr be better? Since I'm iterating through the list backward, I can't even start thinking about IO actions until I know what the first thing to print is
11:10:20 <ski> if you define the `foldr' version, i can then explain why it's better here
11:10:41 <ski> (a direct recursion would also be fine)
11:12:19 <fp`> (\c acc -> putChar c >> acc)
11:13:07 <fp`> or foldr (\c acc -> putChar c >> acc) (return ()) "abc"
11:14:22 <ski> ok, so here's what happens
11:14:43 <ski> foldr (\c acc -> putChar c >> acc) (return ()) ['a','b','c']
11:14:54 <ski> = putChar 'a' >> foldr (\c acc -> putChar c >> acc) (return ()) ['b','c']
11:15:53 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
11:16:20 <ski> { at this point, `main' / the interactor sees that the action is an `>>'-action, with first sub-action being putChar 'a' so it performs that part now, and then tries to perform the second one, which triggers the evaluation of it, so that `foldr' continunes one more step. i'll show putChar 'a' still as part of the result value (action), but remember that it has already happened now}
11:16:34 <ski> = putChar 'a' >> putChar 'b' >> foldr (\c acc -> putChar c >> acc) (return ()) [c']
11:16:53 <ski> { at this point, the putChar 'b' part is executed }
11:17:04 <ski> = putChar 'a' >> putChar 'b' >> putChar 'c' >> foldr (\c acc -> putChar c >> acc) (return ()) []
11:17:15 <ski> { and now the putChar 'c' happens }
11:17:24 <ski> = putChar 'a' >> putChar 'b' >> putChar 'c' >> return ()
11:17:41 <ski> { and now the return () which does nothing }
11:18:08 <fp`> Mm so it's not actually iterating from the right
11:18:31 <ski> do note that, as soon as the putChar 'a' has been executed, we don't need to keep memory around for it (although i showed it still in all the remaining lines above, for clarity), so we can discard that memory, and similarly for the other actions, so therefore we run in constant space
11:18:37 <ski> exactly
11:20:07 × __monty__ quits (~toonn@user/toonn) (Ping timeout: 244 seconds)
11:20:16 <ski> btw, do note that if you defined
11:20:26 <ski> putStr' [ ] = return ()
11:20:44 <ski> putStr' (c:cs) = putChar c >> putStr' cs
11:20:51 <ski> or, if you prefer
11:20:54 <ski> putStr' (c:cs) = do putChar c; putStr' cs
11:20:59 <ski> for the last defining equation
11:21:11 <ski> then basically the same thing would happen, as in the `foldr' version
11:21:38 <ski> (this is the "direct recursive" version)
11:22:03 __monty__ joins (~toonn@user/toonn)
11:22:33 xff0x joins (~xff0x@2405:6580:b080:900:388f:e7ec:f5bb:9bd0)
11:22:39 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 255 seconds)
11:25:25 <ski> both `foldl' and `foldr' start "from the left". what differs is the way it "associates" the callback (to the left, like `((z - a) - b) - c', for `foldl (-) z [a,b,c]', vs. to the right, like `a - (b - (c - z))', for `foldr (-) z [a,b,c]'). `foldl' keeps adding to, growing, the accumulator, while `foldr' wraps its recursive calls inside calls to the callback
11:25:39 <ski> > foldl f z [a,b,c] :: Expr
11:25:40 <lambdabot> f (f (f z a) b) c
11:25:42 <ski> > foldr f z [a,b,c] :: Expr
11:25:44 <lambdabot> f a (f b (f c z))
11:26:25 <ski> `foldr' hands over control to the callback, and lets it decide if and when to continue with the `foldr' recursive call (being the second parameter passed to the callback)
11:26:50 <ski> `foldl' keeps control, until it reaches the end of the list
11:28:21 <ski> > foldr (||) False (map (> 10) [0 ..]) -- this hands over control to `||', which decides whether to continye with the next recursive `foldr' call or not
11:28:22 <lambdabot> True
11:28:41 <fp`> So foldr looks something like this (with an additional boundary condition)
11:28:42 <fp`> foldr f acc x:xs = (f x acc) : (foldr f acc xs)
11:29:38 <fp`> and the short-circuiting logic is down to... the implementor of (||)? Or ghc? Or is there even a runtime component?
11:33:26 × tromp quits (~textual@2001:1c00:340e:2700:795f:6a6f:7cb5:ecd6) (Quit: My iMac has gone to sleep. ZZZzzz…)
11:33:41 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
11:33:44 <ski> not quite that
11:33:54 <ski> there is no `:' is the result of `foldr'
11:34:22 <ski> but yes, the implementor of `||' (or whichever callback you're using)
11:34:26 <ski> @src (||)
11:34:27 <lambdabot> True || _ = True
11:34:27 <lambdabot> False || x = x
11:34:43 <ski> that short-circuits, does not evaluate the right parameter, in case the left is `True'
11:39:03 <fp`> So the `_' is what causes the short circuiting?
11:39:19 <ski> the short-circuiting is not built-in, is just a consequence of how `||' is defined, and how lazy evaluation works
11:39:24 <ski> yes, in this case
11:39:27 <ski> but if it had said
11:39:33 <ski> True || x = True
11:39:42 <ski> it would also have ignored `x', still short-circuiting
11:40:03 <ski> what matters is whether the parameter is used/demanded/forced, not really whether it's named
11:40:34 <fp`> I see
11:40:45 <ski> of course, if it's not named, then you're not forcing it (unless you use a strictness annotation, e.g. `!_'), so it's not forced unless someone else is forcing it, elsewhere
11:41:43 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
11:41:46 <ski> (you could pass the same list to two different places. one might use `_' (not forcing), while the other might force it, naming)
11:44:28 × TimWolla quits (~timwolla@2a01:4f8:150:6153:beef::6667) (Quit: Bye)
11:45:08 <fp`> Also, where does lambdabot's Expr type come from? That would be quite useful to me
11:45:16 <ski> @src any
11:45:16 <lambdabot> any p = or . map p
11:45:17 <ski> @src or
11:45:17 <lambdabot> or = foldr (||) False
11:45:27 merijn joins (~merijn@62.45.136.136)
11:45:32 <ski> so, the example above is the same as `any (> 10) [0 ..]'
11:47:09 <ski> @hackage simple-reflect
11:47:09 <lambdabot> https://hackage.haskell.org/package/simple-reflect
11:47:12 <ski> fp` ^
11:50:54 <fp`> Cool. Thank you so much for all the help!
11:51:36 <ski> np
11:52:09 × merijn quits (~merijn@62.45.136.136) (Ping timeout: 248 seconds)
11:57:16 TimWolla joins (~timwolla@2a01:4f8:150:6153:beef::6667)
12:01:21 × craunts795335385 quits (~craunts@152.32.99.2) (Quit: The Lounge - https://thelounge.chat)
12:02:34 × TimWolla quits (~timwolla@2a01:4f8:150:6153:beef::6667) (Remote host closed the connection)
12:03:21 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
12:08:29 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
12:08:48 TimWolla joins (~timwolla@2a01:4f8:150:6153:beef::6667)
12:10:08 raelie joins (~raelie@user/raelie)
12:13:33 craunts795335385 joins (~craunts@152.32.99.2)
12:14:46 × Pozyomka quits (~pyon@user/pyon) (Quit: brb)
12:19:08 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
12:24:01 × m quits (~travltux@user/travltux) (Quit: WeeChat 4.7.2)
12:24:28 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 256 seconds)
12:26:35 m2 joins (~travltux@user/travltux)
12:35:11 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
12:39:43 Pozyomka joins (~pyon@user/pyon)
12:40:10 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds)
12:40:31 × chromoblob quits (~chromoblo@user/chromob1ot1c) (Ping timeout: 264 seconds)
12:43:56 sonny joins (~sonny@bras-base-london140cw-grc-17-142-113-177-150.dsl.bell.ca)
12:44:37 Pixi` is now known as Pixi
12:44:51 × rainbyte quits (~rainbyte@181.47.219.3) (Read error: Connection reset by peer)
12:45:42 rainbyte joins (~rainbyte@181.47.219.3)
12:46:20 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
12:47:30 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Excess Flood)
12:48:53 Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915)
12:50:25 tromp joins (~textual@2001:1c00:340e:2700:8cf8:7bb7:a0e:7cfa)
12:51:30 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
12:59:08 × oats quits (~oats@user/oats) (Read error: Connection reset by peer)
12:59:22 oats joins (~oats@user/oats)
13:02:09 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
13:05:30 <fp`> So in the sense that `putChar 'c'` is evaluated to <IO action> and that is eventually executed to produce a 'c' in the tty, who does the executing? Is this a metaphor for how GHC produces code, or is there a runtime that is literally turning IO actions into syscalls?
13:06:26 × tromp quits (~textual@2001:1c00:340e:2700:8cf8:7bb7:a0e:7cfa) (Quit: My iMac has gone to sleep. ZZZzzz…)
13:07:31 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
13:11:30 <probie> fp`: Something of type `IO a` is modelled by GHC as function from the current state of the universe, to a pair containing the new state of the universe, and a value of type `a`. As part of generating this "new state of the universe", IO actions happen
13:14:37 <probie> e.g. something of type `Char -> IO ()` is really `Char -> Universe -> ((), Universe)`, and the interface of the IO monad prevents you from using that `Universe` twice. In reality it's actually `Char -> State# RealWorld -> (# State# RealWorld, a #)`
13:16:44 <probie> `State# RealWorld` is a special 0-bit type that's just a token (since you can't actually pass the universe around), and the `(# ..., ... #)` is an "unboxed tuple", which you can think of as a strict tuple with no runtime overhead
13:17:51 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
13:23:17 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
13:25:01 Square2 joins (~Square@user/square)
13:25:04 <ski> fp` : yes, you can think of it as a run-time that interprets the `IO'-action values, actually performing them
13:25:52 <ski> (for efficiency, it does get compiled, by GHC, to code that directly performs the indicated actions, rather than interpreting data structures)
13:26:31 <ski> if you want to, you could imagine a data type something like
13:26:56 <ski> data MyIO :: * -> *
13:26:58 <ski> where
13:27:04 <ski> Return :: a -> MyIO a
13:27:17 <ski> Bind :: MyIO a -> (a -> MyIO b) -> MyIO b
13:27:38 <ski> OpenFile :: FilePath -> IOMode -> MyIO Handle
13:27:51 <ski> hGetChar :: Handle -> MyIO Char
13:28:03 <ski> HPutChar :: Handle -> Char -> MyIO ()
13:28:05 <ski> ...
13:28:07 <ski> and so on
13:28:30 <ski> you could write an interpreter, `runMyIO :: MyIO a -> IO a', for this
13:28:41 <ski> (er, s/hGetChar/HGetChar/)
13:29:08 × terrorjack quits (~terrorjac@2a01:4f8:271:2d98::2) (Quit: The Lounge - https://thelounge.chat)
13:29:10 × sonny quits (~sonny@bras-base-london140cw-grc-17-142-113-177-150.dsl.bell.ca) (Quit: Client closed)
13:29:55 <ski> btw, before monadic I/O was introduces in Haskell, there was a "dialogue"-style I/O, where you defined
13:29:59 <ski> main :: Dialogue
13:30:00 <ski> where
13:30:13 <ski> type Dialogue = [Responses] -> [Requests]
13:31:09 <ski> iowy, you write a function which returns a lazy list of I/O requests, and then (after generating the current request), you look at the current response
13:31:18 <ski> something like
13:32:07 somemathguy joins (~somemathg@user/somemathguy)
13:32:22 <ski> data Request = OpenFile FilePath IOMode | HGetChar Handle | HPutChar Handle Char | ...
13:32:58 <ski> data Response = FileOpened Handle | HCharGot Char | HCharPut | ...
13:33:03 × Pozyomka quits (~pyon@user/pyon) (Quit: bbml)
13:33:17 terrorjack joins (~terrorjac@static.27.101.55.162.clients.your-server.de)
13:33:28 <ski> and then you can define helper functions like
13:33:46 <ski> hPutChar :: Handle -> Char -> Dialogue -> Dialogue
13:33:53 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
13:34:57 <ski> hPutChar h c cont resps0 = HPutChar h c : case resps0 of HCharPut:resps -> cont resps
13:35:00 <ski> and
13:35:12 <ski> hGetChar :: Handle -> (Char -> Dialogue) -> Dialogue
13:35:45 <ski> hGetChar h c_cont resps0 = HGetChar h : case resps0 of HCharGot c:resps -> c_cont c resps
13:37:16 <ski> where you pass a "continuation" dialogue for what to do (which will generate the remaining requests and process the corresponding responses), after the character you've outputted, or inputted
13:40:04 <ski> in this case, there'd be a thin run-time driver, which inspects the requests from the dialogue, performs it, and then generates the corresponding response for the dialogue to receive
13:40:35 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds)
13:40:50 × synchromesh quits (~john@2406:5a00:2412:2c00:75ab:7cb0:db12:1e18) (Read error: Connection reset by peer)
13:41:03 <ski> (btw, this `(Char -> Dialogue) -> Dialogue' can be expressed as a "continuation monad", `Cont Dialogue Char', and similarly `Cont Dialogue ()' for the output case)
13:41:13 <ski> @unmtl Cont Dialogue Char
13:41:13 <lambdabot> (Char -> Dialogue) -> Dialogue
13:41:32 <ski> @src Cont
13:41:32 <lambdabot> newtype Cont r a = Cont { runCont :: (a -> r) -> r }
13:42:09 synchromesh joins (~john@2406:5a00:2412:2c00:75ab:7cb0:db12:1e18)
13:47:21 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
13:48:49 tromp joins (~textual@2001:1c00:340e:2700:8cf8:7bb7:a0e:7cfa)
13:52:30 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 255 seconds)
13:55:59 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "")
13:56:03 <TMA> my understanding of I/O in Haskell stopped with threading RealWorld through everything
14:03:08 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
14:08:09 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
14:18:55 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
14:20:25 × traxex quits (traxex@user/traxex) (Ping timeout: 272 seconds)
14:24:02 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 256 seconds)
14:30:37 × somemathguy quits (~somemathg@user/somemathguy) (Quit: WeeChat 4.1.1)
14:33:07 <EvanR> my understanding of I/O started when threading RealWorld stopped xD
14:34:44 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
14:39:55 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
14:40:35 <EvanR> RealWorld and [Response] -> [Request] both seems like dead ends in IO enlightenment
14:45:20 chromoblob joins (~chromoblo@user/chromob1ot1c)
14:48:20 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
14:51:32 puke joins (~puke@user/puke)
14:53:40 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 276 seconds)
14:55:22 <ski> they're stepping stones
14:57:17 <TMA> EvanR: my understanding now is: haskell has no I/O. it has IO instead and that's dark magic I don't want to touch
15:04:08 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
15:08:57 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
15:10:52 jmcantrell_ joins (~weechat@user/jmcantrell)
15:10:52 jmcantrell_ is now known as jmcantrell
15:14:40 <tomsmeding> TMA: have you ever done anything with linear types?
15:15:11 <tomsmeding> if you write IO as `newtype IO a = IO (RealWorld %1-> (RealWorld, Ur a))` suddenly it makes perfectsense
15:15:17 <tomsmeding> *perfect sense
15:16:33 acidjnk_new joins (~acidjnk@p200300d6e700e50883c9e32b40afcfd6.dip0.t-ipconnect.de)
15:16:34 <tomsmeding> ostensibly that %1 should be there, but it isn't
15:16:55 <__monty__> TMA: That's a bad conclusion. (As in, it saddens me that you've come to it, not as in you're bad for reaching it.) Maybe forego "understanding" IO for a bit and just try it out for a bit, get a feel for it. (Don't fall into the trap of turning your observations into rigid rules of how it works though, keep an open mind.)
15:16:59 <tomsmeding> but that's mostly an emperor's-new-clothes situation, everyone assumes it's there
15:19:54 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
15:25:46 × pavonia quits (~user@user/siracusa) (Quit: Bye!)
15:26:33 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 255 seconds)
15:27:14 × jmcantrell quits (~weechat@user/jmcantrell) (Ping timeout: 248 seconds)
15:34:37 humasect joins (~humasect@dyn-192-249-132-90.nexicom.net)
15:35:09 <TMA> tomsmeding: I have read about them.
15:36:41 <TMA> __monty__: nobody permits me to use haskell in employment related work so I use haskell mostly as an inspiration for structuring code in other languages, so this level of understanding does not hinder me at all
15:37:36 TMA has come to terms with own limitations
15:37:56 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
15:38:17 TMA is not smart enough and that's fine
15:38:54 × humasect quits (~humasect@dyn-192-249-132-90.nexicom.net) (Ping timeout: 246 seconds)
15:40:02 × divlamir quits (~divlamir@user/divlamir) (Read error: Connection reset by peer)
15:40:22 divlamir joins (~divlamir@user/divlamir)
15:42:45 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 246 seconds)
15:47:15 <gentauro> TMA: do you know Binary Lambda Calculus from John Tromp? https://tromp.github.io/cl/Binary_lambda_calculus.html (see his examples how he handles IO effects) ;)
15:49:20 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
15:54:19 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
15:57:55 × slomp quits (~slomp@47-158-212-88.lsan.ca.frontiernet.net) (Read error: Connection reset by peer)
15:59:22 slomp joins (~slomp@47-158-212-88.lsan.ca.frontiernet.net)
16:05:18 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
16:10:03 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 246 seconds)
16:14:39 humasect joins (~humasect@dyn-192-249-132-90.nexicom.net)
16:22:07 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
16:24:41 <TMA> gentauro: I have read it. I have not understood it.
16:25:09 machinedgod joins (~machinedg@d172-219-48-230.abhsia.telus.net)
16:26:17 <TMA> gentauro: some parts are easy. some parts make my brain shut down.
16:26:20 TMA is not smart enough and that's fine
16:27:37 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 265 seconds)
16:29:24 <mauke> RealWorld is bullshit. it doesn't explain anything
16:38:11 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
16:43:33 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 272 seconds)
16:46:42 Pozyomka joins (~pyon@user/pyon)
16:48:41 × hellwolf quits (~user@52de-36c6-d139-9d27-0f00-4d40-07d0-2001.sta.estpak.ee) (Ping timeout: 248 seconds)
16:50:21 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
16:54:34 hellwolf joins (~user@7530-0dab-5d73-cf2b-0f00-4d40-07d0-2001.sta.estpak.ee)
16:57:49 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 276 seconds)
17:03:02 zalo-rocky joins (~flyingzal@user/zalo-rocky)
17:03:13 <ski> it explains sequencing data dependency, but not much more
17:03:51 <ski> (e.g. doesn't explain I/O exceptions, doesn't explain concurrency (including communication), &c.)
17:07:58 Googulator10 joins (~Googulato@2a01-036d-0106-496b-154a-c7fc-9f43-bd2d.pool6.digikabel.hu)
17:07:59 sm__ joins (~sm@66.8.200.171)
17:08:13 × Googulator quits (~Googulato@2a01-036d-0106-496b-154a-c7fc-9f43-bd2d.pool6.digikabel.hu) (Quit: Client closed)
17:08:23 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
17:09:54 × Tuplanolla quits (~Tuplanoll@88-114-89-88.elisa-laajakaista.fi) (Ping timeout: 246 seconds)
17:13:44 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
17:14:37 × gmg quits (~user@user/gehmehgeh) (Quit: Leaving)
17:14:53 gmg joins (~user@user/gehmehgeh)
17:25:12 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
17:30:18 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 255 seconds)
17:34:52 × karenw quits (~karenw@user/karenw) (Ping timeout: 276 seconds)
17:35:11 <mauke> it doesn't explain I/O
17:37:11 peterbecich joins (~Thunderbi@71.84.33.135)
17:40:44 st_aldini joins (~Betterbir@2605:a601:a07c:7426:a9c5:df0c:3e0f:b451)
17:40:44 arandombit joins (~arandombi@user/arandombit)
17:41:18 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
17:42:37 × arandombit quits (~arandombi@user/arandombit) (Remote host closed the connection)
17:45:15 × st_aldini quits (~Betterbir@2605:a601:a07c:7426:a9c5:df0c:3e0f:b451) (Ping timeout: 246 seconds)
17:45:42 × Pozyomka quits (~pyon@user/pyon) (Quit: bbl)
17:46:17 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
17:48:28 arandombit joins (~arandombi@user/arandombit)
17:50:51 × zalo-rocky quits (~flyingzal@user/zalo-rocky) (Quit: The Lounge - https://thelounge.chat)
17:51:21 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
17:56:24 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 255 seconds)
18:02:07 × m_a_r_k quits (~m_a_r_k@archlinux/support/mark) (Read error: Connection reset by peer)
18:03:47 × fp` quits (~user@2001-14ba-6e24-3000--198.rev.dnainternet.fi) (Ping timeout: 252 seconds)
18:04:30 × peterbecich quits (~Thunderbi@71.84.33.135) (Ping timeout: 246 seconds)
18:04:57 × mehbark quits (~mehbark@user/mehbark) (Ping timeout: 248 seconds)
18:07:08 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
18:07:55 peterbecich joins (~Thunderbi@71.84.33.135)
18:14:45 op_4 is now known as mission_speciali
18:14:55 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 265 seconds)
18:15:26 mission_speciali is now known as op_4
18:18:33 op_4 is now known as missionspecialis
18:19:02 missionspecialis is now known as op_4
18:19:21 × confusedalex quits (~confuseda@user/confusedalex) (Ping timeout: 255 seconds)
18:19:50 × puke quits (~puke@user/puke) (Quit: puke)
18:22:42 × peterbecich quits (~Thunderbi@71.84.33.135) (Ping timeout: 248 seconds)
18:24:20 qqq joins (~qqq@185.54.23.237)
18:26:21 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
18:29:00 confusedalex joins (~confuseda@user/confusedalex)
18:33:22 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 256 seconds)
18:34:10 <monochrom> I'm an extremist, I want to begin by scaremongering about what Ken Thompson said about the source code meaning sh*t if you don't know how much the compiler is special-casing what it sees.
18:34:12 puke joins (~puke@user/puke)
18:35:18 <monochrom> In our particular case, we already know that GHC is special-casing RealWorld, so you must not trust any library source code that pretends to take it seriously.
18:35:22 karenw joins (~karenw@user/karenw)
18:36:11 <monochrom> But ideally no one should need to remind anyone else about that. You can just check the assembly code, and it will be plain as day that RealWorld doesn't exist there.
18:37:44 × arandombit quits (~arandombi@user/arandombit) (Ping timeout: 244 seconds)
18:41:44 × qqq quits (~qqq@185.54.23.237) (Ping timeout: 252 seconds)
18:42:03 × marinelli quits (~weechat@brrr.fr) (Quit: marinelli)
18:44:45 merijn joins (~merijn@62.45.136.136)
18:48:57 × merijn quits (~merijn@62.45.136.136) (Ping timeout: 246 seconds)
18:52:20 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
18:52:27 Pozyomka joins (~pyon@user/pyon)
18:55:52 × Pozyomka quits (~pyon@user/pyon) (Client Quit)
18:56:59 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds)
18:58:03 peterbecich joins (~Thunderbi@71.84.33.135)
18:58:38 Pozyomka joins (~pyon@user/pyon)
19:00:50 × humasect quits (~humasect@dyn-192-249-132-90.nexicom.net) (Quit: Leaving...)
19:03:56 <tomsmeding> monochrom: surely RealWorld not existing in the asm is the least of the special-casing?
19:04:44 <tomsmeding> a value (# #) also doesn't exist in the asm
19:04:55 <monochrom> It is the beginning of believing that special-casing happened.
19:05:29 <tomsmeding> not representing a value with no information in the compiled program is not particularly special :p
19:05:50 <tomsmeding> what's special is that GHC sees that RealWorld has no information, but then still does the full dance of passing it around in Core
19:05:55 <tomsmeding> to maintain the sequencing
19:05:56 <monochrom> At present, most people still believe that RealWorld has a non-trivial representation in the final code.
19:06:06 AlexNoo joins (~AlexNoo@85.174.183.185)
19:06:17 <tomsmeding> does that matter for understanding how IO works?
19:06:51 AlexNoo_ joins (~AlexNoo@85.174.183.185)
19:07:19 <monochrom> 0th-order approximation no, 2nd-order approximation yes.
19:07:27 <tomsmeding> or are you saying, the fact itself that RealWorld has no information in it, must mean that there's something special going on, because otherwise there's nothing to "mutate" with our IO?
19:07:34 AlexNoo__ joins (~AlexNoo@85.174.183.185)
19:07:59 <c_wraith> people believe RealWorld exists in the final code? huh. I had no idea.
19:08:07 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
19:08:12 <int-e> well *something* is still going on because the RTS knows how to apply a function to a void (zero-size) argument
19:08:12 <tomsmeding> it would be rather stupid!
19:08:41 <tomsmeding> int-e: if the argument is zero-size, does it exist?
19:08:44 Googulator10 is now known as Googulator
19:08:50 <c_wraith> int-e: yes. What's going on is that at level procedures exist. :)
19:08:56 <int-e> tomsmeding: no, but the function is different from its result value
19:09:02 <tomsmeding> sure
19:10:10 × AlexNoo quits (~AlexNoo@85.174.183.185) (Ping timeout: 248 seconds)
19:10:17 <int-e> tomsmeding: well. I guess I shouldn't say "no
19:10:18 <int-e> "
19:10:28 <monochrom> Right, I am saying that looking at the assembly code is the beginning of realizing that something special, not shown in source code, is going on.
19:10:33 AlexNoo joins (~AlexNoo@85.174.183.185)
19:10:43 <tomsmeding> OK I can get behind that
19:10:48 <int-e> because in a way it does exist, it just has no material manifestation whatsoever
19:10:54 <tomsmeding> I guess
19:11:14 × AlexNoo_ quits (~AlexNoo@85.174.183.185) (Ping timeout: 248 seconds)
19:11:15 <raincomplex> isn't it true that most of the type system doesn't exist in the final code?
19:11:28 <int-e> raincomplex: but values exist
19:11:31 <int-e> most of them
19:11:32 <tomsmeding> sure, but there's not even a _vlaue_ of type RealWorld
19:11:35 <int-e> this particular one doesn't
19:11:46 × AlexNoo__ quits (~AlexNoo@85.174.183.185) (Ping timeout: 248 seconds)
19:12:00 <tomsmeding> (not to be confused with types that can have no values in the first place, i.e. types with kind different from Type)
19:12:00 <monochrom> Yes. But I am addressing what people choose to believe, and how to change their minds; not what is already true.
19:12:01 <c_wraith> making GHC allow users to create zero-size values is actually a relatively new thing.
19:12:09 <int-e> "exist" in the sense that they're stored in memory or a register
19:12:10 AlexNoo_ joins (~AlexNoo@85.174.183.185)
19:12:20 <c_wraith> GHC supports values that exist in code, but not at run time.
19:12:54 AlexNoo__ joins (~AlexNoo@85.174.183.185)
19:13:05 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
19:13:18 <c_wraith> they have some obvious restrictions as the result of this - they can't be the sole return value of a function, for instance.
19:13:21 <int-e> Now, here's the real question: Did Rust steal zero-sized types from Haskell ;-)
19:13:34 <mauke> RealWorld is an irrelevant implementation detail of one particular Haskell implementation
19:13:35 <c_wraith> (though they can be part of an unboxed tuple of return values)
19:14:00 <mauke> it's like someone asking how I/O works in C and the first thing people point to is the struct layout of FILE in the glibc implementation of <stdio.h>
19:14:03 <monochrom> "RealWorld -> (a, RealWorld)" is a very comfortable model, so comfortable that people try everything to rationalize that it really happens in the real world. (Pun intended!)
19:14:36 <int-e> And monochrom is cruel anough to tell them that RealWorld is entirely imaginary.
19:14:39 <c_wraith> the model doesn't work for concurrent code, though. So... uh...
19:14:54 <monochrom> ISTR Hugs old versions did it the free-monad way! But I can't find it now.
19:14:58 × AlexNoo quits (~AlexNoo@85.174.183.185) (Ping timeout: 248 seconds)
19:15:15 <mauke> why did 10 lines of activity just pop up at once? how laggy is this connection? :-)
19:15:30 <monochrom> Right, good for about 0th approximation only.
19:15:31 <int-e> Wasn't there a [Reply] -> [Request] model at some point
19:15:46 <c_wraith> yes, that predates Monad being part of the standard library
19:15:53 AlexNoo joins (~AlexNoo@85.174.183.185)
19:15:56 <mauke> that sounds like Haskell 1.3 or something
19:16:10 <int-e> (it predates my exposure to Haskell)
19:16:34 × AlexNoo_ quits (~AlexNoo@85.174.183.185) (Ping timeout: 248 seconds)
19:17:05 × puke quits (~puke@user/puke) (Quit: puke)
19:17:06 × AlexNoo__ quits (~AlexNoo@85.174.183.185) (Ping timeout: 248 seconds)
19:17:18 m_a_r_k joins (~m_a_r_k@archlinux/support/mark)
19:17:30 AlexNoo_ joins (~AlexNoo@85.174.183.185)
19:17:42 <monochrom> Generally, people want comfort-zone models, not models that actually works. (Just look at most analogies for Monad way back then.)
19:18:14 AlexNoo__ joins (~AlexNoo@85.174.183.185)
19:19:29 <monochrom> Yeah very old Haskell did [Reply] -> [Request]. And provided a CPS wrapper.
19:20:18 × AlexNoo quits (~AlexNoo@85.174.183.185) (Ping timeout: 248 seconds)
19:21:00 <monochrom> Strictly (pun! you'll see) speaking, [Reply] -> [Request] plus a very strong laziness assumption because clearly you should not force a reply before you emit a request...
19:21:13 AlexNoo joins (~AlexNoo@85.174.183.185)
19:21:41 <int-e> eh a little nontermination never killed anybody
19:21:46 <int-e> (quite the opposite)
19:21:54 × AlexNoo_ quits (~AlexNoo@85.174.183.185) (Ping timeout: 248 seconds)
19:22:00 <monochrom> (The CPS wrapper is then less error-prone in that regard.)
19:22:26 × AlexNoo__ quits (~AlexNoo@85.174.183.185) (Ping timeout: 248 seconds)
19:22:38 <monochrom> (I might say that, then, from CPS to monad is a fairly natural next step.)
19:22:39 × preflex quits (~preflex@user/mauke/bot/preflex) (Remote host closed the connection)
19:22:50 AlexNoo_ joins (~AlexNoo@85.174.183.185)
19:22:53 <int-e> (please nobody bring up the Therac-25... oops)
19:23:12 <monochrom> :(
19:23:16 preflex joins (~preflex@user/mauke/bot/preflex)
19:23:34 AlexNoo__ joins (~AlexNoo@85.174.183.185)
19:23:55 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
19:25:38 × AlexNoo quits (~AlexNoo@85.174.183.185) (Ping timeout: 248 seconds)
19:26:33 AlexNoo joins (~AlexNoo@85.174.183.185)
19:27:14 × AlexNoo_ quits (~AlexNoo@85.174.183.185) (Ping timeout: 248 seconds)
19:27:46 × AlexNoo__ quits (~AlexNoo@85.174.183.185) (Ping timeout: 248 seconds)
19:27:51 <monochrom> https://www.haskell.org/definition/from12to13.html So probably 1.2 was [Reply] -> [Request], 1.3 began the IO Monad.
19:28:10 AlexNoo_ joins (~AlexNoo@85.174.183.185)
19:28:50 jmcantrell_ joins (~weechat@user/jmcantrell)
19:28:58 AlexNoo__ joins (~AlexNoo@85.174.183.185)
19:29:06 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 255 seconds)
19:30:58 × AlexNoo quits (~AlexNoo@85.174.183.185) (Ping timeout: 248 seconds)
19:31:53 AlexNoo joins (~AlexNoo@85.174.183.185)
19:32:34 × AlexNoo_ quits (~AlexNoo@85.174.183.185) (Ping timeout: 248 seconds)
19:33:30 AlexNoo_ joins (~AlexNoo@85.174.183.185)
19:33:38 × AlexNoo__ quits (~AlexNoo@85.174.183.185) (Ping timeout: 248 seconds)
19:33:45 <monochrom> Wait, 1.4 had "List comprehensions have been generalized to arbitrary monads"? And 98 took it away?!
19:33:54 <monochrom> :'(
19:33:58 <geekosaur> yep
19:34:14 AlexNoo__ joins (~AlexNoo@85.174.183.185)
19:34:17 <geekosaur> and then ghc gave it back as an extension
19:34:28 monochrom proposes MonadComprehension for GHC2037
19:36:18 × AlexNoo quits (~AlexNoo@85.174.183.185) (Ping timeout: 248 seconds)
19:37:13 AlexNoo joins (~AlexNoo@85.174.183.185)
19:37:54 × AlexNoo_ quits (~AlexNoo@85.174.183.185) (Ping timeout: 248 seconds)
19:38:06 × jmcantrell_ quits (~weechat@user/jmcantrell) (Ping timeout: 255 seconds)
19:38:26 × AlexNoo__ quits (~AlexNoo@85.174.183.185) (Ping timeout: 248 seconds)
19:38:50 AlexNoo_ joins (~AlexNoo@85.174.183.185)
19:39:34 AlexNoo__ joins (~AlexNoo@85.174.183.185)
19:40:00 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
19:40:28 target_i joins (~target_i@user/target-i/x-6023099)
19:41:09 jmcantrell_ joins (~weechat@user/jmcantrell)
19:41:38 × AlexNoo quits (~AlexNoo@85.174.183.185) (Ping timeout: 248 seconds)
19:42:33 AlexNoo joins (~AlexNoo@85.174.183.185)
19:43:14 × AlexNoo_ quits (~AlexNoo@85.174.183.185) (Ping timeout: 248 seconds)
19:43:46 × AlexNoo__ quits (~AlexNoo@85.174.183.185) (Ping timeout: 248 seconds)
19:44:10 AlexNoo_ joins (~AlexNoo@85.174.183.185)
19:44:58 AlexNoo__ joins (~AlexNoo@85.174.183.185)
19:45:31 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 276 seconds)
19:46:58 × AlexNoo quits (~AlexNoo@85.174.183.185) (Ping timeout: 248 seconds)
19:47:53 AlexNoo joins (~AlexNoo@85.174.183.185)
19:48:34 × AlexNoo_ quits (~AlexNoo@85.174.183.185) (Ping timeout: 248 seconds)
19:48:46 × jmcantrell_ quits (~weechat@user/jmcantrell) (Ping timeout: 276 seconds)
19:48:57 AlexNoo_ joins (~AlexNoo@85.174.183.185)
19:49:38 × AlexNoo__ quits (~AlexNoo@85.174.183.185) (Ping timeout: 248 seconds)
19:50:34 AlexNoo__ joins (~AlexNoo@85.174.183.185)
19:52:05 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
19:52:18 × AlexNoo quits (~AlexNoo@85.174.183.185) (Ping timeout: 248 seconds)
19:53:13 AlexNoo joins (~AlexNoo@85.174.183.185)
19:53:22 × AlexNoo_ quits (~AlexNoo@85.174.183.185) (Ping timeout: 248 seconds)
19:53:57 AlexNoo_ joins (~AlexNoo@85.174.183.185)
19:54:58 × AlexNoo__ quits (~AlexNoo@85.174.183.185) (Ping timeout: 248 seconds)
19:55:39 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 255 seconds)
19:55:54 AlexNoo__ joins (~AlexNoo@85.174.183.185)
19:57:06 comerijn joins (~merijn@77.242.116.146)
19:57:10 Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915)
19:57:19 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
19:57:38 × AlexNoo quits (~AlexNoo@85.174.183.185) (Ping timeout: 248 seconds)
19:58:10 × AlexNoo_ quits (~AlexNoo@85.174.183.185) (Ping timeout: 248 seconds)
20:00:18 × AlexNoo__ quits (~AlexNoo@85.174.183.185) (Ping timeout: 248 seconds)
20:02:13 × comerijn quits (~merijn@77.242.116.146) (Ping timeout: 265 seconds)
20:04:25 × peterbecich quits (~Thunderbi@71.84.33.135) (Ping timeout: 248 seconds)
20:12:24 puke joins (~puke@user/puke)
20:31:47 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
20:36:19 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
20:37:54 emmanuelux_ joins (~em@2a02-8440-2502-667f-6732-4cb1-658e-9089.rev.sfr.net)
20:39:09 × emmanuelux quits (~em@user/emmanuelux) (Ping timeout: 272 seconds)
20:41:13 × comonad quits (~comonad@p200300d02717df00adc247ef70bd7367.dip0.t-ipconnect.de) (Ping timeout: 248 seconds)
20:43:59 emmanuelux joins (~em@user/emmanuelux)
20:44:45 × emmanuelux_ quits (~em@2a02-8440-2502-667f-6732-4cb1-658e-9089.rev.sfr.net) (Ping timeout: 268 seconds)
20:50:29 <jreicher> TMA: you know in imperative/OO languages any function that does IO needs to "eventually" make a system call to really do it? I.e. the IO is actually done by the OS?
20:56:00 × takuan quits (~takuan@d8D86B9E9.access.telenet.be) (Ping timeout: 246 seconds)
20:59:14 × Guest62 quits (~Guest62@p200300ca8f13d0000071be933609493f.dip0.t-ipconnect.de) (Quit: Client closed)
21:00:30 × poscat quits (~poscat@user/poscat) (Remote host closed the connection)
21:01:33 × raelie quits (~raelie@user/raelie) (Read error: Connection reset by peer)
21:03:42 poscat joins (~poscat@user/poscat)
21:09:52 pavonia joins (~user@user/siracusa)
21:29:22 gues34132 joins (~username@78.211.138.170)
21:29:49 jmcantrell_ joins (~weechat@user/jmcantrell)
21:30:51 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
21:32:07 <gues34132> Hi how do I get the ASCII code for CHAR? look at https://pastebin.com/5XQd7A0h
21:33:11 <gues34132> if in string there is '\xxxx' where xxxx is a number I dont get the ASCII code of \ and of every single digit
21:33:32 <gues34132> but i got the number after \
21:33:47 gues34132 is now known as _JusSx_
21:34:16 divlamir_ joins (~divlamir@user/divlamir)
21:35:37 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
21:35:46 <_JusSx_> https://paste.tomsmeding.com/iCzVXqjD
21:36:19 × divlamir quits (~divlamir@user/divlamir) (Ping timeout: 264 seconds)
21:36:19 divlamir_ is now known as divlamir
21:37:12 <c_wraith> Char isn't limited to ascii
21:37:27 <c_wraith> so... yeah, there are strings that aren't lists of ascii codes
21:38:21 <_JusSx_> ok. i agree
21:38:34 <c_wraith> are you asking how to convert them to a sequence of bytes?
21:39:15 <_JusSx_> i need to conver every single char in the string in ASCII
21:39:21 <_JusSx_> \ is \
21:39:33 <_JusSx_> \ should be \
21:39:51 <c_wraith> Ah. The issue you're running into, then, is that string literals are not raw
21:40:06 × jmcantrell_ quits (~weechat@user/jmcantrell) (Ping timeout: 246 seconds)
21:40:22 <c_wraith> string literals have escape sequences. But that's a property of string literals in source, not strings themselves.
21:43:01 <c_wraith> You could do something with a fancy quasiquoter to get closer to raw strings, but they still need some sort of delimiter. Probably the easiest answer is to move those strings outside of source. Put them in a separate text file, so they're never treated as Haskell source.
21:46:10 divlamir_ joins (~divlamir@user/divlamir)
21:46:13 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
21:47:38 × divlamir quits (~divlamir@user/divlamir) (Ping timeout: 252 seconds)
21:47:38 divlamir_ is now known as divlamir
21:47:43 <TMA> jreicher: I know. I did even write an OS as an assignment in a course.
21:48:47 <mauke> _JusSx_: you need to write \\ to get a single \ character in a string
21:50:08 <TMA> jreicher: that being said, those languages might not need an OS or rather they ARE the OS like Lisp Machine Lisp or Sinclair BASIC
21:50:24 <_JusSx_> so i need to code a func that put a `\' when it find \
21:50:27 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds)
21:50:30 <mauke> no
21:50:40 <mauke> you don't have a \
21:50:57 <mauke> > length "\n"
21:50:59 <lambdabot> 1
21:51:07 <_JusSx_> so the func will never find a \
21:51:12 <mauke> that's a single character, not a two-character sequence
21:51:14 <c_wraith> String literals are source code. A String value exist when the program is running.
21:51:33 <c_wraith> Because literals are embedded in a larger document, they can't be totally freeform.
21:51:48 <mauke> > '\n' == chr 10
21:51:49 <lambdabot> True
21:52:02 × target_i quits (~target_i@user/target-i/x-6023099) (Quit: leaving)
21:52:18 <_JusSx_> the input is given. i can't change it
21:52:34 <mauke> we're talking about Haskell source code. that's not input
21:52:38 <c_wraith> Haskell chose a common convention, going back at least as far as C, to use \ as the escape character indicating that something special is going on.
21:54:11 <c_wraith> Here's the question you need to answer: Do you have a String that you want to represent at run time, or a String literal that you want to embed in the source code?
21:55:25 <mauke> https://tio.run/##y0gszk7Nyfn/PzO3IL@oRMElsSRRzzkjsUhBI78oRZOLKzcxM0/BykrB019BQxPCs1VIyedSAIJiBRtdhfTUEp/MvFSwQEFRZl6JgkZuYoECULdCseb//@bGMYZGBqaWRjFqRjYxhsbGRuamAA
21:58:38 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
21:59:28 arandombit joins (~arandombi@2a02:2455:8656:7100:71fa:b47d:cf44:d9a9)
21:59:28 × arandombit quits (~arandombi@2a02:2455:8656:7100:71fa:b47d:cf44:d9a9) (Changing host)
21:59:28 arandombit joins (~arandombi@user/arandombit)
22:00:19 × karenw quits (~karenw@user/karenw) (Ping timeout: 264 seconds)
22:02:54 <_JusSx_> c_wraith: it's a problem in CodeWars. www.codewars.com. I think the tester is passing a malformed string
22:03:05 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds)
22:03:10 divlamir_ joins (~divlamir@user/divlamir)
22:04:24 <_JusSx_> https://paste.tomsmeding.com/A4OhO4GM
22:05:42 × divlamir quits (~divlamir@user/divlamir) (Ping timeout: 255 seconds)
22:05:42 divlamir_ is now known as divlamir
22:07:03 <mauke> > isLower 'é'
22:07:04 <lambdabot> True
22:08:51 <_JusSx_> i need to remove test isLower and isUpper with another test
22:09:38 <mauke> > inRange ('a', 'z') 'é'
22:09:39 <lambdabot> False
22:10:02 <_JusSx_> :t inRange
22:10:03 <lambdabot> Ix a => (a, a) -> a -> Bool
22:10:41 <_JusSx_> yeah inRange is better
22:14:00 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
22:15:02 <_JusSx_> mauke: thank you very much
22:19:00 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 265 seconds)
22:21:06 × infinity0 quits (~infinity0@pwned.gg) (Remote host closed the connection)
22:21:59 infinity0 joins (~infinity0@pwned.gg)
22:29:23 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
22:31:36 <tomsmeding> I wrote a thing: https://new-ircbrowse.tomsmeding.com/log/haskell
22:32:06 <tomsmeding> name is temporary
22:32:35 <Rembane> \o/
22:32:49 <tomsmeding> I'm going to sleep soon and will be back to look at it in >12h so let's see if it dies in the meantime :p
22:33:15 <tomsmeding> actually I need to put it in a tmux session, hol' on
22:33:34 <tomsmeding> there we go
22:33:55 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
22:34:31 × infinity0 quits (~infinity0@pwned.gg) (Ping timeout: 276 seconds)
22:34:38 <tomsmeding> unlike original ircbrowse (which is still up), this has no postgres DB and simply reads directly from the ZNC log files, with some caching and indexing in between
22:34:58 <tomsmeding> it also does file system watching instead of batch importing with a cron job
22:35:21 <Rembane> Excellent. Tmux is the most brutalist way to deploy things.
22:36:01 <tomsmeding> it also lacks half of the features of ircbrowse :p
22:36:21 <tomsmeding> Rembane: just for now, normally I make a systemd unit and I plan to do that once I spend more than 10s on deployment
22:36:28 <Rembane> tomsmeding: Nice!
22:37:51 <tomsmeding> various TODOs in https://git.tomsmeding.com/new-ircbrowse/tree/TODO.txt , let me know if anything is broken or looks wrong or if you have feature requests not in that list
22:38:28 <TMA> Rembane: I think doing it via nohup is even more brutal
22:38:44 <Rembane> TMA: I didn't know that was possible. How do you do that?
22:39:15 <tomsmeding> nohup ./thing >/dev/null 2>&1 & disown
22:39:27 <TMA> thus ^
22:40:50 <Rembane> Yeah, that's more brutalistic.
22:44:46 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
22:47:51 peterbecich joins (~Thunderbi@71.84.33.135)
22:51:23 tomsmeding signs off for today
22:51:30 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 246 seconds)
22:52:43 Xe joins (~Xe@perl/impostor/xe)
22:53:44 Sgeo joins (~Sgeo@user/sgeo)
22:54:29 infinity0 joins (~infinity0@pwned.gg)
22:58:50 <TMA> nohup tomsmeding &
23:00:59 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
23:04:44 × peterbecich quits (~Thunderbi@71.84.33.135) (Ping timeout: 268 seconds)
23:12:13 × arandombit quits (~arandombi@user/arandombit) (Remote host closed the connection)
23:15:27 comonad joins (~comonad@p200300d02717df00adc247ef70bd7367.dip0.t-ipconnect.de)
23:40:11 humasect joins (~humasect@dyn-192-249-132-90.nexicom.net)
23:49:44 × sm__ quits (~sm@66.8.200.171) (Quit: sm__)
23:57:09 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
23:58:22 × xff0x quits (~xff0x@2405:6580:b080:900:388f:e7ec:f5bb:9bd0) (Ping timeout: 276 seconds)

All times are in UTC on 2026-04-06.