Logs: liberachat/#haskell
| 2021-06-23 04:28:05 | <glguy> | which implementation are you using? |
| 2021-06-23 04:28:14 | <sm[m]> | glguy: I'm reviewing a PR adding lenses to lots of hledger types |
| 2021-06-23 04:28:32 | <sm[m]> | microlens, classy lenses made with TH |
| 2021-06-23 04:30:43 | <sm[m]> | (https://github.com/simonmichael/hledger/pull/1545) |
| 2021-06-23 04:30:55 | <boxscape> | JSharp: yeah, I spend some time a while ago just taking a quick look at every extension listed in https://downloads.haskell.org/ghc/latest/docs/html/users_guide/exts.html |
| 2021-06-23 04:31:03 | <boxscape> | s/spend/spent |
| 2021-06-23 04:31:30 | × | Morrow_ quits (~MorrowM_@147.161.13.60) (Ping timeout: 252 seconds) |
| 2021-06-23 04:31:40 | <boxscape> | JSharp: oh, better link: https://downloads.haskell.org/ghc/latest/docs/html/users_guide/exts/table.html |
| 2021-06-23 04:32:05 | <JSharp> | boxscape: cheers! I tried doing that a while ago and one issue I had was just the lack of guidance around what using certain extensions does to the language itself - sometimes it's really quite subtle; and a number of extensions are completely broken/deprecated. |
| 2021-06-23 04:33:05 | <boxscape> | yeah the docs could probably be better here and there |
| 2021-06-23 04:35:30 | <glguy> | sm[m], that's sure a lot to review |
| 2021-06-23 04:36:12 | <JSharp> | Well, the docs are pretty good - they just don't really include best practices (they're not constructed like, say, the docs for the APT package manager - where the documentation is almost entirely intertwined with Debian (the project which built and uses APT for package management) Project Policy on its use. |
| 2021-06-23 04:36:47 | <JSharp> | and that's fine, of course - but it does present a challenge for onboarding, as it were. |
| 2021-06-23 04:37:18 | <outoftime> | How to improve speed of https://pastebin.ubuntu.com/p/kdjHGFT3tG/ ? |
| 2021-06-23 04:37:31 | <JSharp> | I doubt that I'm making any sort of a novel observation here |
| 2021-06-23 04:38:59 | <JSharp> | outoftime: https://blog.jez.io/profiling-in-haskell/ |
| 2021-06-23 04:39:41 | → | tusko joins (~yeurt@user/tusko) |
| 2021-06-23 04:39:51 | <tusko> | how does one learn haskell? |
| 2021-06-23 04:40:24 | <glguy> | mostly by writing programs in it |
| 2021-06-23 04:40:30 | <siraben> | practice |
| 2021-06-23 04:40:34 | <dsal> | tusko: depends on which one. I alternate between solving problems in haskell and reading about other people solving problems in haskell |
| 2021-06-23 04:40:36 | <JSharp> | tusko: what's your experience with programming in general? |
| 2021-06-23 04:41:04 | <tusko> | C, C++, Python, Java, Tcl, Lisp, some Scala |
| 2021-06-23 04:41:13 | → | wei2912 joins (~wei2912@112.199.250.21) |
| 2021-06-23 04:41:26 | <tusko> | I've done various things |
| 2021-06-23 04:42:18 | <JSharp> | tsuko - ok - well, you might start with http://dev.stephendiehl.com/hask/ and use http://learnyouahaskell.com/chapters to fill in any gaps and for the exercises |
| 2021-06-23 04:42:20 | <dsal> | I'm `foldM`ing over `some parser` -- is there a thing that's a sort of combination of `foldM` and `some` that would let me do these things together? |
| 2021-06-23 04:42:37 | <dsal> | In my parser, it basically consumes all the stuff into a list and then folds it, which defers failures. |
| 2021-06-23 04:43:22 | <boxscape> | JSharp tusko : I don't think LYAH has exercises. https://www.seas.upenn.edu/~cis194/spring13/lectures.html for example does, though |
| 2021-06-23 04:44:15 | <JSharp> | boxscape tusko ... *chuckles* ... actually you may be right about that lack of exercises; I coded along with it, which is probably why I misremembered that. |
| 2021-06-23 04:44:46 | × | peterhil quits (~peterhil@dsl-hkibng32-54f849-252.dhcp.inet.fi) (Ping timeout: 265 seconds) |
| 2021-06-23 04:47:19 | × | falafel quits (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) (Remote host closed the connection) |
| 2021-06-23 04:47:44 | → | falafel joins (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) |
| 2021-06-23 04:47:45 | × | lavaman quits (~lavaman@98.38.249.169) (Read error: Connection reset by peer) |
| 2021-06-23 04:48:04 | → | lavaman joins (~lavaman@98.38.249.169) |
| 2021-06-23 04:49:24 | <sm[m]> | glguy: is it ? I'm.. getting used to it. IntelliJ IDEA or VS Code helps (neither is perfect, alas) |
| 2021-06-23 04:49:46 | <glguy> | I just mean that it touches a lot of files is all |
| 2021-06-23 04:49:59 | <glguy> | Do either of those IDEs help you keep track of what you've reviewed so far? |
| 2021-06-23 04:50:32 | <sm[m]> | it does indeed, the changes are mostly simple in this case fortunately. Yes, at least one of them lets you mark files as seen |
| 2021-06-23 04:51:01 | <sm[m]> | VS Code |
| 2021-06-23 04:51:32 | <sm[m]> | VS Code doesn't let you add code comments when reviewing by commit though; only if you review all file changes at once |
| 2021-06-23 04:51:33 | → | peterhil joins (~peterhil@dsl-hkibng32-54f849-252.dhcp.inet.fi) |
| 2021-06-23 04:52:11 | <sm[m]> | also it doesn't let you collapse unchanged parts of files for a compact view of diffs. That's a nice feature in IDEA |
| 2021-06-23 04:52:33 | <sm[m]> | but, Code can navigate your code with hls. I wish IDEA could |
| 2021-06-23 04:52:51 | <glguy> | yeah, hls makes a big difference |
| 2021-06-23 04:53:09 | <sm[m]> | IDEAs find is so good it almost doesn't matter, but.. |
| 2021-06-23 04:54:00 | <boxscape> | can hls show you usage sites of names? |
| 2021-06-23 04:54:29 | <sm[m]> | yes, I believe that's a normal feature now |
| 2021-06-23 04:54:32 | <boxscape> | ah, nice |
| 2021-06-23 04:55:00 | <sm[m]> | oh, maybe the thing that doesn't work yet is usage sites in other packages within your project. Not sure |
| 2021-06-23 04:55:13 | <boxscape> | ah, well, understandable |
| 2021-06-23 04:55:29 | <sm[m]> | bah :) |
| 2021-06-23 05:02:31 | × | AgentM quits (~agentm@pool-162-83-130-212.nycmny.fios.verizon.net) (Quit: Leaving.) |
| 2021-06-23 05:07:29 | × | chaosite quits (~chaosite@user/chaosite) (Ping timeout: 265 seconds) |
| 2021-06-23 05:08:27 | → | fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) |
| 2021-06-23 05:09:57 | × | falafel quits (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) (Ping timeout: 258 seconds) |
| 2021-06-23 05:10:01 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 2021-06-23 05:12:30 | → | Morrow_ joins (~MorrowM_@147.161.13.60) |
| 2021-06-23 05:13:01 | × | fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 258 seconds) |
| 2021-06-23 05:13:32 | → | chaosite joins (~chaosite@user/chaosite) |
| 2021-06-23 05:14:51 | ← | justsomeguy parts (~justsomeg@user/justsomeguy) (WeeChat 3.0.1) |
| 2021-06-23 05:17:10 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 2021-06-23 05:18:26 | × | chaosite quits (~chaosite@user/chaosite) (Ping timeout: 252 seconds) |
| 2021-06-23 05:22:53 | → | jneira joins (~jneira@212.8.115.226) |
| 2021-06-23 05:24:45 | × | johnw quits (~johnw@76-234-69-149.lightspeed.frokca.sbcglobal.net) (Quit: ZNC - http://znc.in) |
| 2021-06-23 05:25:44 | <outoftime> | sm[m]: aren't you using emacs/vim? |
| 2021-06-23 05:26:37 | → | gentauro_ joins (~gentauro@taa-cgn11.kviknet.dk) |
| 2021-06-23 05:27:17 | <sm[m]> | outoftime: emacs too, yes |
| 2021-06-23 05:27:56 | <sm[m]> | I fire up code or IDEA for some coding and especially for reviewing PRs |
| 2021-06-23 05:28:28 | → | deshalb joins (~deshalb@user/deshalb) |
| 2021-06-23 05:28:41 | → | gzj joins (~GZJ0X@96.45.188.88.16clouds.com) |
| 2021-06-23 05:29:21 | <sm[m]> | is there a way to automatically generate the non-TH boilerplate code for lenses ? |
| 2021-06-23 05:30:12 | × | gentauro quits (~gentauro@user/gentauro) (Ping timeout: 265 seconds) |
| 2021-06-23 05:33:24 | → | chomwitt joins (~Pitsikoko@2a02:587:dc0b:0:d8f7:cdfe:4658:bec4) |
| 2021-06-23 05:34:50 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-06-23 05:36:33 | <outoftime> | `liftM2 (,) [0..12000] [0..12000]` can this be improved in terms of speed? |
| 2021-06-23 05:37:12 | <Axman6> | not really |
| 2021-06-23 05:40:26 | <jophish> | <outoftime "`liftM2 (,) [0..12000] [0..12000"> What are you trying to do with this though? |
| 2021-06-23 05:45:18 | <outoftime> | jophish: https://pastebin.ubuntu.com/p/kdjHGFT3tG/ |
| 2021-06-23 05:46:08 | × | Xnuk quits (~xnuk@vultr.xnu.kr) (Quit: ZNC - https://znc.in) |
| 2021-06-23 05:46:22 | × | jneira_ quits (~jneira_@131.red-79-155-1.dynamicip.rima-tde.net) (Ping timeout: 258 seconds) |
| 2021-06-23 05:46:26 | → | Xnuk joins (~xnuk@45.76.202.58) |
| 2021-06-23 05:46:27 | → | killsushi joins (~killsushi@user/killsushi) |
| 2021-06-23 05:46:50 | <outoftime> | JSharp: I have no idea why, but executable made with stack take 12 seconds to finish with -O2 option passed, but when I'm building same code with GHC in my system, executable take 5 seconds to finnish |
| 2021-06-23 05:48:29 | <Axman6> | outoftime: that's probably because you're sorting them. what you can do is, numerator each numerator, generate each in value in order by using [abs, abs-1 .. 1, and then writing a merge function which merged sorted lists |
| 2021-06-23 05:48:37 | <outoftime> | Maybe it is because stack has separate lib module. Anyway, profiling didn't help. |
| 2021-06-23 05:48:54 | <outoftime> | Axman6: genRange is like instant |
| 2021-06-23 05:49:06 | × | TheCoffeMaker_ quits (~TheCoffeM@125-121-245-190.fibertel.com.ar) (Quit: So long and thanks for all the fish) |
| 2021-06-23 05:49:19 | <Axman6> | is last genRange instance? |
| 2021-06-23 05:49:27 | → | TheCoffeMaker joins (~TheCoffeM@user/thecoffemaker) |
| 2021-06-23 05:50:11 | <Axman6> | I think you might actually get better performance if you use liftM2 (,) (genRange abs) (genRange abs) rather than forcing them to point ot the same value |
| 2021-06-23 05:50:20 | <outoftime> | `where normalized = genRange abs` this should not be executed multiple times, am I wrong? |
| 2021-06-23 05:50:47 | <Axman6> | it will cause the whole list to be retained in memory though |
| 2021-06-23 05:51:26 | <jophish> | keeping that product in memory is also like 3GB, perhaps there's a way you can stream it to whatever's consuming it |
| 2021-06-23 05:51:30 | <jophish> | (maybe you're doing that already) |
| 2021-06-23 05:52:09 | <Axman6> | hmm, actually I think both ways will force it to be retained anyway |
| 2021-06-23 05:52:16 | <outoftime> | jophish: right now I'm just taking length of that list, no processing done... |
| 2021-06-23 05:52:31 | <jophish> | ah, k |
| 2021-06-23 05:52:46 | <outoftime> | I mean it gets consumed |
| 2021-06-23 05:53:00 | <jophish> | <Axman6 "hmm, actually I think both ways "> yeah, the little lists, but they're only 12001 elements long right? |
All times are in UTC.