Home liberachat/#haskell: Logs Calendar

Logs: liberachat/#haskell

←Prev  Next→ 1,804,172 events total
2021-08-20 15:48:17 jess joins (~jess@libera/staff/jess)
2021-08-20 15:48:21 <c_wraith> I don't really think definitions ahead of use is important in a language where you can use things ahead of their definition anyway.
2021-08-20 15:48:23 <dsal> Yeah, that's where I am. I'm having a hard time describing why that's the case, other than, you know, we're using a declarative language.
2021-08-20 15:49:07 <c_wraith> there are exceptions. I'm more likely to use let inside of a case than attaching a where to a branch
2021-08-20 15:49:56 <c_wraith> and I'm more likely to use let if I can write the whole definition as a one-liner
2021-08-20 15:49:56 <dsal> Yeah. use `where` unless it makes the code worse.
2021-08-20 15:50:14 <c_wraith> like fix f = let x = f x in x
2021-08-20 15:50:14 <dsal> I especially don't like `let` for functions.
2021-08-20 15:50:33 <Rembane_> I mix them, I have had very particular tastes in both directions and now I just go with what my intuition wants me to.
2021-08-20 15:54:34 tzh joins (~tzh@c-24-21-73-154.hsd1.or.comcast.net)
2021-08-20 15:55:00 × zebrag quits (~chris@user/zebrag) (Quit: Konversation terminated!)
2021-08-20 15:59:45 oxide joins (~lambda@user/oxide)
2021-08-20 16:00:31 × MQ-17J quits (~MQ-17J@8.6.144.209) (Ping timeout: 252 seconds)
2021-08-20 16:00:46 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-08-20 16:02:58 lbseale joins (~lbseale@user/ep1ctetus)
2021-08-20 16:03:15 econo joins (uid147250@user/econo)
2021-08-20 16:04:16 <_bin> c_wraith: Thanks. If I'm looking at, say, scraping some web page, which of these might suit best? Would Earley suit for this?
2021-08-20 16:05:22 <c_wraith> if you're scraping web pages, I'd recommend not trying to write a parser that deals with the tire fire that is real-world HTML
2021-08-20 16:05:33 lavaman joins (~lavaman@98.38.249.169)
2021-08-20 16:05:53 <c_wraith> I'd go with something like https://hackage.haskell.org/package/tagsoup
2021-08-20 16:09:50 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 250 seconds)
2021-08-20 16:09:58 zaquest joins (~notzaques@5.128.210.178)
2021-08-20 16:10:56 <c_wraith> I do understand the appeal of writing your own parser, but that's better suited to environments where you can reject malformed inputs. HTML isn't such an environment
2021-08-20 16:11:45 × haskl quits (~haskl@98.37.78.63) (Changing host)
2021-08-20 16:11:45 haskl joins (~haskl@user/haskl)
2021-08-20 16:12:20 × o1lo01ol1o quits (~o1lo01ol1@bl13-86-242.dsl.telepac.pt) (Remote host closed the connection)
2021-08-20 16:13:01 o1lo01ol1o joins (~o1lo01ol1@bl13-86-242.dsl.telepac.pt)
2021-08-20 16:13:03 × o1lo01ol1o quits (~o1lo01ol1@bl13-86-242.dsl.telepac.pt) (Remote host closed the connection)
2021-08-20 16:13:19 burnsidesLlama joins (~burnsides@dhcp168-023.wadham.ox.ac.uk)
2021-08-20 16:13:38 o1lo01ol1o joins (~o1lo01ol1@bl13-86-242.dsl.telepac.pt)
2021-08-20 16:14:37 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 258 seconds)
2021-08-20 16:14:53 × o1lo01ol1o quits (~o1lo01ol1@bl13-86-242.dsl.telepac.pt) (Remote host closed the connection)
2021-08-20 16:15:07 o1lo01ol1o joins (~o1lo01ol1@bl13-86-242.dsl.telepac.pt)
2021-08-20 16:15:52 × o1lo01ol1o quits (~o1lo01ol1@bl13-86-242.dsl.telepac.pt) (Remote host closed the connection)
2021-08-20 16:17:38 × burnsidesLlama quits (~burnsides@dhcp168-023.wadham.ox.ac.uk) (Ping timeout: 250 seconds)
2021-08-20 16:18:30 × notzmv quits (~zmv@user/notzmv) (Ping timeout: 250 seconds)
2021-08-20 16:19:15 quantum joins (~quantum@user/quantum/x-8556232)
2021-08-20 16:20:07 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2021-08-20 16:21:42 <adamCS> arahael: Not sure if it will work but sometimes you can just do a bunch of "allow-newer" in cabal.project and then things work.
2021-08-20 16:23:45 × kuribas quits (~user@ptr-25vy0i7hpbjw2llku95.18120a2.ip6.access.telenet.be) (Remote host closed the connection)
2021-08-20 16:24:32 notzmv joins (~zmv@user/notzmv)
2021-08-20 16:34:26 shapr joins (~user@pool-100-36-247-68.washdc.fios.verizon.net)
2021-08-20 16:35:10 × hendursa1 quits (~weechat@user/hendursaga) (Quit: hendursa1)
2021-08-20 16:35:36 hendursaga joins (~weechat@user/hendursaga)
2021-08-20 16:36:23 <lechner> Hi, what does this error from ghci mean, please? "<command line>: cannot satisfy -package-id" https://paste.debian.net/1208358/
2021-08-20 16:40:22 <lechner> I cleaned up my builds with 'rm -rf' but have since built (although with debug symbols disabled in cabal)
2021-08-20 16:42:39 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-08-20 16:43:43 × qbt quits (~edun@user/edun) (Quit: Leaving)
2021-08-20 16:44:29 <sm> lechner: IIRC it might mean you should force reinstall tagtree
2021-08-20 16:44:31 <dsal> lechner: it just means you are requiring a package that can't be found.
2021-08-20 16:44:53 × derelict quits (~derelict@user/derelict) (Quit: WeeChat 3.2)
2021-08-20 16:46:10 × Boomerang quits (~Boomerang@xd520f68c.cust.hiper.dk) (Ping timeout: 252 seconds)
2021-08-20 16:47:20 oxide_ joins (~lambda@user/oxide)
2021-08-20 16:47:49 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
2021-08-20 16:48:04 <monochrom> When "let" and "where" are both legal, I am inclined to "where" because more people do this and it is easier to lay out. But there is an exception: when for educational purpose, in a few cases, the presentation goes better if the ingredients are presented before the composition punch line.
2021-08-20 16:50:04 <dsal> I argued from the other direction. I want to know the most important parts and then decide whether I need to look up something later.
2021-08-20 16:50:52 pavonia joins (~user@user/siracusa)
2021-08-20 16:50:55 <dsal> The example introduced two magic numbers and a function with a really obvious name with `let` as if knowing the details of these things helped me understand what was happening.
2021-08-20 16:51:30 × zaquest quits (~notzaques@5.128.210.178) (Quit: Leaving)
2021-08-20 16:52:45 zaquest joins (~notzaques@5.128.210.178)
2021-08-20 16:52:53 ubert1 joins (~Thunderbi@178.115.47.86.wireless.dyn.drei.com)
2021-08-20 16:53:06 <sm> wheres are easier to extract to a function since they can't depend on things above
2021-08-20 16:53:35 burnsidesLlama joins (~burnsides@dhcp168-023.wadham.ox.ac.uk)
2021-08-20 16:53:37 × oxide_ quits (~lambda@user/oxide) (Quit: oxide_)
2021-08-20 16:53:55 <sm> or even if not extracted, they make the chunks and dependencies within a large function clearer
2021-08-20 16:54:23 <lechner> sm dsal: thanks! tagtree was a local package. why would ghci require it? should i zap store/ghc-8.8.4/package.db/package.cache ?
2021-08-20 16:54:25 × ubert quits (~Thunderbi@178.115.64.138.wireless.dyn.drei.com) (Ping timeout: 252 seconds)
2021-08-20 16:54:25 ubert1 is now known as ubert
2021-08-20 16:56:26 <sm> and yes, sometimes it's useful to introduce things bottom, with let. I think this is more often so with complicated/not-well-understood operations, where you need to learn some new terms to even understand what the higher level thing is about
2021-08-20 16:56:38 <sm> bottom up
2021-08-20 16:57:34 <sm> lechner: I'd just try force reinstalling tagtree with your chosen haskell package manager
2021-08-20 16:58:05 <lechner> sm: i don't want it anymore. (it came from emanote)
2021-08-20 16:58:30 <dsal> I wrote so many qc properties as `counterexample s $ a == b`
2021-08-20 16:58:41 drd joins (~drd@93-39-151-19.ip76.fastwebnet.it)
2021-08-20 16:59:08 <dsal> lechner: I'm not very familiar with those problems. I use nix and stack and have a different set of problems. I just read the error. :)
2021-08-20 16:59:40 × burnsidesLlama quits (~burnsides@dhcp168-023.wadham.ox.ac.uk) (Ping timeout: 240 seconds)
2021-08-20 17:01:27 <sm> lechner: i see it's being included in the list of "core" libs in debug output when you just run ghci. I'm not sure why, maybe it really is needed ? In any case, I would try what I said, it's quick and would tell you something
2021-08-20 17:02:49 o1lo01ol1o joins (~o1lo01ol1@5.181.115.89.rev.vodafone.pt)
2021-08-20 17:02:57 <dsal> Maybe I should use my counterexample example. `s` needs `a` and `b` which are derived from arguments and are also needed for the comparison. It'd be silly to make the user read some of my gross printing code before seeing how values are constructed for comparison, but otherwise the values need to be passed down. In any case, the bulk of text might end up being only interesting if you need details on how an error condition is
2021-08-20 17:02:57 <dsal> explained.
2021-08-20 17:03:17 <sm> maybe you busted ghc's version of it with your hamfisted emanote install efforts ? :)
2021-08-20 17:06:32 <lechner> sm: maybe i should have used nix, after all. i just zapped, before reading your previous message, most of my (user) cabal directory. only ./bin and ./config are left. unfortunately, now i get https://paste.debian.net/1208362/
2021-08-20 17:07:01 <lechner> where does it learn that the user db should exist?
2021-08-20 17:07:26 <sm> original problem solved! :)
2021-08-20 17:07:39 <sm> maybe nuke .ghc also ?
2021-08-20 17:07:55 × o1lo01ol1o quits (~o1lo01ol1@5.181.115.89.rev.vodafone.pt) (Ping timeout: 268 seconds)
2021-08-20 17:11:46 <lechner> sm: yay! that worked. to keep my little red λ, i removed only some (other) build artifacts with rm -rf ~/.ghc/x86_64-linux-8.8.4/ thanks!
2021-08-20 17:12:21 <sm> great
2021-08-20 17:17:12 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-08-20 17:17:23 o1lo01ol1o joins (~o1lo01ol1@5.181.115.89.rev.vodafone.pt)
2021-08-20 17:17:32 oxide_ joins (~lambda@user/oxide)
2021-08-20 17:18:15 derelict joins (~derelict@user/derelict)
2021-08-20 17:18:37 × drd quits (~drd@93-39-151-19.ip76.fastwebnet.it) (Ping timeout: 252 seconds)
2021-08-20 17:19:48 × smitop quits (~smitop@user/smitop) (Quit: Ping timeout (120 seconds))
2021-08-20 17:20:35 smitop joins (~smitop@user/smitop)
2021-08-20 17:20:44 jakalx parts (~jakalx@base.jakalx.net) (Error from remote client)
2021-08-20 17:21:51 Erutuon joins (~Erutuon@user/erutuon)
2021-08-20 17:25:53 × notzmv quits (~zmv@user/notzmv) (Ping timeout: 248 seconds)
2021-08-20 17:28:16 × azeem quits (~azeem@dynamic-adsl-94-34-33-6.clienti.tiscali.it) (Ping timeout: 250 seconds)
2021-08-20 17:28:22 × dajoer quits (~david@user/gvx) (Quit: leaving)

All times are in UTC.