2025/11/28

Newest at the top

2025-11-28 21:25:57 +0100CiaoSen(~Jura@2a02:8071:64e1:da0:5a47:caff:fe78:33db) CiaoSen
2025-11-28 21:25:34 +0100annamalai(~annamalai@157.32.117.148) (Ping timeout: 244 seconds)
2025-11-28 21:23:22 +0100acidjnk(~acidjnk@p200300d6e71719110157f51e13fe5b99.dip0.t-ipconnect.de) acidjnk
2025-11-28 21:17:10 +0100myme(~myme@2a01:799:d5e:5f00:a10a:6bc:6be7:9209) myme
2025-11-28 21:16:11 +0100myme1(~myme@2a01:799:d5e:5f00:f60f:b1c2:fdec:ad3a) (Ping timeout: 250 seconds)
2025-11-28 21:12:01 +0100sergheev(~sergheev@159.26.108.41) (Client Quit)
2025-11-28 21:11:37 +0100sergheev(~sergheev@159.26.108.41)
2025-11-28 21:07:43 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 240 seconds)
2025-11-28 21:02:55 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-11-28 21:02:25 +0100ljdarj(~Thunderbi@user/ljdarj) (Ping timeout: 264 seconds)
2025-11-28 20:56:41 +0100pavonia(~user@user/siracusa) siracusa
2025-11-28 20:55:51 +0100 <milan> Let's go study a little bit more :).. THank you for answers.
2025-11-28 20:55:06 +0100tv(~tv@user/tv) tv
2025-11-28 20:51:37 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
2025-11-28 20:45:01 +0100sindu(~sindu@2.148.32.207.tmi.telenormobil.no) (Ping timeout: 264 seconds)
2025-11-28 20:39:06 +0100humasect(~humasect@dyn-192-249-132-90.nexicom.net) (Remote host closed the connection)
2025-11-28 20:38:34 +0100 <EvanR> if you call yourself a novice may it sounds better
2025-11-28 20:37:36 +0100 <milan> So sad I am noob :/
2025-11-28 20:37:20 +0100 <milan> I really like this language :D
2025-11-28 20:36:45 +0100 <EvanR> separate out the specific things lets you put them back together in other ways
2025-11-28 20:36:09 +0100 <EvanR> let loop x = x >> loop x in loop (putStrLn "HELLO WORLD")
2025-11-28 20:36:01 +0100 <milan> Oh cool :)
2025-11-28 20:35:53 +0100 <EvanR> you can also factor out the pattern
2025-11-28 20:35:42 +0100 <EvanR> let x = putStrLn "HELLO WORLD" >> x in x -- or chaining infinite prints!
2025-11-28 20:32:05 +0100 <milan> Which is possible by chaining multiple print in IO. that guarantees they will be executed multiple times when needed.
2025-11-28 20:31:11 +0100 <milan> times.
2025-11-28 20:31:09 +0100 <milan> No I was thining why outputing something to external object is encapsulated in IO. My reasoning was that wheter it chages state of this external object correctly or not can't affect our program (until we do some reading) and so IO here is unnecesary. But as pointed out problem with printing multiple times is one when programming would become very unreliable as sometimes we need to output several
2025-11-28 20:29:15 +0100Lord_of_Life(~Lord@user/lord-of-life/x-2819915) Lord_of_Life
2025-11-28 20:28:55 +0100Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Ping timeout: 240 seconds)
2025-11-28 20:26:25 +0100notzmv(~umar@user/notzmv) (Ping timeout: 264 seconds)
2025-11-28 20:25:51 +0100 <EvanR> print id
2025-11-28 20:25:48 +0100 <EvanR> you want it to print the function itself?
2025-11-28 20:25:26 +0100 <milan> Okey I think I can see your point.
2025-11-28 20:25:16 +0100 <milan> Yeah
2025-11-28 20:25:12 +0100 <mniip> that would only print once
2025-11-28 20:25:09 +0100 <mniip> yea but if you said `let x = print 3 in [x, x, x]`
2025-11-28 20:24:49 +0100 <lambdabot> [a -> a]
2025-11-28 20:24:49 +0100 <milan> Could ghc runtime execute print on every function it evaluates?
2025-11-28 20:24:48 +0100 <EvanR> :t [id, id, id]
2025-11-28 20:24:35 +0100 <milan> You can put functions to list too right?
2025-11-28 20:23:23 +0100 <mniip> hell you can put them in a list: sequence_ [x, x, x]
2025-11-28 20:23:16 +0100 <mniip> let x = print 3 in x >> x
2025-11-28 20:22:43 +0100 <EvanR> yes!
2025-11-28 20:22:43 +0100 <mniip> the bonus is that IO actions are values and you can manipulate them
2025-11-28 20:22:22 +0100 <milan> And as runtime is evaluating big IO composed of smaler IOs it always executes action there.
2025-11-28 20:22:21 +0100 <EvanR> orthogonal, but can be combined easily
2025-11-28 20:22:02 +0100 <EvanR> yeah so, functions are over here and are like this, and I/O commands are over here
2025-11-28 20:21:23 +0100 <milan> I get that they are encapsulated in IO...
2025-11-28 20:20:06 +0100 <EvanR> in haskell they're two different things entirely
2025-11-28 20:19:59 +0100 <EvanR> so they don't happen until someone calls the function