Logs: liberachat/#haskell
| 2021-06-20 02:22:22 | <ski> | (there's also `let-syntax' and `letrec-syntax' for locally scoped macros) |
| 2021-06-20 02:22:28 | <qrpnxz> | the same as declaration and implementation |
| 2021-06-20 02:22:31 | <boxscape> | ah |
| 2021-06-20 02:22:41 | <ski> | you'd still use the same `syntax-rules' form, for either of those three |
| 2021-06-20 02:23:08 | <qrpnxz> | syntax-rules is like the lambda of macros |
| 2021-06-20 02:23:11 | <ski> | `syntax-rules' allows you to pattern-match on the form of the macro invokation, and to specify a corresponding template |
| 2021-06-20 02:23:34 | <Guest43> | Is a program defined by functions that return ‘State ProgramState Value’ often able to be rewritten using continuation passing style where the continuations are ‘Value -> ProgramState’ |
| 2021-06-20 02:23:40 | <ski> | hm. not quite a macro lambda |
| 2021-06-20 02:23:57 | <ski> | (iirc Oleg did some macrology on macro lambdas ..) |
| 2021-06-20 02:24:02 | <ski> | @where oleg |
| 2021-06-20 02:24:02 | <lambdabot> | http://okmij.org/ftp/ |
| 2021-06-20 02:24:46 | <ski> | Guest43 : i guess you could use CPS, but i'm not sure why |
| 2021-06-20 02:25:02 | × | jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
| 2021-06-20 02:25:33 | × | mcglk quits (~mcglk@131.191.49.120) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 2021-06-20 02:25:39 | → | jmcarthur joins (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
| 2021-06-20 02:26:02 | → | mcglk joins (~mcglk@131.191.49.120) |
| 2021-06-20 02:26:39 | <Guest43> | Ski: maybe if I had to account for the possibility of error it would be easier to do this then instead start using the EitherT State transformer? Is this a sensical reason? |
| 2021-06-20 02:28:18 | × | jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Client Quit) |
| 2021-06-20 02:30:13 | <Guest43> | I happen to have a program just like this where I am using an ‘EitherT Error (State ProgramState) Value’. In reading about denotational semantics continuation passing style was introduced as a way to more elegantly deal with the possibility of error. I am wondering if it is worth pursuing for my program. |
| 2021-06-20 02:30:18 | × | grnman_ quits (~gandalf@c-73-49-209-161.hsd1.fl.comcast.net) (Remote host closed the connection) |
| 2021-06-20 02:31:51 | <Guest43> | s/EitherT/ExceptT |
| 2021-06-20 02:33:14 | × | nilof quits (~olofs@90-227-86-119-no542.tbcn.telia.com) (Ping timeout: 265 seconds) |
| 2021-06-20 02:36:12 | <Cajun> | so it appears something i did earlier when trying to install accelerate has screwed a package up. when i try to load `Data.Array.Accelerate` in some random GHCi, it will error out with ambiguous packages. when i `cabal repl [packageWithAccelerate]` then import it (the program doesnt explicitly import it, but the build depends on it), it doesnt |
| 2021-06-20 02:36:13 | <Cajun> | complain at all. https://paste.tomsmeding.com/tecJYoCE |
| 2021-06-20 02:39:04 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds) |
| 2021-06-20 02:39:04 | → | ddellacosta joins (~ddellacos@86.106.121.100) |
| 2021-06-20 02:39:18 | → | beka joins (~beka@104-244-27-23.static.monkeybrains.net) |
| 2021-06-20 02:43:44 | × | ddellacosta quits (~ddellacos@86.106.121.100) (Ping timeout: 258 seconds) |
| 2021-06-20 02:45:30 | <Guest43> | Hmm maybe my continuations would actually instead have to be ‘Value -> Either Error ProgramState’? I am starting to think this won’t make things any easier then using a monad transformer. |
| 2021-06-20 02:45:32 | × | nerdypepper quits (~nerdypepp@user/nerdypepper) (Quit: bye) |
| 2021-06-20 02:46:05 | <Guest43> | Cps is reminding me a lot of monads… |
| 2021-06-20 02:47:33 | × | alx741 quits (~alx741@181.196.68.241) (Quit: alx741) |
| 2021-06-20 02:48:25 | → | nerdypepper joins (~nerdypepp@user/nerdypepper) |
| 2021-06-20 02:58:51 | × | td_ quits (~td@muedsl-82-207-238-182.citykom.de) (Ping timeout: 268 seconds) |
| 2021-06-20 03:00:19 | → | td_ joins (~td@94.134.91.60) |
| 2021-06-20 03:04:34 | × | sheepduck quits (~sheepduck@cpe98524a8cef7c-cm98524a8cef7a.cpe.net.cable.rogers.com) (Remote host closed the connection) |
| 2021-06-20 03:04:55 | → | sheepduck joins (~sheepduck@cpe98524a8cef7c-cm98524a8cef7a.cpe.net.cable.rogers.com) |
| 2021-06-20 03:05:08 | × | favonia quits (~favonia@user/favonia) (Ping timeout: 265 seconds) |
| 2021-06-20 03:05:32 | × | sheepduck quits (~sheepduck@cpe98524a8cef7c-cm98524a8cef7a.cpe.net.cable.rogers.com) (Remote host closed the connection) |
| 2021-06-20 03:05:33 | → | favonia joins (~favonia@user/favonia) |
| 2021-06-20 03:06:27 | × | zebrag quits (~chris@user/zebrag) (Quit: Konversation terminated!) |
| 2021-06-20 03:07:36 | <dsal> | Guest43: https://hackage.haskell.org/package/mtl-2.2.2/docs/Control-Monad-Cont.html |
| 2021-06-20 03:14:03 | × | favonia quits (~favonia@user/favonia) (Ping timeout: 244 seconds) |
| 2021-06-20 03:16:13 | → | ddellacosta joins (~ddellacos@86.106.121.100) |
| 2021-06-20 03:20:31 | → | UpstreamSalmon joins (uid12077@id-12077.stonehaven.irccloud.com) |
| 2021-06-20 03:20:32 | × | ddellacosta quits (~ddellacos@86.106.121.100) (Ping timeout: 258 seconds) |
| 2021-06-20 03:21:01 | → | awth13 joins (~user@user/awth13) |
| 2021-06-20 03:21:20 | → | favonia joins (~favonia@user/favonia) |
| 2021-06-20 03:23:14 | × | boxscape quits (~boxscape@user/boxscape) (Ping timeout: 252 seconds) |
| 2021-06-20 03:25:01 | × | Guest43 quits (~Guest43@pool-96-252-123-136.bstnma.fios.verizon.net) (Quit: Client closed) |
| 2021-06-20 03:30:22 | × | fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Remote host closed the connection) |
| 2021-06-20 03:31:40 | × | adanwan quits (~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection) |
| 2021-06-20 03:32:01 | → | adanwan joins (~adanwan@gateway/tor-sasl/adanwan) |
| 2021-06-20 03:33:53 | → | P1RATEZ joins (piratez@user/p1ratez) |
| 2021-06-20 03:35:15 | → | Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915) |
| 2021-06-20 03:37:42 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 268 seconds) |
| 2021-06-20 03:37:43 | Lord_of_Life_ | is now known as Lord_of_Life |
| 2021-06-20 03:39:49 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 252 seconds) |
| 2021-06-20 03:42:08 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 2021-06-20 03:43:32 | × | hmmmas quits (~chenqisu1@183.217.200.246) (Quit: Leaving.) |
| 2021-06-20 03:47:15 | × | is7s quits (~is7s@2a01:4b00:895f:3d00:ddd:ae00:86d4:d79c) (Quit: Client closed) |
| 2021-06-20 03:47:55 | × | unyu quits (~pyon@user/pyon) (Quit: WeeChat 3.2) |
| 2021-06-20 03:50:29 | → | Axman6 joins (~Axman6@user/axman6) |
| 2021-06-20 03:52:28 | → | ddellacosta joins (~ddellacos@86.106.121.100) |
| 2021-06-20 03:56:14 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 252 seconds) |
| 2021-06-20 03:56:58 | × | ddellacosta quits (~ddellacos@86.106.121.100) (Ping timeout: 252 seconds) |
| 2021-06-20 03:57:16 | → | wennefer0 joins (~wennefer0@c-73-69-143-60.hsd1.ma.comcast.net) |
| 2021-06-20 03:57:25 | <Axman6> | I'm trying to think of the best way to implement code similar to what's being done in this python code for computing the discrete logarithm of g^m mod p, and wondering what sort of structure would let me efficiently access previously computed results: https://github.com/microsoft/electionguard-python/blob/f0a25b0ac99fac5c8d4e3545055dbdd05968d021/src/electionguard/dlog.py#L16 |
| 2021-06-20 03:57:54 | <Axman6> | so I was wondering if a Data.Map.Lazy would work, but I have a feeling it won't be lazy enough |
| 2021-06-20 03:58:36 | × | wennefer0 quits (~wennefer0@c-73-69-143-60.hsd1.ma.comcast.net) (Remote host closed the connection) |
| 2021-06-20 04:00:11 | <Axman6> | making a lazy list isn't too difficult but then I get linear time time lookup |
| 2021-06-20 04:01:55 | × | lambdap quits (~lambdap@static.167.190.119.168.clients.your-server.de) (Quit: lambdap) |
| 2021-06-20 04:02:37 | → | lambdap joins (~lambdap@static.167.190.119.168.clients.your-server.de) |
| 2021-06-20 04:03:43 | <c_wraith> | Data.Map.Lazy is fine if you can afford to insert all the keys at once |
| 2021-06-20 04:04:03 | <Axman6> | I would prefer not to, but it might be feasible |
| 2021-06-20 04:05:49 | <c_wraith> | you could also use one of the memoization packages that supports infinite tries |
| 2021-06-20 04:08:52 | <Axman6> | yeah |
| 2021-06-20 04:09:13 | <Axman6> | I'll probably do that |
| 2021-06-20 04:14:56 | × | jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 252 seconds) |
| 2021-06-20 04:16:27 | → | wei2912 joins (~wei2912@112.199.250.21) |
| 2021-06-20 04:22:43 | × | elf_fortrez quits (~elf_fortr@adsl-64-237-239-58.prtc.net) (Ping timeout: 246 seconds) |
| 2021-06-20 04:23:35 | → | pfurla_ joins (~pfurla@37.15.195.173.client.static.strong-in52.as13926.net) |
| 2021-06-20 04:24:33 | → | ddellacosta joins (~ddellacos@86.106.121.100) |
| 2021-06-20 04:25:24 | × | HarveyPwca quits (~HarveyPwc@2601:246:c180:a570:29df:3b00:ad0e:3a06) (Quit: Leaving) |
| 2021-06-20 04:26:18 | × | pfurla quits (~pfurla@ool-182ed2e2.dyn.optonline.net) (Ping timeout: 252 seconds) |
| 2021-06-20 04:27:17 | → | pfurla joins (~pfurla@ool-182ed2e2.dyn.optonline.net) |
| 2021-06-20 04:29:16 | × | ddellacosta quits (~ddellacos@86.106.121.100) (Ping timeout: 265 seconds) |
| 2021-06-20 04:29:58 | × | pfurla_ quits (~pfurla@37.15.195.173.client.static.strong-in52.as13926.net) (Ping timeout: 252 seconds) |
| 2021-06-20 04:31:44 | <qrpnxz> | Just learned how to use the ST monad! Epic! |
| 2021-06-20 04:31:57 | <qrpnxz> | i didn't know you could get this imperative in haskell |
| 2021-06-20 04:33:50 | × | slowButPresent quits (~slowButPr@user/slowbutpresent) (Quit: leaving) |
| 2021-06-20 04:34:36 | <qrpnxz> | accumulating numbers epic-style: |
| 2021-06-20 04:34:38 | <qrpnxz> | runST $ newSTRef 0 >>= \n -> traverse (modifySTRef n . (+)) [1..144] >> readSTRef n |
| 2021-06-20 04:35:37 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-06-20 04:36:24 | → | texasmynsted joins (~texasmyns@99.96.221.112) |
| 2021-06-20 04:38:00 | × | AgentM quits (~agentm@pool-162-83-130-212.nycmny.fios.verizon.net) (Quit: Leaving.) |
| 2021-06-20 04:44:26 | → | elf_fortrez joins (~elf_fortr@adsl-64-237-239-58.prtc.net) |
| 2021-06-20 04:46:06 | × | pfurla quits (~pfurla@ool-182ed2e2.dyn.optonline.net) (Ping timeout: 252 seconds) |
| 2021-06-20 04:46:24 | × | wei2912 quits (~wei2912@112.199.250.21) (Ping timeout: 258 seconds) |
| 2021-06-20 04:48:55 | <Axman6> | urgh, ius ther some good documentation for using MemoTrie somewhere? the package gives nothing useful |
All times are in UTC.