Home freenode/#haskell: Logs Calendar

Logs on 2021-04-18 (freenode/#haskell)

00:02:07 × ddellacosta quits (~ddellacos@86.106.143.40) (Ping timeout: 252 seconds)
00:05:33 rprije joins (~rprije@59-102-63-15.tpgi.com.au)
00:06:11 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
00:10:53 × star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Ping timeout: 240 seconds)
00:19:02 star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com)
00:19:11 heatsink joins (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
00:22:35 × Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer)
00:22:48 × machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 252 seconds)
00:24:35 × heatsink quits (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 268 seconds)
00:26:06 × Ariakenom quits (~Ariakenom@2001:9b1:efb:fc00:35d5:f540:5742:5bbb) (Quit: Leaving)
00:27:31 × stef204 quits (~stef204@unaffiliated/stef-204/x-384198) (Ping timeout: 250 seconds)
00:28:24 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
00:30:52 Tario joins (~Tario@201.192.165.173)
00:34:12 dmytrish joins (~mitra@2a02:8084:a82:d900:319a:d200:a43d:3e3c)
00:35:15 ddellacosta joins (~ddellacos@86.106.143.79)
00:36:31 × GothAlice1 quits (~GothAlice@217.146.82.202) (Remote host closed the connection)
00:39:31 × ddellacosta quits (~ddellacos@86.106.143.79) (Ping timeout: 252 seconds)
00:40:35 × dmytrish quits (~mitra@2a02:8084:a82:d900:319a:d200:a43d:3e3c) (Ping timeout: 260 seconds)
00:41:36 heatsink joins (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
00:43:18 × star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Ping timeout: 265 seconds)
00:50:04 × Narinas quits (~Narinas@187-178-93-112.dynamic.axtel.net) (Read error: Connection reset by peer)
00:50:51 Narinas joins (~Narinas@187-178-93-112.dynamic.axtel.net)
00:53:20 T-Junk joins (~T-Junk@178.239.168.171)
00:57:13 stef204 joins (~stef204@unaffiliated/stef-204/x-384198)
00:58:20 × nineonine quits (~nineonine@2604:3d08:7785:9600:2926:4844:fa1f:b849) (Remote host closed the connection)
00:59:22 nineonine joins (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4)
01:03:47 × nineonine quits (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4) (Ping timeout: 258 seconds)
01:03:57 lambdaman joins (~lambdaman@s66-183-152-156.bc.hsia.telus.net)
01:05:24 Kaiepi joins (~Kaiepi@47.54.252.148)
01:08:45 ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta)
01:13:45 × ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 265 seconds)
01:14:14 × HannaM quits (~quassel@p54849510.dip0.t-ipconnect.de) (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
01:15:21 Guest78317 joins (~laudiacay@67.176.215.84)
01:16:23 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 246 seconds)
01:19:32 × Guest78317 quits (~laudiacay@67.176.215.84) (Ping timeout: 246 seconds)
01:22:13 lechner joins (~lechner@letbox-vps.us-core.com)
01:23:28 hidedagger joins (~nate@unaffiliated/hidedagger)
01:24:26 Codaraxis joins (Codaraxis@gateway/vpn/mullvad/codaraxis)
01:24:55 <lechner> Hi, I am on my second Haskell project. Using ghc from Debian but vendored packages from Hackage, what is the right sequence to build the example on this page, please? http://hackage.haskell.org/package/amqp-0.22.0/docs/Network-AMQP.html
01:25:15 × xff0x quits (~xff0x@2001:1a81:5285:4800:4b3b:6e1b:c5f9:114d) (Ping timeout: 258 seconds)
01:26:42 × lambdaman quits (~lambdaman@s66-183-152-156.bc.hsia.telus.net) (Remote host closed the connection)
01:26:46 × Deide quits (~Deide@217.155.19.23) (Quit: Seeee yaaaa)
01:27:07 xff0x joins (~xff0x@2001:1a81:52bc:3c00:e093:d566:52f:38b9)
01:27:39 <sm[m]> hi lechner . what problem have you got ?
01:28:23 lambdaman joins (~lambdaman@s66-183-152-156.bc.hsia.telus.net)
01:29:11 <lechner> sm[m]: Hi, should i use stack? which one? last time i got confused by another tool, maybe cabal?
01:30:10 <lechner> to rephrase, is 'stack new' still the way to go?
01:31:06 × dpl quits (~dpl@77-121-78-163.chn.volia.net) (Ping timeout: 240 seconds)
01:31:14 <sm[m]> lechner: you can use either, but I would, yes. To just quickly build this example: stack ghc --package amqp file.hs
01:31:25 nineonine joins (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4)
01:31:32 × nineonine quits (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4) (Remote host closed the connection)
01:31:45 nineonine joins (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4)
01:31:55 <sm[m]> no need to create a project if you're just building an example
01:32:16 <lechner> thanks, i have stack 2.3.3 in Debian bullseye. is that good enough?
01:32:33 <lechner> well, i have to go to production anyway
01:32:54 × nineonine quits (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4) (Remote host closed the connection)
01:33:03 <sm[m]> I would get the latest, 2.5.x. "stack upgrade", or look for a newer deb
01:33:08 <sm[m]> but you can try
01:33:56 nineonine joins (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4)
01:35:19 <lechner> thanks so much! it's a privilege to get help from you, if you are the SM i think you are
01:35:43 <sm[m]> I'm not Simon Marlow :)
01:35:59 × hypercube quits (hypercube@gateway/vpn/protonvpn/hypercube) (Ping timeout: 246 seconds)
01:36:09 <lechner> bummer. thanks, anyway! :)
01:36:23 <sm[m]> np
01:36:38 <lechner> i won't tell anyone
01:36:55 <sm[m]> doesn't matter.. they can tell somehow :)
01:37:58 <lechner> with your commitment to this channel you deserve greater accolades, anyhow!
01:38:09 × nineonine quits (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4) (Ping timeout: 250 seconds)
01:39:46 <sm[m]> I keep telling them...
01:40:50 ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta)
01:45:06 × ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 240 seconds)
01:46:10 <lechner> looks like i have to adjust some Debian QA tools for Hackage. can the explicit deprecation of stack version 9.9.9 be detected somehow? tracker.debian.org doesn't get it 'new upstream version available': https://tracker.debian.org/pkg/haskell-stack http://hackage.haskell.org/package/stack/preferred
01:47:11 × geowiesnot quits (~user@87-89-181-157.abo.bbox.fr) (Ping timeout: 246 seconds)
01:47:44 gnumonic joins (~gnumonic@c-73-170-91-210.hsd1.ca.comcast.net)
01:52:21 <sm[m]> maybe Clint knows
01:57:48 sz0 joins (uid110435@gateway/web/irccloud.com/x-zwmbhzhzwgqqzplk)
01:59:04 <Clint> lechner: you might try #hackage if you want enhancements to distro-monitor or some api
02:00:33 <lechner> Clint: okay, i'll ask over there. thanks!
02:01:30 jao joins (~jao@pdpc/supporter/professional/jao)
02:02:57 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
02:03:38 × Foritus quits (~buggery@cpc91316-watf11-2-0-cust68.15-2.cable.virginm.net) (Ping timeout: 252 seconds)
02:03:47 Foritus joins (~buggery@cpc91316-watf11-2-0-cust68.15-2.cable.virginm.net)
02:04:33 × jacks2 quits (~bc8134e3@217.29.117.252) (Quit: http://www.okay.uz/)
02:05:40 olligobber joins (olligobber@gateway/vpn/privateinternetaccess/olligobber)
02:05:53 × mozzarella quits (~sam@unaffiliated/sam113101) (Ping timeout: 240 seconds)
02:06:15 nineonine joins (~nineonine@2604:3d08:7785:9600:2926:4844:fa1f:b849)
02:06:47 × lambdaman quits (~lambdaman@s66-183-152-156.bc.hsia.telus.net) (Remote host closed the connection)
02:06:50 × stef204 quits (~stef204@unaffiliated/stef-204/x-384198) (Quit: WeeChat 3.1)
02:08:47 lambdaman joins (~lambdaman@s66-183-152-156.bc.hsia.telus.net)
02:09:15 <gnumonic> I'm not 100% sure if this is the right question but: Is there a way to force immediate kind unification? I'm testing some type level stuff w/ higher order defunctionalized type level functions (:: (k1 ~> k2) ~> k3 ish) and I can't tell whether they work as intended without compiling (which takes like 15 minutes).
02:09:50 × hidedagger quits (~nate@unaffiliated/hidedagger) (Quit: WeeChat 3.1)
02:11:38 × nineonine quits (~nineonine@2604:3d08:7785:9600:2926:4844:fa1f:b849) (Ping timeout: 258 seconds)
02:14:54 <infinisil> gnumonic: Can you split it into multiple files?
02:15:01 <nicholasbulka> what kind of data structure, or pattern, might be best to use for sorting Integers across lists, returning the same shape of the list.
02:15:31 <infinisil> nicholasbulka: Example?
02:16:00 <nicholasbulka> well, consider chars actually
02:16:02 <nicholasbulka> [ [
02:16:02 <nicholasbulka> ['H', 'H', 'W', 'O'], ['O','O','O','O']
02:16:02 <nicholasbulka> ['W', 'W', 'O', 'W'], => ['W','W','W','W']
02:16:04 <nicholasbulka> ['H', 'H', 'O', 'O'] ['H','H','H','H']
02:16:06 <nicholasbulka> ] ]
02:16:12 <gnumonic> infinisil: no :-( Not without doing the recursive module thing. I'm trying to do some heavy dependently typed stuff and (almost) everything depends on (almost) everything else in some way
02:16:29 <gnumonic> And tbh I couldn't get the recursive module thing to work after a few hours and so I gave up
02:17:51 <nicholasbulka> where H = 1.36, W = 1.00, A = 0.87, and 0 = 0.80 (so sorting lowest first basically)
02:17:54 <infinisil> gnumonic: Maybe https://downloads.haskell.org/ghc/latest/docs/html/users_guide/phases.html#ghc-flag--fno-code
02:18:36 ddellacosta joins (~ddellacos@86.106.143.79)
02:19:28 rajivr joins (uid269651@gateway/web/irccloud.com/x-cevinofdvazcujky)
02:19:44 mozzarella joins (~sam@unaffiliated/sam113101)
02:19:50 <infinisil> nicholasbulka: That's an odd use case. Haskell lists aren't really good for this. Do you need exactly this or can you change the input/output to some better data structure?
02:20:00 <gnumonic> That'll omit TH splices right? I'm using singletons to generate defunctionalization symbols so I don't think that'll work. I mean I could do all of that by hand but... not sure that'd really save me time. I guess I'll just try to be careful. Compile times really balloon when you do a lot of type family stuff
02:20:37 <nicholasbulka> it's a code wars problem, the input is always of the form ...
02:20:43 <nicholasbulka> fixedTests :: [([Char], [[Char]], [[Char]])]
02:20:43 <nicholasbulka> fixedTests =
02:20:43 <nicholasbulka> [
02:20:45 <nicholasbulka> ( "Should be able to sort 3 liquids"
02:20:47 <nicholasbulka> ,
02:20:49 <nicholasbulka> [ "HHWO"
02:20:51 <nicholasbulka> , "WWOW"
02:20:53 <nicholasbulka> , "HHOO"
02:20:55 <nicholasbulka> ]
02:20:57 <nicholasbulka> ,
02:21:17 <infinisil> gnumonic: I'd give -fno-code a try
02:22:07 <gnumonic> mkay i'll flip it on and see what happens. thanks!
02:22:44 kristijonas joins (~kristijon@78-56-32-39.static.zebra.lt)
02:22:53 × ddellacosta quits (~ddellacos@86.106.143.79) (Ping timeout: 246 seconds)
02:23:53 × mozzarella quits (~sam@unaffiliated/sam113101) (Ping timeout: 240 seconds)
02:26:30 <infinisil> nicholasbulka: Can't think of a nice pattern. I think you'll have to extract the list lengths
02:26:55 <nicholasbulka> yeah
02:27:05 <nicholasbulka> I haven't been able to think of anything elegant either
02:27:35 mozzarella joins (~sam@unaffiliated/sam113101)
02:27:36 <nicholasbulka> generally seems hard to swap things arbitrarily across functors
02:27:45 <nicholasbulka> but I am new
02:28:30 <infinisil> I guess you want functions for `[[a]] -> ([Int], [a])` and the inverse
02:30:08 <infinisil> nicholasbulka: Is it a matrix?
02:30:18 <infinisil> Is the length of each sublist always the same?
02:30:47 justsomeguy joins (~justsomeg@unaffiliated/--/x-3805311)
02:30:49 <nicholasbulka> yes, it's always 2x3 to 2x3 or 4x1 to 4x1 etc.
02:31:09 <sm[m]> do pragmas like OPTIONS_GHC, NOINLINE need to immediately precede the type signature/function declaration ? Or can I add some ordinary comment lines in between ?
02:32:56 <infinisil> nicholasbulka: Ah then you only need `[[a]] -> (Int, [a])` and the inverse
02:33:05 <infinisil> Where the Int is the length of a sublist
02:33:07 × fiedlr quits (~fiedlr@83.148.33.254) (Remote host closed the connection)
02:33:25 fiedlr joins (~fiedlr@83.148.33.254)
02:33:52 × Alleria_ quits (~AllahuAkb@2603-7000-3040-0000-1861-6f3f-b8b6-91aa.res6.spectrum.com) (Ping timeout: 258 seconds)
02:35:15 <infinisil> ,tias
02:35:25 <infinisil> sm[m]: Try it and see! (then tell us what you saw)
02:35:31 × lambdaman quits (~lambdaman@s66-183-152-156.bc.hsia.telus.net) (Remote host closed the connection)
02:36:35 <sm[m]> alas my mental stack is full, I have lazily stuck those comments at the top
02:37:22 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds)
02:38:13 <nicholasbulka> that makes sense, thanks!
02:39:38 × spacebase quits (~spacebase@97-118-136-127.hlrn.qwest.net) (Ping timeout: 268 seconds)
02:40:15 × falafel quits (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) (Ping timeout: 268 seconds)
02:40:47 pthariensflame joins (~pthariens@2600:6c52:727f:4200:ecc8:7d66:24f2:c0bf)
02:41:22 lambdaman joins (~lambdaman@s66-183-152-156.bc.hsia.telus.net)
02:42:18 × theDon quits (~td@muedsl-82-207-238-217.citykom.de) (Ping timeout: 240 seconds)
02:44:17 theDon joins (~td@94.134.91.146)
02:46:10 × lambdaman quits (~lambdaman@s66-183-152-156.bc.hsia.telus.net) (Ping timeout: 252 seconds)
02:46:18 nineonine joins (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4)
02:47:20 FinnElija joins (~finn_elij@gateway/tor-sasl/finnelija/x-67402716)
02:47:20 finn_elija is now known as Guest10534
02:47:20 FinnElija is now known as finn_elija
02:48:54 × kristijonas quits (~kristijon@78-56-32-39.static.zebra.lt) (Remote host closed the connection)
02:49:15 kristijonas joins (~kristijon@78-56-32-39.static.zebra.lt)
02:49:16 falafel joins (~falafel@pool-96-255-70-50.washdc.fios.verizon.net)
02:50:44 × nineonine quits (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4) (Ping timeout: 258 seconds)
02:51:09 × Guest10534 quits (~finn_elij@gateway/tor-sasl/finnelija/x-67402716) (Ping timeout: 240 seconds)
02:51:18 × pthariensflame quits (~pthariens@2600:6c52:727f:4200:ecc8:7d66:24f2:c0bf) ()
02:56:06 seven_three joins (~user@pool-96-233-64-53.bstnma.fios.verizon.net)
02:59:23 ddellacosta joins (~ddellacos@86.106.143.40)
03:00:38 Ishutin_ joins (~ishutin@94-21-174-90.pool.digikabel.hu)
03:01:26 seven_three parts (~user@pool-96-233-64-53.bstnma.fios.verizon.net) ("ERC (IRC client for Emacs 27.2)")
03:01:42 Feuermagier joins (~Feuermagi@2a02:2488:4211:3400:7285:c2ff:fe22:172e)
03:03:26 × ddellacosta quits (~ddellacos@86.106.143.40) (Ping timeout: 240 seconds)
03:03:53 × Ishutin quits (~ishutin@193-110-63-24.cable-modem.hdsnet.hu) (Ping timeout: 260 seconds)
03:05:33 Feuermagier_ joins (~Feuermagi@2a02:2488:4211:3400:7285:c2ff:fe22:172e)
03:05:45 × Feuermagier quits (~Feuermagi@2a02:2488:4211:3400:7285:c2ff:fe22:172e) (Read error: Connection reset by peer)
03:05:57 × Feuermagier_ quits (~Feuermagi@2a02:2488:4211:3400:7285:c2ff:fe22:172e) (Remote host closed the connection)
03:11:55 star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com)
03:12:19 × mozzarella quits (~sam@unaffiliated/sam113101) (Ping timeout: 268 seconds)
03:12:56 × russruss40 quits (~russruss@my.russellmcc.com) (Ping timeout: 260 seconds)
03:13:53 russruss40 joins (~russruss@my.russellmcc.com)
03:26:21 justanotheruser joins (~justanoth@unaffiliated/justanotheruser)
03:28:20 plutoniix joins (~q@ppp-223-24-146-11.revip6.asianet.co.th)
03:30:27 ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta)
03:35:31 × ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 252 seconds)
03:42:33 × justanotheruser quits (~justanoth@unaffiliated/justanotheruser) (Quit: WeeChat 2.9)
03:45:15 justanotheruser joins (~justanoth@unaffiliated/justanotheruser)
03:49:48 × alx741 quits (~alx741@186.178.109.113) (Quit: alx741)
03:54:37 Jd007 joins (~Jd007@162.156.11.151)
03:56:54 × waleee-cl quits (uid373333@gateway/web/irccloud.com/x-mkcsziznqohoylbr) (Quit: Connection closed for inactivity)
04:01:52 ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta)
04:02:18 × Unhammer quits (~Unhammer@gateway/tor-sasl/unhammer) (Remote host closed the connection)
04:02:49 Unhammer joins (~Unhammer@gateway/tor-sasl/unhammer)
04:04:44 × conal quits (~conal@64.71.133.70) (Read error: Connection reset by peer)
04:05:44 × urodna quits (~urodna@unaffiliated/urodna) (Quit: urodna)
04:06:35 × ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 268 seconds)
04:06:48 elliott__ joins (~elliott@pool-108-18-30-46.washdc.fios.verizon.net)
04:07:00 × thunderrd quits (~thunderrd@183.182.111.104) (Ping timeout: 265 seconds)
04:10:40 nineonine joins (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4)
04:10:47 conal joins (~conal@64.71.133.70)
04:11:32 × nineonine quits (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4) (Remote host closed the connection)
04:15:45 nineonine joins (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4)
04:17:52 quinn joins (~quinn@c-73-223-224-163.hsd1.ca.comcast.net)
04:20:26 × nineonine quits (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4) (Ping timeout: 258 seconds)
04:25:50 × kristijonas quits (~kristijon@78-56-32-39.static.zebra.lt) (Remote host closed the connection)
04:26:17 kristijonas joins (~kristijon@78-56-32-39.static.zebra.lt)
04:26:56 × elliott__ quits (~elliott@pool-108-18-30-46.washdc.fios.verizon.net) (Ping timeout: 268 seconds)
04:28:02 __minoru__shirae joins (~shiraeesh@109.166.58.81)
04:31:35 × NGravity quits (csp@gateway/shell/xshellz/x-wehocrdvpegpsnls) (Ping timeout: 260 seconds)
04:33:34 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
04:36:34 × s00pcan quits (~chris@075-133-056-178.res.spectrum.com) (Ping timeout: 252 seconds)
04:36:36 mozzarella joins (~sam@unaffiliated/sam113101)
04:38:09 s00pcan joins (~chris@107.181.165.217)
04:38:53 ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta)
04:39:38 × justsomeguy quits (~justsomeg@unaffiliated/--/x-3805311) (Quit: WeeChat 3.0.1)
04:39:38 × zaquest quits (~notzaques@5.128.210.178) (Read error: Connection reset by peer)
04:40:03 zaquest joins (~notzaques@5.128.210.178)
04:41:21 drbean_ joins (~drbean@TC210-63-209-220.static.apol.com.tw)
04:41:23 × Unhammer quits (~Unhammer@gateway/tor-sasl/unhammer) (Remote host closed the connection)
04:42:23 geowiesnot joins (~user@87-89-181-157.abo.bbox.fr)
04:43:12 × ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 240 seconds)
04:44:39 Unhammer joins (~Unhammer@gateway/tor-sasl/unhammer)
04:47:28 nineonine joins (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4)
04:48:05 Patrick333 joins (0ecfcc5d@14.207.204.93)
04:50:24 lambdaman joins (~lambdaman@s66-183-152-156.bc.hsia.telus.net)
04:54:01 × nineonine quits (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4) (Ping timeout: 250 seconds)
04:55:38 × nicholasbulka quits (~nicholasb@2601:900:4301:da0:c8b6:8ee4:f90a:54d2) (Remote host closed the connection)
04:57:59 nicholasbulka joins (~nicholasb@2601:900:4301:da0:c8b6:8ee4:f90a:54d2)
04:59:26 × qwerty2o quits (~qwerty2o@93-172-139-92.bb.netvision.net.il) (Ping timeout: 240 seconds)
05:02:15 × nicholasbulka quits (~nicholasb@2601:900:4301:da0:c8b6:8ee4:f90a:54d2) (Ping timeout: 250 seconds)
05:04:39 × Jd007 quits (~Jd007@162.156.11.151) (Quit: Jd007)
05:07:26 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
05:08:04 hidedagger joins (~nate@unaffiliated/hidedagger)
05:09:40 nineonine joins (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4)
05:10:37 × lechner quits (~lechner@letbox-vps.us-core.com) (Quit: WeeChat 3.0)
05:10:37 × nineonine quits (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4) (Remote host closed the connection)
05:11:36 nineonine joins (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4)
05:12:45 idhugo joins (~idhugo@87-49-147-45-mobile.dk.customer.tdc.net)
05:15:53 Guest78317 joins (~laudiacay@67.176.215.84)
05:16:07 × nineonine quits (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4) (Ping timeout: 250 seconds)
05:17:07 ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta)
05:18:04 hrnz joins (~hrnz@unaffiliated/hrnz)
05:20:01 × ericsagnes quits (~ericsagne@2405:6580:0:5100:cd2f:135d:b869:baa3) (Ping timeout: 250 seconds)
05:20:34 × Guest78317 quits (~laudiacay@67.176.215.84) (Ping timeout: 252 seconds)
05:21:40 × ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 252 seconds)
05:30:36 jao- joins (~jao@pdpc/supporter/professional/jao)
05:30:48 × jao- quits (~jao@pdpc/supporter/professional/jao) (Client Quit)
05:32:14 ericsagnes joins (~ericsagne@2405:6580:0:5100:c907:2b1b:a88e:a342)
05:33:23 geiger joins (~geiger@90.212.77.86)
05:37:08 × lawt quits (~lawt@2601:200:8101:f140:dea6:32ff:fea1:adfa) (Read error: Connection reset by peer)
05:38:10 × rprije quits (~rprije@59-102-63-15.tpgi.com.au) (Remote host closed the connection)
05:40:58 × Patrick333 quits (0ecfcc5d@14.207.204.93) (Quit: Ping timeout (120 seconds))
05:47:44 <dmj`> Control.Lens.Plated.transform is incredible
05:49:27 ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta)
05:49:30 nineonine joins (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4)
05:50:51 × nineonine quits (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4) (Remote host closed the connection)
05:51:53 nineonine joins (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4)
05:52:50 lawt joins (~lawt@2601:200:8101:f140:dea6:32ff:fea1:adfa)
05:53:33 × ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 240 seconds)
05:55:48 lechner joins (~lechner@letbox-vps.us-core.com)
05:56:25 × nineonine quits (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4) (Ping timeout: 250 seconds)
05:58:41 freegraph joins (~freegraph@103.58.155.176)
06:02:40 nineonine joins (~nineonine@2604:3d08:7785:9600:2926:4844:fa1f:b849)
06:04:26 × nineonine quits (~nineonine@2604:3d08:7785:9600:2926:4844:fa1f:b849) (Remote host closed the connection)
06:05:25 nineonine joins (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4)
06:06:46 × cole-h quits (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Ping timeout: 252 seconds)
06:09:51 × nineonine quits (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4) (Ping timeout: 250 seconds)
06:13:41 thunderrd joins (~thunderrd@183.182.114.233)
06:15:20 Jd007 joins (~Jd007@162.156.11.151)
06:20:24 × hidedagger quits (~nate@unaffiliated/hidedagger) (Quit: WeeChat 3.1)
06:21:53 × tzh quits (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz)
06:22:02 nut joins (~user@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr)
06:22:44 qwerty2o joins (~qwerty2o@188.64.207.157)
06:25:44 ddellacosta joins (~ddellacos@86.106.143.248)
06:27:21 wildlander joins (~wildlande@unaffiliated/wildlander)
06:30:12 × ddellacosta quits (~ddellacos@86.106.143.248) (Ping timeout: 252 seconds)
06:35:34 <lechner> Hi, should this use of 'threadDelay' cause a 3-second sleep? https://dpaste.org/Gndj#L27
06:36:45 nineonine joins (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4)
06:37:46 <lechner> sorry, this is the one https://dpaste.org/va3m#L27
06:38:02 × nineonine quits (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4) (Remote host closed the connection)
06:39:04 nineonine joins (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4)
06:41:09 <glguy> Hopefully not
06:41:28 <lechner> how can i, please?
06:41:54 <lechner> it does not
06:42:15 <glguy> That'll pause for 3 milliseconds
06:42:27 <dmj`> secs x = (x*1000*1000)
06:42:42 <dmj`> @def secs x = (x*1000*1000)
06:42:44 <lambdabot> Defined.
06:42:48 <dmj`> > secs 3
06:42:50 <lambdabot> 3000000
06:43:05 <dmj`> :t threadDelay (secs 3)
06:43:07 <lambdabot> error:
06:43:07 <lambdabot> Variable not in scope: threadDelay :: t0 -> t
06:43:37 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 252 seconds)
06:43:39 × nineonine quits (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4) (Ping timeout: 250 seconds)
06:49:04 <lechner> thanks! my second haskell experiment is almost working now
06:49:41 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
06:53:18 × MidAutumnHotaru quits (~MidAutumn@unaffiliated/midautumnhotaru) (Quit: Quit 啾)
06:53:36 MidAutumnHotaru joins (~MidAutumn@unaffiliated/midautumnhotaru)
06:54:25 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 260 seconds)
06:58:08 <lechner> hi, is that @def trick supposed to work in my .hs file, too?
06:58:22 gehmehgeh joins (~ircuser1@gateway/tor-sasl/gehmehgeh)
06:58:22 buckworst joins (~nate@180.243.10.86)
06:58:52 Tuplanolla joins (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi)
06:58:56 × buckworst quits (~nate@180.243.10.86) (Client Quit)
06:59:12 ddellacosta joins (~ddellacos@86.106.143.157)
07:00:06 × rekahsoft quits (~rekahsoft@cpe0008a20f982f-cm64777d666260.cpe.net.cable.rogers.com) (Ping timeout: 240 seconds)
07:00:11 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
07:00:54 <lechner> never mind, it worked without the @def
07:00:57 × idhugo quits (~idhugo@87-49-147-45-mobile.dk.customer.tdc.net) (Ping timeout: 260 seconds)
07:03:12 × stux|RC-only quits (stux2@grid9.quadspeedi.net) (Ping timeout: 265 seconds)
07:03:18 × ddellacosta quits (~ddellacos@86.106.143.157) (Ping timeout: 240 seconds)
07:03:36 malumore joins (~malumore@151.62.123.9)
07:03:55 × malumore quits (~malumore@151.62.123.9) (Remote host closed the connection)
07:04:08 malumore joins (~malumore@151.62.123.9)
07:04:11 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
07:04:28 Lowl3v3l joins (~Lowl3v3l@dslb-002-207-103-026.002.207.pools.vodafone-ip.de)
07:04:46 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds)
07:06:32 × falafel quits (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) (Ping timeout: 240 seconds)
07:06:36 × qwerty2o quits (~qwerty2o@188.64.207.157) (Read error: Connection reset by peer)
07:06:59 danvet joins (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa)
07:08:42 × Tario quits (~Tario@201.192.165.173) (Ping timeout: 252 seconds)
07:10:41 × Jd007 quits (~Jd007@162.156.11.151) (Quit: Jd007)
07:15:50 TheBlingInTheNor joins (1829ec3e@24.41.236.62)
07:15:53 TheBlingInTheNor parts (1829ec3e@24.41.236.62) ()
07:18:52 nineonine joins (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4)
07:20:05 stux|RC joins (stux2@grid9.quadspeedi.net)
07:23:17 × nineonine quits (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4) (Ping timeout: 258 seconds)
07:26:33 × stux|RC quits (stux2@grid9.quadspeedi.net) (Ping timeout: 240 seconds)
07:33:26 × __minoru__shirae quits (~shiraeesh@109.166.58.81) (Ping timeout: 240 seconds)
07:36:32 × lambdaman quits (~lambdaman@s66-183-152-156.bc.hsia.telus.net) (Remote host closed the connection)
07:37:17 lambdaman joins (~lambdaman@s66-183-152-156.bc.hsia.telus.net)
07:37:42 × wildlander quits (~wildlande@unaffiliated/wildlander) (Quit: Konversation terminated!)
07:38:02 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
07:39:08 ddellacosta joins (~ddellacos@86.106.143.144)
07:40:04 × lambdaman quits (~lambdaman@s66-183-152-156.bc.hsia.telus.net) (Remote host closed the connection)
07:40:18 lambdaman joins (~lambdaman@s66-183-152-156.bc.hsia.telus.net)
07:40:21 × lambdaman quits (~lambdaman@s66-183-152-156.bc.hsia.telus.net) (Remote host closed the connection)
07:40:57 lambdaman joins (~lambdaman@s66-183-152-156.bc.hsia.telus.net)
07:43:48 × ddellacosta quits (~ddellacos@86.106.143.144) (Ping timeout: 265 seconds)
07:43:51 hinsley joins (4b891f5f@gateway/web/cgi-irc/kiwiirc.com/ip.75.137.31.95)
07:45:55 __minoru__shirae joins (~shiraeesh@109.166.58.81)
07:47:07 stux|RC joins (stux2@grid9.quadspeedi.net)
07:47:20 asheshambasta joins (~user@ptr-e1lysav1t8vxyatkqxm.18120a2.ip6.access.telenet.be)
07:48:20 wonko7 joins (~wonko7@62.115.229.50)
07:48:38 × lambdaman quits (~lambdaman@s66-183-152-156.bc.hsia.telus.net) (Ping timeout: 265 seconds)
07:49:14 lambdaman joins (~lambdaman@s66-183-152-156.bc.hsia.telus.net)
07:49:31 Cale_ joins (~cale@cpef48e38ee8583-cm0c473de9d680.cpe.net.cable.rogers.com)
07:50:01 × Cale quits (~cale@cpef48e38ee8583-cm0c473de9d680.cpe.net.cable.rogers.com) (Ping timeout: 260 seconds)
07:50:23 elfets joins (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de)
07:51:26 idhugo joins (~idhugo@87-49-147-45-mobile.dk.customer.tdc.net)
07:54:08 × lambdaman quits (~lambdaman@s66-183-152-156.bc.hsia.telus.net) (Ping timeout: 268 seconds)
08:00:57 nineonine joins (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4)
08:01:07 _ht joins (~quassel@82-169-194-8.biz.kpn.net)
08:01:09 frozenErebus joins (~frozenEre@37.231.244.249)
08:05:02 xiinotulp joins (~q@ppp-27-55-72-27.revip3.asianet.co.th)
08:06:57 hendursa1 joins (~weechat@gateway/tor-sasl/hendursaga)
08:08:13 × plutoniix quits (~q@ppp-223-24-146-11.revip6.asianet.co.th) (Ping timeout: 240 seconds)
08:09:57 × hendursaga quits (~weechat@gateway/tor-sasl/hendursaga) (Ping timeout: 240 seconds)
08:10:01 × frozenErebus quits (~frozenEre@37.231.244.249) (Ping timeout: 260 seconds)
08:10:34 <nut> what is the time complexity of list constructor (:) ?
08:10:43 <nut> is it O(1)?
08:10:49 <Rembane> nut: Yes!
08:11:02 <nut> What about any data constructor ?
08:11:14 <nut> always O(1) ?
08:11:15 <Rembane> Usually O(1)
08:12:51 <Rembane> I suppose Data.Map.insert isn't a constructor, so almost always is a reasonable assumption.
08:13:09 <nut> i see
08:13:16 <Rembane> nut: Is your program being slow?
08:13:37 <c_wraith> When there's a strict field you have to account for the possibility of forcing the field when the constructor is evaluated.
08:14:01 <nut> No, I'm just being curious. I'm trying to solve a bunch of algorithmic problems in Haskell and trying to figure out their time complexity
08:14:03 <c_wraith> But otherwise it's O(1). And even in that case, you can claim it's O(1) and just getting saddled with additional work through no fault of its own.
08:15:34 <nut> When the solution is list based(a lot of them are), I have to be careful to use only O(1) operations
08:15:45 × _xor quits (~xor@74.215.46.133) (Quit: WeeChat 3.1)
08:16:17 <c_wraith> I'd think of it as you have to be careful not to nest O(n) operations.
08:16:38 <c_wraith> because map and the folds are fine to use
08:16:42 ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta)
08:17:20 <nut> Yeah, the other day i also wondered about folds
08:17:51 <c_wraith> well. foldl and foldr are each fine when used in the right cases.
08:18:05 <c_wraith> err. foldl is unlikely to be fine. foldl' is fine
08:18:12 <Rembane> I was just going to say that. :)
08:19:23 <gentauro> here we go again -> https://old.reddit.com/r/haskell/comments/msa3oq/safe_haskell/
08:19:34 frozenErebus joins (~frozenEre@37.231.244.249)
08:19:39 <gentauro> why the heck are people so eager to remove `Safe Haskell`?
08:20:03 <nut> I've used foldr the other day for traversing the list backwards: https://leetcode.com/problems/next-greater-element-i/discuss/1161837/6-lines-Haskell-Implementation
08:20:04 <gentauro> the single feature that makes Haskell unique and allow us to write `sound` code will be removed?
08:20:08 <gentauro> :(
08:20:21 <nut> But not sure about its performance
08:20:25 <gentauro> anybody of for designning a new programming language that takes Safe Haskell as the core?
08:20:56 × ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 246 seconds)
08:22:04 × wonko7 quits (~wonko7@62.115.229.50) (Ping timeout: 252 seconds)
08:22:29 <Rembane> nut: If you're doing O(1) in the function used in foldr, the whole thing should be O(n)
08:23:14 <nut> Rembane: and recursive function calls too, O(1) ?
08:23:33 fer joins (2f3d8672@47.61.134.114)
08:24:03 <nut> I mean function calls should have a bit more overhead
08:24:26 <c_wraith> gentauro: because no one knows what it does, no one knows what it should do, and no one wants to maintain code that is clearly not used by enough people for there to be a shared understanding
08:24:32 <Rembane> nut: Almost none, and even if they have, they do not affect the O-part, it just adds a constant to each operation
08:25:19 LKoen joins (~LKoen@77.168.9.109.rev.sfr.net)
08:26:15 <c_wraith> gentauro: most notably, no one agrees on what "safe" means, and Safe Haskell doesn't have an opinion. It just reports what modules say.
08:26:17 <gentauro> c_wraith: I would argue that people know what it does. It enforces "correctness". But, if you look enough into Haskell packages, you realize that (way) to many people tend to take the shortcuts and just `inject` here and there stuff
08:26:35 <gentauro> removing the possibility of a the users to rely on the packages
08:26:54 <nut> new question: my code contains plain text passwords for sending smtp emails. after compiling down to binary, is it safe to distrubute to others? can the password be recovered?
08:26:55 <gentauro> I personally find `Safe Haskell` as indispensable for Haskell
08:27:01 × frozenErebus quits (~frozenEre@37.231.244.249) (Ping timeout: 252 seconds)
08:27:05 <gentauro> but sadly, I'm one of the very few
08:27:11 <c_wraith> Safe Haskell is useless because different modules mean different things by "safe"
08:27:12 <nut> the compiliation is done be ghc
08:27:17 <Cale_> Correctness with respect to what though?
08:27:22 <c_wraith> So it has no guarantees you can actually rely on
08:27:23 Cale_ is now known as Cale
08:27:51 <gentauro> perhaps, I should join https://www.well-typed.com/ if they would allow me to work on the Safe Haskell full-time xD
08:28:13 gentauro who would sponsor this? Simon Marlow (FB)? or SPJ (MS)?
08:28:24 <nut> or does ghc has some kind of mechanics to encrypt the code?
08:28:32 <gentauro> c_wraith: it does
08:29:19 lambdaman joins (~lambdaman@s66-183-152-156.bc.hsia.telus.net)
08:29:22 × tomsmeding quits (~tomsmedin@tomsmeding.com) (Quit: ZNC 1.8.2 - https://znc.in)
08:29:40 <gentauro> when I turn on safe haskell, I can't use `Data.Text` because there is some `unsafePerformIO`
08:29:47 <gentauro> I like that GHC tells me that
08:29:59 <c_wraith> Only because the text package decided to tell you that
08:30:08 <c_wraith> If a package decided not to tell you, you wouldn't know
08:30:25 gentauro «when I turn on safe haskell» should be «when I turn on safe haskell and add `-XSafe -fpackage-trust -trust = base`»
08:30:43 tomsmeding joins (~tomsmedin@tomsmeding.com)
08:31:17 <gentauro> c_wraith: how come? How do you tell?
08:31:41 <gentauro> my understanding is that packages are infered to be safe or unsafe right?
08:31:44 <gentauro> by GHC
08:31:58 × hinsley quits (4b891f5f@gateway/web/cgi-irc/kiwiirc.com/ip.75.137.31.95) (Ping timeout: 252 seconds)
08:32:04 <gentauro> if a package is unsafe, you can't mark it as safe. You can mark it as trustworthy
08:32:31 <c_wraith> that only gets you unsafe things from base
08:32:37 <c_wraith> what about other unsafe things?
08:33:55 <gentauro> c_wraith: https://gitlab.com/uniprocess/haskell-template/-/blob/master/pkg/uniprocess/package.yaml#L37-47
08:34:11 <gentauro> this is how I trust packages that I want to use
08:34:44 <c_wraith> If you're trusting array, you've already got no safety
08:35:21 × nineonine quits (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4) (Ping timeout: 258 seconds)
08:35:30 mikoto-chan joins (~anass@gateway/tor-sasl/mikoto-chan)
08:35:47 <gentauro> c_wraith: how come?
08:36:00 × jao quits (~jao@pdpc/supporter/professional/jao) (Ping timeout: 265 seconds)
08:36:27 × T-Junk quits (~T-Junk@178.239.168.171) (Remote host closed the connection)
08:36:43 <gentauro> you understand that you are allowed to use FFI and code is still Safe right? http://blog.stermon.com/articles/2019/02/04/haskell-usage-of-malloc-free-is-safe.html
08:36:50 <gentauro> it's the way you expose your logic
08:37:34 <gentauro> in my snippet, I use a lot of FFI, but, since all my logic exposes IO in the signatures it's fine as the consumer will understand that something happens under the hood
08:38:35 <gentauro> what tends to happen with a lot of libraries is that `peeps` hide `IO`. Search (CTRL+F Main.hs) http://blog.stermon.com/articles/2019/02/09/haskell-bitonic-sorter-concurrent.html
08:39:23 <gentauro> you can see that I `remove` IO in `trust = unsafePerformIO . sort`. If I do this, I need to tell people using my logic that "I'm doing some `nasty` stuff under the hood, so be aware"
08:41:50 × lambdaman quits (~lambdaman@s66-183-152-156.bc.hsia.telus.net) (Ping timeout: 252 seconds)
08:45:35 <gentauro> tdammers: Hey, they really want to remove Safe Haskell :( https://old.reddit.com/r/haskell/comments/msa3oq/safe_haskell/guy6upc/
08:46:24 <gentauro> tdammers: what is well-typed stand on this? :)
08:50:54 JackSparrow joins (~JackSparr@139.28.218.148)
08:52:47 Varis joins (~Tadas@unaffiliated/varis)
08:53:02 × jamestmartin quits (james@jtmar.me) (Quit: ZNC 1.8.2+deb2+b1 - https://znc.in)
08:53:19 jamestmartin joins (james@jtmar.me)
08:56:51 ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta)
09:01:01 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
09:01:30 hypercube joins (hypercube@gateway/vpn/protonvpn/hypercube)
09:01:37 × ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 265 seconds)
09:02:21 rdivyanshu joins (uid322626@gateway/web/irccloud.com/x-ogmvxpqranhkqdsz)
09:03:19 × darjeeling_ quits (~darjeelin@115.215.40.116) (Ping timeout: 252 seconds)
09:03:21 jumper149 joins (~jumper149@80.240.31.34)
09:03:43 <Cale> gentauro: By the way, it's not necessarily safe to compile (or load in ghci) Haskell code that is marked as safe using safe Haskell. One thing it can do is run an arbitrary preprocessor program that, for instance can be an included shell script.
09:03:46 darjeeling_ joins (~darjeelin@115.215.40.116)
09:05:32 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds)
09:08:28 <Cale> So, Safe Haskell preventing Template Haskell from being used might be seen as a bit strange, given that you could run a shell script that compiles a separate Haskell program that does a source to source translation, and runs that program to transform the code.
09:09:06 <nshepperd2> how? ghc pragmas?
09:09:22 <Cale> {-# OPTIONS_GHC -F -pgmF foo.sh #-}
09:09:27 <Cale> yeah
09:09:47 <nshepperd2> seems like it should be relatively straightforward to turn those off
09:10:00 <nshepperd2> compare to, like, implementing all of SafeHaskell
09:12:06 lambdaman joins (~lambdaman@s66-183-152-156.bc.hsia.telus.net)
09:12:12 × jess quits (jess@freenode/staff/jess) (Quit: back soon)
09:14:00 <Cale> Well, maybe... there are a bunch of potentially sneaky flags to look for though
09:14:19 fendor joins (~fendor@178.165.130.27.wireless.dyn.drei.com)
09:14:34 <nshepperd2> i assume lambdabot doesn't let you do this
09:14:56 <c_wraith> lambdabot doesn't let you add pragmas at all
09:15:33 × freegraph quits (~freegraph@103.58.155.176) (Quit: Leaving)
09:16:03 <nshepperd2> perfect
09:16:32 × lambdaman quits (~lambdaman@s66-183-152-156.bc.hsia.telus.net) (Ping timeout: 240 seconds)
09:16:58 <gentauro> nshepperd2: I agree :)
09:17:23 <gentauro> Cale: if your project uses the -XSafe flag, you can't even start `ghci` ;)
09:17:24 frozenErebus joins (~frozenEre@37.231.244.249)
09:17:46 <gentauro> when I do (ad-hoc) development, I need to comment the -XSafe flag …
09:18:30 <Cale> gentauro: I mean, you can still build a project that uses -XSafe, and ghc will interpret the {-# OPTIONS_GHC ... #-} pragmas in it
09:18:40 <gentauro> my understanding is that compiler flags will always overwrite file flags right? And you can allow/dissallow which pragmas can be used by a project
09:19:56 <gentauro> oh
09:20:13 <gentauro> and since `OPTIONS_GHC` can't be disallowed,
09:20:25 <gentauro> then a Safe file will execute a script?
09:20:31 <Cale> yep
09:20:35 <gentauro> wow, that is some bad desing
09:22:11 <Cale> Safe Haskell doesn't mean it's safe to compile the code, it means a bunch of random stuff which has to do with trying to make sure expression evaluation is referentially transparent... but which might be mistaken for stuff that has to do with making it safe to build the code, especially given TH being forbidden is one of the things it does.
09:23:48 lambdaman joins (~lambdaman@s66-183-152-156.bc.hsia.telus.net)
09:24:04 <nshepperd2> the reddit post links to https://gitlab.haskell.org/ghc/ghc/-/issues/19590 but removing safe haskell doesn't really seem like it will solve the problem
09:24:49 ClaudiusMaximus joins (~claude@cpc98210-croy26-2-0-cust137.19-2.cable.virginm.net)
09:24:49 × ClaudiusMaximus quits (~claude@cpc98210-croy26-2-0-cust137.19-2.cable.virginm.net) (Changing host)
09:24:49 ClaudiusMaximus joins (~claude@unaffiliated/claudiusmaximus)
09:28:00 <Cale> Well, I haven't seen the reddit post, but yeah, the thing Ed's suggesting is a solution to one of the things that makes Safe Haskell annoying for package maintainers at least.
09:28:11 × lambdaman quits (~lambdaman@s66-183-152-156.bc.hsia.telus.net) (Ping timeout: 240 seconds)
09:28:26 <Cale> Removing Safe Haskell would be a more extreme solution to the annoyance, I suppose :P
09:28:33 <nshepperd2> i mean, ed filed the bug because he wants to use safe haskell
09:29:03 <nshepperd2> if he didn't want his code to work in irc bots and such he could just not use the extension at all
09:29:05 <Cale> Well, maybe, or he has users who want to use Safe Haskell at least.
09:29:11 thblt parts (~thblt@unaffiliated/thblt) ("ERC (IRC client for Emacs 28.0.50)")
09:29:37 <Cale> (I doubt he personally cares about it all that much, but I don't really know)
09:29:42 <nshepperd2> pointing to that bug as a reason to remove safe haskell seems deeply confused
09:31:08 <gentauro> wouldn't it be a fair approach, for all the `peeps` that don't want to use `Safe Haskell` to just mark all their work is `Unsafe`?
09:31:08 × Sgeo quits (~Sgeo@ool-18b98aa4.dyn.optonline.net) (Read error: Connection reset by peer)
09:31:09 × heatsink quits (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
09:31:22 <gentauro> I mean, if they don't care about safety, well that's what `unsafe` is for :)
09:31:35 <Cale> The deeper thing is that it's unclear to everyone what "safe" really ought to mean, including the designers of Safe Haskell. It's already a conglomerate of a few unrelated kinds of safety, and those kinds of safety don't necessarily imply what someone might be thinking of when they see the word "safe".
09:32:40 <gentauro> so my understanding from Taylor Fausak tweet a time ago on Safe Haskell was that only 2% of Haskellers care about Safe (or have heard of it)
09:33:05 <Cale> I don't know that removing it altogether is the right thing to do, but pulling it apart into some things that have more clearly-defined goals might make sense.
09:34:49 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
09:36:02 <nshepperd2> most of the machinery there seems to exist to prove the kind of safety where an Int is actually an Int and not a set of instructions for launching the missiles
09:36:10 ddellacosta joins (~ddellacos@86.106.143.183)
09:36:35 <nshepperd2> it probably does make sense to separate "it's safe to compile this" into a separate feature
09:37:28 <maerwald> haskell can be made safe?
09:39:14 <nshepperd2> sure why not
09:39:20 × idhugo quits (~idhugo@87-49-147-45-mobile.dk.customer.tdc.net) (Ping timeout: 246 seconds)
09:40:30 × ddellacosta quits (~ddellacos@86.106.143.183) (Ping timeout: 252 seconds)
09:41:22 <gentauro> my understanding of Safe Haskell, still has to do with some `runtime` guarantees provided at compile time
09:41:29 <Cale> Also, with the way that it currently is, there are a lot of things which are "unsafe" which one might not care about so much when deciding what goes in the trusted set, but membership in the trusted set is all-or-nothing.
09:42:11 <gentauro> in the sense that: "when you run this, it wouldn't launch the missiles" and not so much "when you build this, it wouldn't launch the missiles"
09:42:15 <gentauro> right?
09:42:43 × drbean_ quits (~drbean@TC210-63-209-220.static.apol.com.tw) (Quit: ZNC 1.8.2+cygwin2 - https://znc.in)
09:43:03 gentauro the last sentence Cale just showed that with `OPTIONS_GHC` pragma, you can run stuff when compiling, but not at runtime
09:43:49 <Cale> So, if you think it's okay to trust package foo because you had a look at foo-1.0 and it just uses Data.Coerce a bit for the sake of performance, well, when foo-1.1 comes out and does an unsafePerformIO, you're already trusting it.
09:44:31 <gentauro> Cale: you can't mark a package at `trustworthy` if they don't expose `unsafePerformIO` ;)
09:44:42 <gentauro> that's what is happening with `Data.Text`
09:45:04 <Cale> hm?
09:45:20 <Cale> text is marked trustworthy
09:45:42 <Cale> Or at least, the Data.Text module is
09:45:52 <Cale> But that's not what I'm talking about
09:45:53 <gentauro> Cale: not building -> https://uniprocess.org/template.html ;)
09:47:05 <Cale> What I mean is that if you decide to add text to your trusted package set, then that's the end of it, pretty much. Anything it marks as trustworthy, you're fine with.
09:47:06 <nshepperd2> I don't understand that
09:47:07 gentauro let me rephrase: «Cale: you can't mark a package at `trustworthy` if they don't expose `unsafePerformIO` ;)» as «Cale: you can't mark a package at `trustworthy` if they use `unsafePerformIO` and don't expose it in the signature ;)»
09:47:29 bitmagie joins (~Thunderbi@200116b8068a3b00488727cbe58c7a6a.dip.versatel-1u1.de)
09:47:48 <nshepperd2> can't how? is this a philosophical objection to adding -trust=text?
09:48:02 × bitmagie quits (~Thunderbi@200116b8068a3b00488727cbe58c7a6a.dip.versatel-1u1.de) (Client Quit)
09:48:45 <gentauro> nshepperd2: I tried, GHC doesn't build
09:49:00 <Cale> Trustworthy doesn't impose any restrictions on the module being marked as such
09:49:12 <nshepperd2> huh?
09:49:45 <Cale> Ah, well, it adds a couple, but not much
09:50:12 <Cale> Trustworthy modules are allowed to invoke unsafe things
09:50:30 <Cale> That's the point of Trustworthy vs. Safe
09:50:30 <gentauro> Cale: that is correct
09:50:45 <Cale> But there's no distinction between different kinds of "unsafe" things
09:51:56 Major_Biscuit joins (~Major_Bis@82-169-100-198.biz.kpn.net)
09:52:02 <Cale> So if you think a package is good enough about its present interpretation of "Trustworthy" to add it to your trusted set, once you've done that, you're never going to be warned if that package starts using things that are more likely to be problematic -- no such distinction exists.
09:55:13 <nshepperd2> well, -trust=foo means either that you trust the foo maintainer to verify referential transparency to your satisfaction or that you personally checked that specific version of the code, i suppose
09:55:21 × jbetz_ quits (uid283648@gateway/web/irccloud.com/x-ebjzdarufjrfhfrh) (Quit: Connection closed for inactivity)
09:55:38 <Cale> yeah
09:58:28 <nshepperd2> you could imagine a more fine grained system where you -trust=Module.Name or even -trust=package-version.Module.Name.identifier
09:58:29 <Cale> But of course, I could also have just done that without Safe Haskell... I think it's just at an awkward place, where it doesn't quite accomplish enough to be useful more often than it is an annoyance.
09:58:50 <nshepperd2> not sure who would want to go to that extent though
10:00:24 <nshepperd2> well the point of safe haskell isn't to verify Trustworthy modules for you... it's for verifying the Safe modules
10:00:30 <Cale> It might be nice to be able to say "I trust anything to use Unsafe.Coerce", and then if that was the only violation of a Trustworthy module, then it gets approved.
10:00:44 <gentauro> «Not in scope: ‘System.Environment.withArgs’» and «Not in scope: ‘Control.Monad.void’» by added `-XSafe` to a stack script: https://pastebin.ubuntu.com/p/5nvcpMDrtg/
10:01:11 <gentauro> so I guess -Xsafe remove modules from `base` that doesn't live-up to it's requirements?
10:01:34 <Cale> Well, not all the modules in base are marked Safe
10:02:06 <nshepperd2> gentauro: it should print out a bunch of errors saying that things can't be safely imported
10:02:13 <Cale> er, I meant to say Data.Coerce above, not Unsafe.Coerce, haha
10:02:34 <Cale> (but it was a metavariable anyway)
10:02:49 <nshepperd2> then you add -trust=base and then it lets you import those modules
10:03:51 <gentauro> nshepperd2: it doesn't. But it might be to the nature of `stack` (wrapping?)
10:03:56 <Cale> System.Environment is marked Safe though
10:04:09 <gentauro> but normally when I build with GCH, it gives me all those kind of errors as you mention
10:04:16 <Cale> That error looks like something else, I'm not sure
10:04:41 <nshepperd2> ah, a stack misfeature
10:04:59 <gentauro> Cale: Probably. I really haven't got `-XSafe` to work with `ghci` so I think it will probably not work with `stack scripts` neither
10:05:19 <nshepperd2> "ghci -XSafe -fpackage-trust -trust=base -trust=text" works just fine for me
10:05:20 <Cale> Yeah, I haven't ever had an occasion to use stack, so I don't know what its quirks are
10:05:45 <nshepperd2> I can import Data.Text and do stuff with it, no problems
10:06:29 <gentauro> nshepperd2: so it's fixed? :o
10:06:53 gentauro I have to be honest that last time I tried, it was ages ago (COVID-19 has destroyed my notion of time)
10:07:31 <Cale> gentauro: Well, I don't think nshepperd was using stack...
10:07:44 z88 joins (~z88@221.85-84-199.dynamic.clientes.euskaltel.es)
10:07:53 <gentauro> Cale: no, I was refering to: "ghci -XSafe -fpackage-trust -trust=base -trust=text"
10:08:12 <gentauro> that's huge (if I can finally use the Data.Text package) :)
10:08:16 <Cale> That was broken?
10:08:32 <gentauro> Cale: around 2018 - 2019 it was :)
10:08:35 aveltras joins (uid364989@gateway/web/irccloud.com/x-uutfhochnudnpuow)
10:08:46 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
10:08:53 <gentauro> but again, 2019 in my brain was just "not long time ago"
10:08:56 ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta)
10:10:04 <aveltras> is there a way to get "C♯O" to work as a data constructor using extensions or something ? I guess not because of reserver character (note this isn't the classic "#") but still ask because it would be nice since "D♭0" works fine
10:10:45 <Cale> I think that'll parse as the application of the infix operator ♯ to C and 0
10:11:19 <Cale> It's odd to me that one would work and not the other?
10:11:43 <aveltras> i get "not a data constructor '♯'
10:11:51 <aveltras> oh wait
10:11:58 <Cale> Well, yeah, it's... not a data constructor
10:12:07 <aveltras> in fact neither works, it complains about the second if first is commented out
10:12:13 <aveltras> too bad then
10:12:16 <Cale> The only "uppercase" symbol character is :
10:12:46 <Cale> But you probably wanted that to parse as all one identifier name, which it won't, because it's a mix of alphanums and symbols
10:12:55 <gentauro> yeah, it is fixed :o
10:12:58 × Major_Biscuit quits (~Major_Bis@82-169-100-198.biz.kpn.net) (Ping timeout: 240 seconds)
10:12:58 <gentauro> `stack ghci --ghc-options -XSafe --ghc-options -fpackage-trust --ghc-options -trust=base --ghc-options -trust=text`
10:13:06 × ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 240 seconds)
10:13:12 <Cale> aveltras: You could make a ♯ function...
10:13:21 <gentauro> `λ> import Data.Text (0.01 secs, 0 bytes)`
10:13:37 <gentauro> `λ> import System.IO.Unsafe<no location info>: error:System.IO.Unsafe: Can't be safely imported!The module itself isn't safe.`
10:13:40 <gentauro> nice !!!
10:13:54 <Cale> aveltras: I kind of hate this suggestion though ;)
10:14:30 <aveltras> i'll stick with the spelled version then (Csharp0, Dflat0), a bit uglier on the eyes though
10:14:40 <Cale> Like, (♯) :: Diatonic -> Octave -> Note
10:14:43 <Cale> haha
10:16:06 × malumore quits (~malumore@151.62.123.9) (Ping timeout: 240 seconds)
10:16:06 × nut quits (~user@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 240 seconds)
10:18:56 Codaraxis_ joins (~Codaraxis@141.98.255.147)
10:19:27 <Cale> Or you could make an ordinary sharp function which takes a note (probably in some more convenient representation) and goes up by 8 perfect fifths and then down 4 octaves ;)
10:21:13 × Codaraxis quits (Codaraxis@gateway/vpn/mullvad/codaraxis) (Ping timeout: 240 seconds)
10:23:12 × geowiesnot quits (~user@87-89-181-157.abo.bbox.fr) (Ping timeout: 240 seconds)
10:23:33 <aveltras> im not that familiar with music theory right now, just wanted to reproduce https://pages.mtu.edu/~suits/notefreqs.html with a big sum type, not sure that's the best way to approach this anyway, might be better to have the seven notes and a ToFrequency typeclass which takes the note and a "modifier" # b since in the end, i'll probably parse those from strings
10:25:18 <Cale> Whenever a type has more data constructors than there will be times that you're going to ever pattern match on it completely, one thing to consider is whether you'd rather just make a record of the results of those pattern matches
10:28:27 <aveltras> i guess that's the case here :)
10:29:58 <Cale> > [2**(k/12) * 440 | k <- [-57 ..]]
10:30:00 <lambdabot> [16.351597831287414,17.323914436054505,18.354047994837977,19.445436482630058...
10:30:16 <Cale> That's the formula for the frequency column in that table btw
10:30:20 nicholasbulka joins (~nicholasb@2601:900:4301:da0:34df:482b:a0b7:2d77)
10:31:21 <Cale> The wavelength is just the speed of sound divided by the frequency.
10:31:45 heatsink joins (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
10:32:39 nineonine joins (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4)
10:33:42 <Cale> If I was only concerned with 12 tone equal temperament, I would probably just use integer values for notes -- probably can't go too wrong with MIDI's convention.
10:34:34 × nicholasbulka quits (~nicholasb@2601:900:4301:da0:34df:482b:a0b7:2d77) (Ping timeout: 258 seconds)
10:35:33 <Cale> btw, I was off by one above, should have been 7 perfect fifths (of course, I was thinking it was the eighth note along the circle of fifths, lol)
10:35:49 <Cale> > (3/2)^7 / 2^4
10:35:51 <lambdabot> 1.06787109375
10:35:57 <Cale> > 2^(1/12)
10:35:59 <lambdabot> error:
10:35:59 <lambdabot> • Could not deduce (Integral b0) arising from a use of ‘^’
10:35:59 <lambdabot> from the context: Num a
10:36:02 <Cale> > 2**(1/12)
10:36:04 <lambdabot> 1.0594630943592953
10:36:08 <aveltras> im not even sure what i need right now, the temporary goal is to have a svg with frets of a sitar being colored when a note is played and sound playing in the browser, still experimenting with sound apis
10:36:20 <Cale> ahh, cool
10:36:49 × heatsink quits (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 252 seconds)
10:36:57 <Cale> The frets of most sitars are not tuned to equal temperament :)
10:38:06 <aveltras> ye, right now im still a beginner, so just the fact of mapping sitar tuning in my head to western tuning is kind of irritating when tuning the strings
10:38:27 <Cale> Well, they're movable, but people position them according to various just intonations I think
10:38:32 <aveltras> not sure i can extract a frequency from the microphone browser apis but that would be neat too
10:38:52 lambdaman joins (~lambdaman@s66-183-152-156.bc.hsia.telus.net)
10:42:43 <Cale> If you know the frequency f0 of the open string, you can take the frequency you hear f1, and f0/f1 will be the fraction of the length of the string that the fret is at
10:43:36 × lambdaman quits (~lambdaman@s66-183-152-156.bc.hsia.telus.net) (Ping timeout: 265 seconds)
10:44:29 <Cale> e.g. double the frequency, half the string length
10:45:22 ddellacosta joins (~ddellacos@86.106.143.10)
10:46:33 <aveltras> ye, i'll have to experiment with this
10:48:30 thblt joins (~thblt@unaffiliated/thblt)
10:49:05 berberman joins (~berberman@unaffiliated/berberman)
10:49:35 × berberman_ quits (~berberman@unaffiliated/berberman) (Ping timeout: 260 seconds)
10:49:53 × ddellacosta quits (~ddellacos@86.106.143.10) (Ping timeout: 265 seconds)
10:50:06 × nisstyre quits (wes@python-zero/conduct-committee/nisstyre) (Ping timeout: 258 seconds)
10:51:38 <Cale> (of course, if the string is bent, it'll be a higher pitch :)
10:53:19 ph88 joins (~ph88@2a02:8109:9e00:7e5c:d5ef:86b3:afc4:9258)
10:54:25 <Cale> (that happens because the speed of sound in the string changes under tension)
10:54:59 × ph88 quits (~ph88@2a02:8109:9e00:7e5c:d5ef:86b3:afc4:9258) (Client Quit)
10:55:15 <fendor> is there a convenient way with stack to generate a html report for a package? `stack haddock` generates it correctly, but it prints the path to a .html file with lots of other stuff in between.
10:55:23 × JackSparrow quits (~JackSparr@139.28.218.148) (Remote host closed the connection)
10:55:29 kuribas joins (~user@ptr-25vy0ia8k0uf95hxb72.18120a2.ip6.access.telenet.be)
10:56:19 zeenk joins (~zeenk@2a02:2f04:a10b:af00:91ba:3645:1cdb:9a75)
10:57:20 HannaM joins (~quassel@p54849510.dip0.t-ipconnect.de)
10:57:31 <tdammers> gentauro: I don't think Well-Typed has any particular stance on the matter, though I'm sure some of us individually do
10:58:08 × Varis quits (~Tadas@unaffiliated/varis) (Remote host closed the connection)
10:59:24 <tdammers> aveltras: I've done some modest work in that area myself, and IMO you want separate types for "chromatic pitches" (12 chromatic steps to the octave) and "diatonic pitches with accidentals" (7 diatonic steps to the octave, plus an arbitrary number of flats/sharps isomorphic to the integers)
11:00:02 <tdammers> so F# could be represented in the chromatic type as "6 chromatic steps up from C", or in the diatonic system as "3 diatonic steps up from C with one sharp"
11:00:20 <tdammers> in the chromatic system, F# and Gb are equal; in the diatonic one, they're not
11:01:31 dyeplexer joins (~lol@unaffiliated/terpin)
11:01:36 <tdammers> to calculate 12-TET frequencies, you need to first convert diatonic pitches to chromatic ones; then you can take the chromatic distance from your reference pitch (a' = 440 Hz or whatever you want to use), and throw that into the 2^(n/12) formula
11:02:11 <thblt> haskell-mode in Emacs seems to support inline SVG in ghci, does anyone have an exemple of how to use this?
11:02:14 nisstyre joins (wes@python-zero/conduct-committee/nisstyre)
11:02:25 <tdammers> for various just intonations, there's not really an alternative to following the steps that the tuning system uses
11:04:02 × __minoru__shirae quits (~shiraeesh@109.166.58.81) (Ping timeout: 246 seconds)
11:04:05 × nineonine quits (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4) (Ping timeout: 250 seconds)
11:14:18 lambdaman joins (~lambdaman@s66-183-152-156.bc.hsia.telus.net)
11:19:10 × lambdaman quits (~lambdaman@s66-183-152-156.bc.hsia.telus.net) (Ping timeout: 252 seconds)
11:23:46 × xiinotulp quits (~q@ppp-27-55-72-27.revip3.asianet.co.th) (Ping timeout: 240 seconds)
11:24:35 coot joins (~coot@37.30.50.130.nat.umts.dynamic.t-mobile.pl)
11:25:31 ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta)
11:30:26 × ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 240 seconds)
11:33:31 × HarveyPwca quits (~HarveyPwc@c-98-220-98-201.hsd1.il.comcast.net) (Quit: Leaving)
11:35:07 × frozenErebus quits (~frozenEre@37.231.244.249) (Ping timeout: 252 seconds)
11:35:43 <olligobber> I managed to make a lambda have type (a -> a) -> a in haskell, using only function application, lambdas, and newtype constructors and destructors
11:37:12 xiinotulp joins (~q@node-umb.pool-125-24.dynamic.totinternet.net)
11:37:51 dmytrish joins (~mitra@2a02:8084:a82:d900:319a:d200:a43d:3e3c)
11:38:56 × jamestmartin quits (james@jtmar.me) (Quit: ZNC 1.8.2+deb2+b1 - https://znc.in)
11:39:26 jamestmartin joins (james@jtmar.me)
11:40:33 <olligobber> I'm surprised having recursive types gives you recursive values
11:41:27 geowiesnot joins (~user@87-89-181-157.abo.bbox.fr)
11:41:48 × rdivyanshu quits (uid322626@gateway/web/irccloud.com/x-ogmvxpqranhkqdsz) (Quit: Connection closed for inactivity)
11:43:23 Feuermagier joins (~Feuermagi@2a02:2488:4211:3400:7285:c2ff:fe22:172e)
11:46:29 Deide joins (~Deide@217.155.19.23)
11:51:11 × Codaraxis_ quits (~Codaraxis@141.98.255.147) (Remote host closed the connection)
11:51:35 Codaraxis_ joins (~Codaraxis@141.98.255.147)
12:03:33 × Codaraxis_ quits (~Codaraxis@141.98.255.147) (Remote host closed the connection)
12:03:48 <tomsmeding> olligobber: see also the third bullet point under https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/bugs.html#bugs-in-ghc
12:03:54 Codaraxis_ joins (~Codaraxis@141.98.255.147)
12:05:13 ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta)
12:05:26 <wz1000> gentauro: you can write unsafeCoerce (and so unsafePerformIO) in SafeHaskell
12:05:39 × ericsagnes quits (~ericsagne@2405:6580:0:5100:c907:2b1b:a88e:a342) (Ping timeout: 260 seconds)
12:05:42 × Codaraxis_ quits (~Codaraxis@141.98.255.147) (Remote host closed the connection)
12:05:46 <olligobber> tomsmeding, oh, interesting
12:05:57 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
12:06:03 Codaraxis_ joins (~Codaraxis@141.98.255.147)
12:06:26 lambdaman joins (~lambdaman@s66-183-152-156.bc.hsia.telus.net)
12:07:10 Varis joins (~Tadas@unaffiliated/varis)
12:07:18 frozenErebus joins (~frozenEre@37.231.244.249)
12:07:19 jtk joins (~jtk@178.239.168.171)
12:07:51 machinedgod joins (~machinedg@24.105.81.50)
12:07:52 × zaquest quits (~notzaques@5.128.210.178) (Ping timeout: 240 seconds)
12:09:38 × ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 240 seconds)
12:10:20 Sornaensis joins (~Sornaensi@077213199124.dynamic.telenor.dk)
12:10:53 × lambdaman quits (~lambdaman@s66-183-152-156.bc.hsia.telus.net) (Ping timeout: 246 seconds)
12:13:04 zaquest joins (~notzaques@5.128.210.178)
12:15:13 × star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Ping timeout: 240 seconds)
12:18:10 ericsagnes joins (~ericsagne@2405:6580:0:5100:500e:ae68:cb1a:24a)
12:21:58 star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com)
12:25:24 LKoen_ joins (~LKoen@77.168.9.109.rev.sfr.net)
12:28:00 × LKoen quits (~LKoen@77.168.9.109.rev.sfr.net) (Ping timeout: 265 seconds)
12:31:27 × hendursa1 quits (~weechat@gateway/tor-sasl/hendursaga) (Quit: hendursa1)
12:31:43 hendursaga joins (~weechat@gateway/tor-sasl/hendursaga)
12:33:53 heatsink joins (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
12:34:34 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
12:38:01 __monty__ joins (~toonn@unaffiliated/toonn)
12:38:21 × heatsink quits (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 260 seconds)
12:40:14 terra joins (53fbe65d@c83-251-230-93.bredband.comhem.se)
12:40:46 terra parts (53fbe65d@c83-251-230-93.bredband.comhem.se) ()
12:40:53 __minoru__shirae joins (~shiraeesh@109.166.58.81)
12:41:04 malumore joins (~malumore@151.62.123.9)
12:42:21 drbean_ joins (~drbean@TC210-63-209-202.static.apol.com.tw)
12:43:06 TerraDOOM joins (53fbe65d@c83-251-230-93.bredband.comhem.se)
12:43:28 Major_Biscuit joins (~Major_Bis@82-169-100-198.biz.kpn.net)
12:43:39 <TerraDOOM> is this a place I can ask questions?
12:44:55 <[exa]> yes, you just tested it.
12:45:06 <TerraDOOM> fair point
12:45:06 ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta)
12:45:11 × star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Ping timeout: 240 seconds)
12:45:31 <merijn> >.>
12:46:22 <TerraDOOM> anyway, I'm trying to apply a function created by composing an infinite list, and can't really figure out how to do it lazily
12:47:21 <TerraDOOM> `recDice3 = foldl (flip (.)) id (map (mapEvery update) [2..])` this is the definition I've got, update is simply Int -> Int
12:48:01 <TerraDOOM> oh right, `mapEvery` is just map but applies to only the nth element
12:48:22 <TerraDOOM> or only every nth* I should say
12:48:24 <merijn> Maybe your mapEvery isn't "productive" enough? Hard to say without seeing its implementation
12:49:18 <TerraDOOM> is there ``` for multiline formatting or anything of the sort?
12:49:58 <[exa]> nope, all ascii. But `this` or ⌜this⌝ is a nice way to mark code in ascii too
12:50:00 <__monty__> Isn't the problem foldl's "strict"ness?
12:50:04 × ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 252 seconds)
12:50:16 <TerraDOOM> I tried foldr, didn't work
12:50:20 <TerraDOOM> `
12:50:20 <TerraDOOM> mapEvery :: (a -> a) -> Int -> [a] -> [a]
12:50:21 <TerraDOOM> mapEvery f n xs = take (n-1) xs ++ case drop (n-1) xs of
12:50:21 <TerraDOOM>                                      y : ys -> f y : mapEvery f n ys
12:50:22 <TerraDOOM>                                      [] -> []
12:50:22 <TerraDOOM> `
12:50:32 <TerraDOOM> didn't work the way I wanted it to but oh well
12:50:52 <[exa]> TerraDOOM: also, if sharing code samples with more than 1 line, please pastebin them instead, it's better if there are more than 2-3 discussions going on
12:51:00 <TerraDOOM> will do, sorry
12:51:00 <[exa]> </irc_primer>
12:51:21 <[exa]> np now I guess
12:52:38 × Major_Biscuit quits (~Major_Bis@82-169-100-198.biz.kpn.net) (Ping timeout: 252 seconds)
12:53:31 <[exa]> TerraDOOM: btw you might want to check `iterate` and similar functions, looks like you're trying to that with your foldl
12:54:03 × olligobber quits (olligobber@gateway/vpn/privateinternetaccess/olligobber) (Remote host closed the connection)
12:55:26 × gnumonic quits (~gnumonic@c-73-170-91-210.hsd1.ca.comcast.net) (Ping timeout: 240 seconds)
12:56:39 <TerraDOOM> what're the similar functions? `iterate` looks to be pretty close to what I need, but I can't fully see how it'd work out in this case
12:59:05 Major_Biscuit joins (~Major_Bis@82-169-100-198.biz.kpn.net)
13:01:06 × kristijonas quits (~kristijon@78-56-32-39.static.zebra.lt) (Ping timeout: 240 seconds)
13:01:44 <TerraDOOM> for some extra context, I'm just trying to implement a naive, brute force "solution" for project euler problem 641, mainly to check my actual solution for correctness
13:02:46 kristijonas joins (~kristijon@78-56-32-39.static.zebra.lt)
13:05:37 <TerraDOOM> actually I think I can make iterate work how I want it to, nvm
13:07:55 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
13:09:24 <xsperry> > let mapEvery n f = map (\(i, x) -> if i `mod` n == 0 then f x else x) . zip [1..] in mapEvery 2 (*10) [1..5]
13:09:26 <lambdabot> [1,20,3,40,5]
13:10:14 × whataday quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
13:11:21 whataday joins (~xxx@2400:8902::f03c:92ff:fe60:98d8)
13:12:57 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 268 seconds)
13:16:18 ddellacosta joins (~ddellacos@86.106.143.131)
13:16:26 <TerraDOOM> xsperry: that definition also works, but the issue remains. I'm pretty sure the problem is that it has to compose the whole infinite list before attempting to apply the result
13:19:37 nut joins (~user@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr)
13:19:42 urodna joins (~urodna@unaffiliated/urodna)
13:19:53 × nut quits (~user@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Remote host closed the connection)
13:20:43 × ddellacosta quits (~ddellacos@86.106.143.131) (Ping timeout: 252 seconds)
13:20:47 nut joins (~user@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr)
13:24:51 × nut quits (~user@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Remote host closed the connection)
13:25:41 × Major_Biscuit quits (~Major_Bis@82-169-100-198.biz.kpn.net) (Ping timeout: 240 seconds)
13:26:18 qwerty2o joins (~qwerty2o@188.64.207.157)
13:27:05 × nisstyre quits (wes@python-zero/conduct-committee/nisstyre) (Ping timeout: 250 seconds)
13:29:19 nisstyre joins (wes@python-zero/conduct-committee/nisstyre)
13:32:57 Major_Biscuit joins (~Major_Bis@82-169-100-198.biz.kpn.net)
13:34:20 gzj joins (~gzj@unaffiliated/gzj)
13:36:55 nut joins (~user@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr)
13:38:02 Guest78317 joins (~laudiacay@67.176.215.84)
13:42:06 × coot quits (~coot@37.30.50.130.nat.umts.dynamic.t-mobile.pl) (Ping timeout: 240 seconds)
13:42:56 × Guest78317 quits (~laudiacay@67.176.215.84) (Ping timeout: 260 seconds)
13:44:22 ep1ctetus joins (~epictetus@ip72-194-54-201.sb.sd.cox.net)
13:46:38 Alleria joins (~textual@zrcout.mskcc.org)
13:47:01 Alleria is now known as Guest72361
13:47:08 × gzj quits (~gzj@unaffiliated/gzj) (Remote host closed the connection)
13:47:11 × Major_Biscuit quits (~Major_Bis@82-169-100-198.biz.kpn.net) (Ping timeout: 240 seconds)
13:47:27 gzj joins (~gzj@unaffiliated/gzj)
13:48:21 ddellacosta joins (~ddellacos@86.106.143.131)
13:48:28 × TerraDOOM quits (53fbe65d@c83-251-230-93.bredband.comhem.se) (Quit: Connection closed)
13:53:10 × ddellacosta quits (~ddellacos@86.106.143.131) (Ping timeout: 252 seconds)
13:53:10 × qwerty2o quits (~qwerty2o@188.64.207.157) (Ping timeout: 252 seconds)
13:54:29 × unlink_ quits (~unlink2@p57b853bf.dip0.t-ipconnect.de) (Remote host closed the connection)
13:57:08 unlink2 joins (~unlink2@p57b853bf.dip0.t-ipconnect.de)
13:59:05 × drbean_ quits (~drbean@TC210-63-209-202.static.apol.com.tw) (Quit: ZNC 1.8.2+cygwin2 - https://znc.in)
14:05:02 × unlink2 quits (~unlink2@p57b853bf.dip0.t-ipconnect.de) (Remote host closed the connection)
14:05:26 lambdaman joins (~lambdaman@s66-183-152-156.bc.hsia.telus.net)
14:06:11 unlink2 joins (~unlink2@p57b853bf.dip0.t-ipconnect.de)
14:06:13 × geowiesnot quits (~user@87-89-181-157.abo.bbox.fr) (Ping timeout: 240 seconds)
14:07:10 rond_ joins (5940206b@89-64-32-107.dynamic.chello.pl)
14:07:40 <gentauro> wz1000: I already mentioned that -> http://blog.stermon.com/articles/2019/02/04/haskell-usage-of-malloc-free-is-safe.html
14:08:12 <gentauro> wz1000: the point with Safe Haskell is that as long as you expose your IO effects in the signatures, you are good to go
14:08:45 <gentauro> then the consumer of you library package will have to make a decision to `trust` or `not-trust` it. I find that approach acceptable
14:09:41 × lambdaman quits (~lambdaman@s66-183-152-156.bc.hsia.telus.net) (Ping timeout: 240 seconds)
14:10:55 × Rudd0 quits (~Rudd0@185.189.115.108) (Ping timeout: 268 seconds)
14:12:14 <maerwald> I'm more interested in how my binary behaves than I am about libraries. At least when it's about "safety".
14:12:50 <maerwald> I think the approach there is backwards, but maybe that's just a definition disagreement
14:14:41 <wz1000> gentauro: I don't get it, if you can write `unsafePerformIO` in SafeHaskell, what guarantees are you getting?
14:16:19 × danvet quits (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa) (Ping timeout: 260 seconds)
14:18:16 <gentauro> wz1000: if you write `unsafePerformIO` in Haskell, you can mark you module as `trustworthy`, but never `safe`
14:18:47 <gentauro> then I as a consumer can say: "hmmm, I find wz1000 work trustable" and I therefore trust you package
14:19:18 gentauro normally, you would spend time going through the code and check yourself
14:19:52 <wz1000> gentauro: but you are forgetting about GHC bugs
14:19:59 <wz1000> https://gist.github.com/708c43a3ed4438c4850966479cf0be16
14:20:06 <gentauro> the point is, if Safe Haskell is removed, then we could just rename everything to `npm` cos we would be as bad as them
14:20:32 <wz1000> but we are as bad as them already
14:20:33 ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta)
14:20:44 <wz1000> and nobody is seriously attempting to make us any better
14:21:36 × gzj quits (~gzj@unaffiliated/gzj) (Remote host closed the connection)
14:21:59 <gentauro> wz1000: `<interactive>:3:7: error: Variable not in scope: unsafeCoerce`
14:22:04 × frozenErebus quits (~frozenEre@37.231.244.249) (Ping timeout: 265 seconds)
14:22:11 <gentauro> with `stack ghci --ghc-options -XSafe --ghc-options -fpackage-trust --ghc-options -trust=base`
14:22:38 <gentauro> wz1000: so Safe Haskell works as expected ;)
14:23:10 gentauro please Mr. Haskells peeps, don't remove Safe Haskell, converting the language to JavaScript 0.11 + npm :(
14:23:30 <maerwald> I don't think safe haskell has significant impact on ecosystem quality
14:23:46 <wz1000> gentauro: are you running the same code? I can run it with ghci -XSafe -fpackage-trust -trust=base LaunchMissiles.hs
14:24:06 gentauro haven't our (devs) people suffered enough?
14:24:07 <wz1000> gentauro: there is a definition of unsafeCoerce in the file...
14:25:04 <gentauro> wz1000: oh, I thought you were pointing to `unsafeCoerce`. My bad :9
14:25:04 × ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 252 seconds)
14:25:16 dpl joins (~dpl@77-121-78-163.chn.volia.net)
14:26:26 <gentauro> wz1000: your code works
14:26:27 <gentauro> :(
14:26:30 <maerwald> https://hackage.haskell.org/package/directory-1.3.6.1/docs/System-Directory.html this is Safe haskell, but on windows it will likely fail to delete a file and moreso directories, because the IO logic isn't sufficient
14:26:39 <maerwald> so what does it matter?
14:27:05 <wz1000> gentauro: it will be fixed in 9.2 I think: https://gitlab.haskell.org/ghc/ghc/-/issues/19287
14:27:34 <int-e> SafeHaskell has always assumed that the type system itself is sound... so yes, ghc bugs are a big problem
14:28:10 <gentauro> wz1000: but this only happens cos of `DuplicateRecordFields` right?
14:28:21 <gentauro> I normally specify in my cabal files which PRAGMAS I allow
14:28:28 gentauro very very few
14:28:35 <int-e> it also doesn't really cover the compilation of libraries... you can do all kinds of evil things in Setup.l?hs and the like.
14:28:41 <wz1000> yes, but only because you don't know of any other ways of adding unsoundness
14:28:44 <gentauro> which is annoying, but helps keep out all these "strange" things
14:29:18 <maerwald> so deleting directories recursively on windows via that module is NOT safe
14:29:38 <maerwald> *shrug*
14:29:45 <nshepperd2> maerwald: IO is intended to be able to do anything, so that's working as intended
14:29:49 <maerwald> yes
14:29:55 <maerwald> hence Safe haskell isn't interesting
14:30:03 Wuzzy joins (~Wuzzy@p5790e74f.dip0.t-ipconnect.de)
14:30:12 <maerwald> there are bigger fish to fry if you care about *safety*
14:30:14 <nshepperd2> if you want IO that can't do anything, you better use Safe Haskell and only use a free monad
14:30:29 <maerwald> that won't fix that bug
14:30:29 <nshepperd2> with a limited set of operations
14:30:42 <maerwald> the type system isn't the problem here
14:30:47 <gentauro> to be honest, my assumption has always been that anything running on Windows was unsafe :)
14:31:09 gentauro I once prepared to run something on windows, but gave up cos of CI/CD …
14:31:13 lambdaman joins (~lambdaman@s66-183-152-156.bc.hsia.telus.net)
14:31:32 <gentauro> if it builds on a Linux distro, I find that enough
14:31:37 <maerwald> well, this was an example... it won't be hard finding unix IO code that is unsafe
14:31:40 <nshepperd2> maerwald: not sure how your example is relevant then
14:31:54 <maerwald> nshepperd2: I just explained it :)
14:32:04 <nshepperd2> your complaint seems to be that ghc isn't a superintelligent mind reading robot?
14:32:14 <maerwald> no
14:32:37 <nshepperd2> of course you have to write the right code instead of the wrong code if you want to write a program that does something
14:32:39 <maerwald> <maerwald> there are bigger fish to fry if you care about *safety*
14:33:19 <maerwald> <maerwald> I don't think safe haskell has significant impact on ecosystem quality
14:33:23 <maerwald> those were my points
14:33:51 <nshepperd2> who says 'ecosystem quality' is what it's for
14:34:18 <maerwald> nshepperd2: ppl just said it's what separates us from npm
14:34:22 <maerwald> did you read the backlog?
14:35:05 heatsink joins (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
14:35:11 <gentauro> nshepperd2: I do
14:35:12 frozenErebus joins (~frozenEre@37.231.244.249)
14:35:23 <gentauro> in the sense: "let me decide which packages to trust"
14:35:37 <gentauro> and "compiler, please help tell me if I'm wrong in my assumptions"
14:35:43 <int-e> Size of the community seems to be a bigger factor, honestly.
14:35:46 <gentauro> I like that
14:36:25 <gentauro> int-e: the bigger the community, the more "shortcuts" there will be taken in code
14:37:22 <nshepperd2> some people writing IO routines that don't do what you want just seems like a totally different issue to preventing pure code from launching missiles
14:37:24 <maerwald> I think fixing broken core packages and base is more worthwhile
14:37:48 <maerwald> for ecosystem quality
14:38:03 Zunaka joins (~IceChat9@176.24.159.82)
14:38:23 <maerwald> preventing pure code from launching missiles is nothing I lose sleep over... it's just a haskell marketing trick
14:38:30 × lambdaman quits (~lambdaman@s66-183-152-156.bc.hsia.telus.net) (Ping timeout: 265 seconds)
14:38:40 <maerwald> show me a program that doesn't have massive amounts of IO anyway
14:38:45 <nshepperd2> it has some applications
14:38:49 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
14:38:56 <maerwald> hell, the RTS can launch missiles all the time
14:39:06 <gentauro> I like Marlows quote on Safe Haskell: http://blog.stermon.com/articles/2019/02/21/the-main-reason-i-use-safe-haskell-is-restriction.html
14:39:16 <gentauro> “For typical Haskell programmers, using {-# LANGUAGE Safe #-} will be like -Wall: something that is considered good practice from a hygiene point of view. If you don’t need access to unsafe features, then it’s better to write in the safe subset, where you have stronger guarantees. Just like -Wall, you get to choose whether to use {-# LANGUAGE Safe #-} or not.”
14:39:27 <int-e> we all know that the impact of missiles is corrupting all your files and leaving behind core dumps
14:39:52 × malumore quits (~malumore@151.62.123.9) (Ping timeout: 240 seconds)
14:39:57 × heatsink quits (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 265 seconds)
14:40:41 × nut quits (~user@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 240 seconds)
14:41:26 <maerwald> That's why I'm confused no one in haskell seems to be particularly worried about checking binaries against specifications. Even in correctness critical domains, the maximum I've seen was type level programming and property tests.
14:41:30 <nshepperd2> and i don't think it makes any sense at all to take aim at a ghc feature on the basis that some other unrelated problem exists
14:42:06 <maerwald> it's all about time, maintenance and gain
14:42:41 jao joins (~jao@pdpc/supporter/professional/jao)
14:43:44 <nshepperd2> sure, it's easier to destroy than to create
14:43:46 × Guest72361 quits (~textual@zrcout.mskcc.org) (Ping timeout: 252 seconds)
14:43:58 <maerwald> no it isn't... deleting code is the hardest
14:44:11 <maerwald> writing new code is the easiest :)
14:44:22 xkapastel joins (uid17782@gateway/web/irccloud.com/x-isdhgqaucsczyafg)
14:44:52 × frozenErebus quits (~frozenEre@37.231.244.249) (Ping timeout: 252 seconds)
14:45:46 <maerwald> but this is more of a bikeshed topic... do what you will! :)
14:47:19 frozenErebus joins (~frozenEre@37.231.244.249)
14:47:20 × tv quits (~tv@unaffiliated/tv) (Ping timeout: 246 seconds)
14:48:47 Alleria joins (~textual@mskresolve-a.mskcc.org)
14:49:12 Alleria is now known as Guest27054
14:50:38 <int-e> gentauro: if you benefit from SafeHaskell you should probably chime in on goldfire's question (subject: Safe Hashell?) on haskell-cafe
14:51:16 Tario joins (~Tario@201.192.165.173)
14:52:44 <gentauro> int-e: I have been doing that ;)
14:53:00 gentauro shadow-copying our discussions to the reddit post xD
14:53:22 <int-e> well, reddit is invisible to me
14:54:34 <gentauro> int-e: why is that? You don't reddit?
14:54:58 ddellacosta joins (~ddellacos@86.106.143.144)
14:55:39 <int-e> gentauro: IRC is already all the https://xkcd.com/386/ I can take
14:56:13 <int-e> There's also the javascript issue, but teddit solves that I suppose.
14:56:34 <gentauro> int-e: xD
14:56:55 <gentauro> int-e: I left twitter cos of that. It ended up in a "shouting contest"
14:57:32 gentauro at some point you realized how you are loosing IQ with every discussion and then, the best thing to do is just delete it :)
14:57:41 tv joins (~tv@unaffiliated/tv)
14:59:38 × ddellacosta quits (~ddellacos@86.106.143.144) (Ping timeout: 268 seconds)
14:59:54 Synthetica joins (uid199651@gateway/web/irccloud.com/x-xpxejlqaymkwmeed)
15:00:19 <nshepperd2> it's just another user-hostile website
15:01:10 son0p joins (~ff@181.136.122.143)
15:01:37 ph88 joins (~ph88@2a02:8109:9e00:7e5c:d5ef:86b3:afc4:9258)
15:03:49 <tomsmeding> gentauro: not saying you should or should not do anything, but I would just like to remind you that you can also link https://ircbrowse.tomsmeding.com/browse/haskell?id=445503#trid445503 instead of copying the whole conversation over :)
15:03:56 star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com)
15:05:12 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
15:11:10 × Chai-T-Rex quits (~ChaiTRex@gateway/tor-sasl/chaitrex) (Remote host closed the connection)
15:11:18 <gentauro> tomsmeding: I didn't knew of that :o
15:11:19 <gentauro> tx
15:11:20 <gentauro> htx
15:11:21 gnumonic joins (~gnumonic@c-73-170-91-210.hsd1.ca.comcast.net)
15:11:21 <gentauro> thx
15:11:24 <tomsmeding> :)
15:11:28 <tomsmeding> typing is hard
15:11:37 Chai-T-Rex joins (~ChaiTRex@gateway/tor-sasl/chaitrex)
15:12:02 <tomsmeding> gentauro: at some point I'll build a view that ignores all the join/leave messages
15:12:30 <tomsmeding> (note that 99.9% of the current code is Chris Done's)
15:12:37 <gentauro> tomsmeding: I was just going to write that
15:13:04 <gentauro> perhaps a parameter on the link?
15:13:18 gentauro s/parameter/bookmark paramater/
15:13:55 × gehmehgeh quits (~ircuser1@gateway/tor-sasl/gehmehgeh) (Quit: Leaving)
15:14:06 <tomsmeding> for example, yes
15:14:31 <tomsmeding> issue is more that the current code is not terribly supportive of such an alternate view :p
15:14:34 <tomsmeding> but not impossible
15:16:41 heatsink joins (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
15:17:31 wanglifeng joins (~wanglifen@60.177.176.45)
15:19:35 gehmehgeh joins (~ircuser1@gateway/tor-sasl/gehmehgeh)
15:20:56 × tv quits (~tv@unaffiliated/tv) (Quit: WeeChat 2.9)
15:21:23 × wanglifeng quits (~wanglifen@60.177.176.45) (Client Quit)
15:21:41 × ericsagnes quits (~ericsagne@2405:6580:0:5100:500e:ae68:cb1a:24a) (Ping timeout: 258 seconds)
15:25:28 tv joins (~tv@unaffiliated/tv)
15:25:32 × frozenErebus quits (~frozenEre@37.231.244.249) (Ping timeout: 268 seconds)
15:25:47 × tv quits (~tv@unaffiliated/tv) (Client Quit)
15:26:18 tv joins (~tv@unaffiliated/tv)
15:28:51 × Zunaka quits (~IceChat9@176.24.159.82) (Read error: Connection reset by peer)
15:29:05 Zunaka joins (~IceChat9@176.24.159.82)
15:29:12 ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta)
15:32:06 Kaeipi joins (~Kaiepi@47.54.252.148)
15:32:23 Sheilong joins (uid293653@gateway/web/irccloud.com/x-whlsqwhgakhmwdwp)
15:32:28 × Kaiepi quits (~Kaiepi@47.54.252.148) (Remote host closed the connection)
15:33:19 ericsagnes joins (~ericsagne@2405:6580:0:5100:26cf:eb6d:4a80:182c)
15:33:35 <gentauro> :)
15:33:41 qwerty2o joins (~qwerty2o@93-172-139-92.bb.netvision.net.il)
15:33:57 cole-h joins (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net)
15:33:58 × Kaeipi quits (~Kaiepi@47.54.252.148) (Remote host closed the connection)
15:34:05 × ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 265 seconds)
15:34:20 Kaeipi joins (~Kaiepi@47.54.252.148)
15:36:08 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "")
15:36:33 nineonine joins (~nineonine@2604:3d08:7785:9600:2926:4844:fa1f:b849)
15:37:14 × qwerty2o quits (~qwerty2o@93-172-139-92.bb.netvision.net.il) (Read error: Connection reset by peer)
15:37:25 × nineonine quits (~nineonine@2604:3d08:7785:9600:2926:4844:fa1f:b849) (Remote host closed the connection)
15:38:25 nineonine joins (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4)
15:42:46 × nineonine quits (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4) (Ping timeout: 258 seconds)
15:45:52 ddellacosta joins (~ddellacos@86.106.143.92)
15:52:37 kritzefitz joins (~kritzefit@212.86.56.80)
15:53:32 × pavonia quits (~user@unaffiliated/siracusa) (Quit: Bye!)
15:54:06 Pickchea joins (~private@unaffiliated/pickchea)
15:54:39 × seveg quits (~gabriel@2a02-ab04-0249-8d00-dea6-32ff-fe17-0993.dynamic.v6.chello.sk) (Ping timeout: 258 seconds)
15:56:22 elliott__ joins (~elliott@pool-108-18-30-46.washdc.fios.verizon.net)
15:56:30 Sorna joins (~Sornaensi@077213200034.dynamic.telenor.dk)
15:56:34 seveg joins (~gabriel@2a02-ab04-0249-8d00-dea6-32ff-fe17-0993.dynamic.v6.chello.sk)
15:58:32 × Sornaensis quits (~Sornaensi@077213199124.dynamic.telenor.dk) (Ping timeout: 252 seconds)
15:58:33 Mrbuck joins (~Mrbuck@gateway/tor-sasl/mrbuck)
15:58:49 mach1speed joins (~textual@S0106f0b4d2c39cee.va.shawcable.net)
16:00:11 × s00pcan quits (~chris@107.181.165.217) (Ping timeout: 240 seconds)
16:00:14 Komrad_Kafuka joins (1b04ce5c@27.4.206.92)
16:01:09 × jluttine quits (~jluttine@85-23-66-6.bb.dnainternet.fi) (Quit: WeeChat 3.0)
16:01:28 <Komrad_Kafuka> Hi guys, I have an error I can't quite decipher. Upon writing this code I get the following error https://paste.tomsmeding.com/ev5G1fig
16:01:39 <Komrad_Kafuka> It'd be great if someone could help me
16:02:24 Bergle_2 joins (~Bergle_4@101.165.90.119)
16:02:58 <monochrom> Where is line "57"?
16:03:04 <monochrom> err nevermind
16:03:20 <jiribenes> Komrad_Kafuka: You can't use backticks (`), Haskell thinks it's something else. Just replace "sqx`" with "sqx"
16:04:19 Rudd0 joins (~Rudd0@185.189.115.108)
16:04:57 × Bergle_1 quits (~Bergle_4@101.165.90.119) (Ping timeout: 245 seconds)
16:05:12 <monochrom> Also delete the comma after "pow (x1 - x2) 2"
16:05:39 frozenErebus joins (~frozenEre@37.231.244.249)
16:05:50 <Komrad_Kafuka> yeah It's giving me another set of horrendous errors
16:05:53 alx741 joins (~alx741@186.178.109.113)
16:06:40 <Komrad_Kafuka> https://paste.tomsmeding.com/Ugc0G1df
16:07:03 malumore joins (~malumore@151.62.123.9)
16:07:33 <monochrom> "pow" is not defined anywhere.
16:08:18 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
16:08:50 tzh joins (~tzh@c-24-21-73-154.hsd1.wa.comcast.net)
16:09:09 <Komrad_Kafuka> that solved the first part
16:10:23 <Komrad_Kafuka> the ''could'nt match unexpected type'' error, can't quite make out what that means
16:10:40 × ep1ctetus quits (~epictetus@ip72-194-54-201.sb.sd.cox.net) (Ping timeout: 252 seconds)
16:10:42 Major_Biscuit joins (~Major_Bis@82-169-100-198.biz.kpn.net)
16:13:25 bitmagie joins (~Thunderbi@200116b8068a3b00f97fc6eea4dcadef.dip.versatel-1u1.de)
16:14:53 × bitmagie quits (~Thunderbi@200116b8068a3b00f97fc6eea4dcadef.dip.versatel-1u1.de) (Client Quit)
16:15:29 <monochrom> xs is a list, distance doesn't expect its 1st parameter to be a list
16:16:31 nineonine joins (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4)
16:16:46 × Major_Biscuit quits (~Major_Bis@82-169-100-198.biz.kpn.net) (Ping timeout: 240 seconds)
16:17:23 × nineonine quits (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4) (Remote host closed the connection)
16:18:26 nineonine joins (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4)
16:19:16 geekosaur joins (930099da@rrcs-147-0-153-218.central.biz.rr.com)
16:19:50 Major_Biscuit joins (~Major_Bis@82-169-100-198.biz.kpn.net)
16:22:26 jakalx parts (~jakalx@base.jakalx.net) ()
16:23:01 × nineonine quits (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4) (Ping timeout: 258 seconds)
16:24:21 Jd007 joins (~Jd007@162.156.11.151)
16:25:21 × Major_Biscuit quits (~Major_Bis@82-169-100-198.biz.kpn.net) (Ping timeout: 268 seconds)
16:26:35 nineonine joins (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4)
16:27:15 <xe4> https://www.twanvl.nl/blog/haskell/overloading-functional-references
16:27:34 <xe4> I was following along with this article up until name = FRef { get = name_ , set = \n e -> e { name_ = n } } -- which doesn't compile
16:27:54 <xe4> and the function below that doesn't compile either: name = ref name_ (\n e -> e { name_ = n })
16:28:18 <xe4> suggestions on getting the examples to compile?
16:28:57 × Komrad_Kafuka quits (1b04ce5c@27.4.206.92) (Quit: Connection closed)
16:30:46 × DavidEichmann quits (~david@147.136.46.217.dyn.plus.net) (Remote host closed the connection)
16:34:04 jluttine joins (~jluttine@85-23-66-6.bb.dnainternet.fi)
16:34:19 v01d4lph4 joins (~v01d4lph4@122.162.20.198)
16:42:53 × frozenErebus quits (~frozenEre@37.231.244.249) (Ping timeout: 260 seconds)
16:43:38 × elliott_ quits (~elliott_@pool-108-18-30-46.washdc.fios.verizon.net) (Ping timeout: 240 seconds)
16:43:46 × Zunaka quits (~IceChat9@176.24.159.82) (Ping timeout: 260 seconds)
16:44:21 idhugo joins (~idhugo@87-49-147-45-mobile.dk.customer.tdc.net)
16:46:05 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
16:47:13 × jluttine quits (~jluttine@85-23-66-6.bb.dnainternet.fi) (Ping timeout: 240 seconds)
16:48:38 × kritzefitz quits (~kritzefit@212.86.56.80) (Ping timeout: 240 seconds)
16:49:12 × ddellacosta quits (~ddellacos@86.106.143.92) (Ping timeout: 240 seconds)
16:49:14 <monochrom> What is the exact verbatim error message?
16:50:32 × mach1speed quits (~textual@S0106f0b4d2c39cee.va.shawcable.net) (Quit: Textual IRC Client: www.textualapp.com)
16:51:07 wonko7 joins (~wonko7@62.115.229.50)
16:55:05 toorevitimirp joins (~tooreviti@117.182.181.144)
16:55:44 <int-e> gentauro: btw, what is [Safe {H}askel] (see https://uniprocess.org/effects.html )?
16:56:10 × toorevitimirp quits (~tooreviti@117.182.181.144) (Remote host closed the connection)
16:56:20 <int-e> (both the {H} from bibtex (presumably) and the missing l are slightly odd)
16:56:47 Wizek joins (uid191769@gateway/web/irccloud.com/x-imzvaajwbwqznbhg)
16:58:35 × elliott__ quits (~elliott@pool-108-18-30-46.washdc.fios.verizon.net) (Ping timeout: 246 seconds)
16:59:38 nut joins (~user@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr)
17:00:21 × hendursaga quits (~weechat@gateway/tor-sasl/hendursaga) (Ping timeout: 240 seconds)
17:00:31 elliott_ joins (~elliott_@pool-108-18-30-46.washdc.fios.verizon.net)
17:01:09 hendursaga joins (~weechat@gateway/tor-sasl/hendursaga)
17:03:34 Zunaka joins (~IceChat9@176.24.159.82)
17:03:58 Sgeo joins (~Sgeo@ool-18b98aa4.dyn.optonline.net)
17:04:35 <hpc> int-e: scroll all the way down the page
17:07:38 × gnumonic quits (~gnumonic@c-73-170-91-210.hsd1.ca.comcast.net) (Ping timeout: 240 seconds)
17:08:00 jakalx joins (~jakalx@base.jakalx.net)
17:08:19 <int-e> hpc: ... not sure why you're pointing me there. It replicates the exact same problem.
17:09:23 <int-e> I mean, I can identify the paper, but the title is still messed up.
17:11:44 <hpc> ah, you were asking why the formatting is messed up then?
17:11:49 <hpc> not actually "what" it was?
17:11:59 <int-e> Yes, sorry.
17:14:26 jluttine joins (~jluttine@85-23-66-6.bb.dnainternet.fi)
17:14:48 × v01d4lph4 quits (~v01d4lph4@122.162.20.198) (Remote host closed the connection)
17:15:21 v01d4lph4 joins (~v01d4lph4@122.162.20.198)
17:16:02 AkechiShiro joins (~AkechiShi@2a01:e0a:5f9:9681:1473:3dff:fe42:56a9)
17:16:35 ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta)
17:17:02 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
17:17:45 frozenErebus joins (~frozenEre@37.231.244.249)
17:17:51 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
17:18:43 DavidEichmann joins (~david@147.136.46.217.dyn.plus.net)
17:19:16 gzj joins (~gzj@unaffiliated/gzj)
17:19:56 × v01d4lph4 quits (~v01d4lph4@122.162.20.198) (Ping timeout: 260 seconds)
17:19:57 Major_Biscuit joins (~Major_Bis@82-169-100-198.biz.kpn.net)
17:20:58 × ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 240 seconds)
17:22:44 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 246 seconds)
17:23:40 elliott__ joins (~elliott@pool-108-18-30-46.washdc.fios.verizon.net)
17:23:52 × idhugo quits (~idhugo@87-49-147-45-mobile.dk.customer.tdc.net) (Ping timeout: 240 seconds)
17:24:05 lambdaman joins (~lambdaman@s66-183-152-156.bc.hsia.telus.net)
17:24:25 × gzj quits (~gzj@unaffiliated/gzj) (Ping timeout: 260 seconds)
17:24:27 stef204 joins (~stef204@unaffiliated/stef-204/x-384198)
17:25:50 mudfog joins (~mudfog@ec2-54-152-211-54.compute-1.amazonaws.com)
17:28:33 kritzefitz joins (~kritzefit@212.86.56.80)
17:30:21 × hendursaga quits (~weechat@gateway/tor-sasl/hendursaga) (Ping timeout: 240 seconds)
17:30:55 nicholasbulka joins (~nicholasb@2601:900:4301:da0:dc4d:c0e7:8d0c:41f6)
17:33:01 hendursaga joins (~weechat@gateway/tor-sasl/hendursaga)
17:33:13 × xff0x quits (~xff0x@2001:1a81:52bc:3c00:e093:d566:52f:38b9) (Ping timeout: 250 seconds)
17:34:22 xff0x joins (~xff0x@2001:1a81:52bc:3c00:45ea:1449:467:f132)
17:35:28 × nicholasbulka quits (~nicholasb@2601:900:4301:da0:dc4d:c0e7:8d0c:41f6) (Ping timeout: 258 seconds)
17:35:44 <nut> do people use linked list in Haskell ?
17:36:20 <nut> How is it often done?
17:38:31 <koz_> nut: Yes, and using [], since that's a (singly) linked list.
17:38:45 Guest78317 joins (~laudiacay@67.176.215.84)
17:42:11 × asheshambasta quits (~user@ptr-e1lysav1t8vxyatkqxm.18120a2.ip6.access.telenet.be) (Ping timeout: 248 seconds)
17:43:08 × Guest78317 quits (~laudiacay@67.176.215.84) (Ping timeout: 265 seconds)
17:43:22 <gentauro> int-e: good catch with Haskell missing one `l`. The {H} was taking from the CEFP bibtex file: https://simonmar.github.io/bib/par-tutorial-cefp-2012_abstract.html
17:43:40 × frozenErebus quits (~frozenEre@37.231.244.249) (Quit: leaving)
17:44:27 <gentauro> ups, wrong link https://simonmar.github.io/bib/safe-haskell-2012.bib
17:45:59 <gentauro> int-e: I guess I forgot to remove the {} aroudn the H
17:48:20 endofexclusive joins (~asdf@c188-150-152-7.bredband.comhem.se)
17:50:18 × Jd007 quits (~Jd007@162.156.11.151) (Quit: Jd007)
17:51:13 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
17:52:28 × lambdaman quits (~lambdaman@s66-183-152-156.bc.hsia.telus.net) (Remote host closed the connection)
17:54:29 × haritz quits (~hrtz@unaffiliated/haritz) (Quit: ZNC 1.7.2+deb3 - https://znc.in)
17:55:41 <int-e> gentauro: no big deal, but it does look strange :)
17:56:11 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
17:57:00 ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta)
17:58:42 hidedagger joins (~nate@unaffiliated/hidedagger)
17:58:57 <gentauro> int-e: If I recall from my days in uni, the {H} in bibtex ment something (I just can recall it)
17:59:10 <gentauro> any peeps still in academia that can tell?
17:59:35 × gehmehgeh quits (~ircuser1@gateway/tor-sasl/gehmehgeh) (Quit: Leaving)
18:01:09 × hendursaga quits (~weechat@gateway/tor-sasl/hendursaga) (Ping timeout: 240 seconds)
18:01:13 × ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 240 seconds)
18:01:46 <gentauro> int-e: fixed now :) https://uniprocess.org/effects.html
18:01:57 hendursaga joins (~weechat@gateway/tor-sasl/hendursaga)
18:03:13 idhugo joins (~idhugo@87-49-147-45-mobile.dk.customer.tdc.net)
18:05:55 <yushyin> gentauro: {H} keeps the case otherwise bibtex (depending on the citation style) will lower-case the H in Haskell
18:06:21 × Mrbuck quits (~Mrbuck@gateway/tor-sasl/mrbuck) (Ping timeout: 240 seconds)
18:09:59 × hendursaga quits (~weechat@gateway/tor-sasl/hendursaga) (Remote host closed the connection)
18:13:29 hendursaga joins (~weechat@gateway/tor-sasl/hendursaga)
18:13:45 <dmj`> nut: all the time, but its used moreso as a control structure (for loop replacement), not as a data structure, since its not a packed representation (no cache locality)
18:14:17 <dmj`> Control.Lens.Plated.transform can really give recursion schemes a run for its money
18:14:44 <int-e> gentauro: thanks :)
18:15:06 endofexclusive parts (~asdf@c188-150-152-7.bredband.comhem.se) ("Leaving")
18:15:51 × hendursaga quits (~weechat@gateway/tor-sasl/hendursaga) (Remote host closed the connection)
18:16:14 hendursaga joins (~weechat@gateway/tor-sasl/hendursaga)
18:16:53 <gentauro> yushyin: you are right. Now I recall it. Thx
18:22:08 jamm_ joins (~jamm@unaffiliated/jamm)
18:23:24 × jtk quits (~jtk@178.239.168.171) (Remote host closed the connection)
18:24:09 × dyeplexer quits (~lol@unaffiliated/terpin) (Remote host closed the connection)
18:26:46 s00pcan joins (~chris@075-133-056-178.res.spectrum.com)
18:28:11 × idhugo quits (~idhugo@87-49-147-45-mobile.dk.customer.tdc.net) (Ping timeout: 240 seconds)
18:29:31 rayyyy joins (~nanoz@gateway/tor-sasl/nanoz)
18:30:10 nicholasbulka joins (~nicholasb@2601:900:4301:da0:5d1c:812e:1a75:163c)
18:31:07 × stiell quits (~stian@fsf/member/stiell) (Ping timeout: 260 seconds)
18:32:26 × nicholasbulka quits (~nicholasb@2601:900:4301:da0:5d1c:812e:1a75:163c) (Remote host closed the connection)
18:32:42 nicholasbulka joins (~nicholasb@2601:900:4301:da0:5d1c:812e:1a75:163c)
18:34:14 ddellacosta joins (~ddellacos@86.106.143.144)
18:34:15 × rajivr quits (uid269651@gateway/web/irccloud.com/x-cevinofdvazcujky) (Quit: Connection closed for inactivity)
18:34:24 haritz joins (~hrtz@62.3.70.206)
18:34:25 × haritz quits (~hrtz@62.3.70.206) (Changing host)
18:34:25 haritz joins (~hrtz@unaffiliated/haritz)
18:35:50 × machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 252 seconds)
18:38:13 × fer quits (2f3d8672@47.61.134.114) (Quit: Connection closed)
18:38:19 × aveltras quits (uid364989@gateway/web/irccloud.com/x-uutfhochnudnpuow) (Quit: Connection closed for inactivity)
18:38:38 × ddellacosta quits (~ddellacos@86.106.143.144) (Ping timeout: 240 seconds)
18:39:11 × Major_Biscuit quits (~Major_Bis@82-169-100-198.biz.kpn.net) (Ping timeout: 240 seconds)
18:39:16 coot joins (~coot@37.30.50.130.nat.umts.dynamic.t-mobile.pl)
18:41:24 × Tesseraction quits (~Tesseract@unaffiliated/tesseraction) (Read error: Connection reset by peer)
18:41:52 × darjeeling_ quits (~darjeelin@115.215.40.116) (Ping timeout: 240 seconds)
18:45:09 × hendursaga quits (~weechat@gateway/tor-sasl/hendursaga) (Ping timeout: 240 seconds)
18:46:34 × s00pcan quits (~chris@075-133-056-178.res.spectrum.com) (Ping timeout: 268 seconds)
18:47:53 s00pcan joins (~chris@107.181.165.217)
18:48:19 hendursaga joins (~weechat@gateway/tor-sasl/hendursaga)
18:48:25 × kristijonas quits (~kristijon@78-56-32-39.static.zebra.lt) (Ping timeout: 268 seconds)
18:51:17 Jd007 joins (~Jd007@162.156.11.151)
18:52:18 Major_Biscuit joins (~Major_Bis@82-169-100-198.biz.kpn.net)
18:55:21 darjeeling_ joins (~darjeelin@122.245.209.158)
18:59:35 bennofs_ joins (~quassel@x4dbf857b.dyn.telefonica.de)
18:59:50 × Sheilong quits (uid293653@gateway/web/irccloud.com/x-whlsqwhgakhmwdwp) ()
19:00:07 × ClaudiusMaximus quits (~claude@unaffiliated/claudiusmaximus) (Quit: ->)
19:04:23 × heatsink quits (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
19:05:26 Tesseraction joins (~Tesseract@unaffiliated/tesseraction)
19:05:41 × elliott__ quits (~elliott@pool-108-18-30-46.washdc.fios.verizon.net) (Ping timeout: 240 seconds)
19:06:40 × nut quits (~user@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 252 seconds)
19:07:52 × elfets quits (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Ping timeout: 240 seconds)
19:09:26 ddellacosta joins (~ddellacos@86.106.143.79)
19:09:59 × DavidEichmann quits (~david@147.136.46.217.dyn.plus.net) (Remote host closed the connection)
19:12:13 × nicholasbulka quits (~nicholasb@2601:900:4301:da0:5d1c:812e:1a75:163c) (Remote host closed the connection)
19:13:41 × ddellacosta quits (~ddellacos@86.106.143.79) (Ping timeout: 246 seconds)
19:14:36 jamm__ joins (~jamm@unaffiliated/jamm)
19:14:46 × elliott_ quits (~elliott_@pool-108-18-30-46.washdc.fios.verizon.net) (Ping timeout: 240 seconds)
19:17:12 sh9 joins (~sh9@softbank060116136158.bbtec.net)
19:17:26 × jamm_ quits (~jamm@unaffiliated/jamm) (Ping timeout: 258 seconds)
19:19:43 minoru_shiraeesh joins (~shiraeesh@109.166.56.26)
19:20:12 × __minoru__shirae quits (~shiraeesh@109.166.58.81) (Ping timeout: 252 seconds)
19:21:00 elfets joins (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de)
19:21:31 nut joins (~user@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr)
19:22:45 Mrbuck joins (~Mrbuck@gateway/tor-sasl/mrbuck)
19:22:46 × rayyyy quits (~nanoz@gateway/tor-sasl/nanoz) (Quit: Leaving)
19:23:35 × kuribas quits (~user@ptr-25vy0ia8k0uf95hxb72.18120a2.ip6.access.telenet.be) (Remote host closed the connection)
19:24:15 Zunaka_ joins (~IceChat9@176.24.159.82)
19:26:28 × Zunaka quits (~IceChat9@176.24.159.82) (Ping timeout: 252 seconds)
19:29:39 smatting joins (~stefan@p200300cd7708e000958acc65436f5a2e.dip0.t-ipconnect.de)
19:31:06 waleee-cl joins (uid373333@gateway/web/irccloud.com/x-qwacgjbsbbsicbfw)
19:34:52 vicfred joins (vicfred@gateway/vpn/mullvad/vicfred)
19:36:37 elliott_ joins (~elliott_@pool-108-18-30-46.washdc.fios.verizon.net)
19:37:22 × jamm__ quits (~jamm@unaffiliated/jamm) (Remote host closed the connection)
19:38:01 thblt parts (~thblt@unaffiliated/thblt) ("ERC (IRC client for Emacs 28.0.50)")
19:41:02 Zunaka joins (~IceChat9@176.24.159.82)
19:42:52 × Zunaka_ quits (~IceChat9@176.24.159.82) (Ping timeout: 240 seconds)
19:44:23 ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta)
19:47:26 randumb_luser joins (~jrm@172.76.82.248)
19:47:42 × elliott_ quits (~elliott_@pool-108-18-30-46.washdc.fios.verizon.net) (Ping timeout: 252 seconds)
19:47:52 <randumb_luser> /p
19:47:56 × rond_ quits (5940206b@89-64-32-107.dynamic.chello.pl) (Quit: Connection closed)
19:48:03 randumb_luser parts (~jrm@172.76.82.248) ()
19:48:38 × ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 240 seconds)
19:50:15 jamm_ joins (~jamm@unaffiliated/jamm)
19:52:05 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
19:52:58 lambdaman joins (~lambdaman@s66-183-152-156.bc.hsia.telus.net)
19:53:06 × Pickchea quits (~private@unaffiliated/pickchea) (Quit: Leaving)
19:53:57 safinaskar joins (6dfc5a88@109-252-90-136.nat.spd-mgts.ru)
19:54:41 zeta_0 joins (~zeta@2601:8c0:1:2630:2d9c:e1d:b59:5a8e)
19:54:50 falafel joins (~falafel@pool-96-255-70-50.washdc.fios.verizon.net)
19:55:08 Lord_of_Life_ joins (~Lord@unaffiliated/lord-of-life/x-0885362)
19:56:09 <zeta_0> hello there, I got haskell-language-server working on a single haskell file, but it's not recognizing any of the modules that I try to import, that I have installed? is there an easy fix for this?
19:56:34 ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta)
19:57:05 <zeta_0> I can import the Control module fine, but when I try to import Flow, it tells me module not recognized?
19:57:11 × jamm_ quits (~jamm@unaffiliated/jamm) (Remote host closed the connection)
19:57:13 × lambdaman quits (~lambdaman@s66-183-152-156.bc.hsia.telus.net) (Ping timeout: 240 seconds)
19:57:59 ddellaco_ joins (ddellacost@gateway/vpn/mullvad/ddellacosta)
19:58:43 × Lord_of_Life quits (~Lord@unaffiliated/lord-of-life/x-0885362) (Ping timeout: 268 seconds)
19:58:46 Lord_of_Life_ is now known as Lord_of_Life
19:58:51 × zeta_0 quits (~zeta@2601:8c0:1:2630:2d9c:e1d:b59:5a8e) (Client Quit)
19:59:28 elliott__ joins (~elliott@pool-108-18-30-46.washdc.fios.verizon.net)
19:59:41 × _ht quits (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection)
20:00:08 Zunaka_ joins (~IceChat9@176.24.159.82)
20:00:52 × ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 240 seconds)
20:02:13 × ddellaco_ quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 240 seconds)
20:02:49 × Zunaka quits (~IceChat9@176.24.159.82) (Ping timeout: 265 seconds)
20:03:09 heatsink joins (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
20:04:46 nicholasbulka joins (~nicholasb@2601:900:4301:da0:5d1c:812e:1a75:163c)
20:04:58 × petersen quits (~petersen@redhat/juhp) (Ping timeout: 240 seconds)
20:08:28 petersen joins (~petersen@redhat/juhp)
20:10:15 usr25 joins (~usr25@unaffiliated/usr25)
20:11:26 × fiedlr quits (~fiedlr@83.148.33.254) (Remote host closed the connection)
20:12:03 fiedlr joins (~fiedlr@83.148.33.254)
20:12:46 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds)
20:13:48 <safinaskar> Haskell got me angry because of its syntax. So now I am considering to
20:13:49 <safinaskar> switch to imperative languages (such as Ocaml or Rust) and never write
20:13:49 <safinaskar> Haskell anymore. Please try to convince me to continue to use Haskell
20:13:58 <safinaskar> here are details: http://paste.debian.net/1194206/
20:14:15 × heatsink quits (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
20:16:11 × fiedlr quits (~fiedlr@83.148.33.254) (Ping timeout: 240 seconds)
20:17:48 × z88 quits (~z88@221.85-84-199.dynamic.clientes.euskaltel.es) (Ping timeout: 265 seconds)
20:18:47 <infinisil> safinaskar: Use whichever language you like, nobody forces you to use Haskell, and Haskell indeed isn't the optimal choice for all tasks (no language is)
20:18:52 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
20:19:14 pavonia joins (~user@unaffiliated/siracusa)
20:20:20 <d34df00d> safinaskar: I might also suggest avoiding types and switching to python.
20:20:32 <d34df00d> Or js for that matter.
20:22:28 <d34df00d> koz_: in the meanwhile, I've reimplemented that repa/massiv stuff in C++ and it's also ridiculously slow, so I guess expecting ghc/llvm to optimize better than clang/llvm is unreasonable. I'll just use my inline-asm thing!
20:23:40 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 252 seconds)
20:25:22 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
20:25:47 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 246 seconds)
20:27:06 <sm[m]> safinaskar: you can write more concise/elegant haskell too. I don't have specific suggestions for your paste, except you use a lot of verbose qualified imports
20:28:28 barakkl1993 joins (~barakkley@2.55.14.78)
20:29:57 × mikoto-chan quits (~anass@gateway/tor-sasl/mikoto-chan) (Ping timeout: 240 seconds)
20:30:20 ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta)
20:31:42 horatiohb joins (~horatiohb@45.55.40.152)
20:31:56 × Mrbuck quits (~Mrbuck@gateway/tor-sasl/mrbuck) (Quit: WeeChat 2.8)
20:34:14 × coot quits (~coot@37.30.50.130.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
20:34:38 × ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 252 seconds)
20:36:11 × wonko7 quits (~wonko7@62.115.229.50) (Ping timeout: 240 seconds)
20:36:39 × barakkl1993 quits (~barakkley@2.55.14.78) (Quit: Leaving)
20:36:55 barakkl1993 joins (~barakkley@2.55.46.17)
20:37:39 kenanmarasli joins (1fdf0934@31.223.9.52)
20:38:33 <cjay> safinaskar: Your choices of where to break lines and indent are very unusual, and they seem to be enabled by using {} for blocks. If you would use layout instead of {}, you would be forced into a cleaner structure I think.
20:39:32 hexfive joins (~hexfive@50.35.83.177)
20:39:49 acarrico joins (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net)
20:40:04 seven_three joins (~user@pool-96-233-64-53.bstnma.fios.verizon.net)
20:40:59 <cjay> hmm.. I think some of the line breaks are a copy/paste artefact, breaking in the middle of a type signature can't work
20:41:18 <koz_> d34df00d: Inline-asm for the win.
20:41:35 <davean> safinaskar: Thats some of the craziest Haskell I've seen. Also the thing about imperitive at the end isn't the entire story - even if you write it imperitive you can gain with Haskell because its only local and you can ignore it remotely.
20:42:00 <davean> cjay: I break in the middle of type signatures all the time
20:42:15 <cjay> oh right. I should go to sleep, I'm talking bs ^^
20:42:26 <monochrom> Your "[0 .. n] <&> \i -> ...", we normally write list comprehension instead.
20:43:41 × usr25 quits (~usr25@unaffiliated/usr25) (Quit: Leaving)
20:43:42 <monochrom> "and [ f i j | i <- [0..n], j <- [0..i] ]" for example.
20:43:56 <monochrom> Overall you are not writing idiomatic Haskell.
20:44:00 <davean> is this style from somewhere? I can't imagine how you'd get here from reading how to program Haskell
20:44:09 <davean> I've never seen an example like this EVER.
20:44:56 <davean> It would take me skill to bend Haskell into something this abnormal without seeing an example, so I'm confused as to the genesis of this.
20:45:07 <davean> Makes me feel he saw a really weird tutorial or something
20:45:25 <dmj`> you need to study the instances, then its less weird
20:45:35 <dmj`> @google typeclassopedia
20:45:37 <lambdabot> No Result Found.
20:45:48 <d34df00d> Is there haskell code obfuscation contest?
20:45:53 <d34df00d> Lenses would still be clear winner, but still.
20:46:06 <safinaskar> hi. sorry, i was afk for some time. now reading your messages
20:46:26 <cjay> hm, what doesn't work is breaking in the middle of somethin enclosed in () within a type signature, apparently. til
20:46:37 <davean> d34df00d: Why do you think lenses obfuscate?
20:46:41 <monochrom> d34df00d: shapr wants to hold one for #haskell 20th anniversary.
20:46:51 <d34df00d> davean: @##~.
20:46:59 fiedlr joins (~fiedlr@83.148.33.254)
20:47:04 <davean> d34df00d: so? Hows that different than any Haskell function?
20:47:23 <davean> I actually find that easy because the pieces mean something
20:47:26 <monochrom> Hell, how does that differ from C's ?: operator >:)
20:47:28 <davean> so its easier than most haskell functions
20:47:34 <d34df00d> Oh, that's an operator?
20:47:49 <d34df00d> I pressed some arbitrary buttons in my top row while holding shift.
20:47:50 <davean> Yes? of course, its not char
20:48:00 <davean> The '@' part is a problem
20:48:29 <monochrom> K&R pressed two arbitrary keys near the return key while hold shift, too. >:)
20:48:32 <davean> d34df00d: this seems a non-sensicle argument based on first appearances instead of understanding\
20:48:49 <davean> d34df00d: but nothing makes sense when you don't understand it
20:48:58 <d34df00d> davean: I know there is a certain system in naming lenses operators, but, unless one uses it often enough, I think it's impossible to memorise.
20:49:18 × nut quits (~user@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 252 seconds)
20:49:19 <davean> d34df00d: but that doesn't matter - theres NO system to most Haskell function namings
20:49:25 <monochrom> That's my sentiment about Japanese, too.
20:49:27 <davean> d34df00d: Every name is, be default, opaque
20:49:32 <d34df00d> I mean, once you need "$subj cheatsheet" (and there's plenty for lenses), you can't tell it's easy.
20:49:54 <davean> d34df00d: I mean, so Haskell isn't easy?
20:49:54 <d34df00d> monochrom: and Japanese is perhaps not that simple for somebody who doesn't use it often enough.
20:50:04 <davean> because people need a cheatsheet for prelude functions when they start too
20:50:16 × seven_three quits (~user@pool-96-233-64-53.bstnma.fios.verizon.net) (Remote host closed the connection)
20:50:20 <d34df00d> davean: other parts of the ecosystem have less of 5-symbol operators.
20:50:40 <davean> d34df00d: so? Whats special about symbol operators vs. any function name of another sort?
20:50:48 <davean> d34df00d: you seem to be making a disctinction without a difference
20:50:49 <d34df00d> Oh, if for some reason I forget the name of the function of the type (a, b) -> (b, a), then I can hoogle it. Hoogling lenses is not fun.
20:50:54 seven_three joins (~user@pool-96-233-64-53.bstnma.fios.verizon.net)
20:50:57 <davean> I could name that with chars and it wouldn't change anything
20:51:23 <davean> which symbol set I use to name a function jsut specifies its fixity
20:51:25 <d34df00d> Maybe using proper names for less-often used functions that are easier to internalize is a bit better?
20:51:39 <davean> define "proper"
20:51:44 <safinaskar> cjay: "If you would use layout instead of {}, you would be forced into a cleaner structure I think." - i came to haskell from c++, so {} are natural for me. My main problem here is not indentation, but this if/case/let cascade instead of normal imperative code. in imperative code i can simply do early return
20:51:57 <d34df00d> having prior semantics
20:52:03 <d34df00d> Like, map has some prior semantics.
20:52:07 <monochrom> COBOL is the gold standard of using proper names >:)
20:52:09 <d34df00d> fst, short for first, has some prior semantics
20:52:09 × jumper149 quits (~jumper149@80.240.31.34) (Quit: WeeChat 3.1)
20:52:19 <davean> safinaskar: you can do early return in Haskell also - your choice of layout here is hiding whats so crazy about that code I think
20:52:28 <d34df00d> Speaking of which, I bet you find K, J and the likes as easy as Haskell or C or what not.
20:52:33 <davean> d34df00d: no, it has semantics you've *learned* for that name already
20:52:47 <safinaskar> davean: "even if you write it imperitive you can gain with Haskell because its only local and you can ignore it remotely" - i don't see any benefits here
20:52:48 <seven_three> Is there a way I can speed up testing my foldable instance with the checkers library. Currently it takes about 30 seconds while my othere test are about instantaneous. I call it like so `QC.quickBatch $ QC.foldable (undefined :: MyType (String, String, String, Int, Int))`
20:53:17 <davean> safinaskar: you know from outside how it can behave without understanding how it does it at all
20:53:26 × Gurkenglas quits (~Gurkengla@unaffiliated/gurkenglas) (Ping timeout: 246 seconds)
20:53:38 <d34df00d> davean: having some math-related education prior to haskell, I already knew the concept of mappings.
20:54:02 <d34df00d> So while indeed I learned those semantics, they transfer way better to other domains.
20:54:06 <safinaskar> monochrom: "and [ f i j | i <- [0..n], j <- [0..i] ]" - still i don't like that i have to call "and" instead of just perform early return from inside of imperative loop
20:54:37 <d34df00d> And, as I said, it's just about using it often enough. I don't use lenses often, so to me they are one of the most obscure parts of the ecosystem.
20:54:45 <davean> safinaskar: "and" does early return, and ios what you you do in that imperative loop
20:55:16 <davean> d34df00d: I rarely use lens myself - it doesn't suit my purposes much - but its no harder to use than any other library I don't use
20:55:18 heatsink joins (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
20:55:22 <d34df00d> safinaskar: if you're so inclined to code the early return explicitly, just write the corresponding recursive function explicitly.
20:55:46 <davean> safinaskar: Why do you want to code the early return explicitely instead of just have it work BTW?
20:56:01 <monochrom> That would be a semantic contention, thinking in control flow vs thinking in answers. And I won't convince you either way.
20:56:39 <d34df00d> davean: dunno, my experience differs. I find it easier to approach most other libraries.
20:57:08 <davean> d34df00d: when I first dealt with lens it was a single file with only a single comment saying something was probably broken
20:57:26 <monochrom> You can fork lens and replace symbolic names by alphanum names.
20:57:32 <monochrom> And btw both are names.
20:57:45 <monochrom> The correct dichotomy is symbol vs alphanum.
20:57:57 <davean> monochrom: I tried to make that comment above
20:57:59 <monochrom> Even "meaningful vs meaningless" is not the correct dichotomy.
20:58:06 <davean> the *only* different is fixity
20:58:06 × mozzarella quits (~sam@unaffiliated/sam113101) (Ping timeout: 260 seconds)
20:58:18 <d34df00d> It's not a dichotomy even, it's a spectrum.
20:58:26 <davean> d34df00d: its not a spectrum
20:58:30 <monochrom> For example "+" is a meaningful symbol, "foobarbaz" is a meaningless alphanum.
20:58:31 <davean> they're litterly the same up to fixity
20:58:45 <d34df00d> map is meaningful for somebody who has math background but about as meaningless as <$> for somebody who does not.
20:58:46 <safinaskar> "is this style from somewhere? I can't imagine how you'd get here from reading how to program Haskell" - let me explain. i learn haskell using "learn you haskell for a great good". very good book. but i was always frustrated from indentation-based syntax (i came from c++), so i started to use curly braces. In function "lex" i check some condition,
20:58:46 <safinaskar> if it holds, i return Nothing, if it doesn't hold, i check another condition, etc. I decided to check conditions using "case" as opposed to "if ... then ... else", because "case" allows me to use curly braces. conclusion: i started from "learn you haskell for a great good" style, then started to use curly braces (because of c++), then get rid of
20:58:47 <safinaskar> "if...then...else". that is
20:58:51 <d34df00d> davean: that's about meanings.
20:58:56 <davean> d34df00d: if you read the Haskell report (you have, right?) theres only ONE difference
20:58:56 Zunaka joins (~IceChat9@176.24.159.82)
20:59:13 × Guest27054 quits (~textual@mskresolve-a.mskcc.org) (Ping timeout: 240 seconds)
20:59:27 <d34df00d> I'm not talking about alphanum names vs symbolic names.
21:00:12 <davean> d34df00d: but theres more meaning in the lens symbol names than almost any alphanum names since each symbol has a meaning and the order is significant so theres only one reasonable thing for any symbol sequence
21:00:23 pthariensflame joins (~pthariens@2600:6c52:727f:4200:ecc8:7d66:24f2:c0bf)
21:00:26 <davean> WTF do I have to defend lens? I hate it
21:00:36 <d34df00d> davean: …which you don't really remember unless you use lens often enough.
21:00:37 × pthariensflame quits (~pthariens@2600:6c52:727f:4200:ecc8:7d66:24f2:c0bf) (Client Quit)
21:00:44 <davean> d34df00d: I don't have to remember them?
21:00:54 <d34df00d> Also, my IDE sucks at completing symbolic names.
21:00:56 mozzarella joins (~sam@unaffiliated/sam113101)
21:01:00 <safinaskar> i checked checkbox "Wrap text at 78 characters" at paste.debian.net . here is not-wrapped version: http://paste.debian.net/1194214/
21:01:31 ddellacosta joins (~ddellacos@86.106.143.157)
21:01:35 <monochrom> There is no conflict between using {;} and using layout.
21:01:39 <davean> safinaskar: but you have things like "do do"
21:02:04 <davean> safinaskar: theres more going on here
21:02:05 <monochrom> Just use {;} and still lay out code the same way other haskellers lay out code.
21:02:11 × Zunaka_ quits (~IceChat9@176.24.159.82) (Ping timeout: 260 seconds)
21:02:13 <davean> I don't think you understand the syntax if thats how you got here
21:02:53 <monochrom> But if you use {;} and decided to lay out code to be abnormal, that's a conflict you created, not an intrinsic conflict.
21:02:56 <d34df00d> Ok, I now have really stupid but serious question.
21:02:57 <davean> Even for that, theres a lot of useless syntax in here that does nothing
21:03:10 <davean> Litterly nothing
21:03:26 <davean> I mean most of the places that brackets don't do anyhthing either mind you
21:03:28 <monochrom> But see also https://twitter.com/HisCursedness/status/788690145822306304 >:)
21:03:54 <monochrom> I imagine someone would same "that makes me angry", too.
21:04:05 <monochrom> I mean, gosh, people can get angry at anything.
21:04:31 <monochrom> s/same/say/
21:05:05 <monochrom> Perhaps what you really need is anger management. Nothing to do with syntax or semantics or programming at all.
21:05:05 <davean> safinaskar: Also, your use of ST here could be done with a loop function
21:05:39 <davean> safinaskar: you might want to try a fold
21:05:50 <davean> you can do your bracket style still
21:06:05 <d34df00d> monochrom: ah, I remembered that picture too!
21:06:06 <davean> safinaskar: right folds give you the same early exist
21:06:10 × ddellacosta quits (~ddellacos@86.106.143.157) (Ping timeout: 252 seconds)
21:06:28 <d34df00d> Anyway, here's my question. I'm using tasty-bench, and the output of `cabal bench` looks like this:
21:06:42 <d34df00d> https://bpaste.net/LKPQ
21:06:43 <monochrom> "and" is already a right-fold and does early exit, btw.
21:06:47 <safinaskar> "you know from outside how it can behave without understanding how it does it at all" - i agree, but this argument is not enough for me
21:06:52 <d34df00d> Damn, screw that.
21:06:54 <davean> monochrom: mentioned that a few times
21:07:00 <monochrom> :)
21:07:16 <d34df00d> Compare the above to https://a.pomf.cat/swspsp.png .
21:07:26 <davean> safinaskar: well its important if you want to change execution externally for example
21:07:31 <monochrom> But I know people who insist on seeing explicit control flow in code, refuse hiding that behind a HOF.
21:07:36 <d34df00d> I was about to ask where are my damn numbers but apparently tasty-bench does something funny with colors.
21:07:43 <monochrom> At which point I just declare "control freak" and move on.
21:07:43 Sorny joins (~Sornaensi@79.142.232.102.static.router4.bolignet.dk)
21:07:57 <davean> safinaskar: I could at LEAST half the lines of code here by making it cleaner
21:08:16 <davean> monochrom: thats why I mentioned a right fold, then its explicite
21:08:49 <davean> I can make this MORE like C and make it shorter and cleaner too
21:08:49 <monochrom> But that's also hiding it behind a function name "foldr", no?
21:09:10 olligobber joins (olligobber@gateway/vpn/privateinternetaccess/olligobber)
21:09:25 <monochrom> Also it takes a bit of education to learn that foldr, in Haskell (and not in other languages), by way of laziness can do early exit.
21:09:28 <davean> monochrom: no? The end line of the passed function decides to continue or return generally - or the signature, depending on how you code it
21:09:47 <monochrom> Oh, writing your own recursion?
21:09:51 Sornaensis joins (~Sornaensi@077213200034.dynamic.telenor.dk)
21:10:10 × malumore quits (~malumore@151.62.123.9) (Remote host closed the connection)
21:10:41 <davean> Also, these nested ands
21:10:41 × Sorna quits (~Sornaensi@077213200034.dynamic.telenor.dk) (Ping timeout: 240 seconds)
21:11:05 <seven_three> what is an example of a foldr doing early exit?
21:11:10 <davean> safinaskar: Your code gets cleaner if you just collapse repeatitive code into a single level!
21:11:24 <monochrom> foldr (&&) undefined (repeat False)
21:11:38 <monochrom> test that it takes finite time
21:11:47 Alleria joins (~textual@2603-7000-3040-0000-8d12-8548-27bc-6b87.res6.spectrum.com)
21:11:56 <seven_three> ok I see what you mean
21:12:10 Alleria is now known as Guest78338
21:12:25 <davean> The early termination is epxlicite in the (&&) definition
21:12:59 <seven_three> right and otherwise folding an infinite list would never terminate
21:13:23 × Sorny quits (~Sornaensi@79.142.232.102.static.router4.bolignet.dk) (Ping timeout: 265 seconds)
21:13:24 <monochrom> I disagree. The "same" code in SML behaves differently. This really takes learning. Nothing self-evident here. In fact most people find the opposite meaning self-evident.
21:14:05 <safinaskar> davean: "Why do you want to code the early return explicitely instead of just have it work BTW?" - see here: http://paste.debian.net/1194216/
21:14:13 <monochrom> I know because I use that example to totally surprise my students. And that's even after I've taught them lazy evaluation.
21:14:56 <davean> safinaskar: that doesn't answer the question
21:15:02 <davean> safinaskar: tahts why you want curly brase style
21:15:05 × smatting quits (~stefan@p200300cd7708e000958acc65436f5a2e.dip0.t-ipconnect.de) (Ping timeout: 250 seconds)
21:15:33 <davean> monochrom: its explicite by being explicitely lazy in the second argument - as I said, its explicite in the *definition of (&&)*
21:16:11 <monochrom> I taught them lazy evaluation steps. Then I threw them the exercise of "now your turn, show me the steps for foldr (+) 0 [1,2], and for for foldr (&&) True [False, False]". The students do the (+) one correctly. Then proceed to do the (&&) one the very same way as the (+) one.
21:16:16 × Guest78338 quits (~textual@2603-7000-3040-0000-8d12-8548-27bc-6b87.res6.spectrum.com) (Ping timeout: 258 seconds)
21:16:48 Alleria_ joins (~textual@2603-7000-3040-0000-8d12-8548-27bc-6b87.res6.spectrum.com)
21:18:07 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 252 seconds)
21:18:45 <safinaskar> davean: "but you have things like "do do"" - you mean using "do" inside of "do"? this is intentional. to hide bindings. i. e. i write "do { do { a<-...; ... }; foo; }" to make sure "foo" doesn't see "a". i am inventive:)  . i don't simply copy-paste examples, i develop my style :)
21:19:14 × robotmay quits (~beepboop@2001:8b0:7af0:2580:505f:607:efbd:23b4) (Remote host closed the connection)
21:20:00 <davean> safinaskar: also, in your example, you make a nested case instead of a sequence like in the C++ code, to no point i can see - they do the same things in the True branch, so you can collapse them, etc
21:20:22 <safinaskar> well, i don't know how indent-based layout work. i simply always try to use curly braces to avoid understanding indent-based rules
21:20:30 robotmay joins (~beepboop@2001:8b0:7af0:2580:e563:8f42:67c7:6d13)
21:21:02 <davean> safinaskar: same indent, same block, different indent, different block. Same rule as braces basicly (theres some more details, but you only need them if you choose to sue them and theres not MUCH more)
21:21:26 <davean> safinaskar: your code, you can just delete the braces I think
21:21:38 <davean> safinaskar: indent style is *the thing you're already doing*
21:22:41 <davean> safinaskar: have you seen 'guard'?
21:23:15 <davean> http://hackage.haskell.org/package/base-4.15.0.0/docs/Control-Monad.html
21:23:26 <davean> Also 'when'
21:24:03 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
21:24:15 × ph88 quits (~ph88@2a02:8109:9e00:7e5c:d5ef:86b3:afc4:9258) (Ping timeout: 260 seconds)
21:24:42 <safinaskar> monochrom: ""and" is already a right-fold and does early exit, btw" - when i say i want early exit, i mean this: http://paste.debian.net/1194216/ . i. e. i want to be able to place "return true" and "return false" at any point in my function
21:25:11 × Sornaensis quits (~Sornaensi@077213200034.dynamic.telenor.dk) (Ping timeout: 240 seconds)
21:25:53 × elliott__ quits (~elliott@pool-108-18-30-46.washdc.fios.verizon.net) (Ping timeout: 240 seconds)
21:26:20 <davean> safinaskar: I want to be clear, I've been telling you you can do that if you want
21:26:27 <davean> you're explicitely avoiding it
21:26:41 × falafel quits (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) (Ping timeout: 260 seconds)
21:26:50 <davean> I'm getting a touch tired of repeating myself though so I'm going to go do something productive :)
21:28:45 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 268 seconds)
21:29:02 <safinaskar> davean: "The early termination is epxlicite in the (&&) definition" - when i say "early" i don't mean chronologically early. i mean "placed early in source file"
21:31:33 <safinaskar> i understand how laziness in Haskell work. i understand that lazy would work differently in strict language. i understand what is fork. and i can make my code shorter using folds and other techniques (but i would not call fold-based code cleaner). but i still don't understand WHY i should solve all this haskell-releated problems instead of just
21:31:34 <safinaskar> writing imperative code
21:32:00 <seven_three> I think you want guards. https://dpaste.org/qjn1
21:32:36 <davean> seven_three: he SPECIFICLY wants to only use braces
21:32:53 <davean> He's already rejected all the Haskell options for getting exatly what he wants in the base language
21:33:03 <seven_three> oh nevermind then
21:33:22 <davean> So he'd need like 'when' and 'guard' on a Alternative
21:33:35 <davean> Which would get him to the C code, but he seems to ignore when I say that
21:34:42 <davean> I could search-replace his C++ code into Haskell
21:34:47 <safinaskar> davean: "they do the same things in the True branch, so you can collapse them" - how i can collapse them?
21:34:48 <dmj`> safinaskar: equational reasoning, safety, purity, abstraction are Haskell's main selling points. Laziness is convenient too. If you have a large codebase you want to maintain and refactor, anything but Haskell is a nightmare.
21:35:10 <davean> the 'if's become 'when' and the for becomes a fold, and we're done
21:35:57 <davean> foldM that is
21:37:02 <safinaskar> davean: "have you seen 'guard'?" - yes. let's imagine i am inside Maybe monad. i can easily early return Nothing simply by writing Nothing on separate line. but i cannot early return "Just 0" as opposed to imperative languages
21:38:16 <safinaskar> s/i understand what is fork/i understand what is fold/
21:38:28 <lechner> Hi, is there a way to parse more complex YAML structures using this code? Also, how do I get the values, please? Thanks! https://dpaste.org/YCnR#L16,17,18,19,20
21:39:10 seven_three parts (~user@pool-96-233-64-53.bstnma.fios.verizon.net) ("ERC (IRC client for Emacs 27.2)")
21:39:22 Guest78317 joins (~laudiacay@67.176.215.84)
21:39:31 × hyiltiz quits (~quassel@unaffiliated/hyiltiz) (Ping timeout: 260 seconds)
21:42:06 <davean> seven_three: I think the more relivent example would be "case" with guards specificly
21:42:46 <safinaskar> i still don't like haskell
21:43:13 × Major_Biscuit quits (~Major_Bis@82-169-100-198.biz.kpn.net) (Quit: WeeChat 3.0.1)
21:43:22 <davean> Feel free not to, but understand its because you're refusing to actually use it
21:43:34 × Guest78317 quits (~laudiacay@67.176.215.84) (Ping timeout: 252 seconds)
21:43:38 <davean> and want it to look exactly like another thing but refuse to use the parts of it that make it do that
21:43:59 nut joins (~user@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr)
21:44:02 × gitgood quits (~gitgood@80-44-9-246.dynamic.dsl.as9105.com) (Quit: Probably away to do something really awesome)
21:44:44 hyiltiz joins (~quassel@unaffiliated/hyiltiz)
21:45:46 <davean> safinaskar: We're here to help you, not make you like things, if your goal is to not like something, your success should be pretty easy.
21:48:09 <monochrom> "Is that 'avoid success at all costs?'?" meme :)
21:48:55 renzhi joins (~renzhi@2607:fa49:6500:bc00::e7b)
21:48:58 <davean> "f x | some_condition = True; f x | other_condition = False; f x = any (\i -> foo) [0 .. n - 1];" is clearly more focused on the thing your example is actually doing for example. Theres less "extra" in there, rejecting it for wanting braces is something you're entirely free to do though. And is has your ordering properly for example.
21:48:58 EmanuelLoos[m] joins (emanuel-lo@gateway/shell/matrix.org/x-xedchorwdbepbzbx)
21:49:42 <davean> but its really not interesting to talk to you when you are looking to push your stylistic interests and disinterested in even accepting you can have what you want (I actually have a C monad in some of my code I use for pasting C code in)
21:50:23 usr25 joins (~usr25@unaffiliated/usr25)
21:50:34 <davean> (Direclty pasting C code in took a ton of fuckery of course, but it mostly works)
21:50:59 usr25 parts (~usr25@unaffiliated/usr25) ()
21:51:20 × LKoen_ quits (~LKoen@77.168.9.109.rev.sfr.net) (Quit: “It’s only logical. First you learn to talk, then you learn to think. Too bad it’s not the other way round.”)
21:51:29 × __monty__ quits (~toonn@unaffiliated/toonn) (Quit: leaving)
21:52:00 <davean> safinaskar: but to save you some time, you not liking Haskell isn't going to bother anyone here
21:52:13 × elfets quits (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Ping timeout: 252 seconds)
21:52:56 × tmciver quits (~tmciver@cpe-172-101-40-226.maine.res.rr.com) (Ping timeout: 260 seconds)
21:54:46 tmciver joins (~tmciver@cpe-172-101-40-226.maine.res.rr.com)
21:56:57 <safinaskar> ""f x | some_condition = True; f x | other_condition = False; f x = any (\i -> foo) [0 .. n - 1];" is clearly more focused on the thing your example is actually doing for example. Theres less "extra" in there, rejecting it for wanting braces is something you're entirely free to do though" - your code is hard to write. to write such code i need to
21:56:58 <safinaskar> write code i usually write first, and then refactor it to your version. this is reason i don't write code like yours, not because of curly braces
21:57:41 jamm_ joins (~jamm@unaffiliated/jamm)
21:57:44 carldd joins (~carldd@90-224-49-113-no56.tbcn.telia.com)
21:58:34 <davean> safinaskar: thats entierly a you issue because they're the same code semanticly
21:59:21 <davean> Its a very slight stylistic difference in how you type it out, not even in how you think about it
21:59:42 <davean> perhaps you're thinking of it as something other than a very basic sytax sugar difference but thats all it is
22:00:00 <davean> your editor could let you type yours and generate mind even
22:00:04 <davean> thats *all* it is
22:00:11 × fendor quits (~fendor@178.165.130.27.wireless.dyn.drei.com) (Remote host closed the connection)
22:00:48 falafel joins (~falafel@pool-96-255-70-50.washdc.fios.verizon.net)
22:02:16 × jamm_ quits (~jamm@unaffiliated/jamm) (Ping timeout: 258 seconds)
22:03:20 gitgood joins (~gitgood@80-44-9-246.dynamic.dsl.as9105.com)
22:04:20 hiroaki_ joins (~hiroaki@2a02:908:4b18:8c40:2bbc:3100:411b:408e)
22:04:41 × Narinas quits (~Narinas@187-178-93-112.dynamic.axtel.net) (Ping timeout: 240 seconds)
22:05:30 <lechner> Hi, is it possible to represent JSON field names containing hyphens in data types declared with JSON Generics?
22:06:28 ph88 joins (~ph88@2a02:8109:9e00:7e5c:d5ef:86b3:afc4:9258)
22:08:20 <safinaskar> thanks for discussion! (i still have my opinion)
22:09:13 × Zunaka quits (~IceChat9@176.24.159.82) (Quit: Never underestimate the power of stupid people in large groups.)
22:09:44 × gitgood quits (~gitgood@80-44-9-246.dynamic.dsl.as9105.com) (Remote host closed the connection)
22:14:13 × falafel quits (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) (Ping timeout: 252 seconds)
22:14:44 × Alleria_ quits (~textual@2603-7000-3040-0000-8d12-8548-27bc-6b87.res6.spectrum.com) (Quit: Textual IRC Client: www.textualapp.com)
22:15:29 × kritzefitz quits (~kritzefit@212.86.56.80) (Remote host closed the connection)
22:16:21 ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta)
22:16:40 × kenanmarasli quits (1fdf0934@31.223.9.52) (Quit: Connection closed)
22:18:36 × nineonine quits (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4) (Remote host closed the connection)
22:19:10 nineonine joins (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4)
22:20:41 × ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 240 seconds)
22:21:33 × Cale quits (~cale@cpef48e38ee8583-cm0c473de9d680.cpe.net.cable.rogers.com) (Remote host closed the connection)
22:22:42 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
22:22:57 × Lowl3v3l quits (~Lowl3v3l@dslb-002-207-103-026.002.207.pools.vodafone-ip.de) (Quit: Leaving.)
22:23:12 Narinas joins (~Narinas@187-178-93-112.dynamic.axtel.net)
22:25:37 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
22:26:00 Stanley00 joins (~stanley00@unaffiliated/stanley00)
22:26:36 jess joins (jess@freenode/staff/jess)
22:26:39 dinciorip joins (~dincio@5.170.13.178)
22:27:14 × acarrico quits (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) (Ping timeout: 246 seconds)
22:28:16 × Stanley00 quits (~stanley00@unaffiliated/stanley00) (Remote host closed the connection)
22:28:43 × nineonine quits (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4) (Ping timeout: 258 seconds)
22:30:14 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
22:35:21 × sh9 quits (~sh9@softbank060116136158.bbtec.net) (Quit: WeeChat 2.8)
22:37:12 × nut quits (~user@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 268 seconds)
22:45:18 barakkleyman_ joins (~barakkley@2.55.14.78)
22:45:32 × barakkl1993 quits (~barakkley@2.55.46.17) (Ping timeout: 252 seconds)
22:52:05 × Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer)
22:54:10 ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta)
22:56:11 nineonine joins (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4)
22:56:12 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
22:57:04 Tario joins (~Tario@199.58.83.11)
22:58:46 × ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 252 seconds)
23:00:57 × nineonine quits (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4) (Remote host closed the connection)
23:01:06 loller_ joins (uid358106@gateway/web/irccloud.com/x-uyikepdymdnjzedf)
23:01:11 nineonine joins (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4)
23:03:00 × nineonine quits (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4) (Remote host closed the connection)
23:05:38 nineonine joins (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4)
23:05:44 × dinciorip quits (~dincio@5.170.13.178) (Ping timeout: 246 seconds)
23:08:36 viluon joins (uid453725@gateway/web/irccloud.com/x-nkzdiizrnnhacztz)
23:08:41 × Tario quits (~Tario@199.58.83.11) (Ping timeout: 240 seconds)
23:09:55 × nineonine quits (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4) (Ping timeout: 250 seconds)
23:11:39 machinedgod joins (~machinedg@24.105.81.50)
23:12:01 falafel joins (~falafel@pool-96-255-70-50.washdc.fios.verizon.net)
23:13:39 Cale joins (~cale@cpef48e38ee8583-cm0c473de9d680.cpe.net.cable.rogers.com)
23:19:37 × Synthetica quits (uid199651@gateway/web/irccloud.com/x-xpxejlqaymkwmeed) (Quit: Connection closed for inactivity)
23:20:11 Tario joins (~Tario@199.58.83.11)
23:20:23 sh9 joins (~sh9@softbank060116136158.bbtec.net)
23:20:30 × barakkleyman_ quits (~barakkley@2.55.14.78) (Ping timeout: 265 seconds)
23:20:39 × falafel quits (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) (Remote host closed the connection)
23:20:55 <infinisil> lechner: I guess you're talking about aeson?
23:21:37 <infinisil> lechner: If so, you can customize the field names of the derived instance with https://hackage.haskell.org/package/aeson-1.5.6.0/docs/Data-Aeson.html#v:fieldLabelModifier
23:23:44 falafel joins (~falafel@pool-96-255-70-50.washdc.fios.verizon.net)
23:25:56 gzj joins (~gzj@unaffiliated/gzj)
23:26:56 lambdaman joins (~lambdaman@s66-183-152-156.bc.hsia.telus.net)
23:27:27 saf222 joins (~user@109-252-90-136.nat.spd-mgts.ru)
23:27:48 saf222 parts (~user@109-252-90-136.nat.spd-mgts.ru) ()
23:28:00 <Axman6> safinaskar: I'm curious wherer you picked up the style you use in your Haskell, I've neverseen anyone write haskell like that
23:28:04 <Axman6> where*
23:29:04 ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta)
23:29:37 × Tario quits (~Tario@199.58.83.11) (Ping timeout: 268 seconds)
23:30:29 <Axman6> I can't remember the last time I saw curly brackets used for anything other than records, nested lets, using fully qualified modules for everything.
23:31:24 Codaraxis joins (Codaraxis@gateway/vpn/mullvad/codaraxis)
23:31:35 × Wuzzy quits (~Wuzzy@p5790e74f.dip0.t-ipconnect.de) (Quit: Wuzzy)
23:32:48 ep1ctetus joins (~epictetus@ip72-194-54-201.sb.sd.cox.net)
23:33:23 × ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 246 seconds)
23:33:23 × jonatan quits (~nate@h77-53-70-163.cust.a3fiber.se) (Ping timeout: 246 seconds)
23:33:39 jonatan joins (~nate@h77-53-70-163.cust.a3fiber.se)
23:34:18 × Codaraxis_ quits (~Codaraxis@141.98.255.147) (Ping timeout: 252 seconds)
23:34:45 × son0p quits (~ff@181.136.122.143) (Remote host closed the connection)
23:35:01 <monochrom> SPJ uses {;} too :)
23:35:18 <Axman6> yes, but not in the same way
23:35:34 <Axman6> and SPJ has more than earned the right to use whatever style he wants
23:37:33 <lechner> infinisil: thanks! should i use fieldLabelModifier to replace underscores with hyphens?
23:38:10 <infinisil> lechner: Sure that could work
23:38:17 × hidedagger quits (~nate@unaffiliated/hidedagger) (Quit: WeeChat 3.1)
23:39:31 <lechner> infinisil: is there a way to do it per field (and not necessarily for all)? I don't have that issue now but it seems more general
23:39:48 <infinisil> lechner: You can write an instance yourself
23:39:57 <Axman6> lechner: it sounds like you're nearing the point where just writing the instance will be easier
23:40:02 × zeenk quits (~zeenk@2a02:2f04:a10b:af00:91ba:3645:1cdb:9a75) (Quit: Konversation terminated!)
23:41:04 <Axman6> I did a CTF the other day and in it it had JSON documents with field names "N" and "p+q", "p-q" etc. it was definitely easier to just write the instances
23:42:19 <lechner> infinisil Axman6: it's my second time using Haskell. any hints would be appreciated https://paste.debian.net/1194239/
23:42:48 <infinisil> lechner: Just read through the aeson page
23:42:49 <Axman6> is Queue the one which has a hyphen?
23:43:14 <infinisil> lechner: Specifically https://hackage.haskell.org/package/aeson-1.5.6.0/docs/Data-Aeson.html#g:2
23:43:26 <lechner> base-directory, message-broker, routing-key, order-desk
23:44:12 × dcoutts_ quits (~dcoutts@unaffiliated/dcoutts) (Read error: Connection reset by peer)
23:44:34 dcoutts_ joins (~dcoutts@unaffiliated/dcoutts)
23:45:01 <Axman6> ok, well I'll use Queue as an example: instance FromJSON Queue where parseJSON = withObject "Queue" $ \v -> Queue <$> v .: "exchange" <*> v .: "routing-key" <*> v .: "queue"
23:45:28 <lechner> yeah, i just found it. thanks so much!
23:46:25 nineonine joins (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4)
23:46:30 <lechner> what's <$> vs <*> please?
23:46:38 Tario joins (~Tario@201.192.165.173)
23:46:58 <Axman6> <$> is infix fmap: (<$>) :: (a -> b) -> f a -> f b
23:47:32 <Axman6> <*> is infix ap, often pronounced "apply". (<*>) :: f (a -> b) -> f a -> f b
23:47:42 × nineonine quits (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4) (Remote host closed the connection)
23:47:45 <Axman6> this is known at the Applicative pattern
23:48:02 × fiedlr quits (~fiedlr@83.148.33.254) (Remote host closed the connection)
23:48:19 fiedlr joins (~fiedlr@83.148.33.254)
23:48:21 <lechner> i read about that yesterday, but only got half of it.
23:48:36 <Axman6> given a function f :: a -> b -> c -> d, and fa :: f a, fb :: f b, fc :: f c, the expression f <$> fa <*> fb <*> fc has type f d
23:49:08 <Axman6> it allows us to turn a function of type a -> b ... -> z into a function of type f a -> f b -> ... -> f z
23:49:29 <lechner> that part i got. i did not understand now and where to use such a powerful construct
23:49:33 <lechner> how
23:49:48 <Axman6> so, imagine f is Maybe, you can add the values in teo Maybe Int's by using (+) <$> Just 3 <*> Just 5
23:49:58 <lechner> it's a generalization of map
23:50:02 <Axman6> everywhere :)
23:50:10 <koz_> It's a generalization of function application.
23:50:14 <Axman6> > (+) <$> Just 4 <*> Just 5
23:50:15 <lechner> right
23:50:16 <koz_> Here's the key idea.
23:50:16 <lambdabot> Just 9
23:50:18 <koz_> :t ($)
23:50:20 <lambdabot> (a -> b) -> a -> b
23:50:22 <Axman6> > (+) <$> Just 4 <*> Nothing
23:50:24 <koz_> :t (<*>)
23:50:24 <lambdabot> Nothing
23:50:25 <lambdabot> Applicative f => f (a -> b) -> f a -> f b
23:50:35 <koz_> Notice how the only difference is that 'f' there?
23:50:43 <koz_> That 'f' is 'an effect'.
23:50:51 <lechner> it adds the monad
23:50:57 <koz_> So while ($) is 'pure function application', (<*>) is 'effectful function application'.
23:51:15 × hiroaki_ quits (~hiroaki@2a02:908:4b18:8c40:2bbc:3100:411b:408e) (Ping timeout: 260 seconds)
23:51:28 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
23:51:34 <lechner> why are they used in JSON instances, please?
23:51:41 <lechner> and how
23:51:59 <koz_> lechner: FromJSON has an effect - the Parser effect, to be exact.
23:52:04 × fiedlr quits (~fiedlr@83.148.33.254) (Remote host closed the connection)
23:52:13 × mnrmnaugh quits (~mnrmnaugh@unaffiliated/mnrmnaugh) (Ping timeout: 260 seconds)
23:52:34 <koz_> So the idea is that when you write a FromJSON instance, you work inside that effect, and that allows you to compose Parsers in various ways, by operating on 'what they would parse if they succeeded'.
23:52:39 × ph88 quits (~ph88@2a02:8109:9e00:7e5c:d5ef:86b3:afc4:9258) (Ping timeout: 260 seconds)
23:52:40 fiedlr joins (~fiedlr@83.148.33.254)
23:52:52 <Axman6> PArser is just another 'f' , a.k.a, a functor, and an applicative. if you trun :info PArser in ghic, you'll see it has instances for Functor, Applicative and Monad
23:52:53 <lechner> but when do i use which? the example has both
23:53:01 <koz_> What example?
23:53:10 <Axman6> the example has both of what?
23:53:21 <lechner> writing instances by hand https://hackage.haskell.org/package/aeson-1.5.6.0/docs/Data-Aeson.html#g:2
23:53:49 <koz_> lechner: withObject is a helper.
23:54:00 <koz_> The $ there has precisely 0 to do with JSON.
23:54:13 <Clint> lechner: until you understand it, just remember that <$> is the first one and everything else after that is <*>
23:54:21 <koz_> The part that uses the Parser effect is Person <$> v .: "name <*> v .: "age"
23:56:06 <lechner> it's a learning curve, but boy do i love haskell!
23:56:50 × fiedlr quits (~fiedlr@83.148.33.254) (Ping timeout: 246 seconds)
23:57:15 nineonine joins (~nineonine@2604:3d08:7785:9600:68a6:8c79:2caf:5ce4)
23:59:10 <Axman6> You'll pretty soon realise this pattern comes up _everywhere_

All times are in UTC on 2021-04-18.