Home liberachat/#haskell: Logs Calendar

Logs on 2023-01-15 (liberachat/#haskell)

00:00:47 justsomeguy joins (~justsomeg@user/justsomeguy)
00:02:34 × AlexZenon quits (~alzenon@178.34.160.164) (Ping timeout: 260 seconds)
00:03:44 × Alex_test quits (~al_test@178.34.160.164) (Ping timeout: 260 seconds)
00:05:32 L29Ah joins (~L29Ah@wikipedia/L29Ah)
00:06:31 AlexZenon joins (~alzenon@178.34.160.164)
00:06:56 shapr joins (~user@68.54.166.125)
00:07:28 × acidjnk quits (~acidjnk@p200300d6e715c494853e5ab7d1dcba05.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
00:08:34 Alex_test joins (~al_test@178.34.160.164)
00:10:08 × Tuplanolla quits (~Tuplanoll@91-159-68-152.elisa-laajakaista.fi) (Quit: Leaving.)
00:12:53 × liszt2 quits (sid336875@2a03:5180:f:3::5:23eb) ()
00:14:51 offdg^ joins (~offdg@76.145.190.81)
00:15:40 × mizlan quits (~mizlan@2607:f010:2a7:1005:e1d1:8a04:4a34:845a) (Ping timeout: 252 seconds)
00:19:25 mimmy_ joins (~mimmy@142.126.70.245)
00:23:38 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
00:23:55 × mimmy_ quits (~mimmy@142.126.70.245) (Ping timeout: 260 seconds)
00:28:12 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 272 seconds)
00:29:38 × elevenkb quits (~elevenkb@105.224.37.136) (Ping timeout: 260 seconds)
00:30:47 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 246 seconds)
00:32:16 mizlan joins (~mizlan@2607:f010:2a7:1005:e1d1:8a04:4a34:845a)
00:37:23 × fizbin quits (~fizbin@user/fizbin) (Ping timeout: 264 seconds)
00:39:34 fizbin joins (~fizbin@user/fizbin)
00:42:06 × offdg^ quits (~offdg@76.145.190.81) (Remote host closed the connection)
00:42:22 wroathe joins (~wroathe@207-153-38-140.fttp.usinternet.com)
00:42:22 × wroathe quits (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
00:42:22 wroathe joins (~wroathe@user/wroathe)
00:51:17 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
00:56:04 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 272 seconds)
00:56:18 jinsl- joins (~jinsl@2408:8207:255b:27c0:211:32ff:fec8:6aea)
00:57:11 × jinsl quits (~jinsl@2408:8207:255f:27d0:211:32ff:fec8:6aea) (Ping timeout: 264 seconds)
00:57:19 × L29Ah quits (~L29Ah@wikipedia/L29Ah) (Read error: Connection reset by peer)
01:01:19 × Inst quits (~Inst@2601:6c4:4081:54f0:3de7:12e6:ed3d:f8f8) (Ping timeout: 252 seconds)
01:04:23 × dcoutts_ quits (~duncan@host213-122-143-153.range213-122.btcentralplus.com) (Ping timeout: 246 seconds)
01:07:55 × fizbin quits (~fizbin@user/fizbin) (Ping timeout: 252 seconds)
01:10:30 jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
01:10:41 × albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
01:14:26 × cheater quits (~Username@user/cheater) (Ping timeout: 272 seconds)
01:15:50 × mizlan quits (~mizlan@2607:f010:2a7:1005:e1d1:8a04:4a34:845a) (Ping timeout: 260 seconds)
01:16:50 albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8)
01:17:25 mizlan joins (~mizlan@2607:f010:2a7:1005:e1d1:8a04:4a34:845a)
01:17:30 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
01:18:41 Inst joins (~Inst@2601:6c4:4081:54f0:3de7:12e6:ed3d:f8f8)
01:21:40 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 252 seconds)
01:21:54 <Inst> How familiar are people with OCaml?
01:22:29 <Inst> Nah, I'm probably wrong here, I was thinking OCaml was an OOP language via the first-class module system
01:22:59 <geekosaur> first class modules don't make SML/NJ OOP
01:23:00 <sshine> OCaml has support for object-oriented programming from way back when that got you drinks at the bar, but modern OCaml does not use the object system.
01:23:14 <geekosaur> OCaml doessupport OOP, but modules aren't why
01:23:16 × paulpaul1076 quits (~textual@95-29-5-111.broadband.corbina.ru) (Quit: My MacBook has gone to sleep. ZZZzzz…)
01:23:17 <sshine> the first-class module system predates OOP support
01:23:53 dsrt^ joins (~dsrt@76.145.190.81)
01:24:00 L29Ah joins (~L29Ah@wikipedia/L29Ah)
01:24:18 cheater joins (~Username@user/cheater)
01:24:31 <mauke> has ocaml grown documentation for its module system in the last 10-15 years?
01:24:40 <sshine> OCaml OOP: https://ocaml.org/docs/objects -- it is the 'class' and 'object' keywords that make it OOP.
01:25:06 <mauke> I've been meaning to learn about modules, but at the time there wasn't much apart from a few examples of the syntax
01:25:16 <sshine> mauke, Real World Ocaml v2 (https://dev.realworldocaml.org/) has more to say about the module system, yes. at least there are syntactic improvements.
01:26:15 <mauke> thanks, I'll have a look
01:28:11 × barak quits (~barak@77.125.90.25) (Ping timeout: 248 seconds)
01:28:12 cheater_ joins (~Username@user/cheater)
01:30:39 × cheater quits (~Username@user/cheater) (Ping timeout: 260 seconds)
01:30:47 cheater_ is now known as cheater
01:31:31 <sshine> Inst, https://dev.realworldocaml.org/objects.html -- here's a more modern take on OCaml OOP. :)
01:32:21 <sshine> Inst, whereas the module system is described under the chapters "Functors" and "First-Class Modules"
01:32:36 <Inst> it's more that I was looking at the Haskell module syntax, I was wondering if Haskell modules could have bene a way to retrofit OOP in
01:32:39 <Inst> with backpack, etc
01:32:58 <Inst> independent of my frankenstein instinct to break all purity
01:33:16 <Inst> i'm more wishing for a more robust module system in Haskell, or at the very least, the ability to have multiple modules in one file
01:33:45 <unit73e> packages are the poorly designed modules imo
01:33:47 × img quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in)
01:34:17 <unit73e> at least javascript got that mostly right
01:34:55 <sshine> Inst, Haskell could have had a module system that more resembled MLs, but this still isn't related to OOP.
01:35:22 <Inst> from what I read, Haskell designers somehow thought that ML module system was too fancy
01:35:27 <unit73e> what's the difference?
01:35:48 <sshine> unit73e, the difference between what? OOP and ML module systems?
01:36:09 <monochrom> ocaml has a first-class OO system, and this is orthogonal to its first-class module system. :)
01:36:12 <unit73e> sshine, between haskell modules and ML modules
01:36:21 razetime joins (~Thunderbi@117.193.4.145)
01:36:37 <unit73e> if it's something like module blocks, yeah that would be useful
01:36:39 img joins (~img@user/img)
01:37:16 <unit73e> kind off. I can get away without those.
01:38:08 <sshine> unit73e, ah! in ML you have higher-order modules, confusingly named functors.
01:38:27 <unit73e> hum ok, that could be useful
01:39:09 <unit73e> function namespace is the annoying bit in haskell, but what I do is go Javahaskell and have each file with it's own record, and just call A.function in other modules
01:39:10 <sshine> (well, confusing to a Haskeller)
01:39:38 <unit73e> so similar to what Java does, each class in its own file
01:39:39 <geekosaur> just don't go the whole way and give us C and T
01:39:55 × troydm quits (~troydm@user/troydm) (Ping timeout: 248 seconds)
01:40:13 <sshine> what are C and T?
01:40:44 <monochrom> My http://www.cs.utoronto.ca/~trebla/CSCC24-2022-Summer/04-haskell-types-2.html#modules happens to describe *ml module systems, if you can make sense out of the brief example.
01:40:48 <geekosaur> a certain infamous Haskeller names every typeclass C and every type T because the module name is enough to distinguish. until you haddock it
01:40:59 <unit73e> oof, no I don't do that
01:41:13 <unit73e> often I don't need qualifiers, I just do that in case I need
01:41:15 × waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 260 seconds)
01:41:17 <sshine> unit73e, you get some of the same modularity with type classes, but not at the package level.
01:41:48 <sshine> geekosaur, ah. I tried making every statement I make on IRC "S", as my intent should be evident from the context, but people didn't get it.
01:42:03 talismanick joins (~talismani@2601:200:c181:4c40::1be2)
01:42:21 fizbin joins (~fizbin@user/fizbin)
01:42:26 <monochrom> BTW because of this I have a personal beef that other Haskellers have beef against writing *.hs-boot for mutually importing modules. *.hs-boot is no harder than writing module sigs in *ml which is considered normal daily activity.
01:42:34 <unit73e> what I usually do is copy the structure of some other more experience haskeler, for example, I was making an archiver, for RGSS, so my inspiration was Tar
01:42:44 <unit73e> because Tar looked decent code
01:43:30 <unit73e> but just the structure. I use more modern haskell with monad transformers, and Tar has some legacy.
01:44:21 <talismanick> How might I draw a screen-width rectangle under Wayland without GTK? What are my options besides Gloss?
01:44:49 machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net)
01:45:36 <talismanick> Draw a screenwidth rectangle and render unicode text on it, I should say
01:47:28 <sshine> https://people.mpi-sws.org/~rossberg/papers/Rossberg%20-%201ML%20--%20Core%20and%20modules%20united%20[JFP].pdf -- I'd like to see this taken further. it's basically ML modules and values married into one.
01:48:15 × razetime quits (~Thunderbi@117.193.4.145) (Ping timeout: 268 seconds)
01:48:29 <unit73e> talismanick, you mean, vector graphics? or something else? because you can draw rectangles in many ways with multiple libraries. say opengl, vulkan, software, sdl, gloss, etc
01:49:47 <talismanick> unit73e: Right, multiple ways to render it, but which is the right level of abstraction for displaying it without window controls and making it screenwidth and attached to the top or bottom?
01:50:11 <talismanick> and rendering text inside of it, as a status bar (like xmobar)
01:50:34 <talismanick> If I can get that, the rest should be a piece of cake
01:51:20 <unit73e> talismanick, so you want to make a status bar? like xmobar?
01:51:33 <unit73e> but for wayland
01:51:34 <unit73e> not X
01:51:38 <talismanick> Yeah, exactly
01:52:48 <talismanick> I know how to write CLI programs and REST APIs, but I don't touch GUIs much
01:55:12 <talismanick> https://sheaf.gitlab.io/fir/index.html looks really interesting, but a bit too low level for my purposes
01:57:18 <unit73e> talismanick, I don't know much about wayland, but how about looking how others did it? like swaybar, or waybar? you're going to run into interoperability problems like having tray icons, so might as well inspire on those projects, but in haskell.
01:57:36 <unit73e> it would be a cool project
01:57:56 Guest33 joins (~Guest33@2001-b011-400a-5dfb-d995-a488-9bc0-4214.dynamic-ip6.hinet.net)
01:58:24 <talismanick> That sounds like it could be a rabbit hole - just unicode characters with font choice and coloring would be a good start, imo
01:58:35 <talismanick> maybe once I have something working
01:59:00 × natechan quits (~nate@98.45.169.16) (Ping timeout: 260 seconds)
02:00:37 <unit73e> a basic opengl library would be enough to draw a rectangle, but I think you're going to find out you need GTK stuff (or KDE)
02:00:38 × Guest33 quits (~Guest33@2001-b011-400a-5dfb-d995-a488-9bc0-4214.dynamic-ip6.hinet.net) (Client Quit)
02:01:29 <unit73e> or use wlroots
02:01:31 <talismanick> unit73e: Even for sizing, anchoring, and text rendering?
02:01:42 <talismanick> Yeah, I was planning to stick with wlroots
02:03:05 <unit73e> afaik wlroots can draw rectangles, but I don't think there's an haskell module
02:03:29 <unit73e> you'd have to make one yourself
02:03:32 <talismanick> There's hsroots, but that was last updated in 2019
02:03:42 <unit73e> at least there's something :p
02:04:01 son0p joins (~ff@190.158.28.118)
02:04:34 <talismanick> I've heard praise for Haskell's C FFI. Is there best practice for using it? Handle C values with levity polymorphism?
02:09:57 × unit73e quits (~emanuel@2001:818:e8dd:7c00:656:e5ff:fe72:9d36) (Quit: Leaving)
02:11:52 <talismanick> :(
02:14:18 thongpv87 joins (~thongpv87@2402:9d80:3b9:c4cc:21a0:88fc:6943:1ae5)
02:14:47 <talismanick> Oof, it depends on the lower-level deprecated Hayland bindings...
02:19:05 × beteigeuze quits (~Thunderbi@bl14-81-220.dsl.telepac.pt) (Ping timeout: 268 seconds)
02:23:55 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
02:23:58 emmanuelux joins (~emmanuelu@user/emmanuelux)
02:27:16 × _leo92_ quits (~emmanuelu@user/emmanuelux) (Ping timeout: 272 seconds)
02:28:32 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 272 seconds)
02:31:02 <Inst> not going to admit I looked this guy up, but it's pretty good, there's an educator in Hyderabad who showed up on #haskell-beginners on Discord
02:31:19 <Inst> he sells a bunch of training videos, will be interesting to see him shilling Haskell to Indians
02:35:26 × CiaoSen quits (~Jura@p200300c9574fa4002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 246 seconds)
02:40:59 troydm joins (~troydm@user/troydm)
02:41:19 caryhartline joins (~caryhartl@2600:1700:2d0:8d30:ec3c:3ed4:a3c8:7826)
02:42:52 oldfashionedcow is now known as DEWIT
02:44:45 natechan joins (~nate@98.45.169.16)
02:48:47 × chexum quits (~quassel@gateway/tor-sasl/chexum) (Ping timeout: 255 seconds)
02:50:27 <talismanick> Nice, there are gi-gtk bindings for the gtk-layer-shell Wayland protocol. Might go with that, then.
02:50:43 DEWIT is now known as oldfashionedcow
02:50:50 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
02:51:23 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Client Quit)
03:00:17 × natechan quits (~nate@98.45.169.16) (Ping timeout: 246 seconds)
03:00:55 oldfashionedcow is now known as GeneralKenobi
03:01:45 × mizlan quits (~mizlan@2607:f010:2a7:1005:e1d1:8a04:4a34:845a) (Ping timeout: 255 seconds)
03:03:28 razetime joins (~Thunderbi@117.193.4.145)
03:03:33 mizlan joins (~mizlan@2607:f010:2a7:1005:e1d1:8a04:4a34:845a)
03:05:17 × jero98772 quits (~jero98772@2800:484:1d80:d8ce:9815:cfda:3661:17bb) (Remote host closed the connection)
03:06:54 × Neuromancer quits (~Neuromanc@user/neuromancer) (Ping timeout: 260 seconds)
03:11:31 <fizbin> I just revisited a project from 2+ years ago and fixed some bugs; don't know if anyone here is really interested in regex processing but here's a short command line program that'll determine whether two regular expressions are equivalent (and if not, will find a string that one regex matches and the other does not): https://gist.github.com/fizbin/8267ff9dbc15c6564214aa4cea6d0cb0
03:12:10 paulpaul1076 joins (~textual@95-29-5-111.broadband.corbina.ru)
03:18:59 <fizbin> I do feel like the function 'firstJust' at https://gist.github.com/fizbin/8267ff9dbc15c6564214aa4cea6d0cb0#file-regexequiv-hs-L172-L187 could be generalized somehow, or made with generic components, but when I tried to make Work an Applicative and make it out of "liftA2 (<|>)", I wound up with one of those evil things that typechecks but is not correct.
03:24:00 chexum joins (~quassel@gateway/tor-sasl/chexum)
03:31:29 Nosrep joins (~Nosrep@user/nosrep)
03:43:35 × segfaultfizzbuzz quits (~segfaultf@23-93-74-212.fiber.dynamic.sonic.net) (Ping timeout: 255 seconds)
03:44:21 GeneralKenobi is now known as oldfashionedcow
03:45:34 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
03:49:36 × dolio quits (~dolio@130.44.134.54) (Read error: Connection reset by peer)
03:53:24 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 272 seconds)
03:53:24 × razetime quits (~Thunderbi@117.193.4.145) (Ping timeout: 272 seconds)
03:53:32 finn_elija joins (~finn_elij@user/finn-elija/x-0085643)
03:53:32 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
03:53:32 finn_elija is now known as FinnElija
03:55:09 × xff0x_ quits (~xff0x@2405:6580:b080:900:33f6:9250:43b6:b1c7) (Ping timeout: 252 seconds)
03:55:46 dolio joins (~dolio@130.44.134.54)
03:57:08 xff0x_ joins (~xff0x@178.255.149.135)
03:59:44 × td_ quits (~td@83.135.9.53) (Ping timeout: 272 seconds)
04:00:59 td_ joins (~td@83.135.9.57)
04:10:34 shriekingnoise joins (~shrieking@186.137.175.87)
04:13:24 × xff0x_ quits (~xff0x@178.255.149.135) (Ping timeout: 260 seconds)
04:13:24 × shriekingnoise_ quits (~shrieking@186.137.175.87) (Ping timeout: 260 seconds)
04:14:22 xff0x_ joins (~xff0x@2405:6580:b080:900:54f9:caff:68f9:e2a8)
04:16:13 <[Leary]> fizbin: Like a parser eating too much input, your `Work` `Applicative` presumably builds up `Work` from the lost branches of the `Alternative`. You might want something like `try :: Work (Maybe a) -> Work (Maybe a); try = maybe (pure Nothing) <$> const <*> finish` so you can do `try x <|> y`.
04:16:58 razetime joins (~Thunderbi@117.193.4.145)
04:18:28 <[Leary]> Err, with (<|>) corresponding to that of `MaybeT Work`, I guess.
04:18:46 <[Leary]> Which you might just want to use anyway.
04:19:15 mimmy_ joins (~mimmy@142.126.70.245)
04:19:18 mikess joins (~sam@user/mikess)
04:20:10 × vulpine quits (xfnw@tilde.team) (Quit: Connection reset by purr)
04:22:27 vulpine joins (xfnw@tilde.team)
04:24:18 × jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Remote host closed the connection)
04:26:44 × mimmy_ quits (~mimmy@142.126.70.245) (Ping timeout: 268 seconds)
04:26:45 × mizlan quits (~mizlan@2607:f010:2a7:1005:e1d1:8a04:4a34:845a) (Ping timeout: 256 seconds)
04:30:13 jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
04:30:46 × machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 272 seconds)
04:35:54 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
04:40:01 cheater_ joins (~Username@user/cheater)
04:40:35 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 260 seconds)
04:40:50 mizlan joins (~mizlan@2607:f010:2a7:1005:e1d1:8a04:4a34:845a)
04:41:59 × Techcable quits (~Techcable@user/Techcable) (Ping timeout: 265 seconds)
04:43:11 × cheater quits (~Username@user/cheater) (Ping timeout: 256 seconds)
04:43:16 cheater_ is now known as cheater
04:44:27 × ddellacosta quits (~ddellacos@89.46.62.175) (Ping timeout: 248 seconds)
04:49:09 × Nosrep quits (~Nosrep@user/nosrep) (Remote host closed the connection)
04:51:01 Techcable joins (~Techcable@user/Techcable)
04:58:31 natechan joins (~nate@98.45.169.16)
05:02:21 × hrberg quits (~quassel@171.79-160-161.customer.lyse.net) (Ping timeout: 255 seconds)
05:03:35 × oldfashionedcow quits (~Rahul_San@user/oldfashionedcow) (Quit: WeeChat 3.7.1)
05:03:38 segfaultfizzbuzz joins (~segfaultf@23-93-74-212.fiber.dynamic.sonic.net)
05:03:50 × caryhartline quits (~caryhartl@2600:1700:2d0:8d30:ec3c:3ed4:a3c8:7826) (Ping timeout: 246 seconds)
05:06:02 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds)
05:12:59 × mikess quits (~sam@user/mikess) (Quit: leaving)
05:18:44 × natechan quits (~nate@98.45.169.16) (Ping timeout: 260 seconds)
05:29:02 × justsomeguy quits (~justsomeg@user/justsomeguy) (Ping timeout: 246 seconds)
05:31:09 × leah2 quits (~leah@vuxu.org) (Ping timeout: 255 seconds)
05:41:19 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
05:42:22 × mizlan quits (~mizlan@2607:f010:2a7:1005:e1d1:8a04:4a34:845a) (Ping timeout: 252 seconds)
05:43:40 Unicorn_Princess joins (~Unicorn_P@user/Unicorn-Princess/x-3540542)
05:46:08 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 272 seconds)
05:47:09 mbuf joins (~Shakthi@49.204.134.13)
05:53:37 irrgit__ joins (~irrgit@89.47.234.74)
05:56:05 mizlan joins (~mizlan@2607:f010:2a7:1005:e1d1:8a04:4a34:845a)
05:56:40 × irrgit_ quits (~irrgit@86.106.90.226) (Ping timeout: 252 seconds)
05:59:26 × finsternis quits (~X@23.226.237.192) (Read error: Connection reset by peer)
06:00:49 × mizlan quits (~mizlan@2607:f010:2a7:1005:e1d1:8a04:4a34:845a) (Ping timeout: 256 seconds)
06:07:29 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer)
06:12:11 mizlan joins (~mizlan@2607:f010:2a7:1005:e1d1:8a04:4a34:845a)
06:16:13 dcoutts_ joins (~duncan@host213-122-143-153.range213-122.btcentralplus.com)
06:22:59 <fizbin> [Leary]: That wouldn't work, I don't think. I want the result of the thing that returns a "Just" after stripping off the minimal number of layers of "Work", and near as I can tell that function requires me to finish all of "x"
06:32:20 takuan joins (~takuan@178-116-218-225.access.telenet.be)
06:36:46 mimmy_ joins (~mimmy@142.126.70.245)
06:38:42 × jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 272 seconds)
06:41:11 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
06:41:52 × mimmy_ quits (~mimmy@142.126.70.245) (Ping timeout: 272 seconds)
06:46:18 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 272 seconds)
06:47:40 fxttr joins (~florian@mue-88-130-57-190.dsl.tropolys.de)
06:48:50 × segfaultfizzbuzz quits (~segfaultf@23-93-74-212.fiber.dynamic.sonic.net) (Ping timeout: 272 seconds)
06:49:21 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
06:51:00 trev joins (~trev@user/trev)
06:53:41 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 246 seconds)
06:54:09 zaquest joins (~notzaques@5.130.79.72)
06:56:26 × razetime quits (~Thunderbi@117.193.4.145) (Ping timeout: 272 seconds)
07:05:41 × qhong quits (~qhong@rescomp-21-400677.stanford.edu) (Remote host closed the connection)
07:06:30 × v0id_ptr quits (~adrift@user/ptr-frac7al/x-0038398) (Ping timeout: 265 seconds)
07:06:54 qhong joins (~qhong@rescomp-21-400677.stanford.edu)
07:08:27 v0id_ptr joins (~adrift@user/ptr-frac7al/x-0038398)
07:13:40 × mizlan quits (~mizlan@2607:f010:2a7:1005:e1d1:8a04:4a34:845a) (Ping timeout: 252 seconds)
07:13:48 × dcoutts_ quits (~duncan@host213-122-143-153.range213-122.btcentralplus.com) (Ping timeout: 252 seconds)
07:14:02 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
07:16:08 natechan joins (~nate@98.45.169.16)
07:16:24 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
07:17:28 × tcard quits (~tcard@2400:4051:5801:7500:cf17:befc:ff82:5303) (Ping timeout: 252 seconds)
07:21:56 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
07:23:17 <[Leary]> fizbin: Ah, I misread the intention of `firstJust`. Your `foldr firstJust` is doing something like `minimumBy depthOfWork`, but with a sort of geometrically-balanced search, rather than depth first or breadth first... You could do something like `type Work a = [Maybe a]; work = (Nothing:); done x = [Just x]; finish = asum; firstJust = zipWith (<|>)` (or the same but an abstract newtype in a second module).
07:25:13 × natechan quits (~nate@98.45.169.16) (Ping timeout: 252 seconds)
07:26:04 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
07:26:04 mizlan joins (~mizlan@2607:f010:2a7:1005:e1d1:8a04:4a34:845a)
07:26:06 irrgit_ joins (~irrgit@146.70.27.250)
07:28:19 <talismanick> Say I have monadic code that looks like this: https://0x0.st/o7dw.txt
07:29:02 <talismanick> How might I deduplicate so the return value from `valGen` gets passed along in turn to each of the functions without me writing it out?
07:29:24 × irrgit__ quits (~irrgit@89.47.234.74) (Ping timeout: 260 seconds)
07:30:57 <talismanick> Something kind of like Kleisli composition?
07:34:42 Tuplanolla joins (~Tuplanoll@91-159-68-152.elisa-laajakaista.fi)
07:35:18 <talismanick> Or, rather, bind-as-relation (one to many instead of one to one)
07:35:34 <c_wraith> talismanick: I... wouldn't bother changing it
07:35:38 Inst_ joins (~Inst@2601:6c4:4081:54f0:3081:cca:cb95:ec2d)
07:35:56 <c_wraith> talismanick: there are ways to rewrite it, but I don't think they'd aid understanding in this case
07:38:43 × v0id_ptr quits (~adrift@user/ptr-frac7al/x-0038398) (Quit: WeeChat 3.5)
07:39:23 × Inst quits (~Inst@2601:6c4:4081:54f0:3de7:12e6:ed3d:f8f8) (Ping timeout: 255 seconds)
07:41:42 <[Leary]> talismanick: If you're passing `val` in a lot of places, you might want `ReaderT`.
07:41:55 <c_wraith> talismanick: in simpler cases, things like (<*) and (<$) can help, but I don't think they do anything good here.
07:50:54 × shriekingnoise quits (~shrieking@186.137.175.87) (Ping timeout: 272 seconds)
07:50:55 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
07:52:26 × wroathe quits (~wroathe@user/wroathe) (Quit: leaving)
07:53:03 <[Leary]> talismanick: You could also write, say, `fa <<* afb = fa >>= \a -> a <$ afb a; infixl 4 <<*`; it's not an entirely unreasonable operator.
07:59:51 <[Leary]> fizbin: Oh, that should have been `firstJust (x:xs) (y:ys) = x:y:firstJust xs ys; firstJust xs ys = xs ++ ys`; `liftA2 (<|>)` would be breadth first.
08:00:49 <[Leary]> This might all be easier with ... what was it, LogicT?
08:11:54 tcard joins (~tcard@2400:4051:5801:7500:cf17:befc:ff82:5303)
08:15:56 × chexum quits (~quassel@gateway/tor-sasl/chexum) (Ping timeout: 255 seconds)
08:16:31 chexum joins (~quassel@gateway/tor-sasl/chexum)
08:18:20 × tcard quits (~tcard@2400:4051:5801:7500:cf17:befc:ff82:5303) (Ping timeout: 252 seconds)
08:18:56 Guest52 joins (~Guest52@58.171.243.251)
08:19:19 tcard joins (~tcard@2400:4051:5801:7500:cf17:befc:ff82:5303)
08:20:13 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
08:21:13 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
08:23:53 barak joins (~barak@2a02:14f:83:75a5:98fb:ef64:df32:28ff)
08:24:32 × chexum quits (~quassel@gateway/tor-sasl/chexum) (Quit: No Ping reply in 180 seconds.)
08:29:14 chexum joins (~quassel@gateway/tor-sasl/chexum)
08:31:17 mei joins (~mei@user/mei)
08:50:25 Guest|91 joins (~Guest|91@173.230.148.39)
08:51:36 <Guest|91> Could someone to help me installing Haskell?
08:53:23 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
08:54:25 × Guest|91 quits (~Guest|91@173.230.148.39) (Client Quit)
08:59:05 <laalyn> I could try :)
09:02:29 kenran joins (~user@user/kenran)
09:03:08 × kenran quits (~user@user/kenran) (Remote host closed the connection)
09:08:23 <[exa]> Guest52: what's the problem?
09:10:09 f0c1s joins (~f0c1s@2401:4900:1cb9:5b16:bb45:5360:94a1:208f)
09:10:29 f0c1s_ joins (~f0c1s@2401:4900:1cb9:5b16:bb45:5360:94a1:208f)
09:12:31 × dtman34 quits (~dtman34@76.156.89.180) (Quit: ZNC 1.8.2+deb2+b1 - https://znc.in)
09:13:25 dtman34 joins (~dtman34@2601:447:d000:93c9:8095:75ea:f23b:f5f5)
09:14:55 lortabac joins (~lortabac@2a01:e0a:541:b8f0:cd94:d604:3630:3cd8)
09:15:20 × lortabac quits (~lortabac@2a01:e0a:541:b8f0:cd94:d604:3630:3cd8) (Client Quit)
09:17:36 gmg joins (~user@user/gehmehgeh)
09:19:53 leah2 joins (~leah@vuxu.org)
09:26:38 × bastelfreak quits (bastelfrea@libera/staff/VoxPupuli.bastelfreak) (Quit: WeeChat 3.6)
09:28:00 bastelfreak joins (bastelfrea@libera/staff/VoxPupuli.bastelfreak)
09:31:19 burnsidesLlama joins (~burnsides@119247164140.ctinets.com)
09:31:56 × Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
09:40:14 acidjnk joins (~acidjnk@p200300d6e715c494a9d2b964e819f338.dip0.t-ipconnect.de)
09:42:43 × thongpv87 quits (~thongpv87@2402:9d80:3b9:c4cc:21a0:88fc:6943:1ae5) (Ping timeout: 252 seconds)
09:44:44 <talismanick> What does `show @Milli . realToFrac` mean? What do I import so it compiles? What GHC extension?
09:45:22 <talismanick> (well, I know it means to represent the number in some format when it gets cast into a string, but the rest is a mystery)
09:47:06 mechap joins (~mechap@user/mechap)
09:51:29 <talismanick> [Leary]: Thanks for the suggestion, but I think c_wraith is right for now. Really, what I need are higher-power abstractions to pull parts out of IO or otherwise wrap them into clean, composable units
09:53:08 <[exa]> talismanick: that looks like a type application, telling `show` what instance of Show to use (thus also forcing `realToFrac` to know what to ouput)
09:53:24 <Hecate> -XTypeApplications
09:53:27 <Hecate> indeed
09:53:39 <Hecate> talismanick: https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/type_applications.html
09:54:13 × burnsidesLlama quits (~burnsides@119247164140.ctinets.com) ()
09:55:34 <[exa]> normally without the application you'd either have an ambiguity (or maybe a surprising default on Fractional+Show), or you'd have to use some gadget to force the type such as `show . (id :: Milli->Milli) . realToFrac`
09:57:09 gnalzo joins (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c)
09:58:32 × mbuf quits (~Shakthi@49.204.134.13) (Quit: Leaving)
09:59:16 <mauke> `show @Milli` seems a bit pointless when you can get the same effect with `\x -> show (x :: Milli)` or `show . (\x -> x :: Milli)` without any language extensions
09:59:32 × coldtom quits (~coldtom@coldrick.cc) (Quit: Well, that's got rid of me)
10:07:42 <Hecate> mauke: lol
10:07:55 <Hecate> mauke: don't say that, he might think you're serious :P
10:08:39 <mauke> ? I am serious
10:12:02 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
10:13:18 L29Ah parts (~L29Ah@wikipedia/L29Ah) ()
10:14:19 <talismanick> mauke: You need ScopedTypeVariables for that
10:14:37 <mauke> why?
10:14:44 talismanick shrugs
10:14:55 <talismanick> It's a scoped type variable
10:15:00 <mauke> none of the examples shown use any type variables
10:16:02 × son0p quits (~ff@190.158.28.118) (Remote host closed the connection)
10:16:10 <mauke> am I on drugs or is everyone else?
10:18:45 × tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz)
10:21:05 <Hecate> pretty sure (\x -> show (x :: Milli)) . realToFrac doesn't need ScopedTypeVariables
10:21:22 <Hecate> but it's still considerably more burdensome than show @Milli
10:22:47 <mauke> but less burdensome than {-# LANGUAGE TypeApplications #-} show @Milli
10:23:56 gnalzo thinks this is a question of taste :)
10:23:57 <xerox> talismanick: here's some examples: https://downloads.haskell.org/ghc/latest/docs/users_guide/exts/scoped_type_variables.html#extension-ScopedTypeVariables
10:25:33 <talismanick> ah, you're right - I'm confusing it with the time I did have to use that extension (with similar syntax)
10:28:59 <Hecate> mauke: no
10:29:01 <Hecate> :P
10:29:14 <Hecate> gnalzo: :)
10:36:25 × barak quits (~barak@2a02:14f:83:75a5:98fb:ef64:df32:28ff) (Ping timeout: 260 seconds)
10:38:19 mimmy_ joins (~mimmy@142.126.70.245)
10:40:18 coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
10:43:48 × mimmy_ quits (~mimmy@142.126.70.245) (Ping timeout: 272 seconds)
10:48:33 <Reinhilde> e
10:49:55 <mauke> https://duckduckgo.com/?t=ffab&q=%65&iax=images&ia=images
10:55:47 zeenk joins (~zeenk@2a02:2f04:a014:8700::7fe)
11:01:45 × f0c1s_ quits (~f0c1s@2401:4900:1cb9:5b16:bb45:5360:94a1:208f) (Quit: Leaving)
11:01:45 × f0c1s quits (~f0c1s@2401:4900:1cb9:5b16:bb45:5360:94a1:208f) (Quit: Leaving)
11:06:07 × mechap quits (~mechap@user/mechap) (Quit: WeeChat 3.8)
11:07:21 × econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity)
11:10:06 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:6450:b99c:346:15e5) (Remote host closed the connection)
11:10:52 × chexum quits (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection)
11:11:39 chexum joins (~quassel@gateway/tor-sasl/chexum)
11:12:09 mei_ joins (~mei@user/mei)
11:14:31 thongpv87 joins (~thongpv87@2402:9d80:3b9:c4cc:6182:a43d:c5b4:7a2d)
11:14:47 × mei quits (~mei@user/mei) (Ping timeout: 260 seconds)
11:24:03 tremon joins (~tremon@83-85-213-108.cable.dynamic.v4.ziggo.nl)
11:24:21 barak joins (~barak@2a02:14f:83:75a5:71fd:c7ff:a853:183e)
11:26:00 × talismanick quits (~talismani@2601:200:c181:4c40::1be2) (Ping timeout: 260 seconds)
11:36:39 mmhat joins (~mmh@p200300f1c7123c02ee086bfffe095315.dip0.t-ipconnect.de)
11:37:50 beteigeuze joins (~Thunderbi@bl14-81-220.dsl.telepac.pt)
11:38:54 bolichep joins (~bolichep@186.57.179.191)
11:41:19 razetime joins (~Thunderbi@117.193.4.145)
11:49:19 × acidjnk quits (~acidjnk@p200300d6e715c494a9d2b964e819f338.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
11:49:33 son0p joins (~ff@190.158.28.118)
11:49:34 × mmhat quits (~mmh@p200300f1c7123c02ee086bfffe095315.dip0.t-ipconnect.de) (Quit: WeeChat 3.8)
11:53:04 × coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
11:54:20 × razetime quits (~Thunderbi@117.193.4.145) (Remote host closed the connection)
12:10:33 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:6450:b99c:346:15e5)
12:14:17 × gmg quits (~user@user/gehmehgeh) (Remote host closed the connection)
12:16:08 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:6450:b99c:346:15e5) (Ping timeout: 255 seconds)
12:18:06 CiaoSen joins (~Jura@p200300c9574fa4002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
12:21:11 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 255 seconds)
12:21:23 wootehfoot joins (~wootehfoo@user/wootehfoot)
12:24:54 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
12:28:17 ss4 joins (~wootehfoo@user/wootehfoot)
12:30:24 × ss4 quits (~wootehfoo@user/wootehfoot) (Client Quit)
12:31:42 × wootehfoot quits (~wootehfoo@user/wootehfoot) (Ping timeout: 252 seconds)
12:33:21 __monty__ joins (~toonn@user/toonn)
12:34:13 gmg joins (~user@user/gehmehgeh)
12:44:57 × phma quits (phma@2001:5b0:211f:9a8:4ecd:10c6:a18f:491e) (Read error: Connection reset by peer)
12:45:49 phma joins (~phma@host-67-44-208-219.hnremote.net)
12:53:32 instantaphex joins (~jb@c-73-171-252-84.hsd1.fl.comcast.net)
12:57:44 × instantaphex quits (~jb@c-73-171-252-84.hsd1.fl.comcast.net) (Ping timeout: 246 seconds)
13:03:46 <Guest5476> Identity function with special treatment to Bool values: https://play-haskell.tomsmeding.com/saved/XrMtxzfx
13:08:07 titibandit1 joins (~titibandi@xdsl-81-173-160-143.nc.de)
13:18:22 × nek0 quits (~nek0@2a01:4f8:222:2b41::12) (Quit: The Lounge - https://thelounge.chat)
13:19:35 nek0 joins (~nek0@2a01:4f8:222:2b41::12)
13:23:29 × CiaoSen quits (~Jura@p200300c9574fa4002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
13:31:29 jakalx parts (~jakalx@base.jakalx.net) ()
13:40:56 × pwug quits (~pwug@user/pwug) (Read error: Connection reset by peer)
13:43:45 × bolichep quits (~bolichep@186.57.179.191) (Quit: Saliendo)
13:47:58 coot joins (~coot@213.134.171.3)
13:48:06 × coot quits (~coot@213.134.171.3) (Remote host closed the connection)
13:48:25 × barak quits (~barak@2a02:14f:83:75a5:71fd:c7ff:a853:183e) (Ping timeout: 252 seconds)
13:56:23 razetime joins (~Thunderbi@117.193.4.145)
13:57:13 CiaoSen joins (~Jura@p200300c9574fa4002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
13:57:28 × razetime quits (~Thunderbi@117.193.4.145) (Client Quit)
14:00:14 × son0p quits (~ff@190.158.28.118) (Ping timeout: 268 seconds)
14:01:25 × sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
14:03:33 sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
14:04:14 × troydm quits (~troydm@user/troydm) (Ping timeout: 246 seconds)
14:13:53 tubogram440 joins (~tubogram@user/tubogram)
14:14:37 × tubogram44 quits (~tubogram@user/tubogram) (Ping timeout: 246 seconds)
14:14:38 tubogram440 is now known as tubogram44
14:23:28 × jinsun quits (~jinsun@user/jinsun) (Read error: Connection reset by peer)
14:23:35 jinsun__ joins (~jinsun@user/jinsun)
14:23:35 jinsun__ is now known as jinsun
14:26:42 × jinsun quits (~jinsun@user/jinsun) (Read error: Connection reset by peer)
14:26:50 <ncf> do you have a permit for breaking parametricity?
14:26:57 jinsun joins (~jinsun@user/jinsun)
14:28:01 <Inst_> question about short cricuiting in other languages
14:28:04 <Inst_> do they use the thunk model?
14:28:20 <Inst_> I'm describing laziness to some new developer who's trying to get their first job with Python as "everything short-circuits"
14:28:31 <ncf> not necessarily; C has short-circuiting operators but no thunks
14:28:38 <Inst_> ah
14:28:43 Inst_ is now known as Inst
14:28:45 <Inst> oh well
14:28:48 <Inst> close enough, I guess
14:29:38 <geekosaur> "everything short-circuits" isn't quite right either. how does that explain Control.Monad.when?
14:30:50 × merijn quits (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) (Ping timeout: 246 seconds)
14:31:09 <geekosaur> it also doesn't work if multiple parameters are strict
14:31:20 <geekosaur> well, even if one is
14:31:39 <Inst> why does when matter?
14:31:55 merijn joins (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl)
14:32:00 <Inst> evaluate the boolean, then if the boolean is true, substitute pure () with the appllicative
14:34:42 <geekosaur> laziness is why it doesn't evaluate the thunk before looking at the boolean
14:34:58 <int-e> I'd call it on-demand evaluation. Boolean short-circuiting is a special case of that. But it still won't tell you what exactly constitutes "demand".
14:37:47 × merijn quits (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) (Ping timeout: 260 seconds)
14:39:53 mimmy_ joins (~mimmy@142.126.70.245)
14:41:04 × gnalzo quits (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 3.7.1)
14:42:57 azimut joins (~azimut@gateway/tor-sasl/azimut)
14:43:07 <Inst> it doesn't matter, the python guy doesn't even understand the "if it compiles, ship it" joke and the "if it compiles, it works" semi-joke
14:43:23 × ubert quits (~Thunderbi@p548c9ce5.dip0.t-ipconnect.de) (Ping timeout: 246 seconds)
14:43:27 ub joins (~Thunderbi@185.195.232.146)
14:44:48 × mimmy_ quits (~mimmy@142.126.70.245) (Ping timeout: 260 seconds)
14:45:44 × paulpaul1076 quits (~textual@95-29-5-111.broadband.corbina.ru) (Ping timeout: 272 seconds)
14:45:45 ub is now known as ubert
14:49:41 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
14:53:25 × sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
14:54:42 sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
14:58:03 _leo92_ joins (~emmanuelu@user/emmanuelux)
14:59:53 <eldritchcookie[4> how can i make it sure that a file generated by template haskell is included in the final package?
15:01:29 × emmanuelux quits (~emmanuelu@user/emmanuelux) (Ping timeout: 260 seconds)
15:01:40 jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
15:03:15 merijn joins (~merijn@86-86-29-250.fixed.kpn.net)
15:04:27 barak joins (~barak@77.125.91.132)
15:06:12 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
15:06:16 wootehfoot joins (~wootehfoo@user/wootehfoot)
15:07:21 <eldritchcookie[4> basically can i make a autogenerated file be mentioned in the includes?
15:07:39 × Guest52 quits (~Guest52@58.171.243.251) (Quit: Client closed)
15:09:47 × barak quits (~barak@77.125.91.132) (Ping timeout: 264 seconds)
15:10:46 pagnol joins (~user@213-205-209-87.ftth.glasoperator.nl)
15:12:06 mechap joins (~mechap@user/mechap)
15:15:58 L29Ah joins (~L29Ah@wikipedia/L29Ah)
15:16:13 <lyxia> eldritchcookie[4: there is an extra-sources-files field in cabal, it doesn't care where the files come from, they just have to be there when running "cabal sdist"
15:25:43 <eldritchcookie[4> does it keep include-dirs automatically?
15:26:19 × wootehfoot quits (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer)
15:27:19 <eldritchcookie[4> or do i need to also mention them in extra source files?
15:29:15 × sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
15:30:22 sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
15:30:54 oldfashionedcow joins (~Rahul_San@user/oldfashionedcow)
15:37:42 wootehfoot joins (~wootehfoo@user/wootehfoot)
15:37:59 × merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 264 seconds)
15:46:18 × fxttr quits (~florian@mue-88-130-57-190.dsl.tropolys.de) (Ping timeout: 268 seconds)
15:47:53 fxttr joins (~florian@i577BC913.versanet.de)
15:49:31 × panovia quits (~user@user/siracusa) (Quit: Bye!)
15:51:26 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
15:54:20 machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net)
15:59:14 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 260 seconds)
16:01:06 × machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 268 seconds)
16:02:28 machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net)
16:06:02 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Read error: Connection reset by peer)
16:06:30 × matijja quits (~matijja@193.77.181.201) (Quit: ZNC 1.8.2 - https://znc.in)
16:06:59 matijja joins (~matijja@193.77.181.201)
16:10:30 merijn joins (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl)
16:11:30 × Inst quits (~Inst@2601:6c4:4081:54f0:3081:cca:cb95:ec2d) (Ping timeout: 255 seconds)
16:13:22 son0p joins (~ff@2800:e2:f80:867:8077:75e8:74b:f48d)
16:19:35 troydm joins (~troydm@user/troydm)
16:21:50 × mizlan quits (~mizlan@2607:f010:2a7:1005:e1d1:8a04:4a34:845a) (Ping timeout: 255 seconds)
16:22:08 × merijn quits (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) (Ping timeout: 246 seconds)
16:25:34 ddellacosta joins (~ddellacos@86.106.143.136)
16:31:39 gnalzo joins (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c)
16:33:04 × matijja quits (~matijja@193.77.181.201) (Quit: ZNC 1.8.2 - https://znc.in)
16:33:45 matijja joins (~matijja@193.77.181.201)
16:34:17 segfaultfizzbuzz joins (~segfaultf@23-93-74-212.fiber.dynamic.sonic.net)
16:38:40 × pagnol quits (~user@213-205-209-87.ftth.glasoperator.nl) (Ping timeout: 260 seconds)
16:40:34 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:6450:b99c:346:15e5)
16:44:48 coot joins (~coot@213.134.171.3)
16:45:30 mimmy_ joins (~mimmy@142.126.70.245)
16:46:41 waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
16:49:04 × son0p quits (~ff@2800:e2:f80:867:8077:75e8:74b:f48d) (Killed (NickServ (GHOST command used by son0p-!~ff@181.136.122.143)))
16:49:57 son0p joins (~ff@181.136.122.143)
16:51:09 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 260 seconds)
16:53:06 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
16:53:35 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
16:57:14 wroathe joins (~wroathe@207-153-38-140.fttp.usinternet.com)
16:57:14 × wroathe quits (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
16:57:14 wroathe joins (~wroathe@user/wroathe)
17:02:32 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 272 seconds)
17:04:37 thongpv joins (~thongpv87@113.176.74.88)
17:06:01 × thongpv87 quits (~thongpv87@2402:9d80:3b9:c4cc:6182:a43d:c5b4:7a2d) (Ping timeout: 252 seconds)
17:06:26 merijn joins (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl)
17:08:59 <fendor[m]> is there a yaml parsing library that lets me warn if my document contains unknown fields?
17:09:45 × coot quits (~coot@213.134.171.3) (Quit: coot)
17:11:22 tzh joins (~tzh@c-24-21-73-154.hsd1.wa.comcast.net)
17:12:02 × merijn quits (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) (Ping timeout: 272 seconds)
17:13:57 jumper149 joins (~jumper149@base.felixspringer.xyz)
17:14:15 × Xeroine quits (~Xeroine@user/xeroine) (Ping timeout: 260 seconds)
17:17:56 Xeroine joins (~Xeroine@user/xeroine)
17:18:07 <[exa]> fendor[m]: the yamlish aeson variant doesn't explode on unknown fields?
17:19:22 <fendor[m]> aeson doesn't, so yaml won't either, afaict.
17:19:44 steerpike joins (~echelon@gateway/tor-sasl/steerpike)
17:21:10 steerpike parts (~echelon@gateway/tor-sasl/steerpike) ()
17:21:41 <fendor[m]> By unknown field, I mean a field that isn't necessary for parsing. Parsing is successful, and the unknown field is simply not parsed into any data structure
17:21:42 dcoutts_ joins (~duncan@host213-122-143-153.range213-122.btcentralplus.com)
17:24:44 × ddellacosta quits (~ddellacos@86.106.143.136) (Ping timeout: 246 seconds)
17:26:54 ddellacosta joins (~ddellacos@89.45.224.227)
17:27:19 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:6450:b99c:346:15e5) (Remote host closed the connection)
17:27:37 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:6450:b99c:346:15e5)
17:27:51 <[exa]> fendor[m]: well as a complete workaround you may format the data structure back to aeson Value and diff it
17:29:45 × beteigeuze quits (~Thunderbi@bl14-81-220.dsl.telepac.pt) (Quit: beteigeuze)
17:30:13 beteigeuze joins (~Thunderbi@bl14-81-220.dsl.telepac.pt)
17:32:19 <fendor[m]> [exa] sounds like a pretty good idea. It forces me to add a ToJSON instance, but it seems easier to maintain than other solution from stack overflow
17:33:12 <[exa]> like, if the constraint you want to fit in is "no ignored fields ever", this is it
17:34:27 <Guest5476> lmao, why this behaves in such a strange way? https://play-haskell.tomsmeding.com/saved/bCe7WkVe
17:34:59 <fendor[m]> yeah, I think warning would be the better behaviour, now let's just hope I am never parsing files that have a few MB
17:36:41 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 268 seconds)
17:40:25 jakalx joins (~jakalx@base.jakalx.net)
17:45:41 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
17:45:56 econo joins (uid147250@user/econo)
17:49:24 × mimmy_ quits (~mimmy@142.126.70.245) (Ping timeout: 272 seconds)
17:50:02 <[exa]> fendor[m]: actually if you compare the Values reasonably, it's gonna lazy-stream
17:50:40 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 272 seconds)
17:51:32 thongpv87 joins (~thongpv87@2402:9d80:3ee:7887:942:a6bd:b981:3bd)
17:52:08 <[exa]> Guest5476: wow okay, interesting
17:53:19 <[exa]> looks like it doesn't really see your instance, for whatever reason
17:53:39 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:6450:b99c:346:15e5) (Remote host closed the connection)
17:54:34 × thongpv quits (~thongpv87@113.176.74.88) (Ping timeout: 268 seconds)
17:55:30 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:6450:b99c:346:15e5)
18:01:44 <Guest5476> No, that's expected behavior: https://serokell.io/blog/uncaught-exception-handling
18:01:59 <Guest5476> [exa] ^
18:07:04 o joins (niko@libera/staff/niko)
18:07:20 × fizbin quits (~fizbin@user/fizbin) (Ping timeout: 260 seconds)
18:07:35 merijn joins (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl)
18:08:44 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
18:13:23 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 260 seconds)
18:15:53 × titibandit1 quits (~titibandi@xdsl-81-173-160-143.nc.de) (Quit: Leaving.)
18:17:22 × dsrt^ quits (~dsrt@76.145.190.81) (Remote host closed the connection)
18:18:04 × dcoutts_ quits (~duncan@host213-122-143-153.range213-122.btcentralplus.com) (Ping timeout: 260 seconds)
18:18:18 fizbin joins (~fizbin@user/fizbin)
18:19:30 shriekingnoise joins (~shrieking@186.137.175.87)
18:22:09 dcoutts_ joins (~duncan@host213-122-143-153.range213-122.btcentralplus.com)
18:27:24 × dcoutts_ quits (~duncan@host213-122-143-153.range213-122.btcentralplus.com) (Ping timeout: 260 seconds)
18:29:43 × fizbin quits (~fizbin@user/fizbin) (Ping timeout: 268 seconds)
18:35:17 <[exa]> Guest5476: oh wow ok
18:36:46 × CiaoSen quits (~Jura@p200300c9574fa4002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
18:40:55 × merijn quits (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) (Ping timeout: 260 seconds)
18:43:55 fizbin joins (~fizbin@user/fizbin)
18:44:58 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
18:45:24 × machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 265 seconds)
18:45:32 Inst joins (~Inst@2601:6c4:4081:54f0:c85a:c40d:a7df:1361)
18:46:27 × mechap quits (~mechap@user/mechap) (Quit: WeeChat 3.8)
18:47:54 talismanick joins (~talismani@2601:200:c181:4c40::1be2)
18:49:36 justsomeguy joins (~justsomeg@user/justsomeguy)
18:49:48 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 260 seconds)
18:55:22 <juri_> I have a comparison in my program, that compares a value against the sum of a series of guaranteed to be positive values. is there a way i can abuse applicative to evaluate the series of positive values such that when the comparison is greater, it stops summing the applicatives, and evaluating their expensive generation functions?
18:57:02 <geekosaur> asum over First?
18:57:07 <geekosaur> maybe
18:57:20 <geekosaur> hm, nom that's per element, not collecting
18:57:28 <geekosaur> s/nom/no,
19:01:10 <geekosaur> not sure you can do that with Applicative, actually, would need Monad
19:03:02 <juri_> hmm. i guess i'd have to learn how monad works. fun! :)
19:03:25 <juri_> (i am a simple haskeller, really. :) )
19:03:43 merijn joins (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl)
19:03:48 × fizbin quits (~fizbin@user/fizbin) (Ping timeout: 260 seconds)
19:08:34 × merijn quits (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) (Ping timeout: 272 seconds)
19:12:56 titibandit1 joins (~titibandi@xdsl-81-173-160-143.nc.de)
19:14:15 natechan joins (~nate@98.45.169.16)
19:15:40 × fxttr quits (~florian@i577BC913.versanet.de) (Quit: leaving)
19:16:17 coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
19:16:52 caryhartline joins (~caryhartl@2600:1700:2d0:8d30:a4a8:25f2:538:8162)
19:18:05 × trev quits (~trev@user/trev) (Remote host closed the connection)
19:18:42 × natechan quits (~nate@98.45.169.16) (Ping timeout: 252 seconds)
19:31:38 natechan joins (~nate@98.45.169.16)
19:33:05 × thongpv87 quits (~thongpv87@2402:9d80:3ee:7887:942:a6bd:b981:3bd) (Ping timeout: 260 seconds)
19:34:04 × wroathe quits (~wroathe@user/wroathe) (Quit: leaving)
19:36:14 × wootehfoot quits (~wootehfoo@user/wootehfoot) (Quit: Leaving)
19:45:54 mimmy_ joins (~mimmy@142.126.70.245)
19:48:48 × ec quits (~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
19:49:20 ec joins (~ec@gateway/tor-sasl/ec)
19:50:23 × mimmy_ quits (~mimmy@142.126.70.245) (Ping timeout: 246 seconds)
19:51:52 Sgeo joins (~Sgeo@user/sgeo)
19:53:23 × natechan quits (~nate@98.45.169.16) (Ping timeout: 260 seconds)
19:54:05 × justsomeguy quits (~justsomeg@user/justsomeguy) (Ping timeout: 260 seconds)
19:54:16 lortabac joins (~lortabac@2a01:e0a:541:b8f0:bd7d:d18b:6ce0:4c58)
20:01:59 × notzmv quits (~zmv@user/notzmv) (Ping timeout: 264 seconds)
20:04:55 × _leo92_ quits (~emmanuelu@user/emmanuelux) (Quit: au revoir)
20:09:58 natechan joins (~nate@98.45.169.16)
20:18:16 × lortabac quits (~lortabac@2a01:e0a:541:b8f0:bd7d:d18b:6ce0:4c58) (Quit: WeeChat 2.8)
20:23:15 × talismanick quits (~talismani@2601:200:c181:4c40::1be2) (Ping timeout: 260 seconds)
20:24:24 wroathe joins (~wroathe@50.205.197.50)
20:24:24 × wroathe quits (~wroathe@50.205.197.50) (Changing host)
20:24:24 wroathe joins (~wroathe@user/wroathe)
20:25:46 × coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
20:26:16 × hpc quits (~juzz@ip98-169-35-163.dc.dc.cox.net) (Ping timeout: 268 seconds)
20:27:07 merijn joins (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl)
20:27:46 hpc joins (~juzz@ip98-169-35-163.dc.dc.cox.net)
20:29:06 × ddellacosta quits (~ddellacos@89.45.224.227) (Ping timeout: 252 seconds)
20:31:41 × Xeroine quits (~Xeroine@user/xeroine) (Quit: ZNC 1.8.2+deb2+b1 - https://znc.in)
20:32:26 × hpc quits (~juzz@ip98-169-35-163.dc.dc.cox.net) (Ping timeout: 268 seconds)
20:33:00 Xeroine joins (~Xeroine@user/xeroine)
20:33:11 × merijn quits (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) (Ping timeout: 264 seconds)
20:40:21 hpc joins (~juzz@ip98-169-35-163.dc.dc.cox.net)
20:43:05 × kee quits (~~kee@user/wizzwizz4) (Ping timeout: 260 seconds)
20:45:31 merijn joins (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl)
20:46:00 kee joins (~~kee@user/wizzwizz4)
20:47:33 azimut_ joins (~azimut@gateway/tor-sasl/azimut)
20:47:53 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds)
20:49:09 machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net)
20:50:11 × merijn quits (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) (Ping timeout: 260 seconds)
20:55:50 hrberg joins (~quassel@171.79-160-161.customer.lyse.net)
20:57:02 sh1n joins (~sh1n@181.229.121.151)
21:03:16 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 268 seconds)
21:04:43 wroathe joins (~wroathe@50.205.197.50)
21:04:43 × wroathe quits (~wroathe@50.205.197.50) (Changing host)
21:04:43 wroathe joins (~wroathe@user/wroathe)
21:06:48 merijn joins (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl)
21:08:04 mimmy_ joins (~mimmy@142.126.70.245)
21:08:13 × acarrico quits (~acarrico@dhcp-68-142-49-163.greenmountainaccess.net) (Quit: Leaving.)
21:08:50 fizbin joins (~fizbin@user/fizbin)
21:09:46 acidjnk joins (~acidjnk@p54ad56b7.dip0.t-ipconnect.de)
21:10:22 × gmg quits (~user@user/gehmehgeh) (Quit: Leaving)
21:11:07 × hrberg quits (~quassel@171.79-160-161.customer.lyse.net) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
21:11:47 hrberg joins (~quassel@171.79-160-161.customer.lyse.net)
21:12:03 aaronm04 joins (~user@user/aaronm04)
21:12:04 × merijn quits (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) (Ping timeout: 272 seconds)
21:13:20 × mimmy_ quits (~mimmy@142.126.70.245) (Ping timeout: 272 seconds)
21:15:39 CiaoSen joins (~Jura@p200300c9574fa4002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
21:17:18 shriekingnoise_ joins (~shrieking@186.137.175.87)
21:20:32 × shriekingnoise quits (~shrieking@186.137.175.87) (Ping timeout: 268 seconds)
21:21:47 × titibandit1 quits (~titibandi@xdsl-81-173-160-143.nc.de) (Remote host closed the connection)
21:26:02 mechap joins (~mechap@user/mechap)
21:32:10 justsomeguy joins (~justsomeg@user/justsomeguy)
21:34:05 oldfashionedcow is now known as convincer3000
21:36:04 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 252 seconds)
21:36:28 Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915)
21:37:12 convincer3000 is now known as oldfashionedcow
21:49:14 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 260 seconds)
21:51:58 × kee quits (~~kee@user/wizzwizz4) (Ping timeout: 272 seconds)
21:52:40 wroathe joins (~wroathe@50.205.197.50)
21:52:40 × wroathe quits (~wroathe@50.205.197.50) (Changing host)
21:52:40 wroathe joins (~wroathe@user/wroathe)
21:53:12 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
21:55:53 kee joins (~~kee@user/wizzwizz4)
21:57:32 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 255 seconds)
22:02:12 mc47 joins (~mc47@xmonad/TheMC47)
22:02:56 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
22:08:28 × hrberg quits (~quassel@171.79-160-161.customer.lyse.net) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
22:14:04 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
22:14:09 hrberg joins (~quassel@171.79-160-161.customer.lyse.net)
22:15:08 × gnalzo quits (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 3.7.1)
22:18:06 notzmv joins (~zmv@user/notzmv)
22:18:34 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 272 seconds)
22:19:07 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 268 seconds)
22:20:09 × zer0bitz quits (~zer0bitz@dsl-hkibng32-54fb48-32.dhcp.inet.fi) (Ping timeout: 260 seconds)
22:24:26 wroathe joins (~wroathe@50.205.197.50)
22:24:26 × wroathe quits (~wroathe@50.205.197.50) (Changing host)
22:24:26 wroathe joins (~wroathe@user/wroathe)
22:27:15 merijn joins (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl)
22:29:05 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds)
22:35:41 Guest94 joins (~Guest94@2600:8805:d807:e00:9189:eb63:2ecf:8f6e)
22:43:30 <Guest94> Hi all, im beginner in Haskell and have a question about function composition (.) operator. Say I have this code:
22:43:30 <Guest94> firstPart = (<> " ")
22:43:31 <Guest94> compose = (<>) . firstPart
22:43:31 <Guest94> compose "hi" "john"
22:43:32 <Guest94> ghci> "hi john"
22:43:32 <Guest94> Im confused at (<>) is a 2 args function. Is it that natural to compose different no. of args function together?
22:43:33 <Guest94> Secondly, I tried to apply the args on the same line with the composition, but it gives me error, even though I have the application operator (&):
22:43:33 <Guest94> partial = (<>) . firstPart & "hi"
22:43:34 <Guest94> partial = (<>) . firstPart & "hi" "john"
22:43:34 <Guest94> partial = (<>) . firstPart "hi" "john"
22:43:41 <Guest94> any help is much appreciated!
22:44:02 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:6450:b99c:346:15e5) (Remote host closed the connection)
22:45:28 <sshine> Guest94, hi
22:46:04 <sshine> Guest94, (<> " ") is syntax sugar for (\s -> s <> " ")
22:46:26 <sshine> Guest94, (" " <>) is syntax sugar for (\s -> " " <> s)
22:46:38 scoopahdoopah joins (~quassel@050-089-109-059.res.spectrum.com)
22:47:45 <sshine> Guest94, the reason you can't write (<>) . is, as you say, it's a two-argument function.
22:48:48 <sshine> well, you can write it, but...
22:48:52 <sshine> :t ((<>) .)
22:48:53 <lambdabot> Semigroup a1 => (a2 -> a1) -> a2 -> a1 -> a1
22:50:05 <Guest94> sshine I don't get what you mean, I can still write
22:50:05 <Guest94> compose = (<>) . firstPart
22:50:06 <Guest94> compose "hi" "john"
22:50:06 <Guest94> and the result is "hi john"
22:50:54 × Unicorn_Princess quits (~Unicorn_P@user/Unicorn-Princess/x-3540542) (Quit: Leaving)
22:50:55 <Guest94> but I didn't want to bind (<>) . firstPart to the variable compose
22:51:46 <sshine> I'm a little confused. what do you wanna do then? :)
22:51:50 <Guest94> I wanted to directly pass args right after the composition, and it failed, I tried all 3 ways:
22:51:51 <Guest94> (<>) . firstPart & "hi"
22:51:51 <Guest94> (<>) . firstPart & "hi" "john"
22:51:52 <Guest94> (<>) . firstPart "hi" "john"
22:52:34 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:6450:b99c:346:15e5)
22:52:43 <geekosaur> @let firstPart = (<> " ")
22:52:45 <lambdabot> Defined.
22:53:06 <geekosaur> > ((<>) . firstpart) "hi" "john"
22:53:08 <lambdabot> error:
22:53:08 <lambdabot> • Variable not in scope: firstpart :: [Char] -> [Char]
22:53:08 <lambdabot> • Perhaps you meant ‘firstPart’ (line 202)
22:53:14 <geekosaur> > ((<>) . firstPart) "hi" "john"
22:53:16 <lambdabot> "hi john"
22:53:31 <sshine> > (((<>) . (<> " ")) "hi") "john"
22:53:33 <lambdabot> "hi john"
22:54:01 <geekosaur> & does not help you here because the "hi" "john" part following it is treated as a function application, but "hi" isn't a function
22:54:59 <sshine> > intercalate " " ["hi", "john"] -- :o
22:55:01 <lambdabot> "hi john"
22:55:10 <xerox> > unwords ["hi","john"]
22:55:13 <lambdabot> "hi john"
22:55:32 <sshine> > "hi john"
22:55:35 <lambdabot> "hi john"
22:55:40 <Guest94> geekosaur yours work. Could anyone explain why all my 3 ways failed?
22:56:14 wroathe joins (~wroathe@207-153-38-140.fttp.usinternet.com)
22:56:14 × wroathe quits (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
22:56:14 wroathe joins (~wroathe@user/wroathe)
22:56:14 <Guest94> (<>) . firstPart "hi" "john"
22:56:15 <Guest94> (<>) . firstPart & "hi"
22:56:15 <Guest94> (<>) . firstPart & "hi" "john"
22:57:17 <sshine> Guest94, (&) is for reverse function application, i.e. the function comes after. so since "hi" is not a function, that won't work.
22:57:51 <sshine> Guest94, the first one won't work because it gets interpreted as: (<>) . (firstPart "hi" "john"), but firstPart only takes one argument.
22:59:17 <sshine> Guest94, considering geekosaur's: ((<>) . firstPart) "hi" "john" -- here, (<>) . (<> " ") :: [Char] -> [Char] -> [Char], i.e. it's a function that takes two curried arguments, which it's given.
22:59:45 <Guest94> sshine interesting, I just learned that & is about precedence. Effectively i expected & would make the composition (<>) . firstPart higher than the function application firstPart "hi". Meaning, I expect the composition happen, ONLY AFTER that will it apply the args to the composition.
23:00:18 <sshine> Guest94, you're looking for $ if you want the function to live on the left-hand side.
23:00:24 × merijn quits (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) (Ping timeout: 260 seconds)
23:01:00 <sshine> Guest94, but if you do (<>) . (<> " ") $ "hi" "john" -- you get the problem that geekosaur explained.
23:01:14 <sshine> ("hi" isn't a function)
23:01:15 <Guest94> you are right! I mistook & to $
23:03:54 <sshine> f . g = \x -> f (g x)
23:04:32 × chexum quits (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection)
23:04:47 chexum joins (~quassel@gateway/tor-sasl/chexum)
23:05:01 × oldfashionedcow quits (~Rahul_San@user/oldfashionedcow) (Quit: WeeChat 3.7.1)
23:05:02 <Guest94> Im starting to get it. But one more confusing point. Could you tell me why this NOT work?
23:05:03 <Guest94> (<>) . firstPart $ "hi" "john"
23:05:11 <sshine> I just did
23:05:16 oldfashionedcow joins (~Rahul_San@user/oldfashionedcow)
23:05:21 <sshine> firstPart = (<> " ")
23:05:42 <sshine> it will first try to apply "hi" as a function to "john"
23:05:56 <sshine> > "hi" "john"
23:05:58 <lambdabot> error:
23:05:58 <lambdabot> • Couldn't match expected type ‘[Char] -> t’
23:05:58 <lambdabot> with actual type ‘[Char]’
23:05:59 <geekosaur> $ applies the next expression, not an arbitrary number of parameters
23:06:21 <geekosaur> The next expression looks like a function application, except that "hi" isn't a function so it fails
23:06:36 <geekosaur> :t (&)
23:06:38 <lambdabot> a -> (a -> b) -> b
23:06:50 <Guest94> ok that makes sense. I need to read up on $ operator
23:06:51 oldfashionedgoat joins (~oldfashio@2.120.174.52)
23:07:15 <geekosaur> (&) is ($) only reversed, so the error is even weirder because you gave it as <function> & <parameters> but it expects <parameter> & <function>
23:07:23 × azimut_ quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds)
23:07:40 <Guest94> essentially, the book im reading only mentioned that $ is to demote the precedence of firstPart "hi", and focus the precedence on the composition of (<>) . firstPart
23:08:22 <Guest94> and so I could understand that I can bind like this:
23:08:22 <Guest94> partial = (<>) . firstPart $ "hi"
23:08:23 <Guest94> partial "john"
23:08:23 <Guest94> >> "hi john"
23:08:31 × oldfashionedgoat quits (~oldfashio@2.120.174.52) (Client Quit)
23:09:05 <Guest94> but I never realize that
23:09:05 <Guest94> (<>) . firstPart $ "hi" "john"
23:09:06 <Guest94> would consider "hi" a function
23:09:35 <sshine> yes
23:09:43 azimut joins (~azimut@gateway/tor-sasl/azimut)
23:10:20 <sshine> because f $ x is f(x), so f $ x y is f(x y), and 'x y' is x applied as a function to y.
23:10:33 <sshine> here, (<>) . firstPart is f
23:11:08 × CiaoSen quits (~Jura@p200300c9574fa4002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
23:11:48 <sshine> you don't want f("hi"("john")) :)
23:12:05 <Guest94> because f $ x is f(x), so f $ x y is f(x y), and 'x y' is x applied as a function to y.
23:12:10 <Guest94> that makes a lot of sense!
23:12:37 <sshine> it's easier to see when you set f = (<>) . firstPart -- there's a lot of syntax sugar to distract from the simple function application that follows it.
23:12:41 <Guest94> now i have a better understand of $ is the f(x). I was tunneled in thinking it was to demote precedence
23:13:06 <sshine> if it's any help, you can *always* use parentheses instead of $.
23:13:59 <Guest94> sshine geekosaur thank you for your help
23:15:09 <geekosaur> it does demote precedence, usually. but function application has a fixed high precedence that $ can't touch
23:15:31 <geekosaur> so `"hi" "there"` continues to look like a function application
23:16:05 <Guest94> ok thank you
23:16:07 <geekosaur> > (<>) . firstPart $ "hi" $ "john"
23:16:09 <lambdabot> error:
23:16:09 <lambdabot> • Couldn't match expected type ‘[Char] -> [Char]’
23:16:09 <lambdabot> with actual type ‘[Char]’
23:17:01 <sshine> yeah, the space between "hi" and "john" can be seen as an operator with the highest precedence.
23:17:11 <sshine> (function application)
23:17:24 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
23:17:33 <geekosaur> and that one failed because it applies to the wrong thing
23:17:41 <geekosaur> % :info &
23:17:41 <yahb2> <interactive>:1:1: error: Not in scope: ‘&’
23:17:43 <Guest94> say `f = (<>) . firstPart`
23:17:44 <Guest94> so why does this fail
23:17:44 <Guest94> f $ "hi" $ "john"
23:17:53 <Guest94> say `f = (<>) . firstPart`
23:17:53 <Guest94> so why does this fail
23:17:54 <Guest94> `f $ "hi" $ "john"`
23:18:01 alskdf joins (~alskdf@dhcp-108-168-13-112.cable.user.start.ca)
23:18:12 <geekosaur> :t firstPart $ "hi" $ "john"
23:18:13 <lambdabot> error:
23:18:13 <lambdabot> • Couldn't match expected type ‘[Char] -> [Char]’
23:18:13 <lambdabot> with actual type ‘[Char]’
23:18:30 <sshine> f $ "hi" $ "john" => f ("hi" ("john")) when you wanted (f "hi") "john" so you could say it failed because $ is right-associative.
23:19:03 <geekosaur> % import Data.Function
23:19:04 <yahb2> <no output>
23:19:10 <geekosaur> % :info &
23:19:10 <yahb2> (&) :: a -> (a -> b) -> b -- Defined in ‘Data.Function’ ; infixl 1 &
23:19:22 <geekosaur> % :info $
23:19:22 <yahb2> ($) :: (a -> b) -> a -> b -- Defined in ‘GHC.Base’ ; infixr 0 $
23:19:51 <Guest94> why it's not  `f("hi) ("john)` but `f ("hi" ("john"))`
23:19:58 <sshine> > let f = (<>) . (<> " ") in "john" & ("hi" & f)
23:20:00 <lambdabot> "hi john"
23:20:27 <Guest94> i think `"hi"` get consider as a function
23:21:06 <sshine> yes
23:21:12 <anatta> yes, because $ is weak
23:21:37 <Guest94> i think i am pusing it too far, and noone really writes `f & "hi" & "john
23:21:41 <anatta> you could say that everything to the right is evaluated first
23:21:46 <Guest94> i think i am pusing it too far, and noone really writes `f & "hi" & "john`
23:22:18 <geekosaur> many people think using $ is a bad idea, because this is so confusing
23:22:23 <anatta> so if you write f $ "hi" $ "john" it starts by evaluating "john", which is all well and good, but then it tries everything to the right of the second one, which is "hi" "john"
23:22:58 <hpc> the right answer is to parenthesize everything, since everyone already knows lisp :P
23:23:19 sshine is now known as john
23:23:23 <anatta> the right answer is to go bird watching
23:23:33 <anatta> ;)
23:23:39 john is now known as sshine
23:24:40 <Guest94> so everyone prefers paranthesis over $? Im new to haskell, so idk which people usually use (I definitely would go for parenthesis after this discussion)
23:25:11 <sshine> it depends
23:25:11 <anatta> in your case I'd argue the problem is more that you're using contrived functions
23:25:43 <geekosaur> not everyone, but especially for beginners it's a good idea because of things like this
23:25:51 <anatta> like, you could write what you want as f s1 s2 = s1 <> " " <> s2
23:25:55 <anatta> and everything would be fine
23:26:47 <Guest94> that's way better. I was trying to be idiomatic
23:26:50 <hpc> my general rule is when i am writing code, it's not to be read by a computer but by the next person to edit it
23:26:59 <hpc> so i just write whatever i will be able to make sense of a week from now
23:27:08 <anatta> <> is generally an infix operator
23:27:28 <hpc> or as i like to say it, "make code look like what it does"
23:27:30 mimmy_ joins (~mimmy@142.126.70.245)
23:28:00 <Guest94> thank you everyone
23:28:39 × wroathe quits (~wroathe@user/wroathe) (Quit: Reconnecting)
23:28:52 wroathe joins (~wroathe@207-153-38-140.fttp.usinternet.com)
23:28:52 × wroathe quits (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
23:28:52 wroathe joins (~wroathe@user/wroathe)
23:29:13 <anatta> sometimes it's difficult to know what looks weird because you're just not used to it yet, and what looks weird because you're doing something wrong =)
23:29:35 <anatta> it happens to me as well, all the time
23:30:13 <Guest94> :)
23:30:58 × Guest94 quits (~Guest94@2600:8805:d807:e00:9189:eb63:2ecf:8f6e) (Quit: Client closed)
23:33:07 × mimmy_ quits (~mimmy@142.126.70.245) (Ping timeout: 268 seconds)
23:35:45 × sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
23:35:50 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
23:37:02 sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
23:37:23 × alskdf quits (~alskdf@dhcp-108-168-13-112.cable.user.start.ca) (Quit: Leaving)
23:40:22 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 252 seconds)
23:44:02 Guest94 joins (~Guest94@2600:8805:d807:e00:9189:eb63:2ecf:8f6e)
23:52:07 × jumper149 quits (~jumper149@base.felixspringer.xyz) (Quit: WeeChat 3.7.1)
23:52:10 × Tuplanolla quits (~Tuplanoll@91-159-68-152.elisa-laajakaista.fi) (Quit: Leaving.)

All times are in UTC on 2023-01-15.