Home liberachat/#haskell: Logs Calendar

Logs: liberachat/#haskell

←Prev  Next→ 1,804,221 events total
2021-08-21 20:59:27 <tomsmeding> where toExp is from this instance: https://hackage.haskell.org/package/haskell-src-meta-0.8.7/docs/src/Language.Haskell.Meta.Syntax.Translate.html#line-270
2021-08-21 21:00:02 <tomsmeding> oh right that references lots of other stuff too
2021-08-21 21:00:06 tomsmeding is really going now
2021-08-21 21:00:14 <maerwald> cheers
2021-08-21 21:01:26 pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
2021-08-21 21:04:55 oldsk00l joins (~znc@ec2-52-58-63-152.eu-central-1.compute.amazonaws.com)
2021-08-21 21:05:05 <amesgen[m]> String interpolators use haskell-src-meta in order to convert quoted text to TH Exps: https://gitlab.haskell.org/ghc/ghc/-/issues/19148
2021-08-21 21:05:49 <amesgen[m]> Interpolators like neat-interpolation don't use haskell-src-meta, but they only support interpolating variables and not arbitrary expressions.
2021-08-21 21:07:02 cheater1__ joins (~Username@user/cheater)
2021-08-21 21:07:04 × cheater quits (~Username@user/cheater) (Ping timeout: 250 seconds)
2021-08-21 21:07:06 cheater1__ is now known as cheater
2021-08-21 21:07:35 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
2021-08-21 21:08:27 <sm> amesgen++, informative
2021-08-21 21:08:30 o1lo01ol1o joins (~o1lo01ol1@5.181.115.89.rev.vodafone.pt)
2021-08-21 21:13:10 sm[i] joins (~user@plaintextaccounting/sm)
2021-08-21 21:15:02 <maerwald[m]> QuasiQuoters are just convenience, so we can certainly do without. It's just tedious work
2021-08-21 21:17:04 allbery_b joins (~geekosaur@xmonad/geekosaur)
2021-08-21 21:17:04 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b)))
2021-08-21 21:17:07 allbery_b is now known as geekosaur
2021-08-21 21:17:15 × sm[i]_ quits (~user@li229-222.members.linode.com) (Ping timeout: 258 seconds)
2021-08-21 21:17:39 × sm[i] quits (~user@plaintextaccounting/sm) (Remote host closed the connection)
2021-08-21 21:18:41 <sm> yes, it's a pity
2021-08-21 21:19:20 sm[i] joins (~user@plaintextaccounting/sm)
2021-08-21 21:19:46 <sclv> i wonder if there's enough parsing now exposed by ghc to obviate the need for haskell-src-meta
2021-08-21 21:20:00 <sclv> if not, maybe that would be good to fix :-)
2021-08-21 21:20:35 <sclv> Like we really just want a function `String -> UntypedTH` directly in ghc.exts or the like
2021-08-21 21:20:48 silver_ joins (~silver@37.214.30.4)
2021-08-21 21:21:30 <Guest2130> Can someone help me maybe understand where I'm going wrong with this lookup? Or point me in the right direction to get it working?
2021-08-21 21:22:23 <Guest2130> I am trying to get to the list in this benWalker = Student "Ben Walker" 19 Halifax [(SOFT, 62), (EASY, 42), (FULL, 62)]
2021-08-21 21:22:23 <sm> Guest2130, what's your latest code ?
2021-08-21 21:22:52 <Guest2130> It's literally just `lookup EASY x`
2021-08-21 21:23:04 <Guest2130> x being benWalker
2021-08-21 21:23:07 <sclv> `getList (Student _ _ _ l) = l`
2021-08-21 21:23:13 <monochrom> Use "pattern matching" as taught in your class.
2021-08-21 21:23:22 <Guest2130> Oh, pattern matching works here?
2021-08-21 21:23:40 <sclv> pattern match on Student -- its a data constructor, you can pattern match out of any data constructor
2021-08-21 21:23:43 <maerwald[m]> monochrom: your class? :D
2021-08-21 21:23:44 <monochrom> and sclv just showed what it looks like.
2021-08-21 21:23:52 <monochrom> No. Gladly.
2021-08-21 21:23:57 <sclv> jumped the gun, didn't realize how socratic we were trying to be :-)
2021-08-21 21:25:06 <monochrom> My class, I would have told them "pattern matching is your only option for working with algebraic data types" and they would not need to ask here.
2021-08-21 21:25:31 <monochrom> Right? During May-June no one came here asking like this.
2021-08-21 21:25:35 <Guest2130> Online teaching had been a bitch to us this year sadly
2021-08-21 21:25:46 × o1lo01ol1o quits (~o1lo01ol1@5.181.115.89.rev.vodafone.pt) (Remote host closed the connection)
2021-08-21 21:25:53 <monochrom> And you think my class didn't suffer just as much online teaching?
2021-08-21 21:26:24 o1lo01ol1o joins (~o1lo01ol1@5.181.115.89.rev.vodafone.pt)
2021-08-21 21:26:30 <monochrom> To be sure, to be fair, the other angle is that students have the tendency to ignore course material and listen to Google and stackoverflow.
2021-08-21 21:27:06 <monochrom> I would be really surprised if the course material had not shown examples like this.
2021-08-21 21:29:09 <monochrom> BTW said tendency had been amply observed long before COVID-19. In fact for over two decades.
2021-08-21 21:29:27 <monochrom> So, even predated SARS.
2021-08-21 21:30:28 <maerwald[m]> Some course material is worse than SO, though. I had a prof who thought teaching a new language is best achieved by exposing the student to ALL pitfalls. That was a nightmare for C++ and ruby.
2021-08-21 21:31:02 <monochrom> "Is that vaccination?" meme
2021-08-21 21:31:59 <monochrom> BTW I wouldn't complain about stackoverflow if it were right.
2021-08-21 21:33:32 <monochrom> I had a midterm test question, the correct answer was right there in my lecture slides staring at you. Stackoverflow had the wrong answer, probably still does. I had students who gave the Stackoverflow answer.
2021-08-21 21:33:41 wroathe joins (~wroathe@96-88-30-181-static.hfc.comcastbusiness.net)
2021-08-21 21:34:40 <monochrom> This one: https://stackoverflow.com/questions/36428098/c-how-to-check-if-my-input-bufferstdin-is-empty?rq=1
2021-08-21 21:34:55 <monochrom> fseek in stdin?! Excuse me?! What were they smoking?
2021-08-21 21:35:02 <monochrom> s/ in / on /
2021-08-21 21:37:16 <monochrom> And notice how the incorrect fseek solution got 2 votes, the correct "you must attempt reading before you can know" solution got 0 votes.
2021-08-21 21:37:40 superbil joins (~superbil@1-34-176-171.HINET-IP.hinet.net)
2021-08-21 21:40:17 jgeerds joins (~jgeerds@55d4b311.access.ecotel.net)
2021-08-21 21:41:33 <monochrom> Low quality courses regarding Haskell exist but AFAIK are low quality in a different way from C++ ones.
2021-08-21 21:42:40 <monochrom> Haskell ones would not be low quality for forgetting to teach you algebraic data types and pattern matching.
2021-08-21 21:43:59 <monochrom> The more likely kinds of low quality comes in: having too much faith in your recursion ability, having too much faith in your ability to understand advanced abstractions and generalizations.
2021-08-21 21:44:20 <monochrom> Telling you too early about laws and proofs.
2021-08-21 21:47:06 <monochrom> The one I was most badly-impressed by was about 5-10 years ago there was a homework question for implementing a list function that would end all list functions.
2021-08-21 21:47:44 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b)))
2021-08-21 21:47:44 allbery_b joins (~geekosaur@xmonad/geekosaur)
2021-08-21 21:47:47 allbery_b is now known as geekosaur
2021-08-21 21:47:56 <c_wraith> closer to 10 years ago, IIRC
2021-08-21 21:48:13 <monochrom> It took like 10 parameters (OK, 5) and based on the parameters you give you can obtain foldr, foldl, unfoldr, map, map-reduce, everything. And this is why it takes 5 parameters.
2021-08-21 21:48:44 <monochrom> So, going overboard with abstraction and generalization.
2021-08-21 21:49:24 <monochrom> And by today's standard a very misguided, ad-hoc one, too. We now understand that foldMap is the correct sweet spot.
2021-08-21 21:49:52 sagax joins (~sagax@213.138.71.146)
2021-08-21 21:51:41 <monochrom> I'm an old-geezer now, it all seemed like just yesterday to me. :)
2021-08-21 21:52:22 <monochrom> Anyone still remember CP/M? (OK I'll stop now haha.)
2021-08-21 21:53:19 <sm> yes, never used it though
2021-08-21 21:53:35 × derelict quits (~derelict@user/derelict) (Quit: WeeChat 3.2)
2021-08-21 21:53:49 <c_wraith> I remember people telling me how much better than DOS it was.
2021-08-21 22:02:09 aab joins (~aab@193.56.116.154)
2021-08-21 22:05:27 Guest4623 joins (~Guest46@182.64.179.3)
2021-08-21 22:05:43 × markpythonicbtc quits (~textual@2601:647:5a00:35:697a:eb38:2e9e:dc30) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2021-08-21 22:11:10 <Guest4623> Hey, I have a function `f :: a -> b -> c` . I want to memoize `f a` but `a` is not know at compile time (and also it is not Memoizable), however it is constant. How should I memoize it? Obviously I can't create `f' :: a -> b -> c` and call `memoize2` on it
2021-08-21 22:14:32 × silver_ quits (~silver@37.214.30.4) (Quit: Leaving)
2021-08-21 22:15:38 <hpc> what does "not known at compile time but consistent" mean in this context?
2021-08-21 22:15:55 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
2021-08-21 22:17:11 × o1lo01ol1o quits (~o1lo01ol1@5.181.115.89.rev.vodafone.pt) (Remote host closed the connection)
2021-08-21 22:18:34 o1lo01ol1o joins (~o1lo01ol1@5.181.115.89.rev.vodafone.pt)
2021-08-21 22:22:50 jtomas_ joins (~jtomas@233.red-83-34-2.dynamicip.rima-tde.net)
2021-08-21 22:24:19 × o1lo01ol1o quits (~o1lo01ol1@5.181.115.89.rev.vodafone.pt) (Ping timeout: 252 seconds)
2021-08-21 22:24:38 × acidjnk_new quits (~acidjnk@p200300d0c72b954921d359bc9986b356.dip0.t-ipconnect.de) (Ping timeout: 250 seconds)
2021-08-21 22:25:40 × Tuplanolla quits (~Tuplanoll@91-159-69-50.elisa-laajakaista.fi) (Quit: Leaving.)
2021-08-21 22:25:48 <Guest4623> essentially it reads the value of `a` from a file
2021-08-21 22:26:04 <dminuoso> And you want this memoized how exactly?
2021-08-21 22:26:10 <hpc> it reads the type from a file?
2021-08-21 22:27:10 × xff0x quits (~xff0x@2001:1a81:523e:7200:987e:5abc:19e1:66f6) (Ping timeout: 240 seconds)
2021-08-21 22:27:15 × jtomas_ quits (~jtomas@233.red-83-34-2.dynamicip.rima-tde.net) (Remote host closed the connection)
2021-08-21 22:27:26 <Guest4623> oops, bad notation, sorry. `a` refers to both type and the variable. The type is not memoizable and the variable is read from the file
2021-08-21 22:29:02 <Guest4623> I want to memoize it wrt the second parameter
2021-08-21 22:29:52 enoq joins (~enoq@2a05:1141:1f5:5600:b9c9:721a:599:bfe7)

All times are in UTC.