2023/12/07

2023-12-07 00:00:09 +0100jmdaemon(~jmdaemon@user/jmdaemon) (Ping timeout: 252 seconds)
2023-12-07 00:00:22 +0100bratwurst(~blaadsfa@2604:3d09:207f:f650:216:3eff:fe5a:a1f8)
2023-12-07 00:00:23 +0100mc47(~mc47@xmonad/TheMC47) (Remote host closed the connection)
2023-12-07 00:07:07 +0100haskellbridge(~haskellbr@069-135-003-034.biz.spectrum.com) (Remote host closed the connection)
2023-12-07 00:09:55 +0100chomwitt(~chomwitt@2a02:587:7a09:c300:1ac0:4dff:fedb:a3f1) (Ping timeout: 260 seconds)
2023-12-07 00:11:59 +0100haskellbridge(~haskellbr@069-135-003-034.biz.spectrum.com)
2023-12-07 00:11:59 +0100ChanServ+v haskellbridge
2023-12-07 00:12:40 +0100notzmv(~zmv@user/notzmv) (Ping timeout: 246 seconds)
2023-12-07 00:13:03 +0100peterbecich(~Thunderbi@047-229-123-186.res.spectrum.com) (Ping timeout: 256 seconds)
2023-12-07 00:14:22 +0100sord937(~sord937@gateway/tor-sasl/sord937) (Quit: sord937)
2023-12-07 00:17:13 +0100Square2(~Square4@user/square)
2023-12-07 00:19:51 +0100acidjnk_new(~acidjnk@p200300d6e72b933411fabc01fd6787da.dip0.t-ipconnect.de) (Ping timeout: 256 seconds)
2023-12-07 00:20:39 +0100Square(~Square@user/square) (Ping timeout: 260 seconds)
2023-12-07 00:20:46 +0100gehmehgeh(~user@user/gehmehgeh) (Quit: Leaving)
2023-12-07 00:21:25 +0100sawilagar(~sawilagar@user/sawilagar) (Remote host closed the connection)
2023-12-07 00:21:49 +0100sawilagar(~sawilagar@user/sawilagar)
2023-12-07 00:26:33 +0100wroathe(~wroathe@50.205.197.50)
2023-12-07 00:26:33 +0100wroathe(~wroathe@50.205.197.50) (Changing host)
2023-12-07 00:26:33 +0100wroathe(~wroathe@user/wroathe)
2023-12-07 00:34:57 +0100xff0x(~xff0x@ai096045.d.east.v6connect.net) (Ping timeout: 268 seconds)
2023-12-07 00:35:59 +0100machinedgod(~machinedg@93-136-134-38.adsl.net.t-com.hr) (Ping timeout: 264 seconds)
2023-12-07 00:36:53 +0100xff0x(~xff0x@178.255.149.135)
2023-12-07 00:38:58 +0100wroathe(~wroathe@user/wroathe) (Ping timeout: 260 seconds)
2023-12-07 00:44:55 +0100myxos(~myxos@065-028-251-121.inf.spectrum.com) (Remote host closed the connection)
2023-12-07 00:44:58 +0100 <monochrom> Darn I am trumped by GHC strictness AI again.
2023-12-07 00:45:28 +0100L29Ah(~L29Ah@wikipedia/L29Ah) ()
2023-12-07 00:45:52 +0100 <monochrom> So I wanted to show what reverse looks like in STG, Cmm, and asm. "foo acc (x:xs) = foo (x:acc) xs; foo acc [] = acc".
2023-12-07 00:46:34 +0100 <monochrom> I was hoping that for simplicity I could omit the base case "foo acc [] = acc" in hope that the STG etc would be less clutter.
2023-12-07 00:47:31 +0100 <monochrom> But GHC sees that if xs is finite, the function will bottom out anyway; and if xs is infinite, no one will see the x:acc construction.
2023-12-07 00:47:57 +0100 <monochrom> So the optimized code becomes: "foo _ (_:xs) = foo xs" -_-;
2023-12-07 00:48:09 +0100 <Lycurgus> so from this, i'm inferreing that 'strictness AI' means the general complier without forcing strictness
2023-12-07 00:48:27 +0100 <monochrom> "If it diverges anyway, better to diverge in constant space..."
2023-12-07 00:51:02 +0100Sgeo(~Sgeo@user/sgeo)
2023-12-07 01:01:43 +0100L29Ah(~L29Ah@wikipedia/L29Ah)
2023-12-07 01:02:18 +0100xff0x(~xff0x@178.255.149.135) (Ping timeout: 252 seconds)
2023-12-07 01:04:05 +0100jmdaemon(~jmdaemon@user/jmdaemon)
2023-12-07 01:04:07 +0100xff0x(~xff0x@2405:6580:b080:900:8e8f:f259:634:292d)
2023-12-07 01:06:29 +0100wroathe(~wroathe@207-153-38-140.fttp.usinternet.com)
2023-12-07 01:06:29 +0100wroathe(~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
2023-12-07 01:06:29 +0100wroathe(~wroathe@user/wroathe)
2023-12-07 01:07:24 +0100tremon(~tremon@83.80.159.219) (Quit: getting boxed in)
2023-12-07 01:10:06 +0100Tuplanolla(~Tuplanoll@91-159-68-236.elisa-laajakaista.fi) (Quit: Leaving.)
2023-12-07 01:17:20 +0100hsdafdlashfdlsh(~hsdafdlas@104.223.91.28)
2023-12-07 01:19:06 +0100 <hsdafdlashfdlsh>  I'm looking for a pure Haskell integer programming library; does anyone have a recommendation?
2023-12-07 01:20:07 +0100carif^(~cd@c-98-242-74-66.hsd1.ga.comcast.net)
2023-12-07 01:22:10 +0100pavonia(~user@user/siracusa)
2023-12-07 01:22:26 +0100waleee(~waleee@h-176-10-144-38.NA.cust.bahnhof.se) (Ping timeout: 245 seconds)
2023-12-07 01:28:56 +0100 <Lycurgus> https://hackage.haskell.org/package/limp
2023-12-07 01:32:35 +0100 <Lycurgus> everything in that areas looks like bindings
2023-12-07 01:32:50 +0100 <Lycurgus> don't see any actually doin stuff
2023-12-07 01:33:36 +0100 <Lycurgus> bindings and representation
2023-12-07 01:33:57 +0100 <Lycurgus> teed up for doin stuff igess
2023-12-07 01:35:02 +0100 <Lycurgus> prolly something in the OR / math programming societies which doesn make its way to hackage
2023-12-07 01:35:05 +0100peterbecich(~Thunderbi@047-229-123-186.res.spectrum.com)
2023-12-07 01:35:33 +0100 <Lycurgus> i vaguely recall maybe having seen such
2023-12-07 01:36:36 +0100 <hsdafdlashfdlsh> Lycurgus: Yeah, I found that too, but doesn't seem like it has much of a solver at all.
2023-12-07 01:36:55 +0100 <Lycurgus> solver = doin stuff
2023-12-07 01:38:01 +0100 <hsdafdlashfdlsh> Oh right.
2023-12-07 01:38:11 +0100 <Lycurgus> hopefully i didn give the impression i thought bindings isn the way to go
2023-12-07 01:38:30 +0100 <Lycurgus> but didn see any good bindings either
2023-12-07 01:39:33 +0100 <Lycurgus> ppls are big on representation and le'elegance hereabouts, which becomes a kind of hectic doin in its own right
2023-12-07 01:39:52 +0100 <hsdafdlashfdlsh> Yeah. I think I'll just have to roll my own. :)
2023-12-07 01:40:52 +0100 <hsdafdlashfdlsh> Probably won't be so le'elegant, though.
2023-12-07 01:41:15 +0100Lycurgushaving made the point about bindings moves on
2023-12-07 01:45:29 +0100__monty__(~toonn@user/toonn) (Quit: leaving)
2023-12-07 01:54:29 +0100xff0x(~xff0x@2405:6580:b080:900:8e8f:f259:634:292d) (Ping timeout: 256 seconds)
2023-12-07 01:55:41 +0100bratwurst(~blaadsfa@2604:3d09:207f:f650:216:3eff:fe5a:a1f8) (Quit: Leaving)
2023-12-07 01:56:24 +0100xff0x(~xff0x@ai096045.d.east.v6connect.net)
2023-12-07 02:00:10 +0100wroathe(~wroathe@user/wroathe) (Ping timeout: 256 seconds)
2023-12-07 02:02:02 +0100sawilagar(~sawilagar@user/sawilagar) (Ping timeout: 260 seconds)
2023-12-07 02:07:35 +0100carif^(~cd@c-98-242-74-66.hsd1.ga.comcast.net) (Remote host closed the connection)
2023-12-07 02:12:08 +0100peterbecich(~Thunderbi@047-229-123-186.res.spectrum.com) (Ping timeout: 252 seconds)
2023-12-07 02:19:24 +0100hsdafdlashfdlsh(~hsdafdlas@104.223.91.28) (Quit: Client closed)
2023-12-07 02:22:38 +0100wroathe(~wroathe@207-153-38-140.fttp.usinternet.com)
2023-12-07 02:22:38 +0100wroathe(~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
2023-12-07 02:22:38 +0100wroathe(~wroathe@user/wroathe)
2023-12-07 02:22:58 +0100Unicorn_Princess(~Unicorn_P@user/Unicorn-Princess/x-3540542) (Remote host closed the connection)
2023-12-07 02:24:07 +0100ChaiTRex(~ChaiTRex@user/chaitrex) (Ping timeout: 240 seconds)
2023-12-07 02:26:24 +0100ChaiTRex(~ChaiTRex@user/chaitrex)
2023-12-07 02:48:27 +0100Incredia_(~Incredia@176.254.244.83) (Ping timeout: 256 seconds)
2023-12-07 02:52:02 +0100Incredia(~Incredia@176.254.244.83)
2023-12-07 03:03:25 +0100bilegeek(~bilegeek@2600:1008:b019:ebe6:e541:b9c8:7cbf:696)
2023-12-07 03:04:09 +0100bilegeek(~bilegeek@2600:1008:b019:ebe6:e541:b9c8:7cbf:696) (Max SendQ exceeded)
2023-12-07 03:04:59 +0100bilegeek(~bilegeek@2600:1008:b019:ebe6:e541:b9c8:7cbf:696)
2023-12-07 03:05:59 +0100bilegeek(~bilegeek@2600:1008:b019:ebe6:e541:b9c8:7cbf:696) (Max SendQ exceeded)
2023-12-07 03:07:07 +0100bilegeek(~bilegeek@2600:1008:b019:ebe6:e541:b9c8:7cbf:696)
2023-12-07 03:07:20 +0100idgaen(~idgaen@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 4.1.1)
2023-12-07 03:08:07 +0100bilegeek(~bilegeek@2600:1008:b019:ebe6:e541:b9c8:7cbf:696) (Max SendQ exceeded)
2023-12-07 03:09:19 +0100peterbecich(~Thunderbi@047-229-123-186.res.spectrum.com)
2023-12-07 03:09:27 +0100bilegeek(~bilegeek@2600:1008:b019:ebe6:e541:b9c8:7cbf:696)
2023-12-07 03:10:28 +0100bilegeek(~bilegeek@2600:1008:b019:ebe6:e541:b9c8:7cbf:696) (Max SendQ exceeded)
2023-12-07 03:10:51 +0100whatsupdoc(uid509081@id-509081.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
2023-12-07 03:11:27 +0100bilegeek(~bilegeek@2600:1008:b019:ebe6:e541:b9c8:7cbf:696)
2023-12-07 03:11:54 +0100bilegeek(~bilegeek@2600:1008:b019:ebe6:e541:b9c8:7cbf:696) (Remote host closed the connection)
2023-12-07 03:17:53 +0100jargon(~jargon@174-22-221-51.phnx.qwest.net)
2023-12-07 03:26:09 +0100pastly(~pastly@gateway/tor-sasl/pastly) (Remote host closed the connection)
2023-12-07 03:27:15 +0100pastly(~pastly@gateway/tor-sasl/pastly)
2023-12-07 03:28:07 +0100ezzieygu1wufezzieyguywuf
2023-12-07 03:29:46 +0100xff0x(~xff0x@ai096045.d.east.v6connect.net) (Ping timeout: 255 seconds)
2023-12-07 03:30:35 +0100wroathe(~wroathe@user/wroathe) (Ping timeout: 264 seconds)
2023-12-07 03:34:20 +0100myxos(~myxos@065-028-251-121.inf.spectrum.com)
2023-12-07 03:34:22 +0100bilegeek(~bilegeek@2600:1008:b019:ebe6:e541:b9c8:7cbf:696)
2023-12-07 03:35:52 +0100whatsupdoc(uid509081@id-509081.hampstead.irccloud.com)
2023-12-07 03:36:28 +0100 <Lycurgus> ftr, limp does have the two main classic solution techniques as solvers
2023-12-07 03:40:25 +0100 <Lycurgus> or stubs of ones anyway
2023-12-07 03:40:34 +0100 <Lycurgus> so don't say no damn solvers
2023-12-07 03:40:36 +0100bratwurst(~blaadsfa@2604:3d09:207f:f650:216:3eff:fe5a:a1f8)
2023-12-07 03:40:53 +0100bratwurst(~blaadsfa@2604:3d09:207f:f650:216:3eff:fe5a:a1f8) (Client Quit)
2023-12-07 03:41:25 +0100wroathe(~wroathe@207-153-38-140.fttp.usinternet.com)
2023-12-07 03:41:26 +0100wroathe(~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
2023-12-07 03:41:26 +0100wroathe(~wroathe@user/wroathe)
2023-12-07 03:44:53 +0100ystael(~ystael@user/ystael) (Ping timeout: 268 seconds)
2023-12-07 03:49:17 +0100Square2(~Square4@user/square) (Ping timeout: 240 seconds)
2023-12-07 03:56:11 +0100notzmv(~zmv@user/notzmv)
2023-12-07 03:57:29 +0100[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer)
2023-12-07 03:59:57 +0100peterbecich(~Thunderbi@047-229-123-186.res.spectrum.com) (Ping timeout: 252 seconds)
2023-12-07 04:08:30 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:9ce:2c57:5542:dde4) (Remote host closed the connection)
2023-12-07 04:08:45 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:a11c:b194:25be:95ba)
2023-12-07 04:11:27 +0100xff0x(~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp)
2023-12-07 04:16:34 +0100nate4(~nate@c-98-45-158-125.hsd1.ca.comcast.net)
2023-12-07 04:19:28 +0100jargon(~jargon@174-22-221-51.phnx.qwest.net) (Remote host closed the connection)
2023-12-07 04:33:35 +0100shOkEy(~shOkEy@178-164-188-90.pool.digikabel.hu) (Ping timeout: 264 seconds)
2023-12-07 04:35:03 +0100shOkEy(~shOkEy@92-249-185-141.pool.digikabel.hu)
2023-12-07 04:37:59 +0100edr(~edr@user/edr) (Quit: Leaving)
2023-12-07 04:46:11 +0100td_(~td@i53870917.versanet.de) (Ping timeout: 264 seconds)
2023-12-07 04:47:45 +0100td_(~td@i53870937.versanet.de)
2023-12-07 04:50:01 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex)
2023-12-07 04:53:48 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
2023-12-07 04:53:48 +0100finn_elija(~finn_elij@user/finn-elija/x-0085643)
2023-12-07 04:53:48 +0100finn_elijaFinnElija
2023-12-07 04:59:07 +0100trev(~trev@user/trev)
2023-12-07 04:59:21 +0100wroathe(~wroathe@user/wroathe) (Ping timeout: 256 seconds)
2023-12-07 05:00:56 +0100ChaiTRex(~ChaiTRex@user/chaitrex) (Remote host closed the connection)
2023-12-07 05:01:36 +0100ChaiTRex(~ChaiTRex@user/chaitrex)
2023-12-07 05:03:34 +0100wgl(~wgl@2601:8c0:d01:43a0::6d47)
2023-12-07 05:07:53 +0100wgl(~wgl@2601:8c0:d01:43a0::6d47) (Client Quit)
2023-12-07 05:08:31 +0100 <iqubic> Is there something better I can do than (liftA2 zip fx fy)? I'm looking for something of type Applicative f => f [a] -> f [b] -> f [(a, b)]
2023-12-07 05:08:59 +0100 <Axman6> zip <$> fx <*> fy? =)
2023-12-07 05:09:12 +0100 <Axman6> But no, not really
2023-12-07 05:09:31 +0100 <iqubic> That's just a restating of the initial problem.
2023-12-07 05:09:41 +0100 <Axman6> yes, hence the =)
2023-12-07 05:09:50 +0100 <iqubic> Do need Applicative here?
2023-12-07 05:10:17 +0100 <Axman6> Well, if we had an Apply type class, you could get away with that, but we don't
2023-12-07 05:11:23 +0100 <iqubic> I can't use fmap only here?
2023-12-07 05:14:10 +0100sabino(~sabino@user/sabino) (Quit: Lambda _ -> x)
2023-12-07 05:14:17 +0100 <monochrom> No, this is the point of liftA2.
2023-12-07 05:17:26 +0100 <jackdk> Axman6: https://hackage.haskell.org/package/semigroupoids-6.0.0.1/docs/Data-Functor-Apply.html#t:Apply
2023-12-07 05:19:06 +0100nate4(~nate@c-98-45-158-125.hsd1.ca.comcast.net) (Ping timeout: 256 seconds)
2023-12-07 05:21:07 +0100thegeekinside(~thegeekin@189.141.65.247) (Remote host closed the connection)
2023-12-07 05:23:56 +0100ddellacosta(~ddellacos@ool-44c73d16.dyn.optonline.net)
2023-12-07 05:25:12 +0100 <Axman6> Sure, it exists, but it's not worth a package import for
2023-12-07 05:25:17 +0100szkl(uid110435@id-110435.uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
2023-12-07 05:31:43 +0100szkl(uid110435@id-110435.uxbridge.irccloud.com)
2023-12-07 05:39:46 +0100peterbecich(~Thunderbi@047-229-123-186.res.spectrum.com)
2023-12-07 05:44:41 +0100aforemny_(~aforemny@i59F516C0.versanet.de)
2023-12-07 05:45:41 +0100aforemny(~aforemny@i59F516FF.versanet.de) (Ping timeout: 240 seconds)
2023-12-07 05:47:28 +0100 <iqubic> What makes this situation require Applicative?
2023-12-07 05:51:00 +0100 <ski> that you're not operating over one "collection"/"computation"/"action"/"effect", but two in this case, combining them
2023-12-07 05:51:24 +0100 <ski> (`fx' and `fy')
2023-12-07 05:51:27 +0100danza(~francesco@rm-19-11-235.service.infuturo.it)
2023-12-07 05:53:06 +0100 <iqubic> Oh... I see. That's kinda what I thought TBH.
2023-12-07 05:53:52 +0100 <ski> (just one would be `Functor'. zero or more is `Applicative' (idiom). that one is still "static" in the sense that the "computation structure" doesn't depend on intermediate values in the computation. `Monad' is "dynamic" in that "what (effects) to do later" may depend upon intermediate values, unlike `Applicative')
2023-12-07 05:55:16 +0100 <iqubic> How do you do zero? Is that the `pure' case?
2023-12-07 05:56:41 +0100 <ski> yes
2023-12-07 05:57:19 +0100 <ski> define `sequenceA :: Applicative i => [i a] -> i [a]' for yourself
2023-12-07 05:59:13 +0100 <iqubic> > traverse id
2023-12-07 05:59:15 +0100 <lambdabot> error:
2023-12-07 05:59:15 +0100 <lambdabot> • No instance for (Typeable f0)
2023-12-07 05:59:15 +0100 <lambdabot> arising from a use of ‘show_M65950731038089380657’
2023-12-07 05:59:30 +0100 <iqubic> that's not really doing what you asked.
2023-12-07 06:01:44 +0100 <danza> > :t traverse id
2023-12-07 06:01:45 +0100 <lambdabot> <hint>:1:1: error: parse error on input ‘:’
2023-12-07 06:01:51 +0100 <ski> yea, i meant define it, without using `Traversable' operations :)
2023-12-07 06:01:55 +0100 <danza> % :t traverse id
2023-12-07 06:01:55 +0100 <yahb2> traverse id :: (Traversable t, Applicative f) => t (f b) -> f (t b)
2023-12-07 06:02:31 +0100 <danza> using traversable seems more fun though :)
2023-12-07 06:02:34 +0100 <ski> ("from scratch", if you will)
2023-12-07 06:02:34 +0100 <danza> good morning all
2023-12-07 06:03:15 +0100 <ski> but yea, if you prefer, you can define `traverse' (for lists, say) instead. they're equivalent
2023-12-07 06:03:32 +0100 <monochrom> I.e., write your own recursion over the input list. Use Applicative methods.
2023-12-07 06:03:49 +0100 <ski> using `foldr' e.g. would also be okay
2023-12-07 06:04:12 +0100 <iqubic> I'm gonna work on Advent of Code now. I'll work on this later.
2023-12-07 06:04:13 +0100 <monochrom> Yeah actually it's a beautiful foldr too.
2023-12-07 06:04:17 +0100 <ski> (but it might be easier, and perhaps more enlightening, to do direct recursion)
2023-12-07 06:06:20 +0100 <danza> interesting. Usually things that are discovered allow expressing more complex from simpler, but here traversable is more simple and also based on the former to build with it
2023-12-07 06:06:50 +0100_ht(~Thunderbi@28-52-174-82.ftth.glasoperator.nl)
2023-12-07 06:09:30 +0100 <ski> "things that are discovered" ?
2023-12-07 06:10:16 +0100 <danza> abstractions that are discovered. I am referring to a distinction between invention and discovery, but probably the concept is not as popular as i thought
2023-12-07 06:10:18 +0100 <ski> "but here traversable is more simple" -- than what ? "and also based on the former to build with it" -- the former being ? `sequenceA' ?
2023-12-07 06:10:42 +0100 <danza> then it feels more primitive. Applicative
2023-12-07 06:10:47 +0100 <ski> the line can get a bit blurry
2023-12-07 06:11:07 +0100 <danza> definitely. A matter of reworking them over centuries, i guess
2023-12-07 06:11:21 +0100 <monochrom> Well, to me, the sentence simply didn't parse. :)
2023-12-07 06:11:45 +0100 <monochrom> And too many pronouns.
2023-12-07 06:11:46 +0100 <danza> yeah i just wake up and dived straight in something not that plain ^^;
2023-12-07 06:12:25 +0100 <danza> i assume haskellers have outstanding parsing skillss XD
2023-12-07 06:12:52 +0100 <ski> i think i relatively often have to ask for referents for pronouns .. not sure how much of that is a me problem, and how much is a problem of others not always articulating too clearly what they intend / have in mind
2023-12-07 06:13:15 +0100 <danza> definitely a writer's problem, i would say
2023-12-07 06:13:49 +0100 <iqubic> I'm a woman. I use she/her, if that matters.
2023-12-07 06:13:50 +0100 <danza> but could also be lack of practice with impure expressions XD
2023-12-07 06:14:51 +0100 <danza> oh nice to see the number of woman haskellers increasing. About pronouns, i try to use "them" until it gets clear, if that matters
2023-12-07 06:15:14 +0100 <iqubic> I'm trans, but I'm still a woman.
2023-12-07 06:15:15 +0100 <ski> hm, well, i guess i was more thinking of pronouns like "it", "this", that", and the like
2023-12-07 06:15:31 +0100 <ski> (sorry if that wasn't clear)
2023-12-07 06:15:55 +0100 <danza> those refer to locally defined variables that are outside an expression :D
2023-12-07 06:16:19 +0100 <danza> immutable, sure, but natural language is often mutable
2023-12-07 06:16:28 +0100 <monochrom> Right, I was referring to, for example, "it is a constant therefore it is zero". (Can you guess that it (pun!) means "f is a constant therefore the derivative of f is zero"?)
2023-12-07 06:16:52 +0100 <monochrom> So now you are speaking like "I add more 'it's until it's clear" XD
2023-12-07 06:17:00 +0100 <danza> oh applicative and traversable were in scope
2023-12-07 06:17:07 +0100 <ski> yea .. but they're kinda picked out of the wind, like a type class instance. only there can be several ones matching, in scope, and can be ambiguous which one was intended (or perhaps not at all clear which ones would waulify)
2023-12-07 06:17:55 +0100 <danza> in fact it does not matter because i was trying to talk about a circular dependency about "primitives"
2023-12-07 06:18:16 +0100 <ski> (then there's also stuff like "donkey sentences")
2023-12-07 06:18:30 +0100 <ski> circular, how ?
2023-12-07 06:18:59 +0100 <danza> the simplest definition of a (defining) applicative function depending on traversable
2023-12-07 06:19:27 +0100 <ski> defining ?
2023-12-07 06:20:01 +0100 <danza> well yeah, to define an applicative you need a sequenceA, although... probably there is another grade of definition, the abstract one
2023-12-07 06:21:29 +0100 <monochrom> No, you just need a desire for "like fmap but for a 2-ary operator and two operands"
2023-12-07 06:22:03 +0100 <danza> (i don't think anyone here doubts a trans woman is a woman if that matters iqubic)
2023-12-07 06:22:47 +0100Unode(~Unode@fg-ext-220.embl.de) (Ping timeout: 260 seconds)
2023-12-07 06:22:56 +0100 <danza> i see ... i am not good at those. Bifunctors?
2023-12-07 06:25:42 +0100monochrom(trebla@216.138.220.146) (Quit: ZNC 1.8.2+deb3.1 - https://znc.in)
2023-12-07 06:26:20 +0100 <ski> hmm .. i guess `sequenceA' (for lists) may be enough to derive `pure' and `(<*>)' .. not sure if you can get `fmap' from `sequenceA' or `traverse', though
2023-12-07 06:28:23 +0100 <jle`> :t \f -> runIdentity . traverse (Identity . f)
2023-12-07 06:28:24 +0100 <lambdabot> Traversable t => (a -> b) -> t a -> t b
2023-12-07 06:28:44 +0100 <jle`> :t fmapDefault
2023-12-07 06:28:45 +0100 <lambdabot> Traversable t => (a -> b) -> t a -> t b
2023-12-07 06:29:30 +0100Unode(~Unode@fg-ext-220.embl.de)
2023-12-07 06:32:03 +0100 <ski> yea, sorry, still talking about `Traversable []', and wanting to get `fmap' for the `Applicative' in question, not for the `Traversable' (`[]')
2023-12-07 06:33:38 +0100 <danza> well i did not mean one could also define the functor part with sequenceA
2023-12-07 06:34:25 +0100 <ski> yea, i was still wondering :p
2023-12-07 06:34:36 +0100 <ski> (and no, bifunctors is for something else)
2023-12-07 06:38:59 +0100monochrom(trebla@216.138.220.146)
2023-12-07 06:39:15 +0100 <ski> re
2023-12-07 06:39:35 +0100 <danza> "re"?
2023-12-07 06:40:28 +0100 <int-e> short for "rehi", "Hi again", or something like that
2023-12-07 06:40:34 +0100 <ski> monochrom being back
2023-12-07 06:41:44 +0100 <danza> rehi monochrom :D
2023-12-07 06:50:28 +0100 <glguy> (aoc spoiler day 7) I was excited to get to use two different extensions (productively) in this one list comprehension https://github.com/glguy/advent/blob/main/solutions/src/2023/07.hs#L44-L45
2023-12-07 06:51:36 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:a11c:b194:25be:95ba) (Remote host closed the connection)
2023-12-07 06:52:06 +0100Maxdamantus(~Maxdamant@user/maxdamantus) (Ping timeout: 252 seconds)
2023-12-07 06:52:39 +0100peterbecich(~Thunderbi@047-229-123-186.res.spectrum.com) (Ping timeout: 252 seconds)
2023-12-07 06:53:52 +0100Maxdamantus(~Maxdamant@user/maxdamantus)
2023-12-07 06:55:43 +0100chexum_(~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection)
2023-12-07 06:59:29 +0100misterfish(~misterfis@84-53-85-146.bbserv.nl)
2023-12-07 07:02:30 +0100chexum(~quassel@gateway/tor-sasl/chexum)
2023-12-07 07:03:45 +0100 <EvanR> I lost too much time on part 1 messing with Ord stuff
2023-12-07 07:03:56 +0100 <EvanR> got to resume later
2023-12-07 07:09:35 +0100takuan(~takuan@178-116-218-225.access.telenet.be)
2023-12-07 07:14:52 +0100glguy(g@libera/staff/glguy) (Quit: Quit)
2023-12-07 07:18:23 +0100g(g@libera/staff/glguy) (Remote host closed the connection)
2023-12-07 07:18:49 +0100euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 255 seconds)
2023-12-07 07:19:09 +0100euleritian(~euleritia@dynamic-046-114-206-154.46.114.pool.telefonica.de)
2023-12-07 07:21:14 +0100glguy(glguy@libera/staff/glguy)
2023-12-07 07:23:10 +0100g(glguy@libera/staff/glguy)
2023-12-07 07:23:15 +0100 <haskellbridge> 12<C​elestial> when we have a function whose input will only ever be ``n `rem` <constant>`` , is there a way to tell the compiler that it's "fine" to just have the cases from 0 to n - 1?
2023-12-07 07:23:54 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:a11c:b194:25be:95ba)
2023-12-07 07:24:06 +0100 <ski> hm, as in exhaustiveness checking ?
2023-12-07 07:24:11 +0100 <haskellbridge> 12<C​elestial> I know I could just ignore the warning about non exhaustive pattern matches or add `foo _ = undefined` but I don't like those particularly well
2023-12-07 07:24:56 +0100 <haskellbridge> 12<C​elestial> ski: yes, I was just wondering if maybe there was a better way to do this in general or if this is just something I have to live with
2023-12-07 07:25:50 +0100 <haskellbridge> 12<C​elestial> (the cases I need to have are 0 to <constant> - 1, my bad)
2023-12-07 07:25:57 +0100 <ski> i'm not aware of a way to convince GHC it's impossible
2023-12-07 07:26:05 +0100 <ski> (yea, that much was evident)
2023-12-07 07:27:15 +0100 <ski> (i imagine making a wrapper that explicitly calls `mod', before calling a locally defined function with the cases .. would still issue the same warning, despite being local, and only reachable through filtering that input through the `mod')
2023-12-07 07:27:39 +0100 <ski> maybe LiquidHaskell has some exhaustiveness checking, that would be applicable here .. dunno
2023-12-07 07:27:40 +0100 <int-e> > (-3) `rem` 2
2023-12-07 07:27:41 +0100 <lambdabot> -1
2023-12-07 07:27:44 +0100 <ski> yes
2023-12-07 07:27:49 +0100 <haskellbridge> 12<C​elestial> https://hackage.haskell.org/package/mod-0.2.0.1/
2023-12-07 07:27:49 +0100 <haskellbridge> 12<C​elestial> this seems interesting but also overkill
2023-12-07 07:27:58 +0100 <int-e> > (-3) `mod` 2
2023-12-07 07:28:00 +0100 <lambdabot> 1
2023-12-07 07:28:15 +0100skifigured Celestial actually meant `mod'
2023-12-07 07:29:04 +0100 <haskellbridge> 12<C​elestial> right, I
2023-12-07 07:29:18 +0100 <haskellbridge> 12<C​elestial> wasn't sure which was correct but now I get it haha
2023-12-07 07:29:21 +0100 <jackdk> Celestial: Use https://hackage.haskell.org/package/fin-0.3/docs/Data-Fin.html ?
2023-12-07 07:29:40 +0100 <int-e> But in either case, GHC doesn't track value ranges for expressions.
2023-12-07 07:30:05 +0100 <haskellbridge> 12<C​elestial> that makes sense
2023-12-07 07:30:09 +0100 <haskellbridge> 12<C​elestial> thank you
2023-12-07 07:31:33 +0100 <danza> curious whether that stems out of an advent of code problem, since that is The Thing now
2023-12-07 07:31:56 +0100 <haskellbridge> 12<C​elestial> it is not
2023-12-07 07:32:22 +0100 <ski> glguy : `ParallelListComp' and `TransformListComp', nice :)
2023-12-07 07:32:32 +0100_ht(~Thunderbi@28-52-174-82.ftth.glasoperator.nl) (Remote host closed the connection)
2023-12-07 07:32:55 +0100 <haskellbridge> 12<C​elestial> I'm writing a visualizer for sorting algorithms in a TUI and part of that is scaling down the bars and using the eighth-sized unicode characters
2023-12-07 07:33:41 +0100 <danza> oh interesting
2023-12-07 07:34:05 +0100 <danza> TUI for visualisation is kind of hardcore
2023-12-07 07:34:16 +0100 <haskellbridge> 12<C​elestial> it works surprisingly well
2023-12-07 07:34:53 +0100 <haskellbridge> 12<C​elestial> does IRC/Heisenridge support media/images/video?
2023-12-07 07:34:59 +0100 <ski> horizontal or vertical bars ?
2023-12-07 07:35:25 +0100 <haskellbridge> 12<C​elestial> vertical but I'm using brick which makes that significantly less painful
2023-12-07 07:35:52 +0100 <ski> no inline images, sound, clips, page previews
2023-12-07 07:35:55 +0100 <ski> (thankfully)
2023-12-07 07:35:56 +0100 <danza> yeah well, but those vis could hardly ever become interactive i guess
2023-12-07 07:36:24 +0100 <haskellbridge> 12<C​elestial> I mean you can have keyboard shortcuts and there is (limited) mouse support
2023-12-07 07:36:31 +0100 <ski> there is mouse support for XTerm, &c.
2023-12-07 07:36:46 +0100 <danza> better than i thought
2023-12-07 07:36:46 +0100 <ski> Celestial : you could also look into Sixel support, i suppose
2023-12-07 07:37:09 +0100chomwitt(~chomwitt@2a02:587:7a09:c300:1ac0:4dff:fedb:a3f1)
2023-12-07 07:37:15 +0100 <ski> (and 24-bit colors. or at least 256-color)
2023-12-07 07:37:23 +0100 <haskellbridge> 12<C​elestial> I think too few terminals actually support that
2023-12-07 07:37:35 +0100 <ski> which ?
2023-12-07 07:37:54 +0100 <haskellbridge> 12<C​elestial> the sixel/bitmap thing
2023-12-07 07:37:58 +0100 <ski> mm
2023-12-07 07:38:51 +0100 <haskellbridge> 12<C​elestial> But honestly, if you don't need a circular representation; this bar thing works well, especially with the eights unicode characters it looks very smooth
2023-12-07 07:39:28 +0100 <haskellbridge> 12<C​elestial> s/eights/eighths (is that how you spell it?)
2023-12-07 07:41:41 +0100kenran(~user@user/kenran)
2023-12-07 07:43:11 +0100alp_(~alp@2001:861:e3d6:8f80:6d8:4f2f:863e:ca1)
2023-12-07 07:54:53 +0100peterbecich(~Thunderbi@047-229-123-186.res.spectrum.com)
2023-12-07 07:56:35 +0100igemnace(~ian@user/igemnace)
2023-12-07 07:58:19 +0100qqq(~qqq@92.43.167.61) (Remote host closed the connection)
2023-12-07 08:00:28 +0100acidjnk_new(~acidjnk@p200300d6e72b9388205ae88ccd349b12.dip0.t-ipconnect.de)
2023-12-07 08:01:22 +0100analoq(~yashi@user/dies) (Ping timeout: 260 seconds)
2023-12-07 08:02:54 +0100analoq(~yashi@user/dies)
2023-12-07 08:03:46 +0100misterfish(~misterfis@84-53-85-146.bbserv.nl) (Ping timeout: 276 seconds)
2023-12-07 08:05:19 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 240 seconds)
2023-12-07 08:06:20 +0100qqq(~qqq@92.43.167.61)
2023-12-07 08:06:55 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex)
2023-12-07 08:07:16 +0100danza(~francesco@rm-19-11-235.service.infuturo.it) (Read error: Connection reset by peer)
2023-12-07 08:07:59 +0100 <ski> (i believe so)
2023-12-07 08:08:11 +0100benjaminl(~benjaminl@user/benjaminl) (Remote host closed the connection)
2023-12-07 08:09:51 +0100benjaminl(~benjaminl@user/benjaminl)
2023-12-07 08:13:31 +0100 <jle`> ski: ah whoops totally missed the "for lists" part. although you can sort of cheat kinda
2023-12-07 08:13:53 +0100 <jle`> :t \f -> head . traverse ((:[]) . f)
2023-12-07 08:13:54 +0100 <lambdabot> Traversable t => (a -> b) -> t a -> t b
2023-12-07 08:14:01 +0100 <jle`> huh what happened
2023-12-07 08:14:46 +0100 <jle`> i'm probably wrong
2023-12-07 08:14:51 +0100misterfish(~misterfis@84-53-85-146.bbserv.nl)
2023-12-07 08:18:23 +0100 <ski> well, you can do `pure' and `(<*>)', right ?
2023-12-07 08:20:23 +0100peterbecich(~Thunderbi@047-229-123-186.res.spectrum.com) (Ping timeout: 264 seconds)
2023-12-07 08:22:22 +0100danza(~francesco@rm-19-35-115.service.infuturo.it)
2023-12-07 08:25:14 +0100rvalue(~rvalue@user/rvalue) (Read error: Connection reset by peer)
2023-12-07 08:25:32 +0100rvalue(~rvalue@user/rvalue)
2023-12-07 08:34:00 +0100coot(~coot@89-69-206-216.dynamic.chello.pl)
2023-12-07 08:39:30 +0100lortabac(~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4)
2023-12-07 08:39:55 +0100misterfish(~misterfis@84-53-85-146.bbserv.nl) (Ping timeout: 255 seconds)
2023-12-07 08:51:58 +0100shriekingnoise(~shrieking@186.137.175.87) (Ping timeout: 255 seconds)
2023-12-07 08:52:37 +0100bryanv_(~quassel@2603:c028:4503:7500:45b7:933:ab17:bc10)
2023-12-07 08:54:09 +0100bryanv(~quassel@2603:c028:4503:7500:45b7:933:ab17:bc10) (Ping timeout: 268 seconds)
2023-12-07 08:59:59 +0100sord937(~sord937@gateway/tor-sasl/sord937)
2023-12-07 09:01:13 +0100misterfish(~misterfis@84-53-85-146.bbserv.nl)
2023-12-07 09:01:56 +0100euleritian(~euleritia@dynamic-046-114-206-154.46.114.pool.telefonica.de) (Read error: Connection reset by peer)
2023-12-07 09:02:15 +0100euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
2023-12-07 09:04:07 +0100danza(~francesco@rm-19-35-115.service.infuturo.it) (Ping timeout: 255 seconds)
2023-12-07 09:14:47 +0100stefan-_(~cri@42dots.de) (Ping timeout: 256 seconds)
2023-12-07 09:14:49 +0100stefan-_-(~cri@42dots.de)
2023-12-07 09:15:52 +0100misterfish(~misterfis@84-53-85-146.bbserv.nl) (Ping timeout: 246 seconds)
2023-12-07 09:16:10 +0100nate4(~nate@c-98-45-158-125.hsd1.ca.comcast.net)
2023-12-07 09:17:50 +0100dhil(~dhil@2001:8e0:2014:3100:371a:4a41:b512:1e94)
2023-12-07 09:20:52 +0100nate4(~nate@c-98-45-158-125.hsd1.ca.comcast.net) (Ping timeout: 255 seconds)
2023-12-07 09:22:02 +0100 <iqubic> ski:
2023-12-07 09:22:04 +0100 <iqubic> sequenceA :: (Applicative f) => [f a] -> f [a]
2023-12-07 09:22:14 +0100 <iqubic> sequenceA [] = pure []
2023-12-07 09:22:23 +0100 <iqubic> sequenceA (x:xs) = (:) <$> x <*> sequenceA xs
2023-12-07 09:22:38 +0100 <ski> yes, nice :)
2023-12-07 09:23:09 +0100 <iqubic> I took a break to do Advent of Code, and get food too.
2023-12-07 09:23:23 +0100 <iqubic> That just popped into my head while I was out.
2023-12-07 09:23:36 +0100 <ski> if you feel like it, you could try to (re)formulate that as a `foldr'
2023-12-07 09:24:00 +0100 <iqubic> I want to do that, I'm just not sure how.
2023-12-07 09:24:31 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2023-12-07 09:25:05 +0100 <ski> but yea, the important part, that i was thinking of, was to notice that for the empty list (zero computations to combine), you use `pure'; and for the non-empty list (head and tail, two computations (after recursively combining all items in the tail)), you use `(<*>)'
2023-12-07 09:25:09 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Client Quit)
2023-12-07 09:25:34 +0100 <ski> well, i could give you a hint, that might help a little
2023-12-07 09:26:07 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2023-12-07 09:26:54 +0100vpan(~vpan@mail.elitnet.lt)
2023-12-07 09:27:16 +0100 <iqubic> sequenceA = foldr (\x acc -> (:) <$> x <*> acc) (pure [])
2023-12-07 09:27:37 +0100ft(~ft@p3e9bc784.dip0.t-ipconnect.de) (Quit: leaving)
2023-12-07 09:27:38 +0100 <iqubic> sequenceA = foldr (\x acc -> liftA2 (:) x acc) (pure [])
2023-12-07 09:27:58 +0100 <iqubic> sequenceA = foldr (liftA2 (:)) (pure [])
2023-12-07 09:28:19 +0100 <ski> yep :)
2023-12-07 09:28:21 +0100 <iqubic> That's really interesting....
2023-12-07 09:28:52 +0100 <ski> you replace the `(:)'s and the `[]' in the list, with "effectful" versions of them
2023-12-07 09:29:02 +0100 <ski> @type pure []
2023-12-07 09:29:04 +0100 <lambdabot> Applicative f => f [a]
2023-12-07 09:29:08 +0100 <ski> @type liftA2 (:)
2023-12-07 09:29:09 +0100 <lambdabot> Applicative f => f a -> f [a] -> f [a]
2023-12-07 09:29:11 +0100 <iqubic> Yeah. I just say that.
2023-12-07 09:30:39 +0100 <iqubic> I love that comparison.
2023-12-07 09:36:13 +0100 <[exa]> Re applicatives, I love doing stuff like: MyStruct <$> getField1 <*> getField2 <*> ..., typically in parsers
2023-12-07 09:36:41 +0100 <[exa]> if I also want a smart constructor (for e.g. checking the values of stuff being in range), is there any good pattern to have it nicely in this scheme?
2023-12-07 09:36:59 +0100 <ski> (btw, in case it's not clear, you could say `pure' is `liftA0', so to speak. and `fmap'/`(<$>)' is `liftA1', so to speak)
2023-12-07 09:37:35 +0100 <[exa]> in particular, if my smart constructor can fail, it cannot fail the same applicative wrap easily using just <$> and <*>, so I have to do something like `join $ mkMyStructChecked <$> getField1 <*> getField2 ...`
2023-12-07 09:38:15 +0100 <[exa]> I hoped there'd be an operator for that but no luck so far :D
2023-12-07 09:40:57 +0100 <ski> @let infixl 4 <*>>; (<*>>) :: Monad m => m (a -> m b) -> m a -> m b; mamb <*>> ma = join (mamb <*> ma)
2023-12-07 09:40:58 +0100 <lambdabot> Defined.
2023-12-07 09:41:31 +0100 <ski> [exa] : use `foo <*> bar <*> baz <*>> quux'
2023-12-07 09:42:41 +0100 <ski> (i've noticed this pattern before)
2023-12-07 09:45:07 +0100 <[exa]> oh nice
2023-12-07 09:46:20 +0100 <[exa]> I assume there's no sane way to have that special operator to be the "first" one, right? (not a problem, we always need the "full" effect anyway, but it would be cool)
2023-12-07 09:46:40 +0100 <ski> i don't think so
2023-12-07 09:47:12 +0100 <ski> you can think of it as the inner effect in `foo' only happening once we reach (and pass) `quux'
2023-12-07 09:47:18 +0100 <[exa]> would probably need varargs-like shenanigans
2023-12-07 09:48:24 +0100 <[exa]> not a problem tho, I was more like reaching for uniformity or so
2023-12-07 09:49:03 +0100 <[exa]> (perhaps if we had prolog-ish operators we could do a suffix "period" on the end :D )
2023-12-07 09:49:44 +0100 <ski> (of course, if `foo' doesn't do any initial effects, just a final pass, you'd use `<$>' for the first part, instead of `<*>'9
2023-12-07 09:49:47 +0100 <ski> )
2023-12-07 09:50:12 +0100 <ski> yea, postfix (and prefix) operators
2023-12-07 09:52:19 +0100euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 260 seconds)
2023-12-07 09:52:41 +0100euleritian(~euleritia@dynamic-046-114-206-154.46.114.pool.telefonica.de)
2023-12-07 10:01:16 +0100telser_(~quassel@user/telser)
2023-12-07 10:01:29 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:a11c:b194:25be:95ba) (Remote host closed the connection)
2023-12-07 10:03:31 +0100telser(~quassel@user/telser) (Ping timeout: 268 seconds)
2023-12-07 10:04:01 +0100Incredia(~Incredia@176.254.244.83) (Ping timeout: 276 seconds)
2023-12-07 10:05:27 +0100idgaen(~idgaen@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c)
2023-12-07 10:06:08 +0100Nixkernal(~Nixkernal@115.16.194.178.dynamic.wline.res.cust.swisscom.ch) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
2023-12-07 10:08:28 +0100tzh(~tzh@c-71-193-181-0.hsd1.or.comcast.net) (Quit: zzz)
2023-12-07 10:09:10 +0100pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
2023-12-07 10:09:37 +0100 <cheater> geekosaur: that new info paste is cool :)
2023-12-07 10:18:38 +0100 <jle`> is there a "_head" *lens* ? Lens' [a] (Maybe a)
2023-12-07 10:18:44 +0100 <cheater> anyone ever feel like you change one type somewhere and then you have to contend with "draw the rest of the owl"
2023-12-07 10:21:29 +0100 <jle`> ah i guess a head lens probably wouldn't make sense because you can set to Nothing but then a get won't be Nothing necessarily
2023-12-07 10:21:32 +0100 <jle`> darn
2023-12-07 10:21:41 +0100enviosity(~enviosity@176.254.244.83)
2023-12-07 10:24:00 +0100gehmehgeh(~user@user/gehmehgeh)
2023-12-07 10:24:30 +0100 <ski> @type _head
2023-12-07 10:24:31 +0100 <lambdabot> (Cons s s a a, Applicative f) => (a -> f a) -> s -> f s
2023-12-07 10:24:53 +0100 <jle`> yeah i was hoping for a lens
2023-12-07 10:25:06 +0100 <jle`> like `at 0` hypothetically
2023-12-07 10:27:25 +0100 <Taneb> How do you `set _head Nothing`?
2023-12-07 10:27:28 +0100 <jle`> i guess the optic class i really wanted was (Maybe a -> f b) -> s -> f t
2023-12-07 10:27:54 +0100 <jle`> where you can get Nothing from head but you can't set it to Nothing
2023-12-07 10:28:22 +0100 <jle`> * forall f. Functor f
2023-12-07 10:28:53 +0100danse-nr3(~danse@rm-19-33-5.service.infuturo.it)
2023-12-07 10:31:32 +0100Tuplanolla(~Tuplanoll@91-159-68-236.elisa-laajakaista.fi)
2023-12-07 10:32:06 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:a11c:b194:25be:95ba)
2023-12-07 10:36:10 +0100econo_(uid147250@id-147250.tinside.irccloud.com) (Quit: Connection closed for inactivity)
2023-12-07 10:46:22 +0100AlexNoo_(~AlexNoo@5.139.232.120)
2023-12-07 10:46:25 +0100AlexNoo(~AlexNoo@5.139.232.120) (Read error: Connection reset by peer)
2023-12-07 10:48:21 +0100CiaoSen(~Jura@2a05:5800:285:ca00:ca4b:d6ff:fec1:99da)
2023-12-07 10:56:23 +0100bilegeek(~bilegeek@2600:1008:b019:ebe6:e541:b9c8:7cbf:696) (Quit: Leaving)
2023-12-07 10:58:00 +0100fendor(~fendor@2a02:8388:1605:d100:267b:1353:13d7:4f0c)
2023-12-07 10:59:32 +0100cfricke(~cfricke@user/cfricke)
2023-12-07 11:04:53 +0100hgolden_(~hgolden@2603-8000-9d00-3ed1-dd4f-298a-9c49-a0ed.res6.spectrum.com)
2023-12-07 11:05:42 +0100xff0x(~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) (Ping timeout: 260 seconds)
2023-12-07 11:06:11 +0100hgolden(~hgolden@2603-8000-9d00-3ed1-dd4f-298a-9c49-a0ed.res6.spectrum.com) (Ping timeout: 245 seconds)
2023-12-07 11:16:15 +0100danse-nr3(~danse@rm-19-33-5.service.infuturo.it) (Remote host closed the connection)
2023-12-07 11:17:04 +0100danse-nr3(~danse@rm-19-33-5.service.infuturo.it)
2023-12-07 11:17:19 +0100Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Ping timeout: 255 seconds)
2023-12-07 11:18:47 +0100Lord_of_Life(~Lord@user/lord-of-life/x-2819915)
2023-12-07 11:20:50 +0100cimento(CO2@gateway/vpn/protonvpn/cimento) (Quit: WeeChat 4.1.2)
2023-12-07 11:21:46 +0100lortabac(~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) (Ping timeout: 256 seconds)
2023-12-07 11:22:02 +0100dhil(~dhil@2001:8e0:2014:3100:371a:4a41:b512:1e94) (Ping timeout: 260 seconds)
2023-12-07 11:22:57 +0100kalj(~kalj@h-158-174-207-174.NA.cust.bahnhof.se)
2023-12-07 11:25:58 +0100drdo(~drdo@bl14-14-49.dsl.telepac.pt) (Remote host closed the connection)
2023-12-07 11:30:09 +0100drdo(~drdo@bl14-14-49.dsl.telepac.pt)
2023-12-07 11:30:37 +0100lortabac(~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4)
2023-12-07 11:37:56 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2023-12-07 11:38:57 +0100wib_jonas(~wib_jonas@business-37-191-60-209.business.broadband.hu)
2023-12-07 11:39:20 +0100Nixkernal(~Nixkernal@115.16.194.178.dynamic.wline.res.cust.swisscom.ch)
2023-12-07 11:44:14 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2023-12-07 11:45:05 +0100lortabac(~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) (Ping timeout: 256 seconds)
2023-12-07 11:45:30 +0100misterfish(~misterfis@84-53-85-146.bbserv.nl)
2023-12-07 11:52:22 +0100kalj(~kalj@h-158-174-207-174.NA.cust.bahnhof.se) (Quit: Client closed)
2023-12-07 11:52:37 +0100lortabac(~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4)
2023-12-07 12:03:37 +0100CiaoSen(~Jura@2a05:5800:285:ca00:ca4b:d6ff:fec1:99da) (Ping timeout: 276 seconds)
2023-12-07 12:04:25 +0100rvalue(~rvalue@user/rvalue) (Quit: ZNC - https://znc.in)
2023-12-07 12:04:49 +0100euleritian(~euleritia@dynamic-046-114-206-154.46.114.pool.telefonica.de) (Read error: Connection reset by peer)
2023-12-07 12:05:07 +0100euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
2023-12-07 12:06:13 +0100xff0x(~xff0x@2405:6580:b080:900:c829:a839:8c15:e663)
2023-12-07 12:06:41 +0100rvalue(~rvalue@user/rvalue)
2023-12-07 12:07:52 +0100danse-nr3(~danse@rm-19-33-5.service.infuturo.it) (Read error: Connection reset by peer)
2023-12-07 12:08:34 +0100danse-nr3(~danse@rm-19-18-174.service.infuturo.it)
2023-12-07 12:10:21 +0100cimento(CO2@gateway/vpn/protonvpn/cimento)
2023-12-07 12:18:55 +0100chele(~chele@user/chele)
2023-12-07 12:21:26 +0100Sgeo(~Sgeo@user/sgeo) (Read error: Connection reset by peer)
2023-12-07 12:22:06 +0100actioninja(~actioninj@user/actioninja) (Quit: see ya mane)
2023-12-07 12:22:49 +0100 <idgaen> Hi all
2023-12-07 12:24:07 +0100 <idgaen> I want to build a 2 dimensional array from a string which comes from a file.
2023-12-07 12:26:11 +0100 <idgaen> each lines in the file have the same length (140). I removed the newlines from the string, with (concat . lines).
2023-12-07 12:26:35 +0100lortabac(~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) (Ping timeout: 268 seconds)
2023-12-07 12:27:09 +0100 <idgaen> I want to use the array function to build an: UArray (Int, Int) Char
2023-12-07 12:28:59 +0100 <idgaen> so, I build a list of indices with: inds = [(x, y) | y <- [1..140], x <- [1..140]] -- There are 140 lines of length of 140 characters.
2023-12-07 12:30:31 +0100 <idgaen> but when I want to build the list of associative (index, char) that seems to loop forever.
2023-12-07 12:31:51 +0100__monty__(~toonn@user/toonn)
2023-12-07 12:32:25 +0100 <idgaen> the associative list is built with [(i, c) | i <- inds, c <- s ] where s are all lines of file without newlines
2023-12-07 12:33:32 +0100 <idgaen> the length of s is 140*140, and the length of inds is the same
2023-12-07 12:34:41 +0100 <idgaen> I don't understand why that loop forever
2023-12-07 12:35:17 +0100szkl(uid110435@id-110435.uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
2023-12-07 12:36:24 +0100 <idgaen> of course, I can build the array with listArray, but the indexes are reversed and the coordinate are represent by (y,x) what I don't want
2023-12-07 12:43:16 +0100tremon(~tremon@83.80.159.219)
2023-12-07 12:44:37 +0100cimento(CO2@gateway/vpn/protonvpn/cimento) (Ping timeout: 255 seconds)
2023-12-07 12:44:49 +0100 <cheater> when i see a *value* that's like Proxy @(Foo), what is the @? Proxy is a constructor from Data.Proxy.
2023-12-07 12:44:59 +0100Square2(~Square4@user/square)
2023-12-07 12:45:07 +0100 <cheater> as in, foo = Proxy @(Foo)
2023-12-07 12:46:44 +0100 <cheater> oh it's TypeApplications
2023-12-07 12:48:35 +0100tomith(tomith@user/tomith)
2023-12-07 12:50:58 +0100 <[Leary]> > [ (i, c) | i <- [ (x, y) | y <- [1..3], x <- [1..3] ], c <- (concat . lines) "abc\ndef\nghi" ]
2023-12-07 12:50:59 +0100 <lambdabot> [((1,1),'a'),((1,1),'b'),((1,1),'c'),((1,1),'d'),((1,1),'e'),((1,1),'f'),((1...
2023-12-07 12:51:05 +0100 <[Leary]> > [ (i, c) | i <- [ (x, y) | y <- [1..3], x <- [1..3] ] | c <- (concat . lines) "abc\ndef\nghi" ]
2023-12-07 12:51:07 +0100 <lambdabot> [((1,1),'a'),((2,1),'b'),((3,1),'c'),((1,2),'d'),((2,2),'e'),((3,2),'f'),((1...
2023-12-07 12:51:35 +0100 <[Leary]> idgaen: One of these is a product, the other is a zip. I imagine you want the latter.
2023-12-07 12:52:26 +0100alp_(~alp@2001:861:e3d6:8f80:6d8:4f2f:863e:ca1) (Ping timeout: 256 seconds)
2023-12-07 12:52:40 +0100euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer)
2023-12-07 12:52:51 +0100euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
2023-12-07 12:52:57 +0100alp_(~alp@2001:861:e3d6:8f80:3d4b:b65f:a55a:e6ee)
2023-12-07 12:55:21 +0100dcoutts(~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) (Remote host closed the connection)
2023-12-07 12:58:39 +0100 <idgaen> [Leary]: yes, I want a zip, what I noticed after I wrote my messages.
2023-12-07 12:58:47 +0100mikess(~sam@user/mikess) (Ping timeout: 264 seconds)
2023-12-07 12:59:25 +0100lortabac(~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4)
2023-12-07 13:01:07 +0100 <idgaen> now, I don't understand what I did wrong, because now, it works.
2023-12-07 13:13:58 +0100danse-nr3(~danse@rm-19-18-174.service.infuturo.it) (Ping timeout: 256 seconds)
2023-12-07 13:17:41 +0100nate4(~nate@c-98-45-158-125.hsd1.ca.comcast.net)
2023-12-07 13:20:46 +0100xff0x(~xff0x@2405:6580:b080:900:c829:a839:8c15:e663) (Ping timeout: 256 seconds)
2023-12-07 13:22:31 +0100nate4(~nate@c-98-45-158-125.hsd1.ca.comcast.net) (Ping timeout: 255 seconds)
2023-12-07 13:22:32 +0100xff0x(~xff0x@ai096045.d.east.v6connect.net)
2023-12-07 13:24:13 +0100remedan(~remedan@ip-94-112-0-18.bb.vodafone.cz) (Ping timeout: 276 seconds)
2023-12-07 13:24:38 +0100mmhat(~mmh@p200300f1c72693d7ee086bfffe095315.dip0.t-ipconnect.de)
2023-12-07 13:25:58 +0100remedan(~remedan@ip-94-112-0-18.bb.vodafone.cz)
2023-12-07 13:26:43 +0100misterfish(~misterfis@84-53-85-146.bbserv.nl) (Ping timeout: 268 seconds)
2023-12-07 13:26:58 +0100aztex(~aztex@195-176-96-198.net4.ethz.ch)
2023-12-07 13:27:39 +0100 <aztex> Hello I am try to turn on profiling for a Haskell executable I have but my build depends on a package that hasn't been compiled with profiling on
2023-12-07 13:28:02 +0100 <aztex> specifically the package is network-simple
2023-12-07 13:28:17 +0100 <aztex> so when I try to build with profiling on I get:
2023-12-07 13:28:18 +0100 <aztex> ```
2023-12-07 13:28:18 +0100 <aztex> Could not find module ‘Network.Simple.TCP’
2023-12-07 13:28:19 +0100 <aztex>     Perhaps you haven't installed the profiling libraries for package ‘network-simple-0.4.5’?
2023-12-07 13:28:19 +0100 <aztex> ```
2023-12-07 13:28:50 +0100 <aztex> Does it mean I have to locally recompile this pacakge with profiling on to get debug profiling?
2023-12-07 13:29:02 +0100 <[exa]> aztex: did you do `cabal configure --enable-profiling` ?
2023-12-07 13:29:11 +0100 <aztex> no
2023-12-07 13:29:24 +0100 <[exa]> I'd say it's usually required
2023-12-07 13:29:39 +0100 <[exa]> btw recompile of network-simple shouldn't be harsh
2023-12-07 13:30:24 +0100 <aztex> in which step should this be done?
2023-12-07 13:30:37 +0100aztex2(~aztex@195-176-96-198.net4.ethz.ch)
2023-12-07 13:31:52 +0100 <[exa]> you probably have some package that you run using `cabal run` right? so in that same project you just do the configure with --enable-profiling and then it should work
2023-12-07 13:32:39 +0100 <[exa]> afaik it should pull all profiling-enabled modules etc
2023-12-07 13:32:49 +0100 <[exa]> if not, there's another problem and we'll need more info :]
2023-12-07 13:34:53 +0100 <aztex2> thanks giving that a shot!
2023-12-07 13:34:58 +0100aztex(~aztex@195-176-96-198.net4.ethz.ch) (Ping timeout: 250 seconds)
2023-12-07 13:38:47 +0100 <[exa]> well let's see if it works
2023-12-07 13:40:49 +0100 <aztex2> not sure what happened but I got this as a result
2023-12-07 13:40:50 +0100 <aztex2> ghc: panic! (the 'impossible' happened)
2023-12-07 13:40:50 +0100 <aztex2>   (GHC version 9.2.8:
2023-12-07 13:40:51 +0100 <aztex2>     lookupGlobal
2023-12-07 13:40:51 +0100 <aztex2>   Failed to load interface for ‘GHC.Num.BigNat’
2023-12-07 13:40:52 +0100 <aztex2>   Perhaps you haven't installed the "p_dyn" libraries for package ‘ghc-bignum’?
2023-12-07 13:40:52 +0100 <aztex2>   Use -v (or `:set -v` in ghci) to see a list of the files searched for.
2023-12-07 13:40:53 +0100 <aztex2>   Call stack:
2023-12-07 13:40:53 +0100 <aztex2>       CallStack (from HasCallStack):
2023-12-07 13:40:54 +0100 <aztex2>         callStackDoc, called at compiler/GHC/Utils/Panic.hs:181:37 in ghc:GHC.Utils.Panic
2023-12-07 13:40:54 +0100 <aztex2>         pprPanic, called at compiler/GHC/Tc/Utils/Env.hs:153:32 in ghc:GHC.Tc.Utils.Env
2023-12-07 13:42:11 +0100 <[exa]> aztex2: oh wow interesting
2023-12-07 13:42:40 +0100 <[exa]> (btw please use pastebin for the longer pastes, not a problem now but if we'd have 10 conversations pasting over each other here... D: )
2023-12-07 13:43:01 +0100 <[exa]> aztex2: this came out of the configure?
2023-12-07 13:51:42 +0100 <aztex2> nah configure went fine
2023-12-07 13:51:47 +0100 <aztex2> this was the outcome of cabal build
2023-12-07 13:57:32 +0100misterfish(~misterfis@87.215.131.102)
2023-12-07 14:06:38 +0100 <[exa]> maybe `cabal clean` before, just to be sure
2023-12-07 14:12:41 +0100cimento(CO2@gateway/vpn/protonvpn/cimento)
2023-12-07 14:19:29 +0100 <carbolymer> is there an extension which could allow me catch this issue at compile-time instead https://bpa.st/YQMA ? Or just using field selectors in sum types is not safe?
2023-12-07 14:21:51 +0100ChaiTRex(~ChaiTRex@user/chaitrex) (Remote host closed the connection)
2023-12-07 14:25:21 +0100noscript(~james@user/earldouglas) ()
2023-12-07 14:26:46 +0100mechap(~mechap@user/mechap) (Quit: WeeChat 4.1.2)
2023-12-07 14:27:19 +0100ChaiTRex(~ChaiTRex@user/chaitrex)
2023-12-07 14:28:06 +0100mechap(~mechap@user/mechap)
2023-12-07 14:31:33 +0100sawilagar(~sawilagar@user/sawilagar)
2023-12-07 14:36:50 +0100 <lortabac> carbolymer: I don't think there is an easy way to catch it at compile-time, but maybe there is a warning against partial field selectors
2023-12-07 14:37:38 +0100 <carbolymer> yes there is, but what I gather from this warning is to not use those in sum types
2023-12-07 14:37:47 +0100 <carbolymer> I was wondering If I can use them in a safe way
2023-12-07 14:37:59 +0100 <carbolymer> it seems there's none
2023-12-07 14:38:00 +0100 <lortabac> https://downloads.haskell.org/ghc/latest/docs/users_guide/using-warnings.html?highlight=partial%20…
2023-12-07 14:38:17 +0100danse-nr3(~danse@rm-19-18-174.service.infuturo.it)
2023-12-07 14:39:02 +0100 <lortabac> carbolymer: if you are looking for an extension that "magically" does this check when you enable it, then no
2023-12-07 14:39:42 +0100 <lortabac> there are various ways to solve this problem, each with its own trade-offs
2023-12-07 14:40:08 +0100 <carbolymer> yeah
2023-12-07 14:40:14 +0100 <carbolymer> no free lunch apparently
2023-12-07 14:41:03 +0100 <[exa]> carbolymer: if you really have single-case-specific behaviro, it might be better to have 2 separate types for both cases united by a typeclass interface or so
2023-12-07 14:41:11 +0100 <exarkun> Newish ghc has a warning about partial functions at their point of use, I think? Could ghc mark partial field selectors so that they trigger this same warning?
2023-12-07 14:41:22 +0100 <[exa]> anyway +1 for partiality warnings on
2023-12-07 14:41:27 +0100 <[Leary]> carbolymer: Not sure if it suits your purpose, but you can do things like this: https://play-haskell.tomsmeding.com/saved/HYOgh3RS
2023-12-07 14:41:43 +0100 <[Leary]> And hide the param with Some when inconvenient.
2023-12-07 14:42:17 +0100 <[exa]> wow cool
2023-12-07 14:44:03 +0100CiaoSen(~Jura@2a05:5800:285:ca00:ca4b:d6ff:fec1:99da)
2023-12-07 14:44:30 +0100 <carbolymer> [Leary]: haha totally overkill, but works, thanks
2023-12-07 14:51:17 +0100 <carbolymer> but still the condition is to have constructors with distinct types, otherwise one would run into the original problem
2023-12-07 14:52:37 +0100cimento(CO2@gateway/vpn/protonvpn/cimento) (Quit: WeeChat 4.1.2)
2023-12-07 14:56:55 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex) (Quit: = "")
2023-12-07 14:58:19 +0100danse-nr3(~danse@rm-19-18-174.service.infuturo.it) (Remote host closed the connection)
2023-12-07 14:58:59 +0100danse-nr3(~danse@rm-19-18-174.service.infuturo.it)
2023-12-07 15:02:57 +0100lg188(~lg188@82.18.98.230)
2023-12-07 15:03:42 +0100 <lortabac> probably the best alternative is to have each constructor take a single argument, which is a record
2023-12-07 15:03:58 +0100 <exarkun> Anyone have opinions on mono-traversable, esp. SemiSequence and perhaps isSet/isMap?
2023-12-07 15:05:03 +0100 <exarkun> I have a type with a [Entry] field and I wouldn't mind making [] parameter so so, eg, linear scan could be avoided by supplying the right type
2023-12-07 15:05:13 +0100 <lortabac> and then you can use optics if you want to avoid pattern-matching
2023-12-07 15:08:58 +0100 <exarkun> IsSet/IsMap I mean
2023-12-07 15:13:03 +0100dtman34(~dtman34@c-76-156-89-180.hsd1.mn.comcast.net) (Ping timeout: 256 seconds)
2023-12-07 15:14:58 +0100alp_(~alp@2001:861:e3d6:8f80:3d4b:b65f:a55a:e6ee) (Ping timeout: 246 seconds)
2023-12-07 15:15:14 +0100 <carbolymer> lortabac: yes, that too, thanks
2023-12-07 15:16:07 +0100ddb(ddb@tilde.club)
2023-12-07 15:16:21 +0100alp_(~alp@2001:861:e3d6:8f80:d720:d644:7314:8753)
2023-12-07 15:18:01 +0100mobivme(~mobivme@112.201.111.217) (Read error: Connection reset by peer)
2023-12-07 15:18:52 +0100shriekingnoise(~shrieking@186.137.175.87)
2023-12-07 15:19:38 +0100aztex2(~aztex@195-176-96-198.net4.ethz.ch) (Quit: Client closed)
2023-12-07 15:22:13 +0100gooba(~gooba@90-231-13-185-no3430.tbcn.telia.com) (Remote host closed the connection)
2023-12-07 15:22:31 +0100gooba(~gooba@90-231-13-185-no3430.tbcn.telia.com)
2023-12-07 15:24:51 +0100ystael(~ystael@user/ystael)
2023-12-07 15:25:52 +0100igemnace(~ian@user/igemnace) (Read error: Connection reset by peer)
2023-12-07 15:28:55 +0100kuribas(~user@ip-188-118-57-242.reverse.destiny.be)
2023-12-07 15:32:07 +0100stiell(~stiell@gateway/tor-sasl/stiell) (Ping timeout: 240 seconds)
2023-12-07 15:33:19 +0100stiell(~stiell@gateway/tor-sasl/stiell)
2023-12-07 15:37:39 +0100 <cheater> is there a common type that's like data Maybe3 e a = Error e | Just a | Nothing ?
2023-12-07 15:38:39 +0100edr(~edr@user/edr)
2023-12-07 15:40:26 +0100 <kuribas> These?
2023-12-07 15:40:37 +0100 <[exa]> cheater: isomorphic to `EitherT e Maybe a` ?
2023-12-07 15:40:39 +0100 <kuribas> https://hackage.haskell.org/package/these
2023-12-07 15:41:16 +0100 <cheater> [exa]: yes
2023-12-07 15:41:17 +0100 <cheater> kuribas: no
2023-12-07 15:41:20 +0100 <dminuoso_> I tend to just handroll them, because usually when there is three constructors, there is some semantic meaning to them
2023-12-07 15:41:23 +0100 <kuribas> or Either (Maybe e) a?
2023-12-07 15:41:34 +0100 <cheater> kuribas: no
2023-12-07 15:41:44 +0100 <dminuoso_> And in case of `This` and `That`, its really not clear how they differ.
2023-12-07 15:41:59 +0100 <cheater> well, This is this.
2023-12-07 15:42:03 +0100 <cheater> and That, well, that's that.
2023-12-07 15:42:18 +0100danse-nr3(~danse@rm-19-18-174.service.infuturo.it) (Ping timeout: 252 seconds)
2023-12-07 15:42:28 +0100 <ncf> Either (Maybe e) a ≃ Either e (Maybe a)
2023-12-07 15:42:37 +0100igemnace(~ian@user/igemnace)
2023-12-07 15:42:51 +0100 <cheater> i hate that that's true
2023-12-07 15:42:53 +0100 <kuribas> cheater: Error e => Left $ Just e Just a => Right a Nothing -> Left $ Nothing
2023-12-07 15:43:05 +0100 <[exa]> cheater: kinda interesting which method of failure should be triggered by `empty` there
2023-12-07 15:43:15 +0100danse-nr3(~danse@rm-19-18-174.service.infuturo.it)
2023-12-07 15:43:18 +0100 <cheater> idk
2023-12-07 15:43:19 +0100 <cheater> idc
2023-12-07 15:43:25 +0100 <cheater> time to go get some fast food
2023-12-07 15:43:25 +0100 <cheater> bbl
2023-12-07 15:44:08 +0100 <[exa]> glhf
2023-12-07 15:46:16 +0100 <lortabac> I use 'Either e (Maybe a)' sometimes if the meaning is clear enough
2023-12-07 15:46:26 +0100 <lortabac> otherwise a custom data type
2023-12-07 15:47:05 +0100wroathe(~wroathe@user/wroathe)
2023-12-07 15:47:22 +0100 <[exa]> at least this way kinda clarifies if it is the error or the value that is missing
2023-12-07 15:49:07 +0100danse-nr3(~danse@rm-19-18-174.service.infuturo.it) (Ping timeout: 255 seconds)
2023-12-07 15:52:24 +0100 <kuribas> dminuoso_: you can see from the order of the type variables That b = success, This a = error.
2023-12-07 15:55:37 +0100waleee(~waleee@h-176-10-144-38.NA.cust.bahnhof.se)
2023-12-07 15:57:32 +0100 <bwe> how can I let textComment''' make throwError once there is no "span" of class "author"? https://github.com/benjaminweb/scalpel-exceptt/blob/main/src/Lib.hs#L136-L141
2023-12-07 15:58:16 +0100 <bwe> ski: I've gone back and devised the problem statement from the ground up and worked my way until here.
2023-12-07 15:58:53 +0100 <bwe> What I want to understand right now is how can I inspect `author` and depend a control flow on it.
2023-12-07 16:00:40 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2023-12-07 16:01:38 +0100 <bwe> The next micro step would be to figure what `author` really is and then how can I case over its content.
2023-12-07 16:04:58 +0100wroathe(~wroathe@user/wroathe) (Ping timeout: 255 seconds)
2023-12-07 16:06:04 +0100dtman34(~dtman34@c-76-156-89-180.hsd1.mn.comcast.net)
2023-12-07 16:10:16 +0100euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 246 seconds)
2023-12-07 16:11:02 +0100euleritian(~euleritia@dynamic-046-114-202-224.46.114.pool.telefonica.de)
2023-12-07 16:14:27 +0100notzmv(~zmv@user/notzmv) (Ping timeout: 268 seconds)
2023-12-07 16:20:27 +0100danse-nr3(~danse@151.47.48.103)
2023-12-07 16:20:46 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2023-12-07 16:21:19 +0100cfricke(~cfricke@user/cfricke) (Quit: WeeChat 4.0.5)
2023-12-07 16:22:27 +0100enviosity(~enviosity@176.254.244.83) (Ping timeout: 260 seconds)
2023-12-07 16:26:28 +0100zer0bitz_(~zer0bitz@user/zer0bitz)
2023-12-07 16:30:29 +0100zer0bitz(~zer0bitz@user/zer0bitz) (Ping timeout: 240 seconds)
2023-12-07 16:30:58 +0100waleee(~waleee@h-176-10-144-38.NA.cust.bahnhof.se) (Ping timeout: 260 seconds)
2023-12-07 16:36:55 +0100azimut(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 240 seconds)
2023-12-07 16:39:43 +0100pastly(~pastly@gateway/tor-sasl/pastly) (Remote host closed the connection)
2023-12-07 16:40:11 +0100pastly(~pastly@gateway/tor-sasl/pastly)
2023-12-07 16:46:36 +0100enviosity(~enviosity@176.254.244.83)
2023-12-07 16:48:15 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:a11c:b194:25be:95ba) (Remote host closed the connection)
2023-12-07 16:48:30 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:a11c:b194:25be:95ba)
2023-12-07 16:52:22 +0100Unicorn_Princess(~Unicorn_P@user/Unicorn-Princess/x-3540542)
2023-12-07 16:54:49 +0100misterfish(~misterfis@87.215.131.102) (Ping timeout: 255 seconds)
2023-12-07 17:00:29 +0100CiaoSen(~Jura@2a05:5800:285:ca00:ca4b:d6ff:fec1:99da) (Ping timeout: 240 seconds)
2023-12-07 17:01:20 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:a11c:b194:25be:95ba) (Remote host closed the connection)
2023-12-07 17:02:46 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:a11c:b194:25be:95ba)
2023-12-07 17:06:58 +0100euleritian(~euleritia@dynamic-046-114-202-224.46.114.pool.telefonica.de) (Read error: Connection reset by peer)
2023-12-07 17:07:18 +0100euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
2023-12-07 17:11:19 +0100lortabac(~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) (Quit: WeeChat 4.1.1)
2023-12-07 17:12:58 +0100vpan(~vpan@mail.elitnet.lt) (Quit: Leaving.)
2023-12-07 17:13:07 +0100 <shapr> @quote
2023-12-07 17:13:07 +0100 <lambdabot> gFunk says: [the main advantage of functional programs are that they're] incorrect the first 1000 times you try to compile it!
2023-12-07 17:15:37 +0100alp_(~alp@2001:861:e3d6:8f80:d720:d644:7314:8753) (Ping timeout: 276 seconds)
2023-12-07 17:15:37 +0100euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer)
2023-12-07 17:15:47 +0100euleritian(~euleritia@dynamic-046-114-202-224.46.114.pool.telefonica.de)
2023-12-07 17:16:08 +0100euleritian(~euleritia@dynamic-046-114-202-224.46.114.pool.telefonica.de) (Read error: Connection reset by peer)
2023-12-07 17:16:25 +0100euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
2023-12-07 17:18:00 +0100cimento(CO2@gateway/vpn/protonvpn/cimento)
2023-12-07 17:19:13 +0100nate4(~nate@c-98-45-158-125.hsd1.ca.comcast.net)
2023-12-07 17:19:13 +0100euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer)
2023-12-07 17:19:20 +0100euleritian(~euleritia@dynamic-046-114-202-224.46.114.pool.telefonica.de)
2023-12-07 17:19:39 +0100cimento(CO2@gateway/vpn/protonvpn/cimento) (Client Quit)
2023-12-07 17:19:44 +0100euleritian(~euleritia@dynamic-046-114-202-224.46.114.pool.telefonica.de) (Read error: Connection reset by peer)
2023-12-07 17:20:03 +0100euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
2023-12-07 17:22:42 +0100cimento(CO2@gateway/vpn/protonvpn/cimento)
2023-12-07 17:23:27 +0100cimento(CO2@gateway/vpn/protonvpn/cimento) (Client Quit)
2023-12-07 17:24:04 +0100nate4(~nate@c-98-45-158-125.hsd1.ca.comcast.net) (Ping timeout: 255 seconds)
2023-12-07 17:36:11 +0100kenran(~user@user/kenran) (Remote host closed the connection)
2023-12-07 17:38:07 +0100ChaiTRex(~ChaiTRex@user/chaitrex) (Ping timeout: 240 seconds)
2023-12-07 17:40:57 +0100ChaiTRex(~ChaiTRex@user/chaitrex)
2023-12-07 17:41:57 +0100econo_(uid147250@id-147250.tinside.irccloud.com)
2023-12-07 17:47:56 +0100Guest|41(~Guest|41@46.146.126.15)
2023-12-07 17:49:33 +0100Guest|41(~Guest|41@46.146.126.15) (Client Quit)
2023-12-07 17:50:02 +0100chele(~chele@user/chele) (Remote host closed the connection)
2023-12-07 17:54:07 +0100L29Ah(~L29Ah@wikipedia/L29Ah) ()
2023-12-07 17:57:47 +0100todi1(~todi@p4fd1aa52.dip0.t-ipconnect.de)
2023-12-07 17:57:53 +0100cimento(CO2@gateway/vpn/protonvpn/cimento)
2023-12-07 17:58:16 +0100todi(~todi@pd9571076.dip0.t-ipconnect.de) (Ping timeout: 255 seconds)
2023-12-07 18:02:58 +0100todi1todi
2023-12-07 18:04:04 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:a11c:b194:25be:95ba) (Remote host closed the connection)
2023-12-07 18:05:43 +0100ChaiTRex(~ChaiTRex@user/chaitrex) (Ping timeout: 240 seconds)
2023-12-07 18:05:48 +0100wib_jonas(~wib_jonas@business-37-191-60-209.business.broadband.hu) (Ping timeout: 250 seconds)
2023-12-07 18:07:07 +0100AlexNoo__(~AlexNoo@178.34.162.199)
2023-12-07 18:08:30 +0100ChaiTRex(~ChaiTRex@user/chaitrex)
2023-12-07 18:09:51 +0100hamster(~ham@user/ham) (Ping timeout: 256 seconds)
2023-12-07 18:09:54 +0100fendor(~fendor@2a02:8388:1605:d100:267b:1353:13d7:4f0c) (Remote host closed the connection)
2023-12-07 18:10:52 +0100AlexNoo_(~AlexNoo@5.139.232.120) (Ping timeout: 276 seconds)
2023-12-07 18:10:52 +0100AlexZenon(~alzenon@5.139.232.120) (Ping timeout: 276 seconds)
2023-12-07 18:12:26 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:a11c:b194:25be:95ba)
2023-12-07 18:14:23 +0100notzmv(~zmv@user/notzmv)
2023-12-07 18:15:06 +0100AlexNoo__AlexNoo
2023-12-07 18:16:30 +0100AlexZenon(~alzenon@178.34.162.199)
2023-12-07 18:17:47 +0100euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 268 seconds)
2023-12-07 18:17:53 +0100euleritian(~euleritia@dynamic-046-114-202-224.46.114.pool.telefonica.de)
2023-12-07 18:22:10 +0100euleritian(~euleritia@dynamic-046-114-202-224.46.114.pool.telefonica.de) (Read error: Connection reset by peer)
2023-12-07 18:22:28 +0100euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
2023-12-07 18:22:54 +0100cimento(CO2@gateway/vpn/protonvpn/cimento) (Quit: WeeChat 4.1.2)
2023-12-07 18:30:22 +0100danse-nr3(~danse@151.47.48.103) (Ping timeout: 276 seconds)
2023-12-07 18:31:10 +0100L29Ah(~L29Ah@wikipedia/L29Ah)
2023-12-07 18:34:38 +0100euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 260 seconds)
2023-12-07 18:35:00 +0100euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
2023-12-07 18:36:14 +0100mixfix41(~plaguedog@user/mixfix41)
2023-12-07 18:45:26 +0100kuribas(~user@ip-188-118-57-242.reverse.destiny.be) (Ping timeout: 256 seconds)
2023-12-07 18:46:39 +0100mechap(~mechap@user/mechap) (Quit: WeeChat 4.1.2)
2023-12-07 18:48:03 +0100billchenchina(~billchenc@2a0d:2580:ff0c:1:e3c9:c52b:a429:5bfe)
2023-12-07 18:48:09 +0100mc47(~mc47@xmonad/TheMC47)
2023-12-07 18:50:14 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2023-12-07 18:54:35 +0100alexherbo2(~alexherbo@2a02-8440-3341-7ea2-2192-55be-5512-22f8.rev.sfr.net)
2023-12-07 18:55:28 +0100ft(~ft@p3e9bc784.dip0.t-ipconnect.de)
2023-12-07 18:55:39 +0100not_reserved(~not_reser@45.88.222.253)
2023-12-07 19:00:51 +0100kuribas(~user@ip-188-118-57-242.reverse.destiny.be)
2023-12-07 19:01:34 +0100zero(~z@user/zero) (Ping timeout: 276 seconds)
2023-12-07 19:03:08 +0100zero(~z@user/zero)
2023-12-07 19:03:59 +0100kuribas(~user@ip-188-118-57-242.reverse.destiny.be) (Remote host closed the connection)
2023-12-07 19:04:07 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:a11c:b194:25be:95ba) (Remote host closed the connection)
2023-12-07 19:04:26 +0100szkl(uid110435@id-110435.uxbridge.irccloud.com)
2023-12-07 19:07:14 +0100Unicorn_Princess(~Unicorn_P@user/Unicorn-Princess/x-3540542) (Remote host closed the connection)
2023-12-07 19:11:03 +0100tzh(~tzh@c-71-193-181-0.hsd1.or.comcast.net)
2023-12-07 19:23:08 +0100pavonia(~user@user/siracusa) (Quit: Bye!)
2023-12-07 19:32:59 +0100ddellacosta(~ddellacos@ool-44c73d16.dyn.optonline.net) (Ping timeout: 264 seconds)
2023-12-07 19:37:52 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:a11c:b194:25be:95ba)
2023-12-07 19:38:35 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2023-12-07 19:39:33 +0100danza(~francesco@151.47.18.116)
2023-12-07 19:48:15 +0100wroathe(~wroathe@207-153-38-140.fttp.usinternet.com)
2023-12-07 19:48:16 +0100wroathe(~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
2023-12-07 19:48:16 +0100wroathe(~wroathe@user/wroathe)
2023-12-07 19:52:08 +0100matijja(~matijja@193.77.181.201) (Quit: ZNC 1.8.2 - https://znc.in)
2023-12-07 19:53:08 +0100alexherbo2(~alexherbo@2a02-8440-3341-7ea2-2192-55be-5512-22f8.rev.sfr.net) (Remote host closed the connection)
2023-12-07 19:53:29 +0100matijja(~matijja@193.77.181.201)
2023-12-07 19:53:57 +0100alexherbo2(~alexherbo@2a02-8440-3341-7ea2-2192-55be-5512-22f8.rev.sfr.net)
2023-12-07 19:55:38 +0100mechap(~mechap@user/mechap)
2023-12-07 20:01:40 +0100waleee(~waleee@h-176-10-144-38.NA.cust.bahnhof.se)
2023-12-07 20:02:07 +0100wroathe(~wroathe@user/wroathe) (Ping timeout: 255 seconds)
2023-12-07 20:02:35 +0100dhil(~dhil@2001:8e0:2014:3100:8b74:2f78:e0a3:7def)
2023-12-07 20:03:58 +0100Feuermagier(~Feuermagi@user/feuermagier) (Ping timeout: 276 seconds)
2023-12-07 20:08:56 +0100matijja(~matijja@193.77.181.201) (Quit: ZNC 1.8.2 - https://znc.in)
2023-12-07 20:09:14 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:a11c:b194:25be:95ba) (Remote host closed the connection)
2023-12-07 20:12:26 +0100igemnace(~ian@user/igemnace) (Remote host closed the connection)
2023-12-07 20:12:44 +0100matijja(~matijja@193.77.181.201)
2023-12-07 20:15:41 +0100sabino(~sabino@user/sabino)
2023-12-07 20:16:08 +0100misterfish(~misterfis@84-53-85-146.bbserv.nl)
2023-12-07 20:18:16 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:a11c:b194:25be:95ba)
2023-12-07 20:24:10 +0100L29Ah(~L29Ah@wikipedia/L29Ah) ()
2023-12-07 20:24:20 +0100billchenchina(~billchenc@2a0d:2580:ff0c:1:e3c9:c52b:a429:5bfe) (Quit: Leaving)
2023-12-07 20:25:00 +0100lottaquestions(~nick@2607:fa49:503d:b200:7cfa:fcd1:a658:6a49)
2023-12-07 20:26:33 +0100Unicorn_Princess(~Unicorn_P@user/Unicorn-Princess/x-3540542)
2023-12-07 20:29:21 +0100matijja(~matijja@193.77.181.201) (Quit: ZNC 1.8.2 - https://znc.in)
2023-12-07 20:29:44 +0100peterbecich(~Thunderbi@047-229-123-186.res.spectrum.com)
2023-12-07 20:34:11 +0100peterbecich(~Thunderbi@047-229-123-186.res.spectrum.com) (Ping timeout: 264 seconds)
2023-12-07 20:35:59 +0100ystael(~ystael@user/ystael) (Ping timeout: 264 seconds)
2023-12-07 20:42:23 +0100ystael(~ystael@user/ystael)
2023-12-07 20:47:00 +0100peterbecich(~Thunderbi@047-229-123-186.res.spectrum.com)
2023-12-07 20:54:10 +0100sord937(~sord937@gateway/tor-sasl/sord937) (Quit: sord937)
2023-12-07 20:57:05 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2023-12-07 20:57:18 +0100trev(~trev@user/trev) (Quit: trev)
2023-12-07 20:57:27 +0100peterbecich(~Thunderbi@047-229-123-186.res.spectrum.com) (Ping timeout: 256 seconds)
2023-12-07 20:59:11 +0100thegeekinside(~thegeekin@189.217.90.224)
2023-12-07 20:59:45 +0100alp_(~alp@2001:861:e3d6:8f80:3dcc:e84c:21ec:43f6)
2023-12-07 20:59:47 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2023-12-07 21:09:51 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:a11c:b194:25be:95ba) (Remote host closed the connection)
2023-12-07 21:12:37 +0100Sgeo(~Sgeo@user/sgeo)
2023-12-07 21:12:50 +0100danza(~francesco@151.47.18.116) (Ping timeout: 260 seconds)
2023-12-07 21:13:39 +0100azimut(~azimut@gateway/tor-sasl/azimut)
2023-12-07 21:19:42 +0100 <EvanR> for today's part 2, I can't empirically see any errors, the code seems right, works on the example, but gives the wrong answer. I have 8 top level definitions and 1 of them is the example data. All I have to do is verify each one is correct in isolation right xD
2023-12-07 21:19:53 +0100wroathe(~wroathe@207-153-38-140.fttp.usinternet.com)
2023-12-07 21:19:53 +0100wroathe(~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
2023-12-07 21:19:53 +0100wroathe(~wroathe@user/wroathe)
2023-12-07 21:20:45 +0100nate4(~nate@c-98-45-158-125.hsd1.ca.comcast.net)
2023-12-07 21:21:05 +0100not_reserved(~not_reser@45.88.222.253) (Quit: Client closed)
2023-12-07 21:21:43 +0100 <EvanR> might have to bust out unit tests or property tests or something
2023-12-07 21:26:23 +0100nate4(~nate@c-98-45-158-125.hsd1.ca.comcast.net) (Ping timeout: 264 seconds)
2023-12-07 21:27:07 +0100mobivme(~mobivme@112.201.111.217)
2023-12-07 21:27:42 +0100harveypwca(~harveypwc@2601:246:c280:7940:585a:99af:3e4c:209b)
2023-12-07 21:28:09 +0100L29Ah(~L29Ah@wikipedia/L29Ah)
2023-12-07 21:30:38 +0100hc(~hc@mail.hce.li)
2023-12-07 21:45:54 +0100mobivme(~mobivme@112.201.111.217) (Remote host closed the connection)
2023-12-07 21:46:40 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:a11c:b194:25be:95ba)
2023-12-07 21:47:35 +0100Square(~Square@user/square)
2023-12-07 21:48:46 +0100Square2(~Square4@user/square) (Ping timeout: 260 seconds)
2023-12-07 21:49:38 +0100 <EvanR> oof bug in my poker
2023-12-07 21:49:53 +0100 <EvanR> three of a kind is better than two pair
2023-12-07 21:50:01 +0100Guest56(~Guest29@86-82-248-239.fixed.kpn.net)
2023-12-07 21:50:34 +0100 <c_wraith> my bug was that I didn't read the directions and sorted them like poker hands
2023-12-07 21:50:48 +0100 <Guest56> Hello, could someone help me with my homework? Im trying to make a CASloop but it doesnt work :(
2023-12-07 21:50:49 +0100 <EvanR> yeah I did that too
2023-12-07 21:50:49 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:a11c:b194:25be:95ba) (Ping timeout: 246 seconds)
2023-12-07 21:51:37 +0100 <Guest56> casloop :: IORef Int -> Int -> IO ()
2023-12-07 21:51:37 +0100 <Guest56> casloop counter increment = do
2023-12-07 21:51:38 +0100 <Guest56>   loop
2023-12-07 21:51:38 +0100 <Guest56>   where
2023-12-07 21:51:39 +0100 <Guest56>     loop = do
2023-12-07 21:51:39 +0100 <Guest56>       ticket <- readForCAS counter
2023-12-07 21:51:40 +0100 <Guest56>       (actualValue, _) <- peekTicket ticket
2023-12-07 21:51:40 +0100 <Guest56>       let newValue = actualValue + increment
2023-12-07 21:51:41 +0100 <Guest56>       success <- casIORef counter ticket newValue
2023-12-07 21:51:41 +0100 <Guest56>       if success
2023-12-07 21:51:42 +0100 <Guest56>         then return ()
2023-12-07 21:51:42 +0100 <Guest56>         else loop
2023-12-07 21:51:58 +0100 <EvanR> @where paste
2023-12-07 21:51:58 +0100 <lambdabot> Help us help you: please paste full code, input and/or output at e.g. https://paste.tomsmeding.com
2023-12-07 21:51:59 +0100 <Guest56> This does not work as ticket does not match IO as it is a int
2023-12-07 21:52:42 +0100 <Rembane> Guest56: You can go: peekTicket (readForCAS counter)
2023-12-07 21:54:04 +0100 <EvanR> the naming of these variables and operations might help distinguish IO actions from numbers
2023-12-07 21:54:10 +0100 <Guest56> Rembane This does not work, but here is the complete code. https://paste.tomsmeding.com/xXWlqNBj
2023-12-07 21:54:28 +0100Buggys(Buggys@shelltalk.net) (Ping timeout: 276 seconds)
2023-12-07 21:55:28 +0100 <Rembane> Guest56: What's the type of readForCAS?
2023-12-07 21:55:48 +0100 <EvanR> use <- to execute IO actions and bind the result, use let x = to just assign a name to a number (or IO action if you weren't trying to execute it)
2023-12-07 21:56:29 +0100 <Guest56> it says any
2023-12-07 21:57:01 +0100wroathe(~wroathe@user/wroathe) (Ping timeout: 245 seconds)
2023-12-07 21:57:01 +0100 <Guest56> data.economics.Internal.ticket
2023-12-07 21:57:18 +0100 <Guest56> (IO(INT, bo))
2023-12-07 21:57:33 +0100 <Guest56> the ticket is type int
2023-12-07 21:57:57 +0100 <Guest56> EvanR for some reason this does not work
2023-12-07 22:00:05 +0100 <EvanR> what is the actual error
2023-12-07 22:00:56 +0100 <Guest56> Couldn't match expected type: Data.Atomics.Internal.Ticket
2023-12-07 22:00:56 +0100 <Guest56>                                   (IO (Int, b0))
2023-12-07 22:00:57 +0100 <Guest56>               with actual type: IO (Data.Atomics.Internal.Ticket a0)
2023-12-07 22:01:15 +0100mmhat(~mmh@p200300f1c72693d7ee086bfffe095315.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2023-12-07 22:01:22 +0100 <Guest56> Thats with readForCAS
2023-12-07 22:01:27 +0100 <Guest56> and this is without: Couldn't match type ‘Int’ with ‘IO (Int, b0)’
2023-12-07 22:01:28 +0100 <Guest56>   Expected: Data.Atomics.Internal.Ticket (IO (Int, b0))
2023-12-07 22:01:28 +0100 <Guest56>     Actual: Data.Atomics.Internal.Ticket Int
2023-12-07 22:01:34 +0100mikess(~sam@user/mikess)
2023-12-07 22:02:32 +0100 <EvanR> what's the type of readForCAS
2023-12-07 22:03:42 +0100_ht(~Thunderbi@28-52-174-82.ftth.glasoperator.nl)
2023-12-07 22:04:00 +0100juri_(~juri@faikvm.com) (Ping timeout: 252 seconds)
2023-12-07 22:04:33 +0100 <Guest56> Data.Atomics.Internal.Ticket
2023-12-07 22:04:34 +0100 <Guest56>                                   (IO (Int, b0))
2023-12-07 22:04:59 +0100 <EvanR> really, then it's not a function and you can't apply it to anything muchless ticket
2023-12-07 22:05:11 +0100 <EvanR> er, or counter
2023-12-07 22:05:55 +0100 <Guest56> Originally
2023-12-07 22:06:03 +0100 <Guest56> it did not have readForCAS
2023-12-07 22:06:18 +0100 <Guest56> But it still did not work
2023-12-07 22:06:25 +0100 <Guest56>     (actualValue, _) <- peekTicket ticket
2023-12-07 22:06:31 +0100 <Guest56> This was originally there
2023-12-07 22:06:36 +0100 <Guest56> with ticket has type int
2023-12-07 22:06:42 +0100 <EvanR> what's the type of peekTicket
2023-12-07 22:06:58 +0100 <Guest56> IO (Int, Any)
2023-12-07 22:07:13 +0100 <Guest56> peekTicket :: forall a. Ticket a -> a
2023-12-07 22:07:13 +0100 <Guest56> Defined in ‘Data.Atomics’ (atomic-primops-0.8.4)
2023-12-07 22:07:13 +0100 <EvanR> really, then it's not a function and you can't apply it to anything muchless ticket
2023-12-07 22:07:14 +0100 <Guest56> _ :: Ticket (IO (Int, Any)) -> IO (Int, Any)
2023-12-07 22:07:22 +0100 <EvanR> what
2023-12-07 22:07:47 +0100 <EvanR> so what's the type of peekTicket
2023-12-07 22:08:22 +0100 <Guest56> its a function
2023-12-07 22:08:24 +0100 <Guest56> peekticket
2023-12-07 22:08:30 +0100 <EvanR> taking what
2023-12-07 22:08:59 +0100 <Guest56> It should take a ticket
2023-12-07 22:09:02 +0100 <Guest56> and output a ticket
2023-12-07 22:09:14 +0100 <EvanR> are you sure
2023-12-07 22:09:32 +0100 <Guest56> It says so in the documentation i thin
2023-12-07 22:09:32 +0100 <EvanR> one of your type signatures says it takes and returns not the same type
2023-12-07 22:09:33 +0100 <Guest56> peekTicket :: Ticket a -> aSource#
2023-12-07 22:09:33 +0100 <Guest56> A ticket contains or can get the usable Haskell value. This function does just that.
2023-12-07 22:09:40 +0100 <Guest56> a -> a
2023-12-07 22:09:44 +0100mobivme(~mobivme@112.201.111.217)
2023-12-07 22:09:54 +0100 <Guest56> means it takes a ticket a and gives a ticket back?
2023-12-07 22:10:03 +0100 <EvanR> that's the 4th type signature for peekTicket you've posted
2023-12-07 22:10:14 +0100 <Guest56> oh wait
2023-12-07 22:10:26 +0100 <EvanR> 4th unique type signature
2023-12-07 22:10:32 +0100 <haskellbridge> 12<C​elestial> what's the best way to represent the steps of an "animation" within an application state? Right now I basically have something isomorphic to `(FrameInfo, [FrameInfo])` but that's not great for a few reasons. In other languages I would probably have `(Int, Array FrameInfo)` but im not sure if that's idiomatic here
2023-12-07 22:10:55 +0100 <EvanR> what's wrong with [FrameInfo] ?
2023-12-07 22:11:22 +0100 <probie> EvanR: It's `Ticket a -> a`, the `aSource#` is just because they've grabbed to much when they've gone to copy and paste
2023-12-07 22:11:24 +0100 <Guest56> I dont understand, what is a 4th type signature
2023-12-07 22:11:44 +0100dhil(~dhil@2001:8e0:2014:3100:8b74:2f78:e0a3:7def) (Ping timeout: 256 seconds)
2023-12-07 22:12:00 +0100 <Guest56> probie Yes this is correct
2023-12-07 22:12:13 +0100 <EvanR> peekTicket :: Ticket a -> a, alright that's progress
2023-12-07 22:13:04 +0100 <haskellbridge> 12<C​elestial> The problem is that it needs special handling for an empty list to start with because then you can't represent the state or need to handle it seperately
2023-12-07 22:13:26 +0100 <EvanR> if you use an array or vector to hold the frameinfos, it can still be empty
2023-12-07 22:13:30 +0100 <haskellbridge> 12<C​elestial> `(Int, [FrameInfo])` is better in that sense but it's also pretty inefficient
2023-12-07 22:13:31 +0100 <EvanR> technically
2023-12-07 22:13:58 +0100 <EvanR> kneejerk reaction is, don't have empty animations?
2023-12-07 22:14:22 +0100 <EvanR> [FrameInfo] is fine for small number of items
2023-12-07 22:15:09 +0100 <haskellbridge> 12<C​elestial> right, but then you have the compiler complain about totality because the rest of the codebase deals with lists of data - I could make those `NonEmpty` I suppose
2023-12-07 22:15:11 +0100mmhat(~mmh@p200300f1c7269374ee086bfffe095315.dip0.t-ipconnect.de)
2023-12-07 22:15:25 +0100 <EvanR> NonEmpty FrameInfo would solve that yes
2023-12-07 22:15:32 +0100 <haskellbridge> 12<C​elestial> but thanks for the input :)
2023-12-07 22:15:35 +0100 <EvanR> if it's an actual problem
2023-12-07 22:15:37 +0100 <probie> Guest56: I think what you want is just `actualValue <- peekTicket ticket`
2023-12-07 22:16:49 +0100sabino(~sabino@user/sabino) (Quit: Lambda _ -> x)
2023-12-07 22:16:59 +0100machinedgod(~machinedg@93-138-62-133.adsl.net.t-com.hr)
2023-12-07 22:17:06 +0100 <probie> or more likely `let actualValue = peekTicket ticket` if `ticket` is a `Ticket Int` and not a `Ticker (IO Int)`
2023-12-07 22:17:39 +0100 <probie> s/Ticker/Ticket/
2023-12-07 22:18:34 +0100 <Guest56> probie That did solve the error, the ticket was ticket int
2023-12-07 22:19:49 +0100 <Guest56> I have one more problem, which is the last loop 'if success
2023-12-07 22:19:50 +0100 <Guest56>         then return ()
2023-12-07 22:19:50 +0100 <Guest56>         else loop'
2023-12-07 22:19:57 +0100 <EvanR> if peekTicket ticket is an Int, then you can't execute it like an IO action
2023-12-07 22:20:06 +0100 <EvanR> x <- 3 won't work
2023-12-07 22:20:25 +0100bilegeek(~bilegeek@2600:1008:b042:9b48:fb5c:1866:504a:bda4)
2023-12-07 22:20:28 +0100 <EvanR> let x = 3 works
2023-12-07 22:21:04 +0100 <Guest56> succes is of type (Bool, Data.Atomics.Internal.Ticket Int), while I need the loop to go on if this is true
2023-12-07 22:21:07 +0100 <Guest56> how can i archieve that
2023-12-07 22:21:33 +0100 <EvanR> :t fst
2023-12-07 22:21:34 +0100 <lambdabot> (a, b) -> a
2023-12-07 22:21:45 +0100 <EvanR> or use pattern matching to unpack the pair and get the Bool
2023-12-07 22:22:57 +0100 <Guest56> let (bol, int) = success
2023-12-07 22:22:58 +0100 <Guest56>       if bol
2023-12-07 22:22:58 +0100 <Guest56>         then return ()
2023-12-07 22:22:59 +0100 <Guest56>         else loop
2023-12-07 22:23:09 +0100 <Guest56> how do you guys put the code brackets inhere
2023-12-07 22:23:44 +0100 <EvanR> you don't need any more brackets
2023-12-07 22:23:52 +0100 <EvanR> but indentation could use some work
2023-12-07 22:25:40 +0100_ht(~Thunderbi@28-52-174-82.ftth.glasoperator.nl) (Remote host closed the connection)
2023-12-07 22:28:22 +0100__monty__(~toonn@user/toonn) (Quit: leaving)
2023-12-07 22:32:02 +0100 <Guest56> Thank guys
2023-12-07 22:32:05 +0100 <Guest56> I think it works now
2023-12-07 22:34:41 +0100pavonia(~user@user/siracusa)
2023-12-07 22:35:41 +0100carcif^(~carcif@c-98-242-74-66.hsd1.ga.comcast.net)
2023-12-07 22:44:12 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:a11c:b194:25be:95ba)
2023-12-07 22:49:05 +0100alp_(~alp@2001:861:e3d6:8f80:3dcc:e84c:21ec:43f6) (Ping timeout: 256 seconds)
2023-12-07 23:01:18 +0100Guest56(~Guest29@86-82-248-239.fixed.kpn.net) (Quit: Client closed)
2023-12-07 23:07:24 +0100alp_(~alp@2001:861:e3d6:8f80:27cf:eb18:e4f:ec96)
2023-12-07 23:10:42 +0100coot(~coot@89-69-206-216.dynamic.chello.pl) (Quit: coot)
2023-12-07 23:12:14 +0100takuan(~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
2023-12-07 23:14:37 +0100oo_miguel(~Thunderbi@78-11-179-96.static.ip.netia.com.pl) (Ping timeout: 255 seconds)
2023-12-07 23:19:37 +0100Maxdamantus(~Maxdamant@user/maxdamantus) (Ping timeout: 276 seconds)
2023-12-07 23:19:55 +0100harveypwca(~harveypwc@2601:246:c280:7940:585a:99af:3e4c:209b) (Quit: Leaving)
2023-12-07 23:20:00 +0100Maxdamantus(~Maxdamant@user/maxdamantus)
2023-12-07 23:40:08 +0100Vajb(~Vajb@2001:999:704:f9f4:5471:a9dd:fd2a:5408) (Ping timeout: 256 seconds)
2023-12-07 23:41:33 +0100wroathe(~wroathe@50.205.197.50)
2023-12-07 23:41:33 +0100wroathe(~wroathe@50.205.197.50) (Changing host)
2023-12-07 23:41:33 +0100wroathe(~wroathe@user/wroathe)
2023-12-07 23:43:13 +0100ddellacosta(~ddellacos@ool-44c73d16.dyn.optonline.net)
2023-12-07 23:43:25 +0100ddellacosta(~ddellacos@ool-44c73d16.dyn.optonline.net) (Client Quit)
2023-12-07 23:52:07 +0100acidjnk_new(~acidjnk@p200300d6e72b9388205ae88ccd349b12.dip0.t-ipconnect.de) (Ping timeout: 276 seconds)
2023-12-07 23:57:35 +0100remedan(~remedan@ip-94-112-0-18.bb.vodafone.cz) (Ping timeout: 264 seconds)
2023-12-07 23:59:39 +0100gehmehgeh(~user@user/gehmehgeh) (Quit: Leaving)