2022/10/09

2022-10-09 00:01:58 +0200wootehfoot(~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer)
2022-10-09 00:02:05 +0200mixphix(~mixphix@cpe5c7d7db831c8-cm5c7d7db831c6.cpe.net.cable.rogers.com)
2022-10-09 00:14:12 +0200acidjnk(~acidjnk@p200300d6e7137a48695c1121120f860b.dip0.t-ipconnect.de) (Ping timeout: 264 seconds)
2022-10-09 00:19:27 +0200king_gs(~Thunderbi@187.201.131.180) (Read error: Connection reset by peer)
2022-10-09 00:25:34 +0200ec(~ec@gateway/tor-sasl/ec)
2022-10-09 00:25:53 +0200mcglk(~mcglk@131.191.49.120) (Read error: Connection reset by peer)
2022-10-09 00:26:28 +0200mcglk(~mcglk@131.191.49.120)
2022-10-09 00:32:54 +0200ec(~ec@gateway/tor-sasl/ec) (Ping timeout: 258 seconds)
2022-10-09 00:32:55 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 252 seconds)
2022-10-09 00:34:45 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk)
2022-10-09 00:37:07 +0200jpds(~jpds@gateway/tor-sasl/jpds) (Ping timeout: 258 seconds)
2022-10-09 00:37:44 +0200aeboobohqu(~aeboobohq@aj099096.dynamic.ppp.asahi-net.or.jp) (Read error: Connection reset by peer)
2022-10-09 00:40:48 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk) (Ping timeout: 268 seconds)
2022-10-09 00:41:09 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:50e1:7448:ac98:298f) (Remote host closed the connection)
2022-10-09 00:41:35 +0200rockystone(~rocky@user/rockymarine)
2022-10-09 00:42:39 +0200mixphix(~mixphix@cpe5c7d7db831c8-cm5c7d7db831c6.cpe.net.cable.rogers.com) (Ping timeout: 265 seconds)
2022-10-09 00:46:09 +0200notzmv(~zmv@user/notzmv)
2022-10-09 00:50:14 +0200titibandit(~titibandi@xdsl-89-0-65-2.nc.de)
2022-10-09 00:50:55 +0200mixphix(~mixphix@cpe5c7d7db831c8-cm5c7d7db831c6.cpe.net.cable.rogers.com)
2022-10-09 00:53:11 +0200king_gs(~Thunderbi@187.201.131.180)
2022-10-09 00:54:06 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
2022-10-09 00:54:55 +0200tgi(~tgi@189.217.82.244)
2022-10-09 00:55:02 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan)
2022-10-09 00:55:12 +0200jpds(~jpds@gateway/tor-sasl/jpds)
2022-10-09 00:57:26 +0200mixphix(~mixphix@cpe5c7d7db831c8-cm5c7d7db831c6.cpe.net.cable.rogers.com) (Ping timeout: 260 seconds)
2022-10-09 00:58:37 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-10-09 00:58:37 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-10-09 00:58:37 +0200wroathe(~wroathe@user/wroathe)
2022-10-09 01:01:30 +0200Tuplanolla(~Tuplanoll@91-159-69-34.elisa-laajakaista.fi) (Quit: Leaving.)
2022-10-09 01:05:40 +0200tgi(~tgi@189.217.82.244) (Remote host closed the connection)
2022-10-09 01:08:52 +0200titibandit(~titibandi@xdsl-89-0-65-2.nc.de) (Remote host closed the connection)
2022-10-09 01:09:29 +0200jinsun(~jinsun@user/jinsun) (Read error: Connection reset by peer)
2022-10-09 01:10:20 +0200jinsun(~jinsun@user/jinsun)
2022-10-09 01:13:40 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk)
2022-10-09 01:18:01 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk) (Ping timeout: 252 seconds)
2022-10-09 01:19:33 +0200king_gs(~Thunderbi@187.201.131.180) (Quit: king_gs)
2022-10-09 01:19:47 +0200king_gs(~Thunderbi@187.201.131.180)
2022-10-09 01:21:10 +0200jpds(~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
2022-10-09 01:22:53 +0200jpds(~jpds@gateway/tor-sasl/jpds)
2022-10-09 01:24:55 +0200heinz9(~trace@user/trace) (Remote host closed the connection)
2022-10-09 01:29:03 +0200lagash(lagash@lagash.shelltalk.net) (Ping timeout: 268 seconds)
2022-10-09 01:30:55 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-10-09 01:31:59 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Client Quit)
2022-10-09 01:36:21 +0200gurkenglas(~gurkengla@p548ac72e.dip0.t-ipconnect.de)
2022-10-09 01:40:10 +0200king_gs(~Thunderbi@187.201.131.180) (Ping timeout: 265 seconds)
2022-10-09 01:40:49 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:50e1:7448:ac98:298f)
2022-10-09 01:55:20 +0200lagash(lagash@lagash.shelltalk.net)
2022-10-09 01:59:10 +0200causal(~user@2001:470:ea0f:3:329c:23ff:fe3f:1e0e) (Quit: WeeChat 3.6)
2022-10-09 02:01:01 +0200chomwitt(~chomwitt@athedsl-351954.home.otenet.gr) (Ping timeout: 260 seconds)
2022-10-09 02:06:24 +0200lagash(lagash@lagash.shelltalk.net) (Ping timeout: 264 seconds)
2022-10-09 02:08:53 +0200king_gs(~Thunderbi@187.201.131.180)
2022-10-09 02:21:19 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 268 seconds)
2022-10-09 02:25:21 +0200lagash(lagash@lagash.shelltalk.net)
2022-10-09 02:28:54 +0200gmg(~user@user/gehmehgeh)
2022-10-09 02:34:20 +0200gmg(~user@user/gehmehgeh) (Remote host closed the connection)
2022-10-09 02:35:26 +0200gmg(~user@user/gehmehgeh)
2022-10-09 02:39:14 +0200gmg(~user@user/gehmehgeh) (Remote host closed the connection)
2022-10-09 02:39:16 +0200king_gs(~Thunderbi@187.201.131.180) (Quit: king_gs)
2022-10-09 02:39:31 +0200rockystone(~rocky@user/rockymarine)
2022-10-09 02:39:34 +0200king_gs(~Thunderbi@187.201.131.180)
2022-10-09 02:40:00 +0200gmg(~user@user/gehmehgeh)
2022-10-09 02:48:19 +0200vorpuni(~pvorp@2001:861:3881:c690:67f7:ad96:2b5b:1073) (Remote host closed the connection)
2022-10-09 02:53:09 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Ping timeout: 265 seconds)
2022-10-09 02:53:52 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915)
2022-10-09 03:06:22 +0200Neosake[m](~neosakema@2001:470:69fc:105::2:989e)
2022-10-09 03:07:31 +0200king_gs(~Thunderbi@187.201.131.180) (Ping timeout: 260 seconds)
2022-10-09 03:10:27 +0200drsooch[m](~drsoochma@2001:470:69fc:105::1:c8a1)
2022-10-09 03:12:18 +0200mixphix(~mixphix@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
2022-10-09 03:14:21 +0200wroathe(~wroathe@user/wroathe) (Quit: Lost terminal)
2022-10-09 03:16:27 +0200mixphix(~mixphix@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 252 seconds)
2022-10-09 03:22:16 +0200gmg(~user@user/gehmehgeh) (Quit: Leaving)
2022-10-09 03:23:36 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-10-09 03:23:36 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-10-09 03:23:36 +0200wroathe(~wroathe@user/wroathe)
2022-10-09 03:26:34 +0200king_gs(~Thunderbi@2806:103e:29:c5:4fb1:a8c9:906f:c6e0)
2022-10-09 03:29:31 +0200rosalind(rosalind@id-194105.uxbridge.irccloud.com)
2022-10-09 03:30:35 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk)
2022-10-09 03:37:25 +0200justsomeguy(~justsomeg@user/justsomeguy) (Quit: WeeChat 3.5)
2022-10-09 03:37:30 +0200wroathe(~wroathe@user/wroathe) (Quit: Lost terminal)
2022-10-09 03:40:41 +0200ubert1(~Thunderbi@178.165.205.208.wireless.dyn.drei.com)
2022-10-09 03:41:58 +0200gurkenglas(~gurkengla@p548ac72e.dip0.t-ipconnect.de) (Ping timeout: 265 seconds)
2022-10-09 03:42:31 +0200ubert(~Thunderbi@178.165.197.164.wireless.dyn.drei.com) (Ping timeout: 260 seconds)
2022-10-09 03:42:32 +0200ubert1ubert
2022-10-09 03:42:35 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-10-09 03:42:35 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-10-09 03:42:35 +0200wroathe(~wroathe@user/wroathe)
2022-10-09 03:45:25 +0200machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net)
2022-10-09 03:45:34 +0200rosalindlovebug
2022-10-09 03:47:29 +0200beteigeuze(~Thunderbi@2001:8a0:61b5:6101:f0c:e4e3:bfdc:91df) (Ping timeout: 250 seconds)
2022-10-09 03:52:44 +0200olivermead[m](~olivermea@2001:470:69fc:105::2:4289)
2022-10-09 03:52:44 +0200jinsunGuest1502
2022-10-09 03:52:44 +0200jinsun__(~jinsun@user/jinsun)
2022-10-09 03:52:44 +0200Guest1502(~jinsun@user/jinsun) (Killed (tantalum.libera.chat (Nickname regained by services)))
2022-10-09 03:52:44 +0200jinsun__jinsun
2022-10-09 03:52:45 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 252 seconds)
2022-10-09 03:52:48 +0200jinsun(~jinsun@user/jinsun) (Read error: Connection reset by peer)
2022-10-09 03:54:05 +0200kilolympus(~kilolympu@213.144.144.24) (Read error: Connection reset by peer)
2022-10-09 03:57:52 +0200jinsun(~jinsun@user/jinsun)
2022-10-09 03:58:30 +0200nate1(~nate@98.45.169.16)
2022-10-09 04:00:12 +0200mixphix(~mixphix@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
2022-10-09 04:01:50 +0200ubert(~Thunderbi@178.165.205.208.wireless.dyn.drei.com) (Ping timeout: 268 seconds)
2022-10-09 04:01:51 +0200ubert1(~Thunderbi@178.115.74.207.wireless.dyn.drei.com)
2022-10-09 04:02:29 +0200johnjaye(~pi@173.209.64.74)
2022-10-09 04:02:59 +0200 <johnjaye> does haskell let functions take a variable number of arguments?
2022-10-09 04:03:21 +0200wroathe(~wroathe@user/wroathe) (Quit: Lost terminal)
2022-10-09 04:03:24 +0200rockystone(~rocky@user/rockymarine)
2022-10-09 04:04:09 +0200ubert1ubert
2022-10-09 04:07:50 +0200 <EvanR> functions in haskell take exactly 1 argument, no more no less. But you can add nuance to the question to get other answers
2022-10-09 04:08:45 +0200 <johnjaye> ok. i see the syntax for functions is simply the name followed by the arguments
2022-10-09 04:08:46 +0200waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 260 seconds)
2022-10-09 04:08:46 +0200 <EvanR> for example in the definition of a function you can mention more than 1 parameter, these will be automatically curried for you
2022-10-09 04:08:47 +0200jinsunGuest8869
2022-10-09 04:08:47 +0200jinsun__(~jinsun@user/jinsun)
2022-10-09 04:08:47 +0200Guest8869(~jinsun@user/jinsun) (Killed (copper.libera.chat (Nickname regained by services)))
2022-10-09 04:08:48 +0200jinsun__jinsun
2022-10-09 04:08:59 +0200 <johnjaye> so you can have expressions like f x + g x y z + h w u
2022-10-09 04:09:06 +0200 <johnjaye> oh ok
2022-10-09 04:09:21 +0200 <EvanR> in g x y z the grouping looks like ((g x) y) z
2022-10-09 04:09:23 +0200 <johnjaye> the lack of ( and ) is very strange.
2022-10-09 04:09:57 +0200 <EvanR> to the parser
2022-10-09 04:10:02 +0200 <johnjaye> i assume there's *some* reason every imperative language i've ever seen uses f() and not this way
2022-10-09 04:10:21 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 252 seconds)
2022-10-09 04:10:47 +0200 <EvanR> while imperative languages have multi-argument functions, they don't have convenient currying
2022-10-09 04:10:58 +0200 <johnjaye> meaning, how does the parser know how to parse it without them
2022-10-09 04:11:08 +0200 <EvanR> for example g x y z is valid, but also g x y and g x are valid. Which can be convenient
2022-10-09 04:11:37 +0200 <EvanR> g x y z can be parsed just like 2 + 3 + 4 + 5, because of associativity rules
2022-10-09 04:11:38 +0200 <king_gs> geekosaur: Unless you give AI's capacity to compete with humans for scarce resources. That won't happen.
2022-10-09 04:11:39 +0200jinsun(~jinsun@user/jinsun) (Read error: Connection reset by peer)
2022-10-09 04:11:49 +0200rockystone(~rocky@user/rockymarine)
2022-10-09 04:12:00 +0200 <johnjaye> i guess y better not be it's own function and variable at once, or g x y z could be ambiguous
2022-10-09 04:12:02 +0200 <EvanR> + takes 2 arguments, but 2 + 3 + 4 + 5 can still be parsed without parens
2022-10-09 04:12:04 +0200jinsun(~jinsun@user/jinsun)
2022-10-09 04:12:13 +0200 <EvanR> y can be a function
2022-10-09 04:12:28 +0200 <EvanR> remember it's the same as typing ((g x) y) z
2022-10-09 04:12:38 +0200 <EvanR> y doesn't get any arguments there
2022-10-09 04:12:48 +0200 <johnjaye> hmm.
2022-10-09 04:13:11 +0200 <EvanR> if you wanted to call y in the process of calling g you could do
2022-10-09 04:13:14 +0200 <johnjaye> so how do you write something complex like f(x,g(h,k)).
2022-10-09 04:13:16 +0200 <EvanR> g x (y 9) z
2022-10-09 04:13:19 +0200 <johnjaye> i guess that is f x g h k
2022-10-09 04:13:33 +0200mixphix(~mixphix@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 268 seconds)
2022-10-09 04:13:35 +0200 <johnjaye> oh weird. ok
2022-10-09 04:13:38 +0200 <EvanR> f x (g h x)
2022-10-09 04:13:43 +0200 <EvanR> oops
2022-10-09 04:13:44 +0200 <johnjaye> that looks vaguely lispish
2022-10-09 04:13:50 +0200 <EvanR> yeah it does at first
2022-10-09 04:14:03 +0200 <johnjaye> but the parens are strictly syntactic here?
2022-10-09 04:14:07 +0200 <johnjaye> just for grouping?
2022-10-09 04:14:09 +0200 <EvanR> but in Haskell, x, (x), ((x)), (((x))) are all the same
2022-10-09 04:14:15 +0200 <EvanR> it's just for grouping
2022-10-09 04:14:36 +0200 <EvanR> and we like to remove parens if they aren't necessary
2022-10-09 04:14:46 +0200 <johnjaye> bizarrely the interpreter does in fact accept ((2+2)) as valid.
2022-10-09 04:14:49 +0200 <johnjaye> ok then
2022-10-09 04:15:13 +0200 <johnjaye> i get a bit suspicious when a language suddenly does something incredible like that with no explanation
2022-10-09 04:15:25 +0200 <johnjaye> it raises the obvious reply, why aren't other language doing that
2022-10-09 04:15:44 +0200 <EvanR> other languages have been stealing stuff from haskell, actually
2022-10-09 04:15:58 +0200 <EvanR> but parentheses isn't really groundbreaking
2022-10-09 04:16:10 +0200vaibhavsagar[m](~vaibhavsa@2001:470:69fc:105::ffe)
2022-10-09 04:16:12 +0200 <johnjaye> so it's this implicit currying idea that's doing the work?
2022-10-09 04:16:29 +0200 <EvanR> look at the type of drop
2022-10-09 04:16:32 +0200 <EvanR> :t drop
2022-10-09 04:16:33 +0200 <lambdabot> Int -> [a] -> [a]
2022-10-09 04:16:35 +0200nate1(~nate@98.45.169.16) (Ping timeout: 252 seconds)
2022-10-09 04:16:42 +0200 <EvanR> the currying is evident in the type here
2022-10-09 04:16:50 +0200 <EvanR> instead of drop :: (Int, [a]) -> [a]
2022-10-09 04:17:17 +0200 <EvanR> note the lack of parentheses in the type, this time it associates the other direction
2022-10-09 04:17:24 +0200 <EvanR> drop :: Int -> ([a] -> [a])
2022-10-09 04:17:31 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 260 seconds)
2022-10-09 04:17:33 +0200 <Neosake[m]> Plus it is funny that people say "Programming" is not mathematical either. Funny enough, it is just a very thick level of abstraction between the two.
2022-10-09 04:17:35 +0200 <EvanR> drop is a function of 1 argument which returns a function (of 1 argument)
2022-10-09 04:17:54 +0200 <EvanR> you'll see this a lot if you look at the types, which you should
2022-10-09 04:18:49 +0200edrx(~Eduardo@2804:56c:d2d3:4800:cf7d:b421:4c3a:392e)
2022-10-09 04:18:58 +0200 <Neosake[m]> Plus most of this haskell stuff I do not know. I am an absolute rookie. xD
2022-10-09 04:19:31 +0200 <johnjaye> Neosake[m]: ironically math is often seen as 'not programming' either. when i was looking for books on category theory the first thing i asked is how to do computations about them
2022-10-09 04:19:52 +0200frost(~frost@user/frost)
2022-10-09 04:19:55 +0200 <edrx> @cabal-install
2022-10-09 04:19:55 +0200 <lambdabot> Unknown command, try @list
2022-10-09 04:20:00 +0200 <edrx> oops
2022-10-09 04:20:33 +0200 <johnjaye> EvanR: i do look at the types but I'm not that familiar with haskell yet.
2022-10-09 04:20:38 +0200rockystone(~rocky@user/rockymarine)
2022-10-09 04:20:59 +0200 <johnjaye> so the idea is that drop "really" takes the one argument. but gets automatically curried to take 2
2022-10-09 04:21:23 +0200 <EvanR> if you pass it 2, it still works
2022-10-09 04:21:44 +0200 <EvanR> because it's like doing (drop 3) [1,2,3,4]
2022-10-09 04:22:03 +0200 <Neosake[m]> johnjaye: Which is honestly crazy because Computer's were essentially math wizards in the day. Now it is just an extension of the mathematical conventions.
2022-10-09 04:22:07 +0200 <EvanR> but also drop 3 is a useful function in itself
2022-10-09 04:22:11 +0200 <johnjaye> prelude says no instance for (Show ([a0] -> [a0]))
2022-10-09 04:22:24 +0200 <EvanR> yeah you can't show functions normally
2022-10-09 04:22:32 +0200 <probie> That doesn't meant it's not a valid function, just that it's not a printable value
2022-10-09 04:22:48 +0200nate1(~nate@98.45.169.16)
2022-10-09 04:22:54 +0200 <edrx> people, what are your favorite links about cabal-install? I'm updating this page - http://angg.twu.net/eev-haskell.html ...
2022-10-09 04:23:06 +0200 <johnjaye> ah. prelude does accept (drop 3) [1,2,3,4,5]
2022-10-09 04:23:06 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-10-09 04:23:07 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-10-09 04:23:07 +0200wroathe(~wroathe@user/wroathe)
2022-10-09 04:23:24 +0200 <Neosake[m]> Also, any fellow NixOS users?
2022-10-09 04:23:39 +0200 <johnjaye> Neosake[m]: i'm an aspiring nixos user. but somehow i never find the time to actually do it.
2022-10-09 04:23:42 +0200jakalx(~jakalx@base.jakalx.net) (Error from remote client)
2022-10-09 04:23:49 +0200 <johnjaye> i'm afraid it will choke if i try it on actual hardware
2022-10-09 04:24:10 +0200 <Neosake[m]> Interesting, I've had nothing but good experiences on live hardware
2022-10-09 04:25:28 +0200 <probie> You can also use `drop 3`, anywhere a function of type `[a] -> [a]` can go without needing to do something like `\x -> drop 3 x`
2022-10-09 04:25:33 +0200jakalx(~jakalx@base.jakalx.net)
2022-10-09 04:25:34 +0200 <probie> > map (drop 3) [[1..5], [6..10], [10..15]]
2022-10-09 04:25:36 +0200 <lambdabot> [[4,5],[9,10],[13,14,15]]
2022-10-09 04:25:42 +0200 <EvanR> johnjaye, in haskell you can get a lot out of "things that don't change the meaning of this code"
2022-10-09 04:25:58 +0200 <EvanR> which I guess you can call "laws"
2022-10-09 04:26:31 +0200 <EvanR> redundant parentheses is a simple example
2022-10-09 04:26:34 +0200 <Neosake[m]> I will be back in a bit. Gonna go back to reading the wikibooks
2022-10-09 04:26:38 +0200 <johnjaye> well. i'm not advanced enough to grasp why you would need to write \x -> drop 3 x
2022-10-09 04:26:45 +0200 <johnjaye> from lisp i can see what the intention is though
2022-10-09 04:26:59 +0200 <EvanR> sometimes an `x' can be introduced to make something clearer
2022-10-09 04:27:05 +0200 <EvanR> drop 3 is already pretty clear though
2022-10-09 04:27:18 +0200 <EvanR> other times, removing the x can make it very unclear
2022-10-09 04:27:22 +0200 <johnjaye> yes. but only after you explained it.
2022-10-09 04:27:23 +0200 <EvanR> we have a command for that
2022-10-09 04:27:23 +0200 <johnjaye> heh
2022-10-09 04:27:31 +0200 <EvanR> @pl \x -> drop 3 x
2022-10-09 04:27:31 +0200 <lambdabot> drop 3
2022-10-09 04:28:08 +0200 <EvanR> @pl \x -> 9 + x * 2
2022-10-09 04:28:09 +0200 <lambdabot> (9 +) . (2 *)
2022-10-09 04:28:27 +0200 <EvanR> well, I can't come up with a really bad one
2022-10-09 04:28:36 +0200nate1(~nate@98.45.169.16) (Ping timeout: 260 seconds)
2022-10-09 04:28:49 +0200 <johnjaye> haskell does feel very mathematical i'll grant that though.
2022-10-09 04:29:06 +0200 <johnjaye> in the sense of, packing large abstractions into a single character 'x' or 'f'
2022-10-09 04:29:29 +0200 <johnjaye> like how the entire theory of the reimann integral is encoded into what is essentially an elongated S
2022-10-09 04:29:38 +0200 <EvanR> haskell is cool for have... lets say... actual abstractions, like they actually work
2022-10-09 04:29:42 +0200 <EvanR> and it's not just a vague analogy
2022-10-09 04:29:47 +0200 <EvanR> having*
2022-10-09 04:30:12 +0200 <johnjaye> yeah. i feel like once i get to know the syntax a bit better it would be like that
2022-10-09 04:30:38 +0200mixphix(~mixphix@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
2022-10-09 04:31:15 +0200 <johnjaye> thanks for the explanation
2022-10-09 04:31:22 +0200 <EvanR> np
2022-10-09 04:33:01 +0200 <probie> @pl \x y -> (2*x) == (x-y)
2022-10-09 04:33:01 +0200 <lambdabot> ap ((.) . (==) . (2 *)) (-)
2022-10-09 04:33:49 +0200 <EvanR> that's a good example of why you'd write ap ((.) . (==) . (2 *)) (-) as \x y -> 2*x == x-y
2022-10-09 04:34:10 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk) (Ping timeout: 265 seconds)
2022-10-09 04:35:03 +0200 <EvanR> composition chains are cool, but two of the things in that chain are notionally "binary operators" xD
2022-10-09 04:35:08 +0200mixphix(~mixphix@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 268 seconds)
2022-10-09 04:35:10 +0200 <EvanR> making my brain hurt
2022-10-09 04:35:37 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
2022-10-09 04:35:37 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-10-09 04:37:15 +0200 <edrx> EvanR: I'm using these kinds of diagrams to understand the types of subexpressions - http://angg.twu.net/HASKELL/Applicative1.hs.html - and they're helping me a lot...
2022-10-09 04:37:59 +0200 <EvanR> whoa
2022-10-09 04:38:36 +0200 <edrx> =)
2022-10-09 04:43:00 +0200terrorjack(~terrorjac@2a01:4f8:1c1e:509a::1) (Quit: The Lounge - https://thelounge.chat)
2022-10-09 04:44:20 +0200terrorjack(~terrorjac@2a01:4f8:1c1e:509a::1)
2022-10-09 04:44:58 +0200lovebugrosalind
2022-10-09 04:45:04 +0200 <johnjaye> echo -sh http://angg.twu.net/HASKELL/Applicative1.hs.html > /tmp/a
2022-10-09 04:46:20 +0200 <edrx> what is /tmp/a?
2022-10-09 04:46:39 +0200 <johnjaye> shortest filename i can think of. weechat is being stubborn and won't let me save the link properly
2022-10-09 04:46:39 +0200 <edrx> btw, the non-htmlized version is here: http://angg.twu.net/HASKELL/Applicative1.hs
2022-10-09 04:46:52 +0200 <edrx> ok
2022-10-09 04:47:16 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 260 seconds)
2022-10-09 04:47:26 +0200mixphix(~mixphix@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
2022-10-09 04:47:47 +0200 <johnjaye> ah i had params switched. now i have it.
2022-10-09 04:48:41 +0200 <ski> johnjaye : "but gets automatically curried to take 2" -- currying only exists in your head, not in Haskell
2022-10-09 04:48:52 +0200 <ski> "things that don't change the meaning of this code" -- refactorings
2022-10-09 04:49:41 +0200 <johnjaye> i see
2022-10-09 04:50:26 +0200 <ski> currying is one way to represent/encode "multiple parameter functions", (e.g.) in a context which only has "single parameter functions" (like Haskell)
2022-10-09 04:51:16 +0200 <ski> "tupling" is another way to do that. packing the "multiple parameters" into a single aggregate/compound. e.g. a tuple, but could be a record/`struct', or even a list, or finite map, or set or bag or ..
2022-10-09 04:51:39 +0200 <ski> Haskell does not "have currying"
2022-10-09 04:52:24 +0200 <EvanR> let f x y = [x,x,y] in ..., looks like a multiple parameter function, so in a way they are supported, or avoided by currying on your behalf
2022-10-09 04:52:24 +0200mixphix(~mixphix@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 268 seconds)
2022-10-09 04:52:45 +0200 <ski> what Haskell does have, is a syntax (including precedence and fixity) which is specially designed to make it fairly syntactically easy/painless to encode functions curriedly
2022-10-09 04:54:06 +0200 <EvanR> :t uncurry
2022-10-09 04:54:07 +0200 <lambdabot> (a -> b -> c) -> (a, b) -> c
2022-10-09 04:54:20 +0200 <ski> but `f x y = ...' is basically the same as `(define f (lambda (x) (lambda (y) ...)))' in Scheme (although Scheme *does* have a primitive notion of "multiple parameter (also result ..) procedures" .. but you can still use currying, as well as tupling, in Scheme too)
2022-10-09 04:54:37 +0200 <ski> @type curry
2022-10-09 04:54:38 +0200 <lambdabot> ((a, b) -> c) -> a -> b -> c
2022-10-09 04:54:56 +0200 <EvanR> funny I've never used curry xD
2022-10-09 04:55:22 +0200 <ski> it's interesting to note that `curry' can be thought of as a three-parameter function (accepting one callback function, and two additional parameters, that it tuples when calling the callback), which is expressed curriedly
2022-10-09 04:55:54 +0200jmorris(uid537181@id-537181.uxbridge.irccloud.com)
2022-10-09 04:56:10 +0200 <ski> but it can also be thought of as a two-parameter function (accepting one callback function, and one parameter, returning the callback partially applied to that parameter)
2022-10-09 04:56:30 +0200 <ski> in this latter form, `curry' can be thought of as `partiallyApply'
2022-10-09 04:57:43 +0200 <johnjaye> i like how haskell just directly defines init/last in mirror of head/tail
2022-10-09 04:58:08 +0200 <ski> however, i consider both `\y -> f (x0,y)' and `\x -> f (x,y0)' as partial applications of the tupled function `f'. just like both `g x0 = \y -> g x0 y' and `\x -> g x y0' are partial applications of the curried function `g'
2022-10-09 04:58:47 +0200 <ski> EvanR : i occasionally use `curry' as an infix operator ..
2022-10-09 04:59:21 +0200 <ski> map (foo `curry` x0) ys
2022-10-09 04:59:45 +0200rockystone(~rocky@user/rockymarine)
2022-10-09 05:00:13 +0200razetime(~quassel@117.193.2.178)
2022-10-09 05:00:45 +0200 <EvanR> > foldl1 (\a x -> x) [1,2,3,4,99]
2022-10-09 05:00:47 +0200 <lambdabot> 99
2022-10-09 05:00:53 +0200 <ski> (similarly to how i also can use `flip' in infix position)
2022-10-09 05:01:02 +0200td_(~td@94.134.91.128) (Ping timeout: 268 seconds)
2022-10-09 05:01:27 +0200jero98772(~jero98772@2800:484:1d80:d8ce:efcc:cbb3:7f2a:6dff) (Remote host closed the connection)
2022-10-09 05:01:51 +0200 <EvanR> johnjaye, I just tried to lookup init and last, seems they have a more optimized form than @src https://hackage.haskell.org/package/base-4.17.0.0/docs/src/GHC.List.html#init
2022-10-09 05:02:19 +0200td_(~td@94.134.91.56)
2022-10-09 05:02:22 +0200 <EvanR> hah, last actually uses foldl
2022-10-09 05:02:41 +0200 <EvanR> foldl gets no respect
2022-10-09 05:02:59 +0200 <ski> edrx : fwiw, instead of `fmap0',`fmap1',`fmap2',`fmap3', i'd probably say `liftA0',`liftA1',`liftA2',`liftA3' (or even `liftM0',`liftM1',`liftM2',`liftM3' .. this was from before `Applicative' was a thing, though)
2022-10-09 05:04:28 +0200 <ski> edrx : but yes, multiary Lispy `map' (`mapcar') is basically this, for the case of (parallel/lockstep) lists
2022-10-09 05:04:46 +0200 <edrx> ski: thanks! let me see... I think that I followed the terminology from Hutton's book in some places and the terminology from the Prelude in other places...
2022-10-09 05:05:10 +0200 <ski> > getZipList (liftA2 (+) (ZipList [2,3]) (ZipList [400,500,600]))
2022-10-09 05:05:13 +0200 <lambdabot> [402,503]
2022-10-09 05:05:21 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 268 seconds)
2022-10-09 05:06:46 +0200 <ski> edrx : anyway, with a little practice, you'll be making these typing diagrams in your head :)
2022-10-09 05:07:29 +0200 <edrx> ski: =)
2022-10-09 05:09:01 +0200wroathe(~wroathe@user/wroathe) (Quit: Lost terminal)
2022-10-09 05:12:22 +0200 <ski> @type uncurry curry
2022-10-09 05:12:24 +0200 <lambdabot> ((a, b) -> c, a) -> b -> c
2022-10-09 05:13:17 +0200 <c_wraith> that function looks like a prank gone wrong
2022-10-09 05:13:52 +0200 <ski> @type uncurry3 curry
2022-10-09 05:13:54 +0200 <lambdabot> ((a, b) -> t4, a, b) -> t4
2022-10-09 05:14:09 +0200 <ski> heh :)
2022-10-09 05:14:56 +0200nate1(~nate@98.45.169.16)
2022-10-09 05:17:29 +0200 <EvanR> (a,b) -> c,a
2022-10-09 05:17:37 +0200 <EvanR> uncromulent
2022-10-09 05:18:14 +0200 <EvanR> (but is actually right in agda)
2022-10-09 05:18:23 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-10-09 05:18:23 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-10-09 05:18:23 +0200wroathe(~wroathe@user/wroathe)
2022-10-09 05:18:24 +0200[_](~itchyjunk@user/itchyjunk/x-7353470)
2022-10-09 05:21:03 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 265 seconds)
2022-10-09 05:21:51 +0200skiwishes GHC would elide the spaces after the commas, there ..
2022-10-09 05:25:24 +0200nate1(~nate@98.45.169.16) (Ping timeout: 265 seconds)
2022-10-09 05:25:43 +0200rockystone(~rocky@user/rockymarine)
2022-10-09 05:26:22 +0200mixphix(~mixphix@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
2022-10-09 05:31:01 +0200mixphix(~mixphix@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 260 seconds)
2022-10-09 05:35:08 +0200zmt00(~zmt00@user/zmt00) (Read error: Connection reset by peer)
2022-10-09 05:35:14 +0200nate1(~nate@98.45.169.16)
2022-10-09 05:37:45 +0200zmt00(~zmt00@user/zmt00)
2022-10-09 05:39:39 +0200dtman34(~dtman34@c-75-73-141-79.hsd1.mn.comcast.net)
2022-10-09 05:41:07 +0200nate1(~nate@98.45.169.16) (Ping timeout: 268 seconds)
2022-10-09 05:44:13 +0200king_gs(~Thunderbi@2806:103e:29:c5:4fb1:a8c9:906f:c6e0) (Ping timeout: 246 seconds)
2022-10-09 05:50:09 +0200nate1(~nate@98.45.169.16)
2022-10-09 05:51:36 +0200razetime(~quassel@117.193.2.178) (Ping timeout: 268 seconds)
2022-10-09 05:56:48 +0200Topsi(~Topsi@dyndsl-095-033-089-091.ewe-ip-backbone.de) (Read error: Connection reset by peer)
2022-10-09 06:00:11 +0200mixphix(~mixphix@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
2022-10-09 06:01:39 +0200nate1(~nate@98.45.169.16) (Ping timeout: 265 seconds)
2022-10-09 06:02:12 +0200rosalindlys
2022-10-09 06:05:23 +0200LemniscateSauvin
2022-10-09 06:07:54 +0200Franciman(~Franciman@mx1.fracta.dev) (Read error: Connection reset by peer)
2022-10-09 06:08:50 +0200zebrag(~chris@user/zebrag) (Quit: Konversation terminated!)
2022-10-09 06:09:14 +0200king_gs(~Thunderbi@187.201.131.180)
2022-10-09 06:09:31 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 260 seconds)
2022-10-09 06:13:36 +0200king_gs(~Thunderbi@187.201.131.180) (Ping timeout: 260 seconds)
2022-10-09 06:14:10 +0200 <dolio> In Agda a,b is a single identifier.
2022-10-09 06:18:08 +0200Franciman(~Franciman@mx1.fracta.dev)
2022-10-09 06:19:57 +0200coot(~coot@213.134.171.3)
2022-10-09 06:20:10 +0200 <probie> Off-topic, but I'd always assumed it'd be incromulent instead of uncromulent, since "lent" feels like the ending for a Latin derived word
2022-10-09 06:22:46 +0200rockystone(~rocky@user/rockymarine)
2022-10-09 06:24:32 +0200wroathe(~wroathe@user/wroathe) (Quit: Lost terminal)
2022-10-09 06:26:45 +0200mixphix(~mixphix@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 252 seconds)
2022-10-09 06:30:19 +0200 <edrx> where is the module System.Process defined?
2022-10-09 06:31:16 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-10-09 06:31:16 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-10-09 06:31:16 +0200wroathe(~wroathe@user/wroathe)
2022-10-09 06:31:39 +0200 <edrx> I guess that in some preprocessed file, but my grepping tools don't work on them yet... =(
2022-10-09 06:32:29 +0200 <probie> Do you mean https://github.com/haskell/process/blob/master/System/Process.hs ?
2022-10-09 06:34:35 +0200 <edrx> probie: oops, yes - thanks, I just found what I need to fix...
2022-10-09 06:37:44 +0200razetime(~quassel@117.193.2.178)
2022-10-09 06:40:28 +0200mixphix(~mixphix@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
2022-10-09 06:45:09 +0200mixphix(~mixphix@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 265 seconds)
2022-10-09 06:45:27 +0200 <VarikValefor[m]> Testing...
2022-10-09 06:46:00 +0200king_gs(~Thunderbi@187.201.131.180)
2022-10-09 06:46:55 +0200xff0x(~xff0x@ai071162.d.east.v6connect.net) (Ping timeout: 252 seconds)
2022-10-09 06:47:18 +0200xff0x(~xff0x@ai071162.d.east.v6connect.net)
2022-10-09 06:48:00 +0200 <EvanR> pong
2022-10-09 06:48:10 +0200lysrosalind
2022-10-09 06:48:43 +0200 <edrx> pung
2022-10-09 06:49:05 +0200[_](~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection)
2022-10-09 06:50:28 +0200king_gs(~Thunderbi@187.201.131.180) (Ping timeout: 265 seconds)
2022-10-09 06:54:48 +0200mbuf(~Shakthi@49.204.141.204)
2022-10-09 06:55:19 +0200incertia(~incertia@d47-69-133-171.try.wideopenwest.com) (Quit: ZNC 1.7.5 - https://znc.in)
2022-10-09 07:00:19 +0200Luj(~Luj@2a01:e0a:5f9:9681:43e9:ccab:b409:cf4f) (Quit: Ping timeout (120 seconds))
2022-10-09 07:00:24 +0200 <edrx> hey, I tried this program - https://lotz84.github.io/haskellbyexample/ex/spawning-processes - and it does compile and run, but I need to give it a ^D...
2022-10-09 07:00:32 +0200 <edrx> how do I make it end by itself?
2022-10-09 07:00:36 +0200Luj(~Luj@2a01:e0a:5f9:9681:5880:c9ff:fe9f:3dfb)
2022-10-09 07:02:19 +0200 <probie> maybe `hClose hin`?
2022-10-09 07:02:29 +0200 <EvanR> I blocked on grep hello
2022-10-09 07:03:05 +0200 <edrx> let me see
2022-10-09 07:03:45 +0200 <EvanR> note hGetContents is a big weird in that it returns list generated by "lazy I/O" (scare quotes)
2022-10-09 07:03:49 +0200 <EvanR> bit*
2022-10-09 07:06:37 +0200 <edrx> where should I put the hClose hin? I tried this - https://0x0.st/otAd.txt - and got the same bahavior...
2022-10-09 07:10:02 +0200 <edrx> hmm, it seems that withCreateProcess does the expected clean-ups...
2022-10-09 07:10:50 +0200 <EvanR> which part does it hang on
2022-10-09 07:11:25 +0200 <EvanR> if it's reading stdin, then it's waiting for end of file, i.e. control D
2022-10-09 07:12:20 +0200 <edrx> look: https://i.ibb.co/r3QfQZ2/sshot.png
2022-10-09 07:13:40 +0200 <EvanR> yeah I hang on grep hello
2022-10-09 07:13:53 +0200 <EvanR> seems like your grep command just isn't right
2022-10-09 07:14:07 +0200 <probie> after `hPutStr` (for grep)
2022-10-09 07:14:15 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
2022-10-09 07:14:38 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 265 seconds)
2022-10-09 07:14:46 +0200 <probie> No input is being sent to grep (it's waiting for a flush, either directly, or from a close), so there's nothing to print
2022-10-09 07:14:59 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-10-09 07:15:29 +0200 <probie> s/No input/Only "hello grep"/
2022-10-09 07:15:53 +0200 <edrx> probie: trying
2022-10-09 07:16:41 +0200 <edrx> probie: perfect! thanks! =)
2022-10-09 07:17:07 +0200 <EvanR> just grepping into the wind xD
2022-10-09 07:19:55 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 252 seconds)
2022-10-09 07:22:28 +0200rockystone(~rocky@user/rockymarine)
2022-10-09 07:25:41 +0200mixphix(~mixphix@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
2022-10-09 07:30:16 +0200mixphix(~mixphix@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 268 seconds)
2022-10-09 07:32:01 +0200raym(~aritra@user/raym) (Ping timeout: 252 seconds)
2022-10-09 07:33:03 +0200raym(~aritra@user/raym)
2022-10-09 07:34:05 +0200 <edrx> http://angg.twu.net/HASKELL/Tac1.hs.html
2022-10-09 07:34:48 +0200 <edrx> that's my first non-trivial program with IO, btw =) =) =)
2022-10-09 07:35:23 +0200 <EvanR> oh now I get it, hin is the output xD
2022-10-09 07:35:42 +0200 <EvanR> yeah must be closed on this end to finish the process
2022-10-09 07:36:17 +0200 <EvanR> what's in and what's out gets confusing when doing subprocess
2022-10-09 07:48:41 +0200machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 260 seconds)
2022-10-09 07:53:17 +0200arahael(~arahael@203.217.43.212) (Ping timeout: 252 seconds)
2022-10-09 07:55:52 +0200nate1(~nate@98.45.169.16)
2022-10-09 08:00:37 +0200nate1(~nate@98.45.169.16) (Ping timeout: 252 seconds)
2022-10-09 08:06:39 +0200arahael(~arahael@61.68.183.79)
2022-10-09 08:12:06 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-10-09 08:17:51 +0200jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 252 seconds)
2022-10-09 08:17:53 +0200rosalindlys
2022-10-09 08:20:42 +0200 <edrx> EvanR: hin is the handle or the stdin of the process
2022-10-09 08:21:12 +0200 <edrx> or did you mean that I should close its stdout too?
2022-10-09 08:22:19 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-10-09 08:22:25 +0200chomwitt(~chomwitt@2a02:587:dc0c:c200:442:40c1:9d7f:23d1)
2022-10-09 08:29:33 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 265 seconds)
2022-10-09 08:30:43 +0200nate1(~nate@98.45.169.16)
2022-10-09 08:35:22 +0200nate1(~nate@98.45.169.16) (Ping timeout: 246 seconds)
2022-10-09 08:39:43 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-10-09 08:40:44 +0200 <edrx> time to crash!
2022-10-09 08:40:47 +0200 <edrx> gnight all =)
2022-10-09 08:40:50 +0200edrx(~Eduardo@2804:56c:d2d3:4800:cf7d:b421:4c3a:392e) (Killed buffer)
2022-10-09 08:44:05 +0200rockystone(~rocky@user/rockymarine)
2022-10-09 08:44:46 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
2022-10-09 08:45:41 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-10-09 08:45:41 +0200jmorris(uid537181@id-537181.uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
2022-10-09 08:47:25 +0200mixphix(~mixphix@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
2022-10-09 08:51:41 +0200mixphix(~mixphix@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 260 seconds)
2022-10-09 09:05:48 +0200acidjnk(~acidjnk@p200300d6e7137a48695c1121120f860b.dip0.t-ipconnect.de)
2022-10-09 09:09:43 +0200takuan(~takuan@178-116-218-225.access.telenet.be)
2022-10-09 09:14:59 +0200raym(~aritra@user/raym) (Ping timeout: 265 seconds)
2022-10-09 09:16:23 +0200Tuplanolla(~Tuplanoll@91-159-69-34.elisa-laajakaista.fi)
2022-10-09 09:16:32 +0200raym(~aritra@user/raym)
2022-10-09 09:19:25 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:50e1:7448:ac98:298f) (Remote host closed the connection)
2022-10-09 09:21:16 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 268 seconds)
2022-10-09 09:31:08 +0200raym(~aritra@user/raym) (Ping timeout: 268 seconds)
2022-10-09 09:31:24 +0200raym(~aritra@user/raym)
2022-10-09 09:34:19 +0200razetime(~quassel@117.193.2.178) (Ping timeout: 265 seconds)
2022-10-09 09:38:01 +0200ksu(~ksu@user/prtr) (Ping timeout: 246 seconds)
2022-10-09 09:38:14 +0200rockystone(~rocky@user/rockymarine)
2022-10-09 09:40:03 +0200mixphix(~mixphix@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
2022-10-09 09:40:37 +0200ksu(~ksu@user/prtr)
2022-10-09 09:41:30 +0200aidy(~aidy@2001:470:69fc:105::c7b4)
2022-10-09 09:43:41 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 250 seconds)
2022-10-09 09:44:42 +0200mixphix(~mixphix@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 268 seconds)
2022-10-09 09:49:01 +0200Lycurgus(~juan@user/Lycurgus)
2022-10-09 09:59:34 +0200Lycurgus(~juan@user/Lycurgus) (Quit: Exeunt juan@acm.org)
2022-10-09 10:00:13 +0200nate1(~nate@98.45.169.16)
2022-10-09 10:04:55 +0200nate1(~nate@98.45.169.16) (Ping timeout: 252 seconds)
2022-10-09 10:07:00 +0200sudden(~cat@user/sudden) (Ping timeout: 264 seconds)
2022-10-09 10:09:12 +0200Franciman(~Franciman@mx1.fracta.dev) (Read error: Connection reset by peer)
2022-10-09 10:11:55 +0200zaquest(~notzaques@5.130.79.72) (Remote host closed the connection)
2022-10-09 10:13:08 +0200wootehfoot(~wootehfoo@user/wootehfoot)
2022-10-09 10:16:48 +0200bendo(~bendo@fire-ara4.tngtech.com)
2022-10-09 10:18:27 +0200Franciman(~Franciman@mx1.fracta.dev)
2022-10-09 10:19:56 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:50e1:7448:ac98:298f)
2022-10-09 10:23:26 +0200sudden(~cat@user/sudden)
2022-10-09 10:24:35 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:50e1:7448:ac98:298f) (Ping timeout: 248 seconds)
2022-10-09 10:26:47 +0200Vajb(~Vajb@85-76-75-28-nat.elisa-mobile.fi) (Read error: Connection reset by peer)
2022-10-09 10:27:28 +0200Vajb(~Vajb@hag-jnsbng11-58c3a5-27.dhcp.inet.fi)
2022-10-09 10:33:20 +0200Vajb(~Vajb@hag-jnsbng11-58c3a5-27.dhcp.inet.fi) (Read error: Connection reset by peer)
2022-10-09 10:34:51 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk)
2022-10-09 10:34:59 +0200Vajb(~Vajb@2001:999:504:1841:9e47:1ec7:a52e:1d57)
2022-10-09 10:37:55 +0200razetime(~quassel@117.193.2.178)
2022-10-09 10:44:24 +0200wootehfoot(~wootehfoo@user/wootehfoot) (Ping timeout: 265 seconds)
2022-10-09 10:44:37 +0200zxx7529(~Thunderbi@user/zxx7529)
2022-10-09 10:49:31 +0200Sgeo(~Sgeo@user/sgeo) (Read error: Connection reset by peer)
2022-10-09 10:53:54 +0200zaquest(~notzaques@5.130.79.72)
2022-10-09 10:55:23 +0200mixphix(~mixphix@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
2022-10-09 10:59:33 +0200mixphix(~mixphix@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 252 seconds)
2022-10-09 11:03:16 +0200zxx7529(~Thunderbi@user/zxx7529) (Quit: zxx7529)
2022-10-09 11:17:17 +0200razetime(~quassel@117.193.2.178) (Remote host closed the connection)
2022-10-09 11:22:13 +0200jakalx(~jakalx@base.jakalx.net) ()
2022-10-09 11:24:11 +0200jakalx(~jakalx@base.jakalx.net)
2022-10-09 11:27:17 +0200mixphix(~mixphix@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
2022-10-09 11:29:59 +0200kdaishi(~Thunderbi@94.191.136.219.mobile.tre.se)
2022-10-09 11:30:26 +0200Midjak(~Midjak@82.66.147.146)
2022-10-09 11:30:50 +0200ardell(~ardell@user/ardell)
2022-10-09 11:31:49 +0200bendo(~bendo@fire-ara4.tngtech.com) (Ping timeout: 252 seconds)
2022-10-09 11:31:56 +0200mixphix(~mixphix@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 268 seconds)
2022-10-09 11:32:43 +0200titibandit(~titibandi@xdsl-89-0-65-2.nc.de)
2022-10-09 11:41:05 +0200vorpuni(~pvorp@2001:861:3881:c690:6d4:662c:a06a:ef29)
2022-10-09 11:47:51 +0200mbuf(~Shakthi@49.204.141.204) (Quit: Leaving)
2022-10-09 11:51:04 +0200kdaishi(~Thunderbi@94.191.136.219.mobile.tre.se) (Ping timeout: 268 seconds)
2022-10-09 11:51:05 +0200ksu(~ksu@user/prtr) (Ping timeout: 250 seconds)
2022-10-09 11:51:52 +0200ksu(~ksu@user/prtr)
2022-10-09 11:52:06 +0200kenran(~user@user/kenran)
2022-10-09 11:58:53 +0200econo(uid147250@user/econo) (Quit: Connection closed for inactivity)
2022-10-09 11:58:54 +0200causal(~user@50.35.83.177)
2022-10-09 11:59:48 +0200chomwitt(~chomwitt@2a02:587:dc0c:c200:442:40c1:9d7f:23d1) (Ping timeout: 264 seconds)
2022-10-09 12:05:14 +0200jakalx(~jakalx@base.jakalx.net) ()
2022-10-09 12:06:06 +0200jakalx(~jakalx@base.jakalx.net)
2022-10-09 12:12:10 +0200nate1(~nate@98.45.169.16)
2022-10-09 12:14:14 +0200Franciman(~Franciman@mx1.fracta.dev) (Read error: Connection reset by peer)
2022-10-09 12:16:04 +0200kdaishi(~Thunderbi@94.191.137.35.mobile.tre.se)
2022-10-09 12:17:01 +0200nate1(~nate@98.45.169.16) (Ping timeout: 260 seconds)
2022-10-09 12:18:28 +0200Franciman(~Franciman@mx1.fracta.dev)
2022-10-09 12:19:05 +0200__monty__(~toonn@user/toonn)
2022-10-09 12:20:35 +0200freeside(~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 252 seconds)
2022-10-09 12:21:22 +0200freeside(~mengwong@103.252.202.193)
2022-10-09 12:24:02 +0200gurkenglas(~gurkengla@p548ac72e.dip0.t-ipconnect.de)
2022-10-09 12:27:53 +0200kenran(~user@user/kenran) (Remote host closed the connection)
2022-10-09 12:30:26 +0200ezzieyguywuf(~Unknown@user/ezzieyguywuf) (Ping timeout: 260 seconds)
2022-10-09 12:31:17 +0200ezzieyguywuf(~Unknown@user/ezzieyguywuf)
2022-10-09 12:39:01 +0200chomwitt(~chomwitt@2a02:587:dc0c:c200:9b5d:e3:b4f7:170c)
2022-10-09 12:40:04 +0200titibandit(~titibandi@xdsl-89-0-65-2.nc.de) (Quit: Leaving.)
2022-10-09 12:41:33 +0200bendo(~bendo@fire-ara4.tngtech.com)
2022-10-09 12:41:51 +0200 <dminuoso> Is there some sneaky way to drop the s phantom of ST? It would be so much more convenient, and Ill promise not to leak state. :)
2022-10-09 12:47:26 +0200mixphix(~mixphix@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
2022-10-09 12:49:37 +0200gmg(~user@user/gehmehgeh)
2022-10-09 12:51:45 +0200mixphix(~mixphix@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 252 seconds)
2022-10-09 12:53:32 +0200ec(~ec@gateway/tor-sasl/ec)
2022-10-09 12:58:06 +0200ec(~ec@gateway/tor-sasl/ec) (Ping timeout: 258 seconds)
2022-10-09 13:00:43 +0200titibandit(~titibandi@xdsl-89-0-65-2.nc.de)
2022-10-09 13:01:56 +0200 <jackdk> `unsafePerformIO`? But seriously, shouldn't it only become inconvenient if you're trying to break out?
2022-10-09 13:03:31 +0200SoF1SoF
2022-10-09 13:03:46 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk) (Remote host closed the connection)
2022-10-09 13:04:26 +0200lysrosalind
2022-10-09 13:08:20 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Read error: Connection reset by peer)
2022-10-09 13:14:58 +0200vysn(~vysn@user/vysn)
2022-10-09 13:16:07 +0200Topsi(~Topsi@dyndsl-095-033-089-091.ewe-ip-backbone.de)
2022-10-09 13:25:08 +0200pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
2022-10-09 13:34:51 +0200lortabac(~lortabac@2a01:e0a:541:b8f0:b9a1:d183:7268:d81)
2022-10-09 13:35:34 +0200lortabac(~lortabac@2a01:e0a:541:b8f0:b9a1:d183:7268:d81) (Client Quit)
2022-10-09 13:36:54 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk)
2022-10-09 13:40:55 +0200odnes(~odnes@5-203-193-32.pat.nym.cosmote.net)
2022-10-09 13:40:56 +0200eL_Bart0(eL_Bart0@dietunichtguten.org) (Read error: Connection reset by peer)
2022-10-09 13:45:24 +0200eL_Bart0(eL_Bart0@dietunichtguten.org)
2022-10-09 13:45:33 +0200rosalindlovebug
2022-10-09 13:46:18 +0200odnes_(~odnes@5-203-193-32.pat.nym.cosmote.net)
2022-10-09 13:46:20 +0200vysn(~vysn@user/vysn) (Quit: WeeChat 3.5)
2022-10-09 13:46:30 +0200odnes(~odnes@5-203-193-32.pat.nym.cosmote.net) (Read error: Connection reset by peer)
2022-10-09 13:48:18 +0200eL_Bart0(eL_Bart0@dietunichtguten.org) (Client Quit)
2022-10-09 13:51:17 +0200eL_Bart0(eL_Bart0@dietunichtguten.org)
2022-10-09 13:55:34 +0200 <ski> @type Control.Monad.ST.Unsafe.unsafeIOToST . Control.Monad.ST.Unsafe.unsafeSTToIO
2022-10-09 13:55:35 +0200 <lambdabot> ST s1 a -> ST s2 a
2022-10-09 14:03:51 +0200titibandit(~titibandi@xdsl-89-0-65-2.nc.de) (Quit: Leaving.)
2022-10-09 14:04:21 +0200bendo(~bendo@fire-ara4.tngtech.com) (Ping timeout: 268 seconds)
2022-10-09 14:04:44 +0200 <freeside> a ... "restatement"?
2022-10-09 14:05:04 +0200lovebuglys
2022-10-09 14:05:06 +0200Franciman(~Franciman@mx1.fracta.dev) (Read error: Connection reset by peer)
2022-10-09 14:11:40 +0200acidjnk(~acidjnk@p200300d6e7137a48695c1121120f860b.dip0.t-ipconnect.de) (Ping timeout: 268 seconds)
2022-10-09 14:12:43 +0200tomboy64(~tomboy64@user/tomboy64) (Remote host closed the connection)
2022-10-09 14:16:46 +0200mixphix(~mixphix@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
2022-10-09 14:17:09 +0200odnes_(~odnes@5-203-193-32.pat.nym.cosmote.net) (Quit: Leaving)
2022-10-09 14:17:59 +0200tomboy64(~tomboy64@user/tomboy64)
2022-10-09 14:18:14 +0200 <olivermead[m]> <freeside> "a ... "restatement"?" <- love it
2022-10-09 14:18:24 +0200Franciman(~Franciman@mx1.fracta.dev)
2022-10-09 14:20:22 +0200ec(~ec@gateway/tor-sasl/ec)
2022-10-09 14:21:25 +0200mixphix(~mixphix@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 265 seconds)
2022-10-09 14:23:31 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:50e1:7448:ac98:298f)
2022-10-09 14:24:53 +0200Guest52(~Guest52@83-85-226-100.cable.dynamic.v4.ziggo.nl)
2022-10-09 14:27:48 +0200ec(~ec@gateway/tor-sasl/ec) (Ping timeout: 258 seconds)
2022-10-09 14:27:57 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:50e1:7448:ac98:298f) (Ping timeout: 250 seconds)
2022-10-09 14:28:54 +0200cafce25(~cafce25@2001:a62:153a:a201:93a3:e4fa:f7e1:f6e2)
2022-10-09 14:31:19 +0200ec(~ec@gateway/tor-sasl/ec)
2022-10-09 14:36:09 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
2022-10-09 14:37:46 +0200ec(~ec@gateway/tor-sasl/ec) (Ping timeout: 258 seconds)
2022-10-09 14:38:08 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan)
2022-10-09 14:43:55 +0200jonathanx(~jonathan@h-178-174-176-109.A357.priv.bahnhof.se)
2022-10-09 14:45:04 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk) (Remote host closed the connection)
2022-10-09 14:45:11 +0200jonathanx__(~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Ping timeout: 260 seconds)
2022-10-09 14:54:30 +0200skistates the obvious
2022-10-09 15:02:28 +0200mixphix(~mixphix@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
2022-10-09 15:03:12 +0200sagax(~sagax_nb@user/sagax)
2022-10-09 15:07:13 +0200mixphix(~mixphix@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 268 seconds)
2022-10-09 15:10:16 +0200kdaishi(~Thunderbi@94.191.137.35.mobile.tre.se) (Ping timeout: 260 seconds)
2022-10-09 15:10:43 +0200perrierjouet(~perrier-j@modemcable048.127-56-74.mc.videotron.ca) (Quit: WeeChat 3.6)
2022-10-09 15:19:24 +0200 <Guest52> Hey, can someone give me some advice on this? https://paste.tomsmeding.com/4H0x5ECN. Im struggling to write an instance of Show for a polymorphic data type
2022-10-09 15:19:40 +0200 <Guest52> What i currenty have implemented is a place holder
2022-10-09 15:21:47 +0200 <geekosaur> that doesn't look polymorphic to me, just recursive
2022-10-09 15:21:48 +0200ardell(~ardell@user/ardell) (Quit: Leaving)
2022-10-09 15:22:00 +0200bendo(~bendo@fire-ara4.tngtech.com)
2022-10-09 15:22:07 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk)
2022-10-09 15:22:17 +0200 <hpc> what's the issue?
2022-10-09 15:22:17 +0200 <Guest52> My intuition is to write out a string reprensation of my data type (e.g. "Cons 20 (Cons 11...") that keeps concatenating to the result of the recursion
2022-10-09 15:22:57 +0200 <Guest52> My issue is that I dont know how to get the string representation of the polymorphic value
2022-10-09 15:23:30 +0200 <hpc> you know from how it's being used in that definition, that x :: a
2022-10-09 15:23:39 +0200 <hpc> what other things do you know about the type 'a' in that context?
2022-10-09 15:24:44 +0200 <hpc> when it just has type 'a' with no other context, the only thing you can do with x is (id x)
2022-10-09 15:24:59 +0200 <hpc> but maybe there's something else available that can turn a value into a string for you already?
2022-10-09 15:26:01 +0200 <Guest52> show ?
2022-10-09 15:26:32 +0200 <Guest52> show :: a -> String
2022-10-09 15:27:32 +0200 <hpc> :t show
2022-10-09 15:27:33 +0200 <lambdabot> Show a => a -> String
2022-10-09 15:27:46 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk) (Ping timeout: 260 seconds)
2022-10-09 15:28:02 +0200lysrosalind
2022-10-09 15:28:16 +0200 <hpc> it needs a (Show a) instance, but you've already said in your (Stream a) instance to require it
2022-10-09 15:28:24 +0200 <hpc> so yep, you can just (show x) there
2022-10-09 15:28:36 +0200 <Guest52> right so assuming type a has an instance of show, then it will work? But I dont think i can reference show in its own definition?
2022-10-09 15:29:12 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
2022-10-09 15:29:29 +0200 <geekosaur> why not?
2022-10-09 15:29:35 +0200 <Guest52> "but you've already said in your (Stream a) instance to require it" ahhh this makes sense.. i just copied that without really looking at it
2022-10-09 15:29:59 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan)
2022-10-09 15:30:12 +0200frost(~frost@user/frost) (Ping timeout: 252 seconds)
2022-10-09 15:30:12 +0200 <Guest52> because wont it try to call the show function that im currently defining?
2022-10-09 15:30:29 +0200 <hpc> it'll call the show that's defined for that 'a' type
2022-10-09 15:30:30 +0200 <geekosaur> (a) it's on a different type (b) even on the same type, as long as you have a base case for recursion to end on, it's fine
2022-10-09 15:30:32 +0200 <Guest52> which will fail because it expects a (Stream a)
2022-10-09 15:30:40 +0200 <hpc> > show 5
2022-10-09 15:30:41 +0200 <lambdabot> "5"
2022-10-09 15:30:44 +0200 <hpc> > show (Just 5)
2022-10-09 15:30:46 +0200 <lambdabot> "Just 5"
2022-10-09 15:30:56 +0200 <hpc> @src Maybe
2022-10-09 15:30:56 +0200 <lambdabot> data Maybe a = Nothing | Just a
2022-10-09 15:31:38 +0200 <geekosaur> % :set -ddump-deriv
2022-10-09 15:31:38 +0200 <yahb2> <interactive>:1:1: error: Not in scope: ‘Yahb2Defs.limitedPrint’
2022-10-09 15:31:46 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470)
2022-10-09 15:31:59 +0200 <geekosaur> % data MyMaybe a = MyNothing | MyJust a deriving Show
2022-10-09 15:32:00 +0200 <yahb2> ==================== Derived instances ==================== ; Derived class instances: ; instance GHC.Show.Show a => GHC.Show.Show (Ghci1.MyMaybe a) where ; GHC.Show.showsPrec _ Ghci1.MyNothi...
2022-10-09 15:32:01 +0200jonathanx(~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Remote host closed the connection)
2022-10-09 15:32:06 +0200 <geekosaur> bah
2022-10-09 15:32:14 +0200 <hpc> it's derived now anyway
2022-10-09 15:32:16 +0200 <geekosaur> anyway try that in ghci
2022-10-09 15:32:20 +0200jonathanx(~jonathan@h-178-174-176-109.A357.priv.bahnhof.se)
2022-10-09 15:32:38 +0200 <geekosaur> and you'll see that it uses Show on 'a'
2022-10-09 15:33:05 +0200 <geekosaur> % :q
2022-10-09 15:33:05 +0200 <yahb2> <no output>
2022-10-09 15:36:06 +0200 <Guest52> ok thanks everyone
2022-10-09 15:38:07 +0200mixphix(~mixphix@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
2022-10-09 15:40:50 +0200raoul(~raoul@95.179.203.88) (Quit: Ping timeout (120 seconds))
2022-10-09 15:41:03 +0200 <ski> Guest52 : fwiw, that's parametric, not polymorphic
2022-10-09 15:41:16 +0200nonzen(~nonzen@user/nonzen) (Quit: Gone)
2022-10-09 15:41:30 +0200nonzen(~nonzen@user/nonzen)
2022-10-09 15:41:52 +0200energizer(~energizer@user/energizer) (Quit: ZNC 1.7.0+deb0+xenial1 - https://znc.in)
2022-10-09 15:42:04 +0200 <ski> Guest52 : any particular reason you don't keep the initial seed `x' in the stream, in `streamFromSeed' ?
2022-10-09 15:42:12 +0200 <ski> Guest52 : also .. please don't use `Show' like that
2022-10-09 15:42:15 +0200mixphix(~mixphix@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 252 seconds)
2022-10-09 15:43:29 +0200raoul(~raoul@95.179.203.88)
2022-10-09 15:44:24 +0200 <Guest52> ski nope thats a bug... it should be Cons x...
2022-10-09 15:44:28 +0200 <ski> Guest52 : at the very least, you should not be defining `show', but rather `showsPrec'. making use of `showParen',`showsPrec' in the body
2022-10-09 15:44:37 +0200 <ski> Guest52, ah :)
2022-10-09 15:44:49 +0200 <ski> (in that case, you don't need the `where')
2022-10-09 15:45:39 +0200 <ski> btw, an alternative design is to use `(s -> (a,s)) -> (s -> Stream a)' (or maybe `(s -> a) -> (s -> s) -> (s -> Stream a)')
2022-10-09 15:45:46 +0200 <ski> @type unfoldr
2022-10-09 15:45:48 +0200 <lambdabot> (b -> Maybe (a, b)) -> b -> [a]
2022-10-09 15:46:23 +0200 <ski> (that version basically does `streamFromSeed' and `streamMap', in one)
2022-10-09 15:46:41 +0200 <Guest52> thanks! in regards to Show... your saying if your writing an instance of show; you shoud define showsPrec instead of shows ?
2022-10-09 15:46:59 +0200 <Guest52> because its more specific ?
2022-10-09 15:47:18 +0200 <ski> well, in most cases, people should be defining `showsPrec' rather than `show'
2022-10-09 15:47:21 +0200energizer(~energizer@user/energizer)
2022-10-09 15:48:05 +0200 <Guest52> gotcha ... will stick with show for the sake of this hw assignment but noted for real business use cases
2022-10-09 15:49:00 +0200 <ski> (a) `show' is inefficient, when you're composing your `Show' instance as part of another one, since you'll be appending to the `String'; and (b) `show' doesn't handle precedences, which you want to do, for composability with other `Show' instances
2022-10-09 15:49:38 +0200Kaiepi(~Kaiepi@142.68.249.28) (Quit: Leaving)
2022-10-09 15:50:18 +0200 <ski> e.g. if i call `show' on `Just nats', it'll give a string starting with the characters `Just Cons 0' .. note the lack of a wrapping pair of brackets around the `Cons 0 ...' part
2022-10-09 15:50:34 +0200 <ski> this is because you're not calling `showParen' as you're supposed to
2022-10-09 15:51:00 +0200 <olivermead[m]> isn't general advice to always derive Show and Read rather than define since they need to be exact inverse operations? obviously correct me if I'm wrong
2022-10-09 15:51:17 +0200 <ski> showsPrec p (Cons x xs) = showParen (p > 10) $ showString "Cons " . showsPrec 11 . showChar ' ' . showsPrec 11 xs
2022-10-09 15:51:47 +0200 <ski> is how you'd fix the precedence stuff (while ignoring your desire to give a finite `String' in this case)
2022-10-09 15:53:03 +0200 <ski> olivermead[m] : *usually*, yes. however, in some particular cases, it may be warranted to hand-write them. one important reason is that you're doing an Abstract Data Type, and you want to present your value in terms of your exported interface of operations, rather than in terms of internal representation format, which might change
2022-10-09 15:53:48 +0200 <olivermead[m]> ski: awesome thank you
2022-10-09 15:53:53 +0200 <ski> > listArray ((0,0),(2,3)) [m ^ n | (m,n) <- range ((0,0),(2,3))]
2022-10-09 15:53:56 +0200 <lambdabot> array ((0,0),(2,3)) [((0,0),1),((0,1),0),((0,2),0),((0,3),0),((1,0),1),((1,1...
2022-10-09 15:54:11 +0200 <ski> note that this responds in terms of `array', which is not a data constructor
2022-10-09 15:54:23 +0200 <ski> `Data.Map' and `Data.Set' does the same kind of thing
2022-10-09 15:55:10 +0200 <ski> olivermead[m] : another reason could be if one wanted to avoid redundant brackets, when doing infix data constructors .. unfortunately, the derived `Show' ignores fixity (while honoring precedence)
2022-10-09 15:55:50 +0200 <hpc> > foldr (+) 0 [x, y, z] -- for example
2022-10-09 15:55:52 +0200 <lambdabot> x + (y + (z + 0))
2022-10-09 15:55:54 +0200 <hpc> > foldl (+) 0 [x, y, z] -- for example
2022-10-09 15:55:56 +0200 <lambdabot> 0 + x + y + z
2022-10-09 15:56:33 +0200 <olivermead[m]> so in the listArray case above, is `read` the inverse operation still?
2022-10-09 15:57:04 +0200 <ski> > (read . show) (listArray ((0,0),(2,3)) [m ^ n | (m,n) <- range ((0,0),(2,3))]) :: Array (Int,Int) Int
2022-10-09 15:57:06 +0200 <lambdabot> array ((0,0),(2,3)) [((0,0),1),((0,1),0),((0,2),0),((0,3),0),((1,0),1),((1,1...
2022-10-09 15:57:30 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 258 seconds)
2022-10-09 15:57:31 +0200 <olivermead[m]> interesting, thank you
2022-10-09 15:58:26 +0200 <ski> (it wouldn't be too hard to have the derived `Show' honor fixity as well, afaiui .. it just doesn't, for whatever reason)
2022-10-09 16:00:37 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-10-09 16:00:53 +0200 <ski> Guest52 : in your case, presumably you'd want to elide some tail of the stream (perhaps replacing it by `...'), while still keeping brackets matched (which a naïve `(++) . take 20 . ($ "")' thrown into the composition won't do, even ignoring tokens being cut in half). you could do this, if you define a separate function which keeps track of the depth in a parameter
2022-10-09 16:03:01 +0200 <ski> Guest52 : however, because the result (cut off, possibly with `...') would be an invalid `String' representation of a Haskell value (syntax error if you paste it into the interactor, or a source file), i'd prefer to not adding this cut-off functionality into `Show' at all. you could define a separate `pp' (pretty-print) function which does what you want. or you could simply define a `takeStream :: Int ->
2022-10-09 16:03:07 +0200 <ski> Stream a -> [a]' ..
2022-10-09 16:03:49 +0200 <geekosaur> there might be other reasons to avoid it, though
2022-10-09 16:03:53 +0200Topsi(~Topsi@dyndsl-095-033-089-091.ewe-ip-backbone.de) (Ping timeout: 252 seconds)
2022-10-09 16:04:02 +0200 <geekosaur> such as preference not to force the head of a Stream
2022-10-09 16:05:04 +0200 <ski> hm ?
2022-10-09 16:05:23 +0200 <geekosaur> I'm thinking large or complicated expressions for `a`
2022-10-09 16:05:41 +0200 <ski> not force the head, where ? in `showsPrec' ?
2022-10-09 16:06:03 +0200 <geekosaur> if you intend to process them one at a time, `show`ing more than one element is probably not wise
2022-10-09 16:06:48 +0200 <ski> well, `Show' here is probably just for debugging/testing anyway, no ?
2022-10-09 16:07:01 +0200 <geekosaur> yes, one would hope
2022-10-09 16:07:14 +0200cafce25(~cafce25@2001:a62:153a:a201:93a3:e4fa:f7e1:f6e2) (Ping timeout: 252 seconds)
2022-10-09 16:09:46 +0200 <ski> question : is `unfoldStream' in some sense a "normal form" for `Stream's ?
2022-10-09 16:11:49 +0200 <ski> we have e.g.
2022-10-09 16:11:59 +0200 <ski> streamMap f (unfoldStream g s) = unfoldStream (first f . g) s
2022-10-09 16:12:05 +0200 <ski> alt.
2022-10-09 16:12:27 +0200 <ski> streamMap f (unfoldStream' g h s) = unfoldStream' (f . g) h s
2022-10-09 16:13:29 +0200perrierjouet(~perrier-j@modemcable048.127-56-74.mc.videotron.ca)
2022-10-09 16:13:44 +0200nate1(~nate@98.45.169.16)
2022-10-09 16:14:27 +0200ski. o O ( `data Stream :: * -> * where UnfoldStream :: (s -> (a,s)) -> s -> Stream a' )
2022-10-09 16:17:18 +0200gmg(~user@user/gehmehgeh) (Quit: Leaving)
2022-10-09 16:18:43 +0200nate1(~nate@98.45.169.16) (Ping timeout: 248 seconds)
2022-10-09 16:19:10 +0200bendo(~bendo@fire-ara4.tngtech.com) ()
2022-10-09 16:20:11 +0200ec(~ec@gateway/tor-sasl/ec)
2022-10-09 16:26:21 +0200a6a45081-2b83(~aditya@2601:249:4300:1296:88ec:cc73:84d4:1507)
2022-10-09 16:26:39 +0200Kaiepi(~Kaiepi@142.68.249.28)
2022-10-09 16:28:08 +0200mixphix(~mixphix@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
2022-10-09 16:32:22 +0200perrierjouet(~perrier-j@modemcable048.127-56-74.mc.videotron.ca) (Remote host closed the connection)
2022-10-09 16:32:38 +0200perrierjouet(~perrier-j@modemcable048.127-56-74.mc.videotron.ca)
2022-10-09 16:36:18 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
2022-10-09 16:36:42 +0200jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
2022-10-09 16:37:22 +0200Franciman(~Franciman@mx1.fracta.dev) (Read error: Connection reset by peer)
2022-10-09 16:37:36 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan)
2022-10-09 16:38:44 +0200raehik1(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2022-10-09 16:40:55 +0200mixphix(~mixphix@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 252 seconds)
2022-10-09 16:44:37 +0200dextaa(~dextaa@user/dextaa)
2022-10-09 16:44:51 +0200jmdaemon(~jmdaemon@user/jmdaemon) (Ping timeout: 248 seconds)
2022-10-09 16:45:48 +0200mixphix(~mixphix@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
2022-10-09 16:50:49 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
2022-10-09 16:51:46 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-10-09 16:54:41 +0200Franciman(~Franciman@mx1.fracta.dev)
2022-10-09 16:57:14 +0200finsternis(~X@23.226.237.192)
2022-10-09 17:02:00 +0200nate1(~nate@98.45.169.16)
2022-10-09 17:02:51 +0200thyriaen(~thyriaen@2a01:aea0:dd4:463c:6245:cbff:fe9f:48b1)
2022-10-09 17:05:00 +0200mixphix(~mixphix@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 268 seconds)
2022-10-09 17:05:47 +0200phma(~phma@2001:5b0:211f:4578:e340:1f30:e6ab:a541) (Read error: Connection reset by peer)
2022-10-09 17:06:28 +0200phma(~phma@host-67-44-208-36.hnremote.net)
2022-10-09 17:06:41 +0200perrierjouet(~perrier-j@modemcable048.127-56-74.mc.videotron.ca) (Quit: WeeChat 3.6)
2022-10-09 17:08:41 +0200dextaa(~dextaa@user/dextaa) (Ping timeout: 260 seconds)
2022-10-09 17:09:12 +0200acidjnk(~acidjnk@p54ad5adb.dip0.t-ipconnect.de)
2022-10-09 17:09:34 +0200ec(~ec@gateway/tor-sasl/ec) (Ping timeout: 258 seconds)
2022-10-09 17:12:07 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-10-09 17:12:07 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-10-09 17:12:07 +0200wroathe(~wroathe@user/wroathe)
2022-10-09 17:14:08 +0200rosalind(rosalind@id-194105.uxbridge.irccloud.com) (Quit: bbl <3)
2022-10-09 17:16:02 +0200perrierjouet(~perrier-j@modemcable048.127-56-74.mc.videotron.ca)
2022-10-09 17:16:06 +0200a6a45081-2b83(~aditya@2601:249:4300:1296:88ec:cc73:84d4:1507) (Remote host closed the connection)
2022-10-09 17:16:37 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:50e1:7448:ac98:298f)
2022-10-09 17:20:02 +0200c209e6dc-4d76-47(~aditya@2601:249:4300:1296:195:dac6:592c:a55a)
2022-10-09 17:22:14 +0200Guest52(~Guest52@83-85-226-100.cable.dynamic.v4.ziggo.nl) (Quit: Client closed)
2022-10-09 17:22:59 +0200azimut(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 258 seconds)
2022-10-09 17:23:10 +0200c209e6dc-4d76-47(~aditya@2601:249:4300:1296:195:dac6:592c:a55a) (Client Quit)
2022-10-09 17:24:31 +0200c209e6dc-4d76-47(~aditya@c-73-103-92-95.hsd1.in.comcast.net)
2022-10-09 17:27:39 +0200rockystone(~rocky@user/rockymarine)
2022-10-09 17:27:56 +0200Lycurgus(~juan@user/Lycurgus)
2022-10-09 17:30:36 +0200machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net)
2022-10-09 17:35:32 +0200c209e6dc-4d76-47(~aditya@c-73-103-92-95.hsd1.in.comcast.net) (Quit: Konversation terminated!)
2022-10-09 17:36:39 +0200machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 252 seconds)
2022-10-09 17:36:48 +0200titibandit(~titibandi@xdsl-89-0-65-2.nc.de)
2022-10-09 17:38:44 +0200machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net)
2022-10-09 17:39:41 +0200mixphix(~mixphix@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
2022-10-09 17:43:07 +0200mvk(~mvk@2607:fea8:5ce3:8500::a80f)
2022-10-09 17:43:27 +0200beteigeuze(~Thunderbi@2001:8a0:61b5:6101:f0c:e4e3:bfdc:91df)
2022-10-09 17:44:25 +0200mixphix(~mixphix@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 268 seconds)
2022-10-09 17:45:00 +0200king_gs(~Thunderbi@2806:103e:29:c5:4fb1:a8c9:906f:c6e0)
2022-10-09 17:45:03 +0200king_gs(~Thunderbi@2806:103e:29:c5:4fb1:a8c9:906f:c6e0) (Client Quit)
2022-10-09 17:47:40 +0200econo(uid147250@user/econo)
2022-10-09 17:49:27 +0200kenran(~user@user/kenran)
2022-10-09 17:53:59 +0200Alecui(~user@2a02:a58:8682:d600:c147:7976:693f:ec2f)
2022-10-09 17:55:56 +0200Alecui(~user@2a02:a58:8682:d600:c147:7976:693f:ec2f) (ERC 5.4.1 (IRC client for GNU Emacs 29.0.50))
2022-10-09 17:56:01 +0200mvk(~mvk@2607:fea8:5ce3:8500::a80f) (Quit: Going elsewhere)
2022-10-09 17:56:11 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk)
2022-10-09 17:57:56 +0200mvk(~mvk@2607:fea8:5ce3:8500::a80f)
2022-10-09 18:00:36 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk) (Ping timeout: 260 seconds)
2022-10-09 18:04:41 +0200nate1(~nate@98.45.169.16) (Ping timeout: 260 seconds)
2022-10-09 18:05:18 +0200Lycurgus(~juan@user/Lycurgus) (Quit: Exeunt juan@acm.org)
2022-10-09 18:05:31 +0200jonathanx(~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Remote host closed the connection)
2022-10-09 18:05:53 +0200jonathanx(~jonathan@h-178-174-176-109.A357.priv.bahnhof.se)
2022-10-09 18:05:55 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 248 seconds)
2022-10-09 18:06:39 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 265 seconds)
2022-10-09 18:09:05 +0200titibandit(~titibandi@xdsl-89-0-65-2.nc.de) (Remote host closed the connection)
2022-10-09 18:10:21 +0200kenran(~user@user/kenran) (Remote host closed the connection)
2022-10-09 18:10:47 +0200L29Ah(~L29Ah@wikipedia/L29Ah) ()
2022-10-09 18:13:08 +0200L29Ah(~L29Ah@wikipedia/L29Ah)
2022-10-09 18:18:07 +0200rockystone(~rocky@user/rockymarine)
2022-10-09 18:24:10 +0200c209e6dc-4d76-47(~aditya@2601:249:4300:1296:195:dac6:592c:a55a)
2022-10-09 18:25:38 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk)
2022-10-09 18:26:06 +0200pavonia(~user@user/siracusa) (Quit: Bye!)
2022-10-09 18:28:47 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk) (Remote host closed the connection)
2022-10-09 18:30:33 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk)
2022-10-09 18:32:09 +0200cafce25(~cafce25@2001:a62:153a:a201:4317:4122:7383:8e29)
2022-10-09 18:34:47 +0200cafce25(~cafce25@2001:a62:153a:a201:4317:4122:7383:8e29) (Client Quit)
2022-10-09 18:34:57 +0200cafce25(~cafce25@2001:a62:153a:a201:4317:4122:7383:8e29)
2022-10-09 18:36:01 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk) (Remote host closed the connection)
2022-10-09 18:44:02 +0200jbggs[m](~jbggsmatr@2001:470:69fc:105::2:995f)
2022-10-09 18:48:11 +0200c209e6dc-4d76-47(~aditya@2601:249:4300:1296:195:dac6:592c:a55a) (Quit: Konversation terminated!)
2022-10-09 18:50:37 +0200kdaishi(~Thunderbi@94.191.152.150.mobile.tre.se)
2022-10-09 18:55:57 +0200zzzzZz
2022-10-09 18:56:35 +0200mixphix(~mixphix@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
2022-10-09 18:56:36 +0200zZzzzZ
2022-10-09 18:57:23 +0200zzZZzz
2022-10-09 18:58:07 +0200Zzzzzz
2022-10-09 18:59:55 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
2022-10-09 19:00:46 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan)
2022-10-09 19:02:43 +0200mixphix(~mixphix@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 265 seconds)
2022-10-09 19:06:16 +0200ph88(~ph88@2a02:8109:9e00:71d0:6e37:2605:3bb:94a8)
2022-10-09 19:08:03 +0200loosh[m](~looshchat@2001:470:69fc:105::2:5ddd)
2022-10-09 19:08:30 +0200cytokine_storm(~user@user/cytokine-storm/x-1083107)
2022-10-09 19:17:11 +0200cytokine_storm(~user@user/cytokine-storm/x-1083107) (Read error: Connection reset by peer)
2022-10-09 19:22:30 +0200tzh(~tzh@c-24-21-73-154.hsd1.or.comcast.net)
2022-10-09 19:27:55 +0200ddellacosta(~ddellacos@89.45.224.218)
2022-10-09 19:28:46 +0200Sgeo(~Sgeo@user/sgeo)
2022-10-09 19:44:20 +0200mixphix(~mixphix@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
2022-10-09 19:48:47 +0200yvan-sraka(~yvan-srak@2a02:2788:224:71c:21e9:cca6:df3c:a2)
2022-10-09 19:49:05 +0200mixphix(~mixphix@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 268 seconds)
2022-10-09 20:04:13 +0200michalz(~michalz@185.246.207.215)
2022-10-09 20:05:05 +0200mixphix(~mixphix@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
2022-10-09 20:06:55 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
2022-10-09 20:07:49 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan)
2022-10-09 20:09:26 +0200Oiyqlk(~rscastilh@191-214-26-24.user.veloxzone.com.br)
2022-10-09 20:09:33 +0200mixphix(~mixphix@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 252 seconds)
2022-10-09 20:18:36 +0200machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 265 seconds)
2022-10-09 20:24:48 +0200natechan(~nate@98.45.169.16) (Ping timeout: 268 seconds)
2022-10-09 20:25:40 +0200jakalx(~jakalx@base.jakalx.net) ()
2022-10-09 20:26:27 +0200justsomeguy(~justsomeg@user/justsomeguy)
2022-10-09 20:28:12 +0200jakalx(~jakalx@base.jakalx.net)
2022-10-09 20:29:10 +0200mixphix(~mixphix@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
2022-10-09 20:30:08 +0200waleee(~waleee@h-176-10-137-138.NA.cust.bahnhof.se)
2022-10-09 20:30:59 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-10-09 20:30:59 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-10-09 20:30:59 +0200wroathe(~wroathe@user/wroathe)
2022-10-09 20:33:41 +0200mixphix(~mixphix@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 250 seconds)
2022-10-09 20:34:01 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 260 seconds)
2022-10-09 20:34:36 +0200dextaa(~dextaa@p4fdc769f.dip0.t-ipconnect.de)
2022-10-09 20:37:41 +0200wootehfoot(~wootehfoo@user/wootehfoot)
2022-10-09 20:37:50 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:50e1:7448:ac98:298f) (Remote host closed the connection)
2022-10-09 20:39:21 +0200CeNiEi[m](~cenieimat@2001:470:69fc:105::1:894c)
2022-10-09 20:40:14 +0200rockystone(~rocky@user/rockymarine)
2022-10-09 20:44:18 +0200Topsi(~Topsi@dyndsl-095-033-089-091.ewe-ip-backbone.de)
2022-10-09 20:47:31 +0200kdaishi(~Thunderbi@94.191.152.150.mobile.tre.se) (Ping timeout: 248 seconds)
2022-10-09 20:48:01 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 260 seconds)
2022-10-09 20:48:01 +0200justsomeguy(~justsomeg@user/justsomeguy) (Ping timeout: 260 seconds)
2022-10-09 20:48:34 +0200dextaa(~dextaa@p4fdc769f.dip0.t-ipconnect.de) (Changing host)
2022-10-09 20:48:34 +0200dextaa(~dextaa@user/dextaa)
2022-10-09 20:49:29 +0200rockystone(~rocky@user/rockymarine)
2022-10-09 20:53:29 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:50e1:7448:ac98:298f)
2022-10-09 20:54:30 +0200titibandit(~titibandi@xdsl-89-0-65-2.nc.de)
2022-10-09 20:57:24 +0200burnsidesLlama(~burnsides@client-8-77.eduroam.oxuni.org.uk)
2022-10-09 21:02:06 +0200burnsidesLlama(~burnsides@client-8-77.eduroam.oxuni.org.uk) (Ping timeout: 265 seconds)
2022-10-09 21:05:31 +0200 <janus> i never actually used the Writer/WriterT monad
2022-10-09 21:05:50 +0200 <janus> but now i have a writer effect that is backed by IO
2022-10-09 21:06:16 +0200 <EvanR> like, IO () monoid
2022-10-09 21:06:26 +0200 <EvanR> (>>)
2022-10-09 21:06:59 +0200 <janus> the write method is queueing a write operation on a uring queue
2022-10-09 21:07:15 +0200 <janus> my issue is that the Writer monad seems to have all sorts of methods i don't really need
2022-10-09 21:07:48 +0200 <EvanR> it's also lazy as hell
2022-10-09 21:08:07 +0200 <janus> i thought it would just be 'tell'
2022-10-09 21:08:35 +0200 <janus> so what do people usally do when abstracting out IO? do you just make a custom type class for this?
2022-10-09 21:09:08 +0200 <EvanR> if you actually want to have a method that just does this queueing IO, you can pass the action in with ReaderT and execute it with IO
2022-10-09 21:09:38 +0200 <janus> right, ok
2022-10-09 21:09:38 +0200burnsidesLlama(~burnsides@client-8-77.eduroam.oxuni.org.uk)
2022-10-09 21:09:53 +0200gmg(~user@user/gehmehgeh)
2022-10-09 21:10:00 +0200 <EvanR> or if you have a bunch of custom actions to be backed by some monad, pass in a record of actions, the record is parameterized by m
2022-10-09 21:10:12 +0200 <EvanR> accessed by ReaderT
2022-10-09 21:10:31 +0200 <janus> but that sounds like a typeclass, except you dispatch the dictionary manually
2022-10-09 21:10:37 +0200 <janus> but i guess there is nothing wrong with that
2022-10-09 21:11:45 +0200 <EvanR> there's a fundamental difference between using record of implementation and type classes, and I probably can't formulate that difference properly xD
2022-10-09 21:12:07 +0200 <EvanR> kmett video Typeclasses vs The World
2022-10-09 21:13:22 +0200burnsidesLlama(~burnsides@client-8-77.eduroam.oxuni.org.uk) (Remote host closed the connection)
2022-10-09 21:14:01 +0200 <EvanR> circling back to Writer and WriterT, you should do a deep dive on the laziness characteristics when you get a chance between it might surprise you for the context you were trying to use it in
2022-10-09 21:14:11 +0200 <EvanR> s/between/because/
2022-10-09 21:15:15 +0200pavonia(~user@user/siracusa)
2022-10-09 21:16:46 +0200 <janus> it shouldn't matter because the pure implementation would only be used for small tests
2022-10-09 21:17:11 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 260 seconds)
2022-10-09 21:17:21 +0200 <EvanR> there's a non pure implementation of Writer?
2022-10-09 21:17:49 +0200 <janus> i am not using Writer yet, because i currently only have the IO backed write operation
2022-10-09 21:18:16 +0200 <janus> so i have no abstraction yet, i am trying to invent the abstraction that would fit :P
2022-10-09 21:18:26 +0200 <janus> or rather, discover the prior art
2022-10-09 21:19:23 +0200justsomeguy(~justsomeg@user/justsomeguy)
2022-10-09 21:20:48 +0200mvk(~mvk@2607:fea8:5ce3:8500::a80f) (Ping timeout: 264 seconds)
2022-10-09 21:21:39 +0200 <EvanR> abstracting out your IO seems to be complicated by the fact that all these libraries come with existing answers to that, not always the same answer xD
2022-10-09 21:25:01 +0200mixphix(~mixphix@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
2022-10-09 21:28:01 +0200natechan(~nate@98.45.169.16)
2022-10-09 21:28:15 +0200mvk(~mvk@2607:fea8:5ce3:8500::a80f)
2022-10-09 21:29:26 +0200mixphix(~mixphix@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 260 seconds)
2022-10-09 21:49:54 +0200coot(~coot@213.134.171.3) (Quit: coot)
2022-10-09 21:50:41 +0200c209e6dc-4d76-47(~aditya@2601:249:4300:1296:195:dac6:592c:a55a)
2022-10-09 21:51:22 +0200c209e6dc-4d76-47(~aditya@2601:249:4300:1296:195:dac6:592c:a55a) (Client Quit)
2022-10-09 21:51:48 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 268 seconds)
2022-10-09 21:54:07 +0200rockystone(~rocky@user/rockymarine)
2022-10-09 21:55:12 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk)
2022-10-09 21:57:46 +0200titibandit(~titibandi@xdsl-89-0-65-2.nc.de) (Remote host closed the connection)
2022-10-09 21:59:33 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk) (Ping timeout: 252 seconds)
2022-10-09 22:01:12 +0200nate1(~nate@98.45.169.16)
2022-10-09 22:01:38 +0200m1dnight(~christoph@78-22-0-121.access.telenet.be) (Quit: WeeChat 3.6)
2022-10-09 22:02:02 +0200m1dnight(~christoph@78-22-0-121.access.telenet.be)
2022-10-09 22:06:23 +0200nate1(~nate@98.45.169.16) (Ping timeout: 265 seconds)
2022-10-09 22:06:45 +0200 <dminuoso> Control.Monad.Trans.Writer.CPS is a thing,m though.
2022-10-09 22:07:13 +0200 <dminuoso> But I find IORef/STRef to be better tools for a lot of applications.
2022-10-09 22:07:32 +0200jakalx(~jakalx@base.jakalx.net) (Error from remote client)
2022-10-09 22:07:49 +0200LukeHoersten(~LukeHoers@user/lukehoersten)
2022-10-09 22:08:31 +0200stiell_(~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
2022-10-09 22:09:14 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:50e1:7448:ac98:298f) (Remote host closed the connection)
2022-10-09 22:09:41 +0200dextaa(~dextaa@user/dextaa) (Ping timeout: 260 seconds)
2022-10-09 22:11:58 +0200stiell_(~stiell@gateway/tor-sasl/stiell)
2022-10-09 22:12:11 +0200natechan(~nate@98.45.169.16) (Ping timeout: 265 seconds)
2022-10-09 22:12:25 +0200 <EvanR> I equip my Control.Monad.Trans.Writer.CPS with an IORef/STRef so I can log during my algorithm. By cons onto a long list then reversing at the end xD
2022-10-09 22:12:46 +0200jakalx(~jakalx@base.jakalx.net)
2022-10-09 22:12:55 +0200 <EvanR> HASK LIFE
2022-10-09 22:13:01 +0200 <dminuoso> How do you do that?
2022-10-09 22:13:19 +0200 <dminuoso> Oh hold on, you assume an IO inside
2022-10-09 22:13:49 +0200 <dminuoso> Honestly I just use ReaderT, because that frees me from MonadBaseControl and gives me MonadUnliftIO.
2022-10-09 22:14:08 +0200 <dminuoso> All that Writer can give you, you can do with that too but its less restricting.
2022-10-09 22:14:59 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk)
2022-10-09 22:18:08 +0200LukeHoersten(~LukeHoers@user/lukehoersten) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2022-10-09 22:23:29 +0200gurkenglas(~gurkengla@p548ac72e.dip0.t-ipconnect.de) (Remote host closed the connection)
2022-10-09 22:23:51 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 268 seconds)
2022-10-09 22:26:38 +0200ss4(~wootehfoo@user/wootehfoot)
2022-10-09 22:28:26 +0200king_gs(~Thunderbi@2806:103e:29:c5:4fb1:a8c9:906f:c6e0)
2022-10-09 22:29:09 +0200king_gs(~Thunderbi@2806:103e:29:c5:4fb1:a8c9:906f:c6e0) (Client Quit)
2022-10-09 22:29:35 +0200wootehfoot(~wootehfoo@user/wootehfoot) (Ping timeout: 265 seconds)
2022-10-09 22:33:00 +0200Luj3(~Luj@78.194.168.230)
2022-10-09 22:34:38 +0200gurkenglas(~gurkengla@p548ac72e.dip0.t-ipconnect.de)
2022-10-09 22:36:24 +0200Luj(~Luj@2a01:e0a:5f9:9681:5880:c9ff:fe9f:3dfb) (Ping timeout: 264 seconds)
2022-10-09 22:37:21 +0200ss4(~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer)
2022-10-09 22:38:11 +0200Luj34(~Luj@2a01:e0a:5f9:9681:2071:e834:e16a:b87d)
2022-10-09 22:39:54 +0200Luj3(~Luj@78.194.168.230) (Ping timeout: 268 seconds)
2022-10-09 22:39:54 +0200Luj34Luj3
2022-10-09 22:41:36 +0200Midjak(~Midjak@82.66.147.146) (Quit: This computer has gone to sleep)
2022-10-09 22:44:15 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-10-09 22:44:15 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-10-09 22:44:15 +0200wroathe(~wroathe@user/wroathe)
2022-10-09 22:44:56 +0200perrierjouet(~perrier-j@modemcable048.127-56-74.mc.videotron.ca) (Quit: WeeChat 3.6)
2022-10-09 22:48:23 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection)
2022-10-09 22:49:54 +0200LukeHoersten(~LukeHoers@user/lukehoersten)
2022-10-09 22:50:09 +0200biberu(~biberu@user/biberu) (Read error: Connection reset by peer)
2022-10-09 22:54:16 +0200 <raehik1> I have `data A = A Void`. Why isn't `consumeA :: A -> ()`, `consumeA a = case a of {}` exhaustive?
2022-10-09 22:54:33 +0200biberu(~biberu@user/biberu)
2022-10-09 22:55:06 +0200 <raehik1> I swear there was a paper on an AST design pattern that did relied on this sort of pattern. Perhaps they just ignored all the falsy non-exhausitivity compiler messages
2022-10-09 22:55:46 +0200 <EvanR> that's not all the cases
2022-10-09 22:56:00 +0200 <EvanR> try instead data A = A !Void
2022-10-09 22:56:08 +0200 <dminuoso> newtype?
2022-10-09 22:56:10 +0200 <EvanR> or newtype
2022-10-09 22:56:33 +0200 <dminuoso> But yeah, there's two ways to construct something of type A here.
2022-10-09 22:56:39 +0200 <dminuoso> `A undefined` and `undefined`
2022-10-09 22:56:48 +0200TonyStone(~TonyStone@cpe-74-76-51-197.nycap.res.rr.com) (Quit: Leaving)
2022-10-09 22:56:54 +0200 <EvanR> e.g. as it stands consumeA (A undefined) could return () if you fixed the code
2022-10-09 22:57:34 +0200 <dminuoso> My memory is a bit hazy, but making the field strict is still not the same though.,
2022-10-09 22:57:35 +0200 <raehik1> dminuoso: ohhh, yeah. So if type A was a sum type, is this possible to make work? Could I ignore constructors that have a Void in them?
2022-10-09 22:57:49 +0200 <dminuoso> raehik1: You can just do a nested case-of as well.
2022-10-09 22:58:00 +0200 <dminuoso> case a of A i -> case i of {}
2022-10-09 22:58:34 +0200 <raehik1> EvanR: oh! this works!
2022-10-09 22:58:55 +0200 <EvanR> yes... there might still be a loophole involving A !Void
2022-10-09 22:58:58 +0200mixphix(~mixphix@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
2022-10-09 22:59:01 +0200yvan-sraka(~yvan-srak@2a02:2788:224:71c:21e9:cca6:df3c:a2) (Remote host closed the connection)
2022-10-09 22:59:12 +0200 <dminuoso> There's a bunch of semantic differences
2022-10-09 22:59:18 +0200 <raehik1> And my GHC 9.2 is happy with A !Void too
2022-10-09 22:59:21 +0200 <EvanR> call the haskell librarian
2022-10-09 22:59:38 +0200 <raehik1> *oops, I mean with the nested case too
2022-10-09 22:59:51 +0200 <dminuoso> Bah I cannot recall whoever recommended flatparse to me, but that thing is my favourite parser library fo the year.
2022-10-09 22:59:54 +0200 <raehik1> I was thinking of the trees that grow paper
2022-10-09 23:00:04 +0200 <raehik1> dminuoso: that was me the other day :))
2022-10-09 23:00:39 +0200 <dminuoso> Ive started writing a flatpack library that similarly constructs fixed bytestrings.
2022-10-09 23:00:56 +0200 <dminuoso> mason is just too big and doesnt have a few features I want (like resetting position)
2022-10-09 23:01:20 +0200__monty__(~toonn@user/toonn) (Quit: leaving)
2022-10-09 23:01:54 +0200rockystone(~rocky@user/rockymarine)
2022-10-09 23:03:54 +0200mixphix(~mixphix@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 268 seconds)
2022-10-09 23:04:00 +0200 <EvanR> Stackpak - Flatpak a Haskell Stack App into Flathub
2022-10-09 23:06:16 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 260 seconds)
2022-10-09 23:08:36 +0200machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net)
2022-10-09 23:09:44 +0200eggplantade(~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net)
2022-10-09 23:11:09 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 265 seconds)
2022-10-09 23:11:51 +0200ChaiTRex(~ChaiTRex@user/chaitrex) (Quit: ChaiTRex)
2022-10-09 23:13:43 +0200lambdap237(~lambdap@static.167.190.119.168.clients.your-server.de)
2022-10-09 23:14:19 +0200ChaiTRex(~ChaiTRex@user/chaitrex)
2022-10-09 23:14:26 +0200eggplantade(~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 268 seconds)
2022-10-09 23:14:55 +0200lambdap237(~lambdap@static.167.190.119.168.clients.your-server.de) (Client Quit)
2022-10-09 23:15:49 +0200lambdap237(~lambdap@static.167.190.119.168.clients.your-server.de)
2022-10-09 23:16:05 +0200perrierjouet(~perrier-j@modemcable048.127-56-74.mc.videotron.ca)
2022-10-09 23:18:01 +0200ec(~ec@gateway/tor-sasl/ec)
2022-10-09 23:19:09 +0200son0p(~ff@181.136.122.143)
2022-10-09 23:22:56 +0200ec(~ec@gateway/tor-sasl/ec) (Ping timeout: 258 seconds)
2022-10-09 23:27:04 +0200gmg(~user@user/gehmehgeh) (Quit: Leaving)
2022-10-09 23:28:44 +0200mixphix(~mixphix@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
2022-10-09 23:29:33 +0200michalz(~michalz@185.246.207.215) (Remote host closed the connection)
2022-10-09 23:34:07 +0200mixphix(~mixphix@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 268 seconds)
2022-10-09 23:35:57 +0200rockystone(~rocky@user/rockymarine)
2022-10-09 23:36:52 +0200takuan(~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
2022-10-09 23:39:17 +0200wroathe(~wroathe@50.205.197.50)
2022-10-09 23:39:17 +0200wroathe(~wroathe@50.205.197.50) (Changing host)
2022-10-09 23:39:17 +0200wroathe(~wroathe@user/wroathe)
2022-10-09 23:40:01 +0200acidjnk(~acidjnk@p54ad5adb.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
2022-10-09 23:40:36 +0200coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
2022-10-09 23:40:45 +0200rockystone(~rocky@user/rockymarine) (Ping timeout: 252 seconds)
2022-10-09 23:42:38 +0200coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Client Quit)
2022-10-09 23:45:07 +0200 <jackdk> Axman6: this flatparse lib looks very up your alley
2022-10-09 23:49:14 +0200ec(~ec@gateway/tor-sasl/ec)
2022-10-09 23:55:05 +0200burnsidesLlama(~burnsides@client-8-86.eduroam.oxuni.org.uk) (Remote host closed the connection)