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