Home liberachat/#haskell: Logs Calendar

Logs on 2022-09-25 (liberachat/#haskell)

00:03:49 <mniip> extend is a cool name
00:07:45 ski . o O ( `unsafeObserveRepresentation :: a -> Representation a' )
00:08:16 <ski> "extend" is how i read `(=<<)' out, aloud
00:09:03 <ski> ("monadic extension". pretty sure several monad papers uses that term for it)
00:10:21 × rockymarine quits (~rocky@user/rockymarine) (Ping timeout: 244 seconds)
00:13:44 × Athas quits (athas@2a01:7c8:aaac:1cf:5a6a:37a5:b994:6597) (Quit: ZNC 1.8.2 - https://znc.in)
00:13:55 Athas joins (athas@2a01:7c8:aaac:1cf:5a6a:37a5:b994:6597)
00:16:18 edrx joins (~Eduardo@2804:56c:d2dc:ac00:dab8:211d:d4eb:fa94)
00:16:20 notzmv joins (~zmv@user/notzmv)
00:17:52 × edrx quits (~Eduardo@2804:56c:d2dc:ac00:dab8:211d:d4eb:fa94) (Remote host closed the connection)
00:18:28 edrx joins (~Eduardo@2804:56c:d2dc:ac00:dab8:211d:d4eb:fa94)
00:18:41 <edrx> hi! sorry, I had to go offline...
00:19:47 <edrx> do you have favorite ways - and possibly links to favorite ascii diagrams - of/for drawing Kleisli categories and monad operations?
00:21:03 <monochrom> An ascii equation is worth a thousand ascii diagrams.
00:22:03 <monochrom> Ironically some ascii equations can be even more efficiently expressed in ascii words, e.g., ">=> is associative and has an identity".
00:22:31 <edrx> true
00:22:49 rockymarine joins (~rocky@user/rockymarine)
00:22:58 × waleee quits (~waleee@h-176-10-137-138.NA.cust.bahnhof.se) (Ping timeout: 246 seconds)
00:23:21 <monochrom> An ascii equation is worth a thousand ascii diagrams. An ascii diagram is worth a thousand ascii words. An ascii word is worth a thousand ascii equations. The cycle is complete.
00:23:55 <monochrom> Or rather, s/cycle/gravitational collapse singularity/
00:24:17 <edrx> I work with diagrammatic languages, and I have ways to draw that Yoneda Lemma and Kan extensions that I am quite happy with... link: http://angg.twu.net/LATEX/2022on-the-missing.pdf#page=45
00:25:12 <ski> "Monads, a Field Guide" by dpiponi in 2006-10-21 at <http://blog.sigfpe.com/2006/10/monads-field-guide.html> has some suggestive diagrams
00:25:28 <edrx> but what I have for Kleisli categories still feel very preliminary... I was reading the source code of the prelude earlier today and it has some diagrams
00:25:55 <monochrom> But no one can do those diagrams in ascii.
00:26:19 <monochrom> Unless you appeal to the Turing-ascii tarpit: Every PDF can be base64-encoded to ascii.
00:26:20 <ski> which reminds me that i probably also should have mentioned dpiponi's "You Could Have Invented Monads! (And Maybe You Already Have)" in 2006-08-07 at <http://blog.sigfpe.com/2006/08/you-could-have-invented-monads-and.html> before
00:27:17 <edrx> ^ that's very good =)
00:27:27 <EvanR> encode pdf in base64, display encoded data with a nice monospacefont (PDF), repeat
00:27:41 <ski> together with the non-tutorial quick overview/taste "Escaping Hell with Monads" by Philip Nilsson in 2017-05-08 at <https://philipnilsson.github.io/Badness10k/escaping-hell-with-monads/>
00:27:42 × rockymarine quits (~rocky@user/rockymarine) (Ping timeout: 265 seconds)
00:28:14 <monochrom> Escape hell but get trapped in monads.
00:29:39 <ski> edrx : anyway, to tackle monads, you should first understand higher-order functions, parameterized data types, type classes. also, monads seem to best be tackled by first seeing a bunch of particular specific examples of monads (and what kind of boiler-plate code using them will allow you to abstract away), rather than trying to first understand monads in the abstract (a common mistake)
00:30:26 <ski> oh, and you should probably have seen `Functor' before `Monad' .. and probably `Applicative' as well, at least nowadays that it's a superclass of `Monad'. Typeclassopedia does introduce these
00:31:25 <EvanR> is that Continuation Monad to solve callback hell... actually Cont monad? or just some free monad
00:31:38 <ski> there are also some particular diagrams for monads, like the "traintrack pictures for `Either
00:31:41 <EvanR> or just IO
00:31:46 <ski> e '/`Maybe'
00:31:54 <edrx> I learned monads in Category Theory first, ages ago... then a few months ago, with some ideas from this video - http://www.youtube.com/watch?v=ZhuHCtR3xq8 Brian Beckman: Don't fear the Monad
00:32:27 <ski> and there's also some data-flow diagrams for `State s' .. iirc, some of the original monad papers had some of those (?)
00:33:00 <edrx> I was finally able to translate between the categorical operations and the ones that Haskell uses
00:33:18 <monochrom> Cont or ContT solves callback hell, yeah. Usually ContT in practice because ContT IO because IO is involved for FFI-ing to C libraries that are heavy on callbacks.
00:33:27 <ski> you could try the older Wadler papers at <https://homepages.inf.ed.ac.uk/wadler/topics/monads.html> -- Wadler papers are usually quite readable
00:33:57 <monochrom> This: http://blog.sigfpe.com/2011/10/quick-and-dirty-reinversion-of-control.html
00:34:40 <edrx> let me see if I can reconstruct my diagrams and asciify them
00:35:19 <ski> actually, maybe the one with dataflow for state i was thinking about is "Lazy Functional State Threads" by John Launchbury,Simon L. Peyton Jones in 1994 at <https://homepages.dcc.ufmg.br/~camarao/fp/articles/lazy-state.pdf>
00:36:19 <ski> (that one introduces the `ST' monad, for local state, implemented with update-in-place)
00:36:39 <edrx> that one is great!!!
00:36:49 <ski> you've seen it ?
00:37:06 × Athas quits (athas@2a01:7c8:aaac:1cf:5a6a:37a5:b994:6597) (Quit: ZNC 1.8.2 - https://znc.in)
00:37:16 Athas joins (athas@2a01:7c8:aaac:1cf:5a6a:37a5:b994:6597)
00:37:43 <edrx> ski: no, first time
00:38:20 <edrx> I'll try to follow its conventions
00:38:23 <ski> @hackage managed
00:38:23 <lambdabot> https://hackage.haskell.org/package/managed
00:38:39 <ski> is `ContT IO', hidden behind a `newtype'
00:38:56 <ski> (for handling callbacks)
00:38:59 rockymarine joins (~rocky@user/rockymarine)
00:39:36 <monochrom> "mischief managed" :)
00:39:37 × califax quits (~califax@user/califx) (Remote host closed the connection)
00:39:38 × ChaiTRex quits (~ChaiTRex@user/chaitrex) (Remote host closed the connection)
00:39:38 × chexum_ quits (~quassel@gateway/tor-sasl/chexum) (Read error: Connection reset by peer)
00:39:42 × adanwan quits (~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
00:39:56 califax joins (~califax@user/califx)
00:40:04 adanwan joins (~adanwan@gateway/tor-sasl/adanwan)
00:40:27 × califax quits (~califax@user/califx) (Remote host closed the connection)
00:40:32 × adanwan quits (~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
00:40:35 ChaiTRex joins (~ChaiTRex@user/chaitrex)
00:40:48 adanwan joins (~adanwan@gateway/tor-sasl/adanwan)
00:40:54 chexum joins (~quassel@gateway/tor-sasl/chexum)
00:42:56 <ski> (<https://el-tramo.be/blog/async-monad/> is of a someewhat similar vein as the "Badness" one, although not as concise)
00:44:00 <ski> hm .. i recall seeing a link in here about (iirc) using `sequence' on a list of `ContT o m'-actions. can't seem to find it
00:45:11 × Me-me quits (~me-me@user/me-me) (Remote host closed the connection)
00:45:58 Me-me joins (~me-me@v.working.name)
00:47:42 <ski> (apropos delimited continuations : <https://github.com/ghc-proposals/ghc-proposals/pull/313>,<http://tunes.org/~nef/logs/haskell/20.04.15>,<https://www.reddit.com/r/haskell/comments/f7p0qe/rfc_delimited_continuation_primops_ghc_proposal/>,<https://github.com/lexi-lambda/ghc-proposals/blob/delimited-continuation-primops/proposals/0000-delimited-continuation-primops.md>)
00:55:43 × matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 265 seconds)
00:55:51 × gurkenglas quits (~gurkengla@p548ac72e.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
00:56:51 <ski> edrx : some more links which might be interesting
00:56:51 <ski> <https://github.com/tibbe/haskell-style-guide>,<https://github.com/tibbe/haskell-docs>,<https://github.com/bitemyapp/learnhaskell>,<https://github.com/bitemyapp/learnhaskell/blob/master/specific_topics.md>,<http://www.vex.net/~trebla/haskell/lazy.xhtml>,<https://apfelmus.nfshost.com/articles/lazy-eval.html>,<https://smunix.github.io/hackhands.com/guide-lazy-evaluation-haskell/index.html>
00:57:08 <ski> (a few a bit opinionated)
00:57:19 <ski> @tell david "ie how to change [a] into a Maybe [b] given you have a function that has type (a -> Maybe b)" -- you can also (in addition to `sequenceA,sequence :: [Maybe a] -> Maybe [a]') use `traverse,mapM :: (a -> Maybe b) -> ([a] -> Maybe b)'
00:57:19 <lambdabot> Consider it noted.
00:57:56 <edrx> ski: thanks =)
00:58:27 <ski> (there's probably a few more which ought to be mentioned along those, but which i can't recall or find atm)
01:03:41 fresheyeball joins (~fresheyeb@c-76-25-93-164.hsd1.co.comcast.net)
01:11:54 matthewmosior joins (~matthewmo@173.170.253.91)
01:14:29 × TonyStone quits (~TonyStone@cpe-74-76-51-197.nycap.res.rr.com) (Remote host closed the connection)
01:15:19 TonyStone joins (~TonyStone@2603-7080-8607-c36a-01cb-cda3-629f-bfc2.res6.spectrum.com)
01:18:26 × matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 265 seconds)
01:18:59 × jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Remote host closed the connection)
01:27:22 jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
01:32:48 califax joins (~califax@user/califx)
01:33:28 matthewmosior joins (~matthewmo@173.170.253.91)
01:37:51 × matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 260 seconds)
01:39:47 geranim0 joins (~geranim0@modemcable062.79-202-24.mc.videotron.ca)
01:40:28 bob joins (~geranim0@modemcable062.79-202-24.mc.videotron.ca)
01:42:11 matthewmosior joins (~matthewmo@173.170.253.91)
01:55:21 × mvk quits (~mvk@2607:fea8:5ce3:8500::778c) (Ping timeout: 260 seconds)
02:01:24 burnsidesLlama joins (~burnsides@119247164140.ctinets.com)
02:03:03 × burnsidesLlama quits (~burnsides@119247164140.ctinets.com) (Remote host closed the connection)
02:19:49 × td_ quits (~td@muedsl-82-207-238-005.citykom.de) (Ping timeout: 265 seconds)
02:20:41 × fresheyeball quits (~fresheyeb@c-76-25-93-164.hsd1.co.comcast.net) (Quit: WeeChat 3.5)
02:21:25 td_ joins (~td@muedsl-82-207-238-047.citykom.de)
02:22:42 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
02:22:42 finn_elija joins (~finn_elij@user/finn-elija/x-0085643)
02:22:42 finn_elija is now known as FinnElija
02:34:44 burnsidesLlama joins (~burnsides@119247164140.ctinets.com)
02:35:06 c209e6dc-4d76-47 joins (~aditya@2601:249:4300:1296:195:dac6:592c:a55a)
02:39:07 × burnsidesLlama quits (~burnsides@119247164140.ctinets.com) (Ping timeout: 246 seconds)
02:39:29 bilegeek joins (~bilegeek@2600:1008:b00e:f92:9f4b:938b:9188:448b)
02:44:57 × matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 265 seconds)
02:47:16 burnsidesLlama joins (~burnsides@119247164140.ctinets.com)
02:50:40 mvk joins (~mvk@2607:fea8:5ce3:8500::778c)
03:07:28 luffy joins (~chenqisu1@183.217.203.170)
03:10:53 coot joins (~coot@89-76-160-4.dynamic.chello.pl)
03:11:03 × coot quits (~coot@89-76-160-4.dynamic.chello.pl) (Remote host closed the connection)
03:11:15 coot joins (~coot@89-76-160-4.dynamic.chello.pl)
03:12:41 <edrx> I'm working on this, taken from the section on the state monad on Hutton's book...
03:12:43 <edrx> http://angg.twu.net/HASKELL/State1.hs.html
03:12:52 matthewmosior joins (~matthewmo@173.170.253.91)
03:13:12 <EvanR> ST not to be confused with ST
03:13:27 <edrx> question: I've defined fst and snd in the obvious way, and when I give this to the ghci repl - :t fst
03:14:00 <edrx> it says
03:14:04 <edrx> "Ambiguous occurrence `fst' It could refer to either `Prelude.fst', imported from `Prelude' at State1.hs:1:1 (and originally defined in `Data.Tuple') or `Main.fst', defined at State1.hs:37:1"
03:14:14 <EvanR> confused not averted
03:14:25 <EvanR> confusion* . You have two fst's in scope
03:14:26 <edrx> what do I have to do to say that my definition should take precedence?
03:14:34 <EvanR> import Prelude hiding (fst, snd)
03:14:39 dsrt^ joins (~dsrt@173-160-76-137-atlanta.hfc.comcastbusiness.net)
03:14:42 <edrx> thanks!
03:14:57 × vglfr quits (~vglfr@145.224.100.190) (Read error: Connection reset by peer)
03:15:09 vglfr joins (~vglfr@145.224.100.190)
03:15:16 <edrx> perfect =)
03:16:43 <EvanR> now make the State type be a type variable, customizable
03:17:55 × jero98772 quits (~jero98772@2800:484:1d80:d8ce:efcc:cbb3:7f2a:6dff) (Remote host closed the connection)
03:18:48 <edrx> EvanR: that only happens in a later section
03:20:23 <edrx> I'm testing the code in the book, checking the types in it by hand, and drawing box diagrams with type annotations... the next step is to draw diagrams with boxes and arrows
03:20:48 <edrx> in ascii art, with much more information than the diagrams in Hutton's book
03:29:46 × c209e6dc-4d76-47 quits (~aditya@2601:249:4300:1296:195:dac6:592c:a55a) (Quit: Konversation terminated!)
03:31:51 × burnsidesLlama quits (~burnsides@119247164140.ctinets.com) (Remote host closed the connection)
03:34:30 burnsidesLlama joins (~burnsides@119247164140.ctinets.com)
03:34:58 × burnsidesLlama quits (~burnsides@119247164140.ctinets.com) (Remote host closed the connection)
03:35:26 <EvanR> A → B "ascii art" xD
03:36:03 <EvanR> → is old tech, appearing in that classic DOS codepage...
03:36:31 <edrx> what do you use to typeset your diagrams?
03:36:39 <EvanR> me?
03:36:44 <edrx> yes
03:36:47 <edrx> TikZ?
03:37:36 <edrx> I was going to ask for examples of diagrams in TikZ with source code
03:38:01 <edrx> but then I saw that I could leave that for another day
03:39:19 × rockymarine quits (~rocky@user/rockymarine) (Ping timeout: 246 seconds)
03:40:24 <edrx> this looks great too: https://diagrams.github.io/doc/quickstart.html
03:40:50 × ChaiTRex quits (~ChaiTRex@user/chaitrex) (Quit: ChaiTRex)
03:42:56 ChaiTRex joins (~ChaiTRex@user/chaitrex)
03:44:30 Infinite joins (~Infinite@106.51.13.146)
03:46:54 SystemV is now known as SysV
03:58:50 benin0 joins (~benin@183.82.24.8)
04:03:50 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 258 seconds)
04:04:00 × Infinite quits (~Infinite@106.51.13.146) (Ping timeout: 252 seconds)
04:07:14 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection)
04:08:03 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
04:10:49 burnsidesLlama joins (~burnsides@119247164140.ctinets.com)
04:15:15 × mvk quits (~mvk@2607:fea8:5ce3:8500::778c) (Ping timeout: 244 seconds)
04:15:20 × burnsidesLlama quits (~burnsides@119247164140.ctinets.com) (Ping timeout: 265 seconds)
04:16:41 × dsrt^ quits (~dsrt@173-160-76-137-atlanta.hfc.comcastbusiness.net) (Remote host closed the connection)
04:17:01 × machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 250 seconds)
04:17:19 × matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 244 seconds)
04:17:52 × coot quits (~coot@89-76-160-4.dynamic.chello.pl) (Quit: coot)
04:21:13 × zmt00 quits (~zmt00@user/zmt00) (Read error: Connection reset by peer)
04:22:48 zmt00 joins (~zmt00@user/zmt00)
04:26:19 king_gs joins (~Thunderbi@2806:103e:29:ac5e:a16e:4ac9:a89b:4d)
04:26:30 rockymarine joins (~rocky@user/rockymarine)
04:29:19 × bilegeek quits (~bilegeek@2600:1008:b00e:f92:9f4b:938b:9188:448b) (Quit: Leaving)
04:30:46 × rockymarine quits (~rocky@user/rockymarine) (Ping timeout: 246 seconds)
04:34:16 × luffy quits (~chenqisu1@183.217.203.170) (Ping timeout: 246 seconds)
04:39:05 matthewmosior joins (~matthewmo@173.170.253.91)
04:44:31 × matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 260 seconds)
04:44:37 burnsidesLlama joins (~burnsides@119247164140.ctinets.com)
04:52:56 matthewmosior joins (~matthewmo@173.170.253.91)
04:53:27 bilegeek joins (~bilegeek@2600:1008:b044:5e68:fad5:48ad:56ae:311c)
04:56:27 × Athas quits (athas@2a01:7c8:aaac:1cf:5a6a:37a5:b994:6597) (Quit: ZNC 1.8.2 - https://znc.in)
04:56:38 Athas joins (athas@2a01:7c8:aaac:1cf:5a6a:37a5:b994:6597)
04:58:46 × bob quits (~geranim0@modemcable062.79-202-24.mc.videotron.ca) (Ping timeout: 246 seconds)
04:58:57 × geranim0 quits (~geranim0@modemcable062.79-202-24.mc.videotron.ca) (Ping timeout: 252 seconds)
05:05:29 Pickchea joins (~private@user/pickchea)
05:14:45 razetime joins (~quassel@117.193.6.133)
05:26:20 <edrx> http://angg.twu.net/HASKELL/State1.hs.html
05:27:15 edrx parts (~Eduardo@2804:56c:d2dc:ac00:dab8:211d:d4eb:fa94) (Killed buffer)
05:29:08 × jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 244 seconds)
05:36:35 shriekingnoise_ joins (~shrieking@186.137.167.202)
05:37:37 × shriekingnoise quits (~shrieking@186.137.167.202) (Ping timeout: 246 seconds)
05:42:22 `2jt joins (~jtomas@88.17.232.105)
05:48:45 gmg joins (~user@user/gehmehgeh)
05:55:38 Enrico63 joins (~Enrico63@81.109.143.226)
05:56:16 × matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 260 seconds)
05:56:22 coot joins (~coot@89-76-160-4.dynamic.chello.pl)
05:56:35 × coot quits (~coot@89-76-160-4.dynamic.chello.pl) (Remote host closed the connection)
05:56:47 coot joins (~coot@89-76-160-4.dynamic.chello.pl)
06:00:58 kenran joins (~kenran@200116b82b695400c991f380c8aeb97f.dip.versatel-1u1.de)
06:02:05 × Athas quits (athas@2a01:7c8:aaac:1cf:5a6a:37a5:b994:6597) (Quit: ZNC 1.8.2 - https://znc.in)
06:02:17 Athas joins (athas@2a01:7c8:aaac:1cf:5a6a:37a5:b994:6597)
06:06:47 mbuf joins (~Shakthi@49.205.83.245)
06:21:31 matthewmosior joins (~matthewmo@173.170.253.91)
06:25:58 × matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 244 seconds)
06:28:28 luffy joins (~chenqisu1@183.217.203.170)
06:31:30 Andrew is now known as haxcpu
06:33:01 × nate3 quits (~nate@98.45.169.16) (Ping timeout: 260 seconds)
06:34:32 × luffy quits (~chenqisu1@183.217.203.170) (Remote host closed the connection)
06:36:13 luffy joins (~chenqisu1@183.217.203.170)
06:38:23 × khumba quits (~khumba@user/khumba) ()
06:39:53 × arahael quits (~arahael@203.217.43.212) (Quit: "Downloading more RAM")
06:40:00 × califax quits (~califax@user/califx) (Remote host closed the connection)
06:40:00 matthewmosior joins (~matthewmo@173.170.253.91)
06:46:16 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
06:51:03 califax joins (~califax@user/califx)
06:57:41 zeenk joins (~zeenk@2a02:2f04:a311:2d00:6865:d863:4c93:799f)
06:58:10 nate3 joins (~nate@98.45.169.16)
07:02:40 × nate3 quits (~nate@98.45.169.16) (Ping timeout: 246 seconds)
07:02:44 × causal quits (~user@50.35.83.177) (Quit: WeeChat 3.6)
07:06:11 × Pickchea quits (~private@user/pickchea) (Ping timeout: 252 seconds)
07:07:16 × califax quits (~califax@user/califx) (Remote host closed the connection)
07:08:24 califax joins (~califax@user/califx)
07:09:20 × `2jt quits (~jtomas@88.17.232.105) (Ping timeout: 265 seconds)
07:09:29 acidjnk_new joins (~acidjnk@p200300d6e7137a45b127f34fc59e5b8d.dip0.t-ipconnect.de)
07:12:57 `2jt joins (~jtomas@88.17.232.105)
07:17:07 nate3 joins (~nate@98.45.169.16)
07:17:19 arahael joins (~arahael@203.217.43.212)
07:20:04 vorpuni joins (~pvorp@2001:861:3881:c690:bc6d:def:d698:14f7)
07:24:31 × nate3 quits (~nate@98.45.169.16) (Ping timeout: 252 seconds)
07:28:55 × raym quits (~raym@user/raym) (Ping timeout: 252 seconds)
07:29:40 raym joins (~raym@user/raym)
07:43:39 × matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 265 seconds)
07:45:59 Tuplanolla joins (~Tuplanoll@91-159-69-34.elisa-laajakaista.fi)
07:50:25 × califax quits (~califax@user/califx) (Remote host closed the connection)
07:51:36 zer0bitz_ joins (~zer0bitz@2001:2003:f748:2000:add8:471e:b979:aa97)
07:53:15 chomwitt joins (~chomwitt@2a02:587:dc14:f500:e7c3:cde8:f4f3:a6bf)
07:53:44 × burnsidesLlama quits (~burnsides@119247164140.ctinets.com) (Read error: Connection reset by peer)
07:55:04 instantaphex joins (~jb@c-73-171-252-84.hsd1.fl.comcast.net)
07:55:40 × zer0bitz quits (~zer0bitz@2001:2003:f748:2000:6530:c280:4187:23f9) (Ping timeout: 268 seconds)
07:55:59 burnsidesLlama joins (~burnsides@119247164140.ctinets.com)
07:59:22 × instantaphex quits (~jb@c-73-171-252-84.hsd1.fl.comcast.net) (Ping timeout: 246 seconds)
08:01:46 matthewmosior joins (~matthewmo@173.170.253.91)
08:02:10 × bilegeek quits (~bilegeek@2600:1008:b044:5e68:fad5:48ad:56ae:311c) (Quit: Leaving)
08:05:56 × Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
08:06:04 odnes joins (~odnes@ppp089210198232.access.hol.gr)
08:08:23 wootehfoot joins (~wootehfoo@user/wootehfoot)
08:08:47 × razetime quits (~quassel@117.193.6.133) (Ping timeout: 265 seconds)
08:10:39 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
08:18:33 × odnes quits (~odnes@ppp089210198232.access.hol.gr) (Quit: Leaving)
08:18:50 odnes joins (~odnes@ppp089210198232.access.hol.gr)
08:22:36 × acidjnk_new quits (~acidjnk@p200300d6e7137a45b127f34fc59e5b8d.dip0.t-ipconnect.de) (Ping timeout: 264 seconds)
08:25:00 × chomwitt quits (~chomwitt@2a02:587:dc14:f500:e7c3:cde8:f4f3:a6bf) (Ping timeout: 264 seconds)
08:25:20 × wootehfoot quits (~wootehfoo@user/wootehfoot) (Quit: Leaving)
08:27:35 razetime joins (~quassel@117.193.6.133)
08:33:49 × luffy quits (~chenqisu1@183.217.203.170) (Ping timeout: 252 seconds)
08:34:20 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
08:44:30 jgeerds_ joins (~jgeerds@55d46bad.access.ecotel.net)
08:49:38 <ski> @tell edrx if you add a pragma line `{-# LANGUAGE InstanceSigs #-}' enabling that language extension, then you can write your method type signatures like `fmap :: (a -> b) -> (ST a -> ST b)' in your `instance' declarations without commenting them out. (for the infix operator `<*>' case, you will have to wrap the operator in brackets like `(<*>) :: ST (a -> b) -> (ST a -> ST b)')
08:49:38 <lambdabot> Consider it noted.
08:52:55 lisbeths joins (uid135845@id-135845.lymington.irccloud.com)
08:54:46 <ski> @tell edrx it's also possible to use `fmap g (S st) = S (\s -> let .. = st s in ..)', matching on `S', rather than using `app', also for `(<*>)', and partially for `(>>=)' (unless you also use a `let' (or `case') also for the `f' call -- but that might lose (?) the tail-call, which can be important)
08:54:47 <lambdabot> Consider it noted.
08:55:29 ski wishes there was "message-dispatching" / "copatterns" syntax in Haskell
08:57:20 × Luj quits (~Luj@2a01:e0a:5f9:9681:5880:c9ff:fe9f:3dfb) (Quit: The Lounge - https://thelounge.chat)
08:58:24 Luj joins (~Luj@2a01:e0a:5f9:9681:7264:29d6:8e89:14af)
08:59:06 waldo joins (~waldo@user/waldo)
09:03:36 × kenran quits (~kenran@200116b82b695400c991f380c8aeb97f.dip.versatel-1u1.de) (Quit: WeeChat info:version)
09:06:08 × matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 244 seconds)
09:09:38 david joins (~david@2a01:e34:ec2b:d430:44a:f5ca:9867:d69d)
09:10:19 Cerins joins (~Cerins@balticom-142-106-43.balticom.lv)
09:13:07 × jgeerds_ quits (~jgeerds@55d46bad.access.ecotel.net) (Remote host closed the connection)
09:21:20 nate3 joins (~nate@98.45.169.16)
09:25:59 chomwitt joins (~chomwitt@2a02:587:dc14:f500:7fb4:d182:20a9:76c8)
09:26:12 × nate3 quits (~nate@98.45.169.16) (Ping timeout: 264 seconds)
09:28:17 × Vajb quits (~Vajb@2001:999:504:1841:9e47:1ec7:a52e:1d57) (Read error: Connection reset by peer)
09:28:56 Vajb joins (~Vajb@hag-jnsbng11-58c3a5-27.dhcp.inet.fi)
09:34:50 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
09:35:31 × burnsidesLlama quits (~burnsides@119247164140.ctinets.com) (Remote host closed the connection)
09:36:00 matthewmosior joins (~matthewmo@173.170.253.91)
09:37:09 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
09:39:39 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 265 seconds)
09:40:31 acidjnk joins (~acidjnk@p200300d6e7137a456d115bf0ec8996e0.dip0.t-ipconnect.de)
09:40:51 × matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 260 seconds)
09:40:54 × Cerins quits (~Cerins@balticom-142-106-43.balticom.lv) (Quit: Leaving)
09:43:52 frost joins (~frost@user/frost)
09:46:10 Cerins joins (~Cerins@balticom-142-106-43.balticom.lv)
09:46:53 × Cerins quits (~Cerins@balticom-142-106-43.balticom.lv) (Remote host closed the connection)
09:52:29 × tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz)
09:53:26 matthewmosior joins (~matthewmo@173.170.253.91)
09:54:52 Cerins joins (~Cerins@balticom-142-106-43.balticom.lv)
09:55:11 mc47 joins (~mc47@xmonad/TheMC47)
09:59:21 ubert joins (~Thunderbi@77.119.195.69.wireless.dyn.drei.com)
10:05:36 WarzoneCommand joins (~Frank@77-162-168-71.fixed.kpn.net)
10:09:17 × chexum quits (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection)
10:09:45 chexum joins (~quassel@gateway/tor-sasl/chexum)
10:13:39 × Vajb quits (~Vajb@hag-jnsbng11-58c3a5-27.dhcp.inet.fi) (Read error: Connection reset by peer)
10:13:49 burnsidesLlama joins (~burnsides@119247164140.ctinets.com)
10:14:07 Vajb joins (~Vajb@2001:999:504:1841:9e47:1ec7:a52e:1d57)
10:17:58 × burnsidesLlama quits (~burnsides@119247164140.ctinets.com) (Ping timeout: 246 seconds)
10:18:00 gurkenglas joins (~gurkengla@p548ac72e.dip0.t-ipconnect.de)
10:20:38 SysV is now known as Linux
10:21:52 thyriaen joins (~thyriaen@2a02:8109:8340:686c:7383:e0e2:ad95:9fce)
10:29:12 × `2jt quits (~jtomas@88.17.232.105) (Ping timeout: 264 seconds)
10:38:58 × acidjnk quits (~acidjnk@p200300d6e7137a456d115bf0ec8996e0.dip0.t-ipconnect.de) (Ping timeout: 246 seconds)
10:41:46 × odnes quits (~odnes@ppp089210198232.access.hol.gr) (Ping timeout: 246 seconds)
10:41:50 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "")
10:45:41 × vorpuni quits (~pvorp@2001:861:3881:c690:bc6d:def:d698:14f7) (Quit: bye)
10:46:13 __monty__ joins (~toonn@user/toonn)
10:54:02 <Profpatsch> I’m sometimes a bit annoyed by the unreadability of haddock instances. I feel like haddock should sort them according to some tagging
10:54:14 <Profpatsch> e.g. generic instances should appear in one block
10:54:35 <Profpatsch> An authors of instances should be able to say “these are important for using the type”
10:55:07 <[exa]> as in, raising some of the instances out of the usual terse instance list?
10:55:14 <Profpatsch> yes
10:55:22 <Profpatsch> terse?
10:55:42 <Profpatsch> Have you seen some modern base types
10:55:52 <[exa]> it's kinda terse to me normally (it's just headers and you have to expand it manually)
10:56:10 <[exa]> anyway yeah terse but loooooooong
10:56:12 <Profpatsch> Show Eq Ord Show1 Eq1 Ord1 Rep Rep1 Typeable Data TestEquality
10:56:22 <Profpatsch> Most of these are pretty much noise for most applications
10:56:42 × matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 244 seconds)
10:56:50 <Profpatsch> e.g. for Compose the two important instances are Applicative and Functor
10:57:00 <Profpatsch> Everything else is impl detail
10:58:08 <[exa]> hm so well, let's patch haddock?
10:58:13 <Profpatsch> yep
10:58:23 <Profpatsch> My idea is that class authors can give a list of tags
10:58:25 <[exa]> like, I'd vote for having instances as a top-level rendered objects in the docs
10:58:38 <[exa]> then they can get veeeeeeeeery briefly linked from the data docs and class docs
10:58:41 <Profpatsch> and instance authors can also do that somehow
10:59:00 <Profpatsch> (not trying to change a lot at first, just group things according to some order & priorityt
11:00:35 <[exa]> yeah
11:00:58 <[exa]> I kinda expect we'll get slammed in ~10 minutes with the actual reason why it's like this :D
11:01:48 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
11:02:07 <Profpatsch> Might try to hack on that during Munihac
11:02:12 <Profpatsch> Usually there’s some hackage people there
11:02:15 <Profpatsch> err haddock
11:02:53 <Profpatsch> Rust does it to some extend, so there’s some good precendent here :)
11:02:57 <Profpatsch> *extent
11:03:07 <[exa]> ah for me munihac is conflicting with another conference :(
11:03:33 <Profpatsch> [exa]: If I get anything done, I I’ll make sure to let you know
11:04:05 <[exa]> ah great, thanks!
11:04:08 burnsidesLlama joins (~burnsides@119247164140.ctinets.com)
11:06:11 <[exa]> like, there might be 2 straightforward approaches, 1] the authors tag some of the toplevel objects "important" or "must read" or so, and they get a corresponding star/exclamationmark/whatever in the documentation so that they're more visible 2] the instances are rendered as top-level so they are easy to organize, and the loooong lists below classes and types are only links 3] both of that
11:07:41 × shriekingnoise_ quits (~shrieking@186.137.167.202) (Quit: Quit)
11:10:03 × burnsidesLlama quits (~burnsides@119247164140.ctinets.com) (Ping timeout: 265 seconds)
11:13:15 luffy joins (~chenqisu1@183.217.203.170)
11:19:34 × ubert quits (~Thunderbi@77.119.195.69.wireless.dyn.drei.com) (Remote host closed the connection)
11:20:30 burnsidesLlama joins (~burnsides@119247164140.ctinets.com)
11:23:04 × jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 246 seconds)
11:24:59 matthewmosior joins (~matthewmo@173.170.253.91)
11:26:18 Guest13 joins (~Guest13@2001:9e8:33d1:9c00:4cea:de98:c891:d5c7)
11:26:30 × econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity)
11:28:06 <Profpatsch> [exa]: I’d do a simple mix of priority & magging
11:28:07 acidjnk joins (~acidjnk@p200300d6e7137a45914c45594824ebd8.dip0.t-ipconnect.de)
11:28:10 <Profpatsch> *tagging
11:28:16 <Profpatsch> (bad wifif on train)
11:28:53 <Profpatsch> i.e. you can give stuff tags, and each tag gets a central priority
11:29:21 × matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 260 seconds)
11:29:24 <Profpatsch> or idk
11:29:30 <Profpatsch> I’d hvae to experiment a bit
11:30:01 <Profpatsch> It should be reasonably eas y to use and intuitive, that’s probably the hardest thing to achieve
11:32:00 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
11:35:59 <Profpatsch> In particular, if an instance has multiple tags, I think it should appear multiple times as well.
11:36:29 <Profpatsch> But maybe highlighting instances would already improve legibility?
11:40:53 × burnsidesLlama quits (~burnsides@119247164140.ctinets.com) (Remote host closed the connection)
11:41:29 doyougnu joins (~doyougnu@cpe-74-69-132-225.stny.res.rr.com)
11:47:53 jakalx parts (~jakalx@base.jakalx.net) (Error from remote client)
11:54:16 califax joins (~califax@user/califx)
11:55:12 × califax quits (~califax@user/califx) (Remote host closed the connection)
11:57:38 Guest1332 joins (~Guest13@47-183-142-46.pool.kielnet.net)
11:58:02 <Guest1332> Hi, I just learned from a tutorial that Num is no strict subset of Ord. I don't understand why this should be the case (think) Or did I understand something wrong?
11:59:56 × Guest13 quits (~Guest13@2001:9e8:33d1:9c00:4cea:de98:c891:d5c7) (Ping timeout: 252 seconds)
12:01:23 <Profpatsch> Guest1332: one defines > < <= etc the other is a dumping ground for numeric functions
12:01:30 matthewmosior joins (~matthewmo@173.170.253.91)
12:01:35 <Profpatsch> you an also compare things that are not numbers
12:01:52 <Rembane> Is Ord a subset of Eq?
12:02:19 <Profpatsch> e.g. Foo = A | B | C deriving (Ord) will mean A<B an B<C and A<C
12:02:20 <pavonia> Both Num and Eq are
12:02:34 <pavonia> Both Num and *Ord are
12:03:08 <Guest1332> thank you, it's a bit clearer now!
12:03:08 <Profpatsch> Rembane: https://hackage.haskell.org/package/base-4.17.0.0/docs/Data-Ord.html#t:Ord
12:03:16 <Profpatsch> Eq a => Ord a
12:03:26 <Profpatsch> meaning you have to impl Eq inorder to be able to impl Ord
12:04:13 nate3 joins (~nate@98.45.169.16)
12:05:50 docter_d joins (~docter_d@47-183-142-46.pool.kielnet.net)
12:06:06 × matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 265 seconds)
12:06:07 <Rembane> Profpatsch: Interesting. My hypothesis was that equivalence of floating point numbers is a bit shaky, and thus why things look like they do, but I think that wasn't quite correct.
12:06:11 docter_d slaps Guest1332 around a bit with a large trout
12:06:29 × davean quits (~davean@davean.sciesnet.net) (Ping timeout: 252 seconds)
12:06:57 burnsidesLlama joins (~burnsides@119247164140.ctinets.com)
12:07:42 × burnsidesLlama quits (~burnsides@119247164140.ctinets.com) (Remote host closed the connection)
12:07:53 × ft quits (~ft@p3e9bc57b.dip0.t-ipconnect.de) (Remote host closed the connection)
12:09:02 × nate3 quits (~nate@98.45.169.16) (Ping timeout: 244 seconds)
12:09:13 <ski> `Num' does not require `Eq' !
12:10:13 <Profpatsch> Rembane: the Haskell number stack is a point of contention
12:10:51 <ski> @let instance Num a => Num (rho -> a) where (f + g) r = f r + g r; (f - g) r = f r - g r; (f * g) r = f r * g r; negate f r = negate (f r); abs f r = abs (f r); signum f r = signum (f r); fromInteger n r = fromInteger n
12:10:53 <lambdabot> Defined.
12:11:06 <Profpatsch> It’s neither particularly easy to use, nor does it have a lot of nice mathematical properties
12:11:37 <ski> @let instance Fractional a => Fractional (rho -> a) where (f / g) r = f r / g r; recip f r = recip (f r); fromRational x r = fromRational x
12:11:38 <lambdabot> Defined.
12:11:46 <ski> agreed
12:12:18 <ski> > map (id^2 - id + 1) [-3 .. 3]
12:12:20 <lambdabot> [13,7,3,1,1,3,7]
12:12:24 odnes joins (~odnes@ppp089210198232.access.hol.gr)
12:13:02 <david> Hello
12:13:11 <ski> > map (fst^2 - fst*snd + snd^2) [(x,y) | [x,y] <- replicateM 2 [-1 .. 2]]
12:13:13 <lambdabot> [1,1,3,7,1,0,1,4,3,1,1,3,7,4,3,4]
12:13:30 <Guest1332> that lambdabot is cool
12:13:36 <Guest1332> Profpatsch, Rembane, ski thanks for the nice chat, it was helping alot! C ya, bye!
12:13:38 <david> https://rosettacode.org/wiki/Poker_hand_analyser#Haskell <- what is 'consumed = pure . (, "") ?
12:13:39 <ski> > map (cos^2 + sin^2) [-pi,-pi+pi/4,pi]
12:13:41 <lambdabot> [1.0,1.0,1.0]
12:13:47 <ski> > map (cos^2 + sin^2) [-pi,-pi+pi/4 .. pi] -- sorry
12:13:49 <lambdabot> [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0]
12:14:15 <ski> note that function types can't (in general) have `Eq' instances
12:14:24 × Guest1332 quits (~Guest13@47-183-142-46.pool.kielnet.net) (Quit: Client closed)
12:14:26 <king_gs> > map (cos) [1..10]
12:14:27 <ski> hello again, david
12:14:27 <lambdabot> [0.5403023058681398,-0.4161468365471424,-0.9899924966004454,-0.6536436208636...
12:14:33 <Profpatsch> ski: can they have Eq1?
12:14:39 <ski> david : did you see the messages i left for you ?
12:14:40 <david> Hello ski :)
12:14:48 <david> Yes, I just saw it through lambdabot
12:14:51 <Profpatsch> doesn’t look like it
12:14:53 <king_gs> > a = 1
12:14:55 <lambdabot> <hint>:1:3: error: parse error on input ‘=’
12:15:02 <ski> (well, checking, i see it was just one)
12:16:15 × Cerins quits (~Cerins@balticom-142-106-43.balticom.lv) (Ping timeout: 265 seconds)
12:17:26 × waldo quits (~waldo@user/waldo) (Quit: quit)
12:17:48 <ski> david : well, the `pure' there is `const', so it's ignoring the input (the string), and the other bit sets the output (apart from the result value) to be the empty string
12:18:52 <ski> (the latter part is ok, since the strings that are being matched contain nothing after the matched token .. however, i think it is actually incorrect, as an implementation of `readsPrec' to not allow there to be any more tokens after the matched one !)
12:19:13 <ski> so, i would argue these `Read' instances are incorrect
12:19:30 <ski> @src (->) pure
12:19:30 <lambdabot> pure = const
12:19:52 <ski> consumed = pure . (,"")
12:20:00 <ski> = const . (,"")
12:20:15 <ski> consumed x = (const . (,"")) x
12:20:27 <ski> = const ((,"") x)
12:20:31 <ski> = const (x,"")
12:20:51 <ski> consumed x s = const (x,"") s
12:21:01 <ski> = (x,"")
12:21:09 <ski> consumed x _ = (x,"")
12:21:13 <ski> @src const
12:21:13 <lambdabot> const x _ = x
12:21:33 <ski> that ^ expands what `consumed' is doing
12:26:08 <[exa]> Profpatsch: I'd avoid any "global" priorities because you literally don't know what's important for which users. Tags could be useful (like at least the ones for "used almost everywhere" and "technical detail")
12:26:22 <ski> hm, additionally, i don't think this custom user data format should be parsed by defining `Read'/`readsPrec' at all ! (reserving those for parsing a `String' representation of a *Haskell* value (using Haskell syntax) .. so that one could copy an expression from source, or from `Show' output, and feed it to `Read' operations)
12:32:11 <ski> well .. i guess it *would* be possible to make e.g. `(4 ♥)' (or `(♥) 4', if you prefer) (rather than `♥4', which is a syntax error) a valid Haskell code representation (`♥' becoming an operator)
12:32:43 × acidjnk quits (~acidjnk@p200300d6e7137a45914c45594824ebd8.dip0.t-ipconnect.de) (Ping timeout: 246 seconds)
12:33:07 <ski> (in that case, it would be fine to define `Read'/`readsPrec'/`reads' for this)
12:35:02 matthewmosior joins (~matthewmo@173.170.253.91)
12:36:45 <ski> (oh, actually i misread (the `Read Card' instance). it's using the `4♥' format)
12:37:27 Cerins joins (~Cerins@balticom-142-106-43.balticom.lv)
12:39:01 <ski> i would not use `mapMaybe' (with `readMaybe') like this, because it discards parse errors
12:39:23 burnsidesLlama joins (~burnsides@119247164140.ctinets.com)
12:40:00 × Cerins quits (~Cerins@balticom-142-106-43.balticom.lv) (Remote host closed the connection)
12:40:14 <ski> (e.g. `"q♣ 10♣ Bad 7♣ input 6♣ 7♣"' would not be reported as being `Invalid Input', instead ignoring the noise)
12:40:33 × xff0x quits (~xff0x@2405:6580:b080:900:87ff:1eaa:6690:ed86) (Ping timeout: 244 seconds)
12:41:16 × Arsen quits (arsen@managarm/dev/Arsen) (Quit: Quit.)
12:41:27 × docter_d quits (~docter_d@47-183-142-46.pool.kielnet.net) ()
12:41:40 Arsen joins (arsen@managarm/dev/Arsen)
12:41:55 <ski> (nor would `"q♣ 10♣ Bad 7♣ input 6♣ 4♣"' be reported as `Invalid hand', since there's still five distinct valid cards in there)
12:44:57 <dminuoso> What I wouldn't give for case-of fallthrough right now. :(
12:44:59 × burnsidesLlama quits (~burnsides@119247164140.ctinets.com) (Ping timeout: 252 seconds)
12:45:06 <ski> howso ?
12:46:35 <dminuoso> I would like to express this elegantly https://gist.github.com/dminuoso/547ceccc082453ed31e25b945c0884a6
12:46:44 ski 's pondered a bit how fallthrough in `case'-`of', in the sense of being able to have a "reverse pointer forest" with branch entry points inside of it (entry points being in "or"-branches)
12:47:18 <ski> ah, looks like you're actually wanting disjunctive / "or"- patterns
12:47:39 <dminuoso> Yeah I suppose that's the SML term for it
12:48:00 <int-e> that lone `else` confused me much more than I feel comfortable with
12:48:34 <dminuoso> Heh, both `do` and `else` were meant as English pseudo code. Yes those were poor choices. :)
12:48:44 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
12:48:47 <ski> (e.g. Ocaml has them <https://v2.ocaml.org/manual/patterns.html#sss:pat-or>)
12:49:30 <ski> case ty of
12:49:45 × doyougnu quits (~doyougnu@cpe-74-69-132-225.stny.res.rr.com) (Ping timeout: 252 seconds)
12:49:45 <ski> Ty1 | Ty2 | Ty3 -> do something
12:49:55 <ski> Ty4 -> do something else
12:50:06 × pavonia quits (~user@user/siracusa) (Quit: Bye!)
12:50:08 <ski> Ty5 | Ty6 -> and another thing..
12:51:03 <ski> iirc, they have come up in Haskell Prime or something
12:52:19 × luffy quits (~chenqisu1@183.217.203.170) (Ping timeout: 246 seconds)
12:53:35 <Profpatsch> [exa]: by global priorities I mean that you have a 1–5 prio, and stuff like Eq, Show etc is in `stock`, which is defined to have priority 2, so it would be sorted pretty low
12:54:41 <Profpatsch> But maybe that’s too simplistic
12:55:48 <Profpatsch> I’m gonna create a test suite from existing classes, sorting things like I think they should appear, then the mechanism could be devised from that
12:55:59 <[exa]> that's gonna spawn infinite discussions on what instances should have what priority
12:56:07 <[exa]> but yeah at least something will be available
12:56:13 <Profpatsch> that’s why authors should have the last say
12:56:15 <Profpatsch> within reason
12:56:31 <Profpatsch> maybe we give them two tools, sort to top and highlight
12:57:10 <Profpatsch> So that you can say “this instance should get special treatment for doc reasons”
12:57:31 <Profpatsch> And everything else gets a nice default sorting, and within the default sorting things could also be highlighted
12:57:36 × king_gs quits (~Thunderbi@2806:103e:29:ac5e:a16e:4ac9:a89b:4d) (Ping timeout: 244 seconds)
12:59:04 <Profpatsch> The good thing about the current system is that I think there’s no author influence on how things get sorted, so there is no existing state to take care of
12:59:32 <Profpatsch> which means there’s no backwards compat considerations
13:00:46 <Profpatsch> So considering I wouldn’t give authors too much leverage on determining sorting order, so that we could tinker with it after the first impl
13:01:53 xff0x joins (~xff0x@2405:6580:b080:900:4297:67ba:b919:fbb3)
13:04:15 [exa] carefully opens the haddock source
13:08:43 jakalx joins (~jakalx@base.jakalx.net)
13:10:30 <Profpatsch> def not starting in the haddock sources lol
13:10:44 king_gs joins (~Thunderbi@187.201.192.184)
13:14:52 <[exa]> oh here we go https://gitlab.haskell.org/ghc/haddock/-/blob/ghc-head/haddock-api/src/Haddock/Interface/AttachInstances.hs#L119
13:15:50 <[exa]> the `instHead` makes a list of integers basically as `map argCount instanceTypes` that is used for sorting stuff
13:19:16 <Profpatsch> [exa]: I’m more afraid of getting a dev shell with hls in it for haddock
13:19:28 <Profpatsch> Do I have to recompile GHC for that
13:21:44 <[exa]> guess not
13:21:46 <[exa]> just omit hls
13:25:35 <ski> david : i'd probably replace the `Read Suit' instance with something like
13:25:53 <ski> readsSuit :: ReadS Suit
13:26:08 <ski> readsSuit s0 = [(Heart ,s) | ("♥",s) <- lex s0]
13:26:27 <ski> ++ [(Diamond,s) | ("♦",s) <- lex s0]
13:26:37 <ski> ++ [(Spade ,s) | ("♣",s) <- lex s0]
13:26:46 <ski> ++ [(Club ,s) | ("♠",s) <- lex s0]
13:27:04 <ski> ++ [(Heart ,s) | ("h",s) <- lex s0] -- not sure i'd keep this case, though
13:27:09 × mc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection)
13:27:17 <ski> and similarly replacing the `Read Rank' instance with a `readsRank :: ReadS Rank'
13:28:13 <ski> (one could alternatively do a single `lex' call, matching on `(token,s)', and then do a `case token of ...', but then one needs to reintroduce explicit failure in the catch-call branch)
13:28:22 <ski> also, note
13:28:25 Enrico63 parts (~Enrico63@81.109.143.226) ()
13:29:35 <ski> type ReadS a = String -> [(a,String)] -- note this is a type synonym for a function converting an input `String' containing tokens to a list (possible alternative parses/reads) of pairs of parsed values (consuming some prefix of the input) together with the remaining input
13:30:33 <ski> this is better (a) because you're not artificially/incorrectly restricting these to only accept the input when there's no tokens after the parsed/read token
13:32:34 <ski> (`Read'/`read'/`reads'/`readsPrec' are meant to leave the remaining tokens of the input in the output, letting later parsing continue from where we left off. `readMaybe' (used on top-level of parsing) will check that there's no extra tokens (not counting white space) at the end)
13:32:46 <ski> .. then i'd replace the `Read Card' instance by
13:32:55 <ski> readsCard :: ReadS Card
13:33:06 × king_gs quits (~Thunderbi@187.201.192.184) (Ping timeout: 265 seconds)
13:34:39 <ski> readsCard s0 = [ (Card suit rank,s)
13:34:58 <ski> | (rank,s1) <- readsRank s0
13:35:11 <ski> , (suit,s ) <- readsSuit s1
13:35:16 <ski> ]
13:35:27 <ski> (er, fix alignment)
13:35:34 <ski> or perhaps
13:36:12 <ski> readsCard = runStateT (flip Card <$> StateT readsRank <*> StateT readsSuit)
13:36:57 <ski> (possibly also using `StateT' in definitions of `readsSuit',`readsRank' .. or perhaps altogether using `ReadP', or maybe `ReadE', instead)
13:38:33 <ski> and then in `testHands' i'd replace `mapMaybe readMaybe . words' by `(readsToMaybe . runStateT . many . StateT) readsCard' (or maybe `replicateM 5' instead of `many' ?)
13:38:54 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
13:39:26 × matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 260 seconds)
13:39:43 <ski> (.. hm, no. actually not using `replicateM 5' to only read five cards, since the current code uses `nub' before checking count, so, i think (?), the important part is that it's five *after* removing duplicates, not before)
13:39:55 <ski> anyway .. where
13:40:14 <ski> readsToMaybe :: ReadS a -> (String -> Maybe a)
13:41:36 <ski> readsToMaybe reads s0 = case [a | (a,s) <- reads s0,("","") <- lex s] of -- filter away all reads with extra tokens
13:41:37 acidjnk joins (~acidjnk@p200300d6e7137a45914c45594824ebd8.dip0.t-ipconnect.de)
13:41:58 <ski> [a] -> Just a -- check there's just one solution left after filtering
13:42:03 <ski> _ -> Nothing
13:43:04 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 244 seconds)
13:48:12 <ski> compare `on` snd could be replaced by comparing snd (and then not importing `on'. also with `consumed' removed, there's no need to keep the `TupleSections' line)
13:49:44 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
13:50:03 ski would also remove all uses of the `$' operation .. and maybe change some of the `<$>'s to calls to `map'
13:51:10 <ski> and `isSucc' could use an "as/at pattern" `isSucc (x:xs@(y:_)) = .. && isSucc xs'
13:53:05 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
13:53:11 <ski> oh, i didn't go into how one could make `(4 ♥)' (or `(♥) 4') be valid Haskell syntax (and then one could use `Read', defining `readsPrec' instead of `readsSuit',`readsRank',`readsCard' -- still using `many' in `testHands', though)
13:53:20 <ski> david : i guess that's that
13:55:19 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 258 seconds)
13:55:25 burnsidesLlama joins (~burnsides@119247164140.ctinets.com)
13:57:36 matthewmosior joins (~matthewmo@173.170.253.91)
13:58:00 × frost quits (~frost@user/frost) (Ping timeout: 252 seconds)
14:00:53 × burnsidesLlama quits (~burnsides@119247164140.ctinets.com) (Ping timeout: 252 seconds)
14:02:11 × matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 260 seconds)
14:03:39 <zzz> where can i learn about records and how they are stored internally?
14:05:46 × caryhartline quits (~caryhartl@2600:1700:2d0:8d30:cd27:ded2:4351:8688) (Quit: caryhartline)
14:08:37 <[exa]> zzz: records as in the record syntax for the algebraic datatypes in `data` ?
14:09:31 <EvanR> glad I tuned in in time to see readsSuit that's cool
14:09:44 <[exa]> zzz: (in that case, this answer would be useful: https://stackoverflow.com/questions/3254758/memory-footprint-of-haskell-data-types )
14:10:48 <zzz> [exa]: thank you that's exactly it
14:11:05 matthewmosior joins (~matthewmo@173.170.253.91)
14:16:48 jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
14:20:33 ski laments the lack of knowledge about how to properly/correctly make `Read' and `Show' instances (including handling precedences, using `readParen';`showParen', and incrementing levels where appropriate) (and knowing when that's appropriate) ; knowing how to define and use `readsPrec',`readList';`showsPrec',`showList', and how to use
14:20:38 ski `reads',`readParen',`lex',..;`shows',`showParen',`showString',`showChar',`showLitChar',..
14:20:57 <EvanR> hey I implemented all that. Once
14:21:22 Cerins joins (~Cerins@balticom-142-106-43.balticom.lv)
14:22:02 <ski> one could argue `Read' and `Show' have issues .. but one's going to use them, one ought to use them correctly
14:22:10 <ski> s/but/but if/
14:25:00 <EvanR> :i gives the precedence of + 6, but prints nothing on !! or ! from Data.Map. Is the default 7 or
14:25:07 ski . o O ( <https://downloads.haskell.org/ghc/latest/docs/libraries/base-4.17.0.0/Numeric.html> )
14:25:37 × qhong quits (~qhong@rescomp-21-400677.stanford.edu) (Ping timeout: 268 seconds)
14:26:46 <ski> default is `infixl 9'
14:27:48 machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net)
14:29:00 <EvanR> ohdang
14:29:28 <EvanR> I was using readOct yesterday but it didn't give me what I wanted
14:30:39 <EvanR> > readOct "777" ""
14:30:45 <lambdabot> error:
14:30:47 <EvanR> > readOct "777"
14:30:49 <lambdabot> • Couldn't match expected type ‘[Char] -> t’
14:30:53 <lambdabot> [(511,"")]
14:30:59 <EvanR> > readOct "778"
14:31:01 <lambdabot> [(63,"8")]
14:31:04 <EvanR> > readOct "779"
14:31:06 <lambdabot> [(63,"9")]
14:31:30 <EvanR> according to dusty document from 1972, 9 would be accepted and counted as... nine
14:32:06 <EvanR> or in their words "9 = 11" xD
14:32:10 king_gs joins (~Thunderbi@187.201.192.184)
14:32:25 <hpc> it's like microwave numbers
14:32:37 <hpc> if you type 130 into a microwave, it's the same as typing 90
14:33:00 narendraj9 joins (~user@2a02:8109:b63f:c344::31ee)
14:33:30 <EvanR> lol yeah
14:36:32 `2jt joins (~jtomas@88.17.232.105)
14:40:38 <ski> (`9' being strongest level just weaker than function application, which is `10' (and `infixl'). arguably `~' would then be at `11' (and `prefixr'), `->' (view patterns) at `12' (and `infixr'), `!' at `13' (and `prefix'), and record construction/update at `14' (and `infixl') ? .. not sure if i'm missing some relevant "syntactic operators" here)
14:40:45 Everything joins (~Everythin@37.115.210.35)
14:42:27 <ski> > (readOct :: ReadS Integer) "777"
14:42:29 <lambdabot> [(511,"")]
14:42:47 <ski> EvanR : for octal in general, or for permissions in particular ?
14:43:12 ski . o O ( "seventyeleven" )
14:43:45 <EvanR> for numeric constants like 01357 =
14:44:15 <EvanR> > (readOct :: ReadS Integer) "01357"
14:44:17 <lambdabot> [(751,"")]
14:44:17 jrm joins (~jrm@user/jrm)
14:44:39 <EvanR> > (readOct :: ReadS Integer) "019357"
14:44:41 <lambdabot> [(1,"9357")]
14:45:22 <EvanR> (this feature was not implemented at all sites using B)
14:46:53 <ski> what about `0b0123', should this be equal to `0b1011', iow `9' ?
14:47:14 <EvanR> 0b ?
14:47:17 <ski> binary
14:47:22 <ski> % :set -XBinaryLiterals
14:47:22 <yahb2> <interactive>:1:1: error: Not in scope: ‘Yahb2Defs.limitedPrint’
14:47:29 <ski> % 0b1011
14:47:30 <yahb2> 11
14:47:39 <ski> ah, i guess `11', not `9'
14:47:48 <EvanR> lol
14:48:29 <EvanR> ask me what F times 9 is. It's fleventy-five
14:48:30 <ski> and what about `0b01a2' and `02b'/`0o2b' ?
14:49:50 <ski> i guess one could allow alternative residues in other residue systems than the least one (digits from `0' upto (but not including) the base `b')
14:50:23 <EvanR> the extension of interpreting the wrong digits as their value in the right place seems straightforward but decimal and octal are the only options I have seen xD
14:50:24 <ski> (there is already negative bases `b', where one typically uses digits in `[0 .. -b-1]')
14:51:32 <ski> well, i guess one could also ask about `0x10jc'
14:52:21 <ski> (since decimal typically has no distinguishing prefix, one might prefer `4d' to be two tokens rather than meaning `53')
14:53:04 <ski> (.. then there's also the type suffices in C, like `0L')
14:53:35 <EvanR> http://www.bzarg.com/p/how-to-pronounce-hexadecimal/
14:54:04 <ski> hehe :)
14:55:03 ski 's just suffixed "-ty"," hundred",&c., in private
14:56:18 jero98772 joins (~jero98772@2800:484:1d80:d8ce:3490:26c5:1782:da8c)
14:56:47 <EvanR> a8 vs 88?
14:57:10 × zeenk quits (~zeenk@2a02:2f04:a311:2d00:6865:d863:4c93:799f) (Quit: Konversation terminated!)
14:57:20 <EvanR> alphaty eight
14:58:18 <hpc> if your math adds up to F0, is that an 'efty sum?
15:00:01 <EvanR> wow those higher levels of precedence are... high. tilde is 11 where, lazy pattern?
15:00:27 nate3 joins (~nate@98.45.169.16)
15:00:46 × hrberg quits (~quassel@171.79-160-161.customer.lyse.net) (Ping timeout: 246 seconds)
15:02:48 × acidjnk quits (~acidjnk@p200300d6e7137a45914c45594824ebd8.dip0.t-ipconnect.de) (Ping timeout: 264 seconds)
15:04:34 waldo joins (~waldo@user/waldo)
15:05:32 acidjnk joins (~acidjnk@p200300d6e7137a29b83d7bde232748fa.dip0.t-ipconnect.de)
15:15:34 × matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 265 seconds)
15:16:03 matthewmosior joins (~matthewmo@173.170.253.91)
15:18:17 titibandit joins (~titibandi@xdsl-87-78-162-143.nc.de)
15:20:12 × matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 244 seconds)
15:20:17 rockymarine joins (~rocky@user/rockymarine)
15:20:22 × narendraj9 quits (~user@2a02:8109:b63f:c344::31ee) (Read error: Connection reset by peer)
15:23:16 tzh joins (~tzh@c-24-21-73-154.hsd1.wa.comcast.net)
15:29:23 ft joins (~ft@p3e9bc57b.dip0.t-ipconnect.de)
15:31:07 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
15:38:59 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
15:39:20 hrberg joins (~quassel@171.79-160-161.customer.lyse.net)
15:41:38 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
15:45:33 matthewmosior joins (~matthewmo@173.170.253.91)
15:47:54 × adanwan quits (~adanwan@gateway/tor-sasl/adanwan) (Quit: _)
15:50:22 × matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 265 seconds)
15:51:53 adanwan joins (~adanwan@gateway/tor-sasl/adanwan)
15:53:17 × qwedfg quits (~qwedfg@user/qwedfg) (Ping timeout: 244 seconds)
15:53:48 × jespada_ quits (~jespada@cpc121060-nmal24-2-0-cust249.19-2.cable.virginm.net) (Ping timeout: 264 seconds)
15:55:02 burnsidesLlama joins (~burnsides@119247164140.ctinets.com)
15:55:14 qwedfg joins (~qwedfg@user/qwedfg)
15:59:33 × burnsidesLlama quits (~burnsides@119247164140.ctinets.com) (Ping timeout: 265 seconds)
16:00:45 jespada joins (~jespada@cpc121060-nmal24-2-0-cust249.19-2.cable.virginm.net)
16:02:01 × acidjnk quits (~acidjnk@p200300d6e7137a29b83d7bde232748fa.dip0.t-ipconnect.de) (Ping timeout: 246 seconds)
16:02:14 × lisbeths quits (uid135845@id-135845.lymington.irccloud.com) (Quit: Connection closed for inactivity)
16:03:28 matthewmosior joins (~matthewmo@173.170.253.91)
16:08:14 × Cerins quits (~Cerins@balticom-142-106-43.balticom.lv) (Remote host closed the connection)
16:08:55 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
16:09:14 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
16:10:26 × king_gs quits (~Thunderbi@187.201.192.184) (Read error: Connection reset by peer)
16:11:36 king_gs joins (~Thunderbi@2806:103e:29:ac5e:a16e:4ac9:a89b:4d)
16:14:14 × odnes quits (~odnes@ppp089210198232.access.hol.gr) (Quit: Leaving)
16:16:51 causal joins (~user@50.35.83.177)
16:19:20 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
16:19:51 × rockymarine quits (~rocky@user/rockymarine) (Ping timeout: 260 seconds)
16:26:15 × adanwan quits (~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
16:26:15 × stiell_ quits (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
16:26:41 adanwan joins (~adanwan@gateway/tor-sasl/adanwan)
16:27:55 <ski> EvanR : hm, i guess it works less well in english
16:28:28 <ski> yes, `~' is irrefutable / "lazy" pattern, `!' is strict pattern
16:29:27 <ski> > let foo !MkFoo {} = () in foo undefined
16:29:29 <lambdabot> *Exception: Prelude.undefined
16:29:31 <ski> > let foo ~MkFoo {} = () in foo undefined
16:29:33 <lambdabot> ()
16:29:35 <ski> > let foo ! ~MkFoo {} = () in foo undefined
16:29:38 <lambdabot> *Exception: Prelude.undefined
16:29:40 <ski> > let foo ~ !MkFoo {} = () in foo undefined
16:29:42 <lambdabot> <hint>:1:11: error: parse error on input ‘!’
16:29:53 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
16:30:01 <ski> hence `!' binds tighter than `~'
16:30:10 <ski> > let foo ! !MkFoo {} = () in foo undefined
16:30:11 <lambdabot> <hint>:1:11: error: parse error on input ‘!’
16:30:29 <ski> (hence `prefix')
16:30:35 <ski> > let foo ~ ~MkFoo {} = () in foo undefined
16:30:37 <lambdabot> ()
16:30:39 <ski> (hence `prefixr')
16:31:04 <ski> > let (! not -> x) = False in x
16:31:05 <lambdabot> <hint>:1:12: error: parse error on input ‘->’
16:31:22 <zzz> ?
16:31:46 <ski> > let (~ not -> x) = False in x
16:31:48 <lambdabot> error:
16:31:48 <lambdabot> Pattern syntax in expression context: ~not
16:32:16 rockymarine joins (~rocky@user/rockymarine)
16:33:24 <monochrom> maybe you need ~(not->x)
16:33:44 <ski> oh .. i did manage to goof it up. it should be : application,strict,view,lazy,record. i managed to swap strict and lazy
16:33:49 × gmg quits (~user@user/gehmehgeh) (Remote host closed the connection)
16:34:07 <EvanR> expand ~(not->x)
16:34:13 <ski> `~' binds tighter than `!' (contrary to what i just claimed above)
16:34:17 <EvanR> ~ ( not -> x )
16:34:29 <ski> and `->' is inbetween, `~' binds looser, and `!' tighter
16:35:33 <int-e> > let !(not -> ~False) = False in 42
16:35:34 <lambdabot> 42
16:36:00 <monochrom> This is one of those times I want the opposite of what most people want. Most people want "how do I avoid parentheses?". I want "how do I avoid the precedence table?".
16:36:17 <EvanR> apparently precedence er, associativity of _ ? _ : _ matters because _ ? _ : _ ? _ : _ is ambiguous. no idea if I implemented my parser correctly xD
16:36:35 <int-e> > (*) 1 ((+) 3 4)
16:36:36 <lambdabot> 7
16:36:52 <EvanR> code only a lisper could love
16:37:06 <int-e> no precedences
16:37:38 <monochrom> I still like infix. I can take 1*(3+4) and 1+(3*4)
16:38:20 <int-e> EvanR: For fun, I'll write this with pleasure. I wouldn't want to see it in production anywehre.
16:38:31 <ski> hence it complaining about `~' in expression syntax, since it reads `~ not -> x' as `(~ not) -> x'. while not complaining about that for `! not -> x', hmm .. yes `! (not -> x)' is allowed, so i guess that means `->' doesn't bind tighter than `!' (keeping in mind that is `prefix' rather than `prefixr'). so `->' ought to be either the same precedence as `!', or less
16:39:10 <int-e> (there's a huge difference between an ephemeral IRC message of no particular purpose and code that might be read dozens of times)
16:39:21 <EvanR> true ? false : true ? false : true
16:39:22 <ski> EvanR : how is that ambiguous ?
16:39:46 jakalx parts (~jakalx@base.jakalx.net) (Error from remote client)
16:40:02 <EvanR> I mean it's not ambiguous if you decide which way to put parens
16:40:09 <int-e> ...
16:40:51 <ski> `_ ? _ : (_ ? _ : _)' is ok, `_ ? (_ : _ ? _) : _' is nonsense (syntax error). which is the alternative interpretation ?
16:41:05 <EvanR> (_ ? _ : _) ? _ : _
16:41:10 <ski> oh, i guess it's .. that :)
16:41:15 <ski> right, ty
16:41:36 <EvanR> now I'm paranoid about like, every construction
16:41:36 <int-e> > let (?) = (-) in 1 ? 2 ? 3 -- unrelated
16:41:38 <lambdabot> -4
16:43:05 <int-e> `_ ? (_ : _ ? _) : _` makes perfect sense in Haskell. Well... maybe not quite perfect. But it makes sense.
16:43:15 int-e is having trouble with context as usual
16:43:52 <EvanR> code should start in the middle and grow left or right, mario3 instead of like mario1
16:43:58 <EvanR> er, left and right
16:44:02 wootehfoot joins (~wootehfoo@user/wootehfoot)
16:44:13 × wootehfoot quits (~wootehfoo@user/wootehfoot) (Remote host closed the connection)
16:47:05 wootehfoot joins (~wootehfoo@user/wootehfoot)
16:47:07 Guest53 joins (~Guest53@p200300ef971835186586f89dc41cda0a.dip0.t-ipconnect.de)
16:48:02 jakalx joins (~jakalx@base.jakalx.net)
16:49:00 × dolio quits (~dolio@130.44.130.54) (Quit: ZNC 1.8.2 - https://znc.in)
16:49:18 <EvanR> > let (?) = (++) in [] ? ([] : [] ? []) : []
16:49:20 <Guest53> Is dependency hell still a thing? I have one executable "build-depends: yesod", a second executable "build-depends: shakespeare, blaze-html" and I get "Dependency on unbuildable library from yesod". If I comment out of the executables "cabal build/run" works fine.
16:49:20 <lambdabot> [[[]]]
16:49:45 <Guest53> *one of
16:50:06 <zzz> i have no idea how i, as a beginner, was able to follow any conversation in this channel and keep my motivation up
16:50:26 dolio joins (~dolio@130.44.130.54)
16:51:02 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
16:51:39 <EvanR> you're either driven mad running away from cthulu or drawn in closer to the inner circle, before going mad later
16:52:05 <dminuoso> Bah interleaving effects in a parser is such a bad idea. :(
16:52:22 <dminuoso> I think I will ditch megaparsec for alex
16:52:48 × dolio quits (~dolio@130.44.130.54) (Client Quit)
16:53:08 <Guest53> Is it possible that the dependencies of my first exe (shakespeare, blaze-html) are are clashing with the fact that yesod depends on shakespeare and blaze-html and my second exe depends on yesod? Could this be the problem?
16:53:41 <dminuoso> Guest53: Dependency hell is a thing that arises when installing dependencies into a singular global namespace
16:53:55 <dminuoso> But that has been removed a long time ago with cabal new-style build, which for many years has become the default.
16:53:59 dolio joins (~dolio@130.44.130.54)
16:55:16 × rockymarine quits (~rocky@user/rockymarine) (Ping timeout: 244 seconds)
16:55:22 <Guest53> dminuoso: I see. Do you have any suggestions where I could to fix this "Dependency on unbuildable library from yesod"?
16:55:30 <Guest53> *where I could look
16:56:06 <dminuoso> Guest53: Based on the diagnostic you are seeing, you should probably update cabal
16:56:32 × coot quits (~coot@89-76-160-4.dynamic.chello.pl) (Quit: coot)
16:56:48 <dminuoso> Since 3.4.0.0 you should be seeing *which* library is apparently unbuildable
16:57:45 coot joins (~coot@89-76-160-4.dynamic.chello.pl)
16:57:56 × coot quits (~coot@89-76-160-4.dynamic.chello.pl) (Remote host closed the connection)
16:58:07 coot joins (~coot@89-76-160-4.dynamic.chello.pl)
17:00:59 <Guest53> Updated cabal to 3.8.1.0. Same problem.     Dependency on unbuildable library from yesod. In the stanza 'executable exe2'. In the inplace package 'myproject' where exe 2 is the exe depending on yesod and myproject ist just the name of my project / the unnamend library stanza.
17:02:13 <Guest53> Or do you mean I should update the cabal-version and not cabal itself. I read somewhere that these are different things.
17:02:35 <dminuoso> Guest53: Ah okay hold on, Im diving into the cabal source code
17:03:03 <dminuoso> So `Dependency on unbuidlable library from yesod` means that the main library of yesod itself is considered unbuildable
17:03:21 <Guest53> ok
17:03:35 redmp joins (~redmp@mobile-166-171-249-135.mycingular.net)
17:03:50 <Guest53> So is it wrong to simply do "build-depends: yesod"? Is there a more elaborate approach to install it?
17:04:08 <dminuoso> Let me look at `yesod`
17:04:53 <dminuoso> https://hackage.haskell.org/package/yesod-1.6.2.1/src/yesod.cabal
17:04:57 <dminuoso> It looks very much buildable to me mmm
17:05:12 <dminuoso> Can you share your cabal file perhaps for contexdt?
17:05:28 Cerins joins (~Cerins@balticom-142-106-43.balticom.lv)
17:05:33 × Cerins quits (~Cerins@balticom-142-106-43.balticom.lv) (Remote host closed the connection)
17:05:36 × matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 244 seconds)
17:06:58 <Guest53> Upload it somewhere? Don't want to spam.
17:07:24 <dminuoso> Feel free to use https://paste.tomsmeding.com/
17:09:13 × redmp quits (~redmp@mobile-166-171-249-135.mycingular.net) (Ping timeout: 246 seconds)
17:10:37 × wootehfoot quits (~wootehfoo@user/wootehfoot) (Ping timeout: 246 seconds)
17:10:43 <Guest53> dminuoso: https://paste.tomsmeding.com/QrnXHu9c
17:11:08 redmp joins (~redmp@mobile-166-137-178-096.mycingular.net)
17:12:42 econo joins (uid147250@user/econo)
17:13:28 <dminuoso> Guest53: Okay that looks surprising. Can you provide a reproducer maybe at github or gitlab?
17:14:32 <Guest53> Surprisingly ok or surprising as in "weird project setup"?
17:14:52 <dminuoso> The former
17:22:49 rockymarine joins (~rocky@user/rockymarine)
17:24:09 matthewmosior joins (~matthewmo@173.170.253.91)
17:25:58 <sm> it might be worth searching the bet for that error also if you haven't
17:26:17 <sm> the net, even
17:27:29 wootehfoot joins (~wootehfoo@user/wootehfoot)
17:29:59 <sm> does that example cabal file reproduce the error ?
17:31:12 <sm> does "cabal build yesod" work ?
17:32:30 × wootehfoot quits (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer)
17:37:02 × mbuf quits (~Shakthi@49.205.83.245) (Quit: Leaving)
17:37:09 × raym quits (~raym@user/raym) (Quit: leaving)
17:40:06 <Guest53> sm: currently trying to reproduce the error in a new minimal project and so far failing to reproduce it ;)
17:40:20 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
17:44:12 × notzmv quits (~zmv@user/notzmv) (Ping timeout: 264 seconds)
17:46:37 <EvanR> if you can't reproduce it, it doesn't exist and never did! That's science
17:47:15 <EvanR> (warped science)
17:51:02 f-a joins (~f-a@151.82.158.94)
17:52:22 × matthewmosior quits (~matthewmo@173.170.253.91) (Remote host closed the connection)
17:52:28 matthewmosior joins (~matthewmo@173.170.253.91)
17:54:12 raym joins (~raym@user/raym)
17:56:23 szkl joins (uid110435@id-110435.uxbridge.irccloud.com)
17:58:54 <Guest53> Ok I copied everything bit by bit recompiling every time to reproduce the error. diff says the files are identical (apart from some comments). I don't know I'm just happy it works now. thanks everyone.
18:00:21 <sm> try to make them identical ? could be an invisible character in there
18:01:13 × rockymarine quits (~rocky@user/rockymarine) (Ping timeout: 250 seconds)
18:02:14 <Guest53> Could be. The only difference now is that the old project contains file names Like__this3___.hs and comments containing unicode symbols.
18:03:42 <sm> next time, just mention that the paste isn't a reproducer
18:03:47 × matthewmosior quits (~matthewmo@173.170.253.91) (Remote host closed the connection)
18:04:46 matthewmosior joins (~matthewmo@37.19.200.26)
18:05:12 ski . o O ( parsers over `STM' )
18:05:38 Oiyqlk joins (~rscastilh@191-214-26-24.user.veloxzone.com.br)
18:08:01 × redmp quits (~redmp@mobile-166-137-178-096.mycingular.net) (Quit: leaving)
18:08:17 <zzz> ok let's imagine that i have `class (Eq a, Enum a, Bounded a) => Cycle a where next a = if a == maxBound then minBound else succ a ; prev a = if a == minBound then maxBound else pred a`
18:08:23 <Guest53> sm: Do you mean the tomsmeding paste? That is from the original project the one that doesn't work.
18:08:23 <zzz> why can't i just derive this class?
18:09:23 <sm> Guest53: oh so that is the exact failing cabal file ? that's what I was asking
18:09:35 <Guest53> yes it is
18:09:50 <sm> 👍🏻
18:10:30 <ski> zzz : why not just define `next :: (Eq a,Enum a,Bounded a) => a -> a', without any `Cycle' class ?
18:10:40 <ski> why do you want / think you need a class at all ?
18:10:45 <monochrom> :)
18:11:27 <zzz> fair enough
18:11:37 <ski> what utility would using a class buy you (over such a freestanding, class-overloaded, `next') ? especially since you say you can't derive it
18:13:31 takuan joins (~takuan@178-116-218-225.access.telenet.be)
18:13:43 <ski> (`deriving' is mostly ad-hoc magic. `GeneralizedNewtypeDeriving'/`GeneralisedNewtypeDeriving' is general (not specific to particular classes), but already assumes that the representation type is an instance of the class)
18:14:20 f-a parts (~f-a@151.82.158.94) ()
18:14:25 rockymarine joins (~rocky@user/rockymarine)
18:16:01 <zzz> i'm still cultivating my intuition for when to use classes
18:17:25 vorpuni joins (~pvorp@2001:861:3881:c690:bc6d:def:d698:14f7)
18:18:33 <EvanR> so generalized newtype deriving is good and normal deriving is bad?
18:19:29 × razetime quits (~quassel@117.193.6.133) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
18:23:05 <ski> (also there's `DerivingVia',`DeriveAnyClass' .. latter to be used with default method implementations in the class, possibly also with `DefaultSignatures')
18:23:24 <ski> ad-hoc is bad ?
18:23:56 <ski> it's .. ad hoc. in some senses i guess one could claim it's bad
18:24:02 <EvanR> sounds bad
18:24:42 <EvanR> but now I'm projecting many usages of ad-hoc from blogs on such as Badness monad post
18:25:26 <EvanR> making adhoc overloading less adhoc
18:26:04 qhong joins (~qhong@rescomp-21-400677.stanford.edu)
18:26:08 ski . o O ( "post hoc","post/cum hoc, ergo propter hoc","ex post" )
18:26:49 <EvanR> when you get used to stuff that's apparently not ad hoc in haskell, it's addictive and you wonder what could solve the ad hoc stuff better
18:28:22 davean joins (~davean@davean.sciesnet.net)
18:29:09 <monochrom> Absolute ad hoc is bad, but as usual, nothing in practice is absolute ad hoc.
18:29:32 <EvanR> speaking of adhoc, is there a "this library slaps" level replacement for Show
18:29:51 <EvanR> pretty print the stuff the Show would normally show
18:30:06 <EvanR> or full scale replacement
18:30:09 <monochrom> Eq and Ord show that relative, reasoned ad hoc is good.
18:30:58 Guest53 parts (~Guest53@p200300ef971835186586f89dc41cda0a.dip0.t-ipconnect.de) ()
18:33:16 <ski> i guess there's several pretty-printing packages
18:33:28 × king_gs quits (~Thunderbi@2806:103e:29:ac5e:a16e:4ac9:a89b:4d) (Remote host closed the connection)
18:33:46 king_gs joins (~Thunderbi@2806:103e:29:ac5e:a16e:4ac9:a89b:4d)
18:34:26 <sm> EvanR: like pretty-show, pretty-simple ?
18:34:53 <EvanR> checking those out now
18:35:21 <EvanR> I randomly tried one the other day and it was... drab
18:35:54 michalz joins (~michalz@185.246.207.217)
18:39:20 ski recalls reading a few pretty-printing papers
18:39:48 × matthewmosior quits (~matthewmo@37.19.200.26) (Remote host closed the connection)
18:40:39 <ski> (one of them related the multiple passes to attribute grammars, talking about how one can represent an attribute grammar using a "tying-the-knot" fold (as well as the explicit staging fold))
18:44:30 matthewmosior joins (~matthewmo@37.19.200.26)
18:44:48 ski . o O ( <https://wiki.haskell.org/Attribute_grammar> )
18:45:24 × dtman34 quits (~dtman34@2601:446:4400:2ad9:49aa:be6d:b3ac:4bab) (Quit: ZNC 1.8.2+deb2+b1 - https://znc.in)
18:45:45 dtman34 joins (~dtman34@c-73-62-246-247.hsd1.mn.comcast.net)
18:47:22 × vulpine quits (xfnw@tilde.team) (Quit: Connection reset by purr)
18:49:35 Cerins joins (~Cerins@balticom-142-106-43.balticom.lv)
18:49:55 × Cerins quits (~Cerins@balticom-142-106-43.balticom.lv) (Remote host closed the connection)
18:53:16 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 260 seconds)
18:53:54 jmdaemon joins (~jmdaemon@user/jmdaemon)
18:54:13 Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915)
18:55:55 pavonia joins (~user@user/siracusa)
18:56:10 Sgeo joins (~Sgeo@user/sgeo)
18:56:46 × matthewmosior quits (~matthewmo@37.19.200.26) (Ping timeout: 260 seconds)
18:57:31 <EvanR> oooooo pretty-simple has colors, mind blown
19:00:46 <EvanR> but is a bit conservative with pairs... https://i.imgur.com/nzRcCW2.png
19:01:15 <EvanR> a whole line just for a lists comma
19:05:21 matthewmosior joins (~matthewmo@37.19.200.26)
19:05:28 <EvanR> better than the default though
19:07:05 arjun joins (~arjun@user/arjun)
19:10:28 × `2jt quits (~jtomas@88.17.232.105) (Ping timeout: 265 seconds)
19:16:12 <ski> points
19:16:22 <ski> (default being ?)
19:17:18 <ski> hm, i guess it's using (logical ?) tabs for indentation ?
19:19:25 <sm> yeah, pretty-show is more compact, but didn't handle dates/times (that might have changed since)
19:19:28 <ski> would be nice with a system that could do "parallel alignment"
19:19:40 <ski> (one might also call it "commutative", as in how there's multiple down-right paths from the upper corner of a rectangle to a point in it, but they all commute)
19:19:53 × rockymarine quits (~rocky@user/rockymarine) (Ping timeout: 252 seconds)
19:22:44 redmp joins (~redmp@mobile-166-137-178-096.mycingular.net)
19:23:30 acidjnk joins (~acidjnk@p200300d6e7137a29b83d7bde232748fa.dip0.t-ipconnect.de)
19:28:11 <zzz> what is naturalNegate?
19:28:16 <zzz> can't find the source
19:29:24 × mniip quits (mniip@libera/staff/mniip) (Quit: This page is intentionally left blank)
19:30:24 <EvanR> context?
19:30:56 <zzz> i was wondering about Numeric.Natural's instance of Num
19:31:20 <zzz> an there's a negate but if you use it it invariably gives you an error
19:32:02 rockymarine joins (~rocky@user/rockymarine)
19:32:49 <zzz> from the source: `negate = naturalNegate`
19:32:52 <zzz> which leads nwhere
19:33:36 <EvanR> i found some source
19:33:39 <EvanR> https://hackage.haskell.org/package/ghc-bignum-1.2/docs/src/GHC.Num.Natural.html#naturalNegate
19:33:48 × nate3 quits (~nate@98.45.169.16) (Ping timeout: 268 seconds)
19:34:07 × waldo quits (~waldo@user/waldo) (Ping timeout: 246 seconds)
19:34:08 <EvanR> it works for zero, otherwise raise an exception
19:34:44 <EvanR> > negate (0 :: Natural)
19:34:46 <lambdabot> error:
19:34:46 <lambdabot> Not in scope: type constructor or class ‘Natural’
19:36:34 × rockymarine quits (~rocky@user/rockymarine) (Ping timeout: 265 seconds)
19:44:09 dsrt^ joins (~dsrt@173-160-76-137-atlanta.hfc.comcastbusiness.net)
19:47:55 rockymarine joins (~rocky@user/rockymarine)
19:52:53 shriekingnoise joins (~shrieking@186.137.167.202)
19:54:31 jakalx parts (~jakalx@base.jakalx.net) ()
19:55:49 × redmp quits (~redmp@mobile-166-137-178-096.mycingular.net) (Ping timeout: 252 seconds)
19:56:22 jakalx joins (~jakalx@base.jakalx.net)
19:58:36 × king_gs quits (~Thunderbi@2806:103e:29:ac5e:a16e:4ac9:a89b:4d) (Ping timeout: 264 seconds)
19:59:34 nate3 joins (~nate@98.45.169.16)
20:04:07 × nate3 quits (~nate@98.45.169.16) (Ping timeout: 265 seconds)
20:04:26 <EvanR> say you have a working interpreter written in haskell. is there a slick way to bundle the haskell runtime with the script to form a "standalone" exe
20:05:53 Lycurgus joins (~juan@user/Lycurgus)
20:06:08 notzmv joins (~zmv@user/notzmv)
20:06:38 Guest53 joins (~Guest53@p5b0627ab.dip0.t-ipconnect.de)
20:09:11 <Guest53> Can I see the return "type" of a QuasiQuoter? The docs say "shamlet :: QuasiQuoter" but "[shamlet|...|] :: Markup". How do I know that shamlet produces a Markup value without using a type hole?
20:09:42 × coot quits (~coot@89-76-160-4.dynamic.chello.pl) (Quit: coot)
20:09:48 × biberu quits (~biberu@user/biberu) (Read error: Connection reset by peer)
20:11:16 <c_wraith> QuasiQuoters don't use typed TH so.. You can't from the types of anything in that API.
20:11:43 <c_wraith> You have to hope the documentation tells you
20:12:04 <Guest53> So the only way to know is to put it in "[quasiquoter|...]" and then ":: _"
20:12:07 × matthewmosior quits (~matthewmo@37.19.200.26) (Ping timeout: 244 seconds)
20:12:11 stiell_ joins (~stiell@gateway/tor-sasl/stiell)
20:13:28 <c_wraith> Usually the documentation tells you, so you can skip that step
20:14:15 <Guest53> thanks
20:14:39 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
20:16:20 biberu joins (~biberu@user/biberu)
20:19:59 <c_wraith> QuasiQuoters are... kind of unfortunately too general. They are designed to be usable to generate declarations, types, expressions, or patterns.
20:20:10 <c_wraith> Except very few actually do that
20:20:27 <c_wraith> You have to define a separate handler for each context, and very few do anything other than expressions
20:21:27 <c_wraith> We'd probably benefit from a second type of QuasiQuoter. One that uses the same splice syntax, but only generates expressions, and goes via typed TH so that the type of the generated expression shows up in the type of the QuasiQuoter
20:22:50 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
20:24:09 matthewmosior joins (~matthewmo@37.19.200.26)
20:26:15 × dsrt^ quits (~dsrt@173-160-76-137-atlanta.hfc.comcastbusiness.net) (Ping timeout: 252 seconds)
20:27:40 × rockymarine quits (~rocky@user/rockymarine) (Ping timeout: 246 seconds)
20:28:05 ddellacosta joins (~ddellacos@89.45.224.187)
20:31:52 × titibandit quits (~titibandi@xdsl-87-78-162-143.nc.de) (Ping timeout: 246 seconds)
20:32:12 titibandit joins (~titibandi@137.226.196.214)
20:32:21 × Everything quits (~Everythin@37.115.210.35) (Quit: leaving)
20:34:01 × titibandit quits (~titibandi@137.226.196.214) (Read error: Connection reset by peer)
20:34:09 pera joins (~pera@user/pera)
20:35:07 × Me-me quits (~me-me@v.working.name) (Changing host)
20:35:07 Me-me joins (~me-me@user/me-me)
20:36:19 × Athas quits (athas@2a01:7c8:aaac:1cf:5a6a:37a5:b994:6597) (Quit: ZNC 1.8.2 - https://znc.in)
20:36:28 Athas joins (athas@sigkill.dk)
20:37:25 <dminuoso> EvanR: You can use TemplateHaskell to write a program that loads the interpreter as a library, and loads the script off the harddisk at compilation time.
20:38:12 nate3 joins (~nate@98.45.169.16)
20:38:39 <EvanR> interesting
20:41:20 rockymarine joins (~rocky@user/rockymarine)
20:42:56 × TonyStone quits (~TonyStone@2603-7080-8607-c36a-01cb-cda3-629f-bfc2.res6.spectrum.com) (Quit: Leaving)
20:43:31 <sm> or you can embed the script in the executable
20:44:05 <dminuoso> Doesnt cabal have some facility to do this?
20:44:46 <sm> that's stack or cabal scripts - a weaker definition of bundle and exe. You can ship a single file, but it also requires the stack or cabal executable
20:45:08 <EvanR> yeah that's less standalone
20:45:09 dsrt^ joins (~dsrt@173-160-76-137-atlanta.hfc.comcastbusiness.net)
20:45:26 TonyStone joins (~TonyStone@2603-7080-8607-c36a-01cb-cda3-629f-bfc2.res6.spectrum.com)
20:45:39 × arjun quits (~arjun@user/arjun) (Quit: Leaving)
20:45:43 <sm> in between these two.. you can ship a bash script which installs stack or cabal and then runs or compiles the thing
20:47:11 <sm> I think the slickest for a user would be a compiled binary containing both interpreter and script - not sure why it would need TH dminuoso ?
20:47:51 <EvanR> presumably for the binary creator to swap in different scripts
20:48:13 <dminuoso> sm: TH lets you do IO at compilation time.
20:48:21 <dminuoso> So you can readFile the script and bake it into the binary
20:48:40 <sm> oh right you are.. file-embed which I'm thinking of uses TH
20:48:47 <dminuoso> As long as the interpreter already has an API interface, this requires an absolute minimum of effort
20:49:17 <sm> I guess there is another way (embed as a haskell literal as a separate step)
20:49:36 <dminuoso> I have various other options in mind, but none of them are trivial, like rewrapping the ELF
20:49:56 × TonyStone quits (~TonyStone@2603-7080-8607-c36a-01cb-cda3-629f-bfc2.res6.spectrum.com) (Ping timeout: 260 seconds)
20:50:01 <sm> can we involve Actually Portable Executables somehow...
20:50:01 <dminuoso> Oh there is one other idea!
20:50:04 <EvanR> oh that sounds like fun
20:50:15 <dminuoso> EvanR: You can just ship everything in a bash script!
20:50:24 <EvanR> compile to bash
20:50:29 <EvanR> it's finally solved
20:50:35 <EvanR> then turns out their on windows
20:50:46 <sm> I was considering that once
20:50:56 <sm> even windows can run bash now ? but I guess still not easily
20:51:02 <monochrom> Let them have WSL.
20:51:09 <int-e> dminuoso: and gog is doing it
20:51:14 <EvanR> compile to DOS commands. Ok it's not DOS anymore
20:51:21 × david quits (~david@2a01:e34:ec2b:d430:44a:f5ca:9867:d69d) (Quit: Konversation terminated!)
20:51:23 <EvanR> powershell
20:51:24 <int-e> (shipping as bash scripts)
20:51:53 <sm> not entirely compiled to bash though, I imagine
20:52:12 <dminuoso> Starting with the wrapper script, and then in a trailing heredoc you include the script + haskell executable. Keep script length around as an offset, extract haskell executable, run it and feed script via stdin.
20:52:30 titibandit joins (~titibandi@xdsl-87-78-162-143.nc.de)
20:52:38 <monochrom> In the last days of King Louis XVI of France, the common people were upset because they couldn't run Louis's bash scripts on Windows. Queen Marie Antonique said "so just use WSL", and that started the French Revolution.
20:52:48 <dminuoso> But honestly, I would just flip on TH. :)
20:53:12 <dminuoso> It's extremely low effort, and works relatively portably
20:53:14 <sm> embed script in interpreter, or embed interpreter in script :)
20:53:57 <int-e> monochrom: be careful, you might end up like https://esoteric.codes/blog/the-128-language-quine-relay
20:54:11 <dminuoso> EvanR: You might be able to pull something off with a custom Setup.hs too, something where you auto-generate modules based off local disks.
20:54:19 <dminuoso> I *think* this is the cleanest solution
20:54:29 <sm> ugh, that sounds like pain
20:54:30 <dminuoso> Except you will have to endure the headaches of dealing with Cabal-the-library
20:55:18 <EvanR> actualling using Setup.hs
20:55:27 <EvanR> actually*. crazy
20:57:05 Linux is now known as QNX
20:57:46 × rockymarine quits (~rocky@user/rockymarine) (Ping timeout: 265 seconds)
20:58:29 <dminuoso> It would be kind of nice if we had a way to simply include assets into the build process, such that they get baked into the binary but accessible via say readFile
20:58:45 <dminuoso> Heck or even custom functions for that
20:58:48 <dminuoso> readFileFromAssets
20:59:09 <dminuoso> This would solve a major problem I have right now. :)
20:59:10 edrx joins (~Eduardo@2804:56c:d2dc:ac00:dab8:211d:d4eb:fa94)
20:59:20 <EvanR> construct a Handle that looks inside the program itself and use hGet etc?
20:59:45 <c_wraith> You can build that.
20:59:48 <EvanR> can Handles be arbitrarily repurposed
21:00:12 <int-e> embed a user-space file system
21:00:28 <int-e> if custom Handles seem too easy
21:00:30 <dminuoso> Well you can craft a custom Handle__ and sneak it inside a FileHandle...
21:00:42 <dminuoso> That part seems relatively easy
21:01:04 <EvanR> nothing to it
21:02:08 rockymarine joins (~rocky@user/rockymarine)
21:03:56 TonyStone joins (~TonyStone@2603-7080-8607-c36a-01cb-cda3-629f-bfc2.res6.spectrum.com)
21:07:01 <dminuoso> Under the hood all we have to do is just generate a symbol for some binary blob and
21:07:16 <dminuoso> Then sprinkle some magic on GHC and cabal
21:07:26 <dminuoso> Think I have some dust left..
21:08:01 <c_wraith> dminuoso: https://hackage.haskell.org/package/template-haskell-2.19.0.0/docs/Language-Haskell-TH-Lib.html#v:bytesPrimL
21:08:24 <dminuoso> Mmmm
21:08:38 <c_wraith> It gives you an Addr# at runtime
21:08:54 <dminuoso> c_wraith: I guess we can also generate a module with a big fat Addr# literal too.
21:08:55 × pera quits (~pera@user/pera) (Quit: leaving)
21:09:04 <dminuoso> Avoids the need for TH
21:09:24 <edrx> why is the first "do" below ok but not the second?
21:09:26 <edrx> do x <- [1..3]; y <- [1..3]; return (x,y)
21:09:26 <edrx> do x <- [1..3]; y <- [1..3]; return 10*x+y
21:09:40 <c_wraith> I was recently surprised to learn TH isn't the slowdown for compilation that it used to be
21:09:49 <EvanR> (return 10)*x+y
21:09:49 <edrx> the error is: <interactive>:20:1: error: * Non type-variable argument in the constraint: Enum [b] (Use FlexibleContexts to permit this) * When checking the inferred type it :: forall b. (Enum [b], Num b, Num [b]) => [b]
21:09:58 <dminuoso> edrx: function application binds tighter than almost everything.
21:10:34 <dminuoso> c_wraith: It's certainly not as bad as Generics most of the time.
21:10:37 <EvanR> this ain't your Dad's C return
21:10:44 <edrx> aaaaahhhhh!!!!!
21:10:49 <edrx> sorry! =)
21:11:06 <dminuoso> With Generics you get extremely poor compilation time *and* not even a guarantee of Generics being erased
21:11:06 <EvanR> aka pure
21:11:11 <dminuoso> Worst of all worlds.
21:12:57 × Lycurgus quits (~juan@user/Lycurgus) (Quit: Exeunt juan@acm.org)
21:14:30 <sm> what's the major problem dminuoso ?
21:15:58 <dminuoso> sm: I want to publish a RADIUS library, as part of it I want to include the freeRADIUS dictionaries. And Im somewhat stuck debating how to do that.
21:16:13 <sm> I access files like https://hackage.haskell.org/package/hledger-1.27.1/docs/src/Hledger.Cli.DocFiles.html#toolDocs with custom code. But there have been situations where I had to interact with something external that had to read from disk, for those I write it out to /tmp at runtime
21:16:15 <dminuoso> One solution is to use TemplateHaskell, and include their parsed artifacts as just top level bindings, exposing them to the user.
21:16:40 <sm> nod
21:27:29 × rockymarine quits (~rocky@user/rockymarine) (Ping timeout: 252 seconds)
21:29:02 × titibandit quits (~titibandi@xdsl-87-78-162-143.nc.de) (Remote host closed the connection)
21:35:53 <edrx> ski: I just got - and, read, and understood - your hints about the pragma InstanceSigns! thanks =)
21:41:06 rockymarine joins (~rocky@user/rockymarine)
21:42:28 × econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity)
21:46:33 × ellensol quits (~ellen@178-78-210-152.customers.ownit.se) (Ping timeout: 252 seconds)
21:48:44 jargon joins (~jargon@184.101.186.15)
21:50:30 burnsidesLlama joins (~burnsides@119247164140.ctinets.com)
21:55:47 × Tuplanolla quits (~Tuplanoll@91-159-69-34.elisa-laajakaista.fi) (Quit: Leaving.)
21:55:52 × burnsidesLlama quits (~burnsides@119247164140.ctinets.com) (Ping timeout: 246 seconds)
21:56:28 <Guest53> I don't understand why badFoo doesn't work. The 3 lines look equivalent to me:
21:56:30 <Guest53> goodFoo1 = renderHtml [shamlet|#{reverse $ fmap toUpper "foo" }|]
21:56:31 <Guest53> goodFoo2 = renderHtml [shamlet|#{reverse $ fmap toUpper $ "foo" }|]
21:56:32 <Guest53> badFoo = renderHtml[shamlet|#{reverse . fmap toUpper $ "foo" }|]
21:57:21 <Guest53> Is function composition not allowed when interpolation Haskell expressions?
21:57:27 × thyriaen quits (~thyriaen@2a02:8109:8340:686c:7383:e0e2:ad95:9fce) (Remote host closed the connection)
21:59:41 waleee joins (~waleee@h-176-10-137-138.NA.cust.bahnhof.se)
22:00:11 × litharge quits (litharge@libera/bot/litharge) (*.net *.split)
22:03:57 <c_wraith> Guest53: that depends *entirely* on what the quasiquoter does. There is no standard interpolation mechanism for quasiquotes
22:04:34 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
22:07:02 <Guest53> So it's probably better to compute the value in a "where x = expr" and then simply do "#{x}"
22:08:08 <sm> IIRC the shamlet parser is not as powerful as the normal haskell parser. Pretty sure it's separately implemented, so not as powerful
22:09:24 <sm> but isn't that precedence wrong ? does it work in regular haskell ?
22:11:11 × michalz quits (~michalz@185.246.207.217) (Remote host closed the connection)
22:13:20 <Guest53> Yes, that works. reverse and fmap toUpper are both functions from String to String and "foo" is a String. I'll just put the things I want to interpolate in variables and use the variables with the interpolation syntax.
22:18:34 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
22:18:58 × rockymarine quits (~rocky@user/rockymarine) (Ping timeout: 265 seconds)
22:20:45 rockymarine joins (~rocky@user/rockymarine)
22:24:24 × nate3 quits (~nate@98.45.169.16) (Ping timeout: 244 seconds)
22:25:44 × rockymarine quits (~rocky@user/rockymarine) (Ping timeout: 265 seconds)
22:26:24 × acidjnk quits (~acidjnk@p200300d6e7137a29b83d7bde232748fa.dip0.t-ipconnect.de) (Ping timeout: 268 seconds)
22:30:03 rockymarine joins (~rocky@user/rockymarine)
22:34:01 × sudden quits (~cat@user/sudden) (Ping timeout: 246 seconds)
22:34:58 sudden joins (~cat@user/sudden)
22:38:47 × matthewmosior quits (~matthewmo@37.19.200.26) (Ping timeout: 265 seconds)
22:48:56 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
22:50:10 nate3 joins (~nate@98.45.169.16)
22:50:58 matthewmosior joins (~matthewmo@37.19.200.26)
22:55:23 × matthewmosior quits (~matthewmo@37.19.200.26) (Ping timeout: 244 seconds)
22:59:20 <monochrom> > (reverse $ fmap toUpper "foo", reverse $ fmap toUpper $ "foo", reverse . fmap toUpper $ "foo")
22:59:21 <lambdabot> ("OOF","OOF","OOF")
23:00:25 <EvanR> I'm editing a README.md and as soon as I put italic markers (*) my terminal font went italic. My brain just exploded
23:00:52 <monochrom> That's some terminal. :)
23:00:52 <EvanR> what's next, reaction memes
23:01:30 × nate3 quits (~nate@98.45.169.16) (Ping timeout: 265 seconds)
23:01:34 <EvanR> if it was an electron beam I guess italic wouldn't be that hard
23:01:39 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
23:02:23 <monochrom> Next it can play music when it displays "Bb G# C E"
23:03:57 <monochrom> If your computer has an aroma generator, the terminal can request it to produce the aroma of deep fried breaded pork cutlet when it displays the string "ton katsu".
23:09:01 × chomwitt quits (~chomwitt@2a02:587:dc14:f500:7fb4:d182:20a9:76c8) (Ping timeout: 246 seconds)
23:10:15 <EvanR> to save on costs, the smell is produced by firing the electron beam at the user
23:10:40 <EvanR> (ok, electron beams can't penetrate atmospheric pressure at least at those voltages)
23:11:30 <EvanR> so they switched to proton beams
23:18:14 × fjMSX quits (~hypni2p@2.92.213.55) (Read error: Connection reset by peer)
23:22:58 edrx parts (~Eduardo@2804:56c:d2dc:ac00:dab8:211d:d4eb:fa94) (Killed buffer)
23:24:35 matthewmosior joins (~matthewmo@37.19.200.26)
23:25:24 fjMSX joins (~hypni2p@2.92.213.55)
23:28:37 × rockymarine quits (~rocky@user/rockymarine) (Ping timeout: 260 seconds)
23:30:02 <zzz> why does ansi-terminal-game reference ansi-terminal's setSGR here? https://hackage.haskell.org/package/ansi-terminal-game-1.8.0.0/docs/Terminal-Game.html#t:Color
23:30:26 nate3 joins (~nate@98.45.169.16)
23:31:14 burnsidesLlama joins (~burnsides@119247164140.ctinets.com)
23:31:21 <dminuoso> zzz: It's just meant as additional information to understand that while you may pick Magenta the data constructor, your terminal might not be rendering the color magenta.
23:31:52 <dminuoso> It's possibly an old relict from older times perhaps
23:31:53 <zzz> but why reference something from another library that people may or may not be familiar with?
23:32:03 <zzz> dminuoso: that's what i thought
23:32:13 <sm> it's built on top of it, you're expected to know both I think
23:32:34 litharge joins (litharge@libera/bot/litharge)
23:32:44 <sm> right f-a ?
23:32:47 <dminuoso> sm: Well its still odd.
23:32:59 <dminuoso> They could just use `color` from the same library on the same page to make the same argument.
23:33:01 <dminuoso> :-)_
23:33:17 × emmanuelux quits (~emmanuelu@2a01cb0000f39300d565fcaab8cd0e44.ipv6.abo.wanadoo.fr) (Ping timeout: 260 seconds)
23:33:27 <sm> I see
23:34:30 × ddb quits (~ddb@ipv6two.tilde.club) (Quit: WeeChat 3.5)
23:35:05 <EvanR> Unforunately no one can be told what color is. You have to see it for yourself
23:35:20 × nate3 quits (~nate@98.45.169.16) (Ping timeout: 265 seconds)
23:35:32 <zzz> the example even contemplates `SetColor *Foreground* Vivid Green` which for a second there got me all hopeful I could have more than 4 bit color
23:35:36 × burnsidesLlama quits (~burnsides@119247164140.ctinets.com) (Ping timeout: 260 seconds)
23:39:15 burnsidesLlama joins (~burnsides@119247164140.ctinets.com)
23:40:16 <sm> I.. think you can ?
23:40:33 <sm> somehow
23:41:07 rockymarine joins (~rocky@user/rockymarine)
23:42:42 emmanuelux joins (~emmanuelu@2a01cb0000f3930084f66f2b145dbee5.ipv6.abo.wanadoo.fr)
23:44:38 nate3 joins (~nate@98.45.169.16)
23:45:42 × rockymarine quits (~rocky@user/rockymarine) (Ping timeout: 264 seconds)
23:53:21 <zzz> you can?

All times are in UTC on 2022-09-25.