Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→
Page 1 .. 292 293 294 295 296 297 298 299 300 301 302 .. 5022
502,152 events total
2020-09-29 13:51:08 <dminuoso> % coerce (pure [Product 5, Product 6] :: IO [Product Integer]) :: IO [Integer]
2020-09-29 13:51:08 <yahb> dminuoso: [5,6]
2020-09-29 13:51:19 <dminuoso> merijn: I see. Somehow I didnt realize I could coerce through IO. :)
2020-09-29 13:51:42 <kw> Is there any efficiency advantage in GHC to using list literal syntax?
2020-09-29 13:51:59 <merijn> No
2020-09-29 13:52:06 <dminuoso> kw: list literals are just syntax sugar around :
2020-09-29 13:52:24 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 258 seconds)
2020-09-29 13:52:58 <kw> That's a relief. I remember reading somewhere that GHC would compile literal lists to arrays.
2020-09-29 13:52:58 × jedws quits (~jedws@121.209.139.222) (Read error: Connection reset by peer)
2020-09-29 13:53:06 dhil joins (~dhil@11.29.39.217.dyn.plus.net)
2020-09-29 13:53:29 <int-e> There's some special treatment of string literals.
2020-09-29 13:53:34 jedws joins (~jedws@121.209.139.222)
2020-09-29 13:54:29 <kw> Oh, maybe that was it. I'm not using strings, so I guess it doesn't matter.
2020-09-29 13:55:07 machinedgod joins (~machinedg@d67-193-126-196.home3.cgocable.net)
2020-09-29 13:55:12 <kw> Thanks everyone.
2020-09-29 13:55:27 × wimpunk1 quits (~wimpunk@185.189.112.19) (Ping timeout: 240 seconds)
2020-09-29 13:55:40 <merijn> kw: IF ghc did that, there's no reason why it couldn't to the exact same thing for lists written using :, though
2020-09-29 13:56:47 <kw> I know, I shouldn't doubt GHC's intelligence. Was just imagining that it might be something special that applies only to the sugar.
2020-09-29 13:58:03 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-09-29 13:59:23 × Unhammer quits (~Unhammer@gateway/tor-sasl/unhammer) (Ping timeout: 240 seconds)
2020-09-29 13:59:57 hackage jose 0.8.4 - Javascript Object Signing and Encryption and JSON Web Token library https://hackage.haskell.org/package/jose-0.8.4 (frasertweedale)
2020-09-29 14:00:03 Unhammer joins (~Unhammer@gateway/tor-sasl/unhammer)
2020-09-29 14:01:14 AlterEgo- joins (~ladew@124-198-158-163.dynamic.caiway.nl)
2020-09-29 14:02:25 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds)
2020-09-29 14:03:46 Sgeo joins (~Sgeo@ool-18b982ad.dyn.optonline.net)
2020-09-29 14:08:20 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-09-29 14:08:31 fweht joins (uid404746@gateway/web/irccloud.com/x-otdjghlxzvvxjpbo)
2020-09-29 14:12:43 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 258 seconds)
2020-09-29 14:12:45 shatriff joins (~vitaliish@176.52.219.10)
2020-09-29 14:13:14 × luke_ quits (~luke@bitnomial/staff/luke) (Quit: sleep)
2020-09-29 14:13:31 son0p joins (~son0p@181.136.122.143)
2020-09-29 14:13:34 cpressey joins (~cpressey@79-72-202-166.dynamic.dsl.as9105.com)
2020-09-29 14:14:13 × alp quits (~alp@2a01:e0a:58b:4920:1846:e8b6:c010:c9fe) (Ping timeout: 272 seconds)
2020-09-29 14:14:58 justsomeguy joins (~justsomeg@unaffiliated/--/x-3805311)
2020-09-29 14:16:48 z0 joins (~z0@bl17-251-27.dsl.telepac.pt)
2020-09-29 14:18:23 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-09-29 14:18:31 <z0> im doing advent of code 2019 and I think I found a typo in the last example @ day 5 part 2. has anyone done it and wants to verify?
2020-09-29 14:19:42 <merijn> Seems unlikely, since I'm pretty sure I completed that just fine :p
2020-09-29 14:20:07 polyphem joins (~p0lyph3m@2a02:810d:640:776c:76d7:55f6:f85b:c889)
2020-09-29 14:20:45 <z0> i also completed, but i tested all examples given and this is the only one failing
2020-09-29 14:20:55 <tdammers> yeah, AoC tends to be reviewed insanely well, which is kind of prudent considering the audience
2020-09-29 14:21:58 × kuribas quits (~user@ptr-25vy0i90m4i4hv80b70.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 26.3))
2020-09-29 14:22:25 × nbloomf quits (~nbloomf@2600:1700:83e0:1f40:71e4:29c:fe07:7926) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-09-29 14:22:27 × sword865 quits (uid208942@gateway/web/irccloud.com/x-uhmvawtkvtngcrcd) (Quit: Connection closed for inactivity)
2020-09-29 14:22:44 <z0> well... i'm very suspicious because you can see the list ends in "4,20,1105,1,46,98,99" and I get the correct results BUT the next code is not 99 (halt)
2020-09-29 14:23:14 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds)
2020-09-29 14:23:22 <z0> 4 (the output instruction) has 2 parameters and if you move the pointer you go to 1105 and not 99
2020-09-29 14:23:31 jollygood2 joins (~bc815b99@217.29.117.252)
2020-09-29 14:23:44 josh_ joins (~josh@c-67-164-104-206.hsd1.ca.comcast.net)
2020-09-29 14:24:07 × xff0x quits (~fox@2001:1a81:53b0:3c00:9889:b2f6:c747:1eec) (Ping timeout: 240 seconds)
2020-09-29 14:24:32 <tdammers> I can't remember the details, but I think I initially misread something in the spec that made this example fail
2020-09-29 14:24:47 <tdammers> meaning that it's probably not the example, but your brain that's wrong
2020-09-29 14:24:50 <dminuoso> z0: hold on, why does 4 have 2 parameters?
2020-09-29 14:25:01 <dminuoso> It has only one.
2020-09-29 14:25:07 xff0x joins (~fox@2001:1a81:53b0:3c00:65ac:b49c:d7d6:af9b)
2020-09-29 14:25:42 <z0> sorry, i meant 1
2020-09-29 14:25:57 <z0> the pointer moves 2 addresse
2020-09-29 14:26:41 <z0> which puts it in the 1105 instruction. if i let it run it will eventually halt with the output 0
2020-09-29 14:28:12 <dminuoso> z0: I dont quite understand what confusion you have.,
2020-09-29 14:28:32 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-09-29 14:29:00 <z0> as i understood, as soon as the output is /= 0, the next instruction HAS to be 99, right?
2020-09-29 14:29:32 abdullah__ joins (~LeghariK@37.111.129.221)
2020-09-29 14:30:22 <z0> in this case, the output i get from that last 4 is the right output for all 3 cases (< 9, ==9, > 9)
2020-09-29 14:30:28 hackage cli-extras 0.1.0.0 - Miscellaneous utilities for building and working with command line interfaces https://hackage.haskell.org/package/cli-extras-0.1.0.0 (RyanTrinkle)
2020-09-29 14:30:29 <z0> but the next instruction is not 99
2020-09-29 14:30:53 <z0> *(<8,==8,>8)
2020-09-29 14:31:28 hackage nix-thunk 0.1.0.0, cli-nix 0.1.0.0, cli-git 0.1.0.0 (RyanTrinkle)
2020-09-29 14:32:56 nbloomf joins (~nbloomf@2600:1700:83e0:1f40:85d7:28a9:e9cf:26c5)
2020-09-29 14:33:01 <dminuoso> 16:29:00 z0 | as i understood, as soon as the output is /= 0, the next instruction HAS to be 99, right?
2020-09-29 14:33:05 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 265 seconds)
2020-09-29 14:33:07 <dminuoso> The way I read it, that sounds wrong.
2020-09-29 14:34:37 <dminuoso> Consider the context of it all
2020-09-29 14:35:48 <dminuoso> This is diagnostic routines. A diagnostic is finished by writing some output, and it outputs 0 if it was successful, and a number if there was a deviation from the expected value
2020-09-29 14:36:05 <dminuoso> There's nothing to suggest a failed diagnostic must halt the program.
2020-09-29 14:36:47 × random quits (~random@185.219.70.106) (Ping timeout: 240 seconds)
2020-09-29 14:37:53 × chaosmasttter quits (~chaosmast@p200300c4a70aba01f8f8cb9b34fa26e3.dip0.t-ipconnect.de) (Ping timeout: 246 seconds)
2020-09-29 14:38:22 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
2020-09-29 14:38:26 turion joins (~turion@ip1f10fe5a.dynamic.kabel-deutschland.de)
2020-09-29 14:38:42 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-09-29 14:39:06 <turion> Is there a standard solution for building QuickCheck/SmallCheck/etc. generators for datatypes with constructors with existential types?
2020-09-29 14:39:14 takuan joins (~takuan@178-116-218-225.access.telenet.be)
2020-09-29 14:40:00 <dminuoso> turion: Mmm, how is that different from any other datatype?
2020-09-29 14:40:23 <turion> E.g. I have a free category type
2020-09-29 14:40:23 <turion> data FreeCat c where
2020-09-29 14:40:23 <turion> Id :: FreeCat c a a
2020-09-29 14:40:23 <turion> Seq :: FreeCat cat a b -> FreeCat cat b c
2020-09-29 14:40:23 <turion> Free :: cat a b -> FreeCat cat a b
2020-09-29 14:40:47 <turion> When I want to generate a Seq, I need to choose a _type_ b
2020-09-29 14:41:04 <ski> signature of `Seq' looks incomplete
2020-09-29 14:41:06 <turion> Of course I could always choose the same one, but that would be boring
2020-09-29 14:41:25 <turion> Whoops right, thanks.
2020-09-29 14:41:25 <turion> Seq :: FreeCat cat a b -> FreeCat cat b c -> FreeCat cat a c
2020-09-29 14:41:54 <int-e> z0: you're reading too much inbto "immediately followed by"... 1105,1,n is an unconditional jump to offset n; here n=46 and the operation there is the 99 you want.
2020-09-29 14:42:19 <ski> if you could have generation for `cat a b' pick an `a' or a `b' for you, given the other, then that could be useful, probably
2020-09-29 14:43:00 <turion> ski: What would be the type of such a generator?
2020-09-29 14:43:03 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2020-09-29 14:43:05 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds)
2020-09-29 14:43:25 × Ariakenom_ quits (~Ariakenom@h-98-128-229-8.NA.cust.bahnhof.se) (Remote host closed the connection)
2020-09-29 14:43:47 Ariakenom_ joins (~Ariakenom@h-98-128-229-8.NA.cust.bahnhof.se)
2020-09-29 14:44:03 × bitmapper quits (uid464869@gateway/web/irccloud.com/x-ssqdypdoaselcqyh) (Quit: Connection closed for inactivity)

All times are in UTC.