Logs: freenode/#haskell
| 2021-03-17 17:39:48 | <bobweb> | Yes, we instance Semigroup for arbitrary types from nullary on up to four-tuple and everything has been fine. However the Associativity test has only been on String data constructor parameters or the parameters where not accessed in the definition of (<>) for a particular exercise. |
| 2021-03-17 17:39:50 | <geekosaur> | but with what I see then just showing Fst 1 should have failed too |
| 2021-03-17 17:39:59 | <geekosaur> | yet their paste shows it working |
| 2021-03-17 17:40:26 | → | romesrf joins (~romesrf@44.190.189.46.rev.vodafone.pt) |
| 2021-03-17 17:40:34 | <geekosaur> | https://paste.tomsmeding.com/t2eAq6e2 lines 37-38 |
| 2021-03-17 17:40:47 | <geekosaur> | so something is not making sense here |
| 2021-03-17 17:41:14 | <monochrom> | Err there are two. They are "Sum a" and "Product a". But neither is considered by extended defaulting. |
| 2021-03-17 17:41:19 | <geekosaur> | yes |
| 2021-03-17 17:41:25 | <geekosaur> | which one is that paste using? |
| 2021-03-17 17:41:40 | × | kuribas quits (~user@ptr-25vy0i879y19n3wd622.18120a2.ip6.access.telenet.be) (Remote host closed the connection) |
| 2021-03-17 17:41:50 | <monochrom> | I believe that the book is wrong here. |
| 2021-03-17 17:42:28 | <bobweb> | I was thinking it possible that the text could be in error. |
| 2021-03-17 17:42:49 | <bobweb> | It's a big book. |
| 2021-03-17 17:43:47 | <monochrom> | This is why before I post an assignment I work out the complete solution and make sure it compiles. Learned it the hard way. |
| 2021-03-17 17:43:53 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 2021-03-17 17:43:57 | ptrcmd_ | is now known as ptrcmd |
| 2021-03-17 17:44:29 | <monochrom> | In fact also write some simple but representative test cases and make sure my solution passes my own test cases before I post the assignment. |
| 2021-03-17 17:44:35 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 2021-03-17 17:45:10 | <bobweb> | OK, so I'm going to let this one go. Thanks for your help, koz_: geekosaur: and monochrom: |
| 2021-03-17 17:45:16 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-03-17 17:45:21 | <monochrom> | That's right, I'm impeaching that the book author never solved this exercise. Bite me. |
| 2021-03-17 17:45:36 | × | berberman quits (~berberman@unaffiliated/berberman) (Ping timeout: 244 seconds) |
| 2021-03-17 17:46:40 | <bobweb> | LOL. |
| 2021-03-17 17:46:54 | × | l8star__ quits (~l8star@business-90-187-113-149.pool2.vodafone-ip.de) (Remote host closed the connection) |
| 2021-03-17 17:46:54 | <monochrom> | "Fst 1" alone is just like "Left 1" alone and enjoys defaulting to Integer. This one doesn't involve Semigroup. |
| 2021-03-17 17:48:02 | × | geekosaur quits (82650c7a@130.101.12.122) (Ping timeout: 240 seconds) |
| 2021-03-17 17:48:38 | <monochrom> | Hrm, I was wrong. The exercise is solvable as is. |
| 2021-03-17 17:49:54 | <monochrom> | The "sticky Snd" behaviour (and I bet also the "last Fst" behaviour in case you don't see any Snd) implies that you should simply have "instance Semigroup (Or a b) where ...". |
| 2021-03-17 17:50:41 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 2021-03-17 17:50:42 | <monochrom> | Then even normal defaulting will suffice. You're now just looking for a type X that is an instance of Num and Show. No Semigroup requirement. |
| 2021-03-17 17:51:02 | × | bobweb quits (ac3a1784@172.58.23.132) (Ping timeout: 240 seconds) |
| 2021-03-17 17:51:28 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-03-17 17:55:00 | × | Franciman quits (~francesco@host-79-53-62-46.retail.telecomitalia.it) (Quit: Leaving) |
| 2021-03-17 17:55:00 | × | zaquest quits (~notzaques@5.128.210.178) (Ping timeout: 246 seconds) |
| 2021-03-17 17:55:50 | × | idhugo_ quits (~idhugo@87-49-147-45-mobile.dk.customer.tdc.net) (Ping timeout: 256 seconds) |
| 2021-03-17 17:56:54 | → | cur8or joins (~cur8or@196.41.98.130) |
| 2021-03-17 17:57:05 | × | cur8or quits (~cur8or@196.41.98.130) (Client Quit) |
| 2021-03-17 17:57:33 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds) |
| 2021-03-17 17:58:18 | → | zaquest joins (~notzaques@5.128.210.178) |
| 2021-03-17 17:58:34 | <solidus-river> | hmm, this library is using threadWaitWrite but i don't want it to, do i have to remake these funcs or is there a way to gaurd against that via thread options |
| 2021-03-17 18:01:27 | × | elliott__ quits (~elliott@pool-108-51-101-42.washdc.fios.verizon.net) (Ping timeout: 256 seconds) |
| 2021-03-17 18:01:33 | × | codygman` quits (~user@209.251.131.98) (Remote host closed the connection) |
| 2021-03-17 18:01:44 | × | rajivr quits (uid269651@gateway/web/irccloud.com/x-uascrnncsdwthllt) (Quit: Connection closed for inactivity) |
| 2021-03-17 18:01:53 | → | codygman__ joins (~user@209.251.131.98) |
| 2021-03-17 18:03:14 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:f837:3533:97b:1f44) |
| 2021-03-17 18:06:23 | hackage | recover-rtti 0.3.0.0 - Recover run-time type information from the GHC heap https://hackage.haskell.org/package/recover-rtti-0.3.0.0 (EdskoDeVries) |
| 2021-03-17 18:06:50 | <solidus-river> | actually i can put it in a child thread |
| 2021-03-17 18:08:13 | → | geekosaur joins (82650c7a@130.101.12.122) |
| 2021-03-17 18:08:55 | → | seveg joins (~gabriel@2a02-ab04-0249-8d00-dea6-32ff-fe17-0993.dynamic.v6.chello.sk) |
| 2021-03-17 18:10:56 | × | Cathy quits (~Cathy@unaffiliated/cathy) (Ping timeout: 240 seconds) |
| 2021-03-17 18:11:11 | × | DataComputist quits (~lumeng@50.43.26.251) (Quit: Leaving...) |
| 2021-03-17 18:11:30 | <iphy> | in attoparsec, is there a way to say "parse with this parser until N bytes have been consumed"? |
| 2021-03-17 18:11:57 | × | cr3 quits (~cr3@192-222-143-195.qc.cable.ebox.net) (Ping timeout: 264 seconds) |
| 2021-03-17 18:12:10 | × | sh9 quits (~sh9@softbank060116136158.bbtec.net) (Quit: WeeChat 2.8) |
| 2021-03-17 18:12:30 | <iphy> | so basically: take n, then run a subparser on the returned ByteString, except I'd like to stay within the same Parser |
| 2021-03-17 18:12:45 | <monochrom> | I think no, but are you OK with giving it just N bytes? |
| 2021-03-17 18:13:14 | → | cr3 joins (~cr3@192-222-143-195.qc.cable.ebox.net) |
| 2021-03-17 18:13:21 | × | fuzzypixelz quits (2ec10464@eth-west-pareq2-46-193-4-100.wb.wifirst.net) (Quit: Connection closed) |
| 2021-03-17 18:13:30 | × | dyeplexer quits (~lol@unaffiliated/terpin) (Remote host closed the connection) |
| 2021-03-17 18:13:39 | <iphy> | I'm parsing a chunked file format where the chunk size is at the start, but I don't know how many of the subparser are within that chunk |
| 2021-03-17 18:14:14 | <geekosaur> | seems to me you just plain read the chunk, then invoke the parser on that |
| 2021-03-17 18:14:15 | <iphy> | so I know the length of the chunk, and I want to do "parse as many of the subparser within these bounds as you can" |
| 2021-03-17 18:14:23 | hackage | cabal2nix 2.17.0 - Convert Cabal files into Nix build instructions. https://hackage.haskell.org/package/cabal2nix-2.17.0 (PeterSimons) |
| 2021-03-17 18:14:43 | <iphy> | hmm |
| 2021-03-17 18:15:59 | × | peanut_ quits (~peanut@2a02:8388:a101:2600:ca51:748b:ec67:2e7c) (Quit: Leaving) |
| 2021-03-17 18:16:18 | → | DataComputist joins (~lumeng@50.43.26.251) |
| 2021-03-17 18:18:08 | <iphy> | geekosaur: so actually { chunk <- take n ; let res = parse (some parseElement) chunk ; ... do something to res to turn it back into the Parser monad? ? |
| 2021-03-17 18:18:12 | <iphy> | } |
| 2021-03-17 18:18:24 | → | Cathy joins (~Cathy@unaffiliated/cathy) |
| 2021-03-17 18:18:25 | <iphy> | so how do I turn Result back into a Parser? |
| 2021-03-17 18:18:46 | → | frozenErebus joins (~frozenEre@37.231.243.22) |
| 2021-03-17 18:18:48 | <iphy> | or do you mean separate steps of parsing the chunked format and then parse each chunk separately outside? |
| 2021-03-17 18:19:05 | <monochrom> | I would do the separate steps way. |
| 2021-03-17 18:19:13 | <geekosaur> | I was thinking one of the hGet… functions and parse each separately |
| 2021-03-17 18:19:40 | <geekosaur> | but separate steps would also work |
| 2021-03-17 18:21:27 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 2021-03-17 18:21:51 | → | lynx__ joins (~lynx_@117.222.66.23) |
| 2021-03-17 18:21:52 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 2021-03-17 18:22:36 | <solidus-river> | im using a recursive function to do something every N seconds within an IO monad, is there a helper func that would make this cleaner |
| 2021-03-17 18:22:48 | × | emmanuel_erc quits (~user@2603-7000-9600-01c9-0000-0000-0000-0874.res6.spectrum.com) (Read error: Connection reset by peer) |
| 2021-03-17 18:22:51 | → | ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta) |
| 2021-03-17 18:23:22 | → | emmanuel_erc joins (~user@2603-7000-9600-01c9-0000-0000-0000-0874.res6.spectrum.com) |
| 2021-03-17 18:24:35 | × | Rudd0 quits (~Rudd0@185.189.115.103) (Ping timeout: 265 seconds) |
| 2021-03-17 18:24:38 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-03-17 18:25:23 | × | augnun quits (~augnun@2804:14c:658b:41bb:57d:9776:9e3e:4447) (Ping timeout: 244 seconds) |
| 2021-03-17 18:26:01 | → | __minoru__shirae joins (~shiraeesh@109.166.59.216) |
| 2021-03-17 18:26:18 | × | esp32_prog quits (esp32_prog@gateway/vpn/mullvad/esp32prog/x-46565127) (Ping timeout: 245 seconds) |
| 2021-03-17 18:26:21 | × | minoru_shiraeesh quits (~shiraeesh@46.34.206.65) (Ping timeout: 264 seconds) |
| 2021-03-17 18:26:57 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 256 seconds) |
| 2021-03-17 18:29:57 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds) |
| 2021-03-17 18:32:06 | × | romesrf quits (~romesrf@44.190.189.46.rev.vodafone.pt) (Ping timeout: 256 seconds) |
| 2021-03-17 18:34:28 | <sm[m]> | solidus-river: there's monadic loop helpers like forever |
| 2021-03-17 18:35:10 | × | Yumasi quits (~guillaume@40.72.95.92.rev.sfr.net) (Ping timeout: 260 seconds) |
| 2021-03-17 18:36:27 | → | notzmv joins (~zmv@unaffiliated/zmv) |
| 2021-03-17 18:36:27 | × | emmanuel_erc quits (~user@2603-7000-9600-01c9-0000-0000-0000-0874.res6.spectrum.com) (Read error: Connection reset by peer) |
| 2021-03-17 18:36:57 | → | emmanuel_erc joins (~user@2603-7000-9600-01c9-0000-0000-0000-0874.res6.spectrum.com) |
| 2021-03-17 18:37:11 | → | romesrf joins (~romesrf@44.190.189.46.rev.vodafone.pt) |
| 2021-03-17 18:37:17 | → | Sorny joins (~Sornaensi@154.6.18.32) |
| 2021-03-17 18:37:30 | → | epicte7us joins (~epictetus@ip72-194-215-136.sb.sd.cox.net) |
| 2021-03-17 18:37:54 | → | urodna_ joins (~urodna@unaffiliated/urodna) |
All times are in UTC.