Home freenode/#haskell: Logs Calendar

Logs on 2021-02-03 (freenode/#haskell)

00:00:05 jpds_ is now known as jpds
00:00:23 <frdg> Why do I get different behavior from parsing `P.string "foo"` and `P.char '\t'` in these examples? I would expect parser1 to fail and parser2 to succeed but the opposite is true. http://dpaste.com/27YKB62DA
00:01:53 bitmagie joins (~Thunderbi@200116b806d5dd009974a509bc35d318.dip.versatel-1u1.de)
00:02:17 <monochrom> P.integer skips trailing whitespace?
00:02:35 <monochrom> I would think this would be in the doc?
00:03:01 <monochrom> No, let me correct that wording.
00:03:09 <monochrom> I swear I saw it said in the doc.
00:03:23 <frdg> ok now I see what is happening
00:05:00 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
00:05:34 Dykam joins (Dykam@dykam.nl)
00:05:41 × feliocrat quits (~feliocrat@31.223.8.190) (Remote host closed the connection)
00:05:54 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
00:06:31 comboy joins (~quassel@tesuji.pl)
00:06:36 conal joins (~conal@64.71.133.70)
00:08:30 × bitmagie quits (~Thunderbi@200116b806d5dd009974a509bc35d318.dip.versatel-1u1.de) (Quit: bitmagie)
00:09:26 charukiewicz joins (~quassel@irouteince04.i.subnet.rcn.com)
00:09:57 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 258 seconds)
00:10:37 frdg parts (~user@pool-96-252-123-136.bstnma.fios.verizon.net) ("ERC (IRC client for Emacs 27.1)")
00:11:13 × comboy_ quits (~quassel@tesuji.pl) (*.net *.split)
00:11:13 × Dykam_ quits (Dykam@dykam.nl) (*.net *.split)
00:11:34 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
00:11:55 bennofs_ joins (~quassel@dslb-094-222-055-031.094.222.pools.vodafone-ip.de)
00:12:06 <desophos> hi, i'm using Gen for randomization and i want to perform weighted random selection. Gen has a function `frequency :: [(Int, Gen a)] -> Gen a`, but i have `Gen [a]` because i use Gen's `vectorOf :: Int -> Gen a -> Gen [a]`. i can make `Gen [(Int, a)]` but i'm not sure what to do from there. is the solution simply to write my own variant of `frequency`? am i allowed to just copy the source of `frequency` and change bind to
00:12:07 <desophos> fmap? thanks :)
00:15:12 alx741 joins (~alx741@181.196.69.29)
00:15:30 olligobber joins (olligobber@gateway/vpn/privateinternetaccess/olligobber)
00:15:33 × bennofs__ quits (~quassel@dslb-094-222-058-083.094.222.pools.vodafone-ip.de) (Ping timeout: 246 seconds)
00:15:45 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 240 seconds)
00:23:05 × Tario quits (~Tario@200.119.184.36) (Read error: Connection reset by peer)
00:23:46 Tario joins (~Tario@201.192.165.173)
00:23:57 × DirefulSalt quits (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt) (Remote host closed the connection)
00:28:51 Tops2 joins (~Tobias@dyndsl-095-033-022-141.ewe-ip-backbone.de)
00:29:39 <Axman6> Gen is a monad right?
00:29:45 <desophos> yes it is
00:30:17 <Axman6> so if you can produce the vector of values you want, and a vecvtor of equal length of weights that you want, then you can just use frequency (zip prequencies values)
00:31:04 <desophos> but `vectorOf` returns `Gen [a]`, not `[Gen a]`
00:32:26 <Axman6> weighted n = vectorOf n arbitrary >>= \frequencies -> vectorOf n arbitrary >>= \values -> frequency (zip frequencies (map pure values)) -- this type checks but I'm not sure if it's what you want
00:32:52 <Axman6> what do you want the Gen a passed to frequency to produce?
00:33:00 Cale joins (~cale@cpef48e38ee8583-cm0c473de9d680.cpe.net.cable.rogers.com)
00:33:19 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
00:33:34 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection)
00:35:05 <desophos> well, it should just produce an a? i tried mapping pure but i couldn't get it to work
00:35:25 <desophos> so maybe that was just my error
00:35:29 <ph88> I have an expression tree that is a functor, first i was thinking to map over it .. then i thought i need to carry some state around. "problem" is that fold gives me back the state i want to carry and not the original structure. Is there another function i can use ?
00:36:06 <Axman6> :t mapAccumL
00:36:07 <lambdabot> Traversable t => (a -> b -> (a, c)) -> a -> t b -> (a, t c)
00:36:16 <Axman6> maybe?
00:36:18 <ph88> is there a monadic version of that ?
00:36:40 <Axman6> you might just be able to use traverse
00:36:51 <Axman6> but you question isn't clear enough to tell exactly what you need
00:37:17 <ph88> i don't know how to put my question clearer
00:37:36 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
00:37:53 <desophos> ah, i wasn't mapping pure because i have a function that builds each (Int, a) pair. i can make it generate an [Int] based on my [a] instead
00:38:13 <ph88> mapM :: Monad m => (a -> m b) -> t a -> m (t b) i need to map every element but just have state while mapping ..
00:38:42 <Cale> This is somewhat offtopic, but does anyone know whether anyone in the cubical type theory world ever succeeded in computing Brunerie's number? I recall hearing that the computation was taking over 90 hours and 1TB of memory, but I don't know if it ever finished, or if they just gave up.
00:39:01 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 256 seconds)
00:39:23 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Client Quit)
00:39:27 <desophos> thanks Axman6, i'll try that
00:40:59 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
00:41:15 <Axman6> ph88: well.. whatb about the State monad :)
00:41:16 × Tuplanolla quits (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) (Quit: Leaving.)
00:41:57 × geowiesnot quits (~user@87-89-181-157.abo.bbox.fr) (Ping timeout: 264 seconds)
00:42:03 <ph88> Cale, looks like it has not been found
00:42:08 <ph88> Axman6, ye that might work
00:42:22 bitmagie joins (~Thunderbi@200116b806d5dd009974a509bc35d318.dip.versatel-1u1.de)
00:42:30 <Cale> Of course, it's known to actually be 2, lol
00:42:48 <Cale> The most expensive 2 in the world
00:43:22 ph88^ joins (~ph88@ip5f5af71a.dynamic.kabel-deutschland.de)
00:43:50 <monochrom> 2 is special in many ways, I'm OK with 2 being expensive.
00:46:28 <ph88^> Cale, how is that known ?
00:46:49 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
00:47:22 × zebrag quits (~inkbottle@aaubervilliers-654-1-80-120.w86-212.abo.wanadoo.fr) (Quit: Konversation terminated!)
00:47:25 × ph88 quits (~ph88@2a02:8109:9e00:7e5c:7043:c8b:15ab:5d6e) (Ping timeout: 272 seconds)
00:47:40 zebrag joins (~inkbottle@aaubervilliers-654-1-80-120.w86-212.abo.wanadoo.fr)
00:47:57 × mputz quits (~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de) (Quit: mputz)
00:49:19 <Cale> ph88^: Both by proving it directly in HoTT, and it's also a classical result of homotopy theory
00:50:05 <dolio> Cale: It hasn't been calculated, but people think that the expense might not be essential, but an artifact of how naive all the implementations are.
00:50:20 <monochrom> :)
00:50:43 <monochrom> Theorem: Every number can be made as expensive as you like. :)
00:51:23 × bitmapper quits (uid464869@gateway/web/irccloud.com/x-zkobjotekrfpnlhu) (Quit: Connection closed for inactivity)
00:55:08 rajivr joins (uid269651@gateway/web/irccloud.com/x-njsalrgkfquqyrca)
00:55:19 mputz joins (~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de)
00:56:18 <monochrom> On the flip side, if you try to describe a difficult problem but screws up the wording, you end up stating a O(1)-time problem.
00:57:16 <monochrom> For example, Bill Gates's book screws up saying "public key encryption relies on hard problems such as prime factorization" by wording "factoring primes".
00:57:26 × tsrt^ quits (tsrt@ip98-184-89-2.mc.at.cox.net) ()
00:57:49 <monochrom> (I suspect that Bill Gates didn't make that mistake, an editor (obviously math-blind English major right?) did.)
01:03:08 elliott__ joins (~elliott@pool-108-51-101-42.washdc.fios.verizon.net)
01:06:13 × mputz quits (~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de) (Ping timeout: 256 seconds)
01:08:21 justsomeguy joins (~justsomeg@unaffiliated/--/x-3805311)
01:09:35 × conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
01:09:40 × metreo quits (~Thunderbi@unaffiliated/metreo) (Quit: metreo)
01:10:32 × bitmagie quits (~Thunderbi@200116b806d5dd009974a509bc35d318.dip.versatel-1u1.de) (Quit: bitmagie)
01:10:59 × whataday quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
01:11:52 LiyangHU[m] joins (liyangmatr@gateway/shell/matrix.org/x-khsquopybxsinqvm)
01:12:06 whataday joins (~xxx@2400:8902::f03c:92ff:fe60:98d8)
01:16:45 × thefybe quits (~thefybe@249-147-161-N2.customer.vsm.sh) (Ping timeout: 264 seconds)
01:24:25 × boxscape quits (4ff0baf3@gateway/web/cgi-irc/kiwiirc.com/ip.79.240.186.243) (Quit: Connection closed)
01:26:37 × ph88^ quits (~ph88@ip5f5af71a.dynamic.kabel-deutschland.de) (Ping timeout: 258 seconds)
01:27:51 × charukiewicz quits (~quassel@irouteince04.i.subnet.rcn.com) (Quit: charukiewicz)
01:28:01 charukiewicz joins (~quassel@irouteince04.i.subnet.rcn.com)
01:28:09 × jollygood2 quits (~bc8134e3@217.29.117.252) (Quit: http://www.okay.uz/ (Session timeout))
01:28:27 × charukiewicz quits (~quassel@irouteince04.i.subnet.rcn.com) (Client Quit)
01:29:52 charukiewicz joins (~charukiew@irouteince04.i.subnet.rcn.com)
01:32:20 bitmapper joins (uid464869@gateway/web/irccloud.com/x-nvqzpcbpfmbefeds)
01:32:28 thefybe joins (~thefybe@249-147-161-N2.customer.vsm.sh)
01:33:31 × thc202 quits (~thc202@unaffiliated/thc202) (Ping timeout: 258 seconds)
01:33:35 × Jd007 quits (~Jd007@162.156.11.151) (Quit: Jd007)
01:33:54 × cole-h quits (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Ping timeout: 258 seconds)
01:39:38 stef204 joins (~stef204@unaffiliated/stef-204/x-384198)
01:45:43 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
01:46:04 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
01:49:14 × m0rphism1 quits (~m0rphism@HSI-KBW-085-216-104-059.hsi.kabelbw.de) (Ping timeout: 258 seconds)
01:50:46 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 258 seconds)
01:52:38 conal joins (~conal@64.71.133.70)
01:56:03 cheater1 joins (~user@unaffiliated/cheater)
01:58:45 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 240 seconds)
01:58:53 × cheater quits (~user@unaffiliated/cheater) (Ping timeout: 265 seconds)
01:58:57 cheater1 is now known as cheater
02:00:39 shinobi joins (~shinobi@c-24-147-48-162.hsd1.ma.comcast.net)
02:00:53 nuncanada joins (~dude@179.235.160.168)
02:01:30 jonatanb joins (~jonatanb@83.24.13.14.ipv4.supernova.orange.pl)
02:02:45 × viluon quits (uid453725@gateway/web/irccloud.com/x-ksfxrsatayjgucds) (Quit: Connection closed for inactivity)
02:03:31 × shinobi_ quits (~shinobi@c-24-147-48-162.hsd1.ma.comcast.net) (Ping timeout: 272 seconds)
02:04:04 Jd007 joins (~Jd007@162.156.11.151)
02:06:45 × jonatanb quits (~jonatanb@83.24.13.14.ipv4.supernova.orange.pl) (Ping timeout: 240 seconds)
02:11:57 × hyperisco quits (~hyperisco@104-195-141-253.cpe.teksavvy.com) (Ping timeout: 264 seconds)
02:13:28 × nbloomf quits (~nbloomf@2600:1700:ad14:3020:fc44:c2d6:2605:3850) (Quit: My MacBook has gone to sleep. ZZZzzz…)
02:13:30 × justsomeguy quits (~justsomeg@unaffiliated/--/x-3805311) (Quit: WeeChat 2.9)
02:14:18 guest23 joins (~user@49.5.6.87)
02:14:47 <guest23> I'm a little confused about Reader, when we need to use a Reader?
02:15:34 <guest23> that Reader is just like a function, passing it a parameter and operate on it, what's the special? what's the need?
02:15:39 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
02:17:10 nbloomf joins (~nbloomf@2600:1700:ad14:3020:fc44:c2d6:2605:3850)
02:17:16 <dibblego> passing an argument through a tree of calls, without explicitly passing it in the code
02:17:54 <guest23> a simple example?
02:18:48 <guest23> if I declare the variable inside a function's top, then other functions insdie it could use it directly too
02:23:09 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 272 seconds)
02:23:10 × wz1000 quits (~wz1000@static.11.113.47.78.clients.your-server.de) (Ping timeout: 272 seconds)
02:26:34 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
02:28:08 × Jd007 quits (~Jd007@162.156.11.151) (Quit: Jd007)
02:28:39 × conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
02:30:00 × Noldorin quits (~noldorin@unaffiliated/noldorin) (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
02:30:15 × xff0x_ quits (~xff0x@2001:1a81:5334:6300:744e:2f9e:5495:d27d) (Ping timeout: 258 seconds)
02:31:05 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 240 seconds)
02:32:05 xff0x_ joins (~xff0x@2001:1a81:536f:2100:534e:8c50:d828:cc61)
02:33:05 <ski> guest23 : sometimes you want to locally change the environment
02:34:02 × Reiser quits (~0a2a0001@unaffiliated/reisen) (Ping timeout: 268 seconds)
02:34:11 <ski> you can often achieve that, if you call an outer function that explicitly takes the parameter. but possibly sometimes that awkward, or maybe deemed to be to cluttery
02:34:24 <ski> another alternative is to use implicit parameters
02:36:02 <ski> guest23 : if you already have some effect type (monadic or idiomatic), then adding an environment to that is commonly an easy thing to do, while adding another explicit parameter that's distributed down the relevant calls may be quite a bit of more work/modification
02:37:02 _rht joins (uid86914@gateway/web/irccloud.com/x-ufajdipojemchcbz)
02:37:23 nfip^ joins (nfip@ip98-184-89-2.mc.at.cox.net)
02:38:07 minimario joins (2fe3e53b@047-227-229-059.res.spectrum.com)
02:39:10 <minimario> i'm trying to compile a haskell program with "ghc -prof A.hs" but i'm getting a linker error (`gcc' failed in phase `Linker') where it can't find things like -lHSsplit, how would i go about diagnosing this?
02:39:46 × kloeri quits (~kloeri@freenode/staff/exherbo.kloeri) (Ping timeout: 606 seconds)
02:40:03 <minimario> i have no idea how the linking process works at all :l
02:40:05 geowiesnot joins (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr)
02:40:16 <glguy> minimario, How did you install GHC?
02:40:50 <minimario> honestly i don't remember ):
02:41:06 <glguy> That message suggests to me you didn't install the profiling version of the split package. but you really shouldn't be running ghc manually at all; cabal handles that
02:42:23 <minimario> oh i'm just going thru a small profiling tutorial lol
02:42:37 <minimario> is there some way to fix this?
02:42:44 <minimario> (presumably by installing the packages needed)
02:43:58 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
02:48:21 Reiser joins (~0a2a0001@static.210.242.216.95.clients.your-server.de)
02:50:01 kloeri joins (~kloeri@freenode/staff/exherbo.kloeri)
02:51:20 × acarrico quits (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) (Ping timeout: 258 seconds)
02:53:39 <glguy> minimario, I'd set up your thing.cabal file and use https://cabal.readthedocs.io/en/3.4/nix-local-build.html#how-can-i-profile-my-library-application
02:54:06 <glguy> that will automatically build the profiling versions of the libraries as needed and set up profiling options
02:58:30 × alx741 quits (~alx741@181.196.69.29) (Quit: alx741)
03:00:20 × Narinas quits (~Narinas@189.223.62.254.dsl.dyn.telnor.net) (Read error: Connection reset by peer)
03:00:25 × nuncanada quits (~dude@179.235.160.168) (Quit: Leaving)
03:00:37 Narinas joins (~Narinas@189.223.62.254.dsl.dyn.telnor.net)
03:04:55 × minimario quits (2fe3e53b@047-227-229-059.res.spectrum.com) (Quit: Connection closed)
03:06:01 minimario joins (2fe3e53b@047-227-229-059.res.spectrum.com)
03:06:20 pfurla_ joins (~pfurla@239.15.195.173.client.static.strong-in52.as13926.net)
03:06:42 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 246 seconds)
03:08:35 × pfurla quits (~pfurla@ool-182ed2e2.dyn.optonline.net) (Ping timeout: 258 seconds)
03:10:25 × nineonin_ quits (~nineonine@50.216.62.2) (Ping timeout: 240 seconds)
03:11:04 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
03:13:34 × fresheyeball quits (~isaac@ec2-35-155-97-88.us-west-2.compute.amazonaws.com) (Ping timeout: 258 seconds)
03:14:03 Jd007 joins (~Jd007@162.156.11.151)
03:15:41 fresheyeball joins (~isaac@c-71-237-105-37.hsd1.co.comcast.net)
03:17:00 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 272 seconds)
03:22:36 × theDon quits (~td@94.134.91.201) (Ping timeout: 240 seconds)
03:22:50 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
03:23:50 <guest23> ski: so Reader is like a let-environment?
03:24:06 <guest23> let in scheme
03:24:23 <ski> more or less, yes
03:24:30 <ski> (also `let' in Haskell)
03:24:34 theDon joins (~td@94.134.91.50)
03:24:45 <Axman6> reader is like passing around an argument without having to remember to pass it around everywhere
03:24:59 <guest23> ski: let in haskell is definetly not like let in scheme
03:25:03 <ski> in fact, one of the uses of `Reader'/`ReaderT' would be to implement a local environment, in an interpreter, or a compiler
03:25:11 <Axman6> if I'm operating inside a Reader env a, there at any time I can ask for the Env
03:25:25 × mmmattyx quits (uid17782@gateway/web/irccloud.com/x-fhsjdgdsmsucvkhr) (Quit: Connection closed for inactivity)
03:25:39 <ski> guest23 : i know. i was just saying that this aspect of `let' is shared by nested block structure in most programming languages
03:25:40 <Axman6> it's very often used for passing around application configuration, like settings read fromt he command line which the rest of the app need to access
03:26:39 <ski> (however, one subtlety would be static/lexical vs. dynamic scope, which matters when you can define local functions, which can access non-local variables)
03:27:02 <guest23> ski: Axman6 wait a sec, but that Reader's envrionment is read-only right? so if we want to change variables in environment, use State?
03:27:04 <Axman6> data Env = End {...; logLevel :: LogLevel; ...}; someFunction :: ReaderT Env IO (); someFunction = do { level <- gets logLevel; liftIO $ logAtLevel level "I ran someFunction" ... }
03:27:16 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 240 seconds)
03:27:19 <ski> guest23 : change, in which sense ?
03:27:21 <Axman6> yes, that's why I said configuration and not state
03:27:47 <ski> guest23 : you know environment variables in processes ?
03:27:55 <guest23> ski: (let ((x 0)) (setq x 1)) ?
03:28:15 plutoniix joins (~q@ppp-27-55-78-115.revip3.asianet.co.th)
03:28:39 <guest23> is this let-environment a closure?
03:28:50 <ski> guest23 : Scheme implementations often implement that in terms of something like `(let ((x (box 0))) (set-box! x 1))', which now doesn't change `x', but rather the contents of the mutable box
03:29:07 <Axman6> :t local
03:29:08 <guest23> environment, context, namespace, are they same here?
03:29:09 <lambdabot> MonadReader r m => (r -> r) -> m a -> m a
03:29:21 <ski> so, `x' is still bound to the same value (a location), but if you look up that location in the store/state, you get a different result, after the `set-box!'
03:29:51 <ski> guest23 : in Haskell, the same effect can be had by using e.g. `ReaderT (IORef Config) IO'
03:30:01 <Axman6> we can temporarily change the environment in a Reader with local, so we can say: local (\env -> env {level = DEBUG} $ someActionWeAlwaysToLogAtLevelDEBUG
03:30:28 <ski> guest23 : "is this let-environment a closure?" -- no
03:30:49 × machinedgod quits (~machinedg@135-23-192-217.cpe.pppoe.ca) (Ping timeout: 258 seconds)
03:31:21 <ski> guest23 : "environment variables", like `$PATH',`$HOME', you know them ?
03:31:47 peasynt joins (~quassel@pool-173-76-103-124.bstnma.fios.verizon.net)
03:32:15 <guest23> ski: not that system environment variables, I mean variables in a function
03:32:29 <ski> yes, but there's a similarity
03:33:42 <guest23> Axman6: wait a sec, but if Reader can do changes, why we need State?
03:34:00 <ski> if you imagine that a process could only change its environment variables, when spawning a child process, and then only to change them, on behalf of the child, not for itself .. then that gives a nice analogy to environment/input/reader/config effects
03:34:08 <Axman6> those changes are local to the action you pass to the function
03:34:09 <guest23> I know Reader is an environment, Writer is a logger, and State is read-write
03:34:25 <Axman6> nothing is _changed_, it's runnung an action in a new environment
03:35:11 <ski> `local' would correspond to the spawn a child case. (of course there's no concurrency with `local', but there is the "locally change on behalf of child computation")
03:36:55 <guest23> Reader's local only make an new environement to it's child, don't change the outside
03:37:21 <Axman6> % :t local @Reader
03:37:21 <yahb> Axman6: ; <interactive>:1:8: error:; * Expecting two more arguments to `Reader'; Expected a type, but `Reader' has kind `* -> * -> *'; * In the type `Reader'; In the expression: local @Reader
03:37:34 <Axman6> % :t local @(Reader String)
03:37:34 <yahb> Axman6: ; <interactive>:1:9: error:; * Expecting one more argument to `Reader String'; Expected a type, but `Reader String' has kind `* -> *'; * In the type `(Reader String)'; In the expression: local @(Reader String)
03:37:54 <Axman6> % :t local @String @(Reader String)
03:37:54 <yahb> Axman6: (String -> String) -> Reader String a -> Reader String a
03:38:33 <ski> in Scheme, there's `(with-input-from-file filename (lambda () ...))' which evaluates `...' in a new dynamic *environment*, where `(current-input-port)' locally refers to the newly opened file. when this form is finished, it reverts back to its earlier value
03:38:46 <Axman6> the Reader that is passed in sees the modified String environment, and its result is returned, but after local returns the environment is the same as it was before the local call
03:38:53 FinnElija joins (~finn_elij@gateway/tor-sasl/finnelija/x-67402716)
03:38:53 finn_elija is now known as Guest39021
03:38:53 FinnElija is now known as finn_elija
03:39:02 <ski> using `local changeTheEnvironment (do ...)' in Haskell is similar in spirit
03:39:14 × peasynt quits (~quassel@pool-173-76-103-124.bstnma.fios.verizon.net) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
03:39:35 peasynt joins (~quassel@pool-173-76-103-124.bstnma.fios.verizon.net)
03:39:40 <ski> guest23 : "Reader's local only make an new environement to it's child, don't change the outside" -- right
03:39:51 <guest23> the Reader introduction should really write that "It's just let environement in Scheme", so it's easier to understand it
03:40:12 <Axman6> I'm not sure it is the same though, there's no mutation
03:40:30 <ski> guest23 : it would be misleading to say that, i think
03:40:38 <ski> why Scheme, specifically ?
03:40:55 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
03:41:05 <ski> (a) the correspondence holds to most notions of block structured scopes in programming languages
03:41:28 <guest23> ski: I only know let in scheme is famous, other languages have let syntax sugar?
03:41:55 <guest23> oh, let in scheme and common lisp are different
03:42:05 <ski> (b) that correspondence can be seen to be about how said feature in programming languages are *implemented*. but using `Reader' is not (in general) about implementing programming languages (although that is one thing it can be used for)
03:42:06 × Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer)
03:42:06 × noctux quits (~noctux@unaffiliated/noctux) (Ping timeout: 256 seconds)
03:42:09 <guest23> one is a syntax sugar, another isn't
03:42:23 <dibblego> \x -> f x (g x (h x x) (i (j x)) -- it's to stop having to write this, including in the implementations of each function
03:42:38 × Guest39021 quits (~finn_elij@gateway/tor-sasl/finnelija/x-67402716) (Ping timeout: 268 seconds)
03:42:47 <ski> `let' is Scheme is a derived form. `(let ((x 0)) ..x..)' means `((lambda (x) ..x..) 0)'
03:43:10 Tario joins (~Tario@201.192.165.173)
03:43:14 × AWizzArd quits (~code@unaffiliated/awizzard) (Ping timeout: 256 seconds)
03:43:48 × cocreature quits (~cocreatur@eirene.uberspace.de) (Ping timeout: 256 seconds)
03:44:08 <guest23> actually I'm learning arrow-kt in Kotlin, those monads are a kind of differntly to Haskell
03:44:19 <ski> Scheme is a Lisp-1, while CL is a Lisp-2. Scheme binds functions in the same namespace as other variables, while CL doesn't. but this difference is immaterial, irrelevant, here
03:44:52 <dibblego> because Kotlin's type system cannot express a monad
03:45:00 × minimario quits (2fe3e53b@047-227-229-059.res.spectrum.com) (Quit: Connection closed)
03:45:14 <ski> cannot express a monad, or cannot express "monad" ?
03:45:21 <dibblego> the latter
03:45:36 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 240 seconds)
03:45:43 × abhixec quits (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) (Quit: leaving)
03:45:44 <guest23> dibblego: with lex-syntax, we can avoid \x -> f x (g x (h x x) (i (j x)) too
03:46:21 ski idly wonders what guest23 has in mind
03:46:30 <dibblego> ya can't actually
03:47:08 × Jd007 quits (~Jd007@162.156.11.151) (Quit: Jd007)
03:47:31 <guest23> how to define and use Reader in a funciton form? not data type form?
03:48:11 wujilingfeng joins (df46f205@223.70.242.5)
03:48:19 × wujilingfeng quits (df46f205@223.70.242.5) (Client Quit)
03:48:36 <dibblego> Reader is, quite precisely, a function, with a data type wrapping it
03:48:44 wujilingfeng joins (df46f205@223.70.242.5)
03:48:44 ski . o O ( `f <*> (g <*> join h <*> (i <$> j))' )
03:48:53 <dibblego> lol
03:48:57 wujilingfeng parts (df46f205@223.70.242.5) ()
03:49:25 × shiraeeshi quits (~shiraeesh@77.94.25.42) (Quit: Konversation terminated!)
03:49:41 shiraeeshi joins (~shiraeesh@77.94.25.42)
03:50:21 <guest23> to OOP, I think Reader is just like an object, an object itself has an environment
03:50:51 <ski> it's unclear what you mean by "environment", there
03:51:17 <guest23> namespace?
03:51:33 <guest23> context?
03:52:04 <dibblego> it's this, but done well, https://refactoring.com/catalog/replaceParameterWithQuery.html
03:53:26 × renzhi quits (~renzhi@2607:fa49:6500:6f00::1e43) (Ping timeout: 258 seconds)
03:53:42 <guest23> dibblego: yes, that's what I meant
03:54:25 pagnol joins (~user@n112120223083.netvigator.com)
03:57:07 <guest23> if function f has two parameters called x and y, and in an let-environment x is defined, we can call (f y) in that environment, that's Reader?
03:58:34 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
03:59:19 nineonine joins (~nineonine@50.216.62.2)
03:59:39 Saukk joins (~Saukk@83-148-239-3.dynamic.lounea.fi)
04:00:42 <ukari> https://hackage.haskell.org/package/dependent-map-0.4.0.0/src/LICENSE, does it means this package license is almost a BSD license and safe for static link?
04:02:06 Stanley00 joins (~stanley00@unaffiliated/stanley00)
04:02:22 × thefybe quits (~thefybe@249-147-161-N2.customer.vsm.sh) (Read error: Connection reset by peer)
04:02:43 thefybe joins (~thefybe@249-147-161-N2.customer.vsm.sh)
04:03:05 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 240 seconds)
04:04:07 <lyxia> ukari: that sounds about right
04:06:03 lep_ joins (~lep@94.31.102.183)
04:06:14 <ski> guest23 : there is no identifier correspond to `x', for `Reader'
04:06:20 lep_ is now known as Guest18945
04:06:54 × lep-delete quits (~lep@94.31.81.93) (Ping timeout: 246 seconds)
04:07:59 conal joins (~conal@64.71.133.70)
04:08:27 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
04:08:36 × geowiesnot quits (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 240 seconds)
04:09:13 average joins (uid473595@gateway/web/irccloud.com/x-rtojiysrxktngdss)
04:09:22 <guest23> ski: sorry, I don't what you mean
04:09:39 <average> I think I just had this realization: The more I look at FP, the more it seems like it wants to do symbolic manipulation and symbolic computations, but it does't want to go all the way
04:10:07 <ski> "in an let-environment x is defined, we can call (f y) in that environment" -- there's nothing corresponding to `x', for `Reader'
04:10:09 × conal quits (~conal@64.71.133.70) (Client Quit)
04:10:35 <average> is there a point to even do FP if we already have environments where we CAN do symbolic calculations ?
04:10:51 <ski> average : with (analytic) meta-programming, you get to do more symbolic manipulation and computation
04:11:45 <average> ski: well.. alright but in the end it is just a pattern-matching thing..
04:11:49 <average> or term-rewriting if you will
04:12:50 rdivyanshu joins (uid322626@gateway/web/irccloud.com/x-mtieidadejfsxoah)
04:13:37 <average> I feel like FP happened because a PLT person found themselves in a Computer Algebra or Symbolic Algebra context, they learned some techniques (but definitely not that much), and then they were like "Oh.My.God. I will re-package this and sell it as a NEW thing, and nobody will know, nobody will notice, I will call it Functional Programming"
04:15:26 <average> idk, FP seems second-hand to me
04:15:43 <average> it's like it came out of a thrift store
04:15:46 <average> I'm just sayin..
04:17:07 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 265 seconds)
04:18:56 × shiraeeshi quits (~shiraeesh@77.94.25.42) (Ping timeout: 256 seconds)
04:19:47 <ski> average : FP could perhaps have been said to have started with
04:19:50 <ski> @where BAckus
04:19:50 <lambdabot> "Can Programming Be Liberated from the von Neumann Style?: A Functional Style and Its Algebra of Programs" (Turing Award lecture) by John Warner Backus in 1977-10-17 at <https://amturing.acm.org/
04:19:50 <lambdabot> award_winners/backus_0703524.cfm>,<http://www.thocp.net/biographies/papers/backus_turingaward_lecture.pdf>
04:20:45 <ski> or perhaps with the invention of Lisp by John McCarthy, in 1958. or perhaps by the invention of the lambda calculus by Alonzo Church in the 1930s
04:20:50 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
04:22:24 <ski> (although calculations in math, towards a normal form, prior to that, certainly contributed to inspiring that, and higher-order functions in math were certainly known before Church)
04:23:35 <ski> another influential thing was ISWIM, introduced by Peter Landin in 1966 in his paper "The Next 700 Programming Languages" at <https://www.cs.cmu.edu/~crary/819-f09/Landin66.pdf>
04:23:36 × jespada quits (~jespada@90.254.242.138) (Ping timeout: 240 seconds)
04:24:50 <ski> (well, invention/discovery, in the case of the lambda calculus)
04:24:51 × Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer)
04:25:04 <dolio> Bishop wrote an unpublished paper on how to compile mathematics into Algol in 1969, too.
04:25:35 Tario joins (~Tario@201.192.165.173)
04:26:47 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 258 seconds)
04:26:49 jespada joins (~jespada@90.254.242.138)
04:26:56 <ski> average : an important thing, in the lambda calculus, when seen as a term-rewriting system, is confluence
04:27:05 shiraeeshi joins (~shiraeesh@77.94.25.42)
04:27:09 <ski> dolio : Errett ?
04:27:13 <dolio> Yeah.
04:27:48 <average> What I'd like to see is symbolic stuff baked into the language. But I think I already found out that the only things that satisfy my requirements..
04:27:57 <average> are really just Mathematica and Maple, maybe not even those
04:28:07 <ski> what kind of symbolic stuff ?
04:28:17 <ski> evaluation under binders ?
04:28:27 <ski> higher-order matching ?
04:28:35 AWizzArd joins (~code@gehrels.uberspace.de)
04:29:03 <average> well..I guess there's two things that the language should do
04:29:23 <average> 1) report errors according to the laws of the structures that were declared
04:29:27 <guest23> ski: then what's the proper way to describe Reader?
04:29:32 <average> 2) be able to figure out things on its own, without hand-holding
04:30:05 cocreature joins (~cocreatur@eirene.uberspace.de)
04:30:27 <ski> guest23 : distribution of an environment/config, with the option to pass on a modified version, at each distribution point ?
04:30:35 <average> the 1st one is actually the strongly-typed algebraic-type thing..
04:30:45 <average> the 2nd one is more like Prolog, pattern-matching term-rewriting stuff
04:31:00 toorevitimirp joins (~tooreviti@117.182.181.145)
04:31:00 <ski> 2) sounds pretty vague, i was about to say
04:31:24 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
04:31:25 <ski> (although it did sound like some descriptions of how people perceive Prolog .. at least before they understand how it works)
04:31:44 <ski> (and i'm not sure i understand what (1) means)
04:32:13 × notzmv quits (~user@unaffiliated/zmv) (Ping timeout: 260 seconds)
04:32:44 <average> ski: well what I mean in (1) is the fact that you can define monoids, groups, rings, whatever
04:32:51 <average> ski: and you declare some axioms too..
04:33:04 × thefybe quits (~thefybe@249-147-161-N2.customer.vsm.sh) (Ping timeout: 265 seconds)
04:33:24 <ski> well, one problem is termination of equational axioms, used as rewrite rules
04:33:24 <average> but actually all that stuff belongs to symbolic land.. it's not really an FP thing
04:33:52 <average> so I'm not sure if I understand what FP's plan is
04:33:53 <ski> (also, stuff like unification in the presence of an associative, and possibly commutative, operator)
04:34:12 × cocreature quits (~cocreatur@eirene.uberspace.de) (Ping timeout: 246 seconds)
04:34:14 <average> ski: sure, but that's like.. only teh beginning of symbolic stuff
04:34:31 <ski> well, FP focuses on expressions which unambiguously denotes values, perhaps you could say
04:34:31 <average> if we'd really want to do symbolic math, we'd go way beyond that and have way more difficult problems to deal with
04:34:41 <ski> the terms are not the main thing
04:35:40 <ski> anyway .. did you ever check out e.g. lambdaProlog, or Twelf ?
04:35:42 × fresheyeball quits (~isaac@c-71-237-105-37.hsd1.co.comcast.net) (Quit: WeeChat 2.9)
04:35:49 <average> honestly I did not
04:36:05 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 240 seconds)
04:36:31 <ski> it's probably not quite what you're looking for .. but possibly you'd find some things in them quite interesting
04:36:45 × Tario quits (~Tario@201.192.165.173) (Ping timeout: 258 seconds)
04:37:29 <ski> dolio : happen to know the title of it ? maybe there's even an online version of it, somewhere ?
04:38:27 <dolio> https://u.math.biu.ac.il/~katzmik/bishop18bb.pdf
04:38:54 <average> I think for me it's more of a realization that FP is not magic, and that the mathy parts in FP are really handled seriously and extensively in computer algebra or symbolic math CAS systems..
04:39:04 <average> so I view FP as a toy now
04:39:32 <ski> ty
04:40:34 <ski> (dunno what you mean by "the mathy parts")
04:41:16 notzmv joins (~user@unaffiliated/zmv)
04:41:28 <ski> (anyway .. i'm off, presently)
04:42:01 salumu joins (~sMuNiX@vlnsm8-montreal02-142-122-8-233.internet.virginmobile.ca)
04:42:26 conal joins (~conal@64.71.133.70)
04:43:50 × Stanley00 quits (~stanley00@unaffiliated/stanley00) (Remote host closed the connection)
04:44:40 <average> basically what I'm trying to say is that Haskell is a CAS wannabe
04:44:53 <average> at least at first sight
04:45:03 × sMuNiX quits (~sMuNiX@vlnsm8-montreal02-142-122-8-233.internet.virginmobile.ca) (Ping timeout: 246 seconds)
04:45:04 <average> but when you get closer to it, it turns out it's not a CAS..
04:45:23 <monochrom> No, Haskell is not a CAS wannabe.
04:45:28 <dolio> It doesn't seem like a CAS at all, to me.
04:45:35 <average> and it's not particularly better at anything compared to other languages
04:45:57 <dolio> It seems like you just want to get banned, really.
04:46:13 <monochrom> I know we're talking about aspiration not actual outcome, but no, Haskell doesn't even aspire to that.
04:46:27 Stanley00 joins (~stanley00@unaffiliated/stanley00)
04:46:35 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
04:46:43 × _rht quits (uid86914@gateway/web/irccloud.com/x-ufajdipojemchcbz) (Quit: Connection closed for inactivity)
04:46:44 <monochrom> IMO it is your association, not the Haskell inventors' association.
04:47:27 <average> dolio: from time to time, I come here asking what exactly is Haskell made for. It's been years now. My expectation is that someone will explain "Haskell is best for writing programs that do X,Y,Z" (so better than any other language that you could use to write X,Y,Z) . I have not received this type of answer yet.
04:48:11 <average> to me, complete mastery of a language means knowing what it's good at and what it's bad at.
04:48:37 <average> so yes, I think the questions I'm asking are very pragmatic
04:49:18 <average> dolio: if you're a PLT daydreamer, maybe you shouldn't read my questions and shouldn't try to answer them
04:50:01 <average> monochrom: so what did the Haskell inventors have in mind ?
04:50:39 <monochrom> I think SPJ has a paper on that?
04:50:57 × mmohammadi9812 quits (~mmohammad@2.178.169.112) (Ping timeout: 264 seconds)
04:51:19 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 258 seconds)
04:51:20 <monochrom> I think «a history of haskell: being lazy with class»?
04:51:28 mmohammadi9812 joins (~mmohammad@188.210.119.142)
04:51:37 pfurla joins (~pfurla@ool-182ed2e2.dyn.optonline.net)
04:51:50 <average> so.. an entire language just for lazy evaluation ?
04:52:04 <average> or is that paper about something else ?
04:52:04 <monochrom> You finished reading the whole paper already? Wow that's fast.
04:52:19 <average> No i did not read it, I think it's a big commitment to read an entire paper
04:52:38 <monochrom> Or you're just another slashdotter who read the title and stop reading and start tweeting?
04:52:54 <average> monochrom: I'm more of a tl;dr guy
04:52:57 <monochrom> You asked a big question you deserve a big paper.
04:53:05 <Axman6> average: Facebook's spam filtering system is definitely not a CAS system... but it handles 2m+ messages/posts per second, all in Haskell
04:53:25 <monochrom> And with that, I'm done. I pointed to a useful paper, enough said.
04:53:41 <average> Axman6: yes and I'm very glad Facebook finally solved the spam problem. We all know when we go on Facebook there is literally no spam at all
04:53:46 <average> Axman6: ok, that was my sarcasm
04:53:50 <average> Axman6: but..
04:54:00 × pfurla_ quits (~pfurla@239.15.195.173.client.static.strong-in52.as13926.net) (Ping timeout: 258 seconds)
04:54:05 <Axman6> "and it's not particularly better at anything compared to other languages " I'd strongly dispute this, the type system is the closest we have to a sweet spot for usability and power
04:54:06 <average> Axman6: why did they pick Haskell to write their spam filtering system..
04:54:38 <average> Axman6: but power of what..
04:54:46 <Axman6> because Haskell's concurrency stuff is amazing, and its type system makes it very difficult for non programmers to write spam filtering rules
04:54:59 <Axman6> which are correct*
04:55:06 <average> but why do we want non-programmers writing programs ?
04:55:18 <average> oh wait. just the rules ?
04:55:19 <average> hm, ok
04:55:22 <monochrom> wait, very difficult?
04:55:30 <Axman6> because Facebook's spam filtering team is full of people who are not programmers per se
04:55:34 <average> Axman6: so you're saying Haskell is very easy to write.. rule-systems ?
04:55:56 <Axman6> I think that's a very narrow take away from what I said
04:56:30 <monochrom> The problem with tldr
04:57:18 <Axman6> the project I am currently working on is rewriting the clearing and settlement system for oneof the top stock markets in the world. We're not using Haskell as such, but a language which is basically Haskell++-- (haskell with some extra stuff and some stuff missing)
04:58:17 <Axman6> Again, not a CAS at all, it's a something which underpins a large portion of the country's financial system
04:58:53 frozenErebus joins (~frozenEre@37.231.239.43)
04:59:13 <average> Haskell would never pass an architectural board committee process.. unless.. you're the committee ..
04:59:28 <Axman6> To answert an earlier statement you wanted a response to: Haskell is best for writing programs
04:59:42 <average> so Haskell is best for writing programs?
05:00:11 <Axman6> yes, it is a programming language, so writing programs it is what it's best for
05:00:34 <average> I can easily say that answer didn't increase my understanding as to what Haskell is best at. because programs you can also write in Turbo Pascal.
05:00:50 <average> or in Bash.
05:01:26 Brain007 joins (~Brain007@124.123.104.217)
05:01:35 × elliott__ quits (~elliott@pool-108-51-101-42.washdc.fios.verizon.net) (Ping timeout: 265 seconds)
05:01:41 <Axman6> what whgat is C best for? What is C++ best for? What is Java best for? What is Python best for?
05:02:23 <average> there are answers for those..
05:02:25 <Axman6> they have their niches of course, but all of them can be used for writing programs, so why should we have to limit what Haskell can be used for?
05:02:31 × mmohammadi9812 quits (~mmohammad@188.210.119.142) (Ping timeout: 256 seconds)
05:02:32 <monochrom> Axman6, that's useless. They already have wrong answers for those question. They now want us to give similarly wrong answers for Haskell. You are just proving their point.
05:02:38 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
05:02:44 <average> but.. are you suggesting it's down to a feeling/touchy-feely/office-politics decision-making ?
05:02:52 <average> and that in fact, it doesn't even matter what it's best at ?
05:02:56 <Axman6> of course it is, humans wrote programs
05:03:01 <Axman6> write*
05:03:15 × raym quits (~ray@45.64.220.55) (Quit: leaving)
05:03:29 ixaxaar joins (~ixaxaar@49.207.210.215)
05:03:31 raym joins (~ray@45.64.220.55)
05:03:54 <glguy> There's no black and white set of things general purpose programming languages as best/worst at. You just have to weight the various strengths and weakness each has against the project at hand
05:04:08 × Brain007 quits (~Brain007@124.123.104.217) (Remote host closed the connection)
05:04:47 <Axman6> I have written web services in Haskell for governments, data processing systems for large private companies, and now this financial system which interacts with banks and stock brokers. where is the commoin niche there? People have written operating systems, and systems for producing hard real time embedded code
05:05:02 lep-delete joins (~lep@94.31.81.183)
05:06:13 cocreature joins (~cocreatur@eirene.uberspace.de)
05:06:20 <monochrom> https://www.microsoft.com/en-us/research/blog/lambda-the-ultimatae-excel-worksheet-function/ while we are at it. (And SPJ again.)
05:06:29 mmohammadi9812 joins (~mmohammad@188.210.119.142)
05:06:33 × mmohammadi9812 quits (~mmohammad@188.210.119.142) (Client Quit)
05:06:49 <Axman6> "No one uses functional programming" "Wait, no, not like that!"
05:06:52 × conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
05:07:07 <monochrom> My friend independently found https://visualstudiomagazine.com/articles/2021/01/27/excel-lambda.aspx?m=1
05:07:23 × Guest18945 quits (~lep@94.31.102.183) (Ping timeout: 265 seconds)
05:07:37 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 256 seconds)
05:08:36 <Axman6> My dad shared one of those articles with me a few weeks ago
05:09:10 <Axman6> is... Excel just Lisp? D:
05:09:27 <monochrom> Nah it doesn't have call/cc
05:09:33 <Axman6> phew
05:09:50 <monochrom> Does Excel have eval?
05:10:42 <Axman6> ... yes, called EVALUATE
05:10:45 <average> Does Haskell have parser generators, and generally the building blocks to produce compilers and interpreters bult into the language itself or at least in stdlib or.. at least in haskell-platfom ?
05:10:45 <monochrom> In this sense: eval("A1+A2") is equivalent to =A1+A2
05:11:03 <average> I mean maybe this is where Haskell shines? Building other languages..
05:11:05 <Axman6> gmm, maybe not quite: https://www.myonlinetraininghub.com/excel-factor-12-secret-evaluate-function
05:11:50 soft-warm joins (4408f588@ip68-8-245-136.sd.sd.cox.net)
05:13:15 np parts (znc@152.67.162.71) ("WeeChat 2.9")
05:13:49 nerdypepper joins (znc@152.67.162.71)
05:13:57 <monochrom> I think it qualifies, even though a bit inconvenient to use.
05:14:23 × emptyflask quits (~jon@136.49.71.178) (Quit: WeeChat 2.9)
05:15:05 <average> "While Haskell is a general purpose language that can be used in any domain and use case, it is ideally suited for proprietary business logic and data analysis[..]" says huffingyon post
05:15:16 <average> So proprietary business logic huh ?
05:15:39 <Axman6> yeah, a.k.a, "programs"
05:15:39 <average> I have never seen a language sold like that..
05:15:47 <glguy> Is the idea if you say something wrong that someone will correct you and keep it going?
05:15:58 <average> Axman6: no but the key word here is proprietary
05:16:00 <Axman6> specifically, "programs that do useful things"
05:16:17 <average> So they are literally saying "Write your core business in Haskell"
05:16:19 <Axman6> what's your point?
05:16:23 <Axman6> yes
05:16:41 <monochrom> I'm sure that shallow level of understanding is perfect for MBAs. You are ripe to go get an MBA for yourself and become a management type.
05:18:07 rayyyy joins (~nanoz@gateway/tor-sasl/nanoz)
05:18:35 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
05:18:42 noctux joins (~noctux@unaffiliated/noctux)
05:19:06 × Saukk quits (~Saukk@83-148-239-3.dynamic.lounea.fi) (Remote host closed the connection)
05:19:43 × shiraeeshi quits (~shiraeesh@77.94.25.42) (Quit: Konversation terminated!)
05:19:56 shiraeeshi joins (~shiraeesh@77.94.25.42)
05:23:21 × noctux quits (~noctux@unaffiliated/noctux) (Ping timeout: 264 seconds)
05:23:32 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 256 seconds)
05:24:17 × soft-warm quits (4408f588@ip68-8-245-136.sd.sd.cox.net) (Ping timeout: 248 seconds)
05:28:29 × deviantfero quits (~deviantfe@190.150.27.58) (Quit: WeeChat 3.0)
05:29:10 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
05:30:00 × plutoniix quits (~q@ppp-27-55-78-115.revip3.asianet.co.th) (Read error: Connection reset by peer)
05:33:31 Wuzzy joins (~Wuzzy@p5b0df175.dip0.t-ipconnect.de)
05:33:52 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 258 seconds)
05:33:57 noctux joins (~noctux@unaffiliated/noctux)
05:34:35 <Axman6> Harsh
05:34:45 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
05:38:28 × noctux quits (~noctux@unaffiliated/noctux) (Ping timeout: 258 seconds)
05:38:52 <Axman6> average: how much of Facebook's core business is spam filtering? Clearly it's working for them, it's a substantial part of keeping the platform useful. Should they not have chosen Haskell?
05:39:07 <Axman6> Should the various banks which rely on Haskell not?
05:39:16 noctux joins (~noctux@unaffiliated/noctux)
05:39:23 <glguy> Should we not be chatting from Haskell??
05:39:36 <Axman6> I am :)
05:39:48 Axman6 <3 glguy
05:39:54 <Axman6> I should probably update glirc...
05:40:08 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 272 seconds)
05:40:41 <glguy> Depending on how far back you are there were a few config changes
05:40:51 <glguy> mostly around sasl; let me know if you need any help
05:41:04 <Axman6> yeah I think I ran into those a while ago
05:41:49 geowiesnot joins (~user@87-89-181-157.abo.bbox.fr)
05:42:38 plutoniix joins (~q@184.82.199.202)
05:45:18 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
05:46:27 __minoru__shirae joins (~shiraeesh@109.166.56.27)
05:47:21 × shiraeeshi quits (~shiraeesh@77.94.25.42) (Ping timeout: 264 seconds)
05:47:52 <Axman6> Who do we praise to thank for the haskell type system? I'm reviewing some changes at the moment which are _massive_, hundreds of files changed, and all those changes were caught by the type system after a few relatively minor changes
05:48:16 <Axman6> Hindley? Milner? SPJ?
05:49:05 × nbloomf quits (~nbloomf@2600:1700:ad14:3020:fc44:c2d6:2605:3850) (Quit: My MacBook has gone to sleep. ZZZzzz…)
05:49:25 × geowiesnot quits (~user@87-89-181-157.abo.bbox.fr) (Ping timeout: 240 seconds)
05:49:56 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 240 seconds)
05:50:44 × pagnol quits (~user@n112120223083.netvigator.com) (Ping timeout: 258 seconds)
05:50:51 × Sheilong quits (uid293653@gateway/web/irccloud.com/x-vebmjsskufunaflq) ()
05:52:03 × pjb quits (~t@2a01cb04063ec50009186fab83b6d91d.ipv6.abo.wanadoo.fr) (Ping timeout: 272 seconds)
05:53:50 Tops21 joins (~Tobias@dyndsl-095-033-093-253.ewe-ip-backbone.de)
05:54:58 <monochrom> Hindley, Milner, Damas, Wadler (for type classes)
05:55:18 <Axman6> Wadler it is then
05:55:27 <monochrom> If you step outside of Haskell 2020 then you can include SPJ.
05:56:29 × Tops2 quits (~Tobias@dyndsl-095-033-022-141.ewe-ip-backbone.de) (Ping timeout: 258 seconds)
06:02:39 takuan joins (~takuan@178-116-218-225.access.telenet.be)
06:03:45 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
06:04:34 jonatanb joins (~jonatanb@83.24.13.14.ipv4.supernova.orange.pl)
06:05:26 × stef204 quits (~stef204@unaffiliated/stef-204/x-384198) (Ping timeout: 264 seconds)
06:08:52 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 256 seconds)
06:09:09 × Narinas quits (~Narinas@189.223.62.254.dsl.dyn.telnor.net) (Read error: Connection reset by peer)
06:09:24 Narinas joins (~Narinas@189.223.62.254.dsl.dyn.telnor.net)
06:09:30 × Narinas quits (~Narinas@189.223.62.254.dsl.dyn.telnor.net) (Read error: Connection reset by peer)
06:09:46 Narinas joins (~Narinas@189.223.62.254.dsl.dyn.telnor.net)
06:10:09 × jonatanb quits (~jonatanb@83.24.13.14.ipv4.supernova.orange.pl) (Ping timeout: 264 seconds)
06:11:17 dnlkrgr joins (~dnlkrgr@HSI-KBW-046-005-005-235.hsi8.kabel-badenwuerttemberg.de)
06:15:06 × nineonine quits (~nineonine@50.216.62.2) (Ping timeout: 256 seconds)
06:16:00 × desophos quits (~desophos@2601:249:1680:a570:a1da:e51c:3dc0:1f5c) (Quit: Leaving)
06:16:40 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
06:16:48 × rzmt quits (~rzmt@87-92-180-112.rev.dnainternet.fi) (Ping timeout: 256 seconds)
06:20:12 × seliopou quits (seliopou@entropy.tmok.com) (Ping timeout: 256 seconds)
06:20:51 seliopou joins (seliopou@entropy.tmok.com)
06:20:51 × Narinas quits (~Narinas@189.223.62.254.dsl.dyn.telnor.net) (Read error: Connection reset by peer)
06:21:01 Narinas joins (~Narinas@189.223.62.254.dsl.dyn.telnor.net)
06:22:25 × Narinas quits (~Narinas@189.223.62.254.dsl.dyn.telnor.net) (Read error: Connection reset by peer)
06:22:38 Narinas joins (~Narinas@189.223.62.254.dsl.dyn.telnor.net)
06:22:45 DTZUZU joins (~DTZUZU@205.ip-149-56-132.net)
06:25:37 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 258 seconds)
06:27:16 × dnlkrgr quits (~dnlkrgr@HSI-KBW-046-005-005-235.hsi8.kabel-badenwuerttemberg.de) (Ping timeout: 240 seconds)
06:29:05 × Wuzzy quits (~Wuzzy@p5b0df175.dip0.t-ipconnect.de) (Remote host closed the connection)
06:29:12 pjb joins (~t@2a01cb04063ec5009d3731745487fa1c.ipv6.abo.wanadoo.fr)
06:31:30 × rdivyanshu quits (uid322626@gateway/web/irccloud.com/x-mtieidadejfsxoah) (Quit: Connection closed for inactivity)
06:34:53 jamm_ joins (~jamm@unaffiliated/jamm)
06:36:45 × jamm_ quits (~jamm@unaffiliated/jamm) (Remote host closed the connection)
06:37:20 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
06:42:06 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 258 seconds)
06:43:39 lordie joins (~lordie@168.194.157.104)
06:49:35 nineonine joins (~nineonine@50.216.62.2)
06:50:14 × rayyyy quits (~nanoz@gateway/tor-sasl/nanoz) (Remote host closed the connection)
06:51:14 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
06:53:59 × nineonine quits (~nineonine@50.216.62.2) (Ping timeout: 258 seconds)
06:54:36 × paintcan` quits (~user@cpe-69-206-241-99.nyc.res.rr.com) (Ping timeout: 240 seconds)
06:55:54 × Lycurgus quits (~niemand@cpe-45-46-139-165.buffalo.res.rr.com) (Ping timeout: 256 seconds)
06:56:07 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 272 seconds)
06:56:17 × __minoru__shirae quits (~shiraeesh@109.166.56.27) (Ping timeout: 258 seconds)
07:00:24 cole-h joins (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net)
07:02:29 asheshambasta joins (~user@ptr-e1lysavd5pllo57cw5p.18120a2.ip6.access.telenet.be)
07:04:20 × poljar1 quits (~poljar@93-139-54-120.adsl.net.t-com.hr) (Ping timeout: 258 seconds)
07:06:26 catt joins (~r@31.124.181.226)
07:07:20 geowiesnot joins (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr)
07:07:46 × Narinas quits (~Narinas@189.223.62.254.dsl.dyn.telnor.net) (Read error: Connection reset by peer)
07:08:10 Narinas joins (~Narinas@189.223.62.254.dsl.dyn.telnor.net)
07:08:10 × Narinas quits (~Narinas@189.223.62.254.dsl.dyn.telnor.net) (Read error: Connection reset by peer)
07:08:23 Narinas joins (~Narinas@189.223.62.254.dsl.dyn.telnor.net)
07:09:07 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
07:09:07 × Narinas quits (~Narinas@189.223.62.254.dsl.dyn.telnor.net) (Read error: Connection reset by peer)
07:09:18 Narinas joins (~Narinas@189.223.62.254.dsl.dyn.telnor.net)
07:09:51 sord937 joins (~sord937@gateway/tor-sasl/sord937)
07:13:48 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 246 seconds)
07:14:51 danvet joins (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa)
07:15:06 bitmagie joins (~Thunderbi@200116b806108700484948e27a931f58.dip.versatel-1u1.de)
07:16:46 thc202 joins (~thc202@unaffiliated/thc202)
07:17:16 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds)
07:18:05 _ht joins (~quassel@82-169-194-8.biz.kpn.net)
07:18:29 pagnol joins (~user@n112120223083.netvigator.com)
07:18:40 j2t joins (~user@84.122.202.215.dyn.user.ono.com)
07:20:35 rzmt joins (~rzmt@87-92-180-112.rev.dnainternet.fi)
07:26:17 nineonine joins (~nineonine@2604:3d08:7785:9600:95c8:88e9:a60d:8dfa)
07:27:04 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
07:27:14 × nineonine quits (~nineonine@2604:3d08:7785:9600:95c8:88e9:a60d:8dfa) (Remote host closed the connection)
07:27:47 × petersen quits (~petersen@redhat/juhp) (Ping timeout: 272 seconds)
07:28:15 nineonine joins (~nineonine@2604:3d08:7785:9600:95c8:88e9:a60d:8dfa)
07:31:25 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 240 seconds)
07:32:42 × nineonine quits (~nineonine@2604:3d08:7785:9600:95c8:88e9:a60d:8dfa) (Ping timeout: 258 seconds)
07:33:02 × polyphem quits (~p0lyph3m@2a02:810d:640:776c:76d7:55f6:f85b:c889) (Ping timeout: 260 seconds)
07:34:29 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
07:36:04 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
07:36:49 × catt quits (~r@31.124.181.226) (Remote host closed the connection)
07:38:05 × geowiesnot quits (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 240 seconds)
07:39:11 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 272 seconds)
07:40:25 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 240 seconds)
07:42:38 × average quits (uid473595@gateway/web/irccloud.com/x-rtojiysrxktngdss) (Quit: Connection closed for inactivity)
07:43:54 × Sgeo quits (~Sgeo@ool-18b98aa4.dyn.optonline.net) (Read error: Connection reset by peer)
07:45:02 × tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz)
07:45:56 × lawid quits (~quassel@dslb-090-186-099-248.090.186.pools.vodafone-ip.de) (Ping timeout: 240 seconds)
07:48:30 × Guest62723 quits (~ds@139.28.218.148) (Remote host closed the connection)
07:50:04 forgottenone joins (~forgotten@176.42.24.1)
07:50:20 lawid joins (~quassel@dslb-090-186-199-238.090.186.pools.vodafone-ip.de)
07:50:47 × howdoi quits (uid224@gateway/web/irccloud.com/x-dcvsnpkbnllmgstf) (Quit: Connection closed for inactivity)
07:52:22 abian joins (~abian@185.204.1.185)
07:52:41 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
07:52:44 abian is now known as Guest38429
07:57:12 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 246 seconds)
08:00:07 nineonine joins (~nineonine@2604:3d08:7785:9600:95c8:88e9:a60d:8dfa)
08:01:52 × nineonine quits (~nineonine@2604:3d08:7785:9600:95c8:88e9:a60d:8dfa) (Remote host closed the connection)
08:02:30 nineonine joins (~nineonine@2604:3d08:7785:9600:95c8:88e9:a60d:8dfa)
08:03:12 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
08:07:12 × nineonine quits (~nineonine@2604:3d08:7785:9600:95c8:88e9:a60d:8dfa) (Ping timeout: 258 seconds)
08:07:38 catt joins (~r@31.124.181.226)
08:07:49 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 256 seconds)
08:08:00 × bitmagie quits (~Thunderbi@200116b806108700484948e27a931f58.dip.versatel-1u1.de) (Quit: bitmagie)
08:13:20 polyrain joins (~polyrain@2001:8003:e4d8:4101:5d31:983b:a5a6:1f68)
08:14:27 dhouthoo joins (~dhouthoo@ptr-eitgbj2w0uu6delkbrh.18120a2.ip6.access.telenet.be)
08:16:00 cfricke joins (~cfricke@unaffiliated/cfricke)
08:16:05 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
08:19:21 × polyrain quits (~polyrain@2001:8003:e4d8:4101:5d31:983b:a5a6:1f68) (Quit: My MacBook has gone to sleep. ZZZzzz…)
08:20:46 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
08:22:27 × charukiewicz quits (~charukiew@irouteince04.i.subnet.rcn.com) (Quit: charukiewicz)
08:22:37 × cfricke quits (~cfricke@unaffiliated/cfricke) (Ping timeout: 260 seconds)
08:25:33 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 265 seconds)
08:27:20 × pagnol quits (~user@n112120223083.netvigator.com) (Remote host closed the connection)
08:32:13 polyrain joins (~polyrain@2001:8003:e4d8:4101:5d31:983b:a5a6:1f68)
08:35:30 rdivyanshu joins (uid322626@gateway/web/irccloud.com/x-lomphnhxhpzqtszd)
08:35:39 × berberman quits (~berberman@unaffiliated/berberman) (Quit: ZNC 1.8.2 - https://znc.in)
08:35:41 miguel_clean joins (~Miguel@89-72-187-203.dynamic.chello.pl)
08:36:00 berberman joins (~berberman@unaffiliated/berberman)
08:36:48 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
08:37:18 jamm_ joins (~jamm@unaffiliated/jamm)
08:37:20 × carlomagno quits (~cararell@148.87.23.7) (Remote host closed the connection)
08:37:30 × concept2 quits (~concept2@unaffiliated/tubo) (Quit: Ping timeout (120 seconds))
08:37:52 carlomagno joins (~cararell@148.87.23.7)
08:41:17 concept2 joins (~concept2@unaffiliated/tubo)
08:41:42 × jamm_ quits (~jamm@unaffiliated/jamm) (Ping timeout: 258 seconds)
08:41:52 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 256 seconds)
08:42:25 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
08:44:13 × Tops21 quits (~Tobias@dyndsl-095-033-093-253.ewe-ip-backbone.de) (Read error: Connection reset by peer)
08:45:46 × heatsink quits (~heatsink@2600:1700:bef1:5e10:d018:6f9c:3910:36c8) (Remote host closed the connection)
08:47:20 wz1000 joins (~wz1000@static.11.113.47.78.clients.your-server.de)
08:47:21 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 264 seconds)
08:47:43 Yumasi joins (~guillaume@2a01:e0a:5cb:4430:572d:5f36:41d6:1475)
08:51:26 × rajivr quits (uid269651@gateway/web/irccloud.com/x-njsalrgkfquqyrca) (Quit: Connection closed for inactivity)
08:51:54 × vikid quits (~vikid@bba428846.alshamil.net.ae) (Remote host closed the connection)
08:52:01 × frozenErebus quits (~frozenEre@37.231.239.43) (Ping timeout: 256 seconds)
08:52:16 vikid joins (~vikid@83.110.238.94)
08:56:05 Major_Biscuit joins (~Major_Bis@82-169-100-198.biz.kpn.net)
08:59:09 raichoo joins (~raichoo@dslb-188-109-063-185.188.109.pools.vodafone-ip.de)
09:00:00 × Noughtmare[m] quits (naughtmare@gateway/shell/matrix.org/x-vwywabaoaoohawps) (Quit: Idle for 30+ days)
09:00:17 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
09:00:49 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
09:01:38 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Client Quit)
09:02:05 Tuplanolla joins (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi)
09:02:05 × Narinas quits (~Narinas@189.223.62.254.dsl.dyn.telnor.net) (Read error: Connection reset by peer)
09:02:36 kuribas joins (~user@ptr-25vy0i8e6su9fkcjvkw.18120a2.ip6.access.telenet.be)
09:03:25 Narinas joins (~Narinas@189.223.62.254.dsl.dyn.telnor.net)
09:05:19 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 272 seconds)
09:07:30 geowiesnot joins (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr)
09:08:05 chele joins (~chele@ip5b40237d.dynamic.kabel-deutschland.de)
09:08:30 mouseghost joins (~draco@wikipedia/desperek)
09:08:36 × cole-h quits (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Ping timeout: 240 seconds)
09:09:24 Franciman joins (~francesco@host-95-235-155-82.retail.telecomitalia.it)
09:12:49 pera joins (~pera@unaffiliated/pera)
09:14:44 × geowiesnot quits (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 256 seconds)
09:16:53 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
09:18:52 LKoen joins (~LKoen@252.248.88.92.rev.sfr.net)
09:21:02 × jluttine quits (~jluttine@85-23-95-149.bb.dnainternet.fi) (Ping timeout: 264 seconds)
09:21:16 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 240 seconds)
09:23:42 chris8142 joins (~chris8142@srvnet-01-071.ikbnet.co.at)
09:23:45 × fearless_man quits (~fearless_@152.32.100.101) (Read error: Connection reset by peer)
09:24:56 coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl)
09:29:49 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
09:30:22 petersen joins (~petersen@redhat/juhp)
09:33:02 Varis joins (~Tadas@unaffiliated/varis)
09:33:54 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
09:34:40 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 265 seconds)
09:35:42 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 256 seconds)
09:39:41 × livvy quits (~livvy@gateway/tor-sasl/livvy) (Quit: No Ping reply in 180 seconds.)
09:40:35 livvy joins (~livvy@gateway/tor-sasl/livvy)
09:40:59 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
09:43:02 × polyrain quits (~polyrain@2001:8003:e4d8:4101:5d31:983b:a5a6:1f68) (Quit: My MacBook has gone to sleep. ZZZzzz…)
09:43:19 raehik1 joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
09:43:24 × lordie quits (~lordie@168.194.157.104) (Remote host closed the connection)
09:43:32 knupfer joins (~Thunderbi@mue-88-130-61-250.dsl.tropolys.de)
09:44:15 ubert joins (~Thunderbi@p200300ecdf25d95fe6b318fffe838f33.dip0.t-ipconnect.de)
09:45:13 × ubert quits (~Thunderbi@p200300ecdf25d95fe6b318fffe838f33.dip0.t-ipconnect.de) (Remote host closed the connection)
09:45:27 rajivr joins (uid269651@gateway/web/irccloud.com/x-rezdfhgnedgqggyb)
09:46:33 heatsink joins (~heatsink@2600:1700:bef1:5e10:533:4549:6b9e:c969)
09:49:06 fendor joins (~fendor@91.141.2.117.wireless.dyn.drei.com)
09:50:35 Itkovian joins (~Itkovian@185.194.187.10)
09:51:02 × heatsink quits (~heatsink@2600:1700:bef1:5e10:533:4549:6b9e:c969) (Ping timeout: 264 seconds)
09:51:18 × hexo quits (~hexo@gateway/tor-sasl/hexo) (Remote host closed the connection)
09:51:18 × srk quits (~sorki@gateway/tor-sasl/sorki) (Remote host closed the connection)
09:51:20 cfricke joins (~cfricke@unaffiliated/cfricke)
09:51:40 hexo joins (~hexo@gateway/tor-sasl/hexo)
09:51:40 srk joins (~sorki@gateway/tor-sasl/sorki)
09:51:56 <ij> I read the first paragraph about performance and strictness in the wiki. -O gives me a 5x speedup :)
09:51:58 polyrain joins (~polyrain@2001:8003:e4d8:4101:5d31:983b:a5a6:1f68)
09:53:16 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 256 seconds)
09:56:29 danza joins (~francesco@151.53.69.219)
09:56:33 × vicfred quits (vicfred@gateway/vpn/mullvad/vicfred) (Ping timeout: 246 seconds)
09:58:18 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
09:59:36 gehmehgeh joins (~ircuser1@gateway/tor-sasl/gehmehgeh)
09:59:49 kritzefitz joins (~kritzefit@212.86.56.80)
10:01:49 ph88 joins (~ph88@2a02:8109:9e00:7e5c:ade8:bbad:5afb:2c7)
10:04:50 × sveit quits (~sveit@45.77.0.246) (Quit: Bye)
10:04:59 jamm_ joins (~jamm@unaffiliated/jamm)
10:05:09 sveit joins (~sveit@45.77.0.246)
10:05:44 <ph88> does someone know a package where Sørensen Dice is implemented ?
10:05:58 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
10:15:30 frozenErebus joins (~frozenEre@37.231.239.43)
10:22:36 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 240 seconds)
10:25:25 × j2t quits (~user@84.122.202.215.dyn.user.ono.com) (Ping timeout: 265 seconds)
10:26:00 Lord_of_Life_ joins (~Lord@unaffiliated/lord-of-life/x-0885362)
10:26:31 × quinn quits (~quinn@c-73-223-224-163.hsd1.ca.comcast.net) (Quit: ZNC 1.8.1 - https://znc.in)
10:29:32 × Lord_of_Life quits (~Lord@unaffiliated/lord-of-life/x-0885362) (Ping timeout: 256 seconds)
10:29:39 Lord_of_Life_ is now known as Lord_of_Life
10:35:05 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
10:37:32 × Itkovian quits (~Itkovian@185.194.187.10) (Quit: My MacBook has gone to sleep. ZZZzzz…)
10:39:46 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 258 seconds)
10:41:42 × hnOsmium0001 quits (uid453710@gateway/web/irccloud.com/x-xrwggmicrnaussaz) (Quit: Connection closed for inactivity)
10:41:42 × danza quits (~francesco@151.53.69.219) (Read error: Connection reset by peer)
10:45:07 × rdivyanshu quits (uid322626@gateway/web/irccloud.com/x-lomphnhxhpzqtszd) (Quit: Connection closed for inactivity)
10:47:32 heatsink joins (~heatsink@2600:1700:bef1:5e10:cd3d:a18d:b2f7:b84a)
10:50:16 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
10:50:21 × pera quits (~pera@unaffiliated/pera) (Quit: leaving)
10:51:29 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
10:52:00 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
10:52:14 × heatsink quits (~heatsink@2600:1700:bef1:5e10:cd3d:a18d:b2f7:b84a) (Ping timeout: 264 seconds)
10:53:35 nineonine joins (~nineonine@2604:3d08:7785:9600:95c8:88e9:a60d:8dfa)
10:56:05 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 240 seconds)
10:56:39 <ph88> can you test functions that are not exported by a module ?
10:57:06 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 246 seconds)
10:57:21 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
10:58:38 m0rphism1 joins (~m0rphism@HSI-KBW-085-216-104-059.hsi.kabelbw.de)
10:58:56 × nineonine quits (~nineonine@2604:3d08:7785:9600:95c8:88e9:a60d:8dfa) (Ping timeout: 258 seconds)
11:01:05 × LKoen quits (~LKoen@252.248.88.92.rev.sfr.net) (Read error: Connection reset by peer)
11:01:40 LKoen joins (~LKoen@252.248.88.92.rev.sfr.net)
11:02:21 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 246 seconds)
11:02:21 × Narinas quits (~Narinas@189.223.62.254.dsl.dyn.telnor.net) (Read error: Connection reset by peer)
11:02:31 Narinas joins (~Narinas@189.223.62.254.dsl.dyn.telnor.net)
11:02:44 vicfred joins (vicfred@gateway/vpn/mullvad/vicfred)
11:02:54 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
11:08:05 Noldorin joins (~noldorin@unaffiliated/noldorin)
11:09:17 × xff0x_ quits (~xff0x@2001:1a81:536f:2100:534e:8c50:d828:cc61) (Ping timeout: 258 seconds)
11:09:40 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
11:09:55 <edwardk> ph88: you should be able to implement a pretty nice version of that on top of something like hyperloglog in an efficient amount of space. not what you asked, but the first thing that came to mind
11:10:17 xff0x_ joins (~xff0x@2001:1a81:536f:2100:2f3c:8f56:462:e9ab)
11:11:07 <ph88> about Sørensen Dice ?
11:11:18 <edwardk> yeah
11:13:38 Itkovian joins (~Itkovian@178-117-76-63.access.telenet.be)
11:13:56 danvet_ joins (~danvet@212-51-149-181.fiber7.init7.net)
11:14:39 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 258 seconds)
11:15:58 × LKoen quits (~LKoen@252.248.88.92.rev.sfr.net) (Read error: Connection reset by peer)
11:16:33 LKoen joins (~LKoen@252.248.88.92.rev.sfr.net)
11:18:52 × danvet_ quits (~danvet@212-51-149-181.fiber7.init7.net) (Ping timeout: 258 seconds)
11:19:35 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 272 seconds)
11:19:45 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
11:20:24 <edwardk> dice x y = 2 * (fromIntegral <$> intersectionSize [x,y]) / (fromIntegral <$> (size x + size y))
11:20:24 <edwardk> kind of blechy use of the Approximate Int64s there.
11:20:31 × jamm_ quits (~jamm@unaffiliated/jamm) (Remote host closed the connection)
11:21:10 <edwardk> just like the fact that that uses the limited functionality offered by hyperloglog quite well
11:22:22 Lycurgus joins (~niemand@cpe-45-46-139-165.buffalo.res.rr.com)
11:22:53 <edwardk> er i don't remember if approximates have a num instance actually
11:24:14 × TommyC quits (~TommyC@unaffiliated/sepulchralbloom) (Ping timeout: 258 seconds)
11:24:17 jamm_ joins (~jamm@unaffiliated/jamm)
11:24:45 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
11:25:34 aveltras joins (uid364989@gateway/web/irccloud.com/x-zridcshpxaalituf)
11:25:42 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
11:26:04 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
11:29:09 viluon joins (uid453725@gateway/web/irccloud.com/x-ucvzxcoudognhctl)
11:30:32 × jamm_ quits (~jamm@unaffiliated/jamm) (Remote host closed the connection)
11:30:42 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 246 seconds)
11:30:46 × LKoen quits (~LKoen@252.248.88.92.rev.sfr.net) (Read error: Connection reset by peer)
11:31:38 LKoen joins (~LKoen@252.248.88.92.rev.sfr.net)
11:31:57 TommyC joins (~TommyC@unaffiliated/sepulchralbloom)
11:37:04 mputz joins (~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de)
11:37:22 × meck quits (~meck@li1809-18.members.linode.com) (Quit: ZNC 1.8.2 - https://znc.in)
11:39:07 ph88^ joins (~ph88@2a02:8109:9e00:7e5c:ade8:bbad:5afb:2c7)
11:41:30 meck joins (~meck@li1809-18.members.linode.com)
11:41:47 × mputz quits (~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de) (Ping timeout: 265 seconds)
11:42:54 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
11:42:55 × ph88 quits (~ph88@2a02:8109:9e00:7e5c:ade8:bbad:5afb:2c7) (Ping timeout: 272 seconds)
11:45:45 × ukari quits (~ukari@unaffiliated/ukari) (Remote host closed the connection)
11:46:10 × LKoen quits (~LKoen@252.248.88.92.rev.sfr.net) (Read error: Connection reset by peer)
11:46:43 LKoen joins (~LKoen@252.248.88.92.rev.sfr.net)
11:47:01 ukari joins (~ukari@unaffiliated/ukari)
11:47:05 × Major_Biscuit quits (~Major_Bis@82-169-100-198.biz.kpn.net) (Ping timeout: 240 seconds)
11:47:30 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 246 seconds)
11:47:42 turion joins (~turion@2a02:810d:8abf:c4a8:7417:1a58:4f1d:bffb)
11:48:05 mmohammadi9812 joins (~mmohammad@198.12.95.171)
11:49:41 Major_Biscuit joins (~Major_Bis@x065156.citg-m.tudelft.nl)
11:51:25 × plutoniix quits (~q@184.82.199.202) (Quit: Leaving)
11:52:48 joseph1 joins (~joseph@cpe-65-31-18-174.insight.res.rr.com)
11:54:30 mputz joins (~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de)
11:58:40 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
12:01:19 joseph1 parts (~joseph@cpe-65-31-18-174.insight.res.rr.com) ("WeeChat 2.8")
12:01:26 ubert joins (~Thunderbi@2a02:8109:9880:303c:54a5:5901:5ae5:e9e0)
12:01:28 poljar joins (~poljar@78-3-15-134.adsl.net.t-com.hr)
12:03:16 swarmcollective joins (~joseph@cpe-65-31-18-174.insight.res.rr.com)
12:03:22 × geyaeb quits (~geyaeb@gateway/tor-sasl/geyaeb) (Remote host closed the connection)
12:03:42 geyaeb joins (~geyaeb@gateway/tor-sasl/geyaeb)
12:03:43 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 258 seconds)
12:06:38 damhiya joins (~damhiya@211.49.186.236)
12:07:24 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
12:08:54 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Client Quit)
12:09:02 metreo joins (~Thunderbi@unaffiliated/metreo)
12:09:16 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
12:09:31 × polyrain quits (~polyrain@2001:8003:e4d8:4101:5d31:983b:a5a6:1f68) (Quit: My MacBook has gone to sleep. ZZZzzz…)
12:09:32 jonatanb joins (~jonatanb@83.24.13.14.ipv4.supernova.orange.pl)
12:14:04 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 258 seconds)
12:14:10 × jonatanb quits (~jonatanb@83.24.13.14.ipv4.supernova.orange.pl) (Ping timeout: 265 seconds)
12:14:19 <Taneb> How do I make a template haskell Exp that represents the expression "Foo {..}" (with record wildcards)
12:14:57 × Stanley00 quits (~stanley00@unaffiliated/stanley00) ()
12:16:10 <opqdonut> how about just doing something like $(show [|Foo {..}|]) to find out?
12:16:38 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
12:16:48 <Taneb> RecConE name [], apparently, which is the same as for "Foo {}", which makes me suspicious
12:17:07 <liyang> Does your Foo actually have any fields?
12:17:10 <Taneb> Yes
12:17:28 <liyang> How odd.
12:19:22 <Taneb> Ah, [|let x = 1; y = True in Foo {..}|] gets something more complicated
12:19:34 <Taneb> It's desugaring the record wildcard for me
12:19:56 × vicfred quits (vicfred@gateway/vpn/mullvad/vicfred) (Read error: Connection reset by peer)
12:19:58 <opqdonut> makes sense
12:20:06 <Taneb> Which... I don't want it to do
12:20:09 <opqdonut> so TH sees the syntax after RecordWildCards has been applied
12:20:10 vicfred joins (vicfred@gateway/vpn/mullvad/vicfred)
12:20:11 <Taneb> (because I'm lazy)
12:20:44 <liyang> Ah hah. Looking at some old code I think I came to the same conclusion.
12:21:16 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 240 seconds)
12:22:30 <liyang> Taneb: https://github.com/liyang/true-name/commit/3cd10547 if that helps.
12:23:12 <Taneb> Thanks!
12:23:14 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
12:25:34 <maralorn> ph88: Regarding "testing functions that are not exported by a module". Short answer: no, Long answer: https://www.tweag.io/blog/2021-01-07-haskell-dark-arts-part-i/
12:28:25 <kuribas> doesn't GADTs destroy parametricity properties? For example for "[] a", a can be anything, there is no way to know what a means, but for "Expr a", you can know a is some finite set of values.
12:28:26 <liyang> maralorn: Nice! Relevant to my interests. Never occured to me you could do that.
12:29:02 × knupfer quits (~Thunderbi@mue-88-130-61-250.dsl.tropolys.de) (Quit: knupfer)
12:29:15 <kuribas> So a GADT is not just a generalization, but also change the properties of the type system...
12:29:43 knupfer joins (~Thunderbi@200116b82c27b900d0584795dc7022de.dip.versatel-1u1.de)
12:31:07 <merijn> kuribas: Why does it destroy parametricity?
12:31:37 <kuribas> merijn: because now you have more information about a
12:31:47 <merijn> What information, exactly?
12:32:02 <kuribas> if you have a constructor, the exact type of a
12:33:20 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
12:33:59 <ph88^> how can i write code so that i can map while performing IO action which can fail ?
12:34:13 <kuribas> ph88^: traverse?
12:34:29 <kuribas> ph88^: also, define fail?
12:34:44 <kuribas> could be an exception, could be returning Either Error a ...
12:35:15 <ph88^> Either
12:35:22 × knupfer quits (~Thunderbi@200116b82c27b900d0584795dc7022de.dip.versatel-1u1.de) (Remote host closed the connection)
12:35:25 <kuribas> ph88^: wrap with ExceptT, then traverse
12:36:02 <ph88^> can i just use Either too ?
12:36:46 dyeplexer joins (~lol@unaffiliated/terpin)
12:36:50 <kuribas> :t traverse (ExceptT . f)
12:36:51 <lambdabot> (Traversable t, Monad m, Show a, FromExpr (m (Either e b))) => t a -> ExceptT e m (t b)
12:36:58 <kuribas> :t \f -> traverse (ExceptT . f)
12:36:59 <lambdabot> (Traversable t, Monad m) => (a -> m (Either e b)) -> t a -> ExceptT e m (t b)
12:37:20 <ph88^> what's the difference between map and traverse ?
12:38:05 <kuribas> ph88^: traverse also performs the effect
12:38:13 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 258 seconds)
12:38:26 <kuribas> > map putStrLn [1, 2, 3]
12:38:28 <lambdabot> error:
12:38:28 <lambdabot> • No instance for (Num String) arising from the literal ‘1’
12:38:28 <lambdabot> • In the expression: 1
12:38:37 <kuribas> > map putStrLn ["a", "b", "c"]
12:38:38 <lambdabot> [<IO ()>,<IO ()>,<IO ()>]
12:38:43 <kuribas> > traverse putStrLn ["a", "b", "c"]
12:38:45 <lambdabot> <IO [()]>
12:39:22 <ph88^> how can i combine traverse, ExceptT and evalState (from State) ?
12:39:25 × damhiya quits (~damhiya@211.49.186.236) (Quit: WeeChat 3.0.1)
12:39:48 <kuribas> ph88^: mapping an action over a list gives you a list of actions, traversing it gives you a list of the action results (in the action).
12:40:16 × kritzefitz quits (~kritzefit@212.86.56.80) (Ping timeout: 240 seconds)
12:40:20 <kuribas> ph88^: no IO?
12:40:29 <ph88^> also IO ...
12:40:58 <kuribas> you can make a stack ExceptT Err (StateT IO) a
12:41:50 <kuribas> which is equivalent to s -> IO (s, Either Err a)
12:41:51 Tops2 joins (~Tobias@dyndsl-095-033-093-253.ewe-ip-backbone.de)
12:41:51 <ph88^> then i first unwrap the Except (maybe case match on Either ?) then when i have the Right condition i do runState on it ?
12:42:08 <kuribas> ph88^: you unwrap from outside to inside.
12:42:22 <ph88^> as i was saying it, it's from outside to inside, no ?
12:42:50 <kuribas> flip evalStateT s $ runExceptT action
12:43:12 <int-e> ski: I really hate the name `asTypeIn` because it raises more questions than it answers... maybe it should be `asArgOf`.
12:43:39 <ph88^> thx kuribas i will try
12:44:28 <ph88^> kuribas, what should be the signature i want to apply to the elements in this case ?
12:44:37 <ph88^> the signature of the function *
12:45:06 <kuribas> ph88^: you can make the function return the monad stack
12:45:16 <ph88^> ok
12:45:28 <kuribas> then unpack after traversing
12:45:34 <kuribas> unwrap better
12:46:06 <ph88^> how come here ExceptT Err (StateT IO) a a is not wrapped in IO ?
12:46:30 <kuribas> because a is the return value of the monad stack
12:46:47 <kuribas> which has to be the last type parameter
12:47:08 <opqdonut> @unmtl ExceptT Err (StateT IO) a
12:47:08 <lambdabot> err: `StateT IO (Either Err a)' is not applied to enough arguments, giving `/\A. IO -> Either Err a (A, IO)'
12:47:18 <opqdonut> @unmtl ExceptT Err (StateT s IO) a
12:47:18 <lambdabot> s -> IO (Either Err a, s)
12:47:18 × pja quits (~phil@2a02:8010:6098:0:f2de:f1ff:fe2c:3d9) (Quit: WeeChat 2.8)
12:47:22 <ph88^> but i want to map a function over a structure which needs access to IO and to State ... so dunno how that could return a value not wrapped in IO ..
12:47:26 stef204 joins (~stef204@unaffiliated/stef-204/x-384198)
12:47:44 <kuribas> opqdonut: right, I had the state switched...
12:48:16 <kuribas> ph88^: it *does* return a value wrapped in IO
12:48:21 heatsink joins (~heatsink@2600:1700:bef1:5e10:cd3d:a18d:b2f7:b84a)
12:48:35 <ph88^> why is it not written like (IO a) then ?
12:48:54 <ph88^> or (StateT s (IO a))
12:49:12 <kuribas> ph88^: because you only get the IO after unwrapping
12:49:36 <ph88^> ok
12:49:36 × carldd11 quits (~carldd@90-224-49-113-no56.tbcn.telia.com) (Read error: Connection reset by peer)
12:50:01 <kuribas> :t \s -> flip evalState s . runExceptT
12:50:04 <lambdabot> s -> ExceptT e (StateT s Identity) a -> Either e a
12:50:12 <kuribas> :t \s -> flip evalStateT s . runExceptT
12:50:13 <lambdabot> Monad m => s -> ExceptT e (StateT s m) a -> m (Either e a)
12:50:38 machinedgod joins (~machinedg@135-23-192-217.cpe.pppoe.ca)
12:50:49 Tario joins (~Tario@201.192.165.173)
12:51:45 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
12:51:48 <ph88^> :t \b -> \s -> (\a -> evalState a s) $ runExcept b
12:51:50 <lambdabot> error:
12:51:50 <lambdabot> • Couldn't match type ‘Either e a’ with ‘StateT s Identity a1’
12:51:50 <lambdabot> Expected type: State s a1
12:52:14 <ph88^> why is that not the same ?
12:52:39 <kuribas> because it's different? what's that a?
12:52:56 <ph88^> i dunno
12:52:57 <int-e> :t \b -> (\s -> (\a -> evalState a s)) $ runExcept b
12:52:59 <int-e> :t \b -> (\s -> (\a -> evalState a s)) $ runExcept b
12:53:01 <lambdabot> Except e a1 -> State (Either e a1) a2 -> a2
12:53:26 × heatsink quits (~heatsink@2600:1700:bef1:5e10:cd3d:a18d:b2f7:b84a) (Ping timeout: 264 seconds)
12:53:28 <int-e> ph88^: your $ is inside the innermost lambda
12:53:48 <kuribas> ph88^: evalStateT takes two arguments, the monad stack and the state. You give it three arguments.
12:53:56 <ph88^> i was trying to recreate \s -> flip evalStateT s . runExceptT without flip and .
12:54:08 <int-e> :t \b -> (\s a -> evalState a s) $ runExcept b
12:54:09 <lambdabot> Except e a1 -> State (Either e a1) a2 -> a2
12:54:29 <int-e> :t \b a -> evalState a (runExcept b)
12:54:30 <lambdabot> Except e a1 -> State (Either e a1) a2 -> a2
12:54:37 <kuribas> :t \s m -> evalStateT (runExceptT m) s -- ph88^
12:54:38 <lambdabot> Monad m => s -> ExceptT e (StateT s m) a -> m (Either e a)
12:55:11 <ph88^> thanks
12:55:35 <int-e> oh
12:55:55 <ph88^> where in this does my function go that i want to map over the elements ?
12:56:05 knupfer joins (~Thunderbi@200116b82c27b900ad15eb691b6438af.dip.versatel-1u1.de)
12:56:14 <int-e> the s got lost in translation
12:56:27 pja joins (~phil@2a02:8010:6098:0:f2de:f1ff:fe2c:3d9)
12:56:37 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 258 seconds)
12:57:30 × raehik1 quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 246 seconds)
12:57:36 <kuribas> :t \s f -> flip evalStateT s . runExceptT . traverse f -- ph88^
12:57:37 <lambdabot> (Monad m, Traversable t) => s -> (a -> ExceptT e (StateT s m) b) -> t a -> m (Either e (t b))
12:59:58 chris8142 parts (~chris8142@srvnet-01-071.ikbnet.co.at) ("WeeChat 3.0")
13:00:04 <ph88^> :t \s f -> evalStateT (runExceptT (traverse f)) s
13:00:06 <lambdabot> error:
13:00:06 <lambdabot> • Couldn't match expected type ‘ExceptT e (StateT s m) a1’
13:00:06 <lambdabot> with actual type ‘t0 a -> f (t0 b)’
13:00:59 <ph88^> :t \s f m -> evalStateT (runExceptT m (traverse f)) s
13:01:00 <lambdabot> error:
13:01:00 <lambdabot> • Couldn't match type ‘Either e a1’ with ‘StateT s m a2’
13:01:00 <lambdabot> Expected type: (t a -> f (t b)) -> StateT s m a2
13:01:08 carldd11 joins (~carldd@90-224-49-113-no56.tbcn.telia.com)
13:01:55 <kuribas> ph88^: you have to apply traverse to something
13:02:06 <ph88^> oki
13:02:08 <kuribas> :t traverse
13:02:10 <lambdabot> (Traversable t, Applicative f) => (a -> f b) -> t a -> f (t b)
13:04:05 × Tario quits (~Tario@201.192.165.173) (Ping timeout: 240 seconds)
13:05:45 <kuribas> ph88^: a . b == \t -> a (b t)
13:06:02 urodna joins (~urodna@unaffiliated/urodna)
13:06:26 <kuribas> so "\s f -> flip evalStateT s . runExceptT . traverse f" => \s f -> \t -> flip evalStateT s (runExceptT (traverse f t))
13:06:51 <kuribas> apply flip and curry => \s f t -> evalStateT (runExceptT (traverse f t)) s
13:07:28 hekkaidekapus[ joins (~tchouri@gateway/tor-sasl/hekkaidekapus)
13:07:45 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
13:09:21 × hekkaidekapus} quits (~tchouri@gateway/tor-sasl/hekkaidekapus) (Ping timeout: 268 seconds)
13:09:39 × Rudd0 quits (~Rudd0@185.189.115.108) (Ping timeout: 258 seconds)
13:09:44 michalz joins (~user@185.246.204.78)
13:10:08 <kuribas> ph88^: it's often a good idea to do rewrite steps in order.
13:10:35 <kuribas> these could be even automated by some tool ...
13:12:09 raehik1 joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
13:12:41 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 256 seconds)
13:16:21 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
13:16:50 average joins (uid473595@gateway/web/irccloud.com/x-rcklrhokomuilocj)
13:18:34 berberman_ joins (~berberman@unaffiliated/berberman)
13:19:50 × berberman quits (~berberman@unaffiliated/berberman) (Ping timeout: 264 seconds)
13:20:27 honigkuchen joins (~honigkuch@ip5b429953.dynamic.kabel-deutschland.de)
13:20:55 <honigkuchen> how would you program the smallest rule in a programming language, because whatsoever is a rule in essence?
13:20:57 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 246 seconds)
13:23:52 danza joins (~francesco@151.53.69.219)
13:24:21 <merijn> EQUESTIONILLDEFINED
13:24:32 geekosaur joins (82650c7c@130.101.12.124)
13:25:21 <carbolymer> how can I get number of seconds from UTCTime?
13:25:24 × jb55 quits (~jb55@gateway/tor-sasl/jb55) (Remote host closed the connection)
13:25:26 <carbolymer> I mean timestamp
13:25:39 <liyang> carbolymer: number of seconds from when?
13:25:47 jb55 joins (~jb55@gateway/tor-sasl/jb55)
13:25:47 × o1lo01ol1o quits (~o1lo01ol1@bl7-89-228.dsl.telepac.pt) (Remote host closed the connection)
13:25:48 <carbolymer> liyang: timestamp
13:26:43 <carbolymer> Unix time precisely
13:26:45 <liyang> carbolymer: 1970-01-01 00:00:00 UTC?
13:26:55 <carbolymer> yes
13:27:18 × jespada quits (~jespada@90.254.242.138) (Quit: Leaving)
13:27:24 <carbolymer> utcTimeToPOSIXSeconds
13:27:26 <carbolymer> oh
13:27:26 <liyang> carbolymer: http://hackage.haskell.org/package/time-1.11.1.1/docs/Data-Time-Clock-POSIX.html#v:utcTimeToPOSIXSeconds
13:27:36 <carbolymer> liyang: thx
13:28:22 <liyang> If you'd rather have it as something other than NominalDiffTime, just wrap realToFrac around it.
13:28:26 × TommyC quits (~TommyC@unaffiliated/sepulchralbloom) (Ping timeout: 258 seconds)
13:29:33 <carbolymer> hmm
13:29:44 <carbolymer> how do I convert NominalDiffTime -> Integer ?
13:30:18 <liyang> carbolymer: in what units? Seconds, microseconds, picoseconds?
13:30:31 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
13:30:52 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
13:31:03 <carbolymer> liyang: yeah, still talking about seconds
13:31:04 jamm_ joins (~jamm@unaffiliated/jamm)
13:31:23 <liyang> carbolymer: round ndt, round (ndt * 1000000), round (ndt * 1e12)
13:31:29 <carbolymer> liyang: in general I would like nanos, but UTCTime is in seconds, right?
13:31:36 <liyang> carbolymer: or ceil / floor.
13:32:18 <liyang> UTCTime has ps precision, but fromInteger 1 :: NominalDiffTime is interpreted as 1 second.
13:32:43 <merijn> UTCTime isn't in seconds, it's picoseconds
13:33:07 <carbolymer> wait, UTCTime has Num instance?
13:33:11 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
13:33:13 <liyang> (sssh! internal implementation detail.)
13:33:49 <liyang> carbolymer: no, that wouldn't make sense. For a Num instance you'd need to define e.g. (+), and it doesn't make sense to add two UTCTimes.
13:33:52 <merijn> UTCTime doesn't have a num instance
13:34:26 <carbolymer> right, I meant NominalDiffTime
13:34:33 <carbolymer> yes it has
13:34:36 <liyang> Think of UTCTime as a point (in a 1D space), and NominalDiffTime as a vector.
13:34:39 <carbolymer> that basically solves everything
13:34:41 <carbolymer> thanks
13:35:20 × jamm_ quits (~jamm@unaffiliated/jamm) (Ping timeout: 258 seconds)
13:35:57 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 264 seconds)
13:38:25 Sgeo joins (~Sgeo@ool-18b98aa4.dyn.optonline.net)
13:39:05 × lotuseater quits (~user@ip-176-198-181-127.hsi05.unitymediagroup.de) (Read error: Connection reset by peer)
13:39:10 × berberman_ quits (~berberman@unaffiliated/berberman) (Quit: ZNC 1.8.2 - https://znc.in)
13:39:32 berberman joins (~berberman@unaffiliated/berberman)
13:40:20 × digia quits (~digia@unaffiliated/digia) (Quit: Beep Boop...)
13:40:51 digia joins (~digia@unaffiliated/digia)
13:41:01 × berberman quits (~berberman@unaffiliated/berberman) (Max SendQ exceeded)
13:41:31 berberman joins (~berberman@unaffiliated/berberman)
13:41:58 nbloomf joins (~nbloomf@2600:1700:ad14:3020:fc44:c2d6:2605:3850)
13:42:04 × esph quits (~weechat@unaffiliated/esph) (Ping timeout: 240 seconds)
13:43:05 esph joins (~weechat@unaffiliated/esph)
13:45:11 geowiesnot joins (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr)
13:45:45 × frozenErebus quits (~frozenEre@37.231.239.43) (Ping timeout: 240 seconds)
13:49:56 heatsink joins (~heatsink@2600:1700:bef1:5e10:cd3d:a18d:b2f7:b84a)
13:51:20 <honigkuchen> merijn, ?
13:52:12 × geowiesnot quits (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 258 seconds)
13:52:21 × mmohammadi9812 quits (~mmohammad@198.12.95.171) (Read error: Connection reset by peer)
13:52:57 × Lycurgus quits (~niemand@cpe-45-46-139-165.buffalo.res.rr.com) (Quit: Exeunt)
13:52:57 × Narinas quits (~Narinas@189.223.62.254.dsl.dyn.telnor.net) (Read error: Connection reset by peer)
13:52:59 mmohammadi9812 joins (~mmohammad@2.178.213.79)
13:53:10 Narinas joins (~Narinas@189.223.62.254.dsl.dyn.telnor.net)
13:53:22 acarrico joins (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net)
13:53:23 Wuzzy joins (~Wuzzy@p5b0df175.dip0.t-ipconnect.de)
13:53:51 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 246 seconds)
13:54:17 ArConan joins (9de62a69@157.230.42.105)
13:54:40 <ArConan> @src action
13:54:40 <lambdabot> Source not found. :(
13:54:42 o1lo01ol1o joins (~o1lo01ol1@bl7-89-228.dsl.telepac.pt)
13:54:42 × o1lo01ol1o quits (~o1lo01ol1@bl7-89-228.dsl.telepac.pt) (Remote host closed the connection)
13:54:47 o1lo01ol_ joins (~o1lo01ol1@bl7-89-228.dsl.telepac.pt)
13:54:53 <ArConan> @src fmap
13:54:53 <lambdabot> Source not found. Are you typing with your feet?
13:55:14 × heatsink quits (~heatsink@2600:1700:bef1:5e10:cd3d:a18d:b2f7:b84a) (Ping timeout: 264 seconds)
13:55:22 <geekosaur> fmap is defined per instance
13:55:23 <Taneb> ArConan: @src isn't very good (I think it's manually curated)
13:55:29 <maerwald> @src map
13:55:29 <lambdabot> map _ [] = []
13:55:30 <lambdabot> map f (x:xs) = f x : map f xs
13:55:33 <geekosaur> @src [] fmap
13:55:33 <lambdabot> fmap = map
13:56:17 <maerwald> @src Maybe fmap
13:56:17 <lambdabot> fmap _ Nothing = Nothing
13:56:17 <lambdabot> fmap f (Just a) = Just (f a)
13:57:16 × raichoo quits (~raichoo@dslb-188-109-063-185.188.109.pools.vodafone-ip.de) (Quit: Lost terminal)
13:57:24 <merijn> Taneb: It's just a text to text lookup, yeah
13:57:38 <merijn> It's mostly the reference definition of the Haskell Report
13:58:28 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
13:58:43 Tario joins (~Tario@201.192.165.173)
13:58:51 TommyC joins (~TommyC@unaffiliated/sepulchralbloom)
14:04:09 × vicfred quits (vicfred@gateway/vpn/mullvad/vicfred) (Quit: Leaving)
14:05:42 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
14:08:20 hyperisco joins (~hyperisco@104-195-141-253.cpe.teksavvy.com)
14:09:33 × TommyC quits (~TommyC@unaffiliated/sepulchralbloom) (Ping timeout: 264 seconds)
14:09:34 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
14:09:35 × berberman quits (~berberman@unaffiliated/berberman) (Quit: ZNC 1.8.2 - https://znc.in)
14:09:47 alx741 joins (~alx741@181.196.69.29)
14:09:56 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
14:10:00 berberman joins (~berberman@unaffiliated/berberman)
14:10:05 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 240 seconds)
14:10:39 × turion quits (~turion@2a02:810d:8abf:c4a8:7417:1a58:4f1d:bffb) (Quit: Leaving.)
14:10:47 × berberman quits (~berberman@unaffiliated/berberman) (Max SendQ exceeded)
14:11:32 berberman joins (~berberman@unaffiliated/berberman)
14:14:49 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 258 seconds)
14:17:02 × geekosaur quits (82650c7c@130.101.12.124) (Ping timeout: 240 seconds)
14:22:44 × zaquest quits (~notzaques@5.128.210.178) (Quit: Leaving)
14:23:16 × mmohammadi9812 quits (~mmohammad@2.178.213.79) (Ping timeout: 240 seconds)
14:24:23 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
14:25:04 renzhi joins (~renzhi@2607:fa49:6500:6f00::1e43)
14:26:10 zaquest joins (~notzaques@5.128.210.178)
14:27:03 × nbloomf quits (~nbloomf@2600:1700:ad14:3020:fc44:c2d6:2605:3850) (Quit: My MacBook has gone to sleep. ZZZzzz…)
14:27:19 <ph88^> so ExceptT is not really an exception but just a monad ?
14:27:53 deviantfero joins (~deviantfe@190.150.27.58)
14:27:58 geekosaur joins (ac3a8ee4@172.58.142.228)
14:28:00 TommyC joins (~TommyC@unaffiliated/sepulchralbloom)
14:29:30 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 265 seconds)
14:31:10 <tdammers> it's a monad *transformer*
14:31:29 cr3 joins (~cr3@192-222-143-195.qc.cable.ebox.net)
14:32:21 <maerwald> yeah, it has nothing to do with exceptions, which is why EitherT was a better name
14:32:33 <maerwald> or ErrorT
14:32:38 frozenErebus joins (~frozenEre@37.231.239.43)
14:32:47 shiraeeshi joins (~shiraeesh@109.166.56.5)
14:33:49 <merijn> except refers to exceptional as in "non-standard" not exceptions in the Control.Exception sense, though
14:34:12 <merijn> maerwald: ErrorT was deprecated because Left isn't necessarily an *error*
14:34:42 <maerwald> merijn: sure, it's just naming bikeshedding, but I've heard ppl often associate ExceptT with checked exeptions
14:35:00 pera joins (~pera@unaffiliated/pera)
14:35:11 <ph88^> when there is a monad transformer does it always use the Identity monad to make the default case ?
14:35:19 <maerwald> if those are checked exceptions, then I can have checked exceptions in C too
14:35:28 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
14:35:42 <ph88^> what is a checked exception ?
14:36:34 <maerwald> checked exceptions is about runtime guarantees, not types
14:36:45 <pjb> maerwald: more precisely, the C standard has sufficient undefined behavior that a C implementation can specify and implement useful checked exception.
14:37:22 <pjb> maerwald: but since this wouldn't be standard, it could be problematic using them. This would render your C code unportable. (Agreed, you could use some macros to paper over that).
14:37:47 <nshepperd> the fact that it's not called EitherT feels bad tbh
14:38:32 <ph88^> kuribas are you here ?
14:38:40 <merijn> pjb: Well, it'd render your C code "not C"
14:40:03 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 246 seconds)
14:42:19 <kuribas> ph88^: yes
14:42:34 ph88_ joins (~ph88@ip5f5af71a.dynamic.kabel-deutschland.de)
14:43:58 × mputz quits (~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de) (Quit: mputz)
14:43:58 × jpds quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
14:44:18 <pjb> merijn: it would still be C, just C with undefined behavior.
14:44:36 jpds joins (~jpds@gateway/tor-sasl/jpds)
14:44:43 <pjb> merijn: if you write int c=a+b; you have written C with undefined behavior.
14:44:49 pzzl joins (~pzzl@eimer.scc.uni-weimar.de)
14:45:46 × ArConan quits (9de62a69@157.230.42.105) (Quit: Ping timeout (120 seconds))
14:45:57 × ph88^ quits (~ph88@2a02:8109:9e00:7e5c:ade8:bbad:5afb:2c7) (Ping timeout: 272 seconds)
14:46:46 <ph88_> can someone help me with monad transformers ? https://bpa.st/VPJQ
14:46:55 <pjb> merijn: to write C without undefined behavior, you need to write int c=(a>0)?((MAX_INT-a)>=b?a+b:0):((b>0)?((MAX_INT-b)>=a?a+b:0):((MIN_INT-a)<=b?a+b:0)); or something like that…
14:46:56 × geekosaur quits (ac3a8ee4@172.58.142.228) (Quit: Ping timeout (120 seconds))
14:47:06 mmohammadi9812 joins (~mmohammad@2.178.213.79)
14:47:16 <ph88_> line 33 in the paste where things start going wrong
14:48:20 × coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
14:51:06 × hekkaidekapus[ quits (~tchouri@gateway/tor-sasl/hekkaidekapus) (Ping timeout: 268 seconds)
14:52:00 <swarmcollective> ';
14:52:48 <swarmcollective> ph88_ To begin, I don't believe you need "pure" there.
14:53:10 hekkaidekapus[ joins (~tchouri@gateway/tor-sasl/hekkaidekapus)
14:53:44 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
14:55:47 nineonine joins (~nineonine@2604:3d08:7785:9600:95c8:88e9:a60d:8dfa)
14:57:43 × nineonine quits (~nineonine@2604:3d08:7785:9600:95c8:88e9:a60d:8dfa) (Remote host closed the connection)
14:58:24 nineonine joins (~nineonine@2604:3d08:7785:9600:95c8:88e9:a60d:8dfa)
14:58:45 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 264 seconds)
14:59:36 × acarrico quits (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) (Ping timeout: 240 seconds)
14:59:48 <kuribas> ph88_: you do "pure $ Right $ " on something that can give an error
15:00:36 <kuribas> ph88_: also, personal opinion "f >>= \x -> body" is more ugly than "do x <- f; body"
15:00:37 × mouseghost quits (~draco@wikipedia/desperek) (Quit: mew wew)
15:00:51 <kuribas> the sugar is there, so use it.
15:01:04 gxt joins (~gxt@gateway/tor-sasl/gxt)
15:01:37 dminuoso sometimes prefers the `f >>= \x -> body` style
15:01:48 <merijn> "It Depends (TM)"
15:01:50 <dminuoso> Especially for a one-liner like that. :)
15:02:47 × nineonine quits (~nineonine@2604:3d08:7785:9600:95c8:88e9:a60d:8dfa) (Ping timeout: 260 seconds)
15:03:57 <kuribas> ph88_: if you swap StateT and ExceptT you can pass the error on.
15:04:08 <kuribas> dminuoso: the do is smaller
15:04:20 <kuribas> dminuoso: you gain nothing with the >>= \x style.
15:04:39 × darjeeling_ quits (~darjeelin@122.245.120.134) (Ping timeout: 258 seconds)
15:04:48 <kuribas> assuming it's production code, not an exercise for a beginner to learn how do notation works.
15:05:16 <dminuoso> `do x <- f; body` reads very irregular to me.
15:05:18 p-core joins (~Thunderbi@2001:718:1e03:5128:3697:eeda:19aa:8e56)
15:05:20 <maerwald> hmm, does partial pattern matching in lambda even trigger monadfail?
15:05:27 <merijn> maerwald: no
15:05:28 <dminuoso> No.
15:05:33 × forgottenone quits (~forgotten@176.42.24.1) (Quit: Konversation terminated!)
15:05:35 <maerwald> right, so it's not really the same
15:05:52 <dminuoso> That's a bit nitpicky, but fine.
15:06:23 vicfred joins (~vicfred@unaffiliated/vicfred)
15:06:23 darjeeling_ joins (~darjeelin@122.245.120.134)
15:06:47 <ph88_> kuribas, do you mean to change the stack ?
15:06:48 <merijn> kuribas: If you meant using do with the *actual* semicolon, rather than a newline, then I'm gonna change my opinion from "it depends" to "that's absolutely not acceptable" >.>
15:06:54 <kuribas> ph88_: yes
15:07:02 raichoo joins (~raichoo@dslb-188-109-063-185.188.109.pools.vodafone-ip.de)
15:07:05 × deviantfero quits (~deviantfe@190.150.27.58) (Ping timeout: 240 seconds)
15:07:39 <kuribas> merijn: I sometimes use a semicolon, but not often...
15:08:17 × raym quits (~ray@45.64.220.55) (Quit: leaving)
15:08:29 <dminuoso> I like code to have a clear visual flow, which is why I alternate between =<< and >>= depending on the context of the code
15:08:38 × guest23 quits (~user@49.5.6.87) (Remote host closed the connection)
15:08:45 <dminuoso> Generally preferring =<< though, just not when there's a lambda involved.
15:08:46 <kuribas> I often use =<< and >>=, but never with a lambda
15:08:59 guest23 joins (~user@49.5.6.87)
15:10:27 × toorevitimirp quits (~tooreviti@117.182.181.145) (Remote host closed the connection)
15:10:28 <maerwald> Never understood why ppl actively avoid lambdas :)
15:10:36 <dminuoso> `instance Traversable Maybe`
15:10:41 <dminuoso> My favourite instance of the month.
15:10:42 <kuribas> maerwald: I don't?
15:10:45 <merijn> maerwald: Lambda's are great, especially with stuff like forM :>
15:11:07 <dminuoso> merijn: forM Im not quite convinced. But forM_ sure
15:11:13 × geyaeb quits (~geyaeb@gateway/tor-sasl/geyaeb) (Remote host closed the connection)
15:11:15 <maerwald> kuribas: using too many lambdas got me rejected at a job (they argued it's not advanced haskell)
15:11:16 <maerwald> :D
15:11:24 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
15:11:29 <dminuoso> If you're rebuilding structure, chances is you will want the function named so its clear what this builds up
15:11:30 <ph88_> what is the tradeoff by changing the order of a monad transformer stack ?
15:11:33 <kuribas> maerwald: people are idiots
15:11:40 <dminuoso> ph88_: it changes the effect, usually
15:11:47 <ph88_> what effect ?
15:11:57 <dminuoso> It often means something different if you swap the order.
15:11:59 geyaeb joins (~geyaeb@gateway/tor-sasl/geyaeb)
15:12:05 <maerwald> kuribas: I trolled back by telling them that pointfree style can lead to memory leaks (and it can)
15:12:07 <dminuoso> It depends on the transformers involved
15:12:35 <maerwald> but that's so rare that the average programmer probably doesn't need to care
15:12:36 <kuribas> maerwald: besides, if they pick you or not based on just style, you don't want to work there anyway.
15:12:56 toorevitimirp joins (~tooreviti@117.182.181.145)
15:13:25 paintcan` joins (~user@cpe-69-206-241-99.nyc.res.rr.com)
15:14:06 <dminuoso> ph88_: Consider the difference between `MaybeT (StateT Identity Int)` and `StateT Int (MaybeT Identity)` when throwing an exception in MaybeT with respect to state.
15:14:25 <maerwald> I haven't experienced that much picking on style elsewhere though. E.g. in Go tech challenges, ppl usually care about performance only
15:14:27 <kuribas> ph88_: in general, the inner monad takes preference. Which means inner state is still passed when you throw an exception.
15:14:55 <kuribas> ph88_: if you move state to the outside, it doesn't. But for your code that doesn't matter.
15:15:19 bitmagie joins (~Thunderbi@200116b806108700484948e27a931f58.dip.versatel-1u1.de)
15:15:26 <dminuoso> @unmtl MaybeT (StateT Int Identity) ()
15:15:26 <lambdabot> Int -> (Maybe (), Int)
15:15:28 <dminuoso> @unmtl StateT Int (MaybeT Identity) ()
15:15:28 <lambdabot> Int -> Maybe ((), Int)
15:15:35 <dminuoso> Those are clearly not the same thing. :)
15:15:56 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 240 seconds)
15:16:03 <ph88_> ye they look different
15:18:03 <ph88_> how can i put these together ? newtype ExceptT e (m :: * -> *) a newtype StateT s (m :: * -> *) a
15:18:44 conal joins (~conal@64.71.133.70)
15:18:44 <ph88_> can * -> * be written with arguments like a lambda function ?
15:18:59 × Major_Biscuit quits (~Major_Bis@x065156.citg-m.tudelft.nl) (Ping timeout: 272 seconds)
15:19:33 <kuribas> ph88_: like I said, it doesn't matter, since you don't need state in your exceptions.
15:20:03 <ph88_> then how to handle code_lookup ?
15:20:26 × bitmagie quits (~Thunderbi@200116b806108700484948e27a931f58.dip.versatel-1u1.de) (Quit: bitmagie)
15:20:43 <ph88_> line 37 and 52
15:21:11 Major_Biscuit joins (~Major_Bis@82.169.100.198)
15:21:17 jonatanb joins (~jonatanb@83.24.13.14.ipv4.supernova.orange.pl)
15:21:30 <kuribas> ph88_: just swap the types, and the unwrappers.
15:21:53 <ph88_> yes that's what i'm trying, but i don't know how the types work so i was just asking about it
15:22:12 kritzefitz joins (~kritzefit@212.86.56.80)
15:22:30 texasmynsted_ joins (~texasmyns@99.96.221.112)
15:22:39 <kuribas> what don't you understand?
15:22:51 <ph88_> what's a ?
15:22:52 × texasmynsted quits (~texasmyns@99.96.221.112) (Ping timeout: 265 seconds)
15:22:58 <kuribas> a is a type variable
15:23:17 texasmynsted_ is now known as texasmynsted
15:23:18 <ph88_> it's missing documentation https://hackage.haskell.org/package/mtl-2.2.2/docs/Control-Monad-Except.html#t:ExceptT
15:23:23 <ph88_> only e and m have docs
15:23:29 <dminuoso> Sometimes they 16:19:34 kuribas | ph88_: like I said, it doesn't matter, since you don't need state in your exceptions.
15:23:32 <dminuoso> That's not the only difference
15:24:09 <kuribas> dminuoso: I am talking about ph88_ 's code, not in general
15:24:17 <dminuoso> Ah, okay.
15:25:04 <kuribas> ph88_: why would there need to be a doc for a type variable?
15:25:33 <dminuoso> So you know what the meaning of it is?
15:25:39 <ph88_> obviously ?
15:25:44 × jonatanb quits (~jonatanb@83.24.13.14.ipv4.supernova.orange.pl) (Ping timeout: 258 seconds)
15:26:00 p-core1 joins (~Thunderbi@195.138.249.4)
15:26:19 <kuribas> standard library documentation is not a tutorial on Monads, it's reference documentation.
15:26:37 <dminuoso> ph88_: The `a` is your own choice. Consider:
15:26:57 × cfricke quits (~cfricke@unaffiliated/cfricke) (Quit: WeeChat 3.0)
15:26:59 <dminuoso> newtype ExceptT e m a = ExceptT { runExceptT :: m (Either e a) }
15:27:39 × p-core quits (~Thunderbi@2001:718:1e03:5128:3697:eeda:19aa:8e56) (Ping timeout: 258 seconds)
15:27:39 p-core1 is now known as p-core
15:27:40 <kuribas> ph88_: if you're confused about monad transformers, it may be more productive to read some tutorial or handbook.
15:27:56 <dminuoso> `ExceptT E M` gives you a monad (that is, something * -> * kinded). `a` can losely be thought of as the "result type" of the monadic computation.
15:28:01 <ph88_> removed pure $ Right and switched Except and State https://bpa.st/3L3A
15:28:15 Jd007 joins (~Jd007@162.156.11.151)
15:28:38 <kuribas> ph88_: for example: http://book.realworldhaskell.org/read/monad-transformers.html
15:28:40 <ph88_> kuribas, i'm not good with books
15:28:43 <dminuoso> ph88_: But really, `ExceptT` is only considered with two arguments, really.
15:28:57 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
15:29:35 <dminuoso> So think of `ExceptT String IO a` as `type M = ExceptT String IO; ... M a` perhaps, so `ExceptT String M` adds a "string exception" effect to an arbitrary monad M.
15:29:56 <dminuoso> Okay, I confusingly used `M` in different places there.
15:30:25 <ph88_> when i look at this newtype ExceptT e m a = ExceptT { runExceptT :: m (Either e a) } i imagine m a was IO a
15:30:53 deviantfero joins (~deviantfe@190.150.27.58)
15:31:15 <dminuoso> Well, let's say you want to have a base monad called `App`, you could define it as `type App = ExceptT String IO`, and then write code like `getNumber :: App Int`, then you would pick `a ~ Int`
15:31:24 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
15:32:31 <dminuoso> Similarly to how `Either E` adds an exception to arbitrary computations, `ExceptT E` adds an exception effect to arbitrary effects.
15:32:34 nineonine joins (~nineonine@2604:3d08:7785:9600:acd4:a5be:3be2:2313)
15:32:54 <average> so let me see if I understand this correctly
15:33:47 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 256 seconds)
15:36:19 <average> damn, I can't find that quote, but anyway, it was something like "Haskell is a programming language whose main purpose is writing core business logic"
15:36:33 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 264 seconds)
15:37:23 tzh joins (~tzh@c-24-21-73-154.hsd1.wa.comcast.net)
15:37:42 <average> to me this sounds like "We will protect the core business logic and restrict it to a very limited set of individuals through using a high-entry barrier language that has a steep learning curve"
15:37:49 <average> this is how I read that
15:38:03 <average> if I'm wrong, please let me know and also why
15:38:08 <sshine> this one? 06:15:06 <average> "While Haskell is a general purpose language that can be used in any domain and use case, it is ideally suited for proprietary business logic and data analysis[..]"
15:38:21 <average> yes exactly sshine , you found it, thanks
15:38:26 <dminuoso> average: I dont agree with that assessment in any way.
15:38:35 <average> dminuoso: ok, please tell me why
15:38:41 <merijn> average: That's kinda the opposite of how I'd interpret it (although I don't really agree either)
15:38:55 <average> merijn: that's perfectly fine. why do you disagree ?
15:39:02 <dminuoso> average: Firstly, the purpose (that is what the creators intended it for), was just satisfying the creators academic curiosity.
15:39:18 <dminuoso> Namely, whether a lazy pure functional programming language with a rich type system is useful.
15:39:24 <dminuoso> And what you can do with it
15:39:38 × nineonine quits (~nineonine@2604:3d08:7785:9600:acd4:a5be:3be2:2313) (Ping timeout: 264 seconds)
15:39:40 <dminuoso> That's how it was born, anyway.
15:39:53 <merijn> average: My interpretaton is: Haskell's purity and abstraction means that it's easy to create (e)DSLs for your business logic, detached from the IO/messy implementation bits to make it work
15:40:00 <sshine> average, a related point is: typed, algebraic data types with records is a really neat way to express a domain model. if I have to interpret "proprietary" constructively, perhaps what's meant is: this works really well for domain models of commercial companies.
15:40:03 <average> dminuoso: academia is always associated with the expression Ivory Towers, and we kindof know the direction that expression goes in https://en.wikipedia.org/wiki/Ivory_tower#Academic_usage
15:40:40 <merijn> average: I also don't think Haskell is especially high barrier to entry nor has that steep a learning curve
15:40:57 × guest23 quits (~user@49.5.6.87) (Remote host closed the connection)
15:41:10 guest23 joins (~user@49.5.6.87)
15:41:21 <dminuoso> average: Right. Perhaps to some degree, the reason is that academics tend to focus on one area so well, that often (but not always) nobody except their peers understands any of what they do well enough.
15:41:34 <merijn> average: Most people who know at least 1 mainstream programming language are used to new languages being basically reskins of what they already know, therefore requiring almost no effort to learn (and forgetting how hard it was to learn their first programming language originally)
15:41:40 jonatanb joins (~jonatanb@83.24.13.14.ipv4.supernova.orange.pl)
15:41:49 <average> sshine: alright. and yet the reality is that, that in practice, most such systems are implemented in Java and not Haskell. And everyone who's worked for a while in companies knows that Java is prevalent
15:41:50 <dminuoso> average: But I find, this sort of argument is made primarily by people who reject the notion you have to spend time studying formal methods to become good.
15:42:28 <merijn> average: Haskell is hard because it's different from most mainstream languages people know, and therefore learning it feels like learning programming from scratch. But most people have forgotten how hard learning programming from scratch was
15:42:44 <average> dminuoso: so Haskell requires knowledge of formal methods, which is not easy to attain. Does that not prove the high barrier for entry ?
15:42:49 <dminuoso> Nope!
15:42:58 <dminuoso> average: But it requires knowledge of formal methods to have invented it.
15:43:00 <merijn> average: Anecdotally I have taught Haskell to a bunch of people as their first language and they didn't struggle significantly more than people I've taught, like, Java as first language
15:43:09 <sshine> average, trololo :) just because Haskell is a good choice for expressing a domain model doesn't mean it has a low cost of entry, if that's all you plan to do with it.
15:43:49 × jonatanb quits (~jonatanb@83.24.13.14.ipv4.supernova.orange.pl) (Remote host closed the connection)
15:43:50 × toorevitimirp quits (~tooreviti@117.182.181.145) (Remote host closed the connection)
15:43:50 <dminuoso> average: Haskell happens to be so clean, that it attracts many academic folks. This creates an ecosystem in which libraries arise that look complicated and/or mathy. The fact that we have complicated extensions to cater to those people doesn't help of course.
15:44:03 <merijn> Actually, with my partner I'd say her experience learning Haskell was considerably easier than the Java degree/job she got afterwards
15:44:15 <sshine> merijn, anecdotally: I've taught SML for a bunch of years and have always experienced that people without prior programming experience struggle less than many who have prior experience with a non-functional language. :-D
15:44:28 <merijn> sshine: Same
15:44:46 <merijn> I TAed functional languages in OCaml for a few years, that was always a struggle
15:44:49 <dminuoso> But, admittedly, the fact that Haskell *gives* the impression of being hard to learn certainly keeps certain demographics out of its users.
15:45:05 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
15:45:32 toorevitimirp joins (~tooreviti@117.182.181.145)
15:45:36 <sshine> average, bootstrapping a company with Haskell is a lot tougher than joining a company that did it already.
15:45:45 <merijn> sshine: With my SO she studied Java a few months after getting through HFFP and I could just hear the sighs and facepalming as she was studying :p
15:46:23 <sshine> average, only last year books started coming out about how to do this, meaning everyone who did it before that probably had a *lot* of individual trial-end-error behind them. :)
15:47:33 <average> I will be very curious to know if Haskell will still be considered fit for writing core business logic once the herds of programmers start flocking around it and its user-base grows "too much"
15:47:59 <merijn> Entirely unrelatedly: What's the inverse of "making clear"/"clearing up"?
15:48:19 <average> my prediction is that once this happens (Haskell becoming too popular) or some time before it happens, everyone will move to some other lesser-known language that is fundamentally different from the mainstream
15:48:26 <dminuoso> average: At the end of the day, what Haskell offers is utilities to avoid writing wrong code and to guide you in writing right code.
15:48:29 <dolio> Obsucuring?
15:48:35 <dminuoso> average: To me, this is a useful properties regardless of what kind of code you write
15:48:52 × evanjs quits (~evanjs@075-129-098-007.res.spectrum.com) (Quit: ZNC 1.8.2 - https://znc.in)
15:48:59 <sshine> merijn, my partner started with Python on CodinGame. there was one task that involved checking some condition the same way 8 times, and the question went something like "Isn't there some way I can do that for all of them?" and my response would be: I don't know, let's Google... yeah, "all()"! -- I think if you appeal to people's high-level way of thinking, functional programming can be a giant relief
15:49:05 <sshine> before you start internalizing low-level thinking out of pure necessity because of poor libraries.
15:49:23 <merijn> dolio: hmm, not quite, but that's a good place to start browsing the thesaurus from :)
15:49:45 <dolio> Probably depends on the exact context of the phrase.
15:49:52 evanjs joins (~evanjs@075-129-098-007.res.spectrum.com)
15:50:27 × michalz quits (~user@185.246.204.78) (Remote host closed the connection)
15:50:41 Foritus joins (~buggery@cpc91316-watf11-2-0-cust68.15-2.cable.virginm.net)
15:51:13 heatsink joins (~heatsink@2600:1700:bef1:5e10:cd3d:a18d:b2f7:b84a)
15:51:23 <sshine> average, you're quite right... Haskell (and other FP research languages) tends to spawn languages, language features and libraries that are much more immediately applicable to everyone. this is a cascading effect with a much larger value than Haskell itself. but this is "Haskell the research language". there's also "Haskell the industry language". :-D
15:51:46 <dminuoso> average: I dont think that Haskellers use their language out of elitism. If we had an influx of less experienced developers, I dont think that would sway developers away.
15:51:50 <merijn> dolio: Something along the lines of "the datadependence of these implementations makes it unclear how to usefully compare them", but that feels very clumsy
15:52:00 <merijn> I don't think that'll happen anyway
15:52:01 <sshine> average, LINQ is a byproduct of FP research. LINQ is much more appreciated by quantity of programmers than Haskell. :-D
15:52:16 <merijn> Haskell is in a sweet spot due to having a reasonable library ecosystem
15:52:28 <merijn> I don't see, say, Idris catching up with that anytime soon
15:52:49 <sshine> merijn, yep, Idris doesn't have the momentum. which is GOOD, because it can stay lean.
15:52:54 <dolio> I think 'obscures' could work there, maybe. But there might be a better word.
15:52:55 <dminuoso> merijn: Of course, the more unprincipled/low quality programmers join, the the more the quality on hackage degrades. :)
15:53:16 <merijn> dminuoso: I mean, Hackage is already long-tailed in quality
15:53:20 <merijn> Lots of junk on there
15:53:43 <dminuoso> merijn: Sure, but relative to many others, Id say hackage generally has superb quality package.
15:53:47 <dminuoso> That is
15:54:09 <dminuoso> The percentage of high quality packages is relatively high, compared to other package/library databases of other languages.
15:54:11 <merijn> I'm not sure the quality distribution of Hackage is meaningfully different from pypi
15:54:24 <sshine> merijn, for all the many, many points where Haskell isn't "best in class" yet, I just have to admit that most languages I've worked with, this is equally true. e.g. in PHP, "roll your own X" is the predominant solution for *everything*.
15:54:28 <merijn> Just the absolute numbers
15:55:05 × conal quits (~conal@64.71.133.70) (Ping timeout: 240 seconds)
15:55:12 <dminuoso> merijn: Perhaps I just happen to navigate a special subset of Hackage that is just of good quality.. but then again I audit my dependencies (transitively sometimes)
15:55:16 dminuoso shrugs
15:55:21 <dminuoso> that might skew my feelings
15:55:40 michalz joins (~user@185.246.204.76)
15:55:51 <dolio> If you watch the bot, you might think differently. :)
15:56:09 acarrico joins (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net)
15:56:26 × heatsink quits (~heatsink@2600:1700:bef1:5e10:cd3d:a18d:b2f7:b84a) (Ping timeout: 264 seconds)
15:56:36 <dolio> I think there are a lot of things on hackage that seem like, 'I just made a github repo, I should also upload to hackage.'
15:56:52 forgottenone joins (~forgotten@176.42.24.1)
15:57:00 <average> dolio: self-promotion
15:57:02 <merijn> hell
15:57:05 <average> dolio: invaluable in this day and age
15:57:21 <merijn> There's some package that don't even have a repo and just seem to use Hackage as version control >.>
15:57:25 slack1256 joins (~slack1256@dvc-186-186-101-190.movil.vtr.net)
15:57:32 <sshine> merijn, heh yeah.
15:58:24 ArConan joins (9de62a69@157.230.42.105)
15:58:47 × raichoo quits (~raichoo@dslb-188-109-063-185.188.109.pools.vodafone-ip.de) (Quit: Lost terminal)
15:58:51 <dolio> The stuff most people actually use is naturally way above that.
15:59:45 <ski> int-e : the idea was that it's typically to be used as map `asTypeIn` \map -> map reverse "foo" .. where you repeat the name as the parameter name, and then give the expression using it
15:59:46 × ArConan quits (9de62a69@157.230.42.105) (Client Quit)
15:59:53 <slack1256> To use the hackage-next repository, do I need to modify the ~/.cabal/config file right? is there a way to have both allowed at the same time?
16:00:24 nbloomf joins (~nbloomf@2600:1700:ad14:3020:8867:d061:b0e1:86b9)
16:00:26 × forgottenone quits (~forgotten@176.42.24.1) (Client Quit)
16:00:33 coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl)
16:00:36 Rudd0 joins (~Rudd0@185.189.115.103)
16:00:58 <dminuoso> slack1256: Yes, you can add both
16:01:42 <nshepperd> i wonder if some people upload things to hackage just because they can't figure out how to install locally developed packages otherwise
16:01:43 conal joins (~conal@66.115.157.67)
16:01:45 <sshine> average, the part that makes Haskell fit for expressing core business logic isn't going to change. :) this is the least controversial part of the language and is often the part that people say "Just go back and use more of this instead of your fancy freer monananads.
16:02:17 <dminuoso> slack1256: https://cabal.readthedocs.io/en/3.4/installing-packages.html#repository-specification
16:02:26 <dminuoso> slack1256: Note, that if the package is on both the last one wins
16:02:30 <dminuoso> (I think?)
16:02:46 <average> sshine: well it would definitely be great if it someone came along to separate that part of Haskell from the rest
16:02:48 <average> there is a lot of fluff
16:02:49 <slack1256> dminuoso: That is exactly what I wanted to know. I will just add the common repository last.
16:03:07 <merijn> slack1256: What's hackage-next?
16:03:11 <average> I think I have seen many blog posts about Haskell fluff
16:03:29 <average> at its peak, the Haskell fluff turns into woo-woo
16:03:30 × deviantfero quits (~deviantfe@190.150.27.58) (Read error: Connection reset by peer)
16:03:39 <merijn> average: So? There's lots of fluff about *any* language
16:03:49 <sshine> average, you can restrict yourself to that part. this movement is called "Boring Haskell". :-D
16:03:57 <merijn> This just in, 90% of Haskell blogposts are trash, because 90% of *all* blogposts are trash
16:04:00 <sshine> average, https://www.snoyman.com/blog/2019/11/boring-haskell-manifesto/
16:04:02 <merijn> Welcome to Sturgeon's Law
16:05:00 <average> well yes, Sturgeon's Law seems applicable here, just as well as Pareto's law ..
16:05:04 <merijn> sshine: I like "boring Haskell", but I dislike the "Boring Haskell" movement, since their definition of "Boring Haskell" is either to vague or too limiting to be useful
16:05:12 <average> but in essence, there is some overlap betweewn Sturgeon and Pareto
16:05:19 <average> except Sturgeon is a more radical view than Pareto
16:05:22 <sshine> merijn, the same goes for books. I promised myself I'd never write a book. I realize I could take all my StackOverflow answers and jam them in a book of several thousands of pages, so I don't know if I implicitly broke my promise.
16:05:25 <average> Pareto is more polite I think
16:05:37 soft-warm joins (4408f588@ip68-8-245-136.sd.sd.cox.net)
16:05:43 <merijn> sshine: I think people should try and be minimalist about the extensions and type level stuff they adopt and make sure the ROI is good
16:06:14 <merijn> sshine: But programmers *hate* "think about what you're doing and make nuanced decisions" and *love* blind adherence to dogmatic statements
16:06:35 <dolio> Yeah, that will be the problem with any kind of 'movement' like that.
16:07:00 forgottenone joins (~forgotten@176.42.24.1)
16:07:08 deviantfero joins (~deviantfe@190.150.27.58)
16:07:10 <sshine> merijn, I bet every concrete application of boring Haskell is slightly different. and yeah, most importantly is the incentive. :)
16:07:11 <merijn> A little bit of GADTs and DataKinds can dramatically improve code where "lots of it" will make your code a painful unmaintainable mess
16:07:20 nineonine joins (~nineonine@2604:3d08:7785:9600:95c8:88e9:a60d:8dfa)
16:07:36 <merijn> Even type families can be "boring" IMO
16:07:45 <dolio> The problem is pointlessly over-engineering, not the particular tools used to do so.
16:07:51 <sshine> yeah. a bit PatternSynonym shouldn't have to complicate a module's interface, either.
16:07:55 <merijn> The simple realisation is "stop trying to encode and enforce every damn thing on the type level"
16:07:59 <dolio> People over-engineer in Java.
16:08:40 <sshine> new DisdainingJavaStatementFactoryBuilder();
16:08:45 × pgib quits (~textual@lmms/pgib) (Ping timeout: 240 seconds)
16:08:50 <merijn> The only way to stop people from over-engineering is "experienced seniors thwapping people with rolled up newspapers"
16:08:58 <merijn> And a sense of aesthetics
16:09:18 <Logio> the bigger problem is people not being able to properly model their problems mathematically in general.
16:09:57 <Logio> if you have a model of your problem, the problem of expressing it is at least well defined. otherwise you're not even wrong
16:10:17 kw joins (d4662d5d@212.102.45.93)
16:10:39 <slack1256> merijn: Is another hackage repository with backpack signatures and packages. Stuff that currently hackage doesn't ship.
16:10:51 <Logio> expressing it in Haskell (or other programming language) I mean
16:11:55 <tdammers> and then there's also the whole agenda thing (i.e., pushing for a particular dogma because it suits your business case)
16:12:07 × pzzl quits (~pzzl@eimer.scc.uni-weimar.de) (Quit: Leaving)
16:12:20 <sshine> merijn, it seems like an art form. when I showed my gf my Haskell version of that introductory programming problem, my first reaction was to define two helper functions with meaningful names, and then the problem became a one-liner. it was one of those cases where my brain has done too much of this, and that if you plot 1000 people's solutions, you'd get all kinds of variations of short/long,
16:12:26 <sshine> verbose/concise, readable/cryptic, and I just always go for most readable and fewest edge cases, or something like that...
16:13:07 × p-core quits (~Thunderbi@195.138.249.4) (Read error: Connection reset by peer)
16:13:24 <slack1256> (how great having your GF also know haskell :-) )
16:13:35 <sshine> but "most readable" is still point-free, applicative. I don't know why that is so appealing.
16:13:39 × nineonine quits (~nineonine@2604:3d08:7785:9600:95c8:88e9:a60d:8dfa) (Ping timeout: 258 seconds)
16:13:49 <sshine> slack1256, my gf doesn't know Haskell. she's just learning Python because she is unemployed right now. ;)
16:14:35 <merijn> slack1256: That's easy
16:14:45 <slack1256> sshine: Nice, I am doing kind of the same.
16:15:05 <sshine> slack1256, learning programming while unemployed?
16:15:13 <merijn> slack1256: Step 1) get a partner, Haskell knowledge optional, Step 2) teach Haskell if not yet known :p
16:15:33 <slack1256> merijn: Well she has to have a natural interest in the first place for that to work.
16:16:04 <merijn> Some things are dealbreakers :p
16:16:05 <slack1256> But she liked 3d printing and fusion 360. That program can be scripted, so through there I started teaching her python.
16:16:30 <slack1256> sshine: Not unemployed but certainly under-employed. Well me too.
16:18:15 <average> sshine: re "take all my SO answers and jam them in a book of several thousand pages" . I do that here, but it's not a book.. just a repo https://github.com/wsdookadr/so/
16:18:40 <average> sshine: this is my SO https://stackoverflow.com/users/827519/wsdookadr
16:18:53 cfricke joins (~cfricke@unaffiliated/cfricke)
16:20:14 × ichimaru quits (~ichimaru@45.63.97.131) (Quit: ichimaru)
16:20:16 plutoniix joins (~q@node-unx.pool-125-24.dynamic.totinternet.net)
16:20:26 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection)
16:20:29 <sshine> average, that's pretty neat. :)
16:21:13 <ski> a book is presumably more/different, than a collection of short, probably quite informal (and disconnected), pieces
16:21:53 <merijn> ski: pigworker disagrees ;)
16:21:54 × Foritus quits (~buggery@cpc91316-watf11-2-0-cust68.15-2.cable.virginm.net) (Quit: ლ(ಠ益ಠლ) .:. <Ashley> my porn is hidden in a folder called "BBC Micro Emulator")
16:22:04 <ski> heh :)
16:22:13 <dolio> He does?
16:22:15 <merijn> ski: https://personal.cis.strath.ac.uk/conor.mcbride/so-pigworker.pdf
16:22:18 <merijn> dolio: ^^
16:22:47 Foritus joins (~buggery@cpc91316-watf11-2-0-cust68.15-2.cable.virginm.net)
16:25:01 <ski> there's certainly some books which are more a collection of short articles (e.g. "The Fun of Programming", where each chapter is by a different person)
16:25:11 <exarkun> https://hackage.haskell.org/package/binary-0.8.7.0/docs/Data-Binary-Get.html#v:runGet says it returns `a` and `stack ls dependencies` says "binary 0.8.7.0" but when I declare that "readVersion share = runGet getWord32be share" has type "B.ByteString -> Word32" then ghc says: Couldn't match expected type ‘Word32’ with actual type ‘Either String Word32’
16:25:13 heatsink joins (~heatsink@2600:1700:bef1:5e10:cd3d:a18d:b2f7:b84a)
16:25:35 <exarkun> I don't understand
16:25:39 <ski> but in that case, there's some kind of common (perhaps a bit nebulous) theme, still
16:25:41 <dolio> Yeah. I guess the connotation was some kind of text book.
16:26:04 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
16:26:41 <merijn> exarkun: What's the type of "share"?
16:26:47 <merijn> And what's the type of readVersion?
16:26:50 <ski> merijn : looks like it might be fun, ty :)
16:27:07 <exarkun> Oh hell I'm using runGet from Data.Serialize instead of Data.Binary.Get
16:27:16 <merijn> exarkun: hah
16:27:51 <exarkun> ty for your indulgence
16:27:59 <merijn> exarkun: Although you should probably use runGetOrFail instead :p
16:28:42 <exarkun> probably, though this is in a test suite
16:29:49 <exarkun> heh, and now head is failing before runGet ever gets a chance...
16:32:14 × toorevitimirp quits (~tooreviti@117.182.181.145) (Remote host closed the connection)
16:33:41 × Narinas quits (~Narinas@189.223.62.254.dsl.dyn.telnor.net) (Read error: Connection reset by peer)
16:34:31 Narinas joins (~Narinas@189.223.62.254.dsl.dyn.telnor.net)
16:39:43 × slack1256 quits (~slack1256@dvc-186-186-101-190.movil.vtr.net) (Remote host closed the connection)
16:40:01 ski read that as "head is falling"
16:41:27 igghibu joins (~igghibu@37.120.201.121)
16:42:54 × rcdilorenzo quits (~rcdiloren@62.182.99.136) (Ping timeout: 265 seconds)
16:44:25 × catt quits (~r@31.124.181.226) (Ping timeout: 240 seconds)
16:44:26 <sm[m]> g'day all. Failing to do something simple in ghci:
16:44:26 <sm[m]> parseTimeM True defaultTimeLocale "%Y-%m-%dT%s%Q%Z" "2021-02-03T000247.0581Z"
16:44:26 <sm[m]> This has type (MonadFail m, ParseTime t) => m t, how would you make it showable ?
16:44:27 <maerwald> merijn: you think teaching haskell is fun? (or teaching at all)
16:44:37 nineonine joins (~nineonine@2604:3d08:7785:9600:acd4:a5be:3be2:2313)
16:44:52 × danza quits (~francesco@151.53.69.219) (Quit: Leaving)
16:45:21 × frozenErebus quits (~frozenEre@37.231.239.43) (Ping timeout: 246 seconds)
16:45:24 <maerwald> sm[m]: use the MonadFail Maybe instance?
16:45:49 <sm[m]> I've been trying..
16:45:53 rcdilorenzo joins (~rcdiloren@62.182.99.136)
16:46:03 × nineonine quits (~nineonine@2604:3d08:7785:9600:acd4:a5be:3be2:2313) (Remote host closed the connection)
16:46:09 × raehik1 quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 264 seconds)
16:46:19 × mmohammadi9812 quits (~mmohammad@2.178.213.79) (Read error: Connection reset by peer)
16:46:31 mmohammadi9812 joins (~mmohammad@198.12.95.182)
16:47:05 nineonine joins (~nineonine@2604:3d08:7785:9600:95c8:88e9:a60d:8dfa)
16:47:07 <sm[m]> ah finally.. fromJust $ parseTimeM True defaultTimeLocale "%Y-%m-%dT%s%Q%Z" "2021-02-03T000247.0581Z" :: UTCTime . Thanks!
16:47:10 brandonhamilton joins (~brandonha@2a04:3542:1000:910:905f:f9ff:fe67:4d32)
16:47:47 raehik1 joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
16:48:02 <maerwald> sm[m]: or: parseTimeM @Maybe @UTCTime True defaultTimeLocale "%Y-%m-%dT%s%Q%Z" "2021-02-03T000247.0581Z"
16:48:32 <sm[m]> interesting
16:49:48 <sm[m]> haskell keeps.. changing :)
16:50:03 × cfricke quits (~cfricke@unaffiliated/cfricke) (Quit: WeeChat 3.0)
16:50:51 <maerwald> TypeApplications is there since 8.0.1
16:51:07 <sm[m]> ghci> :t parseTimeM :: (MonadFail m, ParseTime t) => Bool -> TimeLocale -> String -> String -> m t
16:51:07 <sm[m]> ghci> :t parseTimeM @Maybe @UTCTime :: Bool -> TimeLocale -> String -> String -> Maybe UTCTime
16:51:36 × nineonine quits (~nineonine@2604:3d08:7785:9600:95c8:88e9:a60d:8dfa) (Ping timeout: 258 seconds)
16:51:59 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 258 seconds)
16:52:02 <sm[m]> still quite new to most haskellers I think
16:52:05 elfets joins (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de)
16:53:40 <sm[m]> https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html#extension-TypeApplications
16:53:43 polyphem joins (~p0lyph3m@2a02:810d:640:776c:76d7:55f6:f85b:c889)
16:54:09 <swarmcollective> :t parseTimeM @Maybe @UTCTime
16:54:11 <lambdabot> error:
16:54:11 <lambdabot> Pattern syntax in expression context: parseTimeM@Maybe
16:54:11 <lambdabot> Did you mean to enable TypeApplications?
16:54:21 <swarmcollective> Interesting.
16:54:34 <c_wraith> Nah. "new" is -XImpredicativeTypes working. and by "new" I mean "not technically released yet"
16:54:40 <sm[m]> I see.. the @'s are simply used to fill in type variables in the type signature, from left to right
16:54:57 <sm[m]> (of the thing to the left of them)
16:55:03 <maerwald> sm[m]: hmm, not always left to right, I always forget the exact rules
16:55:08 <maerwald> unless there is a forall
16:55:13 <c_wraith> It's always left to right
16:55:28 <maerwald> c_wraith: let me find the counter-example then
16:55:35 <c_wraith> it's just that a forall clause is considered the first use of the variable, if it's present
16:55:41 <sm[m]> oh yikes, this doc section is much longer than I thought
16:56:51 × igghibu quits (~igghibu@37.120.201.121) (Quit: Textual IRC Client: www.textualapp.com)
16:57:12 hnOsmium0001 joins (uid453710@gateway/web/irccloud.com/x-vcqnqeayruwjdhxh)
16:59:40 ep1ctetus joins (~epictetus@ip184-187-162-163.sb.sd.cox.net)
17:00:33 kupi joins (uid212005@gateway/web/irccloud.com/x-qetuytxtunbuqszx)
17:00:52 <merijn> maerwald: I like teaching, so yes
17:00:57 <kuribas> sshine: I don't think conciseness is a good metric, however if you stick to the stuff that matters, and eliminate cruft, you usually do end up with less code.
17:01:25 <merijn> c_wraith: It's not that ImpredicativeTypes works, it's that we can actually *tell* if it works now :p
17:01:29 <kuribas> but actively trying to make code more concise will end up with unreadable code.
17:01:41 <sm[m]> "If any of the variables depend on other variables (that is, if some of the variables are kind variables), the variables are reordered so that kind variables come before type variables, preserving the left-to-right order as much as possible."
17:01:53 <maerwald> ah
17:02:11 <merijn> maerwald, sm[m]: I strongly oppose the use of TypeApplication in "real" code as it's incredibly brittle
17:02:48 <merijn> Using it means you are making something part of upstream's public API that is normally *not* considered part of the API and thus no care is taken not to break it
17:03:03 <c_wraith> merijn: nah, it's that it actually works. There are lots of places before you could enable it and it wouldn't reject things as a syntax error, but it would give you a type error like cannot match (forall b. b-> b) with (forall b. b -> b)
17:03:24 <sm[m]> and @_ can be used as a wildcard placeholder
17:03:27 <merijn> c_wraith: How would you even tell whether it worked before? Nobody had a specification of what it meant :p
17:03:40 <monochrom> My code is short, but it's a side effect not an objective. My objective is eliminating XY problems.
17:03:43 <sm[m]> merijn: noted
17:03:55 geekosaur joins (82650c7c@130.101.12.124)
17:04:07 × ubert quits (~Thunderbi@2a02:8109:9880:303c:54a5:5901:5ae5:e9e0) (Remote host closed the connection)
17:04:08 nineonine joins (~nineonine@2604:3d08:7785:9600:95c8:88e9:a60d:8dfa)
17:04:22 <c_wraith> merijn: well, "working" would definitely include "doesn't produce errors saying identical types don't match"
17:04:22 <sm[m]> I guess if I dug into ghc dev history I'd find the rationale for it
17:04:26 <merijn> maerwald, sm[m]: There has *already* been a change in GHC's type inference that changed the order in which type variables were inferred in the forall clause, meaning that uses of TypeApplications on functions with no explicit forall broke
17:04:58 <maerwald> yeah and I remember an example where it wasn't left to right and pretty confusing
17:05:01 <maerwald> can't find it anymore
17:05:13 <merijn> And if someone adds an explicit forall (say, to use ScopedTypeVariables) and writes out their type variables differently from GHCs order, that also breaks
17:05:49 <merijn> The number of people (even hardcore PVP adherents) that account for that as part of their public API is probably roughly zero
17:05:53 × nineonine quits (~nineonine@2604:3d08:7785:9600:95c8:88e9:a60d:8dfa) (Remote host closed the connection)
17:06:30 nineonine joins (~nineonine@2604:3d08:7785:9600:95c8:88e9:a60d:8dfa)
17:06:55 <merijn> So unless you use exact versions for all your dependencies that's potential breakage, but exact versions for dependencies is nightmare of bounds maintenance
17:07:19 × conal quits (~conal@66.115.157.67) (Ping timeout: 258 seconds)
17:07:37 <ski> kuribas : hm, i guess conciseness is often a kind of happy accidental side-effect of striving to make code better, but not a goal one should aim directly at
17:07:50 × pavonia quits (~user@unaffiliated/siracusa) (Quit: Bye!)
17:09:19 <ski> (at least we're not letting uses of polymorphic values depend on the *names* used for the tyvars in the type signature .. unlike some other language)
17:09:52 <kuribas> which other language?
17:10:03 <monochrom> Haskell itself already causes a lot of conciseness just because it's so bloody high-level. For example you just write "Ctor x y" not "new Ctor x y" compared to Java and Rust. That already cuts down length by 30-50%.
17:10:37 <kuribas> and the tendency to write short function names and short variables, which isn't always good IMO...
17:11:46 ryantrinkle joins (~ryan@cpe-24-168-87-184.si.res.rr.com)
17:12:07 <c_wraith> I still don't know why theValueIDon'tKnowAnythingAbout is a better variable name than x
17:12:17 conal joins (~conal@64.71.133.70)
17:12:31 <maerwald> you type less
17:12:36 <monochrom> This is why I say that "meaningful name" is a religion.
17:12:37 <merijn> Length/descriptiveness of name should depend on two factors
17:12:50 <c_wraith> maerwald: I think you may have read that backwards
17:12:53 <merijn> 1) scope, the bigger the scope, the more descriptive the name should be
17:12:57 <maerwald> when you have RSI, you stop caring about clear variable names :)
17:13:14 <kuribas> c_wraith: it isn't
17:13:20 <merijn> 2) frequency of use, less frequently used names should be more descriptive
17:13:23 <c_wraith> but people tell me it is!
17:13:25 <maerwald> c_wraith: wasn't a response to your sentence
17:13:25 <c_wraith> constantly!
17:13:33 <c_wraith> maerwald: oh, oops. sorry
17:13:58 <maerwald> I cut down the chars here as well...
17:14:11 <kuribas> merijn: indeed, I am more bother by badly named exported functions than by badly named local variables.
17:15:23 ski seconds merijn
17:15:48 × raehik1 quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 246 seconds)
17:15:57 <maerwald> merijn: my favorite is "removeFile"... is it descriptive? :)
17:16:57 × carlomagno quits (~cararell@148.87.23.7) (Remote host closed the connection)
17:16:59 <maerwald> I'd argue not much more than "unlink"
17:17:12 <maerwald> you'll end up reading the documentation regardless
17:17:31 <maerwald> and then still forget half of it when using it and get confused later
17:17:35 <geekosaur> its behavior depends on the platform, too
17:18:18 bitmagie joins (~Thunderbi@200116b806108700484948e27a931f58.dip.versatel-1u1.de)
17:18:22 carlomagno joins (~cararell@148.87.23.7)
17:18:40 × bitmagie quits (~Thunderbi@200116b806108700484948e27a931f58.dip.versatel-1u1.de) (Client Quit)
17:19:20 × coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
17:20:08 <maerwald> so here's a poor counter-thought: do unclear names force ppl to read the documentation?
17:20:22 Saukk joins (~Saukk@83-148-239-3.dynamic.lounea.fi)
17:20:36 × rcdilorenzo quits (~rcdiloren@62.182.99.136) (Ping timeout: 240 seconds)
17:20:44 <dolio> If it does, that's not a good argument in their favor.
17:20:46 <maerwald> I surely read the whole manpage when I first saw "unlink", because what the hell
17:20:47 <geekosaur> they force people to google
17:21:01 <geekosaur> people will do anything before resorting to documentation
17:21:07 × brandonhamilton quits (~brandonha@2a04:3542:1000:910:905f:f9ff:fe67:4d32) (Ping timeout: 258 seconds)
17:21:07 frozenErebus joins (~frozenEre@37.231.239.43)
17:22:43 raehik1 joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
17:23:14 <maerwald> geekosaur: well, documentation is often trash, but we'll never know if that started, because no one reads it or no one reads it, because it's trash
17:23:30 nineonin_ joins (~nineonine@50.216.62.2)
17:23:49 <maerwald> I'd argue that search engines made documentation worse, though
17:23:58 ski idly wonders whether there's a stated law about the lengths people will go to, to avoid looking into docs
17:24:27 <swarmcollective> <opinion> Haskell library documentation would be greatly improved with some examples. Doctest samples would work well for this.
17:25:06 swarmcollective would like to find time to update some of the docs.
17:25:43 <maerwald> https://hackage.haskell.org/package/directory-1.3.6.1/docs/System-Directory.html#v:removeFile I can't even figure out if it follows symlinks
17:25:45 <aveltras> examples is clearly the most important thing lacking when trying to use some libraries
17:26:17 × nineonine quits (~nineonine@2604:3d08:7785:9600:95c8:88e9:a60d:8dfa) (Ping timeout: 260 seconds)
17:27:00 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
17:30:03 <aveltras> im porting some oo code and wondering if there is a better way to accomplish the following. I have an InlineNotification class with many fields and a ToastNotification class which extends it adding one field. The obvious way to port it (and how i do it for now) is to have an InlineNotification record and a ToastNotification with an _inlineNotification field in it. But then the problem is that whenever you want to
17:30:03 <aveltras> access the inner fields for the toast notification, you have to dig through the "_inlineNotification" field, which you don't have to do in oop lang. Is there another approach to this ?
17:30:29 <koz_> aveltras: You can use lenses which make this a bit less awkward.
17:30:45 <aveltras> im using lenses already
17:30:50 Ariakenom joins (~Ariakenom@2001:9b1:efb:fc00:6006:2ad2:8fc2:e1e4)
17:30:50 <enikar> maerwald: I think, i don't follow symlink, because the doc says « removes a directory entry », but is it true?
17:31:16 <aveltras> but i still have to use the intermediary lense (or at least i think so using makeLenses TH)
17:31:30 <geekosaur> but you can define your own composed lenses to hide it
17:31:32 <koz_> aveltras: Then that's pretty much it. If you wanna do OOP stuff, Haskell's not the language - you can't port the same idea of 'extending' stuff directly without awkwardness.
17:31:37 <koz_> What geekosaur said.
17:32:32 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
17:32:38 <maerwald> enikar: it doesn't follow them
17:33:10 × pera quits (~pera@unaffiliated/pera) (Ping timeout: 265 seconds)
17:33:11 <maerwald> enikar: any proper manpage (e.g. of `unlink`) says explicitly what happens with symlinks
17:34:02 <maerwald> but then again, this is a cross platform lib and there's even a (poor) hint about a major complication on windows, that most ppl won't be able to infer, unless they already know it
17:34:03 <enikar> maerwald: nice, I guess the correct behaviour, but this is just a happy luck…
17:35:29 × rajivr quits (uid269651@gateway/web/irccloud.com/x-rezdfhgnedgqggyb) (Quit: Connection closed for inactivity)
17:36:33 × knupfer quits (~Thunderbi@200116b82c27b900ad15eb691b6438af.dip.versatel-1u1.de) (Remote host closed the connection)
17:36:39 <aveltras> i'll do custom lenses then i think, not sure i can get those with TH easily
17:36:58 knupfer joins (~Thunderbi@200116b82c27b900392e02b43800d436.dip.versatel-1u1.de)
17:37:05 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 240 seconds)
17:37:14 × Yumasi quits (~guillaume@2a01:e0a:5cb:4430:572d:5f36:41d6:1475) (Ping timeout: 264 seconds)
17:38:00 mastarija joins (~mastarija@188.252.197.178)
17:38:08 <enikar> maerwald: I'm agree with you, this documentation has a lack…
17:40:56 rcdilorenzo joins (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com)
17:42:33 <maerwald> so my claim is this: names don't have to be accurate, just memorable
17:45:19 <maerwald> `cutTree` for recursive directory removal is ok imo
17:51:00 <ski> it can help, at times, if names don't evoke previous (irrelevant or even countering) associations
17:52:16 × geekosaur quits (82650c7c@130.101.12.124) (Quit: Ping timeout (120 seconds))
17:52:23 × soft-warm quits (4408f588@ip68-8-245-136.sd.sd.cox.net) (Quit: Connection closed)
17:53:18 × chele quits (~chele@ip5b40237d.dynamic.kabel-deutschland.de) (Remote host closed the connection)
17:53:53 <monochrom> My criteria for names is mnemonics and hamming distance. Length and "meaning" are side effects.
17:54:08 <monochrom> s/ is / are / # I hate English
17:54:33 <shapr> Has anyone used the cookie functionality in http-client?
17:54:45 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
17:54:52 <shapr> If yes, what's the right way to thread cookies through multiple requests?
17:54:52 geekosaur joins (82650c7c@130.101.12.124)
17:55:11 <shapr> My code logs into a server, I get an auth cookie in return.
17:55:50 <shapr> I'd like to correctly thread the cookies from each response through each request to the server after that.
17:55:51 f-a joins (~f-a@151.34.30.157)
17:56:19 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
17:56:44 <maerwald> https://hackage.haskell.org/package/http-client-0.7.4/docs/Network-HTTP-Client.html#v:managerModifyRequest and then share the manager across requests (which you should do anyway)?
17:57:18 hseg joins (~gesh@185.120.124.95)
17:58:37 <hseg> hi. am packaging up some haskell programs, is there a way to tell stack to cache package archives somewhere outside of the build directory?
17:58:59 <hseg> eg i see it's taking a while to download https://s3.amazonaws.com/hackage.fpcomplete.com/package/pandoc-2.11.4.tar.gz
17:58:59 pera joins (~pera@unaffiliated/pera)
17:59:04 <maerwald> hseg: https://github.com/fpco/cache-s3
17:59:35 <hseg> meant caching locally
18:00:07 <hseg> so e.g. having ~/.local/var/cache/stack/sources/... that contains the source tarballs
18:00:26 <hseg> and then download the tarballs stack needs myself (eg with aria2)
18:00:38 <hseg> so that it doesn't need to do so every time
18:00:57 <hseg> especially if the dependencies change much more slowly than the package
18:01:18 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 246 seconds)
18:02:05 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
18:02:17 × kw quits (d4662d5d@212.102.45.93) (Quit: Connection closed)
18:03:34 × dyeplexer quits (~lol@unaffiliated/terpin) (Remote host closed the connection)
18:04:39 <hseg> hrm. looking at stack's fds, it is looking at something called pantry.sqlite3?
18:04:45 × raehik1 quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 240 seconds)
18:04:48 × Foritus quits (~buggery@cpc91316-watf11-2-0-cust68.15-2.cable.virginm.net) (Ping timeout: 246 seconds)
18:06:11 × frozenErebus quits (~frozenEre@37.231.239.43) (Ping timeout: 272 seconds)
18:07:05 raehik1 joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
18:07:28 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 272 seconds)
18:07:49 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
18:08:37 philopsos joins (~caecilius@gateway/tor-sasl/caecilius)
18:10:19 <hseg> stack is taking much longer than aria2 to download the pandoc tarball, is there any way I can just drop the tarball in the right location?
18:10:33 p-core joins (~Thunderbi@2001:718:1e03:5128:3697:eeda:19aa:8e56)
18:10:58 <shapr> maerwald: I don't see any code in http-client where a manager handles cookie updating, is there such a thing?
18:11:27 rcdilorenzo_ joins (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com)
18:11:33 <maerwald> don't think so, it's all about the Ruqeust type afais
18:11:36 <texasmynsted> If I have a lazy ByteString with escapes like \n \t, how to I print so that \n becomes newline?
18:11:54 × Major_Biscuit quits (~Major_Bis@82.169.100.198) (Ping timeout: 272 seconds)
18:12:05 × rcdilorenzo quits (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com) (Ping timeout: 240 seconds)
18:12:10 <texasmynsted> When I print the ByteString directly I see \n in the output. This makes sense.
18:12:56 <maerwald> shapr: but there is `mModifyRequest :: Request -> IO Request`
18:13:10 <maerwald> I just can't see currently how to set it...
18:13:14 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection)
18:13:15 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 258 seconds)
18:13:18 <maerwald> https://hackage.haskell.org/package/http-client-0.7.4/docs/src/Network.HTTP.Client.Types.html#Manager
18:13:24 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
18:13:48 dnlkrgr joins (~dnlkrgr@HSI-KBW-046-005-005-235.hsi8.kabel-badenwuerttemberg.de)
18:13:52 × Saukk quits (~Saukk@83-148-239-3.dynamic.lounea.fi) (Remote host closed the connection)
18:14:51 <geekosaur> texasmynsted, first make sure there's no "show" involved anywhere.
18:15:22 <texasmynsted> well show is.
18:15:30 <geekosaur> beyond that, you may need to add double quotes and take a trip through read, or use a string parser (I don't think there's any predefined beyond the Read instance)
18:15:38 × rcdilorenzo_ quits (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com) (Client Quit)
18:15:41 <geekosaur> show converts actual control characters to escapes
18:15:46 <maerwald> shapr: maybe: defaultManagerSettings { managerModifyRequest = ... }
18:15:50 <geekosaur> if you don't want that, don't use show
18:15:52 rcdilorenzo joins (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com)
18:16:17 <geekosaur> > show "\tabc"
18:16:19 <lambdabot> "\"\\tabc\""
18:16:34 <shapr> maerwald: ah, you think a function could be supplied to update cookies?
18:16:46 <geekosaur> wait
18:16:49 <geekosaur> "\tabc"
18:16:52 <maerwald> yeah, the cookie would be "hidden" in the partially applied function
18:16:56 <texasmynsted> I think it is happening automatically
18:16:59 <geekosaur> it's already doing show in lb
18:17:03 <geekosaur> > text "\tabc"
18:17:05 <lambdabot> abc
18:17:11 <geekosaur> (text is speific to lambdabot)
18:17:16 jluttine joins (~jluttine@85-23-95-149.bb.dnainternet.fi)
18:18:16 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
18:18:34 <hseg> hrm, lsof suggests stack downloads archives to temporary directories
18:18:34 <texasmynsted> say I have a bytestring foo
18:18:38 <texasmynsted> print foo
18:18:54 <hseg> any way of giving it an already-downloaded tarball
18:18:55 <hseg> ?
18:19:04 <texasmynsted> also print (foo :: ByteString)
18:19:06 f-a parts (~f-a@151.34.30.157) ()
18:19:08 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
18:19:23 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
18:19:48 <geekosaur> texasmynsted, why use print at all? it's just putStrLn . show
18:19:56 × mastarija quits (~mastarija@188.252.197.178) (Quit: Leaving)
18:19:59 <geekosaur> so use putStrLn directly if you don't want the show
18:20:08 × raehik1 quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 272 seconds)
18:20:09 <texasmynsted> heh, I thought that putStrLn used show
18:21:12 soft-warm joins (4408f588@ip68-8-245-136.sd.sd.cox.net)
18:21:15 × acarrico quits (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) (Ping timeout: 246 seconds)
18:21:22 <texasmynsted> hmm putStrLn expects String not ByteString
18:21:43 Deide joins (~Deide@217.155.19.23)
18:22:04 <hseg> why on earth does 'stack path' require 'stack setup'?
18:22:11 × pera quits (~pera@unaffiliated/pera) (Quit: leaving)
18:22:32 <hseg> all i want is to know where to drop the tarball stack is taking ages to download
18:22:57 <shapr> hseg: Are you the person who makes math art?
18:22:58 × Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer)
18:23:01 <geekosaur> so BS.unpack it (probably using .Char8, which is safe in this direction if less than ideal depending on the encoding embedded in the ByteString)
18:23:28 <hseg> what math art? you mean byorgey's blog?
18:23:42 × jluttine quits (~jluttine@85-23-95-149.bb.dnainternet.fi) (Ping timeout: 246 seconds)
18:23:42 <shapr> ah, never mind
18:23:44 Foritus joins (~buggery@cpc91316-watf11-2-0-cust68.15-2.cable.virginm.net)
18:23:52 Tario joins (~Tario@201.192.165.173)
18:24:24 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 246 seconds)
18:24:32 <hseg> am doing some computer algebra in haskell, though
18:24:54 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
18:25:00 <geekosaur> show is an easy way to make something a String, at a price since it does things like turning anything that's not in the ord range 32-126 to an escape. You have to decide what you want done with anything not in that range if you want to do it without show
18:25:17 × dnlkrgr quits (~dnlkrgr@HSI-KBW-046-005-005-235.hsi8.kabel-badenwuerttemberg.de) (Read error: Connection reset by peer)
18:25:21 <geekosaur> this may include decoding UTF8 or a locale encoding
18:25:32 pmikkelsen joins (~pmikkelse@vps1.pmikkelsen.com)
18:25:46 <sshine> kuribas, good point (about conciseness.)
18:25:49 <geekosaur> (no, strings are not a simple no-thought topic. anywhere, although most programming languages pretend they are)
18:25:59 lukaswilkeer joins (b3438885@179-67-136-133.user3p.veloxzone.com.br)
18:26:47 <sshine> geekosaur, I think Java did an efficient job at hiding that.
18:26:47 <kuribas> and many language conflate binary blobs with strings.
18:27:17 <sshine> geekosaur, at least wrt. StringBuilder/StringBuffer
18:28:25 × ixaxaar quits (~ixaxaar@49.207.210.215) (Ping timeout: 240 seconds)
18:29:21 son0p joins (~son0p@181.136.122.143)
18:30:14 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
18:31:11 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection)
18:31:35 kciN joins (~zaba@212.58.119.153)
18:33:09 <kciN> Hey, guys! I've got `OpenGL` and `GLUT` up to date, but keep getting `user error (unknown GLUT entry glutInit)` when I try to run my app.
18:33:15 <shapr> After further digging, looks like Wreq handles cookies transparently by never worrying about expiration.
18:33:40 <monochrom> On the flip side, I had Java students who had trouble realizing that they're mistakenly outputting control characters because Java's String.toString() does not escape.
18:33:57 <geekosaur> kciN, are you on Windows? you may have to install OpenGL support
18:34:03 <monochrom> I had to go to the trouble of suggesting them to use a hexeditor.
18:34:04 <kciN> Linux
18:34:05 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
18:34:12 <texasmynsted> Data.ByteString.Lazy.Internal.unpackChars did what I wanted
18:34:46 <geekosaur> hm. may still need to install it but it's more likely to be automatically installed on most distros
18:34:57 <merijn> texasmynsted: Almost 100% certainly it didn't
18:35:17 <merijn> texasmynsted: It merely *appears* to do what you want
18:35:23 <texasmynsted> well
18:35:29 <monochrom> Hell, I had to use a hexeditor to see why their output mismatched with expected output.
18:36:06 <monochrom> This would not have happened with Haskell's show
18:36:24 <merijn> monochrom: It's 2021 and I'm still linking to JoelOnSoftware's 2 decade old article about "the bare minimum everyone should know about unicode" :\
18:36:33 <kciN> fixed
18:36:48 <kciN> (by installing `libfreeglut` on voidlinux)
18:36:55 <texasmynsted> what I want is to take the lazy ByteString that is read in from the stdout stream of a process and temporarily write it to the console.
18:37:05 <merijn> texasmynsted: That function is a one way trip to "corrupted garbage data town" >.>
18:37:20 × ClaudiusMaximus quits (~claude@unaffiliated/claudiusmaximus) (Quit: ->)
18:37:26 <texasmynsted> merijn: What _should_ I do?
18:37:29 <merijn> texasmynsted: You can do that without corrupting it/going through String, though?
18:37:37 kciN parts (~zaba@212.58.119.153) ()
18:37:43 <merijn> texasmynsted: Well, what do you mean by "console"? stdout/stderr?
18:38:24 <texasmynsted> I do not care about String. I care about the stdout stream. It seems to be using \n as newlines in the lazy bytestring
18:38:42 <maerwald> use unix package and write to stdout
18:39:06 <monochrom> I have trouble believing that you can read stdout.
18:39:16 <texasmynsted> stdout for _my_ app, rather than the process that ran where the lazy bytestring was captured
18:39:20 <merijn> texasmynsted: https://hackage.haskell.org/package/bytestring-0.11.0.0/docs/Data-ByteString-Lazy.html#v:putStr for example
18:39:41 <geekosaur> monochrom, you can if it's a terminal
18:40:22 <merijn> monochrom: He said "from a process" reading the stdout of a process is pretty reasonable
18:40:28 <texasmynsted> https://hackage.haskell.org/package/typed-process-0.2.6.0/docs/System-Process-Typed.html#t:ProcessConfig
18:40:30 <geekosaur> the terminal (either a terminal emulator or getty) opens one fd on 0 and dup()s it onto 1 and 2
18:40:42 × lukaswilkeer quits (b3438885@179-67-136-133.user3p.veloxzone.com.br) (Ping timeout: 240 seconds)
18:40:43 <merijn> texasmynsted: FYI you can also simply forward stdout of the child to stdout of the parent directly
18:40:46 × mmohammadi9812 quits (~mmohammad@198.12.95.182) (Read error: Connection reset by peer)
18:40:54 <maerwald> yay, unix pipes
18:40:57 mmohammadi9812 joins (~mmohammad@2.178.213.79)
18:41:08 × urdh quits (~urdh@unaffiliated/urdh) (Quit: Boom!)
18:41:20 <geekosaur> that one doesn;t even need pipes, just default fd inheritance
18:41:22 <maerwald> merijn is gonna get high blood pressure
18:41:26 <texasmynsted> merijn: That sounds better
18:41:47 <merijn> texasmynsted: Incidentally I (personally) find typed-process rather complex
18:41:52 <merijn> Needlessly so, that is
18:42:02 neiluj joins (~jco@91-167-203-101.subs.proxad.net)
18:42:02 × neiluj quits (~jco@91-167-203-101.subs.proxad.net) (Changing host)
18:42:02 neiluj joins (~jco@unaffiliated/neiluj)
18:42:29 <merijn> texasmynsted: In fact, looks like that's the default
18:42:46 <merijn> texasmynsted: https://hackage.haskell.org/package/typed-process-0.2.6.0/docs/System-Process-Typed.html#v:inherit that's the default for stdout according to the docs
18:43:25 catt joins (~r@31.124.181.226)
18:45:10 frozenErebus joins (~frozenEre@37.231.239.43)
18:45:17 <texasmynsted> okay. Let me see.
18:48:47 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
18:49:15 juuandyy joins (~juuandyy@90.106.228.121)
18:50:48 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
18:51:09 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
18:51:44 × jiribenes quits (~jiribenes@rosa.jiribenes.com) (Read error: Connection reset by peer)
18:52:21 jonatanb joins (~jonatanb@83.24.13.14.ipv4.supernova.orange.pl)
18:52:30 jiribenes joins (~jiribenes@rosa.jiribenes.com)
18:52:31 × jonatanb quits (~jonatanb@83.24.13.14.ipv4.supernova.orange.pl) (Remote host closed the connection)
18:53:30 × alx741 quits (~alx741@181.196.69.29) (Ping timeout: 258 seconds)
18:55:09 raehik1 joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
18:55:45 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 240 seconds)
18:56:36 × ph88_ quits (~ph88@ip5f5af71a.dynamic.kabel-deutschland.de) (Ping timeout: 240 seconds)
18:57:29 × raehik1 quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Client Quit)
18:59:04 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
19:00:38 × Tops2 quits (~Tobias@dyndsl-095-033-093-253.ewe-ip-backbone.de) (Read error: Connection reset by peer)
19:01:23 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection)
19:01:49 × asheshambasta quits (~user@ptr-e1lysavd5pllo57cw5p.18120a2.ip6.access.telenet.be) (Ping timeout: 272 seconds)
19:02:40 × jb55 quits (~jb55@gateway/tor-sasl/jb55) (Remote host closed the connection)
19:02:50 × jpds quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
19:03:02 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
19:03:05 jb55 joins (~jb55@gateway/tor-sasl/jb55)
19:03:20 jpds joins (~jpds@gateway/tor-sasl/jpds)
19:03:22 berberman_ joins (~berberman@unaffiliated/berberman)
19:03:51 × berberman quits (~berberman@unaffiliated/berberman) (Ping timeout: 258 seconds)
19:04:42 shush joins (~pawn@2603-8000-3703-51f4-217f-fa24-0553-46d3.res6.spectrum.com)
19:05:03 mputz joins (~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de)
19:05:45 <shush> I'm wanting to give haskell a go, but I'm not sure what to build. Any good programs/prompts to follow to really get down the type system and the cool FP things like monads and some other category theory things?
19:06:56 alx741 joins (~alx741@186.178.110.33)
19:07:16 jluttine joins (~jluttine@85-23-95-149.bb.dnainternet.fi)
19:07:53 <Logio> shush: if you haven't done a simple "ask a number, print the number"-program yet, start with that. There's enough monads and type theory there to get started
19:10:51 <[exa]> shush: also depends on how much functional programming you already tried&survived, for the beginning I'd recommend some simple text processing, or perhaps small games
19:11:04 <glguy> shush: if you just want a bunch of things to implement you could do some of the Advent of Code tasks. Many other people have done them so after you implement one, or if you get stuck, you can look up what others did and compare
19:11:33 <shush> I'm a JS and TS script kiddie
19:11:41 d3od joins (~nickmeno3@78-0-108-194.adsl.net.t-com.hr)
19:11:56 <shush> So, I've dealt with the more bastardized versions of FP concepts I guess you could say
19:11:57 <[exa]> shush: re games, there's Graphics.Gloss which is just unbelievably good for starting up -- you get a 2D canvas and just supply a function that generates description of what to draw, and you have it drawn. Great for experiments
19:12:11 <swarmcollective> I agree with glguy, Advent of Code in Haskell is good fun.
19:12:39 <shush> What is the community's preferred package manager for haskell?
19:12:45 <[exa]> shush: cabal
19:13:08 <aveltras> shush: you could also try https://github.com/kowainik/learn4haskell, haven't used it personally but i think it had good reviews
19:13:23 <[exa]> there's also stack but that's a multipurposed compatibility&reproducibility layer above cabal, for starting up it just adds complexity
19:13:51 <ski> shush : you're also welcome to ask beginner questions in here
19:14:16 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 256 seconds)
19:14:46 <shush> What are some notable, cool things built in haskell?
19:15:04 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
19:15:07 × ChaiTRex quits (~ChaiTRex@gateway/tor-sasl/chaitrex) (Remote host closed the connection)
19:15:09 <merijn> shush: pandoc and https://www.shellcheck.net/
19:15:17 × kuribas quits (~user@ptr-25vy0i8e6su9fkcjvkw.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 26.3))
19:15:28 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
19:15:32 <glguy> shush: I'm chatting with you from something built in Haskell
19:15:37 ChaiTRex joins (~ChaiTRex@gateway/tor-sasl/chaitrex)
19:15:41 <ski> shush : btw, note that one doesn't really have to learn much CT, if any, to learn how to use the applications in Haskell. but if you happen to be mathematically interested, there are some cool things (which may or may not be that useful practically, atm at least)
19:15:41 <merijn> As for Haskell and package managers: https://gist.github.com/merijn/8152d561fb8b011f9313c48d876ceb07
19:15:59 <swarmcollective> shush lambdabot https://github.com/lambdabot/lambdabot
19:16:02 <swarmcollective> :t zip
19:16:03 <lambdabot> [a] -> [b] -> [(a, b)]
19:16:24 <ski> @version
19:16:24 <lambdabot> lambdabot 5.3.0.1
19:16:24 <lambdabot> git clone https://github.com/lambdabot/lambdabot
19:16:29 × mputz quits (~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de) (Ping timeout: 256 seconds)
19:16:36 <merijn> I would go further and say that "learning category theory" and "learning/becoming better at Haskell programming" are pretty much entirely unrelated goals
19:17:09 <merijn> And if learning Haskell programming is the real goal, category theory is mostly a waste of time
19:17:56 <aveltras> i'd say the more practice you get, the better
19:18:00 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
19:18:02 × geekosaur quits (82650c7c@130.101.12.124) (Ping timeout: 240 seconds)
19:18:15 o1lo01ol1o joins (~o1lo01ol1@bl11-140-216.dsl.telepac.pt)
19:18:29 <ski> some CT *might* be useful to know, to design certain types of advanced abstractions or efficiency improvements .. but that's for people who already know all the basics, and one can use Haskell well, and be a power user in it, without having to do anything of the sort
19:18:30 <aveltras> don't waste to much time on theory early on
19:19:12 <swarmcollective> There's a twitch streamer building the game "Dominion" in Haskell.
19:19:31 <merijn> ski: By the time CT might help your Haskell, you would know enough Haskell that you're not asking others how to learn more Haskell ;)
19:19:42 <ski> some people learn better, by being motivated by concrete practical uses, applications. some people want to get a clearer overview of the theory and possibilities first. you should try to go for what makes you tick
19:19:52 <ski> merijn : yes
19:20:20 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 258 seconds)
19:20:36 <[exa]> shush: one fun thing with haskell is taking a program and finding patterns that can be expressed with high-level library functions, thus minimizing the program to a fraction of original code volume. For the "white what I read" program you can follow from sequential getline/putstring, then >>=, then `interact`, and probably further if 2-words program isn't short enough.
19:20:45 × o1lo01ol_ quits (~o1lo01ol1@bl7-89-228.dsl.telepac.pt) (Ping timeout: 240 seconds)
19:21:04 <merijn> aveltras: Lots of theory is useful to learn as a beginner, CT just isn't part of that ;)
19:21:07 urodna_ joins (~urodna@unaffiliated/urodna)
19:21:12 <maerwald> [exa]: you mean golfing
19:21:29 <aveltras> the problem with haskell and theory is that it is a bottomless well
19:21:39 <shush> main = doEverything input
19:21:44 <shush> That'd be the ideal program
19:21:51 <shush> jk
19:21:55 <aveltras> whenever you try to learn something you always learn about something else connected and you can go on endlessly
19:21:59 <[exa]> maerwald: not necessarily golfing, it's more about finding the patterns to memoize them
19:22:39 <shush> I think really I want to be proficient to be able to write in haskell, but then I'd like to understand the higher level concepts to be able to get creative
19:23:01 <[exa]> such as "oh look this is a traversal"
19:23:28 × urodna quits (~urodna@unaffiliated/urodna) (Ping timeout: 272 seconds)
19:23:54 <[exa]> shush: you will learn lot of highlevel patterns just by coding and refactoring sometimes, don't worry
19:23:55 cole-h joins (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net)
19:24:13 <merijn> shush: Even basic Haskell includes plenty of higher level concepts to keep you busy :p
19:24:22 <shush> noice
19:24:34 <aveltras> love to discover new things via hlint suggestions
19:25:00 <[exa]> yeah, making `hlint` shut up is super educative. :D
19:25:17 <glguy> you have to look up the pragma to turn off the suggestion, paste it in each file, etc
19:25:19 × cr3 quits (~cr3@192-222-143-195.qc.cable.ebox.net) (Ping timeout: 258 seconds)
19:25:20 <ski> a lot of learning is often to memorize various small nifty tricks and patterns
19:26:12 <[exa]> shush: btw does TS have monads?
19:26:21 <shush> Uh
19:26:25 × deviantfero quits (~deviantfe@190.150.27.58) (Ping timeout: 240 seconds)
19:26:45 <ski> shush : often, one will not immediately see the point of, or use of, various abstraction. or may think that it's not that important. but when one's learned the idea, one may (or may not) find that one spots opportunities for it more often than one would've thought
19:26:59 cr3 joins (~cr3@192-222-143-195.qc.cable.ebox.net)
19:27:01 <shush> You can implement monads in JS, so I'd say yes, but I don't know if there is some formal definition that it misses
19:27:06 <ski> (this is related to "blub")
19:27:53 <ski> shush : lurking in this channel, sometimes trying to see what other people are talking about, and also trying to help others, can also be a good way to learn and reinforce, and to be exposed to new things
19:28:00 <shush> [exa]: like a monad in its type system?
19:28:31 urdh joins (~urdh@unaffiliated/urdh)
19:29:38 <shush> My understanding of monads are that they implement two operations: 1. the ability to map over the monad given a lambda which if a monad is returned from the lambda, is the new monad. 2. A way to fold, or get the final value
19:29:49 <shush> By of course, that may be an incorrect understanding
19:29:57 <[exa]> shush: not necessarily formal definition, the point is just getting the intuition for using them... For me the point where it "clicked" was parsing combinators (these are very cool and quite specific to haskell)
19:30:44 <ski> shush : oh, and btw, there is a #haskell-beginners channel. but this channel (#haskell) definitely also welcomes beginner questions and issues. the difference is more one of volume. in here, sometimes one's question may get lost in the noise, or the heat of another discussion. in there, sometimes there's not enough people around who have a clue of how to help. but in there, it can be easier to focus, because
19:30:49 <shush> Combinator is a monad that combines the thing? Like addition or string concatenation?
19:30:50 <ski> of less other conversation, while in here, it can sometimes be easier (take a shorter time) to get someone's attention
19:31:09 <monochrom> shush, neither sounds like "return", and both sound like ">>=", so I think you have a misunderstanding.
19:31:32 <shush> monochrom: fold is return, and map is >>=
19:31:42 <shush> At least that was what I was attempting to describe
19:31:58 <monochrom> Of all concrete examples of Monad and return I have seen, none feel like fold.
19:31:59 <ski> "combinator" is a word that is sometimes used to describe library operations that provide "building blocks" for an (Embedded) Domain Specific Language, of some sort
19:32:00 <shush> Is there a haskell online playground?
19:32:11 <[exa]> shush: combinator is a fancy name for a function with nicely closed scope, worry not about the precise definitions now
19:32:36 × jluttine quits (~jluttine@85-23-95-149.bb.dnainternet.fi) (Ping timeout: 258 seconds)
19:33:19 <ski> shush : "the ability to map over the monad" -- monads are not things you pass to functions (nor return from them). `getLine', of type `IO String', is not a monad (it's an action, a monadic action, an `IO'-action). `IO' itself (together with its `Monad IO' instance, implementing `return' and `(>>=)' for it), is the monad
19:33:45 <texasmynsted> okay thank you merijn. I was trying to do things the wrong way.
19:33:58 × juuandyy quits (~juuandyy@90.106.228.121) (Quit: Konversation terminated!)
19:34:20 <texasmynsted> It is far better and less complicated to simply use the parent stream
19:34:22 <shush> return will give the internal value of the monad?
19:34:23 <monochrom> But at the end of the day, all wordings are useless unless you write correct code and you can predict the outcome of someone else's code.
19:34:23 hexfive joins (~hexfive@50.35.83.177)
19:34:26 <[exa]> shush: the point is that in haskell, monads are used to write imperative-like code; you can view them (in a very limited view!) as overloaded semicolons and assignment. So for example, monads can do sequential IO (the semicolon makes sure that actions are executed in order), or parsing (the semicolons make sure that parsing context gets carried around correctly) or exceptions (the semicolon doesn't execute
19:34:26 <shush> I think of monads as boxes
19:34:32 <[exa]> the rest of the program if there was an error), etc.
19:35:38 <ski> in the case of parsing, you have parsing combinators that help build up larger parsers from smaller ones (as opposed to defining larger parsing *functions*, by calling smaller ones). only "at the end" do you actually run the parser with some input. the building process happens before that
19:35:38 <glguy> shush: you'll do better to use monads for a while to develop an understanding than to guess
19:35:53 <shush> glguy: Yeah, I'll need to grok at it more
19:36:21 <tdammers> honestly, I think the box analogy does more harm than good, at least until you have developed an intuition for the "monad" abstraction
19:36:26 <monochrom> Yeah I don't understand spending a month crafting a wording before any example, or even a million examples.
19:36:35 <monochrom> I don't see people learning chess like that.
19:36:40 <ski> shush : `return' is a function that, given any value, will give you back a monadic *action*, which, when later (if ever) executed, will perform no "effect", and just yield the passed value back as result
19:37:02 <shush> But in my JS/TS experience, a Promise is a monad. The justification here is that I can do .then(f) as the next imperative execution on that monad.
19:37:08 deviantfero joins (~deviantfe@190.150.27.58)
19:37:15 <ski> shush : it expresses a "nop", a "do nothing" operation (apart from specifying what the result value should be)
19:37:20 <monochrom> I don't see people discussing "the knight is about ..." or "the knight means ..." before they have even played a hundred games.
19:37:46 <monochrom> Imagine stepping into a chess club and seeing everyone talking not playing.
19:37:49 <shush> ski: Is return like a way of defining the case for a monad?
19:37:59 <shush> or the return for a particular case?
19:38:28 <monochrom> And even better, congratulating each other for "nailing how to do an elevator pitch for the rook".
19:38:54 <ski> shush : `return' is used when you have branching, and in some branch you want to do nothing at all. it's also used to explicitly set the result value of executing the action, in case the otherwise last action (in your sequence of action) doesn't provide the result value that you wanted
19:39:05 thongpv87 joins (~thongpv87@103.6.151.121)
19:39:29 <tdammers> I think it's best to think of `return` simply as a function for lifting values to monadic actions
19:39:40 <ephemient> shush: .then(_ => 1) and .then(_ => Promise.resolve(1)) have the same behavior, which is not really monadic... but JS isn't typed so ¯\_(ツ)_/¯
19:40:04 <[exa]> shush: promises carry some very relevant intuition, yes. `then` has the same "parameter types" as >>=. Highly suggest you go try some simple programs (writing a few numbers etc) and try to see the type of everything with :t in ghci.
19:40:05 <shush> ephemient: I thought was the reason why it was monadic
19:40:06 <shush> haha
19:40:15 <tdammers> I also think that trying to form an intuition for monads is *much* harder without the help of a type system like Haskell's
19:40:18 × deviantfero quits (~deviantfe@190.150.27.58) (Read error: Connection reset by peer)
19:40:30 <ephemient> `>>= 1` and `>>= return 1` aren't the same thing
19:40:43 <ski> shush : it appears to be the case, that for most people, the way to learn monads is not to learn the abstract idea first, but to learn many concrete monads (`Maybe',`Either e',`[]',`Reader r',`Writer w',`State s',`Cont o',`IO',`Parser',...), and only *then* start to realize what all these *wildly* differing things have in common
19:40:44 <shush> Gotta get my hands dirty before I can fully get it then
19:41:05 <tdammers> http://dev.stephendiehl.com/hask/#eightfold-path-to-monad-satori <- relevant
19:41:09 <shush> ski: Spot the pattern ;)
19:41:20 <monochrom> Anyway, you can enter and run some Haskell code at http://codepad.org/
19:42:23 <monochrom> IMO more people should learn chess, and learn things more like learning chess.
19:42:30 <[exa]> shush: anyway, don't hesitate to pastebin your code and post it here (or in #haskell-beginners) for suggestions, people here love nitpicking others' code. :]
19:42:33 <ski> shush : but to give a very brief (and incomplete) overview/analogy. "monad" is an abstract interface, comparable to "priority queue". just like you can have many differing implementations of a priority queue, you can also have many differing implementations of the monad interface
19:42:48 <shush> (\ x -> y) is a lambda in haskell?
19:42:51 <swarmcollective> let x = Just 1
19:42:54 <swarmcollective> :t x
19:42:55 <lambdabot> Expr
19:42:56 × kritzefitz quits (~kritzefit@212.86.56.80) (Remote host closed the connection)
19:43:34 <monochrom> You learn chess you learn that you don't start with a white-paper drivel that a management type or marketing type understands.
19:43:53 <ski> shush : *however*, while for priority queues, most of the useful functionality is in the interface, and only very little is in the specific implementation (perhaps you set an initial capacity for an array-backed PQ), for *monads* otoh, *most* of the useful functionality is *specific* to the monad in question you're using, and only very little is in the "monad" interface
19:44:01 <monochrom> You start with the "dry" "meaningless" rules. Then you play. And fail. Repeat 100 times.
19:44:14 <monochrom> Only then, you are ready to discuss meanings and strategies.
19:44:18 <ephemient> \ is how Haskell spells λ in ASCII
19:44:32 <swarmcollective> >show x
19:44:45 <swarmcollective> (lambdabot says "Nope.")
19:44:47 <[exa]> shush: it's a function, lambda is the \ sign.
19:45:09 <ephemient> hmm it seems that λ isn't recognized even in -XUnicodeSyntax mode though
19:45:27 <ephemient> I guess it's difficult since it parses as a letter rather than a symbol
19:46:11 jluttine joins (~jluttine@85-23-95-149.bb.dnainternet.fi)
19:46:24 <ski> shush : oh right .. most "monad tutorials" don't really help much, often arguably even hinders understanding
19:47:10 <ski> swarmcollective : you need to use `@let'
19:47:27 <ski> (also, it will be ambiguous with an existing binding for `x')
19:47:33 <ski> @type let x = Just 1 in x
19:47:34 <lambdabot> Num a => Maybe a
19:47:38 worc3131 joins (~quassel@2a02:c7f:dcc4:6500:217b:6c7a:eac3:3be9)
19:48:01 <swarmcollective> ski, thank you!
19:48:21 <ski> monochrom : i wonder whether the management type or marketing type really understands it ..
19:48:22 <monochrom> But monad is much much broader than priority queue.
19:48:42 <ski> ephemient : yes
19:48:42 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 258 seconds)
19:48:43 <monochrom> monad and container are more or less equally broad.
19:49:00 <ski> yep
19:49:00 <monochrom> Fortunately, monad has a rigorous definition, container doesn't.
19:49:24 ski . o O ( representable functor )
19:50:51 deviantfero joins (~deviantfe@190.150.27.58)
19:51:01 <monochrom> I'm sure if your white paper says "one thing monads can do very well is expressing proprietory business logic" they will understand perfectly.
19:51:12 <maerwald> lol
19:51:30 <dolio> That might even be true.
19:51:43 <monochrom> Inspired by just last night average's drivel included "I found this in huffington post, haskell is ideally suited for proprietory business logic..."
19:51:45 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
19:51:46 × knupfer quits (~Thunderbi@200116b82c27b900392e02b43800d436.dip.versatel-1u1.de) (Ping timeout: 258 seconds)
19:52:09 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
19:52:14 <monochrom> So yeah basically I have nailed writing the perfect white paper. Just bring up "proprietory business logic".
19:52:24 <maerwald> monads are like relationships: you join, but you can't get out of it
19:52:51 <monochrom> That sounds like fairly specifically relationships with spies and/or gangs, but yeah.
19:53:05 <maerwald> Yeah, grew up in the hood...
19:53:11 <swarmcollective> maerwald The "Hotel California" of programming.
19:53:17 <ski> swarmcollective : note that numeric literals are overloaded. hence the `Num a =>'
19:53:54 <ski> well, i'm not so sure what "expressing proprietory business logic" even means, more specifically
19:54:09 <swarmcollective> ski, thanks for that. I had skimmed over the `Num a =>` constraint.
19:54:24 <ski> swarmcollective : do you know how to read the type it gave ?
19:54:32 <swarmcollective> Yes.
19:55:09 <swarmcollective> ski, err, I *think* so. ;)
19:55:37 <monochrom> ski, that's the point I would think.
19:56:09 mouseghost joins (~draco@wikipedia/desperek)
19:56:15 <ski> well, `x :: Num a => Maybe a' means that for any type `a' (that the user/consumer/caller picks), `x' will have type `Maybe a', as long as `a' is an instance of the type class `Num' (iow, "is a numeric type")
19:56:38 <monochrom> The human mind wants to look for comfort words, and wants to avoid asking difficult semantic questions.
19:56:59 <ski> monochrom : well, the question is whether there's actually something for them to understand, in there, or if it's just a kind of bonding phrase or something
19:57:23 <monochrom> I think "bonding phrase" nails it.
19:57:33 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 264 seconds)
19:57:40 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 272 seconds)
19:57:45 × lawid quits (~quassel@dslb-090-186-199-238.090.186.pools.vodafone-ip.de) (Ping timeout: 240 seconds)
19:57:58 geekosaur joins (82650c7c@130.101.12.124)
19:58:10 <ski> (and not to derail bonding phrases and the like .. such things are important, in a community. but one'd hope there'd be more to most of the interactions, than such things)
19:58:22 × ixian quits (~mgold@2002:4a74:ba78:1701:0:ff:fe78:6269) (Ping timeout: 265 seconds)
19:58:33 × livvy quits (~livvy@gateway/tor-sasl/livvy) (Remote host closed the connection)
19:58:43 × mmohammadi9812 quits (~mmohammad@2.178.213.79) (Remote host closed the connection)
19:58:49 livvy joins (~livvy@gateway/tor-sasl/livvy)
19:58:52 lawid joins (~quassel@dslb-088-073-132-251.088.073.pools.vodafone-ip.de)
19:59:01 mmohammadi9812 joins (~mmohammad@2.178.213.79)
19:59:25 ski always found it confusing when people say "you're arguing semantics", as if that would be a rebuttal
19:59:30 × stef204 quits (~stef204@unaffiliated/stef-204/x-384198) (Quit: WeeChat 3.0)
19:59:37 <Rembane> What would you otherwise argue? Syntax?
19:59:56 <ski> presumably. or perhaps pragmatics .. or maybe something else, i dunno
20:00:10 <ski> but semantics seems to be quite important, in many areas
20:00:16 <maerwald> logic?
20:00:30 <ski> (i suppose e.g. aesthetics is another one that's important)
20:01:23 ixian joins (~mgold@2002:4a74:ba78:1701:0:ff:fe78:6269)
20:01:26 <ski> (e.g. "every structure ought to come with a notion of structure-preserving morphism" is an *aesthetic* dogma)
20:02:01 <maerwald> is it? It allows to make assumptions
20:02:17 <ski> is what what ?
20:02:38 × geyaeb quits (~geyaeb@gateway/tor-sasl/geyaeb) (Quit: ZNC 1.8.2 - https://znc.in)
20:02:54 <maerwald> an asthetic dogma
20:02:58 ph88_ joins (~ph88@2a02:8109:9e00:7e5c:ade8:bbad:5afb:2c7)
20:03:00 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection)
20:03:00 geyaeb joins (~geyaeb@gateway/tor-sasl/geyaeb)
20:03:32 <monochrom> That one I tend to go the opposite direction. I don't understand what "structure" refers to. Ah but if you tell me what your morphisms preserve, then "ah so that's your structure".
20:04:37 × finn_elija quits (~finn_elij@gateway/tor-sasl/finnelija/x-67402716) (Remote host closed the connection)
20:05:10 finn_elija joins (~finn_elij@gateway/tor-sasl/finnelija/x-67402716)
20:06:30 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
20:07:03 × worc3131 quits (~quassel@2a02:c7f:dcc4:6500:217b:6c7a:eac3:3be9) (Ping timeout: 272 seconds)
20:07:50 × cods quits (~fred@82-65-232-44.subs.proxad.net) (Ping timeout: 264 seconds)
20:08:13 mputz joins (~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de)
20:08:14 cods joins (~fred@82-65-232-44.subs.proxad.net)
20:09:02 × ph88_ quits (~ph88@2a02:8109:9e00:7e5c:ade8:bbad:5afb:2c7) (Ping timeout: 260 seconds)
20:09:21 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
20:09:22 <ski> maerwald : i'm not sure how you're connecting "allows to make assumptions" with it (what do you even mean by that phrase ?)
20:10:16 <ski> monochrom : i commonly use that route for "container","effect","execute"
20:10:19 <maerwald> "every X has to come with Y" allows to make assumptions in a system, where you have X
20:10:45 <ski> iow, if it's a monad, then, by definition, it expresses a notion of effect, comes with a notion of execution
20:11:13 <ski> if it's a (covariant) functor, it corresponds to a notion of "container"
20:11:47 <ski> (perhaps one should make some assumptions about relevant categories being "concrete" .. but i'm not sure whether that's always warranted)
20:12:23 <ski> maerwald : in this case, it's an "ought", not necessarily a "will"
20:13:19 <maerwald> ok, I hate english too
20:13:29 <ski> :)
20:15:19 <dolio> Are morphisms the right thing, though?
20:15:43 <ski> any other candidates or generalizations in mind ?
20:15:50 <dolio> Relations.
20:15:52 <maerwald> transformers, lol
20:16:11 <monochrom> Allegories have relations as morphisms. >:)
20:16:18 × frozenErebus quits (~frozenEre@37.231.239.43) (Ping timeout: 258 seconds)
20:16:24 <ski> yea, was just about to mention allegories
20:16:32 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
20:16:34 <dolio> Category theorists use morphisms to determine structure, as monochrom said. However, that ends up classifying some things unnaturally in some ways.
20:17:45 <ski> "Algebra of Programming" uses relations as specifications of problems, and then particular implementations are functional relations that're derived from them
20:18:02 <dolio> For instance, the inverse operation on a group is classified as a property, not structure, on a monoid by category theorists.
20:18:35 <dolio> But if you use structure preserving relations, it is structure.
20:18:38 <ski> i've seen both
20:19:21 <ski> can you elaborate on the "But" part ?
20:19:57 × average quits (uid473595@gateway/web/irccloud.com/x-rcklrhokomuilocj) (Quit: Connection closed for inactivity)
20:22:27 <dolio> Monoid morphisms always are always group morphisms provided the monoids happen to be groups. So that gets classified as a property by the sysematic category theory study of this sort of thing. However, monoid congruences need not respect inverses for monoids that happen to be groups.
20:24:40 <dolio> You can go in the other direction, too, to homotopy type theory, and consider equivalences. Then being a monoid is a property of a semigroup, because equivalences of semigroups necessarily respect units. However, morphisms of semigroups need not take units to units for semigroups that are monoids, so it gets classified as structure that way.
20:25:10 × hiroaki quits (~hiroaki@ip4d167562.dynamic.kabel-deutschland.de) (Remote host closed the connection)
20:25:26 Sheilong joins (uid293653@gateway/web/irccloud.com/x-duetsgbgiyfgeatn)
20:26:27 hiroaki joins (~hiroaki@ip4d167562.dynamic.kabel-deutschland.de)
20:26:37 <ski> a monoid congruence ⌜R : M → Ω ← N⌝ is a binary relation between two monoids ⌜M⌝ and ⌜N⌝ such that ⌜1 R 1⌝ and, if ⌜m₀ R n₀⌝ and ⌜m₁ R n₁⌝, then ⌜m₀⋅m₁ R n₀⋅n₁⌝ ?
20:27:01 <dolio> Yes.
20:28:23 <ski> "consider equivalences" as the morphisms in question ?
20:28:54 × son0p quits (~son0p@181.136.122.143) (Quit: Lost terminal)
20:29:22 sh9 joins (~sh9@softbank060116136158.bbtec.net)
20:30:05 Guest88 joins (~textual@2607:fea8:1300:266:dd64:bfef:2d87:cdc4)
20:30:43 × Guest88 quits (~textual@2607:fea8:1300:266:dd64:bfef:2d87:cdc4) (Client Quit)
20:32:16 <dolio> You can probably look at it that way. But equivalences are the analogues of morphisms for groupoids, and you might want to consider groupoids to be more fundamental than categories.
20:33:28 <dolio> Because, like, type theory naturally gives rise to that sort of notion for every type.
20:34:45 × shiraeeshi quits (~shiraeesh@109.166.56.5) (Ping timeout: 240 seconds)
20:36:19 <hseg> ok, so type formation/elimination rules give rise to a notion of congruence, which are weaker than what we'd call morphism laws?
20:37:08 <hseg> which means that the property/structure classification becomes more systematic?
20:38:02 × dhouthoo quits (~dhouthoo@ptr-eitgbj2w0uu6delkbrh.18120a2.ip6.access.telenet.be) (Quit: WeeChat 3.0)
20:41:01 <swarmcollective> Do discussions about Monads always become discussions around Category Theory? :) (Where's the "my head is spinning emoji?)
20:41:31 <monochrom> Yes.
20:41:36 <geekosaur> only in #haskell
20:41:53 <hseg> dolio: would appreciate pointers in this regard
20:42:08 rmk236 joins (~lcampos@2a02:908:3616:b100:9d94:72c:d22d:2612)
20:42:12 <monochrom> This is a good thing. The theory of reinforcement learning says that this teaches you to not discuss monads in the first place.
20:42:27 × jess quits (jess@freenode/staff/jess) (Quit: Leaving)
20:42:27 <swarmcollective> geekosaur, I thought that was #haskell-in-depth
20:42:47 <monochrom> There is really nothing to discuss. Use monads. Get things done. Don't talk.
20:43:02 <geekosaur> #haskell-in-depth was one of several failed attempts to get the whole mess out of #haskell
20:44:31 <swarmcollective> In my personal experience, "doing" is helping more than "asking / discussing", but it was hard to find a project to dig into.
20:44:56 <swarmcollective> At the same time, I appreciate those who have been patient enough to explain to me.
20:45:06 jess| joins (jess@freenode/staff/jess)
20:45:12 <monochrom> No. Exercises. Typoclasspedia and data61 have exercises.
20:45:35 <dolio> hseg: All the classifications are systematic. But relations/congruence classifies the most stuff as "structure" instead of "properties" and equivalences classify the most stuff as "properties". Morphisms is intermediate between the two.
20:45:55 <monochrom> And at the scale of data61 (spamming you with exercises), it begins to feel like a neverending project anyway.
20:46:06 <monochrom> or a death march project, who knows.
20:47:06 jess| is now known as jess
20:47:29 <dolio> Probably no one can tell you any good reason for one being chosen as the 'right' choice.
20:48:17 <dolio> The congruence stuff is discussed in this paper: https://www.cs.bham.ac.uk/~udr/papers/logical-relations-and-parametricity.pdf
20:49:49 × kupi quits (uid212005@gateway/web/irccloud.com/x-qetuytxtunbuqszx) (Quit: Connection closed for inactivity)
20:50:24 <dolio> And there is some sense in which congruences characterize something about the algebraic structures that morphism fail to characterize.
20:54:18 <hseg> ok, thanks
20:54:19 × fendor quits (~fendor@91.141.2.117.wireless.dyn.drei.com) (Remote host closed the connection)
20:54:43 <dolio> "Isomorphism" in that paper is what I've been calling equivalence.
20:55:26 <ski> dolio : ".. naturally gives rise to that sort of notion for every type" -- are you thinking of things like ⌜∀ X. X → X⌝ ?
20:56:23 <ski> swarmcollective : we like talking about both more beginner and more advanced stuff, and both more practical-oriented and theoretical stuff
20:56:45 × honigkuchen quits (~honigkuch@ip5b429953.dynamic.kabel-deutschland.de) (Remote host closed the connection)
20:56:55 <ski> (different people may have differing inclinations, obviously. i was talking about the general picture)
20:57:25 <dolio> I mean that the identity type in Martin-löf type theory is the type of equivalences. Every type has an identity type, and MLTT is pretty easy to get a handle on. The type theories where every type is a category are super complicated.
20:58:11 <ski> monochrom : "Shut up and code !" ? :P
20:58:34 <monochrom> Sometimes, shut up and calculate.
20:58:46 ski . o O ( "Calculemus !" )
20:58:49 <monochrom> My definition of "understand" is "have predictive power".
20:58:59 <dolio> And lots of types will just have 'categorical' structure that is just forgetting that the groupoid structure is symmetric.
20:59:51 <monochrom> "monad is about computation" doesn't help you predict much. However, a simple law like ">>= is associative" can get you very far.
21:00:00 × p-core quits (~Thunderbi@2001:718:1e03:5128:3697:eeda:19aa:8e56) (Ping timeout: 258 seconds)
21:00:11 <ski> dolio : ooh, Uday Reddy
21:00:12 × _ht quits (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection)
21:00:18 <ski> ty
21:01:19 × swarmcollective quits (~joseph@cpe-65-31-18-174.insight.res.rr.com) (Ping timeout: 256 seconds)
21:01:24 <ski> monochrom : not about "cavalier power", as well ?
21:03:17 <monochrom> Oh, there is no cavalier power on either side in the context of comparing a blog post with a monad law in terms of how much they help understanding.
21:03:55 <monochrom> Instead, in this context, predictive power is opposed to feeling good about yourself.
21:03:58 p-core joins (~Thunderbi@2001:718:1e03:5128:3697:eeda:19aa:8e56)
21:04:33 × nfip^ quits (nfip@ip98-184-89-2.mc.at.cox.net) ()
21:04:37 usr25 joins (~J@145.red-83-58-207.dynamicip.rima-tde.net)
21:04:47 <monochrom> Right? When a management type sees "this thing helps with business logic" they understand nothing, they have actually learned nothing, they just feel better.
21:06:08 fendor joins (~fendor@91.141.2.117.wireless.dyn.drei.com)
21:07:31 × conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
21:08:24 × hiroaki quits (~hiroaki@ip4d167562.dynamic.kabel-deutschland.de) (Remote host closed the connection)
21:08:33 Younder joins (~john@33.51-174-155.customer.lyse.net)
21:08:49 × p-core quits (~Thunderbi@2001:718:1e03:5128:3697:eeda:19aa:8e56) (Ping timeout: 258 seconds)
21:10:10 ADG1089__ joins (~aditya@223.236.190.35)
21:13:53 hiroaki joins (~hiroaki@ip4d167562.dynamic.kabel-deutschland.de)
21:14:44 conal joins (~conal@64.71.133.70)
21:18:15 <koz_> Is there something equivalent to 'SomeProxy'?
21:19:45 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 246 seconds)
21:21:02 knupfer joins (~Thunderbi@200116b82c27b9002d81d776aa1cc87b.dip.versatel-1u1.de)
21:23:45 fendor_ joins (~fendor@77.119.129.25.wireless.dyn.drei.com)
21:24:45 p-core joins (~Thunderbi@2001:718:1e03:5128:3697:eeda:19aa:8e56)
21:26:32 <ij> what document should I consult to learn about what is WHNF?
21:26:57 × fendor quits (~fendor@91.141.2.117.wireless.dyn.drei.com) (Ping timeout: 264 seconds)
21:27:17 × dxld quits (~dxld@rush.pub.dxld.at) (Quit: Bye)
21:28:16 <[exa]> ij: it shold have a "rigorous" definition somewhere... https://wiki.haskell.org/Weak_head_normal_form
21:28:17 × ADG1089__ quits (~aditya@223.236.190.35) (Remote host closed the connection)
21:29:18 <wz1000> koz_: Some Proxy? https://hackage.haskell.org/package/some-1.0.2/docs/Data-Some.html
21:29:21 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
21:29:49 tsrt^ joins (tsrt@ip98-184-89-2.mc.at.cox.net)
21:29:52 <koz_> wz1000: Yes, that will do very nicely.
21:30:27 <ij> what are examples of values that aren't in WHNF?
21:30:40 × xff0x_ quits (~xff0x@2001:1a81:536f:2100:2f3c:8f56:462:e9ab) (Ping timeout: 258 seconds)
21:30:55 <[exa]> ij: if you heard "redex" definition (an applied lambda, basically), expression in HNF is one with no redex in the topmost grammar production
21:31:08 <geekosaur> that's not how WHNF works
21:31:26 × deviantfero quits (~deviantfe@190.150.27.58) (Ping timeout: 258 seconds)
21:31:37 <geekosaur> WHNF is a state in the lazy evluation of some value, not an attribute which some values have
21:32:32 xff0x_ joins (xff0x@gateway/vpn/mullvad/xff0x)
21:32:45 <[exa]> geekosaur: hm, does the definition on haskell wiki make sense then?
21:32:57 <geekosaur> for example, if you have the list ['a'], successive evaluations to WHNF get you: (_:_), ('a':_), ('a':[]). the _ represents something which is not yet in WHNF and is therefore not yet known
21:33:36 <ij> geekosaur, what I meant by that "value" is the state in the evaluation
21:34:21 × soft-warm quits (4408f588@ip68-8-245-136.sd.sd.cox.net) (Quit: Connection closed)
21:35:11 <ij> ah, function applications aren't in whnf
21:36:12 <ij> what is wrong with calling it a value? should it be term?
21:37:03 × sord937 quits (~sord937@gateway/tor-sasl/sord937) (Quit: sord937)
21:37:19 <geekosaur> in my example they're all the same value. what differs is how far evaluation has proceeded
21:37:22 soft-warm joins (4408f588@ip68-8-245-136.sd.sd.cox.net)
21:37:46 <geekosaur> also arguably there's an initial state _ when nothing has been evaluated to WHNF yet
21:37:48 <ij> term then?
21:38:03 <ij> I read a book about progarmming languages, I know there must be a word for it
21:38:37 <[exa]> geekosaur: my understanding is that `undefined:undefined` is a WHNF, does that sound right?
21:39:01 <ij> I think so, because it's a data constructor (:) undefined undefined
21:39:10 <[exa]> ij: there's the "normal forms" in lambda calculus, and there's their use in haskell, which is slightly different
21:40:16 × xff0x_ quits (xff0x@gateway/vpn/mullvad/xff0x) (Ping timeout: 272 seconds)
21:40:26 <[exa]> in lambda calculus, the head normal form means that the topmost term structure is not in form of `(λx.A)B` (that's a redex)
21:40:47 <[exa]> "normal form" means there's no redexes at all in whole expression, getting normal forms is undecidable btw.
21:41:04 <ij> why not call it just application? :) but sure, if you say redex = application, no problem
21:41:16 <ij> http://lampwww.epfl.ch/teaching/archive/type_systems/2008/exercises/3-typed/ it's called an application here
21:41:23 <ij> but that is not too important
21:41:28 <geekosaur> [exa], the constructor (:) is in WHNF, the rest of the expression is not. I suppose in that sense we can speak of values
21:41:41 <[exa]> in haskell, the weak head normal form is useful because it describes the fact that something can be patternmatched "a bit"
21:41:45 xff0x_ joins (~xff0x@2001:1a81:536f:2100:2f3c:8f56:462:e9ab)
21:42:25 <dolio> Head normal form is a weird one that rarely corresponds to any actual evaluation strategy.
21:42:44 × sh9 quits (~sh9@softbank060116136158.bbtec.net) (Quit: WeeChat 2.8)
21:42:50 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
21:42:58 <merijn> [exa]: Not true that it's undecidable :p
21:42:59 <[exa]> ij: if you have `((\x.x) (\x.x)) A`, it's an application but not a redex.
21:43:06 <merijn> [exa]: It depends on the exact lambda calculus
21:43:20 <ij> [exa], ah
21:43:22 <[exa]> merijn: ah okay
21:43:34 <ij> https://wiki.haskell.org/Performance/Strictness
21:43:38 <merijn> [exa]: In the simply typed lambda calculus the algorithm for determining the existence is easy, for example
21:43:43 <ij> why is "lgo" strict in "z"?
21:43:50 <merijn> [exa]: Since the algorithm is "const True" ;)
21:43:51 <[exa]> I know, worry not. I didn't want to jump to types
21:44:01 <ij> with -O flag, that is
21:44:02 swarmcollective joins (~joseph@cpe-65-31-18-174.insight.res.rr.com)
21:44:11 <[exa]> ij: because it's fasterer
21:44:39 <ij> so being or not being strict is not set in stone/arbitrary
21:45:12 <[exa]> if something is strict, the compiler can on one side assume that the data is always there (not an exception/undefined/thunk/whatever), and on the other side it needs to produce the WHNF so that the thing is actually there
21:45:19 × cr3 quits (~cr3@192-222-143-195.qc.cable.ebox.net) (Quit: leaving)
21:45:37 <ij> alright, makes sense
21:46:07 <[exa]> making stuff strict is a vital means of optimization (each strictness annotation removes one "if" from the code), but if done wrong, it can make your program fail even if it normally wouldn't
21:46:19 <ij> really
21:46:49 <ij> how could it make it fail? wouldn't having a well-typed program prohibit that?
21:46:51 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
21:47:07 <[exa]> ij: consider `f = 1+f; g = const 1 f`
21:47:12 × ukari quits (~ukari@unaffiliated/ukari) (Remote host closed the connection)
21:47:25 <merijn> Even easier
21:47:29 <ij> ah, in light of recursion, sure
21:47:36 <merijn> Consider: "length (repeat 1)"
21:47:40 <merijn> > repeat 1
21:47:42 <lambdabot> [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1...
21:47:43 ukari joins (~ukari@unaffiliated/ukari)
21:47:49 <ij> > length $ repeat 1
21:47:58 <lambdabot> mueval.real: ExitFailure 1
21:48:00 <[exa]> oh noes
21:48:10 <ij> merijn, it wouldn't work anyway – what's the difference?
21:48:17 <merijn> ij: It loops infinitely
21:48:25 <ij> but it doesn't crash?
21:48:30 <geekosaur> head (repeat 1)
21:48:32 <merijn> ij: No
21:48:45 <[exa]> merijn: I wanted to have a working case for comparison :D
21:48:46 <geekosaur> overstrict you hit an infinite loop
21:48:57 <ij> I guess I mean stop
21:49:01 <[exa]> yeah it's better with head
21:49:13 <merijn> ij: In Turing complete language you can't rule out non-termination (like infinite loops), but some things that are infinite loops in a strict setting aren't in a lazy setting
21:49:22 <merijn> > head $ map (+1) (repeat 1)
21:49:24 × geekosaur quits (82650c7c@130.101.12.124) (Quit: Connection closed)
21:49:24 <lambdabot> 2
21:49:39 <merijn> ij: In a strict setting the map never terminates and that whole thing doesn't work
21:49:48 <ij> gotcha
21:50:06 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 256 seconds)
21:50:11 <ij> makes sense when recursive defs come into play
21:50:23 rwdrich28 joins (560395a9@cpc159427-cmbg20-2-0-cust424.5-4.cable.virginm.net)
21:50:30 geekosaur joins (82650c7c@130.101.12.124)
21:50:34 <ij> I think I have some thunks to kill in my program
21:50:46 <[exa]> ij: anyway, the final point is that the definition of WHNF (either a straightforward accessible patternmatchable data, or surely a function, or surely a builtin) kindof precisely describes the strictness problems, so haskell uses it
21:50:50 <ij> -O sped it up by 5x already
21:51:00 swarmcollective sees dead thunks, all the time
21:51:14 <ij> [exa], alright, cool!
21:51:19 <[exa]> ij: Int vs. Integer
21:51:19 <[exa]> :]
21:51:26 <monochrom> With lazy evaluation and conceptually infinite data (sure you'll only consume a finite prefix) you need a finer distinction than the false dichotomy "terminates" "doesn't terminate".
21:51:58 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
21:52:02 <monochrom> Either that, or you have to classify "f x : map f xs" as "terminates".
21:52:10 <[exa]> ij: anyway, the divergence (aka infinite loop) is one common case where you need to care about strictness, the second common case is just plain bottom (aka undefined aka exception)
21:52:27 <monochrom> In fact, in that sense, "f x : map f xs" is O(1)-time.
21:52:46 <ij> monochrom, wouldn't "terminates or not" be enough, if you also specify "with these semantics"?
21:53:05 <monochrom> See my "or"
21:54:07 <ij> you mean it depends what's around the expression/how it's used?
21:54:21 <monochrom> There are many correct models that disagree on how to use terminologies.
21:54:43 <monochrom> And they are equivalent after you ignore disputes on terminologies.
21:55:14 <monochrom> There are people who use the word "productive, though not terminating" for "f x : map f xs".
21:55:24 × michalz quits (~user@185.246.204.76) (Remote host closed the connection)
21:56:16 <monochrom> They are not wrong as long as they are self-consistent and, you have to take into account the rest of their model, they still make the right predictions, e.g., "head (map f [1..]) takes as little time as [f 1]"
21:56:32 × rwdrich28 quits (560395a9@cpc159427-cmbg20-2-0-cust424.5-4.cable.virginm.net) (Quit: Connection closed)
21:57:23 <monochrom> So I mean there are many incompatible ways of defining "terminates".
21:57:32 <ij> is a thunk something that is boxed?
21:57:35 <ij> "However, the parameter acc isn't strict, because there's no guarantee that the caller will evaluate it. The compiler will use a fully boxed Int to represent acc"
21:58:07 <monochrom> What do you already know of "box"?
21:58:30 <monochrom> Because if you don't know, then using it to explain other things is meaningful.
21:58:34 <monochrom> err, meaningless.
21:59:08 <ij> a box can be a pointer to the data, but I guess I don't
21:59:28 <ij> is that something very internal or can I read about it?
21:59:30 <monochrom> I know a lot of people preserve their Dunning-Kruger by tossing around "thunk" and "box" without knowing anything.
21:59:32 × Varis quits (~Tadas@unaffiliated/varis) (Remote host closed the connection)
21:59:48 johnw joins (~johnw@haskell/developer/johnw)
21:59:49 <monochrom> No, a box is what that pointer points to.
22:00:27 deviantfero joins (~deviantfe@179.51.60.188)
22:00:35 <monochrom> I never use the word "box", because everyonoe already knows "heap object", and "box" means that, no more no less.
22:00:38 × danvet quits (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa) (Ping timeout: 264 seconds)
22:00:41 <ij> that makes no sense at all
22:01:04 <monochrom> The only advantage of the word "box" is it mitigates RSI.
22:01:40 <monochrom> But you should set up a macro in your IRC client to auto-expand "box" to "heap object". :)
22:01:47 kupi joins (uid212005@gateway/web/irccloud.com/x-hwbscpvqcraoqtak)
22:01:55 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection)
22:01:58 <ephemient> https://gitlab.haskell.org/ghc/ghc/-/wikis/commentary/rts/storage/heap-objects
22:02:09 <monochrom> A thunk is stored on the heap, so it is one of many kinds of heap objects.
22:02:26 <kupi> >> is the same as *> ?
22:02:38 <monochrom> But of course, as usual, a lot of people still don't know what's in a thunk.
22:02:45 <ephemient> yes-ish
22:02:55 <ij> monochrom, box = heap object sounds good, certainly much more straight-forward
22:03:22 <monochrom> Yes for law-abiding instances. And if "same" means observationally equivalent esp. ignoring possible tiny performance differences.
22:03:36 <swarmcollective> monochrom, explain RSI?
22:03:57 <ij> swarmcollective, repetitive strain injury – i.e. what happens when you smash the keys all day
22:04:05 <Uniaika> carpian canal?
22:04:08 <monochrom> If you have fewer keys to type because the word is shorter, you don't stress your hand and wrist as much. :)
22:04:10 <Uniaika> or is it different?
22:04:32 <swarmcollective> ij, Ahhhh! Yes.
22:04:36 <Uniaika> kupi: kinda-sorta
22:04:45 <ephemient> carpal tunnel syndrome is one possible effect of RSI. there are others
22:04:45 <ij> Uniaika, I think cts should be when you have a weak hand with numbness
22:04:52 <Uniaika> thanks ephemient
22:04:55 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
22:04:57 <kupi> which is faster?
22:05:03 <ij> ha!
22:05:07 <ephemient> mu
22:05:20 <Uniaika> kupi: dump the core IR :P
22:05:45 <swarmcollective> box & RSI > Abbr.
22:06:59 × geekosaur quits (82650c7c@130.101.12.124) (Quit: Connection closed)
22:07:18 <kupi> nvm, i am still too newbie to optimize, i will stick to *> because that is more general
22:07:31 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
22:07:45 <ephemient> *> vs >> is not going to be a worthwhile optimization anyway
22:07:48 × conal quits (~conal@64.71.133.70) (Read error: Connection reset by peer)
22:07:52 <ij> ^
22:07:53 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
22:08:56 <ij> how should I go about finding unnecessary thunks? I have a program that I'm pretty sure could have everything strict
22:09:03 <ij> just add bangs everywhere?
22:09:26 <merijn> "could have" is not "should"
22:09:52 <monochrom> In some cases, I use >> when I'm already using >>=, I use *> when I'm already sticking to <*>.
22:10:04 <monochrom> In other cases, I use *> so I don't have to teach >>
22:10:12 <ij> merijn, why?
22:10:28 <ephemient> there is a {-# LANGUAGE Strict #-} pragma
22:10:33 <ij> because you might not need all the data, I guess
22:10:52 <merijn> ij: Randomly making things strict is about as likely to make things slower as it is to make things faster
22:10:52 <ephemient> although at that point I think you're working in a Haskell-like language rather than Haskell
22:11:06 <merijn> There are no shortcuts that let you skip "understanding what you're doing"
22:11:43 swarmcollective avoids symbolic representations of functions, except for <$> :/ :\
22:11:54 <ij> merijn, everything is strict in C. it is pretty fast
22:12:07 <monochrom> I don't even worry about these things until empirically it is very pressing that the time or space cost is really unbearable.
22:12:12 <ij> except for like True && println()
22:12:17 <ij> I mean false
22:12:25 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 240 seconds)
22:12:32 <monochrom> source code sanity is more important than "5% cheaper"
22:12:45 <merijn> ij: C is a very different language, with a very different compiler, a very different implementation strategy
22:12:56 <monochrom> well, usually anyway, I know exceptional scenerios.
22:13:17 conal joins (~conal@64.71.133.70)
22:13:32 <monochrom> C is a bad example.
22:13:45 <ij> I am not sure I'll gain anything by chatting in IRC
22:13:55 <yushyin> :D
22:13:58 <monochrom> Why don't you argue "everything is strict in bash, it is pretty fast" and shoot yourself.
22:14:23 <swarmcollective> ij, gain and/or give, it is your choice.
22:14:27 <ij> monochrom, what?
22:14:37 <monochrom> what what?
22:14:56 <monochrom> I am testing your understand of your own <ij> merijn, everything is strict in C. it is pretty fast
22:15:18 <monochrom> If you really understood that argument, you would also apply it with s/C/bash/
22:15:40 <ij> bash is pretty fast
22:15:43 <ephemient> I'm gaining some annoyance by listening to people who appear to be failing to learn in IRC
22:15:48 <ij> 🎉
22:15:50 <koz_> OK, I have something like 'Gen.element [mkSome @Proxy @Bool Proxy, mkSome @Proxy @Int Proxy]. GHC complains about a kind error (expects Gen (Some @{k1} (Proxy @{k1})), actually got Gen (Some @{*} (Proxy @{*}))).
22:15:53 <koz_> How do I resolve this?
22:15:58 <koala_man> some things like array indices and integer expressions sometimes end up being accidentally lazily evaluated in bash
22:16:08 <ij> ephemient, I am sorry for whining
22:16:13 <ij> it's just a little frustratign
22:17:02 <monochrom> OK, I'll stop.
22:17:25 <ij> monochrom, thank you for indulging as far as you did
22:18:12 <koz_> Do I need to provide a _kind_ signature for Gen in this case?
22:18:17 <koz_> s/Gen/Some/
22:19:04 <monochrom> Yikes, I don't even know @{*}
22:19:32 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
22:19:33 <koz_> I assume that's the kind Type?
22:19:42 <monochrom> Oh! That *
22:19:44 <koz_> My understanding is that Some is polykinded in a way Proxy isn't?
22:19:54 <koz_> Or vice versa?
22:20:01 <merijn> I assume this is the kinda code that I would write if I hated myself
22:20:11 <koz_> merijn: I don't have many other options.
22:20:24 <koz_> Other folks insisted on a TypeApplication-driven API which I now have to write tests for.
22:20:34 <koz_> I wouldn't have designed it that way, but them's the breaks.
22:20:38 <merijn> koz_: I recommend flogging said people
22:20:39 × soft-warm quits (4408f588@ip68-8-245-136.sd.sd.cox.net) (Quit: Connection closed)
22:20:45 <koz_> merijn: Said people are paying me.
22:20:45 acarrico joins (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net)
22:20:49 <monochrom> Yeah Some may need a kind-polymorphic sig so things don't default to Type
22:20:54 <merijn> Doesn't change my advice :)
22:20:59 <merijn> In fact
22:21:01 <koz_> monochrom: How do I provide that in this context?
22:21:13 <merijn> If they're paying you I'd recommend even *worse* punishment
22:21:17 × shush quits (~pawn@2603-8000-3703-51f4-217f-fa24-0553-46d3.res6.spectrum.com) (Remote host closed the connection)
22:21:25 <monochrom> I don't know. I'm new to this using @ for kinds.
22:21:47 <ephemient> I don't know if it would make a difference, but `[mkSome (Proxy @Bool), mkSome (Proxy @Int)]` would be less stuttery
22:21:56 <koz_> ephemient: It makes no difference.
22:22:03 <koz_> That's how I spelled it originally.
22:22:58 <monochrom> I think this is the watershed turning point from "I want a Haskell job" to "I don't want a Haskell job" :)
22:23:17 <koz_> Oh, this is unusual for me.
22:23:22 lmw joins (95e04f63@gateway/web/thelounge/ip.149.224.79.99)
22:23:23 <koz_> Mostly things tend not to be this gory.
22:23:52 <ephemient> yeah I have no clue, `choose [mkSome (Proxy @Bool), mkSome (Proxy @Int)]` works for me and there really shouldn't be a difference between QuickCheck and hedgehog
22:23:53 <monochrom> if "Haskell job" entails using so much DataKinds TypeApplication for a Rube Goldberg to fake dependent typing.
22:24:20 <koz_> ephemient: It's in a where binding with an explicit sig of Gen (Some Proxy).
22:24:22 soft-warm joins (4408f588@ip68-8-245-136.sd.sd.cox.net)
22:24:40 <monochrom> I guess in 5-10 years https://aphyr.com/posts/342-typing-the-technical-interview would be reality instead of joke.
22:24:42 <koz_> monochrom: Again, it's pretty unusual for me, and I'm actually helping _eliminate_ a lot of said Rube Goldberging.
22:25:06 <koz_> This is really rather exceptional, but yeah... TypeApplications-driven APIs don't make me a happy panda.
22:25:32 × p-core quits (~Thunderbi@2001:718:1e03:5128:3697:eeda:19aa:8e56) (Ping timeout: 260 seconds)
22:26:23 <monochrom> Actually I'm wondering about the notation @{k1} which is not simply @k1. Does the {} matter?
22:26:38 <koz_> monochrom: Let me paste exact error message.
22:26:54 <ij> merijn, if all your definitions are finite how could making code strict make it slower?
22:27:01 ADG1089__ joins (~aditya@223.236.190.35)
22:27:24 <monochrom> merijn, I agree with maerwald's assessment about blood pressure :)
22:27:32 <ephemient> making && strict can make things slower too
22:27:39 <monochrom> (Why are you getting yourself into these things all the time?)
22:27:56 <koz_> monochrom: https://paste.tomsmeding.com/pmDDEw2Y/raw/1
22:28:01 <koz_> Sorry for lack of linebreaks.
22:28:18 <ij> ephemient, ah, gotcha
22:28:27 × d3od quits (~nickmeno3@78-0-108-194.adsl.net.t-com.hr) (Remote host closed the connection)
22:29:42 <merijn> monochrom: hmm?
22:30:20 <monochrom> Getting yourself into conversations that become pointless but the negative effect is increasing stress.
22:30:43 <merijn> monochrom: lol
22:30:50 <merijn> I'm impervious to increased stress
22:31:03 <merijn> I've been maxed out for, like, 3 months
22:31:12 <monochrom> Ah OK that's true enough heh
22:31:44 <monochrom> OK carry on! It's entertaining for the rest of us bystanders anyway!
22:32:22 <monochrom> BTW have you ever seen ij's actual code?
22:32:40 <merijn> A few weeks ago
22:33:21 <zzz> what is the current recommended Natural number module?
22:33:31 jedws joins (~jedws@121.209.199.128)
22:33:41 <merijn> 5? *ducks*
22:34:04 <monochrom> Numeric.Natural
22:34:05 <ij> monochrom, did you not like it?
22:34:26 × miguel_clean quits (~Miguel@89-72-187-203.dynamic.chello.pl) (Quit: Leaving.)
22:36:02 × Franciman quits (~francesco@host-95-235-155-82.retail.telecomitalia.it) (Quit: Leaving)
22:36:45 × jedws quits (~jedws@121.209.199.128) (Client Quit)
22:37:13 <zzz> lol thanks
22:38:23 dxld joins (~dxld@rush.pub.dxld.at)
22:38:58 <koz_> monochrom: Found the solution - turn off PolyKinds.
22:39:00 × nbloomf quits (~nbloomf@2600:1700:ad14:3020:8867:d061:b0e1:86b9) (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:39:41 <monochrom> Hrm. That's anti-climatic.
22:39:43 × livvy quits (~livvy@gateway/tor-sasl/livvy) (Quit: Network issue or system upgrade probably or maybe I'm testing a new kernel.)
22:39:43 <koz_> (before you ask, no, I didn't decide on having it on by default either)
22:40:06 <koz_> The thing is, if PolyKinds causes this situation, there has to be a way of resolving it surely.
22:40:29 <koz_> But it turns out TypeApplications is also secretly KindApplications.
22:40:41 <koz_> Some @(Type -> Type) Proxy is 100% a thing.
22:41:02 <monochrom> If you turn on PolyKinds, then you have to write explicit kind sigs to assert "I really want Type, the whole Type and nothing but Type"
22:41:04 <koz_> (didn't work for me, but it parses and GHC even recognizes it as a kind application)
22:41:27 <koz_> monochrom: This I understand, but I've never had this kind of issue before, since I typically only deal with the kinds of type _variables_.
22:41:42 <monochrom> Well yeah that one is natural in retrospect because TypeInType = KindMeansType
22:42:12 jedws joins (~jedws@121.209.199.128)
22:42:27 × knupfer quits (~Thunderbi@200116b82c27b9002d81d776aa1cc87b.dip.versatel-1u1.de) (Ping timeout: 260 seconds)
22:42:40 <koz_> TypeInType = EverythingIsSecretlyType
22:42:51 <merijn> koz_: Well, yes
22:42:54 <koz_> ZFC = everything is a set; GHC = everything is Type
22:43:10 <koz_> It really is types all the way down.
22:43:32 <monochrom> Nah, GHC still distinguishes types from terms.
22:43:48 <monochrom> ZFC on the other hand asserts that even "elements" are sets.
22:43:54 <ephemient> -XDataKinds :p
22:44:17 × fendor_ quits (~fendor@77.119.129.25.wireless.dyn.drei.com) (Read error: Connection reset by peer)
22:44:21 <koz_> DataKinds doesn't actually unify term and type.
22:44:26 <koz_> It just blindly clones upward.
22:44:39 royal_screwup216 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
22:44:45 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Ping timeout (120 seconds))
22:44:45 lmw0 joins (95e04f63@gateway/web/thelounge/session)
22:44:45 × lmw0 quits (95e04f63@gateway/web/thelounge/session) (Changing host)
22:44:45 lmw0 joins (95e04f63@gateway/web/thelounge/ip.149.224.79.99)
22:44:51 fendor__ joins (~fendor@77.119.129.25.wireless.dyn.drei.com)
22:45:02 <ephemient> sure, that's fair...
22:45:29 <koz_> Hence why singletons has to abuse type classes to their limits to achieve (something like) that.
22:45:33 × fendor__ quits (~fendor@77.119.129.25.wireless.dyn.drei.com) (Read error: Connection reset by peer)
22:45:55 × lmw quits (95e04f63@gateway/web/thelounge/ip.149.224.79.99) (Ping timeout: 276 seconds)
22:49:02 <ij> I guess it's pretty hard to ask help for something I am very much unskilled to fix
22:49:28 × puke quits (~vroom@217.138.252.186) (Quit: puke)
22:49:38 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 258 seconds)
22:50:02 × conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
22:50:26 <monochrom> No. It is really hard to get abstract generalized help.
22:50:54 <monochrom> Many years ago on a math channel there was a "how do I solve equations?"
22:51:03 <monochrom> How would you even begin?
22:51:32 <monochrom> It turned out the student only needed "how do I solve the kind of linear one-unknown equations like 2x+3=5"
22:51:46 livvy joins (~livvy@gateway/tor-sasl/livvy)
22:53:14 puke joins (~vroom@217.138.252.203)
22:54:44 ph88_ joins (~ph88@2a02:8109:9e00:7e5c:ade8:bbad:5afb:2c7)
22:55:22 × lmw0 quits (95e04f63@gateway/web/thelounge/ip.149.224.79.99) (Quit: The Lounge - https://thelounge.chat)
22:58:20 <zzz> is there an alternative prelude that uses naturals instead of ints for functions like take?
22:58:41 <merijn> zzz: Maybe, but you probably don't want that anyway
22:58:57 <zzz> i don't?
22:59:00 <ephemient> :t Data.List.genericTake
22:59:01 <lambdabot> Integral i => i -> [a] -> [a]
22:59:15 <merijn> I speak from experience when I say: Turns out it's *real* annoying when you gotta call "fromIntegral" on every Int you have before indexing something
22:59:20 <monochrom> I think such an alternative prelude doesn't exist.
23:00:20 <merijn> zzz: Usually when you want to index something, there's math preceding that. That math is usually using Int, so every time you end up using this 'safe' indexing you end up just calling fromIntegral before it and unsafely converting from Int to the natural numbers for indexing the list
23:00:41 <hseg> indexing with nats is nice? for proofs. for coding, not so much
23:00:51 <merijn> But wait, maybe you're principled and use Natural for your math! Well, hope you never do any subtractions, because those can go negative and then you're still hosed
23:00:51 <monochrom> More subtly, that math uses negative numbers.
23:00:57 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
23:01:04 <zzz> i'm getting really annoyed using "fromIntegral" on every Natural I have everytime I want to use functions like take
23:01:15 <merijn> Well, maybe you use Natural *and* never use subtraction
23:01:28 <merijn> But then you can still overflow
23:01:42 <merijn> zzz: Clearly the solution is to switch the rest of your code to Int too ;)
23:01:45 <ephemient> also for `take`, negative numbers are fine
23:02:29 <hseg> zzz: how much are you gaining by using the "domain-correct" Natural, in your context?
23:02:40 <Axman6> @hoogle Integral i => i -> a -> [a]
23:02:40 <lambdabot> Data.List genericReplicate :: Integral i => i -> a -> [a]
23:02:41 <lambdabot> GHC.OldList genericReplicate :: Integral i => i -> a -> [a]
23:02:41 <lambdabot> Protolude genericReplicate :: Integral i => i -> a -> [a]
23:02:47 <ephemient> `take 0 [1..3]` is perfectly fine, why not `take (-1) [0..3]`
23:03:17 × Deide quits (~Deide@217.155.19.23) (Quit: Seeee yaaaa)
23:03:18 <hseg> note that overly precise typing can be a straitjacket -- use as much as is useful, and no more
23:03:19 <ij> monochrom, I guess I could say the point was that bash is as fast, but what I meant by that is predictable
23:05:22 carlomagno1 joins (~cararell@148.87.23.13)
23:05:25 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 240 seconds)
23:05:45 × gehmehgeh quits (~ircuser1@gateway/tor-sasl/gehmehgeh) (Quit: Leaving)
23:06:36 × carlomagno quits (~cararell@148.87.23.7) (Ping timeout: 240 seconds)
23:06:42 <zzz> hseg: im using saturated subtraction everywhere. i'm working with a grid of coordinates that can never be negative
23:07:15 <dolio> You can use monus.
23:07:29 <hseg> ... again, what are you gaining by your precision of using Naturals over Ints with monus?
23:07:42 <monochrom> Why didn't I invent the name "monus"? :)
23:07:56 quinn joins (~quinn@c-73-223-224-163.hsd1.ca.comcast.net)
23:07:59 <hseg> or replacing lookups :: i -> Map i a -> a with :: i -> Map i a -> Maybe a ?
23:08:12 monochrom renames to monuschrom
23:08:27 × ukari quits (~ukari@unaffiliated/ukari) (Remote host closed the connection)
23:08:53 <hseg> always, *always* ask yourself "is the cost of using these more precise types worth the safety i gain by them?"
23:09:01 <monochrom> But yeah ideologies die die die.
23:09:44 <monochrom> Ideologies of dynamic linking, ideologies of unsigned nat, ideologies of CAS... die die die
23:10:27 <hseg> indeed, this is part of my motivation to redo some code i wrote for my thesis, both in the high precision form (that'll probably push me to sth like agda) and in the low-precision, haskell 98 form
23:11:42 × ADG1089__ quits (~aditya@223.236.190.35) (Remote host closed the connection)
23:11:48 <monochrom> (I can understand if you really need the range 0-255 but Int8 stole half of that range from you so that's why you go Word8. That one is legit. But Integer vs Natural? You ought to be pragmatic not religious, like hseg says.)
23:13:36 <hseg> I can understand if you're doing eg some form of proof-carrying code that you might want structured Nats for indexing. But the weight of such an approach usually doesn't justify itself
23:13:37 × gentauro quits (~gentauro@unaffiliated/gentauro) (Read error: Connection reset by peer)
23:14:08 conal joins (~conal@64.71.133.70)
23:14:21 gentauro joins (~gentauro@unaffiliated/gentauro)
23:14:30 <zzz> so it's better to just write (if x < 0 then 0 else x) everywhere?
23:16:28 <hseg> depends on your usecase
23:16:30 <aveltras> you can use partially applied max0 = (max 0)
23:16:33 <dolio> I wonder if - should be monus for Natural.
23:16:38 shapr hops quietly
23:17:01 <hseg> dolio: depends on the semantics we want for Natural
23:17:05 <monochrom> If you can find an alternative prelude that uses Word or Natural for take, good for you, you can go that route.
23:17:11 <monochrom> But I suspect not.
23:17:43 × jedws quits (~jedws@121.209.199.128) (Quit: My MacBook has gone to sleep. ZZZzzz…)
23:17:46 <monochrom> So, if not, then be pragmatic, interface well with actual existing libraries, not non-existent Platonic astral plane ideals.
23:17:59 <Axman6> I'm not quite sure how to word this question, but does anyone know of a way to generalise a state machine over some alphabet so that you can apply it to fragments of an input, and merge those results, where some of the fragments may start in the middle of a sequence? my spoecific example would be taking ByteString chunks and validating if it is utf-8 encoded, where the chunks may have split the string arbitrarily
23:18:11 <dolio> Yeah, there's a lot of complaining about non-error over/underflows on other types, so maybe it wouldn't be popular.
23:18:28 jedws joins (~jedws@121.209.199.128)
23:18:48 <monochrom> HOL4 (and HOL98 back then) has a natural number type whose subtraction is monus.
23:19:05 <hseg> a crazy idea might be to spam the numeric hierarchy with newtypes for the various semantics
23:19:09 <monochrom> In fact, it was the only number type at all for a long, long time.
23:19:12 <hseg> don't see it catching on, much
23:19:27 <monochrom> Now don't ask me what it does for dividing by zero, haha.
23:19:47 <monochrom> (Actually I know the answer. :) )
23:20:25 <merijn> Axman6: I know that exists for utf-8, but not sure if it has a name
23:22:37 <dolio> Axman6: There's monoidal parsing approaches where you have dangling bits on the end that need information from adjacent chunks to resolve the parse fully. The only issue would be if you can't recognize when you can definitively start parsing in a chunk.
23:23:33 <Axman6> yeah, monoidal parsing is exactly what I'm attempting to do, but it tuirns out the details are more complex than I initially expected
23:23:57 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
23:24:50 <dolio> Is it sufficient that if you see a high 0 in a utf-8 byte, you know the following byte starts a new character?
23:25:41 <Axman6> I had something like data Conts = C1 Word8 | C2 Word8 Word8 | C3 Word8 Word8 Word8, and a similar one for prefixes, and then Utf8Monoid = U Int {- length represented by the chunk-} Conts {- continuation bytes which are unmatched -} [Int} {- offsets of known errors -} Prefix {- incomplete prefix -}
23:26:24 <Axman6> https://github.com/axman6/Utf8Monoid/blob/master/src/Utf8Monoid.hs is a slightly old version of it
23:26:57 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 264 seconds)
23:27:38 <Axman6> This sprung from a discussion on lobst.rs where someone wanted to know what the real world uses of monoids were, and I gave the example of parsing TB od text to validate it as UTF-8 (and this could also be used in the text-utf8 package potentially)
23:28:58 <Axman6> but the details are rough (or I don't have the problem clear enough in my head yet). small chunks cause problems with the representation above (also there is a C0 constructor, as this was initially Maybe Conts)
23:29:05 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 240 seconds)
23:29:35 aarvar joins (~foewfoiew@2601:602:a080:fa0:6991:31b3:1556:10f4)
23:30:26 × usr25 quits (~J@145.red-83-58-207.dynamicip.rima-tde.net) (Quit: Bye)
23:30:44 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection)
23:31:03 × Itkovian quits (~Itkovian@178-117-76-63.access.telenet.be) (Quit: Textual IRC Client: www.textualapp.com)
23:35:26 × puke quits (~vroom@217.138.252.203) (Remote host closed the connection)
23:35:50 puke joins (~vroom@217.138.252.203)
23:35:59 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
23:36:33 × hyiltiz quits (~quassel@unaffiliated/hyiltiz) (Ping timeout: 264 seconds)
23:36:38 × forgottenone quits (~forgotten@176.42.24.1) (Ping timeout: 265 seconds)
23:37:27 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
23:38:58 × gxt quits (~gxt@gateway/tor-sasl/gxt) (Ping timeout: 268 seconds)
23:40:01 × pfurla quits (~pfurla@ool-182ed2e2.dyn.optonline.net) (Ping timeout: 265 seconds)
23:40:03 <zzz> oh I liked this talk: https://www.youtube.com/watch?v=jFk1qpr1ytk
23:40:59 × nhs quits (~nhs@c-24-20-87-79.hsd1.or.comcast.net) (Ping timeout: 265 seconds)
23:41:45 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 240 seconds)
23:43:41 gxt joins (~gxt@gateway/tor-sasl/gxt)
23:46:14 × ph88_ quits (~ph88@2a02:8109:9e00:7e5c:ade8:bbad:5afb:2c7) (Ping timeout: 264 seconds)
23:47:06 × Ariakenom quits (~Ariakenom@2001:9b1:efb:fc00:6006:2ad2:8fc2:e1e4) (Quit: Leaving)
23:47:35 hyiltiz joins (~quassel@31.220.5.250)
23:47:35 × hyiltiz quits (~quassel@31.220.5.250) (Changing host)
23:47:35 hyiltiz joins (~quassel@unaffiliated/hyiltiz)
23:48:35 <merijn> Axman6: Real world use is that the newtypes for them compose beautifully :p
23:48:56 <merijn> Axman6: Cabal has something like 300 lines of by me that's 100% monoids :p
23:50:00 <Axman6> well my other example was computing arbitrary statistics across large datasets. you could use a package with a name something like... foldl-statistics ... to do that >_>
23:50:06 <merijn> Axman6: https://github.com/haskell/cabal/blob/master/Cabal/src/Distribution/Simple/Program/GHC.hs#L49-L305
23:50:51 × conal quits (~conal@64.71.133.70) (Read error: Connection reset by peer)
23:51:53 <Axman6> the fact (mkVersion version) hasn't been factored out annoys me
23:52:07 <Axman6> or just ghcVersion `withinRange` orLaterVersion (mkVersion version)
23:52:22 <Axman6> NO WONDER CABAL IS SO SLOW` >_>
23:53:03 <merijn> Axman6: Patches welcome :p
23:53:31 × deviantfero quits (~deviantfe@179.51.60.188) (Ping timeout: 276 seconds)
23:53:32 <merijn> Axman6: Actually, how would you even factor that out
23:54:06 × mouseghost quits (~draco@wikipedia/desperek) (Quit: mew wew)
23:54:17 conal joins (~conal@64.71.133.70)
23:54:22 <Axman6> uh, yeah, you can't, I got mixed up with version and ghcVersion
23:54:34 <merijn> See, I'm not dumb! :p
23:54:56 × jedws quits (~jedws@121.209.199.128) (Ping timeout: 240 seconds)
23:54:57 <merijn> tbh, those from/to things are works of art
23:54:57 <Axman6> NO WONMDER CABAL WORKS CORRECTLY, AXMAN6 DIDN'T WORK ON IT!
23:55:06 <merijn> They compose so elegantly
23:55:31 <Axman6> @hoogle Monoid m => Bool -> m -> m
23:55:31 <lambdabot> Data.Monoid.HT when :: Monoid m => Bool -> m -> m
23:55:31 <lambdabot> Relude.Monoid memptyIfFalse :: Monoid m => Bool -> m -> m
23:55:31 <lambdabot> Relude.Monoid memptyIfTrue :: Monoid m => Bool -> m -> m
23:56:00 <monochrom> Axman6: That reminds me of "map reduce". Its parallelization is a no-brainer because after the "map" stage, the "reduce" operation is a monoid operation, it's associative.
23:56:00 <merijn> Axman6: It doesn't exist yet. Campaigning for it in base is on my todo list, but sadly namig it is hard
23:56:21 <merijn> monochrom: You need a commutative monoid for it to be truly useful, though
23:56:55 <merijn> Else you end up serialising anyway
23:56:58 <Axman6> when isn't a terrible name, except it's a slightly better name for the Monad version
23:57:02 <monochrom> If you are careful you can live without commutativity and you still can get balanced parallelization.
23:57:10 nhs joins (~nhs@c-24-20-87-79.hsd1.or.comcast.net)
23:57:45 <merijn> Anyhoo, bed time
23:57:48 × gxt quits (~gxt@gateway/tor-sasl/gxt) (Remote host closed the connection)
23:58:39 <Axman6> monochrom: yeah exactly, my idea was to make something which could process a file in chunks in parallel, and process all the files in a dataset in parallel
23:58:43 <dcoutts_> Axman6: mmm, there's not a whole lot of work to save there. I'd be surprised if it came up on the profiles. The big savings are elsewhere, like skipping 90% of the configure step of each package build. Or not using ghc --make and caching the build plan.
23:59:24 <Axman6> dcoutts_: yeah I was being bacetious, cabal is great :)
23:59:30 <Axman6> facetious too
23:59:32 robbert-vdh parts (~robbert-v@128.199.60.252) ("WeeChat 3.0")
23:59:40 <monochrom> I like bacetious
23:59:45 <dcoutts_> I know. I was curious :-) so I checked

All times are in UTC on 2021-02-03.