Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2021-03-31 20:55:18 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 265 seconds)
2021-03-31 20:55:49 <sm2n> though I should point out, C has the ternary operator a ? b : c, which is essentially if expressions
2021-03-31 20:55:55 <wz1000> I guess Vector would also work, but I can't use Data.Vector.Unboxed or Data.Vector.Storable
2021-03-31 20:56:49 <monochrom> Right, Haskell's if-then-else is really better off compared to C's ?:
2021-03-31 20:57:27 bitmapper joins (uid464869@gateway/web/irccloud.com/x-lksmeqawycwfpajp)
2021-03-31 20:57:54 <systemfault> No... but Haskell has alternatives when you need to do multiple comparisons. C does not.
2021-03-31 20:58:06 × cyphase quits (~cyphase@unaffiliated/cyphase) (Ping timeout: 240 seconds)
2021-03-31 20:58:21 × RusAlex quits (~Chel@unaffiliated/rusalex) (Ping timeout: 246 seconds)
2021-03-31 20:59:03 <monochrom> I am just talking about if-then-else.
2021-03-31 20:59:28 <sm2n> yeah, of course
2021-03-31 20:59:40 <monochrom> and on the C side, just ?: vs if(){}else{}
2021-03-31 20:59:59 × acidjnk_new quits (~acidjnk@p200300d0c72b95486cfd1d07fe22841d.dip0.t-ipconnect.de) (Ping timeout: 245 seconds)
2021-03-31 21:00:45 <monochrom> If I relate Haskell's Int32#->Int32# to C's int(int), you don't go "no, Haskell has polymorphic types, C does not".
2021-03-31 21:01:06 × Lord_of_Life quits (~Lord@unaffiliated/lord-of-life/x-0885362) (Ping timeout: 265 seconds)
2021-03-31 21:01:49 <monochrom> Or maybe you should! Someone please tell me "no, GHC has levity polymorphism, C does not". >:)
2021-03-31 21:02:18 <solidus-river> [exa]: yeah it hides timing around closing sockets and provides an easy way to do something in another thread but unless I'm missing something about forkFinally, in doing so it takes away your ability to be smart about coordinating shutdown or reacting to fatal errors in threads
2021-03-31 21:02:26 <Rembane> I don't know about levity polymorphism, but I could sure use some levitating polymorphism.
2021-03-31 21:02:33 <solidus-river> sm2n: i missed the paste but I"m curious
2021-03-31 21:02:34 <monochrom> :)
2021-03-31 21:02:51 × hyperisco quits (~hyperisco@d192-186-117-226.static.comm.cgocable.net) (Ping timeout: 252 seconds)
2021-03-31 21:03:28 <sm2n> paste?
2021-03-31 21:04:03 <solidus-river> i thought there was some code being referenced in the if-then-else discussion
2021-03-31 21:05:00 ian_ is now known as Igloo
2021-03-31 21:05:30 cyphase joins (~cyphase@unaffiliated/cyphase)
2021-03-31 21:05:33 yunusaydin joins (4eb8266d@78.184.38.109)
2021-03-31 21:06:12 <sm2n> <[exa]> kenanmarasli: counterexample-- in C, there's no sense doing `a = if (123) printf("123");`
2021-03-31 21:06:45 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2021-03-31 21:06:58 × kenanmarasli quits (1fdf0dda@31.223.13.218) (Quit: Connection closed)
2021-03-31 21:07:08 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2021-03-31 21:07:10 <Rembane> sm2n: You could do that in Haskell for about the same amount of sense.
2021-03-31 21:07:25 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2021-03-31 21:08:09 × lampowner quits (~xblow@2a02:2168:b03:3b74::1) (Ping timeout: 246 seconds)
2021-03-31 21:09:56 × nbloomf quits (~nbloomf@2600:1700:ad14:3020:4485:5098:cb7a:cbe1) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2021-03-31 21:09:56 <sm2n> my point is that is a language design thing
2021-03-31 21:10:28 <monochrom> The story of the imperative, statement version of if(){} is also interesting in its own right.
2021-03-31 21:11:29 <monochrom> First, realize that sequential composition of two statements is an associative operator. Indeed, in Pascal, the semicolon is a binary operator, you cannot write "s; t;", you can only write "s; t".
2021-03-31 21:11:34 × int-e quits (~noone@int-e.eu) (Remote host closed the connection)
2021-03-31 21:12:02 × olligobber quits (olligobber@gateway/vpn/privateinternetaccess/olligobber) (Remote host closed the connection)
2021-03-31 21:12:16 int-e joins (~noone@int-e.eu)
2021-03-31 21:12:22 <monochrom> So next you ask "does it have an identity?". Yes, that would be the no-op statement, syntactically as various ways of writing "the empty statement".
2021-03-31 21:12:55 <monochrom> With that, if(){} is best viewed as syntax sugar for if(){}else{no-op}.
2021-03-31 21:13:04 <ephemient> in IO, `when` acts like a single-branch imperative if. you don't get a (useful) result out of it either
2021-03-31 21:13:32 tolwiz joins (4f028693@host-79-2-134-147.business.telecomitalia.it)
2021-03-31 21:13:47 <monochrom> If you ever try to reason about imperative programs (euphemism for "give the language a semantics"), you need to be aware of this, and not be blinded by the slick "if(){}" syntax.
2021-03-31 21:14:13 × lambdabot quits (~lambdabot@haskell/bot/lambdabot) (Remote host closed the connection)
2021-03-31 21:14:41 lambdabot joins (~lambdabot@silicon.int-e.eu)
2021-03-31 21:14:41 × lambdabot quits (~lambdabot@silicon.int-e.eu) (Changing host)
2021-03-31 21:14:41 lambdabot joins (~lambdabot@haskell/bot/lambdabot)
2021-03-31 21:16:12 × borne quits (~fritjof@200116b86411e500f7ed9fd86a2491f0.dip.versatel-1u1.de) (Ping timeout: 246 seconds)
2021-03-31 21:17:53 jules_ joins (~jules@ip201.ip-135-125-227.eu)
2021-03-31 21:19:58 gzj joins (~gzj@unaffiliated/gzj)
2021-03-31 21:22:07 bugbot joins (~bugbot@185.169.233.10)
2021-03-31 21:22:14 × wonko7 quits (~wonko7@62.115.229.50) (Ping timeout: 268 seconds)
2021-03-31 21:22:55 wonko7 joins (~wonko7@62.115.229.50)
2021-03-31 21:23:56 borne joins (~fritjof@200116b86411e500f7ed9fd86a2491f0.dip.versatel-1u1.de)
2021-03-31 21:28:24 × wonko7 quits (~wonko7@62.115.229.50) (Ping timeout: 268 seconds)
2021-03-31 21:28:34 jamm_ joins (~jamm@unaffiliated/jamm)
2021-03-31 21:32:54 × jamm_ quits (~jamm@unaffiliated/jamm) (Ping timeout: 258 seconds)
2021-03-31 21:33:58 × dpl_ quits (~dpl@77.121.78.163) (Read error: Connection reset by peer)
2021-03-31 21:36:04 × Guest90523 quits (~textual@zrcout.mskcc.org) (Quit: Textual IRC Client: www.textualapp.com)
2021-03-31 21:36:09 fendor_ joins (~fendor@91.141.3.64.wireless.dyn.drei.com)
2021-03-31 21:37:06 elfets joins (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de)
2021-03-31 21:38:25 × fendor quits (~fendor@178.165.130.8.wireless.dyn.drei.com) (Ping timeout: 252 seconds)
2021-03-31 21:38:52 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-03-31 21:40:10 Alleria joins (~textual@zrcout.mskcc.org)
2021-03-31 21:40:33 Alleria is now known as Guest50609
2021-03-31 21:42:33 Lycurgus joins (~niemand@98.4.120.166)
2021-03-31 21:46:03 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Ping timeout: 265 seconds)
2021-03-31 21:46:29 × sqrt2 quits (~ben@unaffiliated/sqrt2) (Read error: Connection reset by peer)
2021-03-31 21:46:39 sqrt2 joins (~ben@unaffiliated/sqrt2)
2021-03-31 21:48:35 × Varis quits (~Tadas@unaffiliated/varis) (Remote host closed the connection)
2021-03-31 21:51:52 <_fcntl> (woohoo! at last, built ghc 9.2...)
2021-03-31 21:52:44 × star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Remote host closed the connection)
2021-03-31 21:53:03 star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com)
2021-03-31 21:54:17 RusAlex joins (~Chel@unaffiliated/rusalex)
2021-03-31 21:54:34 × coot quits (~coot@37.30.55.131.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
2021-03-31 21:55:19 × neiluj quits (~jco@unaffiliated/neiluj) (Quit: leaving)
2021-03-31 21:56:13 × conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
2021-03-31 21:57:11 × cr3 quits (~cr3@192-222-143-195.qc.cable.ebox.net) (Ping timeout: 240 seconds)
2021-03-31 21:59:41 conal_ joins (~conal@64.71.133.70)
2021-03-31 22:00:02 × vgtw quits (~vgtw@gateway/tor-sasl/vgtw) (Remote host closed the connection)
2021-03-31 22:00:18 vgtw joins (~vgtw@gateway/tor-sasl/vgtw)
2021-03-31 22:00:35 Rudd0 joins (~Rudd0@185.189.115.108)
2021-03-31 22:02:11 × sqrt2 quits (~ben@unaffiliated/sqrt2) (Ping timeout: 240 seconds)
2021-03-31 22:02:23 sqrt2_ joins (~ben@unaffiliated/sqrt2)
2021-03-31 22:02:29 × _fcntl quits (~jaroslawj@185.234.208.208.r.toneticgroup.pl) (Quit: leaving)
2021-03-31 22:02:58 × star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Excess Flood)
2021-03-31 22:04:13 star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com)
2021-03-31 22:09:13 × Franciman quits (~francesco@host-79-53-62-46.retail.telecomitalia.it) (Quit: Leaving)
2021-03-31 22:11:11 × malumore quits (~malumore@151.62.117.70) (Ping timeout: 260 seconds)
2021-03-31 22:12:06 × kiweun quits (~kiweun@2607:fea8:2a62:9600:f936:9f33:4140:eb88) (Remote host closed the connection)
2021-03-31 22:14:40 × ddellacosta quits (~ddellacos@ool-44c73afa.dyn.optonline.net) (Remote host closed the connection)
2021-03-31 22:15:43 ddellaco_ joins (~ddellacos@ool-44c73afa.dyn.optonline.net)
2021-03-31 22:18:44 × Tuplanolla quits (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) (Quit: Leaving.)
2021-03-31 22:20:12 × ddellaco_ quits (~ddellacos@ool-44c73afa.dyn.optonline.net) (Ping timeout: 268 seconds)
2021-03-31 22:23:17 × MrMobius quits (~MrMobius@208.58.206.154) (Ping timeout: 268 seconds)
2021-03-31 22:24:43 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-03-31 22:27:05 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-03-31 22:27:48 jakalx parts (~jakalx@base.jakalx.net) ()
2021-03-31 22:30:19 MrMobius joins (~MrMobius@208.58.206.154)

All times are in UTC.