Home liberachat/#haskell: Logs Calendar

Logs: liberachat/#haskell

←Prev  Next→ 1,804,477 events total
2021-08-25 07:09:10 <tomsmeding> except you need to explicitly tell the compiler that you want to use it in names using LANGUAGE MagicHash
2021-08-25 07:09:57 <[exa]> siers: the # types sometimes have a slightly magical meaning for the compiler, e.g. it will may that it's really _the_ machine integer wrapper thingy
2021-08-25 07:10:19 <tomsmeding> yeah, that holds for Int# in this case
2021-08-25 07:10:41 buggymcbugfix joins (~buggymcbu@p4fcaa0a6.dip0.t-ipconnect.de)
2021-08-25 07:10:47 hannessteffenhag joins (~hannesste@ip4d14ffc8.dynamic.kabel-deutschland.de)
2021-08-25 07:10:48 <[exa]> I guess in this case the I# is there for adding the box around the Int inside
2021-08-25 07:11:17 <[exa]> and possibly disambiguating it from other types that just contain Int#
2021-08-25 07:11:48 × tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz)
2021-08-25 07:21:07 jtomas joins (~jtomas@233.red-83-34-2.dynamicip.rima-tde.net)
2021-08-25 07:21:12 <fendor> with pattern synonyms, can I have a pattern such as: `pattern RealSrcSpan x Nothing <- SrcLoc.RealSrcSpan x`. E.g. I wanna be backwards compatible add a constructor with a basically unused field
2021-08-25 07:21:41 <fendor> Currently, I get: "parse error on input 'Nothing'"
2021-08-25 07:21:57 <tomsmeding> fendor: if someone writes 'RealSrcSpan x y' in their code, what would y be bound to?
2021-08-25 07:22:08 <fendor> Nothing?
2021-08-25 07:22:50 <tomsmeding> what about `pattern RealSrcSpan x y <- ((,Nothing) -> (SrcLoc.RealSrcSpan x, y))`
2021-08-25 07:22:57 <tomsmeding> using ViewPatterns and TupleSections
2021-08-25 07:23:33 <fendor> looks really not sexy, but works, thanks! Ok, so every variable needs to bound on the rhs?
2021-08-25 07:23:43 × acidjnk_new3 quits (~acidjnk@p200300d0c72b9534e4a445cd6b407eb5.dip0.t-ipconnect.de) (Ping timeout: 250 seconds)
2021-08-25 07:23:45 <tomsmeding> the "it's always traverse" of applicative things becomes "it's always ViewPatterns" with patternsynonyms :p
2021-08-25 07:23:46 <tomsmeding> yeah
2021-08-25 07:23:57 <tomsmeding> it should translate a pattern to a pattern
2021-08-25 07:24:15 <tomsmeding> and ViewPatterns allows you to put arbitrary stuff in that pattern
2021-08-25 07:24:40 <fendor> I don't understand quite why it should be invalid to inject constants
2021-08-25 07:24:59 <tomsmeding> yeah what you wrote could easily be a shorthand for my version I guess
2021-08-25 07:25:24 <tomsmeding> though it's also ambiguous, because your code could also mean a specialisation of the RealSrcSpan pattern when its second argument is the pattern `Nothing`
2021-08-25 07:25:54 <tomsmeding> which... I'm not even sure is well defined to say; can you do case analysis on patterns themselves?
2021-08-25 07:25:59 Boomerang joins (~Boomerang@xd520f68c.cust.hiper.dk)
2021-08-25 07:26:19 <tomsmeding> but anyway I can see why the extension doesn't allow the syntax
2021-08-25 07:28:34 <fendor> no, I dont think you can...
2021-08-25 07:30:37 jdcain joins (~jdcain@2600:8804:1b96:4900::935)
2021-08-25 07:31:15 <fendor> thank you for the explanation, hopefully this was the last time I struggled with pattern synonyms
2021-08-25 07:31:21 <tomsmeding> :D
2021-08-25 07:35:58 × Cajun quits (~Cajun@user/cajun) (Ping timeout: 246 seconds)
2021-08-25 07:36:58 jakalx parts (~jakalx@base.jakalx.net) (Error from remote client)
2021-08-25 07:37:22 ubert joins (~Thunderbi@77.119.197.143.wireless.dyn.drei.com)
2021-08-25 07:37:52 × azeem quits (~azeem@176.201.15.223) (Ping timeout: 252 seconds)
2021-08-25 07:38:28 hgolden joins (~hgolden2@cpe-172-114-84-61.socal.res.rr.com)
2021-08-25 07:38:40 × ubert quits (~Thunderbi@77.119.197.143.wireless.dyn.drei.com) (Client Quit)
2021-08-25 07:39:22 × shriekingnoise quits (~shrieking@186.137.144.80) (Quit: Quit)
2021-08-25 07:40:13 azeem joins (~azeem@176.201.15.223)
2021-08-25 07:43:48 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-08-25 07:46:16 × sabhrd33 quits (~shawna@76.14.56.206) (Remote host closed the connection)
2021-08-25 07:47:33 lavaman joins (~lavaman@98.38.249.169)
2021-08-25 07:48:39 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:a8c1:f34:41fc:ef3d) (Remote host closed the connection)
2021-08-25 07:50:07 Gurkenglas joins (~Gurkengla@dslb-088-064-053-140.088.064.pools.vodafone-ip.de)
2021-08-25 07:50:46 ubert joins (~Thunderbi@77.119.197.143.wireless.dyn.drei.com)
2021-08-25 07:51:47 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 240 seconds)
2021-08-25 07:53:37 × favonia quits (~favonia@user/favonia) (Ping timeout: 250 seconds)
2021-08-25 07:59:17 × slowButPresent quits (~slowButPr@user/slowbutpresent) (Quit: leaving)
2021-08-25 08:01:19 cfricke joins (~cfricke@user/cfricke)
2021-08-25 08:08:40 × azeem quits (~azeem@176.201.15.223) (Ping timeout: 252 seconds)
2021-08-25 08:08:49 jakalx joins (~jakalx@base.jakalx.net)
2021-08-25 08:09:03 × pavonia quits (~user@user/siracusa) (Quit: Bye!)
2021-08-25 08:09:19 mc47 joins (~mc47@xmonad/TheMC47)
2021-08-25 08:10:28 ub joins (~Thunderbi@77.119.197.143.wireless.dyn.drei.com)
2021-08-25 08:10:30 azeem joins (~azeem@176.201.15.223)
2021-08-25 08:11:49 × Guest3591 quits (~chris@81.96.113.213) (Ping timeout: 250 seconds)
2021-08-25 08:12:33 × ub quits (~Thunderbi@77.119.197.143.wireless.dyn.drei.com) (Client Quit)
2021-08-25 08:14:03 hendursa1 joins (~weechat@user/hendursaga)
2021-08-25 08:14:10 × famubu quits (~famubu@user/famubu) (Ping timeout: 252 seconds)
2021-08-25 08:17:06 × hendursaga quits (~weechat@user/hendursaga) (Ping timeout: 244 seconds)
2021-08-25 08:17:39 allbery_b joins (~geekosaur@xmonad/geekosaur)
2021-08-25 08:17:39 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b)))
2021-08-25 08:17:42 allbery_b is now known as geekosaur
2021-08-25 08:19:07 × azeem quits (~azeem@176.201.15.223) (Ping timeout: 252 seconds)
2021-08-25 08:19:21 chris joins (~chris@81.96.113.213)
2021-08-25 08:19:25 chris is now known as Guest6130
2021-08-25 08:19:43 kuribas joins (~user@ptr-25vy0i7291ltmu3yh3q.18120a2.ip6.access.telenet.be)
2021-08-25 08:20:31 <kuribas> How do you deal with dead projects? The hexpat parser my library depends on has a last upload in 2017-06-21T23:58:54Z
2021-08-25 08:21:09 jgeerds joins (~jgeerds@55d4b311.access.ecotel.net)
2021-08-25 08:21:58 elf_fortres joins (~elf_fortr@adsl-72-50-4-46.prtc.net)
2021-08-25 08:22:00 azeem joins (~azeem@176.201.15.223)
2021-08-25 08:22:15 <tdammers> Not all code needs to be constantly changed in order to be useful
2021-08-25 08:22:31 <tdammers> So just because there haven't been any commits in a couple years doesn't mean you shouldn't use it
2021-08-25 08:22:49 aku joins (~aku@eagleflow.fi)
2021-08-25 08:23:21 <tdammers> if it's already broken (as in, doesn't compile cleanly on newer GHC versions), then I'll either find a replacement, or consider forking it and maintaining it myself
2021-08-25 08:23:33 <kuribas> it compiles, but I need a new feature (expanding namespaces).
2021-08-25 08:24:37 <tdammers> sometimes it's possible to implement additional features separately. It's not super elegant, but better than taking on maintainership of some legacy lib
2021-08-25 08:24:42 <kuribas> also: https://github.com/the-real-blackh/hexpat/issues/11
2021-08-25 08:25:10 <kuribas> tdammers: easiest would be to use the feature from the underlying C library, which requires patching.
2021-08-25 08:25:15 <tdammers> hmm, that one is a bit more disconcerting
2021-08-25 08:26:04 <kuribas> Otherwise I'd need to parse the xmlns in my library. But that's the wrong level of doing things IMO...
2021-08-25 08:26:52 <tdammers> in this case, I would consider either forking it and making the required changes (upgrade C dependency etc), or switching to a different XML parsing solution entirely
2021-08-25 08:26:55 <kuribas> tdammers: Or I'd fork the library...
2021-08-25 08:27:13 <kuribas> tdammers: hexpat is quite nice.
2021-08-25 08:27:29 <kuribas> erm expat...
2021-08-25 08:28:03 <kuribas> because it's fast *and* standard compliant.
2021-08-25 08:28:50 <kuribas> all these libraries that acquire speed by not properly parsing xml are rubbish IMO
2021-08-25 08:29:45 jippiedoe joins (~david@77-171-152-62.fixed.kpn.net)
2021-08-25 08:30:56 <kuribas> I can call it witchpat :-)
2021-08-25 08:31:11 <kuribas> (hex is witch in dutch)
2021-08-25 08:31:14 <c_wraith> "properly" parsing xml is a security risk
2021-08-25 08:31:20 <kuribas> c_wraith: ?
2021-08-25 08:31:54 <c_wraith> doing full custom entity processing allows carefully-crafted documents to scan your internal network and report the results to third parties
2021-08-25 08:32:13 <kuribas> xml allows arbitrary code execution?
2021-08-25 08:32:22 <c_wraith> it allows arbitrary URL fetching
2021-08-25 08:32:54 × jtomas quits (~jtomas@233.red-83-34-2.dynamicip.rima-tde.net) (Remote host closed the connection)
2021-08-25 08:33:11 <c_wraith> security standards these days are to not process custom entities.
2021-08-25 08:33:18 <tdammers> the beloved external entity hack
2021-08-25 08:33:42 <tdammers> custom entities are fine, but you need to disallow external entities
2021-08-25 08:33:57 × econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity)

All times are in UTC.