2025/01/05

Newest at the top

2025-01-05 21:59:43 +0100 <EvanR> what is this elvis operator you speak of
2025-01-05 21:58:16 +0100 <haskellbridge> <Profpatsch> that header concatenation screams “Builder” though
2025-01-05 21:57:50 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2025-01-05 21:56:46 +0100 <haskellbridge> <Profpatsch> other languages have ? and the elvis operator
2025-01-05 21:56:20 +0100 <EvanR> elsewhere in other languages you constantly hear "I have never ever needed or even seen a second layer of optional"
2025-01-05 21:55:48 +0100 <EvanR> there are so many layers of Maybe or Either in this code
2025-01-05 21:55:21 +0100 <EvanR> cool
2025-01-05 21:54:21 +0100homo(~homo@user/homo) homo
2025-01-05 21:53:23 +0100 <haskellbridge> <Profpatsch> EvanR: hush is usually :: Either e a -> Maybe a
2025-01-05 21:53:18 +0100Everything(~Everythin@195.138.86.118) Everything
2025-01-05 21:52:43 +0100weary-traveler(~user@user/user363627) user363627
2025-01-05 21:51:30 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2025-01-05 21:50:33 +0100merijn(~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 265 seconds)
2025-01-05 21:50:18 +0100homo(~homo@user/homo) (Quit: Leaving)
2025-01-05 21:49:59 +0100 <EvanR> what is the hush function
2025-01-05 21:49:58 +0100ash3en(~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) ash3en
2025-01-05 21:47:36 +0100 <EvanR> your lambda should be polymorphic in i (from IAuthBackend), which can then unify with i introduced by recoverSession. I don't know what goes wrong there
2025-01-05 21:45:46 +0100merijn(~merijn@128-137-045-062.dynamic.caiway.nl) merijn
2025-01-05 21:43:14 +0100 <EvanR> processing
2025-01-05 21:38:37 +0100connrs(~connrs@user/connrs) connrs
2025-01-05 21:36:03 +0100 <kaol> I fixed that dreaded couldn't match type error by moving the record assignment to another top level function. Some day I'll actually understand Haskell.
2025-01-05 21:34:46 +0100merijn(~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
2025-01-05 21:34:08 +0100lxsameer(~lxsameer@Serene/lxsameer) lxsameer
2025-01-05 21:31:57 +0100cheater(~Username@user/cheater) cheater
2025-01-05 21:29:32 +0100merijn(~merijn@128-137-045-062.dynamic.caiway.nl) merijn
2025-01-05 21:25:51 +0100driib318(~driib@vmi931078.contaboserver.net) (Quit: Ping timeout (120 seconds))
2025-01-05 21:25:48 +0100 <haskellbridge> <Profpatsch> Or https://hackage.haskell.org/package/bytestring-0.12.2.0/docs/Data-ByteString-Builder-RealFloat.html for floats
2025-01-05 21:25:26 +0100 <haskellbridge> <Profpatsch> kaol: https://hackage.haskell.org/package/bytestring-0.12.2.0/docs/Data-ByteString-Builder.html#g:12
2025-01-05 21:24:23 +0100 <haskellbridge> <Profpatsch> Which is a bunch of overhead, but might be mostly optimized away (I haven’t looked at the core output yet though!)
2025-01-05 21:24:04 +0100 <haskellbridge> <Profpatsch> kaol: I had the same question yesterday, the best I’d find is going through the Builder
2025-01-05 21:23:36 +0100 <kaol> This line used to work on GHC 8.8 (why upgrade too often?) but I get a "couldn't match type i1 with i" on GHC 9.6. Anyone spot anything obvious? https://github.com/kaol/snaplet-customauth/blob/master/Snap/Snaplet/CustomAuth/User.hs#L60
2025-01-05 21:18:37 +0100merijn(~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
2025-01-05 21:16:20 +0100 <kaol> Unless I builderize this whole thing. Maybe later.
2025-01-05 21:15:44 +0100 <kaol> It's okay for my use, I was just wondering if there was a particular standard library function that I missed.
2025-01-05 21:15:17 +0100cheater(~Username@user/cheater) (Ping timeout: 248 seconds)
2025-01-05 21:15:11 +0100 <EvanR> another idea is to use memoization to keep a cache of rendered numbers if they're usually small
2025-01-05 21:15:01 +0100 <int-e> there's the whole builder machinery in bytestring which includes formatting integers as decimal
2025-01-05 21:14:39 +0100connrs(~connrs@user/connrs) (Quit: ZNC 1.9.1 - https://znc.in)
2025-01-05 21:14:07 +0100merijn(~merijn@128-137-045-062.dynamic.caiway.nl) merijn
2025-01-05 21:13:56 +0100 <EvanR> and e.g. not be negative
2025-01-05 21:13:38 +0100 <EvanR> unless you can exploit assumptions about how big the number will get
2025-01-05 21:13:05 +0100dsrt^(dsrt@c-98-242-74-66.hsd1.ga.comcast.net)
2025-01-05 21:13:01 +0100 <EvanR> it's probably not worth trying to make a "fast" version of the underlying algorithm I suspect
2025-01-05 21:12:06 +0100 <EvanR> somewhere
2025-01-05 21:12:03 +0100 <EvanR> f = pack . show
2025-01-05 21:10:52 +0100Sgeo(~Sgeo@user/sgeo) Sgeo
2025-01-05 21:10:24 +0100 <kaol> Char8.pack that is, someone ate my dot.
2025-01-05 21:09:12 +0100 <kaol> Can I do better than Data.ByteString.Char8 pack $ show @Int n?
2025-01-05 21:08:47 +0100L29Ah(~L29Ah@wikipedia/L29Ah) L29Ah
2025-01-05 21:07:29 +0100Sgeo(~Sgeo@user/sgeo) (Read error: Connection reset by peer)