Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2021-04-06 11:28:46 <merijn> olligobber: Oh, I am not saying you *shouldn't*, I learned a lot messing with dark arts, but it helps to be aware that what you are doing is in fact dark voodoo :p
2021-04-06 11:30:00 <olligobber> oh yeah, typing in "compose" and it returning "(b_0 -> c_1) -> (a_2 -> b_0) -> a_2 -> c_1" and "(λabc.a(bc))" is definitely voodoo
2021-04-06 11:30:16 <olligobber> I just wish the voodoo had less unnecessary underscores
2021-04-06 11:30:48 <Logio> extra precision is needed when dealing with demons
2021-04-06 11:31:30 stree joins (~stree@68.36.8.116)
2021-04-06 11:32:23 <merijn> olligobber: I'm still fond of this horror: https://gist.github.com/merijn/6130082 ;)
2021-04-06 11:32:46 <merijn> olligobber: You need the underscores because naming things is hard, even if you're a compiler!
2021-04-06 11:34:03 <Logio> I'm tempted to press the "report abuse" button on the gist
2021-04-06 11:34:09 malumore joins (~malumore@151.62.116.133)
2021-04-06 11:35:10 <merijn> Logio: Now realise I wrote that in 2013
2021-04-06 11:35:14 <merijn> ;)
2021-04-06 11:35:26 <merijn> You can do much worse now :p
2021-04-06 11:36:24 <olligobber> merijn, wait, so that is the identity function but it doesn't work on () or Int?
2021-04-06 11:36:39 <merijn> olligobber: YEs
2021-04-06 11:36:42 <olligobber> o_O
2021-04-06 11:36:43 <merijn> Well
2021-04-06 11:36:46 × minoru_shiraeesh quits (~shiraeesh@109.166.56.44) (Ping timeout: 240 seconds)
2021-04-06 11:36:56 <olligobber> also, I fixed the underscore thing, why can't ghc do it too?
2021-04-06 11:36:57 <merijn> olligobber: There's...some catches
2021-04-06 11:37:01 <olligobber> oh no
2021-04-06 11:37:15 <merijn> olligobber: As in, if you write "1" GHC can't tell if it's Int or not
2021-04-06 11:37:22 <olligobber> right
2021-04-06 11:37:30 <merijn> So (at least in 2013) it'd throw a hissy fit on polymorphic literals
2021-04-06 11:37:34 <olligobber> lol
2021-04-06 11:37:47 <merijn> But at least it was a compile time hissy fit!
2021-04-06 11:38:23 <merijn> You could probably write something better
2021-04-06 11:38:33 <olligobber> so I can't get rid of the underscores?
2021-04-06 11:38:37 × CitizenSnips quits (~CitizenSn@irc.refl.club) (Quit: ZNC 1.8.2 - https://znc.in)
2021-04-06 11:38:44 <merijn> This is also using a hacky ~ abuse to force the error, because there was no custom type errors at the time
2021-04-06 11:38:48 <merijn> olligobber: Probably no
2021-04-06 11:38:52 <olligobber> :(
2021-04-06 11:39:02 <merijn> olligobber: those type variable names are an internal detail of GHC
2021-04-06 11:39:37 <merijn> I mean, you could write code to rename all the type variables before printing...but that seems excessive >.>
2021-04-06 11:39:40 <olligobber> I've written a function that takes a traversable of ords and replaces each thing with a distinct name before though
2021-04-06 11:40:02 CitizenSnips joins (~CitizenSn@irc.refl.club)
2021-04-06 11:40:04 <olligobber> fine, underscores are ok
2021-04-06 11:40:14 <olligobber> the point of using template haskell here is to be lazy
2021-04-06 11:41:58 machinedgod joins (~machinedg@135-23-192-217.cpe.pppoe.ca)
2021-04-06 11:42:19 × royal_screwup211 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
2021-04-06 11:42:19 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
2021-04-06 11:42:30 geekosaur joins (ac3a53f2@172.58.83.242)
2021-04-06 11:42:38 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-04-06 11:42:39 <olligobber> as for dark magic, I type "fix", I get "(a_0 -> a_0) -> a_0" and "(λa.(λb.bb)(λb.a(bb)))"
2021-04-06 11:46:25 Sorna joins (~Sornaensi@077213203030.dynamic.telenor.dk)
2021-04-06 11:46:32 <merijn> I am both impressed and appalled :p
2021-04-06 11:46:39 <olligobber> :D
2021-04-06 11:47:11 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 240 seconds)
2021-04-06 11:49:38 <olligobber> oh no, GHC.Types.Bool?
2021-04-06 11:49:41 × Sornaensis quits (~Sornaensi@79.142.232.102.static.router4.bolignet.dk) (Ping timeout: 252 seconds)
2021-04-06 11:49:42 <olligobber> I just want Bool!
2021-04-06 11:50:06 maroloccio joins (~marolocci@pousada3ja.mma.com.br)
2021-04-06 11:51:43 Alleria_ joins (~AllahuAkb@2603-7000-3040-0000-51cb-91e5-ecfa-0406.res6.spectrum.com)
2021-04-06 11:52:27 × dougsko quits (~dougsko@139.28.218.148) (Remote host closed the connection)
2021-04-06 11:53:19 × v01d4lph4 quits (~v01d4lph4@223.177.183.124) (Read error: Connection reset by peer)
2021-04-06 11:53:48 v01d4lph4 joins (~v01d4lph4@223.177.183.124)
2021-04-06 11:55:21 kiweun joins (~kiweun@2607:fea8:2a62:9600:9c30:fa43:beb0:8b1b)
2021-04-06 11:56:01 drbean_ joins (~drbean@TC210-63-209-216.static.apol.com.tw)
2021-04-06 11:58:45 × jpds quits (~jpds@gateway/tor-sasl/jpds) (Ping timeout: 240 seconds)
2021-04-06 11:59:57 × kiweun quits (~kiweun@2607:fea8:2a62:9600:9c30:fa43:beb0:8b1b) (Ping timeout: 250 seconds)
2021-04-06 12:00:32 × frozenErebus quits (~frozenEre@37.231.244.249) (Ping timeout: 246 seconds)
2021-04-06 12:02:10 jpds joins (~jpds@gateway/tor-sasl/jpds)
2021-04-06 12:03:27 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-04-06 12:03:38 urodna joins (~urodna@unaffiliated/urodna)
2021-04-06 12:06:01 × malumore quits (~malumore@151.62.116.133) (Ping timeout: 260 seconds)
2021-04-06 12:08:00 × jpds quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
2021-04-06 12:09:11 × haskellstudent quits (~quassel@213-225-9-45.nat.highway.a1.net) (Ping timeout: 260 seconds)
2021-04-06 12:15:11 manuel joins (~manuel@185.204.1.185)
2021-04-06 12:15:38 <olligobber> huh, is regex not in haskell by default?
2021-04-06 12:16:04 <geekosaur> we tend to prefer parsers
2021-04-06 12:16:16 <olligobber> fair, but I'm doing hacky stuff
2021-04-06 12:16:17 Alleria joins (~textual@mskresolve-a.mskcc.org)
2021-04-06 12:16:19 <yushyin> 'in haskell'? we have regex libs on hackage
2021-04-06 12:16:30 <olligobber> yeah, but it isn't in base
2021-04-06 12:16:41 Alleria is now known as Guest96189
2021-04-06 12:17:03 <geekosaur> base is small, not "contains everything"
2021-04-06 12:17:28 <olligobber> yeah, and regex should be avoided
2021-04-06 12:17:30 <olligobber> hmm
2021-04-06 12:17:41 <olligobber> can I do this without regex
2021-04-06 12:18:10 <xsperry> you can get regex packages on hackage, just like parser packages
2021-04-06 12:18:39 <olligobber> yeah, but there must be a better way of doing this...
2021-04-06 12:19:01 <merijn> olligobber: Parser combinators :p
2021-04-06 12:19:11 <xsperry> what are you doing?
2021-04-06 12:19:22 <merijn> xsperry: Black magic :p
2021-04-06 12:19:35 <olligobber> printing a Type but without the underscores after type variables and library names before type constructors
2021-04-06 12:20:20 jpds joins (~jpds@gateway/tor-sasl/jpds)
2021-04-06 12:20:24 Tario joins (~Tario@201.192.165.173)
2021-04-06 12:20:53 <olligobber> I could write my own function...
2021-04-06 12:21:00 <geekosaur> :t span
2021-04-06 12:21:01 <lambdabot> (a -> Bool) -> [a] -> ([a], [a])
2021-04-06 12:21:21 <olligobber> nah, I'll just write my own function to render the ast
2021-04-06 12:21:30 <olligobber> famous last words
2021-04-06 12:21:59 Sorny joins (~Sornaensi@79.142.232.102.static.router4.bolignet.dk)
2021-04-06 12:23:18 <Uniaika> olligobber: what do you need regexps for?
2021-04-06 12:23:28 <Uniaika> ah, curse, my client has scrolled up
2021-04-06 12:23:31 <Uniaika> olligobber: don't mind me
2021-04-06 12:23:48 bahamas joins (~lucian@86.120.22.101)
2021-04-06 12:23:48 × bahamas quits (~lucian@86.120.22.101) (Changing host)
2021-04-06 12:23:48 bahamas joins (~lucian@unaffiliated/bahamas)
2021-04-06 12:24:09 <tdammers> personally, my first instinct would be to find a better representation of that Type, one that has more structure to it than just String
2021-04-06 12:24:23 nbloomf joins (~nbloomf@76.217.43.73)

All times are in UTC.