Logs: liberachat/#haskell
| 2021-08-15 12:25:06 | <arahael> | then i re-ran the build to get you those logs as i didnt keep the previous run |
| 2021-08-15 12:25:12 | <tomsmeding> | maerwald[m] was talking about the Streamly.Internal.Data.Unfold.Types error you got before |
| 2021-08-15 12:25:25 | <tomsmeding> | the MonadFail error is something different and was related to your ghc version |
| 2021-08-15 12:25:29 | <arahael> | ah! yeah, cabal update fixed that one |
| 2021-08-15 12:25:34 | <tomsmeding> | cool :) |
| 2021-08-15 12:26:46 | <arahael> | i guess that confirms the "nothing to fix" for that one :) |
| 2021-08-15 12:31:02 | × | mt404 quits (~mt404@cpe1056118081ac-cm1056118081aa.cpe.net.cable.rogers.com) (Ping timeout: 252 seconds) |
| 2021-08-15 12:32:20 | → | mt404 joins (~mt404@cpe1056118081ac-cm1056118081aa.cpe.net.cable.rogers.com) |
| 2021-08-15 12:35:28 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 2021-08-15 12:39:39 | × | _\_ quits (~flick@2001:19f0:5:14c2:5400:2ff:fee0:a42c) (Quit: ___) |
| 2021-08-15 12:39:48 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 258 seconds) |
| 2021-08-15 12:40:13 | × | o1lo01ol1o quits (~o1lo01ol1@31.22.129.100) (Remote host closed the connection) |
| 2021-08-15 12:40:43 | → | dudek joins (~dudek@185.150.236.112) |
| 2021-08-15 12:41:20 | × | sander quits (~sander@user/sander) (Ping timeout: 256 seconds) |
| 2021-08-15 12:42:33 | → | _\_ joins (~o@2001:19f0:5:14c2:5400:2ff:fee0:a42c) |
| 2021-08-15 12:44:36 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection) |
| 2021-08-15 12:45:39 | → | sander joins (~sander@user/sander) |
| 2021-08-15 12:46:56 | → | geekosaur joins (~geekosaur@xmonad/geekosaur) |
| 2021-08-15 12:47:27 | × | haykam quits (~haykam@static.100.2.21.65.clients.your-server.de) (Remote host closed the connection) |
| 2021-08-15 12:47:40 | → | haykam joins (~haykam@static.100.2.21.65.clients.your-server.de) |
| 2021-08-15 12:48:19 | × | CannabisIndica quits (~herb@user/mesaboogie) (Quit: ZNC - https://znc.in) |
| 2021-08-15 12:49:34 | → | slowButPresent joins (~slowButPr@user/slowbutpresent) |
| 2021-08-15 12:49:58 | × | werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Remote host closed the connection) |
| 2021-08-15 12:50:47 | × | _\_ quits (~o@2001:19f0:5:14c2:5400:2ff:fee0:a42c) (Changing host) |
| 2021-08-15 12:50:47 | → | _\_ joins (~o@user/ding) |
| 2021-08-15 12:51:26 | <albet70> | ContT r IO a, what it's used for? |
| 2021-08-15 12:51:45 | <albet70> | what is a CPS |
| 2021-08-15 12:53:29 | → | thyriaen joins (~thyriaen@dynamic-089-012-237-250.89.12.pool.telefonica.de) |
| 2021-08-15 12:54:39 | <hpc> | at a very high level, it's laying out your code so the notion of "everything my program does after this point" is a function that you can manipulate |
| 2021-08-15 12:55:14 | <thyriaen> | howdy, friends - i have a list of numbers, and i am trying to find a subset of them for which the sum is an exact number - so i generate the powerset of it and then sum them all up and filter accordingly - i found it but now i would like to know which subset was the solution - how do i do that ? |
| 2021-08-15 12:55:14 | <hpc> | that "everything my program does after this point" doesn't have to be a single function either |
| 2021-08-15 12:55:17 | <hpc> | maybe it's two functions |
| 2021-08-15 12:55:49 | → | schuelermine joins (~anselmsch@user/schuelermine) |
| 2021-08-15 12:55:55 | <hpc> | imagine you're writing a parser - in CPS style maybe you have two continuations, one for "i consumed input and found what i expected" and one for "there was some sort of a problem" |
| 2021-08-15 12:56:13 | <thyriaen> | this is my current code: https://paste.tomsmeding.com/umLlKbAf |
| 2021-08-15 12:56:44 | → | mikoto-chan joins (~mikoto-ch@ip-193-121-10-50.dsl.scarlet.be) |
| 2021-08-15 12:56:56 | <tomsmeding> | thyriaen: what about Data.List.find |
| 2021-08-15 12:57:04 | <tomsmeding> | note also that sumer = sum ;) |
| 2021-08-15 12:57:05 | <hpc> | then a parser like (char x) is written as "do the low-level operation that consumes input - if the character == x, call the success continuation, otherwise call the fail continuation" |
| 2021-08-15 12:57:24 | <thyriaen> | let me look up data.list.find |
| 2021-08-15 12:57:31 | <hpc> | some implementation details later and (>>=) to compose it, and you have parsec |
| 2021-08-15 12:57:45 | <hpc> | https://hackage.haskell.org/package/parsec-3.1.14.0/docs/src/Text.Parsec.Prim.html#ParsecT |
| 2021-08-15 12:58:01 | <hpc> | ContT is the most general form of this sort of thing |
| 2021-08-15 12:58:40 | <thyriaen> | tomsmeding, what is a foldable t ? |
| 2021-08-15 12:58:55 | <hpc> | albet70: hopefully that made sense? |
| 2021-08-15 12:59:06 | <albet70> | yes |
| 2021-08-15 12:59:12 | <thyriaen> | tomsmeding, i don't think i understand find :: Foldable t => (a -> Bool) -> t a -> Maybe a |
| 2021-08-15 12:59:15 | <tomsmeding> | thyriaen: think of that type signature as saying "(a -> Bool) -> [a] -> Maybe a" |
| 2021-08-15 12:59:27 | <tomsmeding> | [] is one example of a Foldable |
| 2021-08-15 12:59:33 | <thyriaen> | okay |
| 2021-08-15 13:00:04 | × | schuelermine quits (~anselmsch@user/schuelermine) (Client Quit) |
| 2021-08-15 13:00:06 | <fvr> | Is there an opposite command to `cabal install --lib` |
| 2021-08-15 13:00:10 | <tomsmeding> | hm you don't even need find |
| 2021-08-15 13:00:32 | <tomsmeding> | thyriaen: the more important thing to do is to put the summing in the filter |
| 2021-08-15 13:00:51 | <tomsmeding> | what you now have is: filter (== 271.36) (map sum (powerset list)) |
| 2021-08-15 13:01:01 | <thyriaen> | yes |
| 2021-08-15 13:01:02 | → | alx741 joins (~alx741@186.178.108.32) |
| 2021-08-15 13:01:06 | <tomsmeding> | what about: filter (\l -> sum l == 271.36) (powerset list) |
| 2021-08-15 13:01:08 | → | burnsidesLlama joins (~burnsides@dhcp168-012.wadham.ox.ac.uk) |
| 2021-08-15 13:01:19 | <thyriaen> | what is \l ? |
| 2021-08-15 13:01:24 | <thyriaen> | lambda ? |
| 2021-08-15 13:01:26 | <tomsmeding> | yeah |
| 2021-08-15 13:01:41 | <tomsmeding> | % f = \x -> x + 1 |
| 2021-08-15 13:01:42 | <yahb> | tomsmeding: |
| 2021-08-15 13:01:44 | <albet70> | hpc, in the computation chain of >>=, how the ContT can jump back and why? |
| 2021-08-15 13:01:45 | <tomsmeding> | % f 10 |
| 2021-08-15 13:01:45 | <yahb> | tomsmeding: 11 |
| 2021-08-15 13:02:33 | <tomsmeding> | thyriaen: (== 271.36) is the same as (\x -> x == 271.36) |
| 2021-08-15 13:02:35 | <thyriaen> | tomsmeding, i understand now it makes sense |
| 2021-08-15 13:02:46 | <thyriaen> | but one question remains |
| 2021-08-15 13:03:05 | <thyriaen> | find does not really change anything compared to filter, does it ? |
| 2021-08-15 13:03:27 | <tomsmeding> | nah find just returns the first match, if one exists, while filter returns all matches |
| 2021-08-15 13:03:31 | <tomsmeding> | I was confused for a moment |
| 2021-08-15 13:04:30 | <thyriaen> | tomsmeding, yes - thanks so much ! it worked |
| 2021-08-15 13:04:47 | <thyriaen> | dang it i love haskell |
| 2021-08-15 13:05:04 | <tomsmeding> | :) |
| 2021-08-15 13:06:05 | <albet70> | like Maybe Either can break computation chain of >>=, Read can pass input in it, Writer can append log in it, State can do both, and Cont can jump back to somewhere in it, why Cont can do this? |
| 2021-08-15 13:06:48 | × | burnsidesLlama quits (~burnsides@dhcp168-012.wadham.ox.ac.uk) (Ping timeout: 272 seconds) |
| 2021-08-15 13:07:07 | <albet70> | and Traverse can do early exit |
| 2021-08-15 13:25:16 | → | pfurla joins (~pfurla@ool-3f8fcb0f.dyn.optonline.net) |
| 2021-08-15 13:27:11 | → | o1lo01ol1o joins (~o1lo01ol1@31.22.129.100) |
| 2021-08-15 13:28:29 | × | son0p quits (~ff@181.136.122.143) (Ping timeout: 258 seconds) |
| 2021-08-15 13:28:54 | × | pfurla_ quits (~pfurla@ool-3f8fcb0f.dyn.optonline.net) (Ping timeout: 272 seconds) |
| 2021-08-15 13:29:52 | × | mikoto-chan quits (~mikoto-ch@ip-193-121-10-50.dsl.scarlet.be) (Quit: mikoto-chan) |
| 2021-08-15 13:30:39 | → | Pickchea joins (~private@user/pickchea) |
| 2021-08-15 13:30:54 | → | frosky joins (~froskyarr@50.7.59.207) |
| 2021-08-15 13:34:49 | × | o1lo01ol1o quits (~o1lo01ol1@31.22.129.100) (Remote host closed the connection) |
| 2021-08-15 13:35:25 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3ab-85.dhcp.inet.fi) (Remote host closed the connection) |
| 2021-08-15 13:36:09 | → | burnsidesLlama joins (~burnsides@dhcp168-012.wadham.ox.ac.uk) |
| 2021-08-15 13:38:03 | × | Pickchea quits (~private@user/pickchea) (Ping timeout: 268 seconds) |
| 2021-08-15 13:40:09 | × | hendursa1 quits (~weechat@user/hendursaga) (Quit: hendursa1) |
| 2021-08-15 13:40:36 | → | hendursaga joins (~weechat@user/hendursaga) |
| 2021-08-15 13:40:45 | × | burnsidesLlama quits (~burnsides@dhcp168-012.wadham.ox.ac.uk) (Ping timeout: 258 seconds) |
| 2021-08-15 13:41:08 | × | fendor quits (~fendor@178.115.35.166.wireless.dyn.drei.com) (Remote host closed the connection) |
| 2021-08-15 13:45:10 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-08-15 13:46:43 | → | mikoto-chan joins (~mikoto-ch@ip-193-121-10-50.dsl.scarlet.be) |
| 2021-08-15 13:47:07 | → | lavaman joins (~lavaman@98.38.249.169) |
| 2021-08-15 13:50:30 | → | jgeerds joins (~jgeerds@55d45555.access.ecotel.net) |
| 2021-08-15 13:51:29 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 248 seconds) |
| 2021-08-15 13:54:50 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3ab-85.dhcp.inet.fi) |
All times are in UTC.