Logs on 2024-04-12 (liberachat/#haskell)
| 00:02:29 | × | califax quits (~califax@user/califx) (Remote host closed the connection) |
| 00:03:53 | × | yaroot quits (~yaroot@p2987138-ipngn7501souka.saitama.ocn.ne.jp) (Remote host closed the connection) |
| 00:04:33 | → | yaroot joins (~yaroot@p2987138-ipngn7501souka.saitama.ocn.ne.jp) |
| 00:04:39 | → | califax joins (~califax@user/califx) |
| 00:06:24 | → | Ptival joins (~Ptival@64.16.51.186) |
| 00:10:53 | × | gmg quits (~user@user/gehmehgeh) (Quit: Leaving) |
| 00:13:31 | × | hgolden quits (~hgolden@2603-8000-9d00-3ed1-2678-8497-aa5c-7fa9.res6.spectrum.com) (Remote host closed the connection) |
| 00:15:11 | → | hgolden joins (~hgolden@2603-8000-9d00-3ed1-2678-8497-aa5c-7fa9.res6.spectrum.com) |
| 00:16:35 | <Ptival> | I'm trying something a bit too wizardy and could use some smart ideas. In my framework, there are a lot of newtypes `WrappedX` that are just wrapping instances of data types `RawX` with some metadata. Now I was writing too many `viewRawX :: WrappedX -> RawX` to my liking, so I decided to make a `HasRaw` type class with an associated `Raw` type |
| 00:16:35 | <Ptival> | family s.t. `Raw WrappedX = RawX`. All good, but now I'm still writing many `HasRaw` instances that are super boring. So I've been toying with using TH to generate `Wrapped`. Unfortunately, many of my raw datatypes contain recursive instances of the wrapped datatype. But now that I want to stage things, the raw datatype cannot be defined in terms |
| 00:16:36 | <Ptival> | of the to-be-generated wrapped one. I managed to work around this by introducing a reverse type family, `Wrapped`, so that in recursive instances within a `RawX` definition I can ask for a `Wrapped RawX`. But now comes the trouble of deriving standard stuff like Eq, Ord, Show... Now because nothing is known, a priori, about `Wrapped RawX`, I can no |
| 00:16:36 | <Ptival> | longer add the deriving clauses to the data type definition. What I can do, however, is have the TH generate paired standalong instances `deriving instance Eq RawX; deriving instance Eq WrappedX`. Everything works, but is there a simpler way to go about all this? :) |
| 00:17:26 | <jackdk> | https://hackage.haskell.org/package/lens-5.2.3/docs/Control-Lens-Wrapped.html and `makeWrapped` in Control.Lens.TH? |
| 00:17:36 | × | nuh^ quits (~cd@c-98-242-74-66.hsd1.ga.comcast.net) (Remote host closed the connection) |
| 00:17:45 | <jackdk> | I don't know if that solves your recursive case |
| 00:29:40 | → | sp1ff joins (~user@c-24-21-45-157.hsd1.wa.comcast.net) |
| 00:33:05 | <Ptival> | Also, I cannot figure out how to write a TH newtype instance using the `d` quasiquoter, and a spliced type declaration. [d| newtype Concrete = ... |] works, but the moment I try to [d| newtype $(return name) = ... |] I get a "Malformed head of type or class declaration" error... |
| 00:34:56 | × | Tuplanolla quits (~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) (Quit: Leaving.) |
| 00:41:49 | <Axman6> | definitely feels like Wrapped to me. Also, Coerce |
| 00:47:18 | <c_wraith> | Ptival: you can't just splice into arbitrary positions. You can splice a pattern, a type, a declaration, or an expression. The name of a newtype is none of the above. |
| 00:50:45 | → | Square2 joins (~Square4@user/square) |
| 00:52:39 | × | Square quits (~Square@user/square) (Ping timeout: 255 seconds) |
| 00:55:44 | × | waleee quits (~waleee@h-176-10-144-38.NA.cust.bahnhof.se) (Ping timeout: 260 seconds) |
| 00:56:47 | <Ptival> | ah, that's the catch, thanks! so you pretty much have to use `newtypeD` for anything where the name is user-defined? |
| 00:57:27 | <c_wraith> | yeah, you'll have to construct it by hand. |
| 01:00:29 | → | doyougnu joins (~doyougnu@45.46.170.68) |
| 01:03:38 | → | Noinia joins (~Frank@77-162-168-71.fixed.kpn.net) |
| 01:07:31 | → | philopsos joins (~caecilius@user/philopsos) |
| 01:11:14 | → | aforemny joins (~aforemny@2001:9e8:6cdd:9e00:4b8:3ff7:6e54:7c55) |
| 01:12:19 | × | juri_ quits (~juri@implicitcad.org) (Ping timeout: 260 seconds) |
| 01:12:31 | × | aforemny_ quits (~aforemny@2001:9e8:6cc8:c200:892:31c9:646a:fd40) (Ping timeout: 256 seconds) |
| 01:22:27 | → | juri_ joins (~juri@implicitcad.org) |
| 01:24:16 | × | Ptival quits (~Ptival@64.16.51.186) (Ping timeout: 250 seconds) |
| 01:34:03 | → | raehik joins (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net) |
| 01:50:16 | × | otto_s quits (~user@p4ff2773c.dip0.t-ipconnect.de) (Ping timeout: 255 seconds) |
| 01:50:47 | → | crook1389 joins (uid581388@id-581388.ilkley.irccloud.com) |
| 01:51:46 | → | otto_s joins (~user@p4ff27d41.dip0.t-ipconnect.de) |
| 02:15:07 | × | SteelBlueSilk quits (~SteelBlue@user/SteelBlueSilk) (Quit: ZNC 1.8.2+deb3.1 - https://znc.in) |
| 02:15:46 | × | [Leary] quits (~Leary]@user/Leary/x-0910699) (Remote host closed the connection) |
| 02:15:57 | → | SteelBlueSilk joins (~SteelBlue@c-98-42-249-36.hsd1.ca.comcast.net) |
| 02:16:00 | → | [Leary] joins (~Leary]@user/Leary/x-0910699) |
| 02:16:06 | × | SteelBlueSilk quits (~SteelBlue@c-98-42-249-36.hsd1.ca.comcast.net) (Changing host) |
| 02:16:06 | → | SteelBlueSilk joins (~SteelBlue@user/SteelBlueSilk) |
| 02:17:13 | → | mrmr1553343 joins (~mrmr@user/mrmr) |
| 02:17:33 | × | raehik quits (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net) (Ping timeout: 252 seconds) |
| 02:18:35 | × | mrmr155334 quits (~mrmr@user/mrmr) (Ping timeout: 264 seconds) |
| 02:18:35 | mrmr1553343 | is now known as mrmr155334 |
| 02:20:06 | × | ChaiTRex quits (~ChaiTRex@user/chaitrex) (Ping timeout: 260 seconds) |
| 02:22:17 | → | ChaiTRex joins (~ChaiTRex@user/chaitrex) |
| 02:26:17 | × | machinedgod quits (~machinedg@d173-183-246-216.abhsia.telus.net) (Ping timeout: 268 seconds) |
| 02:28:56 | × | Square2 quits (~Square4@user/square) (Remote host closed the connection) |
| 02:29:35 | → | Square2 joins (~Square4@user/square) |
| 02:29:53 | → | tri joins (~tri@ool-18bc2e74.dyn.optonline.net) |
| 02:34:37 | × | tri quits (~tri@ool-18bc2e74.dyn.optonline.net) (Ping timeout: 268 seconds) |
| 02:35:25 | × | madeleine-sydney quits (~madeleine@c-76-155-235-153.hsd1.co.comcast.net) (Quit: Konversation terminated!) |
| 02:37:22 | → | halloy4906 joins (~halloy490@broadband-5-228-80-43.ip.moscow.rt.ru) |
| 02:37:54 | halloy4906 | is now known as reki |
| 02:40:58 | <reki> | Hi all! Can you recommend a place to showcase a project? I've been doing some research with Haskell UI |
| 02:42:01 | × | Square2 quits (~Square4@user/square) (Ping timeout: 268 seconds) |
| 02:43:55 | × | AkechiShiro quits (~licht@user/akechishiro) (Quit: WeeChat 4.2.2) |
| 02:44:15 | × | terrorjack quits (~terrorjac@2a01:4f8:c17:87f8::) (Quit: The Lounge - https://thelounge.chat) |
| 02:48:42 | → | terrorjack joins (~terrorjac@2a01:4f8:c17:87f8::) |
| 02:49:41 | × | td_ quits (~td@i5387091E.versanet.de) (Ping timeout: 240 seconds) |
| 02:51:54 | → | td_ joins (~td@i53870902.versanet.de) |
| 02:58:02 | → | ddellacosta joins (~ddellacos@ool-44c73d29.dyn.optonline.net) |
| 03:06:54 | → | _ht joins (~Thunderbi@28-52-174-82.ftth.glasoperator.nl) |
| 03:08:41 | × | ubert quits (~Thunderbi@2a02:8109:ab8a:5a00:b96:446c:954e:ac70) (Ping timeout: 256 seconds) |
| 03:15:38 | × | euleritian quits (~euleritia@dynamic-176-006-187-251.176.6.pool.telefonica.de) (Read error: Connection reset by peer) |
| 03:15:56 | → | euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
| 03:17:38 | × | vnogueira_ quits (~vnogueira@user/vnogueira) (Remote host closed the connection) |
| 03:18:01 | → | vnogueira joins (~vnogueira@user/vnogueira) |
| 03:19:11 | × | lockywolf quits (~lockywolf@public.lockywolf.net) (Quit: ZNC 1.8.2 - https://znc.in) |
| 03:20:49 | → | lockywolf joins (~lockywolf@public.lockywolf.net) |
| 03:25:11 | → | Ptival joins (~Ptival@2601:1c0:4580:7650:dc80:9d56:2b92:31a4) |
| 03:29:38 | <sm> | hi reki. The haskell discourse, haskell reddit if you like, and #haskell rooms on Libera and Matrix are good places. |
| 03:30:00 | <sm> | Also the #haskell tag on mastodon. |
| 03:30:37 | × | Ptival quits (~Ptival@2601:1c0:4580:7650:dc80:9d56:2b92:31a4) (Quit: Client closed) |
| 03:37:47 | → | dsrt^ joins (~cd@c-98-242-74-66.hsd1.ga.comcast.net) |
| 03:46:34 | <reki> | awesome, thank you! |
| 03:47:41 | × | aforemny quits (~aforemny@2001:9e8:6cdd:9e00:4b8:3ff7:6e54:7c55) (Ping timeout: 272 seconds) |
| 03:47:50 | → | aforemny_ joins (~aforemny@i59F516ED.versanet.de) |
| 03:48:08 | <energizer> | Num says "The Haskell Report defines no laws for Num. However, (+) and (*) are customarily expected to define a ring and have the following properties: Associativity of (+) ..." |
| 03:48:27 | <reki> | Here's the project I've been working on. It's Haskell wrapper for Iced (a Rust gui library). |
| 03:48:30 | <reki> | https://github.com/ibaryshnikov/iced-hs |
| 03:49:04 | <energizer> | but + isnt associative on Float. what are we to make of this violation? |
| 03:52:23 | × | lockywolf quits (~lockywolf@public.lockywolf.net) (Quit: ZNC 1.8.2 - https://znc.in) |
| 03:53:57 | → | lockywolf joins (~lockywolf@public.lockywolf.net) |
| 03:54:27 | <energizer> | like, what's the point of having + be *usually* associative if you can't write code that assumes it's associative? |
| 03:54:36 | <energizer> | (because sometimes it isn't associative) |
| 03:55:57 | × | chiselfuse quits (~chiselfus@user/chiselfuse) (Remote host closed the connection) |
| 03:57:20 | × | mei quits (~mei@user/mei) (Remote host closed the connection) |
| 03:57:21 | → | chiselfuse joins (~chiselfus@user/chiselfuse) |
| 03:59:45 | → | mei joins (~mei@user/mei) |
| 04:05:11 | → | peterbecich joins (~Thunderbi@47.229.123.186) |
| 04:12:42 | → | michalz joins (~michalz@185.246.207.218) |
| 04:22:32 | <c_wraith> | energizer: in fact, I'd expect "usually" is there because that's not true for floating-point. |
| 04:30:12 | × | peterbecich quits (~Thunderbi@47.229.123.186) (Ping timeout: 256 seconds) |
| 04:45:46 | → | incertia joins (~incertia@209.122.137.252) |
| 04:48:11 | <sm> | reki: sounds possibly exciting! |
| 04:48:20 | <sm> | thanks for sharing it |
| 04:48:38 | <sm> | #haskell-game may also be interested |
| 04:55:13 | → | tri joins (~tri@ool-18bc2e74.dyn.optonline.net) |
| 04:55:33 | × | lockywolf quits (~lockywolf@public.lockywolf.net) (Quit: ZNC 1.8.2 - https://znc.in) |
| 04:56:41 | → | madeleine-sydney joins (~madeleine@c-76-155-235-153.hsd1.co.comcast.net) |
| 04:57:05 | → | lockywolf joins (~lockywolf@public.lockywolf.net) |
| 04:59:25 | × | tri quits (~tri@ool-18bc2e74.dyn.optonline.net) (Ping timeout: 246 seconds) |
| 05:02:29 | × | down200 quits (~down200@shell.lug.mtu.edu) (Ping timeout: 240 seconds) |
| 05:05:11 | → | zetef joins (~quassel@5.2.182.99) |
| 05:10:03 | × | mrmr155334 quits (~mrmr@user/mrmr) (Quit: Ping timeout (120 seconds)) |
| 05:10:28 | → | mrmr155334 joins (~mrmr@user/mrmr) |
| 05:12:56 | <[Leary]> | energizer: The Num docs ditheringly fail to assert the "customarily expected properties" as true laws, but you should take them as such in defacto modern Haskell, absent an updated Report to make them official. |
| 05:13:14 | <[Leary]> | And it's morally correct to assume the typeclass laws hold when taking a constraint. |
| 05:13:23 | <energizer> | except for Float? |
| 05:13:26 | <reki> | @sm awesome, thanks! |
| 05:13:26 | lambdabot | smashes a lamp on awesome, thanks!'s head |
| 05:13:33 | <reki> | woops |
| 05:13:40 | <reki> | what do I type to reply? |
| 05:13:46 | <energizer> | just the name, no @ |
| 05:13:58 | <reki> | sm thanks! |
| 05:14:04 | <reki> | didn't work |
| 05:14:07 | <energizer> | it worked |
| 05:14:12 | <[Leary]> | Float violates the Ord laws too. That's not ideal, but it is pragmatic. |
| 05:14:31 | <reki> | nice. I don't see it in the ui |
| 05:14:41 | <geekosaur> | this is IRC, not Discord |
| 05:14:51 | <geekosaur> | the UI is… undramatic |
| 05:14:59 | <reki> | gonna learn it |
| 05:15:09 | <reki> | I've heard some great communities are here |
| 05:15:15 | <reki> | like Lisp |
| 05:15:30 | <reki> | I also came here for Haskell :3 |
| 05:15:49 | <[Leary]> | energizer: Unlawful instances are like unsafe functions. When writing an unlawful instance, it's the programmer's responsibility to document violations in detail. When selecting an unlawful instance, it's the programmers responsibility to ensure the violations don't threaten the correctness of their program. But everyone else gets to assume safety. |
| 05:16:09 | <[Leary]> | (and lawfulness) |
| 05:17:38 | <jackdk> | It's more complicated than that though, because if you write some code that uses a typeclass, then the presence/absence of the instance is the thing that tells you whether or not it works. You can't write `foo :: (SomeConstraint a, a is not any of these unlawful instances X Y Z) => a -> whatever` |
| 05:17:39 | <energizer> | how do you ensure violations don't cause incorrectness if you're violating the documented assumptions of your dependencies? |
| 05:18:04 | <mauke> | reki: IRC doesn't really have replies, but most clients highlight messages that start with your nick |
| 05:18:36 | × | euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 255 seconds) |
| 05:18:39 | <jackdk> | energizer: my view is that you don't write law-violating instances |
| 05:18:54 | <jackdk> | energizer: and I try not to think about Num too much because otherwise I get sad |
| 05:19:27 | <reki> | mauke: that's cool! The UI looks cosy |
| 05:19:58 | <mauke> | which client are you using? |
| 05:21:16 | → | euleritian joins (~euleritia@dynamic-176-006-187-251.176.6.pool.telefonica.de) |
| 05:24:07 | <reki> | Halloy, the one written in Rust |
| 05:24:34 | <reki> | it also built in Iced, I feel like using it :) |
| 05:26:24 | × | tcard_ quits (~tcard@2400:4051:5801:7500:cf17:befc:ff82:5303) (Quit: Leaving) |
| 05:26:59 | <[Leary]> | jackdk: You don't need to write that, you just make the only sane decision you can: defer responsibility to the usage site where `SomeConstraint A` is actually selected and supplied to `foo`. A programmer who supplies an unlawful instance must read your implementation details or perform extensive testing to know whether or not /they'll/ break /their/ program. /Yours/ is perfectly correct. |
| 05:27:44 | <jackdk> | I don't disagree, but then you enter a world where fearless coding against abstractions becomes more and more difficult |
| 05:27:51 | <jackdk> | And I'd rather not enter that world |
| 05:28:31 | → | tcard joins (~tcard@2400:4051:5801:7500:cf17:befc:ff82:5303) |
| 05:32:46 | → | euphores joins (~SASL_euph@user/euphores) |
| 05:33:27 | × | euphores quits (~SASL_euph@user/euphores) (Client Quit) |
| 05:34:21 | <haskellbridge> | <sm> savage, lambdabot! |
| 05:35:05 | <haskellbridge> | <sm> we need a bot tamer |
| 05:36:15 | <haskellbridge> | <sm> reki: I was just looking at the iced sample apps. Have you built any with you haskell lib yet ? |
| 05:39:51 | → | euphores joins (~SASL_euph@user/euphores) |
| 05:40:47 | → | down200 joins (~down200@shell.lug.mtu.edu) |
| 05:41:27 | <reki> | sm: only the examples so far |
| 05:41:54 | <reki> | I'm porting original iced examples to Haskell, it's possible to build and run them |
| 05:42:11 | <haskellbridge> | <sm> excellent |
| 05:42:32 | <haskellbridge> | <sm> some screenshots in the readme will help (even if the same as iced's) |
| 05:43:00 | <reki> | all the layout examples are good to go, one of the next priorities is handling IO/networking |
| 05:43:10 | <reki> | will do, thank you for the feedback! |
| 05:43:41 | <haskellbridge> | <sm> code looks very nice: https://github.com/ibaryshnikov/iced-hs/blob/master/examples/textEditor/main.hs |
| 05:44:24 | <reki> | that was the goal |
| 05:44:48 | <reki> | I also recommend responsive example |
| 05:44:50 | <reki> | https://github.com/ibaryshnikov/iced-hs/blob/master/examples/responsive/main.hs |
| 05:45:52 | <reki> | you can decide if you want to show the contents depenging on the container size |
| 05:56:14 | → | sord937 joins (~sord937@gateway/tor-sasl/sord937) |
| 05:57:37 | → | bilegeek joins (~bilegeek@2600:1008:b018:559d:69a9:fcad:2125:36b1) |
| 06:00:03 | × | Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 06:06:07 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 06:06:49 | × | [Leary] quits (~Leary]@user/Leary/x-0910699) (Remote host closed the connection) |
| 06:08:34 | × | ridcully quits (~ridcully@p508accab.dip0.t-ipconnect.de) (Ping timeout: 255 seconds) |
| 06:10:35 | → | [Leary] joins (~Leary]@user/Leary/x-0910699) |
| 06:13:59 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 06:26:07 | × | son0p quits (~ff@191.104.17.254) (Ping timeout: 255 seconds) |
| 06:37:23 | → | ridcully joins (~ridcully@p508accab.dip0.t-ipconnect.de) |
| 06:37:46 | → | danza_ joins (~francesco@fi-19-196-66.service.infuturo.it) |
| 06:39:50 | → | lortabac joins (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) |
| 06:44:06 | × | bliminse quits (~bliminse@user/bliminse) (Ping timeout: 255 seconds) |
| 06:45:54 | → | yeitrafferin joins (~user@2a04:4540:720c:aa00:1829:9d43:6f92:10c3) |
| 06:45:54 | → | bliminse joins (~bliminse@user/bliminse) |
| 06:46:51 | → | igemnace joins (~ian@user/igemnace) |
| 06:48:03 | × | zetef quits (~quassel@5.2.182.99) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
| 06:52:40 | × | igemnace quits (~ian@user/igemnace) (Read error: Connection reset by peer) |
| 07:01:58 | → | bgt32 joins (~keutoi@182.65.26.208) |
| 07:05:45 | <bgt32> | Is there are website that hosts previous versions of ghc, I want 8.10? something like tio.run... |
| 07:09:53 | → | igemnace joins (~ian@user/igemnace) |
| 07:11:27 | × | euleritian quits (~euleritia@dynamic-176-006-187-251.176.6.pool.telefonica.de) (Read error: Connection reset by peer) |
| 07:11:47 | → | euleritian joins (~euleritia@77.22.252.56) |
| 07:11:49 | × | SteelBlueSilk quits (~SteelBlue@user/SteelBlueSilk) (Quit: ZNC 1.8.2+deb3.1 - https://znc.in) |
| 07:14:05 | → | SteelBlueSilk joins (~SteelBlue@c-98-42-249-36.hsd1.ca.comcast.net) |
| 07:14:13 | × | SteelBlueSilk quits (~SteelBlue@c-98-42-249-36.hsd1.ca.comcast.net) (Changing host) |
| 07:14:13 | → | SteelBlueSilk joins (~SteelBlue@user/SteelBlueSilk) |
| 07:14:50 | × | m1dnight quits (~christoph@82.146.125.185) (Quit: WeeChat 4.2.1) |
| 07:15:17 | → | m1dnight joins (~christoph@82.146.125.185) |
| 07:18:29 | → | acidjnk joins (~acidjnk@p200300d6e714dc90b8d1e6ddf67ed27c.dip0.t-ipconnect.de) |
| 07:20:33 | × | crook1389 quits (uid581388@id-581388.ilkley.irccloud.com) (Quit: Connection closed for inactivity) |
| 07:22:36 | <dminuoso> | lyxia: Thanks! The suggestion was spot on: https://gist.github.com/dminuoso/8904237b4a8c6b30265b32e748766af2 b |
| 07:24:41 | <dminuoso> | bgt32: ghcup or nix can both provide 8.10 |
| 07:24:49 | <dminuoso> | bgt32: Alternatively you can download GHC directly from https://www.haskell.org/ghc/download.html if you want to manage it manually |
| 07:27:20 | × | ft quits (~ft@p4fc2a20e.dip0.t-ipconnect.de) (Quit: leaving) |
| 07:30:23 | → | target_i joins (~target_i@user/target-i/x-6023099) |
| 07:33:49 | <sm> | stack, too |
| 07:35:15 | <sm> | https://play.haskell.org too |
| 07:36:24 | × | ridcully quits (~ridcully@p508accab.dip0.t-ipconnect.de) (Read error: Connection reset by peer) |
| 07:37:39 | × | dsrt^ quits (~cd@c-98-242-74-66.hsd1.ga.comcast.net) (Ping timeout: 252 seconds) |
| 07:45:10 | → | vpan joins (~vpan@212.117.1.172) |
| 07:45:28 | vpan | is now known as Guest5116 |
| 07:45:48 | Guest5116 | is now known as vpan |
| 07:48:48 | × | danza_ quits (~francesco@fi-19-196-66.service.infuturo.it) (Ping timeout: 268 seconds) |
| 07:49:12 | <albet70> | how to get two item combination in a list like [1,2,3] -> [1,2] [1,3], [2,3] |
| 07:50:01 | <c_wraith> | you want to preserve order? |
| 07:50:59 | <ski> | > [[x,y] | x:xs <- [0,1,2,3],y <- xs] |
| 07:51:00 | <lambdabot> | error: |
| 07:51:01 | <lambdabot> | • No instance for (Num [()]) arising from a use of ‘e_10123’ |
| 07:51:01 | <lambdabot> | • In the expression: e_10123 |
| 07:51:12 | <ski> | > [[x,y] | x:xs <- tails [0,1,2,3],y <- xs] |
| 07:51:13 | <lambdabot> | [[0,1],[0,2],[0,3],[1,2],[1,3],[2,3]] |
| 07:52:24 | <ski> | (you could also use `StateT [t] []' for this) |
| 07:55:31 | → | CiaoSen joins (~Jura@2a05:5800:297:7200:e6b9:7aff:fe80:3d03) |
| 08:04:46 | × | econo_ quits (uid147250@id-147250.tinside.irccloud.com) (Quit: Connection closed for inactivity) |
| 08:05:42 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 08:07:22 | × | Franciman quits (~Franciman@mx1.fracta.dev) (Ping timeout: 255 seconds) |
| 08:15:20 | → | haskell_ joins (~haskell@75-164-217-161.ptld.qwest.net) |
| 08:15:35 | × | philopsos quits (~caecilius@user/philopsos) (Ping timeout: 272 seconds) |
| 08:16:22 | × | haskell_ quits (~haskell@75-164-217-161.ptld.qwest.net) (Remote host closed the connection) |
| 08:19:05 | × | CiaoSen quits (~Jura@2a05:5800:297:7200:e6b9:7aff:fe80:3d03) (Quit: CiaoSen) |
| 08:30:49 | → | danse-nr3 joins (~danse-nr3@fi-19-195-0.service.infuturo.it) |
| 08:31:24 | × | danse-nr3 quits (~danse-nr3@fi-19-195-0.service.infuturo.it) (Remote host closed the connection) |
| 08:31:49 | → | danse-nr3 joins (~danse-nr3@fi-19-195-0.service.infuturo.it) |
| 08:33:00 | × | destituion quits (~destituio@2a02:2121:107:22da:b93a:2071:f42:9bef) (Ping timeout: 255 seconds) |
| 08:33:42 | → | destituion joins (~destituio@85.221.111.174) |
| 08:33:58 | → | son0p joins (~ff@167.0.178.102) |
| 08:41:06 | × | yeitrafferin quits (~user@2a04:4540:720c:aa00:1829:9d43:6f92:10c3) (Ping timeout: 255 seconds) |
| 08:42:25 | × | Etabeta1 quits (~Etabeta1@176.207.241.56) (Changing host) |
| 08:42:25 | → | Etabeta1 joins (~Etabeta1@user/meow/Etabeta1) |
| 08:43:52 | → | ridcully joins (~ridcully@p508accab.dip0.t-ipconnect.de) |
| 08:44:15 | → | yeitrafferin joins (~user@149.224.94.221.dynamic-pppoe.dt.ipv4.wtnet.de) |
| 08:54:44 | × | tzh quits (~tzh@c-73-164-206-160.hsd1.or.comcast.net) (Quit: zzz) |
| 08:58:45 | → | pyooque joins (~puke@user/puke) |
| 08:58:45 | × | puke quits (~puke@user/puke) (Killed (tantalum.libera.chat (Nickname regained by services))) |
| 08:58:45 | pyooque | is now known as puke |
| 09:01:49 | × | ridcully quits (~ridcully@p508accab.dip0.t-ipconnect.de) (Quit: WeeChat 4.2.1) |
| 09:02:56 | → | ridcully joins (~ridcully@p508accab.dip0.t-ipconnect.de) |
| 09:03:15 | × | ridcully quits (~ridcully@p508accab.dip0.t-ipconnect.de) (Client Quit) |
| 09:05:16 | → | ridcully joins (~ridcully@p508accab.dip0.t-ipconnect.de) |
| 09:10:08 | × | danse-nr3 quits (~danse-nr3@fi-19-195-0.service.infuturo.it) (Ping timeout: 256 seconds) |
| 09:10:30 | → | danse-nr3 joins (~danse-nr3@151.43.242.233) |
| 09:12:13 | × | bilegeek quits (~bilegeek@2600:1008:b018:559d:69a9:fcad:2125:36b1) (Quit: Leaving) |
| 09:13:03 | × | sagax quits (~sagax@user/sagax) (Ping timeout: 256 seconds) |
| 09:15:29 | → | actioninja5 joins (~actioninj@user/actioninja) |
| 09:16:07 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 09:17:36 | × | actioninja quits (~actioninj@user/actioninja) (Ping timeout: 268 seconds) |
| 09:17:37 | actioninja5 | is now known as actioninja |
| 09:21:17 | → | chele joins (~chele@user/chele) |
| 09:21:36 | × | bgt32 quits (~keutoi@182.65.26.208) (Read error: Connection reset by peer) |
| 09:31:46 | → | jorj joins (~jorj@user/jorj) |
| 09:32:56 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 09:41:40 | × | madeleine-sydney quits (~madeleine@c-76-155-235-153.hsd1.co.comcast.net) (Quit: Konversation terminated!) |
| 09:42:52 | × | driib quits (~driib@vmi931078.contaboserver.net) (Quit: The Lounge - https://thelounge.chat) |
| 09:43:29 | → | driib joins (~driib@vmi931078.contaboserver.net) |
| 09:44:46 | × | reki quits (~halloy490@broadband-5-228-80-43.ip.moscow.rt.ru) (Remote host closed the connection) |
| 09:47:40 | → | sawilagar joins (~sawilagar@user/sawilagar) |
| 09:48:10 | × | lortabac quits (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) (Ping timeout: 255 seconds) |
| 09:48:27 | → | cfricke joins (~cfricke@user/cfricke) |
| 09:54:53 | → | lortabac joins (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) |
| 09:57:05 | → | bgt32 joins (~keutoi@182.65.26.208) |
| 09:57:35 | × | flukiluke quits (~m-7humut@2603:c023:c000:6c7e:8945:ad24:9113:a962) (Remote host closed the connection) |
| 09:58:51 | → | flukiluke joins (~m-7humut@2603:c023:c000:6c7e:8945:ad24:9113:a962) |
| 10:01:16 | <bgt32> | I'm solving a competative programming problem and am having a hard time pinning down a bug. Everything works fine on my machine, and on other online compilers. It is giving a different answer on the actual site. |
| 10:01:33 | <bgt32> | https://codeforces.com/contest/1955/submission/256217090 |
| 10:04:26 | <bgt32> | on a different platform, https:tinyurl.com/yp79ye8u |
| 10:05:02 | × | yeitrafferin quits (~user@149.224.94.221.dynamic-pppoe.dt.ipv4.wtnet.de) (Remote host closed the connection) |
| 10:05:17 | <bgt32> | * https://tinyurl.com/yp79ye8u |
| 10:13:57 | → | zniftla joins (~user@p4fdbd1b1.dip0.t-ipconnect.de) |
| 10:19:28 | × | lortabac quits (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) (Ping timeout: 260 seconds) |
| 10:24:24 | <ncf> | wild guess: CRLF is messing with your (== '1') logic |
| 10:30:02 | <bgt32> | ncf: That's it! thanks. I never had a problem with CRLF before using ByteString. |
| 10:33:39 | × | euleritian quits (~euleritia@77.22.252.56) (Read error: Connection reset by peer) |
| 10:34:25 | → | euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
| 10:36:59 | → | Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915) |
| 10:37:46 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 268 seconds) |
| 10:38:21 | Lord_of_Life_ | is now known as Lord_of_Life |
| 10:44:27 | × | zniftla quits (~user@p4fdbd1b1.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 10:53:18 | → | ubert joins (~Thunderbi@2a02:8109:ab8a:5a00:dc48:221d:3f95:7ce6) |
| 10:53:33 | → | lortabac joins (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) |
| 11:05:18 | × | puke quits (~puke@user/puke) (Remote host closed the connection) |
| 11:05:42 | → | puke joins (~puke@user/puke) |
| 11:13:02 | → | noumenon joins (~noumenon@113.51-175-156.customer.lyse.net) |
| 11:14:11 | × | danse-nr3 quits (~danse-nr3@151.43.242.233) (Ping timeout: 256 seconds) |
| 11:16:59 | → | n8n joins (n8n@user/n8n) |
| 11:23:03 | → | danse-nr3 joins (~danse-nr3@151.43.242.233) |
| 11:28:29 | × | SteelBlueSilk quits (~SteelBlue@user/SteelBlueSilk) (Read error: Connection reset by peer) |
| 11:31:58 | → | SteelBlueSilk joins (~SteelBlue@c-98-42-249-36.hsd1.ca.comcast.net) |
| 11:31:58 | × | SteelBlueSilk quits (~SteelBlue@c-98-42-249-36.hsd1.ca.comcast.net) (Changing host) |
| 11:31:58 | → | SteelBlueSilk joins (~SteelBlue@user/SteelBlueSilk) |
| 11:35:27 | → | nickiminjaj joins (~kvirc@188.146.120.15) |
| 11:36:00 | × | nickiminjaj quits (~kvirc@188.146.120.15) (Changing host) |
| 11:36:00 | → | nickiminjaj joins (~kvirc@user/laxhh) |
| 11:36:38 | <cheater> | having problems installing pcre-light (with stack). what sort of linux lib do i need to install for it? it doesn't mention anything on the hackage docs. |
| 11:38:39 | <cheater> | i tried all the ones i could think of |
| 11:42:29 | <lyxia> | cheater: the doc says "If installation fails with missing pcre/pkg-config, try installing the libpcre3-dev package (linux)" https://hackage.haskell.org/package/pcre-light |
| 11:43:51 | × | anpad quits (~pandeyan@user/anpad) (Quit: ZNC 1.8.2 - https://znc.in) |
| 11:46:19 | → | anpad joins (~pandeyan@user/anpad) |
| 11:50:03 | × | sroso quits (~sroso@user/SrOso) (Quit: Leaving :)) |
| 11:54:27 | → | haocrcmt^ joins (~cd@c-98-242-74-66.hsd1.ga.comcast.net) |
| 11:55:57 | × | bgt32 quits (~keutoi@182.65.26.208) (Quit: leaving) |
| 12:00:10 | × | qqq quits (~qqq@92.43.167.61) (Remote host closed the connection) |
| 12:09:42 | → | machinedgod joins (~machinedg@d173-183-246-216.abhsia.telus.net) |
| 12:10:47 | × | ddellacosta quits (~ddellacos@ool-44c73d29.dyn.optonline.net) (Ping timeout: 260 seconds) |
| 12:15:08 | → | cheater_ joins (~Username@user/cheater) |
| 12:17:05 | × | cheater quits (~Username@user/cheater) (Ping timeout: 256 seconds) |
| 12:17:13 | cheater_ | is now known as cheater |
| 12:22:55 | × | danse-nr3 quits (~danse-nr3@151.43.242.233) (Ping timeout: 260 seconds) |
| 12:23:52 | → | raehik joins (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net) |
| 12:31:37 | → | danse-nr3 joins (~danse-nr3@151.43.242.233) |
| 12:34:11 | × | L29Ah quits (~L29Ah@wikipedia/L29Ah) (Ping timeout: 264 seconds) |
| 12:34:49 | → | L29Ah joins (~L29Ah@wikipedia/L29Ah) |
| 12:35:27 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 12:36:26 | <cheater> | lyxia: i have that installed |
| 12:37:03 | → | bgt32 joins (~keutoi@182.65.26.208) |
| 12:37:05 | <cheater> | libpcre3-dev is already the newest version (2:8.39-13ubuntu0.22.04.1). |
| 12:37:09 | → | alexherbo2 joins (~alexherbo@2a02-8440-3440-0c06-f91a-c702-40ff-7bd4.rev.sfr.net) |
| 12:37:52 | <cheater> | it's a fresh install. i installed it a couple hours ago. |
| 12:41:27 | → | Square2 joins (~Square4@user/square) |
| 12:41:34 | × | Hafydd quits (~Hafydd@user/hafydd) (Quit: WeeChat 3.5) |
| 12:42:57 | <bgt32> | Are mutable arrays better during initial construction, than a simple Data.Array? I have some data that will only be read after initial construction, will mutable arrays provide any speed up? |
| 12:43:52 | <cheater> | the only answer is "benchmark in production" |
| 12:45:27 | <bgt32> | Hmm, so no simple answer... |
| 12:45:29 | <nullie> | bgt32: where's no fundamental reason why mutable array should be faster if you do not change it |
| 12:50:38 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 12:51:14 | × | causal quits (~eric@50.35.88.207) (Quit: WeeChat 4.1.1) |
| 12:53:53 | × | destituion quits (~destituio@85.221.111.174) (Ping timeout: 252 seconds) |
| 12:55:10 | × | nickiminjaj quits (~kvirc@user/laxhh) (Quit: KVIrc 5.2.2 Quasar http://www.kvirc.net/) |
| 12:55:25 | → | nickiminjaj joins (~kvirc@188.146.120.15) |
| 12:55:25 | × | nickiminjaj quits (~kvirc@188.146.120.15) (Changing host) |
| 12:55:25 | → | nickiminjaj joins (~kvirc@user/laxhh) |
| 12:57:14 | × | nickiminjaj quits (~kvirc@user/laxhh) (Client Quit) |
| 12:58:08 | → | destituion joins (~destituio@2a02:2121:107:22da:94a0:4297:56fa:10c9) |
| 13:02:32 | × | alexherbo2 quits (~alexherbo@2a02-8440-3440-0c06-f91a-c702-40ff-7bd4.rev.sfr.net) (Remote host closed the connection) |
| 13:03:43 | → | cross joins (~cross@spitfire.i.gajendra.net) |
| 13:07:21 | × | sawilagar quits (~sawilagar@user/sawilagar) (Remote host closed the connection) |
| 13:07:40 | → | sawilagar joins (~sawilagar@user/sawilagar) |
| 13:09:35 | × | danse-nr3 quits (~danse-nr3@151.43.242.233) (Ping timeout: 260 seconds) |
| 13:10:07 | → | danse-nr3 joins (~danse-nr3@151.35.220.15) |
| 13:11:28 | → | xdminsy joins (~xdminsy@117.147.70.203) |
| 13:12:37 | × | euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 256 seconds) |
| 13:13:51 | → | euleritian joins (~euleritia@dynamic-176-006-181-023.176.6.pool.telefonica.de) |
| 13:17:52 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 13:18:58 | → | simendsjo joins (~user@84.209.170.3) |
| 13:24:05 | × | sawilagar quits (~sawilagar@user/sawilagar) (Ping timeout: 256 seconds) |
| 13:27:44 | → | sawilagar joins (~sawilagar@user/sawilagar) |
| 13:36:20 | × | mei quits (~mei@user/mei) (Remote host closed the connection) |
| 13:38:57 | → | mei joins (~mei@user/mei) |
| 13:57:23 | × | sawilagar quits (~sawilagar@user/sawilagar) (Read error: Connection reset by peer) |
| 13:58:40 | → | sawilagar joins (~sawilagar@user/sawilagar) |
| 14:00:38 | × | vnogueira quits (~vnogueira@user/vnogueira) (Remote host closed the connection) |
| 14:01:00 | → | vnogueira joins (~vnogueira@user/vnogueira) |
| 14:17:02 | → | ft joins (~ft@p4fc2a20e.dip0.t-ipconnect.de) |
| 14:20:17 | × | lortabac quits (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) (Quit: WeeChat 4.1.1) |
| 14:24:06 | × | jorj quits (~jorj@user/jorj) (Quit: jorj) |
| 14:26:48 | → | qqq joins (~qqq@92.43.167.61) |
| 14:31:17 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 14:33:56 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 14:39:47 | × | euleritian quits (~euleritia@dynamic-176-006-181-023.176.6.pool.telefonica.de) (Read error: Connection reset by peer) |
| 14:40:26 | → | euleritian joins (~euleritia@77.22.252.56) |
| 14:42:03 | → | gehmehgeh joins (~user@user/gehmehgeh) |
| 14:50:11 | × | igemnace quits (~ian@user/igemnace) (Read error: Connection reset by peer) |
| 14:56:54 | × | cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 4.2.2) |
| 15:06:49 | → | igemnace joins (~ian@user/igemnace) |
| 15:07:11 | × | euleritian quits (~euleritia@77.22.252.56) (Ping timeout: 264 seconds) |
| 15:07:39 | → | euleritian joins (~euleritia@dynamic-176-006-181-023.176.6.pool.telefonica.de) |
| 15:14:51 | <cheater> | what's the simplest way to turn a Text into a lazy BS? |
| 15:15:44 | <Rembane> | cheater: Have you tried asking Hoogle? Text -> Lazy.ByteString |
| 15:16:21 | <cheater> | oh i didn't know you could qualify like that |
| 15:16:23 | <cheater> | thanks |
| 15:16:30 | → | rekahsoft joins (~rekahsoft@bras-base-orllon1103w-grc-13-184-148-6-204.dsl.bell.ca) |
| 15:16:51 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 15:16:57 | <cheater> | ok erll |
| 15:17:01 | <cheater> | that's not what i wanted |
| 15:17:10 | <cheater> | i get Data.Text.Lezy.Encoding.encodeUtf8 |
| 15:17:15 | <cheater> | but my Text is not lazy |
| 15:17:18 | <cheater> | my BS is lazy |
| 15:17:19 | × | euleritian quits (~euleritia@dynamic-176-006-181-023.176.6.pool.telefonica.de) (Read error: Connection reset by peer) |
| 15:18:40 | × | simendsjo quits (~user@84.209.170.3) (Ping timeout: 268 seconds) |
| 15:19:02 | <Rembane> | cheater: Does this one do what you want? https://hackage.haskell.org/package/text-2.1.1/docs/Data-Text-Encoding.html#v:encodeUtf8 |
| 15:19:17 | <Rembane> | Hm... no, not really. A Lazy is missing. |
| 15:19:45 | <cheater> | yeah it's apparently going to be encodeUtf8 . fromStrict |
| 15:19:47 | <cheater> | no shorter |
| 15:20:12 | <Rembane> | That seems reasonable. |
| 15:20:59 | → | euleritian joins (~euleritia@tmo-118-99.customers.d1-online.com) |
| 15:21:02 | <c_wraith> | It's not going to work how you want, either way |
| 15:21:23 | <c_wraith> | Unless you take the steps to explicitly chunk the Text |
| 15:22:15 | <c_wraith> | If you don't, it's going to give you a lazy text with a single chunk, and it'll convert that to a lazy bytestring with a single chunk. |
| 15:23:52 | × | ubert quits (~Thunderbi@2a02:8109:ab8a:5a00:dc48:221d:3f95:7ce6) (Remote host closed the connection) |
| 15:24:03 | <Rembane> | cheater: Out of curiosity. Why do you need a lazy bytestring? |
| 15:24:17 | <cheater> | trying to decode with aeson |
| 15:24:38 | <cheater> | i have a json that i decoded with aeson. it contains a string field. that string field contains an escaped json. |
| 15:24:51 | <cheater> | i need to decode *that* and get a field out of it. |
| 15:25:06 | <cheater> | so, when i look up the field in the outer json, aeson gives me a Text. |
| 15:25:15 | <cheater> | but to use Aeson.decode, i need an LBS |
| 15:25:40 | → | tri joins (~tri@ool-18bc2e74.dyn.optonline.net) |
| 15:25:43 | <c_wraith> | I don't know why aeson is using lazy bytestrings for input in the first place... It's not like it's an online parser. It needs to consume the whole thing to identify decoding errors. |
| 15:25:52 | × | ChaiTRex quits (~ChaiTRex@user/chaitrex) (Remote host closed the connection) |
| 15:26:20 | <c_wraith> | I guess it's more memory-efficient if your data type throws away a lot of the content, or something. |
| 15:27:27 | <cheater> | shruggity mcshrug |
| 15:32:19 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 15:40:05 | × | vpan quits (~vpan@212.117.1.172) (Quit: Leaving.) |
| 15:47:34 | <monochrom> | Yeah most cases throw away the whole bytestring, e.g., converting to Text instead at least. |
| 15:48:15 | <c_wraith> | ok, this turns out to be really funny with lens-aeson |
| 15:49:13 | <c_wraith> | which lambdabot doesn't have installed, so I guess c/p |
| 15:49:31 | <c_wraith> | ("{\"foo\":\"{\\\"bar\\\":2}\"}" :: Text) ^? key "foo" . _String . key "ba |
| 15:49:31 | <c_wraith> | r" . _IntegerJust 2 |
| 15:49:37 | <c_wraith> | ... good work, me. |
| 15:49:49 | <monochrom> | It was also coming from the last days when people used lazy bytestring's readFile. |
| 15:49:55 | <c_wraith> | ("{\"foo\":\"{\\\"bar\\\":2}\"}" :: Text) ^? key "foo" . _String . key "bar" . Integer ---> Just 2 |
| 15:50:08 | <monochrom> | (Well, I still use it today.) |
| 15:50:42 | <c_wraith> | lens-aeson just lets you treat either text or either bytestring as json data. |
| 15:51:01 | <c_wraith> | So, like.. just index into a string by key, it'll work! |
| 15:51:39 | <monochrom> | haha that is deep magic |
| 15:53:07 | <ncf> | ("{\"foo\":\"{\\\"bar\\\":2}\"}" :: Text) & key "foo" . _String . key "bar" . _Integer +~ 1 |
| 15:53:08 | <ncf> | "{\"foo\":\"{\\\"bar\\\":3}\"}" |
| 15:53:49 | <c_wraith> | You know. For when you want to modify a string as if it's nested JSON |
| 15:55:25 | <monochrom> | Python and TCL dream come true. |
| 15:56:15 | × | chele quits (~chele@user/chele) (Remote host closed the connection) |
| 15:58:30 | × | euleritian quits (~euleritia@tmo-118-99.customers.d1-online.com) (Ping timeout: 255 seconds) |
| 15:59:15 | → | euleritian joins (~euleritia@dynamic-176-004-207-187.176.4.pool.telefonica.de) |
| 16:01:49 | → | Guest93 joins (~Guest99@84.54.73.75) |
| 16:01:58 | → | Hafydd joins (~Hafydd@user/hafydd) |
| 16:02:04 | × | Guest93 quits (~Guest99@84.54.73.75) (Client Quit) |
| 16:02:20 | → | Guest48 joins (~Guest99@84.54.73.75) |
| 16:02:42 | × | Guest48 quits (~Guest99@84.54.73.75) (Client Quit) |
| 16:03:17 | × | danse-nr3 quits (~danse-nr3@151.35.220.15) (Ping timeout: 240 seconds) |
| 16:03:54 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 16:04:12 | × | raehik quits (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net) (Ping timeout: 252 seconds) |
| 16:08:21 | → | waleee joins (~waleee@h-176-10-144-38.NA.cust.bahnhof.se) |
| 16:13:44 | → | vnogueira_ joins (~vnogueira@user/vnogueira) |
| 16:15:21 | <cheater> | > ("{\"foo\":\"{\\\"bar\\\":2}\"}" :: Text) ^? key "foo" . _String . key "bar" . Integer |
| 16:15:23 | <lambdabot> | error: |
| 16:15:23 | <lambdabot> | Not in scope: type constructor or class ‘Text’ |
| 16:15:23 | <lambdabot> | Perhaps you meant ‘T.Text’ (imported from Data.Text) |
| 16:15:32 | <cheater> | > ("{\"foo\":\"{\\\"bar\\\":2}\"}" :: T.Text) ^? key "foo" . _String . key "bar" . Integer |
| 16:15:37 | <lambdabot> | error: |
| 16:15:37 | <lambdabot> | • Variable not in scope: |
| 16:15:37 | <lambdabot> | key :: [Char] -> b0 -> T.Text -> Const (First a) T.Text |
| 16:15:53 | <cheater> | lmao... |
| 16:16:29 | <cheater> | c_wraith: wow i didn't even know. |
| 16:16:29 | <c_wraith> | I did mention lambdabot doesn't have lens-aeson installed. Can't even import it. |
| 16:16:32 | <cheater> | that makes it easier btw |
| 16:16:38 | <cheater> | you did? |
| 16:16:40 | <cheater> | i missed it |
| 16:16:44 | <cheater> | in all the lens spam |
| 16:16:50 | × | vnogueira quits (~vnogueira@user/vnogueira) (Ping timeout: 260 seconds) |
| 16:16:50 | <cheater> | not a fan of lens myself |
| 16:17:03 | <cheater> | oh yeah you did say that |
| 16:17:04 | <cheater> | cool |
| 16:20:09 | <cheater> | what do you call a directed graph where you can color the nodes one of n colors? |
| 16:20:34 | <cheater> | speicifcally if the nodes all start white and you're allowed to color one node at a time black, then that's a finite state machine |
| 16:22:20 | <cheater> | but i'm looking for more than two colors (probably like 3-4: true, false and not allowed to becomne true, false but allowed to become true) |
| 16:23:01 | <cheater> | and i want more than one state at a time (e.g. i want to start in state A and i want to be able to reach state Z using one of multiple paths that exist in the directed graph) |
| 16:23:21 | <ncf> | i don't understand |
| 16:23:27 | <cheater> | me either. |
| 16:23:31 | <cheater> | but what do you not understand? |
| 16:23:41 | <ncf> | your description of a finite state machine |
| 16:23:48 | <ncf> | what are the states? |
| 16:25:02 | <cheater> | a finite state machine is a collection of states, call them A...Z, and allowed transitions between those states, call them t1...tn |
| 16:25:36 | <cheater> | you have an initial state that is colored black. let's say the node called A is the initial state, and is colored black. |
| 16:25:39 | <cheater> | all other nodes are white. |
| 16:26:00 | <cheater> | as you transition from A to one of the other allowed states, A becomes white and the other new state becomes black |
| 16:26:07 | <cheater> | so you have: |
| 16:26:12 | <cheater> | - 2 colors (black and white) |
| 16:26:23 | × | machinedgod quits (~machinedg@d173-183-246-216.abhsia.telus.net) (Ping timeout: 264 seconds) |
| 16:26:43 | <cheater> | - exactly one node must be colored black at any time (no more, no less) |
| 16:26:53 | <cheater> | does that make sense? |
| 16:26:59 | <cheater> | that's a finite state machine. |
| 16:27:09 | <cheater> | think of like |
| 16:27:14 | <cheater> | a stick gear shifter |
| 16:27:24 | <cheater> | you can transition from some positions to some others |
| 16:27:32 | <cheater> | where the stick is, is a black node |
| 16:27:37 | <cheater> | where the stick isn't, is a white node |
| 16:27:44 | <sm> | morning all |
| 16:27:47 | <cheater> | that's an FSM |
| 16:27:58 | <sm> | solved your pcre-light install cheater ? |
| 16:28:02 | <cheater> | no |
| 16:28:19 | <sm> | want to share the error output ? |
| 16:28:23 | <cheater> | sure |
| 16:28:53 | <ncf> | so that's a FSM on a one-letter alphabet, yes? |
| 16:29:07 | <ncf> | i mean, what you're describing is just a directed graph |
| 16:29:16 | <cheater> | yes |
| 16:29:31 | <cheater> | well |
| 16:29:36 | <dolio> | Except graphs don't even have to be finite. |
| 16:29:36 | <cheater> | idk what you mean by one-letter alphabet |
| 16:29:39 | <ncf> | finite* directed graph with a chosen initial state i guess |
| 16:29:55 | <cheater> | sm: ok i actually noticed... The program 'pkg-config' version pcre-light > >=0.9.0 is required but it could not be found. |
| 16:29:56 | <cheater> | duh |
| 16:30:02 | <cheater> | so i need to figure out how to get that |
| 16:30:12 | <haskellbridge> | <sm> 👍️ |
| 16:30:18 | <cheater> | The program 'pkg-config' version >=0.9.0 is required but it could not be found. |
| 16:30:23 | <cheater> | that's the actual error |
| 16:30:55 | <ncf> | well an FSM is an automaton that recognises words from some language by applying transitions for each letter of the word from an initial state |
| 16:31:40 | <ncf> | if all your transitions are treated on an equal footing then i guess your alphabet is a singleton, so you're effectively recognising numbers instead of words |
| 16:31:46 | <cheater> | sm: so someone told me that "stack setup" might install pkg-config, can you corroborate? |
| 16:32:16 | <geekosaur> | only on windows if it installs an msys2 environment |
| 16:32:17 | <cheater> | ncf: i didn't understand anything you said there |
| 16:32:21 | <cheater> | geekosaur: ah |
| 16:32:28 | <geekosaur> | otherwise it's an OS package you need to install |
| 16:32:34 | <cheater> | geekosaur: i'm on GNU/Linux |
| 16:32:39 | <cheater> | cool |
| 16:32:42 | <sm> | geekosaur knows all! :) |
| 16:33:07 | <geekosaur> | on my ubuntu it's the pkg-config package |
| 16:33:14 | <sm> | googling for that error message is also often helpful |
| 16:33:22 | <cheater> | sweet tyvm |
| 16:33:24 | <cheater> | i did google it! |
| 16:33:28 | <sm> | s/googling/kagi-ing/ |
| 16:33:31 | <cheater> | i was reading through that stuff from top to bottom |
| 16:33:35 | <ncf> | cheater: https://en.wikipedia.org/wiki/Finite-state_machine#Mathematical_model |
| 16:34:21 | <sm> | cheater bad luck I guess.. for me the first google hit was https://groups.google.com/g/haskell-stack/c/E6zGmRnT3Ls which gave geekosaur's answer |
| 16:34:32 | <cheater> | lol |
| 16:35:10 | <cheater> | i'm reading that too |
| 16:35:11 | <cheater> | and |
| 16:35:15 | <cheater> | i didn't see it. |
| 16:35:49 | <sm> | I'm talking about the first answer https://groups.google.com/g/haskell-stack/c/E6zGmRnT3Ls/m/SksReP9RBwAJ |
| 16:36:07 | <sm> | it's not the final answer you are seeking, you still need to do a bit more work |
| 16:36:17 | <cheater> | ah, yes, i just saw it too |
| 16:36:21 | <cheater> | my eyes glanced over it |
| 16:36:39 | sm | doesn't need to install pkg-config often & doesn't remember the deal with it |
| 16:36:41 | <cheater> | love to be made blind by my own stupidity |
| 16:36:51 | <sm> | it's human :) |
| 16:36:57 | <cheater> | :) |
| 16:40:59 | × | sord937 quits (~sord937@gateway/tor-sasl/sord937) (Quit: sord937) |
| 16:41:43 | × | bgt32 quits (~keutoi@182.65.26.208) (Ping timeout: 255 seconds) |
| 16:41:59 | → | tzh joins (~tzh@c-73-164-206-160.hsd1.or.comcast.net) |
| 16:45:17 | → | peterbecich joins (~Thunderbi@47.229.123.186) |
| 16:46:40 | → | mikoto joins (~mikoto@ip-83-134-169-166.dsl.scarlet.be) |
| 16:47:47 | × | euleritian quits (~euleritia@dynamic-176-004-207-187.176.4.pool.telefonica.de) (Read error: Connection reset by peer) |
| 16:48:00 | → | euleritian joins (~euleritia@tmo-118-99.customers.d1-online.com) |
| 16:49:01 | → | raehik joins (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net) |
| 16:52:23 | × | peterbecich quits (~Thunderbi@47.229.123.186) (Ping timeout: 272 seconds) |
| 16:53:01 | × | euleritian quits (~euleritia@tmo-118-99.customers.d1-online.com) (Ping timeout: 272 seconds) |
| 16:53:17 | → | euleritian joins (~euleritia@dynamic-176-004-207-187.176.4.pool.telefonica.de) |
| 16:55:12 | × | mikoto quits (~mikoto@ip-83-134-169-166.dsl.scarlet.be) (Quit: WeeChat 4.0.4) |
| 17:01:30 | × | EvanR quits (~EvanR@user/evanr) (Quit: Leaving) |
| 17:02:25 | → | ChaiTRex joins (~ChaiTRex@user/chaitrex) |
| 17:10:17 | × | euleritian quits (~euleritia@dynamic-176-004-207-187.176.4.pool.telefonica.de) (Read error: Connection reset by peer) |
| 17:10:26 | → | yeitrafferin joins (~user@2a04:4540:7212:e100:ffdb:291e:88d:8f3a) |
| 17:10:36 | → | euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
| 17:20:23 | × | puke quits (~puke@user/puke) (Remote host closed the connection) |
| 17:21:33 | × | xdminsy quits (~xdminsy@117.147.70.203) (Read error: Connection reset by peer) |
| 17:22:34 | × | vulpine quits (xfnw@user/meow/xfnw) (Quit: Connection reset by purr) |
| 17:24:13 | → | vulpine joins (xfnw@user/meow/xfnw) |
| 17:27:49 | → | puke joins (~puke@user/puke) |
| 17:28:06 | gehmehgeh | is now known as gmg |
| 17:33:01 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 17:43:43 | × | hueso quits (~root@user/hueso) (Quit: No Ping reply in 180 seconds.) |
| 17:44:54 | → | hueso joins (~root@user/hueso) |
| 17:45:11 | × | igemnace quits (~ian@user/igemnace) (Quit: WeeChat 4.2.2) |
| 17:45:29 | → | __monty__ joins (~toonn@user/toonn) |
| 17:47:47 | → | EvanR joins (~EvanR@user/evanr) |
| 17:50:29 | × | Square2 quits (~Square4@user/square) (Ping timeout: 240 seconds) |
| 17:55:23 | × | puke quits (~puke@user/puke) (Remote host closed the connection) |
| 18:01:47 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 18:02:18 | → | puke joins (~puke@user/puke) |
| 18:26:29 | × | sudden quits (~cat@user/sudden) (Ping timeout: 240 seconds) |
| 18:39:25 | → | sudden joins (~cat@user/sudden) |
| 18:44:01 | × | haocrcmt^ quits (~cd@c-98-242-74-66.hsd1.ga.comcast.net) (Ping timeout: 268 seconds) |
| 18:44:16 | → | haocrcmt^ joins (~cd@c-98-242-74-66.hsd1.ga.comcast.net) |
| 19:01:32 | → | philopsos joins (~caecilius@user/philopsos) |
| 19:09:00 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 19:11:39 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 19:17:07 | × | michalz quits (~michalz@185.246.207.218) (Ping timeout: 256 seconds) |
| 19:25:00 | × | raehik quits (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net) (Ping timeout: 260 seconds) |
| 19:30:29 | × | yeitrafferin quits (~user@2a04:4540:7212:e100:ffdb:291e:88d:8f3a) (Quit: Leaving) |
| 19:44:36 | → | econo_ joins (uid147250@id-147250.tinside.irccloud.com) |
| 19:45:30 | × | Hafydd quits (~Hafydd@user/hafydd) (Quit: WeeChat 3.5) |
| 19:45:55 | → | Hafydd joins (~Hafydd@user/hafydd) |
| 19:46:12 | × | tri quits (~tri@ool-18bc2e74.dyn.optonline.net) (Remote host closed the connection) |
| 19:46:44 | → | tri joins (~tri@ool-18bc2e74.dyn.optonline.net) |
| 19:47:40 | → | michalz joins (~michalz@185.246.207.215) |
| 19:49:54 | → | Square joins (~Square@user/square) |
| 20:07:19 | × | _ht quits (~Thunderbi@28-52-174-82.ftth.glasoperator.nl) (Remote host closed the connection) |
| 20:14:40 | → | akegalj joins (~akegalj@85.114.55.14) |
| 20:15:53 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Read error: Connection reset by peer) |
| 20:15:56 | <akegalj> | If I have `newtype F = F Int` how can I derive Show instance that would be the same as for Int (without printing constructor name) |
| 20:16:02 | → | Achylles joins (~Achylles@45.182.57.23) |
| 20:16:30 | <akegalj> | can I autoderive it somehow without manually implementing Show class |
| 20:16:52 | <tomsmeding> | akegalj: https://downloads.haskell.org/ghc/latest/docs/users_guide/exts/deriving_via.html#extension-DerivingVia |
| 20:17:08 | <tomsmeding> | `deriving Show via Int` |
| 20:18:13 | × | euphores quits (~SASL_euph@user/euphores) (Ping timeout: 272 seconds) |
| 20:19:41 | <geekosaur> | note however that this is not recommended, since a Show instance should match a Read instance |
| 20:20:16 | <tomsmeding> | and even if you're not interested in Read: Show instances are meant for _debugging_ and showing data structures _as they are_ |
| 20:20:33 | <tomsmeding> | Show is not meant for pretty-printing (notwithstanding the fact that some people use it like that) |
| 20:21:04 | <tomsmeding> | the reason for that is not that Show is unsuited for it (the class works decently well for basic pretty printing), but that there is only one Show! |
| 20:21:29 | <tomsmeding> | i.e. if you've written pretty Show instances and you now want to debug your programs, you have no derived Show anymore to see how your data actually looks |
| 20:21:34 | <tomsmeding> | (how do you debug your pretty printer?) |
| 20:21:58 | <monochrom> | This is where Rust has two type classes instead of one. |
| 20:22:22 | tomsmeding | wants that in haskell too |
| 20:22:50 | <tomsmeding> | python has it too, even if in the (untyped) OOP way instead of using type classes (repr() vs str()) |
| 20:22:59 | <akegalj> | tomsmeding: I can't use `deriving via` with data, only for newtypes? |
| 20:23:09 | <monochrom> | I think that even two is not enough. There are like 5 standard ways to print a natural number. |
| 20:23:53 | <tomsmeding> | akegalj: `deriving via` only works if the data type itself, and the "via" target, can be coerced to each other |
| 20:23:57 | <akegalj> | what should I use then for pretty printing ? |
| 20:24:06 | <tomsmeding> | (if you're interested, read the link I posted) |
| 20:24:09 | × | tri quits (~tri@ool-18bc2e74.dyn.optonline.net) (Remote host closed the connection) |
| 20:24:15 | <akegalj> | ok thny |
| 20:24:18 | <akegalj> | thnx |
| 20:24:22 | → | tri joins (~tri@ool-18bc2e74.dyn.optonline.net) |
| 20:24:58 | <tomsmeding> | I usually just make my own Pretty class (class Pretty a where { prettysPrec :: Int -> a -> ShowS } ; pretty :: a -> String ; pretty x = prettysPrec 0 x "") |
| 20:25:09 | <tomsmeding> | but there may be something on hackage already |
| 20:26:37 | <EvanR> | ironically, there is only one Show is the reason I sometimes did quick and dirty newtype F = F Whatever to quickly "show" a different representation |
| 20:26:49 | × | sawilagar quits (~sawilagar@user/sawilagar) (Ping timeout: 256 seconds) |
| 20:27:17 | <EvanR> | > x -- shows one thing |
| 20:27:18 | <lambdabot> | x |
| 20:27:20 | <EvanR> | > F x -- shows another |
| 20:27:22 | <lambdabot> | error: |
| 20:27:22 | <lambdabot> | Data constructor not in scope: F :: Expr -> t |
| 20:27:23 | <EvanR> | uhg |
| 20:27:49 | × | michalz quits (~michalz@185.246.207.215) (Quit: ZNC 1.8.2 - https://znc.in) |
| 20:27:50 | <tomsmeding> | prefix it with a color-reset byte (ctrl-C, O in weechat) |
| 20:27:57 | <tomsmeding> | > lambdabot be silent |
| 20:38:19 | <mauke> | use /notice >:) |
| 20:42:26 | <c_wraith> | that sounds like effort. I'm more likely to use /oblivious |
| 20:43:11 | <monochrom> | I have a binary search tree library for teaching purpose, and I gave it multiple output formats: a parenthesized infix notation, a vertical format, Java code, two LaTeX codes (tikz, forest). I made none of them Show, I just made one function for each. |
| 20:44:39 | <tomsmeding> | monochrom: but does the tree data type have a normal, derived Show instance? |
| 20:44:51 | <monochrom> | Yes. |
| 20:44:59 | <tomsmeding> | Perfect! |
| 20:45:08 | <monochrom> | But I seldom use it. |
| 20:46:05 | <tomsmeding> | that is mostly immaterial :) |
| 21:05:31 | × | Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 21:13:51 | × | AlexZenon quits (~alzenon@178.34.160.182) (Ping timeout: 256 seconds) |
| 21:15:11 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
| 21:17:26 | → | machinedgod joins (~machinedg@d173-183-246-216.abhsia.telus.net) |
| 21:26:24 | → | zetef joins (~quassel@2a02:2f00:5005:3f00:7daa:3f05:c1bf:3242) |
| 21:29:32 | → | AlexZenon joins (~alzenon@178.34.160.182) |
| 21:32:09 | × | phma quits (phma@2001:5b0:2172:a338:b304:4663:8d39:5294) (Read error: Connection reset by peer) |
| 21:32:20 | → | zetef_ joins (~quassel@86.121.125.131) |
| 21:32:43 | → | phma joins (~phma@host-67-44-208-158.hnremote.net) |
| 21:34:29 | × | zetef quits (~quassel@2a02:2f00:5005:3f00:7daa:3f05:c1bf:3242) (Ping timeout: 240 seconds) |
| 21:36:40 | × | akegalj quits (~akegalj@85.114.55.14) (Quit: leaving) |
| 21:37:47 | × | tri quits (~tri@ool-18bc2e74.dyn.optonline.net) (Remote host closed the connection) |
| 21:38:19 | → | tri joins (~tri@ool-18bc2e74.dyn.optonline.net) |
| 21:38:56 | × | AlexZenon quits (~alzenon@178.34.160.182) (Ping timeout: 260 seconds) |
| 21:40:48 | × | n8n quits (n8n@user/n8n) (Quit: WeeChat 4.2.2) |
| 21:43:16 | → | AlexZenon joins (~alzenon@178.34.160.182) |
| 21:50:33 | × | zetef_ quits (~quassel@86.121.125.131) (Ping timeout: 268 seconds) |
| 21:53:04 | × | target_i quits (~target_i@user/target-i/x-6023099) (Quit: leaving) |
| 22:01:26 | × | mei quits (~mei@user/mei) (Remote host closed the connection) |
| 22:03:51 | → | mei joins (~mei@user/mei) |
| 22:06:58 | → | zetef joins (~quassel@86.120.162.55) |
| 22:09:51 | × | __monty__ quits (~toonn@user/toonn) (Quit: leaving) |
| 22:12:08 | × | zetef quits (~quassel@86.120.162.55) (Ping timeout: 256 seconds) |
| 22:12:09 | → | zetef_ joins (~quassel@2a02:2f00:5005:3f00:c1ca:7962:6d96:31ff) |
| 22:17:41 | × | zetef_ quits (~quassel@2a02:2f00:5005:3f00:c1ca:7962:6d96:31ff) (Ping timeout: 240 seconds) |
| 22:18:18 | → | zetef joins (~quassel@86.120.162.55) |
| 22:20:04 | × | mud quits (~mud@user/kadoban) (Quit: quit) |
| 22:28:41 | × | down200 quits (~down200@shell.lug.mtu.edu) (Ping timeout: 272 seconds) |
| 22:29:31 | → | down200 joins (~down200@lug.mtu.edu) |
| 22:31:32 | → | sawilagar joins (~sawilagar@user/sawilagar) |
| 22:36:21 | × | down200 quits (~down200@lug.mtu.edu) (Ping timeout: 252 seconds) |
| 22:37:58 | → | down200 joins (~down200@shell.lug.mtu.edu) |
| 22:42:36 | × | zetef quits (~quassel@86.120.162.55) (Ping timeout: 255 seconds) |
| 22:42:58 | → | zetef joins (~quassel@2a02:2f00:5005:3f00:c1ca:7962:6d96:31ff) |
| 22:43:41 | → | n8n joins (n8n@user/n8n) |
| 22:49:10 | → | peterbecich joins (~Thunderbi@47.229.123.186) |
| 22:57:54 | × | gmg quits (~user@user/gehmehgeh) (Quit: Leaving) |
| 22:58:47 | × | peterbecich quits (~Thunderbi@47.229.123.186) (Ping timeout: 264 seconds) |
| 23:02:09 | → | zetef_ joins (~quassel@86.120.162.55) |
| 23:02:28 | × | zetef quits (~quassel@2a02:2f00:5005:3f00:c1ca:7962:6d96:31ff) (Ping timeout: 260 seconds) |
| 23:09:52 | → | raehik joins (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net) |
| 23:10:30 | × | zetef_ quits (~quassel@86.120.162.55) (Ping timeout: 255 seconds) |
| 23:10:48 | → | zetef joins (~quassel@2a02:2f00:5005:3f00:c1ca:7962:6d96:31ff) |
| 23:19:24 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 23:22:38 | → | Tuplanolla joins (~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) |
| 23:23:22 | × | dcoutts quits (~duncan@cpc69400-oxfd27-2-0-cust750.4-3.cable.virginm.net) (Ping timeout: 268 seconds) |
| 23:25:53 | × | rekahsoft quits (~rekahsoft@bras-base-orllon1103w-grc-13-184-148-6-204.dsl.bell.ca) (Ping timeout: 256 seconds) |
| 23:35:39 | → | nft_slut joins (~user@50-110-173-136.mrbg.wv.frontiernet.net) |
| 23:37:23 | → | sroso joins (~sroso@user/SrOso) |
| 23:43:11 | ← | nft_slut parts (~user@50-110-173-136.mrbg.wv.frontiernet.net) (ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.3)) |
| 23:47:15 | × | son0p quits (~ff@167.0.178.102) (Quit: Leaving) |
| 23:49:01 | × | zetef quits (~quassel@2a02:2f00:5005:3f00:c1ca:7962:6d96:31ff) (Remote host closed the connection) |
| 23:55:28 | → | nft_slut joins (~slut@50-110-173-136.mrbg.wv.frontiernet.net) |
| 23:59:09 | × | nft_slut quits (~slut@50-110-173-136.mrbg.wv.frontiernet.net) (Remote host closed the connection) |
All times are in UTC on 2024-04-12.