2023/08/24

2023-08-24 00:01:20 +0200notzmv(~zmv@user/notzmv) (Ping timeout: 246 seconds)
2023-08-24 00:01:36 +0200artem(~artem@73.145.242.113) (Read error: Connection reset by peer)
2023-08-24 00:02:10 +0200ph88(~ph88@ip5b403cd4.dynamic.kabel-deutschland.de)
2023-08-24 00:03:01 +0200ulysses4ever(~artem@73.145.242.113)
2023-08-24 00:03:28 +0200 <ph88> is there a nice way to make a "double" foldM ? foldM2 :: (Foldable t, Monad m) => (c -> b -> a -> m b) -> c -> t b -> t a -> m c
2023-08-24 00:03:55 +0200sm(~sm@plaintextaccounting/sm)
2023-08-24 00:04:03 +0200dibblego(~dibblego@haskell/developer/dibblego) (Ping timeout: 252 seconds)
2023-08-24 00:04:38 +0200 <EvanR> would that do like a cross join
2023-08-24 00:05:08 +0200azimut(~azimut@gateway/tor-sasl/azimut)
2023-08-24 00:05:27 +0200 <EvanR> also -> m c) ?
2023-08-24 00:08:48 +0200Pickchea(~private@user/pickchea) (Quit: Leaving)
2023-08-24 00:09:04 +0200dibblego(~dibblego@116-255-1-151.ip4.superloop.au)
2023-08-24 00:09:04 +0200dibblego(~dibblego@116-255-1-151.ip4.superloop.au) (Changing host)
2023-08-24 00:09:04 +0200dibblego(~dibblego@haskell/developer/dibblego)
2023-08-24 00:11:20 +0200arahael(~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net)
2023-08-24 00:14:04 +0200dibblego(~dibblego@haskell/developer/dibblego) (Ping timeout: 256 seconds)
2023-08-24 00:15:24 +0200Sgeo(~Sgeo@user/sgeo)
2023-08-24 00:15:33 +0200dibblego(~dibblego@116.255.1.151)
2023-08-24 00:15:33 +0200dibblego(~dibblego@116.255.1.151) (Changing host)
2023-08-24 00:15:33 +0200dibblego(~dibblego@haskell/developer/dibblego)
2023-08-24 00:15:46 +0200arahael(~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 256 seconds)
2023-08-24 00:16:45 +0200michalz(~michalz@185.246.207.203) (Remote host closed the connection)
2023-08-24 00:17:57 +0200jabuxas(~jabuxas@user/jabuxas)
2023-08-24 00:20:45 +0200 <int-e> aww, I can't have newtype X b where X :: (a, b) -> X b
2023-08-24 00:22:10 +0200dibblego(~dibblego@haskell/developer/dibblego) (Ping timeout: 245 seconds)
2023-08-24 00:22:34 +0200 <int-e> (that particular type isn't useful; it's a bit oversimplified)
2023-08-24 00:24:33 +0200 <erisco> ph88, Applicative gives t a -> t b -> t (a, b) which you can then fold
2023-08-24 00:26:09 +0200 <erisco> int-e, you can quantify a but you'll be challenged to construct an X
2023-08-24 00:26:36 +0200dibblego(~dibblego@116-255-1-151.ip4.superloop.au)
2023-08-24 00:26:36 +0200dibblego(~dibblego@116-255-1-151.ip4.superloop.au) (Changing host)
2023-08-24 00:26:36 +0200dibblego(~dibblego@haskell/developer/dibblego)
2023-08-24 00:27:26 +0200 <int-e> erisco: It's supposed to be existentially quantified. And I don't have a plain `a` but something with actual operations (an MVar, specifically.)
2023-08-24 00:28:04 +0200gatekempt(~gatekempt@user/gatekempt) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2023-08-24 00:28:08 +0200 <ph88> foldM2 :: (Foldable t, Monad m) => (c -> b -> a -> m c) -> c -> t b -> t a -> m c typo*
2023-08-24 00:28:11 +0200 <int-e> erisco: It would ultimately make sense as a newtype at runtime, when types are erased. But GHC doesn't like it.
2023-08-24 00:28:57 +0200 <ph88> erisco, where is t a -> t b -> t (a, b) ?
2023-08-24 00:29:12 +0200 <erisco> mm I see, so you want newtype especially, not data
2023-08-24 00:30:08 +0200 <erisco> you can make a separate data type, but I am guessing that isn't helping you
2023-08-24 00:31:34 +0200 <int-e> Sure, I can. It's really no big deal, it would just feel nice to have.
2023-08-24 00:32:20 +0200ulysses4ever(~artem@73.145.242.113) (Read error: Connection reset by peer)
2023-08-24 00:33:48 +0200ulysses4ever(~artem@73.145.242.113)
2023-08-24 00:35:16 +0200 <erisco> ph88, (<*>) . fmap (,)
2023-08-24 00:38:04 +0200ulysses4ever(~artem@73.145.242.113) (Read error: Connection reset by peer)
2023-08-24 00:39:44 +0200 <ph88> > :t (<*>) . fmap (,)
2023-08-24 00:39:45 +0200 <lambdabot> <hint>:1:1: error: parse error on input ‘:’
2023-08-24 00:39:56 +0200 <geekosaur> no "> "
2023-08-24 00:40:29 +0200 <geekosaur> :t (<*>) . fmap (,)
2023-08-24 00:40:30 +0200 <lambdabot> Applicative f => f a1 -> f a2 -> f (a1, a2)
2023-08-24 00:41:05 +0200falafel(~falafel@216.68.6.51.dyn.plus.net)
2023-08-24 00:41:52 +0200bratwurst(~blaadsfa@2604:3d09:207f:f650:216:3eff:fe5a:a1f8)
2023-08-24 00:42:43 +0200 <geekosaur> :t \a b -> (,) <$> a <*> b
2023-08-24 00:42:44 +0200 <lambdabot> Applicative f => f a1 -> f a2 -> f (a1, a2)
2023-08-24 00:42:48 +0200 <geekosaur> same thing
2023-08-24 00:44:38 +0200 <geekosaur> or `liftA2 (,)`
2023-08-24 00:45:31 +0200hyvoid(~hyenavoid@222-0-178-69.static.gci.net) (Remote host closed the connection)
2023-08-24 00:46:01 +0200wroathe(~wroathe@user/wroathe)
2023-08-24 00:47:05 +0200justsomeguy(~justsomeg@user/justsomeguy)
2023-08-24 00:48:56 +0200 <[Leary]> :t \f -> foldMap . foldMap f
2023-08-24 00:48:57 +0200 <lambdabot> (Monoid m, Foldable t1, Foldable t2) => (a1 -> a2 -> m) -> t2 a1 -> t1 a2 -> m
2023-08-24 00:49:26 +0200 <geekosaur> not quite what they asked for
2023-08-24 00:49:55 +0200 <int-e> erisco: in case you're interested in context: https://github.com/int-e/ivar-simple/issues/1#issuecomment-1690744097
2023-08-24 00:50:28 +0200 <[Leary]> geekosaur: Should be if you use with `newtype EndoM m a = EndoM (a -> m a)`.
2023-08-24 00:50:38 +0200 <[Leary]> For the Monoid.
2023-08-24 00:51:00 +0200Tuplanolla(~Tuplanoll@91-159-68-236.elisa-laajakaista.fi) (Quit: Leaving.)
2023-08-24 00:51:01 +0200 <[Leary]> Though it's not clear if they want zippy or cartesion behaviour.
2023-08-24 00:51:38 +0200 <[Leary]> ph88: ^
2023-08-24 00:53:22 +0200 <ph88> [Leary], cartesian
2023-08-24 00:55:46 +0200 <[Leary]> > (\f -> foldMap . foldMap f) (\a b -> [(a, b)]) "Hello" "world"
2023-08-24 00:55:48 +0200 <lambdabot> [('H','w'),('e','w'),('l','w'),('l','w'),('o','w'),('H','o'),('e','o'),('l',...
2023-08-24 00:56:16 +0200 <[Leary]> Yep, cartesian.
2023-08-24 00:58:46 +0200sm(~sm@plaintextaccounting/sm) (Quit: sm)
2023-08-24 00:59:37 +0200 <ph88> [Leary], i need foldM behavior with an accumulator and monadic action. Not all elemens of the two foldables should end up being used
2023-08-24 01:01:30 +0200 <ph88> :t \f a b -> foldM f c ((,) <$> a <*> b)
2023-08-24 01:01:31 +0200 <lambdabot> (Foldable t, Monad m, Applicative t) => (Expr -> (a1, a2) -> m Expr) -> t a1 -> t a2 -> m Expr
2023-08-24 01:02:02 +0200 <ph88> maybe this is the best which can be done
2023-08-24 01:02:12 +0200 <[Leary]> Did you see the `EndoM` monoid I wrote above? It should get you there.
2023-08-24 01:02:39 +0200 <ph88> with newtype ?
2023-08-24 01:02:45 +0200 <[Leary]> Yes.
2023-08-24 01:08:26 +0200 <[Leary]> :t \f t1 t2 -> appEndoM $ (foldMap . foldMap (\a b -> EndoM (f a b))) t1 t2
2023-08-24 01:08:27 +0200 <lambdabot> (Monad m, Foldable t1, Foldable t2) => (t3 -> a1 -> a2 -> m a2) -> t2 t3 -> t1 a1 -> a2 -> m a2
2023-08-24 01:09:38 +0200 <[Leary]> :t \f t1 t2 -> appEndoM . getDual $ (foldMap . foldMap (\a b -> Dual (EndoM (f a b)))) t1 t2
2023-08-24 01:09:40 +0200 <lambdabot> (Monad m, Foldable t1, Foldable t2) => (t3 -> a1 -> a2 -> m a2) -> t2 t3 -> t1 a1 -> a2 -> m a2
2023-08-24 01:10:10 +0200ystael(~ystael@user/ystael) (Ping timeout: 256 seconds)
2023-08-24 01:13:29 +0200 <ph88> interesting solution, i have never seen EndoM
2023-08-24 01:15:49 +0200 <ddellacosta> ski: thanks, didn't know about any of those resources
2023-08-24 01:18:00 +0200Pixi(~Pixi@user/pixi) (Ping timeout: 245 seconds)
2023-08-24 01:18:43 +0200 <[Leary]> It's essentially just `Kleisli` with the input and output forced to unify. A slightly broader construction would be `newtype Cat c a = Cat{ appCat :: c a a }; instance Category c => Semigroup (Cat c a) where Cat c1 <> Cat c2 = Cat (c1 . c2); instance Category c => Monoid (Cat c a) where mempty = Cat id`. Then `Endo` ~ `Cat (->)` and `EndoM` ~ `Cat Kleisli`, etc.
2023-08-24 01:21:35 +0200 <[Leary]> Err, `EndoM m` ~ `Cat (Kleisli m)`.
2023-08-24 01:25:37 +0200mud(~mud@user/kadoban) (Quit: quit)
2023-08-24 01:34:03 +0200drewjose5(~drewjose@223.178.84.241)
2023-08-24 01:34:45 +0200bitdex_(~bitdex@gateway/tor-sasl/bitdex) (Quit: = "")
2023-08-24 01:34:51 +0200drewjose(~drewjose@223.178.80.68) (Ping timeout: 246 seconds)
2023-08-24 01:34:51 +0200drewjose5drewjose
2023-08-24 01:35:48 +0200Pixi(~Pixi@user/pixi)
2023-08-24 01:35:54 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 246 seconds)
2023-08-24 01:44:44 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Ping timeout: 256 seconds)
2023-08-24 01:45:10 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915)
2023-08-24 01:46:03 +0200bratwurst(~blaadsfa@2604:3d09:207f:f650:216:3eff:fe5a:a1f8) (Ping timeout: 244 seconds)
2023-08-24 01:48:01 +0200ulysses4ever(~artem@2601:408:c405:84e:f474:e3f8:9806:671)
2023-08-24 01:48:44 +0200bratwurst(~blaadsfa@2604:3d09:207f:f650:216:3eff:fe5a:a1f8)
2023-08-24 01:54:24 +0200wroathe(~wroathe@207-153-38-140.fttp.usinternet.com)
2023-08-24 01:54:24 +0200wroathe(~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
2023-08-24 01:54:24 +0200wroathe(~wroathe@user/wroathe)
2023-08-24 02:01:16 +0200artem(~artem@c-73-103-90-145.hsd1.in.comcast.net)
2023-08-24 02:03:52 +0200Unicorn_Princess(~Unicorn_P@user/Unicorn-Princess/x-3540542) (Remote host closed the connection)
2023-08-24 02:04:00 +0200ulysses4ever(~artem@2601:408:c405:84e:f474:e3f8:9806:671) (Ping timeout: 256 seconds)
2023-08-24 02:08:13 +0200fweht(uid404746@id-404746.lymington.irccloud.com) (Quit: Connection closed for inactivity)
2023-08-24 02:10:52 +0200ph88(~ph88@ip5b403cd4.dynamic.kabel-deutschland.de) (Quit: Leaving)
2023-08-24 02:17:34 +0200cyphase_eviltwin(~cyphase@user/cyphase) (Ping timeout: 244 seconds)
2023-08-24 02:19:10 +0200bratwurst(~blaadsfa@2604:3d09:207f:f650:216:3eff:fe5a:a1f8) (Quit: Leaving)
2023-08-24 02:22:15 +0200cyphase(~cyphase@user/cyphase)
2023-08-24 02:29:27 +0200falafel(~falafel@216.68.6.51.dyn.plus.net) (Ping timeout: 246 seconds)
2023-08-24 02:36:49 +0200tabemann_tabemann
2023-08-24 02:37:10 +0200smalltalkman(uid545680@id-545680.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
2023-08-24 02:45:28 +0200cyphase(~cyphase@user/cyphase) (Ping timeout: 244 seconds)
2023-08-24 02:46:46 +0200jabuxas(~jabuxas@user/jabuxas) (Quit: Leaving.)
2023-08-24 02:48:12 +0200mima(~mmh@62.216.211.151) (Ping timeout: 248 seconds)
2023-08-24 02:50:41 +0200lisbeths(uid135845@id-135845.lymington.irccloud.com)
2023-08-24 02:51:27 +0200cyphase(~cyphase@user/cyphase)
2023-08-24 02:53:37 +0200Guest54(~Guest54@d-23-244-128-169.nh.cpe.atlanticbb.net)
2023-08-24 02:54:25 +0200tzh(~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz)
2023-08-24 02:54:56 +0200 <Guest54> everyone is quiet?
2023-08-24 02:56:14 +0200Guest54(~Guest54@d-23-244-128-169.nh.cpe.atlanticbb.net) (Client Quit)
2023-08-24 02:57:53 +0200 <shapr> ha, we escaped
2023-08-24 03:10:39 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
2023-08-24 03:15:27 +0200td_(~td@i5387092B.versanet.de) (Ping timeout: 252 seconds)
2023-08-24 03:16:47 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8)
2023-08-24 03:17:23 +0200td_(~td@i5387091F.versanet.de)
2023-08-24 03:19:43 +0200artem(~artem@c-73-103-90-145.hsd1.in.comcast.net) (Read error: Connection reset by peer)
2023-08-24 03:19:48 +0200ulysses4ever(~artem@c-73-103-90-145.hsd1.in.comcast.net)
2023-08-24 03:22:58 +0200 <erisco> \
2023-08-24 03:23:49 +0200nate2(~nate@c-98-45-169-16.hsd1.ca.comcast.net)
2023-08-24 03:27:45 +0200machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net)
2023-08-24 03:29:09 +0200nate2(~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 246 seconds)
2023-08-24 03:29:36 +0200razetime(~quassel@117.254.37.91)
2023-08-24 03:34:04 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer)
2023-08-24 03:43:42 +0200razetime(~quassel@117.254.37.91) (Ping timeout: 245 seconds)
2023-08-24 03:44:17 +0200razetime(~quassel@117.254.36.242)
2023-08-24 03:50:31 +0200razetime(~quassel@117.254.36.242) (Ping timeout: 246 seconds)
2023-08-24 03:50:55 +0200razetime(~quassel@117.254.37.173)
2023-08-24 03:58:22 +0200jmcantrell(~weechat@user/jmcantrell) (Quit: WeeChat 4.0.4)
2023-08-24 03:58:56 +0200jmcantrell(~weechat@user/jmcantrell)
2023-08-24 03:59:10 +0200jmcantrell(~weechat@user/jmcantrell) (Client Quit)
2023-08-24 04:01:24 +0200jmcantrell(~weechat@user/jmcantrell)
2023-08-24 04:04:16 +0200ryanbooker(uid4340@id-4340.hampstead.irccloud.com)
2023-08-24 04:04:50 +0200segfaultfizzbuzz(~segfaultf@23-93-74-212.fiber.dynamic.sonic.net) (Remote host closed the connection)
2023-08-24 04:07:42 +0200razetime(~quassel@117.254.37.173) (Ping timeout: 252 seconds)
2023-08-24 04:08:06 +0200razetime(~quassel@117.254.37.189)
2023-08-24 04:08:43 +0200artem(~artem@c-73-103-90-145.hsd1.in.comcast.net)
2023-08-24 04:08:44 +0200ulysses4ever(~artem@c-73-103-90-145.hsd1.in.comcast.net) (Read error: Connection reset by peer)
2023-08-24 04:10:07 +0200mud(~mud@user/kadoban)
2023-08-24 04:12:31 +0200hyvoid(~hyenavoid@222-0-178-69.static.gci.net)
2023-08-24 04:17:24 +0200nate2(~nate@c-98-45-169-16.hsd1.ca.comcast.net)
2023-08-24 04:25:16 +0200caryhartline(~caryhartl@168.182.58.169) (Quit: caryhartline)
2023-08-24 04:26:49 +0200Volt_(~Volt_@c-73-47-181-152.hsd1.ma.comcast.net) (Remote host closed the connection)
2023-08-24 04:34:16 +0200xff0x(~xff0x@2405:6580:b080:900:ac2a:af6b:2973:1b48) (Ping timeout: 246 seconds)
2023-08-24 04:37:57 +0200dibblego(~dibblego@haskell/developer/dibblego) (Ping timeout: 252 seconds)
2023-08-24 04:42:09 +0200dibblego(~dibblego@116.255.1.151)
2023-08-24 04:42:09 +0200dibblego(~dibblego@116.255.1.151) (Changing host)
2023-08-24 04:42:09 +0200dibblego(~dibblego@haskell/developer/dibblego)
2023-08-24 04:46:08 +0200td_(~td@i5387091F.versanet.de) (Ping timeout: 246 seconds)
2023-08-24 04:47:59 +0200td_(~td@i53870930.versanet.de)
2023-08-24 04:48:56 +0200machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 246 seconds)
2023-08-24 04:50:24 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
2023-08-24 04:50:24 +0200finn_elija(~finn_elij@user/finn-elija/x-0085643)
2023-08-24 04:50:24 +0200finn_elijaFinnElija
2023-08-24 04:50:46 +0200smalltalkman(uid545680@id-545680.hampstead.irccloud.com)
2023-08-24 05:03:25 +0200dibblego(~dibblego@haskell/developer/dibblego) (Ping timeout: 245 seconds)
2023-08-24 05:07:39 +0200ddellacosta(~ddellacos@146.70.168.100) (Ping timeout: 252 seconds)
2023-08-24 05:08:00 +0200waleee(~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) (Ping timeout: 245 seconds)
2023-08-24 05:08:17 +0200dibblego(~dibblego@116-255-1-151.ip4.superloop.au)
2023-08-24 05:08:17 +0200dibblego(~dibblego@116-255-1-151.ip4.superloop.au) (Changing host)
2023-08-24 05:08:17 +0200dibblego(~dibblego@haskell/developer/dibblego)
2023-08-24 05:10:22 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
2023-08-24 05:10:35 +0200ddellacosta(~ddellacos@146.70.171.100)
2023-08-24 05:10:40 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan)
2023-08-24 05:11:28 +0200ddellacosta(~ddellacos@146.70.171.100) (Client Quit)
2023-08-24 05:13:11 +0200tzh(~tzh@c-24-21-73-154.hsd1.or.comcast.net)
2023-08-24 05:17:56 +0200ddellacosta(~ddellacos@146.70.165.10)
2023-08-24 05:18:39 +0200nate2(~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 252 seconds)
2023-08-24 05:22:30 +0200Square2(~Square4@user/square) (Ping timeout: 252 seconds)
2023-08-24 05:24:15 +0200xff0x(~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp)
2023-08-24 05:36:45 +0200shapr(~user@2600:1700:c640:3100:a991:ffa8:c9bc:d5d1) (Ping timeout: 248 seconds)
2023-08-24 05:39:01 +0200razetime(~quassel@117.254.37.189) (Ping timeout: 260 seconds)
2023-08-24 05:46:09 +0200td_(~td@i53870930.versanet.de) (Ping timeout: 252 seconds)
2023-08-24 05:48:05 +0200td_(~td@i5387091E.versanet.de)
2023-08-24 05:58:23 +0200aforemny_(~aforemny@i59F516DA.versanet.de)
2023-08-24 05:58:50 +0200aforemny(~aforemny@2001:9e8:6cf2:c700:b41f:8d5e:8e07:ee66) (Ping timeout: 245 seconds)
2023-08-24 05:59:56 +0200NewtonTrendy(~ubuntu@user/bopqod) (Quit: WeeChat 3.5)
2023-08-24 05:59:57 +0200bliminse(~bliminse@user/bliminse) (Ping timeout: 245 seconds)
2023-08-24 06:00:11 +0200powderhorn(~powderhor@207-153-12-54.static.fttp.usinternet.com) (Ping timeout: 246 seconds)
2023-08-24 06:08:14 +0200_ht(~Thunderbi@28-52-174-82.ftth.glasoperator.nl)
2023-08-24 06:11:20 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 245 seconds)
2023-08-24 06:14:00 +0200ryanbooker(uid4340@id-4340.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
2023-08-24 06:20:39 +0200bliminse(~bliminse@user/bliminse)
2023-08-24 06:23:05 +0200ulysses4ever(~artem@c-73-103-90-145.hsd1.in.comcast.net)
2023-08-24 06:23:05 +0200artem(~artem@c-73-103-90-145.hsd1.in.comcast.net) (Read error: Connection reset by peer)
2023-08-24 06:27:33 +0200ell7(~ellie@user/ellie)
2023-08-24 06:27:46 +0200_xor1(~xor@ip-50-5-233-250.dynamic.fuse.net)
2023-08-24 06:27:53 +0200beaky_(~beaky@2a03:b0c0:0:1010::1e:a001)
2023-08-24 06:27:55 +0200lexi-lambda_(sid92601@id-92601.hampstead.irccloud.com)
2023-08-24 06:27:58 +0200meooow(~meooow@165.232.184.169)
2023-08-24 06:28:00 +0200danso_o(~danso@user/danso)
2023-08-24 06:28:00 +0200T_S___(sid501726@id-501726.uxbridge.irccloud.com)
2023-08-24 06:28:06 +0200aristid_(sid1599@id-1599.uxbridge.irccloud.com)
2023-08-24 06:28:07 +0200agander_m_(sid407952@id-407952.tinside.irccloud.com)
2023-08-24 06:28:11 +0200hamishmack_(sid389057@id-389057.hampstead.irccloud.com)
2023-08-24 06:28:22 +0200NemesisD_(sid24071@id-24071.lymington.irccloud.com)
2023-08-24 06:28:29 +0200Philonous(~Philonous@user/philonous)
2023-08-24 06:28:31 +0200codedmart_(codedmart@2600:3c01::f03c:92ff:fefe:8511)
2023-08-24 06:29:48 +0200xnbya2(~xnbya@2a01:4f8:c17:cbdd::1)
2023-08-24 06:29:49 +0200ladyfriday(~robert@what.i.hope.is.not.a.tabernaevagant.es)
2023-08-24 06:29:59 +0200piele(~piele@tbonesteak.creativeserver.net)
2023-08-24 06:30:43 +0200mal1(~mal@ns2.wyrd.be)
2023-08-24 06:30:45 +0200stilgart_(~Christoph@chezlefab.net)
2023-08-24 06:30:46 +0200maxfan8(~max@2a01:4f8:192:5356::2)
2023-08-24 06:30:52 +0200s4msung(cDjJALwvGU@user/s4msung)
2023-08-24 06:31:00 +0200bah(~bah@l1.tel)
2023-08-24 06:31:08 +0200eugenrh_(~eugenrh@2a01:4f9:c011:265::1)
2023-08-24 06:31:12 +0200int-e_(~noone@int-e.eu)
2023-08-24 06:31:14 +0200kosmikus_(~kosmikus@nullzig.kosmikus.org)
2023-08-24 06:31:22 +0200kawzeg_(kawzeg@2a01:7e01::f03c:92ff:fee2:ec34)
2023-08-24 06:31:31 +0200dyniec_(~dyniec@mail.dybiec.info)
2023-08-24 06:34:37 +0200adamCS_(~adamCS@ec2-34-207-160-255.compute-1.amazonaws.com)
2023-08-24 06:35:30 +0200eugenrh(~eugenrh@2a01:4f9:c011:265::1) (*.net *.split)
2023-08-24 06:35:30 +0200shailangsa_(~shailangs@host86-186-196-224.range86-186.btcentralplus.com) (*.net *.split)
2023-08-24 06:35:30 +0200_xor(~xor@ip-50-5-233-250.dynamic.fuse.net) (*.net *.split)
2023-08-24 06:35:30 +0200Raito_Bezarius(~Raito@wireguard/tunneler/raito-bezarius) (*.net *.split)
2023-08-24 06:35:30 +0200dyniec(~dyniec@mail.dybiec.info) (*.net *.split)
2023-08-24 06:35:30 +0200stilgart(~Christoph@chezlefab.net) (*.net *.split)
2023-08-24 06:35:30 +0200maxfan8_(~max@2a01:4f8:192:5356::2) (*.net *.split)
2023-08-24 06:35:30 +0200mrmonday(~robert@what.i.hope.is.not.a.tabernaevagant.es) (*.net *.split)
2023-08-24 06:35:30 +0200kosmikus(~kosmikus@nullzig.kosmikus.org) (*.net *.split)
2023-08-24 06:35:30 +0200beaky(~beaky@2a03:b0c0:0:1010::1e:a001) (*.net *.split)
2023-08-24 06:35:30 +0200hamishmack(sid389057@id-389057.hampstead.irccloud.com) (*.net *.split)
2023-08-24 06:35:30 +0200agander_m(sid407952@id-407952.tinside.irccloud.com) (*.net *.split)
2023-08-24 06:35:30 +0200lieven(~mal@ns2.wyrd.be) (*.net *.split)
2023-08-24 06:35:30 +0200kawzeg(kawzeg@2a01:7e01::f03c:92ff:fee2:ec34) (*.net *.split)
2023-08-24 06:35:30 +0200codedmart(codedmart@2600:3c01::f03c:92ff:fefe:8511) (*.net *.split)
2023-08-24 06:35:30 +0200lexi-lambda(sid92601@id-92601.hampstead.irccloud.com) (*.net *.split)
2023-08-24 06:35:30 +0200aristid(sid1599@id-1599.uxbridge.irccloud.com) (*.net *.split)
2023-08-24 06:35:30 +0200T_S__(sid501726@id-501726.uxbridge.irccloud.com) (*.net *.split)
2023-08-24 06:35:30 +0200xnbya(~xnbya@2a01:4f8:c17:cbdd::1) (*.net *.split)
2023-08-24 06:35:30 +0200Philonous_(~Philonous@user/philonous) (*.net *.split)
2023-08-24 06:35:30 +0200meooow_(~meooow@165.232.184.169) (*.net *.split)
2023-08-24 06:35:30 +0200piele_(~piele@tbonesteak.creativeserver.net) (*.net *.split)
2023-08-24 06:35:30 +0200adamCS(~adamCS@ec2-34-207-160-255.compute-1.amazonaws.com) (*.net *.split)
2023-08-24 06:35:30 +0200bah_(~bah@l1.tel) (*.net *.split)
2023-08-24 06:35:30 +0200sviermsung(spxLkMy9HV@user/s4msung) (*.net *.split)
2023-08-24 06:35:30 +0200NemesisD(sid24071@id-24071.lymington.irccloud.com) (*.net *.split)
2023-08-24 06:35:30 +0200int-e(~noone@int-e.eu) (*.net *.split)
2023-08-24 06:35:30 +0200danso(~danso@user/danso) (*.net *.split)
2023-08-24 06:35:30 +0200ell(~ellie@user/ellie) (*.net *.split)
2023-08-24 06:35:30 +0200_xor1_xor
2023-08-24 06:35:30 +0200adamCS_adamCS
2023-08-24 06:35:30 +0200hamishmack_hamishmack
2023-08-24 06:35:31 +0200aristid_aristid
2023-08-24 06:35:31 +0200lexi-lambda_lexi-lambda
2023-08-24 06:35:31 +0200agander_m_agander_m
2023-08-24 06:35:31 +0200ell7ell
2023-08-24 06:35:32 +0200NemesisD_NemesisD
2023-08-24 06:36:10 +0200danso_o(~danso@user/danso) (Quit: quittin time)
2023-08-24 06:37:06 +0200mud(~mud@user/kadoban) (Quit: quit)
2023-08-24 06:38:19 +0200danso(~danso@user/danso)
2023-08-24 06:38:59 +0200jmcantrell(~weechat@user/jmcantrell) (Quit: WeeChat 4.0.4)
2023-08-24 06:39:48 +0200hueso(~root@user/hueso) (Read error: Connection reset by peer)
2023-08-24 06:40:17 +0200hueso(~root@user/hueso)
2023-08-24 06:40:21 +0200lisbeths(uid135845@id-135845.lymington.irccloud.com) (Quit: Connection closed for inactivity)
2023-08-24 06:43:52 +0200Raito_Bezarius(~Raito@wireguard/tunneler/raito-bezarius)
2023-08-24 06:44:21 +0200hueso(~root@user/hueso) (Read error: Connection reset by peer)
2023-08-24 06:44:57 +0200hueso(~root@user/hueso)
2023-08-24 06:50:57 +0200jmcantrell(~weechat@user/jmcantrell)
2023-08-24 06:55:03 +0200jmcantrell(~weechat@user/jmcantrell) (Client Quit)
2023-08-24 06:55:23 +0200jmcantrell(~weechat@user/jmcantrell)
2023-08-24 06:59:46 +0200razetime(~quassel@117.254.36.161)
2023-08-24 07:01:07 +0200kjak(~kjak@pool-108-28-157-148.washdc.fios.verizon.net)
2023-08-24 07:02:14 +0200kjak_(~kjak@pool-108-28-157-148.washdc.fios.verizon.net) (Ping timeout: 246 seconds)
2023-08-24 07:04:20 +0200phma_(~phma@host-67-44-208-2.hnremote.net)
2023-08-24 07:05:28 +0200jmcantrell(~weechat@user/jmcantrell) (Quit: WeeChat 4.0.4)
2023-08-24 07:05:46 +0200jmcantrell(~weechat@user/jmcantrell)
2023-08-24 07:07:53 +0200phma(~phma@2001:5b0:210b:c518:a8f7:d156:9d38:8d0d) (Ping timeout: 246 seconds)
2023-08-24 07:09:21 +0200michalz(~michalz@185.246.207.203)
2023-08-24 07:10:26 +0200shailangsa(~shailangs@host86-186-196-224.range86-186.btcentralplus.com)
2023-08-24 07:10:50 +0200dobblego(~dibblego@116.255.1.151)
2023-08-24 07:10:50 +0200dobblego(~dibblego@116.255.1.151) (Changing host)
2023-08-24 07:10:50 +0200dobblego(~dibblego@haskell/developer/dibblego)
2023-08-24 07:11:08 +0200dibblego(~dibblego@haskell/developer/dibblego) (Ping timeout: 256 seconds)
2023-08-24 07:11:33 +0200dobblegodibblego
2023-08-24 07:12:21 +0200phma(~phma@2001:5b0:210b:c518:9fdc:2c1a:1096:608b)
2023-08-24 07:14:55 +0200phma_(~phma@host-67-44-208-2.hnremote.net) (Ping timeout: 246 seconds)
2023-08-24 07:15:24 +0200razetime(~quassel@117.254.36.161) (Ping timeout: 246 seconds)
2023-08-24 07:15:34 +0200bgs(~bgs@212-85-160-171.dynamic.telemach.net)
2023-08-24 07:15:44 +0200nate2(~nate@c-98-45-169-16.hsd1.ca.comcast.net)
2023-08-24 07:15:58 +0200phma_(~phma@host-67-44-208-12.hnremote.net)
2023-08-24 07:16:01 +0200razetime(~quassel@117.254.36.19)
2023-08-24 07:17:33 +0200jmcantrell(~weechat@user/jmcantrell) (Quit: WeeChat 4.0.4)
2023-08-24 07:18:46 +0200phma(~phma@2001:5b0:210b:c518:9fdc:2c1a:1096:608b) (Ping timeout: 246 seconds)
2023-08-24 07:20:12 +0200nate2(~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 252 seconds)
2023-08-24 07:28:13 +0200razetime(~quassel@117.254.36.19) (Ping timeout: 246 seconds)
2023-08-24 07:28:42 +0200razetime(~quassel@117.254.37.211)
2023-08-24 07:31:02 +0200troydm1(~troydm@host-176-37-53-238.b025.la.net.ua)
2023-08-24 07:32:35 +0200troydm(~troydm@user/troydm) (Ping timeout: 245 seconds)
2023-08-24 07:32:54 +0200jbalint(~jbalint@2600:6c44:117f:e98a:816a:9488:fb1:7b7) (Ping timeout: 246 seconds)
2023-08-24 07:34:36 +0200danso(~danso@user/danso) (Quit: quittin time)
2023-08-24 07:35:09 +0200_ht(~Thunderbi@28-52-174-82.ftth.glasoperator.nl) (Quit: _ht)
2023-08-24 07:41:42 +0200akegalj(~akegalj@78-1-5-135.adsl.net.t-com.hr)
2023-08-24 07:45:23 +0200razetime(~quassel@117.254.37.211) (Ping timeout: 250 seconds)
2023-08-24 07:45:53 +0200razetime(~quassel@117.254.36.96)
2023-08-24 07:51:56 +0200razetime(~quassel@117.254.36.96) (Ping timeout: 256 seconds)
2023-08-24 07:52:03 +0200razetime(~quassel@117.254.36.71)
2023-08-24 07:57:32 +0200jonathan_(~jonathan@193.203.13.99)
2023-08-24 07:59:12 +0200briandaed(~briandaed@185.234.210.211.r.toneticgroup.pl)
2023-08-24 07:59:38 +0200danso(~danso@user/danso)
2023-08-24 08:00:54 +0200razetime(~quassel@117.254.36.71) (Ping timeout: 252 seconds)
2023-08-24 08:02:58 +0200razetime(~quassel@117.254.37.72)
2023-08-24 08:07:43 +0200razetime(~quassel@117.254.37.72) (Remote host closed the connection)
2023-08-24 08:08:36 +0200phma_phma
2023-08-24 08:15:33 +0200lortabac(~lortabac@2a01:e0a:541:b8f0:68c1:b14:aae3:ebd0)
2023-08-24 08:15:57 +0200Simikando(~Simikando@adsl-dyn1.91-127-51.t-com.sk)
2023-08-24 08:16:33 +0200Simikando(~Simikando@adsl-dyn1.91-127-51.t-com.sk) (Client Quit)
2023-08-24 08:17:15 +0200Simikando(~Simikando@91.127.51.1)
2023-08-24 08:19:42 +0200mdpete(~mdpete@46.143.114.151)
2023-08-24 08:19:56 +0200td_(~td@i5387091E.versanet.de) (Ping timeout: 245 seconds)
2023-08-24 08:20:44 +0200sm(~sm@plaintextaccounting/sm)
2023-08-24 08:21:44 +0200td_(~td@i5387091D.versanet.de)
2023-08-24 08:22:49 +0200 <mdpete> hi,I an absolute beginner to beautiful world of programming,I want to learn functional programming,I am reading Common LISP: A Gentle Introduction to Symbolic now,BUT my goal is learn Haskell
2023-08-24 08:23:06 +0200 <mdpete> do you thing it is a good start?
2023-08-24 08:23:20 +0200 <mdpete> I am planning to study scisp soon
2023-08-24 08:23:28 +0200acidjnk(~acidjnk@p200300d6e7072f45b92e9b7cc4c1bf67.dip0.t-ipconnect.de)
2023-08-24 08:27:51 +0200 <Helle> mdpete: I mean probably, my experience with having people start programming that it is important to pick an achievable goal in terms what to write in the language (or what project to work on)
2023-08-24 08:28:01 +0200 <Helle> learning without a goal in mind gets weird
2023-08-24 08:30:40 +0200 <mdpete> i have just got familiar with working with conditionals ,I love ideas behind them,
2023-08-24 08:31:16 +0200 <Helle> So I mean I would personally go straight to Haskell, but if you do learn something else first, C-LISP is honestly not bad
2023-08-24 08:31:16 +0200 <mdpete> would please introduce me where i can find projects or meaning ful things to do via haskell
2023-08-24 08:31:36 +0200 <Helle> I think most good programmers pick up languages quite readily once they get the general concepts
2023-08-24 08:31:56 +0200 <Helle> yes, my Haskell is a bit messy due to mainly writing other languages, but I still love Haskell, so I don't really care
2023-08-24 08:32:43 +0200 <[Leary]> mdpete: Common Lisp and Haskell are very different; I doubt one will prepare you for the other.
2023-08-24 08:33:00 +0200 <Helle> [Leary]: it won't prepare you, but it will give you the flexibility if you learn both
2023-08-24 08:33:24 +0200 <mdpete> please recommend a learning roadmap
2023-08-24 08:33:48 +0200 <mdpete> i have no university degree
2023-08-24 08:34:07 +0200 <mdpete> just finished highschool
2023-08-24 08:34:20 +0200 <Helle> I have no idea, I am self taught and was part of a group trying to write a "introduction to programming" first year, first course university thing and well, we realised that there is NO single method for people to learn programming (also you where exactly our target group)
2023-08-24 08:35:02 +0200 <Helle> the only consistent thing we found is that the most effective way is to start out having people in small groups solve problems in theory before writing code
2023-08-24 08:35:13 +0200 <Helle> but on your own that is uh, not how it works
2023-08-24 08:36:26 +0200 <[Leary]> @where cis194
2023-08-24 08:36:26 +0200 <lambdabot> <https://github.com/byorgey/haskell-course>,<https://www.seas.upenn.edu/~cis194/spring13/lectures.html>
2023-08-24 08:36:43 +0200 <[Leary]> mdpete: I learnt mostly by play, but enjoyed and benefited from this course. ^
2023-08-24 08:36:46 +0200 <Helle> [Leary]: yeah, that is not the worst one
2023-08-24 08:36:58 +0200 <Helle> I've read through that before :)
2023-08-24 08:37:36 +0200 <Helle> but idk, it requires quite some feel for compsci and math concepts already, though not quite for programming
2023-08-24 08:38:42 +0200 <Helle> it is actually genuinely an issue that learning how to program other then "by play" is unsolved
2023-08-24 08:39:01 +0200 <mdpete> are functional programming concepts the same?
2023-08-24 08:39:05 +0200 <Helle> yep
2023-08-24 08:39:16 +0200 <Helle> functional vs imperative is the big split
2023-08-24 08:39:38 +0200 <mdpete> i found more free scheme and clisp learning resources
2023-08-24 08:39:38 +0200 <c_wraith> well, really learning how to program requires spending time developing.... taste, for lack of a better word.
2023-08-24 08:39:47 +0200 <c_wraith> And that's not something you can get through drilling
2023-08-24 08:40:07 +0200 <c_wraith> It *has* to involve some kind of experimentation and feedback loop
2023-08-24 08:40:24 +0200 <Helle> c_wraith: yep, this has been the issue while we where trying to come up with a new course
2023-08-24 08:40:31 +0200 <Helle> where having
2023-08-24 08:40:57 +0200 <Helle> Like my feeling is that you have to treat students like they are in kindergarten in terms of how you let them learn
2023-08-24 08:41:10 +0200 <Helle> which is uh, yeah, weird to do to 18 year olds :)
2023-08-24 08:41:17 +0200arahael(~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net)
2023-08-24 08:42:22 +0200 <[Leary]> mdpete: IMO, pure vs impure is a much more substantial difference than functional vs imperative, so no. Rather, without purity you don't really have "functional" (in my conception).
2023-08-24 08:42:42 +0200 <Helle> [Leary]: agreed, but for me functional requires the purity as well
2023-08-24 08:44:13 +0200 <Helle> I mean the project I work on right now would be far less useful if not for purity, as it gets us so much performance for "free"
2023-08-24 08:45:30 +0200arahael(~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 245 seconds)
2023-08-24 08:45:47 +0200 <mdpete> so learnig a pure functional prgrming language first really is a better strategy?
2023-08-24 08:47:59 +0200Simikando(~Simikando@91.127.51.1) (Quit: Leaving)
2023-08-24 08:49:39 +0200 <drewjose> mdpete ideally, yes, but if you have limited time and just want to get started with being some sort of programmer, maybe a language that is impure and imperative would serve you better, because those are used more widely. Most of them also have added more "functional" features over the years
2023-08-24 08:50:03 +0200 <Helle> drewjose: in incredibly hackish ways
2023-08-24 08:50:22 +0200 <Helle> mdpete: the problem with learning to program is finding small enough incremental goals that work for you
2023-08-24 08:50:46 +0200 <drewjose> Helle of course, and if you use them in javascript you will be rewarded with awful performance
2023-08-24 08:51:03 +0200 <Helle> drewjose: and in Python you hurt your brain due to syntax and single expression
2023-08-24 08:51:51 +0200 <Helle> My Python ends up way to Lispy
2023-08-24 08:52:16 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2023-08-24 08:52:17 +0200 <Helle> Erlang can be an interesting place, it has the Prolog/Haskell syntax, but also more imperative features
2023-08-24 08:52:40 +0200 <mdpete> fortunately or unfortunately I started to learn functional programming first ,and I believe in finish a thing i have started
2023-08-24 08:52:59 +0200 <Helle> hehe
2023-08-24 08:54:05 +0200 <drewjose> awesome, it's not going to be that hard if you stick with Haskell (though laziness is not that common in other languages). My first functional programming language was scala and that wasn't a great experience
2023-08-24 08:54:41 +0200 <drewjose> If you want to try scheme read sicp
2023-08-24 08:54:55 +0200 <akegalj> would Racket be a good first language? Its a lisp like language with types (at least that's my intuition)
2023-08-24 08:55:46 +0200 <drewjose> Racket isn't statically typed by default
2023-08-24 08:55:52 +0200 <drewjose> You have to use Typed racket
2023-08-24 08:56:01 +0200 <Helle> Scala feels so non-functional, plus the Scala bros oooof
2023-08-24 08:56:25 +0200 <Helle> I'd rather deal with 30 academic Haskell men then 1 Scala bro
2023-08-24 08:59:02 +0200 <mdpete> are haskell resources an absolute beginner friendly? which books or other resources you recommend me ?
2023-08-24 08:59:11 +0200 <drewjose> https://haskellbook.com/
2023-08-24 08:59:32 +0200 <drewjose> is the most beginner friendly one I've found
2023-08-24 08:59:50 +0200 <drewjose> it's paid, though
2023-08-24 09:01:28 +0200 <akegalj> http://www.learnyouahaskell.com/ is a free book that I think is a good first book. There are ilustrations which help to create intuition around some concepts
2023-08-24 09:01:49 +0200 <akegalj> (some people don't think its a good first book though - but I like it)
2023-08-24 09:02:20 +0200 <Helle> akegalj: mmmmm, idk as a programming from first principles book
2023-08-24 09:02:27 +0200 <opqdonut> https://haskell.mooc.fi/ -- my course is simpler than haskellbook.com, but contains lots of exercises unlike LYAH
2023-08-24 09:03:51 +0200 <drewjose> opqdonut looks great! you made this?
2023-08-24 09:04:06 +0200 <opqdonut> yeah, mostly me
2023-08-24 09:05:56 +0200 <akegalj> yep, looks great
2023-08-24 09:06:09 +0200 <mdpete> i really appreciate it
2023-08-24 09:08:21 +0200 <tdammers> I'm not a fan of LYAH, personally - too many didactic lies for my taste, makes it easy to develop wrong intuitions (like the "monads are boxes" thing, which can be thoroughly unhelpful once you meet Monad instances that don't behave like boxes, or ones where the box analogy simply leads you to the wrong conclusions, like with lists)
2023-08-24 09:08:21 +0200L29Ah(~L29Ah@wikipedia/L29Ah) (Read error: Connection reset by peer)
2023-08-24 09:09:16 +0200 <drewjose> monads are burritos
2023-08-24 09:10:48 +0200 <opqdonut> yeah I wanted to teach monads "properly", which unfortunately meant that I had to cover a lot of ground before them
2023-08-24 09:11:01 +0200 <drewjose> I don't understand why the lyah site is http-only
2023-08-24 09:11:09 +0200 <Helle> I had to 100% wrap my head around monads my own way
2023-08-24 09:11:33 +0200 <Helle> could NOT follow any of the commonly given guides and even my lecturers went too hard on math for it
2023-08-24 09:12:01 +0200 <opqdonut> yeah just playing around with IO is what made it click for me, originally
2023-08-24 09:12:12 +0200 <Helle> yep
2023-08-24 09:12:32 +0200 <Helle> Funny part is that I now get it better then the main maintainer of the project I tend to work on
2023-08-24 09:12:42 +0200 <Helle> so this is going to be fun to explain
2023-08-24 09:13:26 +0200 <Hecate> playing with Maybe and Either gave me my best intuition for monads
2023-08-24 09:13:34 +0200 <Helle> Hecate: for me it was that mixed with IO
2023-08-24 09:13:47 +0200 <Helle> and then rewriting the same code 5 times to get it to be somewhat reasonable
2023-08-24 09:13:59 +0200Sgeo(~Sgeo@user/sgeo) (Read error: Connection reset by peer)
2023-08-24 09:14:34 +0200 <drewjose> 🌐 Yet Another Haskell Tutorial
2023-08-24 09:14:34 +0200 <drewjose> users.umiacs.umd.edu
2023-08-24 09:14:34 +0200 <drewjose> › ~hal › docs › daume02yaht.pdf
2023-08-24 09:14:34 +0200 <drewjose> PDF
2023-08-24 09:14:43 +0200 <drewjose> does it pretty well I think
2023-08-24 09:14:47 +0200 <drewjose> sorry for the formatting
2023-08-24 09:15:14 +0200 <drewjose> even though it is dated (it's from 2006!) http://users.umiacs.umd.edu/~hal/docs/daume02yaht.pdf
2023-08-24 09:15:14 +0200 <Helle> So the problem for monads is that there is definitely NOT one method to teach them
2023-08-24 09:15:36 +0200 <Helle> but like probably at least a dozen and you need to find the one that clicks for you, as the concept is just that "weird"
2023-08-24 09:16:10 +0200 <lortabac> I think Prelude should expose 'bindIO' and 'returnIO' so people can do IO without having to learn monads
2023-08-24 09:16:44 +0200 <Helle> probably
2023-08-24 09:16:56 +0200 <lortabac> then once they learn type-classes, they can learn that there is a class that unifies the ideas behind Maybe, Either, IO etc.
2023-08-24 09:17:00 +0200bgs(~bgs@212-85-160-171.dynamic.telemach.net) (Remote host closed the connection)
2023-08-24 09:17:05 +0200 <tdammers> Maybe, Either, IO; and then throw lists into the gears to erase some incorrect assumptions that may have formed
2023-08-24 09:17:08 +0200 <opqdonut> lortabac: yeah I think that's the best approach
2023-08-24 09:17:24 +0200 <Helle> lortabac: that basically resembles what I did to learn myself
2023-08-24 09:17:37 +0200 <Helle> and I have some wrong conceptions atleast remaining, but the code result is reasonable enough
2023-08-24 09:18:15 +0200 <lortabac> in other languages you can do IO very easily, in Haskell you are obliged to learn monads prematurely
2023-08-24 09:18:16 +0200 <tdammers> also, "eightfold path to monad satori"
2023-08-24 09:19:06 +0200 <Helle> lortabac: yeah, that is a definite feeling I had, this is why the way I got into serious Haskell coding was by working on an existing code base, so the monadic stuff was already in place
2023-08-24 09:21:29 +0200 <lortabac> people tend to think that monads are something "special" that gives you some kind of enlightenment, while (except the syntactic sugar) it's just an ordinary type-class
2023-08-24 09:21:37 +0200CiaoSen(~Jura@2a05:5800:29d:c900:664b:f0ff:fe37:9ef)
2023-08-24 09:21:47 +0200 <Helle> yep, realising that was key
2023-08-24 09:21:50 +0200 <lortabac> the only extraordinary thing about monads is that you have to learn them quickly to do IO
2023-08-24 09:22:37 +0200Guest16(~Guest16@ec2-13-232-74-226.ap-south-1.compute.amazonaws.com)
2023-08-24 09:22:42 +0200arahael(~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net)
2023-08-24 09:23:48 +0200Guest16(~Guest16@ec2-13-232-74-226.ap-south-1.compute.amazonaws.com) (Client Quit)
2023-08-24 09:23:59 +0200 <drewjose> but it's weird, when learning java to write hello world we had to type incantations like public static void etc., with whoever teaching asking the students to be patient and that all this magic would be explained in due time. People do not give the same leeway to haskell
2023-08-24 09:24:30 +0200 <dsal> The easiest way to learn monads is to stop trying to learn monads and write some code.
2023-08-24 09:25:00 +0200mima(~mmh@aftr-62-216-211-62.dynamic.mnet-online.de)
2023-08-24 09:25:14 +0200 <dsal> I had like, three experiences today where I wrote a dumb obvious property test and found a bug in code that I was pretty sure was correct. Property tests are smarter than I am.
2023-08-24 09:25:20 +0200 <Helle> dsal: yes and no, but eeeh
2023-08-24 09:27:10 +0200arahael(~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 245 seconds)
2023-08-24 09:27:48 +0200hgolden(~hgolden@2603:8000:9d00:3ed1:fc05:5499:f77c:fbe5) (Remote host closed the connection)
2023-08-24 09:27:56 +0200hgolden_(~hgolden@2603-8000-9d00-3ed1-fc05-5499-f77c-fbe5.res6.spectrum.com)
2023-08-24 09:31:35 +0200andrei_n(~andrei.n@2a02:a03f:c0bc:8400:384:e4db:8ddb:cd47)
2023-08-24 09:32:16 +0200beaky_beaky
2023-08-24 09:37:26 +0200andrei_n(~andrei.n@2a02:a03f:c0bc:8400:384:e4db:8ddb:cd47) (Remote host closed the connection)
2023-08-24 09:37:46 +0200andrei_n(~andrei.n@2a02:a03f:c0bc:8400:384:e4db:8ddb:cd47)
2023-08-24 09:39:28 +0200mrmr14(~mrmr@user/mrmr)
2023-08-24 09:40:21 +0200mrmr1(~mrmr@user/mrmr) (Ping timeout: 244 seconds)
2023-08-24 09:40:22 +0200mrmr14mrmr1
2023-08-24 09:44:35 +0200gmg(~user@user/gehmehgeh)
2023-08-24 09:48:42 +0200aforemny_(~aforemny@i59F516DA.versanet.de) (Ping timeout: 252 seconds)
2023-08-24 09:51:33 +0200johnw(~johnw@69.62.242.138) (Read error: Connection reset by peer)
2023-08-24 09:53:56 +0200coot(~coot@89-69-206-216.dynamic.chello.pl)
2023-08-24 09:54:22 +0200johnw(~johnw@69.62.242.138)
2023-08-24 09:55:44 +0200 <dminuoso> lortabac │ the only extraordinary thing about monads is that you have to learn them quickly to do IO
2023-08-24 09:55:53 +0200ripspin(~chatzilla@1.145.130.147)
2023-08-24 09:55:55 +0200 <dminuoso> I think this is a misconception that largely contributes to the perceived difficulty of Haskell and IO.
2023-08-24 09:56:27 +0200aforemny(~aforemny@2001:9e8:6ce0:5800:a750:a56:88c2:71f2)
2023-08-24 09:56:35 +0200 <dminuoso> You dont really need to know anything about Monads in order to do IO. You just need to have a basic understanding of typeclasses, and understand how >>= and return at IO behave.
2023-08-24 09:57:27 +0200machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net)
2023-08-24 09:57:32 +0200 <lortabac> "You just need to have a basic understanding of typeclasses" -> that's exactly my point, type-classes are conceptually much harder than IO
2023-08-24 09:57:55 +0200 <lortabac> people try to understand monads without knowing type-classes and get confused
2023-08-24 09:58:45 +0200 <dminuoso> Im rather saying that learning IO has little to do with learning what Monad is about, its laws or what it abstracts over.
2023-08-24 09:58:47 +0200 <dminuoso> Consider an analogy:
2023-08-24 09:59:22 +0200 <dminuoso> You dont need to learn Monoid in order to add number, even though addition might (only) be captured by the typeclass called Monoid. Its easier to just tell people "Use <> and dont worry about the name Monoid"
2023-08-24 10:00:07 +0200 <lortabac> I agree with you, but that's not what happens in practice with Monad
2023-08-24 10:03:29 +0200 <drewjose> for what it's worth, I agree with dminuoso that for most people, getting IO done by example would be better than delving into how exactly category theory makes it possible in a pure language
2023-08-24 10:03:51 +0200 <dminuoso> Perhaps we would have been better off a -fsimple kind of mode that loads a special prelude that exposes `thenIO :: IO a -> (a -> IO b) -> IO b` and `pureIO :: a -> IO a`, have `do expressions` be monormophic at IO.
2023-08-24 10:04:07 +0200 <dminuoso> That would completely side step all the monad tutorials entirely.
2023-08-24 10:07:53 +0200 <lortabac> this may already be possible, we can even have do notation with RebindableSyntax
2023-08-24 10:08:54 +0200vglfr(~vglfr@cli-188-239-201-89.bbn.slav.dn.ua) (Remote host closed the connection)
2023-08-24 10:09:06 +0200sm(~sm@plaintextaccounting/sm) (Quit: sm)
2023-08-24 10:09:16 +0200vglfr(~vglfr@cli-188-239-201-89.bbn.slav.dn.ua)
2023-08-24 10:10:47 +0200gmg(~user@user/gehmehgeh) (Quit: Leaving)
2023-08-24 10:12:30 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2023-08-24 10:16:06 +0200mdpete(~mdpete@46.143.114.151) (Remote host closed the connection)
2023-08-24 10:16:24 +0200mdpete(~mdpete@46.143.114.151)
2023-08-24 10:16:45 +0200mdpete(~mdpete@46.143.114.151) (Remote host closed the connection)
2023-08-24 10:17:25 +0200tzh(~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz)
2023-08-24 10:20:22 +0200Nixkernal(~Nixkernal@119.4.193.178.dynamic.wline.res.cust.swisscom.ch)
2023-08-24 10:20:32 +0200jbalint(~jbalint@2600:6c44:117f:e98a:816a:9488:fb1:7b7)
2023-08-24 10:21:35 +0200akegalj(~akegalj@78-1-5-135.adsl.net.t-com.hr) (Quit: leaving)
2023-08-24 10:22:01 +0200fendor(~fendor@2a02:8388:1640:be00:af83:ade1:cd40:fe7a)
2023-08-24 10:29:32 +0200mdpete(~mdpete@46.143.114.151)
2023-08-24 10:29:54 +0200mdpete(~mdpete@46.143.114.151) (Remote host closed the connection)
2023-08-24 10:33:18 +0200califax(~califax@user/califx) (Ping timeout: 246 seconds)
2023-08-24 10:34:14 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2023-08-24 10:40:59 +0200 <tomsmeding> it might even suffice to use QualifiedDo and make some module (imported as "IO") that gives >>= and return clever types that use TypeError to tell the user what they did wrong in a better way than GHC normally does
2023-08-24 10:41:22 +0200 <tomsmeding> avoids having to define a special prelude
2023-08-24 10:42:45 +0200econo_(uid147250@id-147250.tinside.irccloud.com) (Quit: Connection closed for inactivity)
2023-08-24 10:44:28 +0200Pickchea(~private@user/pickchea)
2023-08-24 10:57:17 +0200danse-nr3(~francesco@151.35.254.168)
2023-08-24 11:01:04 +0200Guest|52(~Guest|52@2.124.159.11)
2023-08-24 11:01:39 +0200Guest|52(~Guest|52@2.124.159.11) (Client Quit)
2023-08-24 11:03:10 +0200Alex_test(~al_test@178.34.150.48) (Quit: ;-)
2023-08-24 11:03:22 +0200AlexZenon(~alzenon@178.34.150.48) (Quit: ;-)
2023-08-24 11:03:34 +0200AlexNoo(~AlexNoo@178.34.150.48) (Quit: Leaving)
2023-08-24 11:04:45 +0200__monty__(~toonn@user/toonn)
2023-08-24 11:08:32 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
2023-08-24 11:08:56 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan)
2023-08-24 11:09:56 +0200ft(~ft@p508db658.dip0.t-ipconnect.de) (Quit: leaving)
2023-08-24 11:15:36 +0200random-jellyfish(~random-je@user/random-jellyfish)
2023-08-24 11:17:04 +0200nate2(~nate@c-98-45-169-16.hsd1.ca.comcast.net)
2023-08-24 11:22:12 +0200nate2(~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 252 seconds)
2023-08-24 11:24:02 +0200sm(~sm@plaintextaccounting/sm)
2023-08-24 11:24:22 +0200AlexNoo(~AlexNoo@178.34.150.48)
2023-08-24 11:24:31 +0200AlexZenon(~alzenon@178.34.150.48)
2023-08-24 11:26:19 +0200Alex_test(~al_test@178.34.150.48)
2023-08-24 11:37:34 +0200SegmentationFaul(~Segmentat@185.151.84.54)
2023-08-24 11:42:38 +0200cfricke(~cfricke@user/cfricke)
2023-08-24 11:48:26 +0200andrei_n(~andrei.n@2a02:a03f:c0bc:8400:384:e4db:8ddb:cd47) (Remote host closed the connection)
2023-08-24 11:48:44 +0200andrei_n(~andrei.n@2a02:a03f:c0bc:8400:384:e4db:8ddb:cd47)
2023-08-24 11:53:21 +0200mc47(~mc47@xmonad/TheMC47)
2023-08-24 11:56:44 +0200ripspin(~chatzilla@1.145.130.147) (Remote host closed the connection)
2023-08-24 11:58:06 +0200 <danse-nr3> good morning #haskell
2023-08-24 11:58:59 +0200jabuxas(~jabuxas@user/jabuxas)
2023-08-24 11:59:36 +0200jabuxas(~jabuxas@user/jabuxas) (Client Quit)
2023-08-24 12:00:01 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:4421:6684:8924:105c) (Remote host closed the connection)
2023-08-24 12:07:06 +0200Simikando(~Simikando@adsl-dyn1.91-127-51.t-com.sk)
2023-08-24 12:08:26 +0200andrei_n(~andrei.n@2a02:a03f:c0bc:8400:384:e4db:8ddb:cd47) (Remote host closed the connection)
2023-08-24 12:08:44 +0200andrei_n(~andrei.n@2a02:a03f:c0bc:8400:384:e4db:8ddb:cd47)
2023-08-24 12:11:42 +0200xff0x(~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) (Ping timeout: 252 seconds)
2023-08-24 12:14:27 +0200azimut(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 246 seconds)
2023-08-24 12:17:56 +0200andrei_n(~andrei.n@2a02:a03f:c0bc:8400:384:e4db:8ddb:cd47) (Remote host closed the connection)
2023-08-24 12:18:15 +0200andrei_n(~andrei.n@2a02:a03f:c0bc:8400:384:e4db:8ddb:cd47)
2023-08-24 12:25:26 +0200andrei_n(~andrei.n@2a02:a03f:c0bc:8400:384:e4db:8ddb:cd47) (Remote host closed the connection)
2023-08-24 12:25:38 +0200Simikando(~Simikando@adsl-dyn1.91-127-51.t-com.sk) (Ping timeout: 256 seconds)
2023-08-24 12:25:43 +0200andrei_n(~andrei.n@2a02:a03f:c0bc:8400:384:e4db:8ddb:cd47)
2023-08-24 12:27:48 +0200Inst(~liamzy@2601:6c4:4085:6d50::725c)
2023-08-24 12:28:26 +0200andrei_n(~andrei.n@2a02:a03f:c0bc:8400:384:e4db:8ddb:cd47) (Remote host closed the connection)
2023-08-24 12:28:44 +0200andrei_n(~andrei.n@2a02:a03f:c0bc:8400:384:e4db:8ddb:cd47)
2023-08-24 12:35:56 +0200andrei_n(~andrei.n@2a02:a03f:c0bc:8400:384:e4db:8ddb:cd47) (Remote host closed the connection)
2023-08-24 12:36:14 +0200andrei_n(~andrei.n@2a02:a03f:c0bc:8400:384:e4db:8ddb:cd47)
2023-08-24 12:36:29 +0200fweht(uid404746@id-404746.lymington.irccloud.com)
2023-08-24 12:38:26 +0200andrei_n(~andrei.n@2a02:a03f:c0bc:8400:384:e4db:8ddb:cd47) (Remote host closed the connection)
2023-08-24 12:38:44 +0200andrei_n(~andrei.n@2a02:a03f:c0bc:8400:384:e4db:8ddb:cd47)
2023-08-24 12:39:52 +0200int-e_int-e
2023-08-24 12:46:42 +0200SegmentationFaul(~Segmentat@185.151.84.54) (Quit: Client closed)
2023-08-24 12:46:52 +0200SegmentationFaul(~Segmentat@185.151.84.54)
2023-08-24 12:50:38 +0200notzmv(~zmv@user/notzmv)
2023-08-24 12:50:52 +0200CiaoSen(~Jura@2a05:5800:29d:c900:664b:f0ff:fe37:9ef) (Ping timeout: 248 seconds)
2023-08-24 12:54:14 +0200ripspin(~chatzilla@1.145.176.59)
2023-08-24 13:00:49 +0200SegmentationFaul(~Segmentat@185.151.84.54) (Quit: Client closed)
2023-08-24 13:00:54 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:4421:6684:8924:105c)
2023-08-24 13:01:01 +0200SegmentationFaul(~Segmentat@185.151.84.54)
2023-08-24 13:05:16 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:4421:6684:8924:105c) (Ping timeout: 248 seconds)
2023-08-24 13:08:48 +0200 <byorgey> danse-nr3: good morning!
2023-08-24 13:11:53 +0200random-jellyfish(~random-je@user/random-jellyfish) (Quit: Client closed)
2023-08-24 13:14:34 +0200xff0x(~xff0x@2405:6580:b080:900:37fd:a033:abd0:1c4f)
2023-08-24 13:14:46 +0200random-jellyfish(~random-je@user/random-jellyfish)
2023-08-24 13:15:17 +0200foul_owl(~kerry@185.219.141.164) (Ping timeout: 244 seconds)
2023-08-24 13:19:02 +0200 <lortabac> tomsmeding: good idea
2023-08-24 13:24:05 +0200danse-nr3(~francesco@151.35.254.168) (Remote host closed the connection)
2023-08-24 13:24:10 +0200Guest60(~Guest60@2a00:1098:2f:2:b8d4:3ab9:d332:f00b)
2023-08-24 13:24:28 +0200danse-nr3(~francesco@151.35.254.168)
2023-08-24 13:24:37 +0200andrei_n(~andrei.n@2a02:a03f:c0bc:8400:384:e4db:8ddb:cd47) (Quit: Leaving)
2023-08-24 13:28:49 +0200 <Guest60> Suppose I have types like this:
2023-08-24 13:28:50 +0200 <Guest60> data T t = A t | B t
2023-08-24 13:28:50 +0200 <Guest60> $(makePrisms ''T)
2023-08-24 13:28:51 +0200 <Guest60> data Y = Y_A | Y_B
2023-08-24 13:28:51 +0200 <Guest60> convert :: T () -> T Y
2023-08-24 13:28:52 +0200 <Guest60> convert (A ()) = A Y_A
2023-08-24 13:28:52 +0200 <Guest60> convert (B ()) = B Y_B
2023-08-24 13:28:53 +0200 <Guest60> Is there a nice way to implement `convert` using optics? Like some way of using `_A .~ Y_A` and `_B .~ Y_B` simultaneously? (Neither can be used on their own)
2023-08-24 13:29:22 +0200foul_owl(~kerry@157.97.134.164)
2023-08-24 13:34:58 +0200sm(~sm@plaintextaccounting/sm) (Quit: sm)
2023-08-24 13:35:30 +0200cods(~fred@82-65-232-44.subs.proxad.net) (Ping timeout: 245 seconds)
2023-08-24 13:41:08 +0200Inst(~liamzy@2601:6c4:4085:6d50::725c) (Remote host closed the connection)
2023-08-24 13:41:15 +0200kupi(uid212005@id-212005.hampstead.irccloud.com)
2023-08-24 13:41:27 +0200Inst(~liamzy@2601:6c4:4085:6d50::ce87)
2023-08-24 13:41:36 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2023-08-24 13:44:06 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2023-08-24 13:44:39 +0200danse-nr3(~francesco@151.35.254.168) (Ping timeout: 252 seconds)
2023-08-24 13:45:45 +0200random-jellyfish(~random-je@user/random-jellyfish) (Quit: Client closed)
2023-08-24 13:46:33 +0200ulysses4ever(~artem@c-73-103-90-145.hsd1.in.comcast.net) (Read error: Connection reset by peer)
2023-08-24 13:46:33 +0200artem(~artem@c-73-103-90-145.hsd1.in.comcast.net)
2023-08-24 13:47:02 +0200 <ncf> undefined & outside _A ~. const Y_A & outside _B ~. const Y_B -- or something?
2023-08-24 13:55:25 +0200jinsun(~jinsun@user/jinsun) (Ping timeout: 248 seconds)
2023-08-24 13:59:30 +0200 <ncf> you could also probably do something clever with Adjunction T ((->) Y)
2023-08-24 14:00:11 +0200arahael(~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net)
2023-08-24 14:01:32 +0200Pickchea(~private@user/pickchea) (Quit: Leaving)
2023-08-24 14:02:04 +0200 <dminuoso> Guest60: You can use: _A `adjoin` _B
2023-08-24 14:02:38 +0200 <dminuoso> This will give you a `Traversal' T Y`
2023-08-24 14:03:10 +0200idgaen(~idgaen@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c)
2023-08-24 14:03:13 +0200 <dminuoso> then you need an `unsafeSingular :: Traversal s t a b -> Lens s t a b` that you can trivially cook up yourself
2023-08-24 14:03:16 +0200 <dminuoso> So you can write:
2023-08-24 14:03:27 +0200 <dminuoso> Ah but hold on, that wont help you as much
2023-08-24 14:03:38 +0200 <dminuoso> .Mmm
2023-08-24 14:03:44 +0200 <ncf> you'd need an indexed traversal
2023-08-24 14:04:30 +0200 <dminuoso> Yeah. This is a kind of twisted zip
2023-08-24 14:04:52 +0200 <ncf> :t Data.Functor.Adjunction.duplicateL
2023-08-24 14:04:53 +0200 <lambdabot> Data.Functor.Adjunction.Adjunction f u => f a -> f (f a)
2023-08-24 14:05:18 +0200 <ncf> you could compose this with something that witnesses f () as the representation
2023-08-24 14:06:39 +0200arahael(~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 246 seconds)
2023-08-24 14:11:26 +0200migas(~migas@astra4961.startdedicated.net) (Remote host closed the connection)
2023-08-24 14:11:43 +0200migas(~migas@astra4961.startdedicated.net)
2023-08-24 14:11:59 +0200 <ncf> heh, duplicateL x is just x <$ x
2023-08-24 14:12:01 +0200danse-nr3(~francesco@151.35.254.168)
2023-08-24 14:12:41 +0200 <ncf> doesn't use the adjunction at all
2023-08-24 14:13:37 +0200 <dminuoso> Guest60: Here is a dumb idea, but why not just say:
2023-08-24 14:13:38 +0200 <ncf> i guess every strong functor has a duplicate
2023-08-24 14:14:16 +0200 <dminuoso> (x & _A .~ Y_A) & _B .~ Y_B
2023-08-24 14:14:23 +0200 <dminuoso> That seems... simple.
2023-08-24 14:14:54 +0200 <Guest60> because the first part doesn't typecheck
2023-08-24 14:14:56 +0200 <ncf> does it t-
2023-08-24 14:15:10 +0200 <dminuoso> ohhh
2023-08-24 14:15:12 +0200 <dminuoso> I see why
2023-08-24 14:15:42 +0200 <Guest60> I think you need to convert it to some intermediate form which has two type parameters, one for the A constructor and one for the B constructor
2023-08-24 14:15:43 +0200 <dminuoso> The unsafeSingular route smells so promising.
2023-08-24 14:15:59 +0200 <dminuoso> But it loses information along the way
2023-08-24 14:16:00 +0200 <Guest60> without _A _B maybe?
2023-08-24 14:16:24 +0200 <dminuoso> The interface this looks like is just a simple profunctor.
2023-08-24 14:16:25 +0200 <ncf> then you've reinvented Either
2023-08-24 14:16:29 +0200 <ncf> what are you using this for?
2023-08-24 14:16:31 +0200 <dminuoso> no a bifunctor.
2023-08-24 14:16:50 +0200 <dminuoso> Guest60: I would say, use Bifunctor rather than optics.
2023-08-24 14:17:03 +0200 <Guest60> Oops I guess this is an X-Y problem
2023-08-24 14:17:31 +0200 <Guest60> What I really want is to essentially use the Traversable instance for T, but have the function behave differently in the different constructors
2023-08-24 14:18:01 +0200 <Guest60> So if Y_A = Y_B then traverse (const Y_A) would work
2023-08-24 14:18:08 +0200 <dminuoso> With optics you would have to do the indexed traversable route.
2023-08-24 14:18:16 +0200 <dminuoso> Then using the index you could recover the path
2023-08-24 14:18:57 +0200 <dminuoso> As long as you're constrained to just 2 fields, Bifunctor is a fine solution
2023-08-24 14:19:11 +0200 <dminuoso> Since you can just write `bimap (const Y_A) (const Y_B)`
2023-08-24 14:19:20 +0200 <Guest60> No this is a model, in reality T is an AST type with many branches
2023-08-24 14:19:22 +0200 <dminuoso> But it doesnt elegantly generalize to n fields.
2023-08-24 14:19:26 +0200 <dminuoso> Mmm
2023-08-24 14:19:56 +0200 <dminuoso> Guest60: I have a feeling you would need indexed traversals and some form f generics (Data.Data.Data probably?)
2023-08-24 14:20:25 +0200 <Guest60> I mean a basic pattern-matching implementation works fine if there isn't a neat way to do it
2023-08-24 14:20:27 +0200 <dminuoso> With the indexed traversals you can recover the nths constructor, and with Data.Data.Data you can easily generate values of the nth constructor
2023-08-24 14:20:28 +0200 <Guest60> I just thought there might be
2023-08-24 14:24:04 +0200micro(~micro@user/micro) (Ping timeout: 256 seconds)
2023-08-24 14:25:01 +0200micro(~micro@user/micro)
2023-08-24 14:29:36 +0200sm(~sm@plaintextaccounting/sm)
2023-08-24 14:29:44 +0200Square2(~Square4@user/square)
2023-08-24 14:32:24 +0200Feuermagier(~Feuermagi@user/feuermagier) (Quit: Leaving)
2023-08-24 14:39:39 +0200L29Ah(~L29Ah@wikipedia/L29Ah)
2023-08-24 14:55:47 +0200danse-nr3_(~francesco@151.57.235.234)
2023-08-24 14:56:56 +0200dcoutts(~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) (Remote host closed the connection)
2023-08-24 14:57:18 +0200dcoutts(~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net)
2023-08-24 14:58:06 +0200danse-nr3(~francesco@151.35.254.168) (Ping timeout: 246 seconds)
2023-08-24 15:00:43 +0200Alex_test(~al_test@178.34.150.48) (Quit: ;-)
2023-08-24 15:01:36 +0200AlexZenon(~alzenon@178.34.150.48) (Quit: ;-)
2023-08-24 15:01:38 +0200AlexNoo(~AlexNoo@178.34.150.48) (Quit: Leaving)
2023-08-24 15:16:05 +0200SegmentationFaul(~Segmentat@185.151.84.54) (Quit: Client closed)
2023-08-24 15:16:16 +0200Guest60(~Guest60@2a00:1098:2f:2:b8d4:3ab9:d332:f00b) (Quit: Client closed)
2023-08-24 15:16:19 +0200SegmentationFaul(~Segmentat@185.151.84.54)
2023-08-24 15:18:48 +0200nate2(~nate@c-98-45-169-16.hsd1.ca.comcast.net)
2023-08-24 15:20:31 +0200shapr(~user@2600:1700:c640:3100:25dc:ef75:520:fb9d)
2023-08-24 15:21:52 +0200dh97(~dh97@2405:201:d02b:48da:3de1:8f39:2df3:be9c)
2023-08-24 15:21:59 +0200ulysses4ever(~artem@2601:408:c405:45bb:f474:e3f8:9806:671)
2023-08-24 15:23:00 +0200AlexNoo(~AlexNoo@178.34.150.48)
2023-08-24 15:24:12 +0200nate2(~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 252 seconds)
2023-08-24 15:24:22 +0200AlexZenon(~alzenon@178.34.150.48)
2023-08-24 15:24:42 +0200artem(~artem@c-73-103-90-145.hsd1.in.comcast.net) (Ping timeout: 256 seconds)
2023-08-24 15:27:38 +0200Inst(~liamzy@2601:6c4:4085:6d50::ce87) (Remote host closed the connection)
2023-08-24 15:28:12 +0200ripspin(~chatzilla@1.145.176.59) (Ping timeout: 246 seconds)
2023-08-24 15:28:18 +0200Inst(~liamzy@2601:6c4:4085:6d50::725c)
2023-08-24 15:29:45 +0200sefidel(~sefidel@user/sefidel) (Remote host closed the connection)
2023-08-24 15:29:47 +0200ystael(~ystael@user/ystael)
2023-08-24 15:30:21 +0200dh97(~dh97@2405:201:d02b:48da:3de1:8f39:2df3:be9c) (Read error: Connection reset by peer)
2023-08-24 15:30:31 +0200sefidel(~sefidel@user/sefidel)
2023-08-24 15:30:53 +0200ulysses4ever(~artem@2601:408:c405:45bb:f474:e3f8:9806:671) (Ping timeout: 248 seconds)
2023-08-24 15:32:23 +0200ulysses4ever(~artem@73.145.240.111)
2023-08-24 15:33:13 +0200Alex_test(~al_test@178.34.150.48)
2023-08-24 15:33:48 +0200ulysses4ever(~artem@73.145.240.111) (Read error: Connection reset by peer)
2023-08-24 15:34:06 +0200ulysses4ever(~artem@73.145.240.111)
2023-08-24 15:35:37 +0200artem(~artem@73.145.240.111)
2023-08-24 15:36:01 +0200ulysses4ever(~artem@73.145.240.111) (Read error: Connection reset by peer)
2023-08-24 15:38:58 +0200cafkafk(~cafkafk@fsf/member/cafkafk)
2023-08-24 15:41:48 +0200lisbeths(uid135845@id-135845.lymington.irccloud.com)
2023-08-24 15:44:16 +0200hgolden_(~hgolden@2603-8000-9d00-3ed1-fc05-5499-f77c-fbe5.res6.spectrum.com) (Remote host closed the connection)
2023-08-24 15:49:57 +0200jmdaemon(~jmdaemon@user/jmdaemon) (Ping timeout: 245 seconds)
2023-08-24 15:51:26 +0200Guest60(~Guest60@2a00:1098:2f:2:b8d4:3ab9:d332:f00b)
2023-08-24 15:51:43 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2023-08-24 15:52:33 +0200segfaultfizzbuzz(~segfaultf@23-93-74-212.fiber.dynamic.sonic.net)
2023-08-24 15:53:57 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2023-08-24 15:54:15 +0200kuribas(~user@ip-188-118-57-242.reverse.destiny.be)
2023-08-24 15:56:35 +0200gatekempt(~gatekempt@user/gatekempt)
2023-08-24 15:56:36 +0200cafkafk(~cafkafk@fsf/member/cafkafk) (Quit: WeeChat 3.6)
2023-08-24 16:00:17 +0200mmhat(~mmh@p200300f1c7042765ee086bfffe095315.dip0.t-ipconnect.de)
2023-08-24 16:00:56 +0200kupi(uid212005@id-212005.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
2023-08-24 16:03:56 +0200notzmv(~zmv@user/notzmv) (Ping timeout: 248 seconds)
2023-08-24 16:04:27 +0200mmhat(~mmh@p200300f1c7042765ee086bfffe095315.dip0.t-ipconnect.de) (Client Quit)
2023-08-24 16:07:15 +0200ulysses4ever(~artem@2607:fb91:2fb8:4dc7:f474:e3f8:9806:671)
2023-08-24 16:07:52 +0200artem(~artem@73.145.240.111) (Ping timeout: 240 seconds)
2023-08-24 16:22:06 +0200[Leary](~Leary]@user/Leary/x-0910699) (Ping timeout: 245 seconds)
2023-08-24 16:24:19 +0200dcoutts(~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) (Remote host closed the connection)
2023-08-24 16:24:43 +0200dcoutts(~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net)
2023-08-24 16:24:52 +0200artem(~artem@2601:249:4380:8950:f474:e3f8:9806:671)
2023-08-24 16:28:28 +0200ulysses4ever(~artem@2607:fb91:2fb8:4dc7:f474:e3f8:9806:671) (Ping timeout: 248 seconds)
2023-08-24 16:28:44 +0200 <Inst> oh wait, i think i realize my mistake
2023-08-24 16:28:49 +0200 <Inst> `seq` doesn't have special rules, right?
2023-08-24 16:29:10 +0200 <Inst> infixr 0 `seq`
2023-08-24 16:29:26 +0200 <Inst> it's actually the operators that get called first in haskell, no?
2023-08-24 16:29:51 +0200 <Inst> i was confused by a section in RWH, going through it for entertainment
2023-08-24 16:30:03 +0200 <Inst> a `seq` b... shouldn't a and b get evaluated first?
2023-08-24 16:30:20 +0200 <Inst> but if it's operators with lowest precedence that act first, then it makes sense
2023-08-24 16:35:31 +0200econo_(uid147250@id-147250.tinside.irccloud.com)
2023-08-24 16:39:02 +0200tzh(~tzh@c-24-21-73-154.hsd1.wa.comcast.net)
2023-08-24 16:42:24 +0200 <EvanR> wat
2023-08-24 16:42:51 +0200 <EvanR> precedence is a parsing thing not acting
2023-08-24 16:44:24 +0200 <EvanR> `seq` acts like any other `name` operator
2023-08-24 16:44:35 +0200 <EvanR> ~~acts~~ parses like
2023-08-24 16:45:24 +0200 <drewjose> Inst what do you mean evaluated first, compared to what?
2023-08-24 16:46:02 +0200 <EvanR> snd (undefined : undefined, 99)
2023-08-24 16:46:23 +0200ripspin(~chatzilla@1.145.208.15)
2023-08-24 16:46:37 +0200 <EvanR> case undefined : undefined { [] -> "empty"; _:_ -> "full }
2023-08-24 16:47:00 +0200 <EvanR> > case undefined : undefined { [] -> "empty"; _:_ -> "full" }
2023-08-24 16:47:01 +0200 <lambdabot> <hint>:1:30: error: parse error on input ‘[’
2023-08-24 16:47:08 +0200 <EvanR> > case undefined : undefined of { [] -> "empty"; _:_ -> "full" }
2023-08-24 16:47:10 +0200 <lambdabot> "full"
2023-08-24 16:48:40 +0200 <EvanR> precedence tells you where to put parentheses and parentheses tells you how to group expressions, way before any evaluation happens
2023-08-24 16:53:29 +0200 <Guest60> Your confusion may be related to how operator precedence is taught in schools. Multiplication has higher precedence than addition, so in "3 * 4 + 5" you "do the multiplication first", i.e. pick out the "3 * 4" bit before you look at the addition. So this is telling you the order in which you group things with parentheses, but this is not the same
2023-08-24 16:53:29 +0200 <Guest60> as evaluation order in code (even before you think about laziness and seq, which only muddy the waters). Evaluation order (which is what seq affects) is about when, in time, you compute something
2023-08-24 16:54:02 +0200lortabac(~lortabac@2a01:e0a:541:b8f0:68c1:b14:aae3:ebd0) (Quit: WeeChat 2.8)
2023-08-24 16:56:08 +0200 <EvanR> they also tell you do "do parentheses first" which is ridiculous in this example 0 * (9999 + 9998 + ... + 1)
2023-08-24 16:56:17 +0200bgs(~bgs@212-85-160-171.dynamic.telemach.net)
2023-08-24 16:56:38 +0200 <dolio> That's what computers do. :þ
2023-08-24 16:57:02 +0200 <EvanR> RIDICULOUS
2023-08-24 16:59:18 +0200 <dolio> In the case of arithmetic, the parse sort of determines the evaluation, at least if you don't use algebra.
2023-08-24 17:00:13 +0200 <dolio> But it's pretty important to understand the difference.
2023-08-24 17:00:39 +0200 <Inst> wait, brb
2023-08-24 17:00:47 +0200 <Inst> undefined `seq` error "404"
2023-08-24 17:02:35 +0200 <Inst> so `seq` gets evaluated first, not error "404"
2023-08-24 17:02:53 +0200 <Guest60> error "404" never gets evaluated
2023-08-24 17:02:59 +0200 <glguy> It might
2023-08-24 17:03:13 +0200 <glguy> Seq doesn't specify an ordering on its arguments
2023-08-24 17:03:13 +0200 <Inst> the way i was assuming things went, i assumed non-operator expressions get evaluated first
2023-08-24 17:03:21 +0200 <Inst> wait what?
2023-08-24 17:03:36 +0200 <glguy> But in function application the function gets evaluated before it's arguments
2023-08-24 17:04:05 +0200 <dolio> You're still conflating parsing with evaluation.
2023-08-24 17:04:11 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:4421:6684:8924:105c)
2023-08-24 17:04:44 +0200 <glguy> Being an operator isn't relevant to evaluation
2023-08-24 17:05:14 +0200 <Guest60> undefined `seq` error "404" is equivalent to   seq (undefined) (error "404")
2023-08-24 17:05:29 +0200 <Guest60> in every single way
2023-08-24 17:06:04 +0200SegmentationFaul(~Segmentat@185.151.84.54) (Quit: Client closed)
2023-08-24 17:08:35 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:4421:6684:8924:105c) (Ping timeout: 246 seconds)
2023-08-24 17:10:40 +0200acidjnk(~acidjnk@p200300d6e7072f45b92e9b7cc4c1bf67.dip0.t-ipconnect.de) (Ping timeout: 256 seconds)
2023-08-24 17:15:52 +0200briandaed(~briandaed@185.234.210.211.r.toneticgroup.pl) (Remote host closed the connection)
2023-08-24 17:17:09 +0200 <Inst> i don't understand how I can not conflate parsing with evaluation, tbh
2023-08-24 17:17:32 +0200 <Inst> also, undefined `seq` error "404" `seq` error "505"
2023-08-24 17:17:40 +0200 <geekosaur> yet you are doing it
2023-08-24 17:18:13 +0200 <geekosaur> that one invokes special rules, where ghc can determine that all of them throw exceptions and is free to pick one
2023-08-24 17:18:13 +0200artem(~artem@2601:249:4380:8950:f474:e3f8:9806:671) (Read error: Connection reset by peer)
2023-08-24 17:18:17 +0200 <Inst> *how i can not
2023-08-24 17:18:22 +0200ulysses4ever(~artem@c-73-103-90-145.hsd1.in.comcast.net)
2023-08-24 17:18:57 +0200 <geekosaur> in a strict language you can determine evaluation from parsing; in a lazy language it's more independent
2023-08-24 17:19:15 +0200 <Inst> still that implies errors if exception throwers exist
2023-08-24 17:19:21 +0200 <dolio> Even in a strict language, parsing is not evaluation.
2023-08-24 17:19:39 +0200 <geekosaur> it's not but it generally guides evaluation
2023-08-24 17:19:57 +0200 <Inst> the term that gets evaluated first is the term with the lowest precedence, no?
2023-08-24 17:20:06 +0200 <Inst> $ gets called first in an expression with $
2023-08-24 17:20:13 +0200 <geekosaur> no
2023-08-24 17:20:18 +0200 <dolio> No, precedence is about parsing.
2023-08-24 17:20:32 +0200 <geekosaur> if anything it'd be highest precedence, but in any case it does not control evaluation
2023-08-24 17:20:41 +0200 <Inst> foo $ bar is equivalent to ($) foo bar
2023-08-24 17:20:41 +0200 <geekosaur> precedence inserts parentheses
2023-08-24 17:20:44 +0200 <Inst> $ is outermost
2023-08-24 17:20:54 +0200 <EvanR> i < 0 ? crashAndBurn() : 7 // C can parse this and not crash
2023-08-24 17:21:08 +0200 <Inst> foo $ bar + baz; ($) foo (bar + baz)
2023-08-24 17:21:27 +0200lbseale(~quassel@user/ep1ctetus)
2023-08-24 17:21:27 +0200 <EvanR> it can also evaluate it and not crash sometimes
2023-08-24 17:22:25 +0200 <EvanR> downloadTheGibson() || crashAndBurn() # example from PHP
2023-08-24 17:22:48 +0200 <Inst> for a brief moment i thought the Hackers references were built-ins in C
2023-08-24 17:23:15 +0200 <EvanR> so you see treating every operator like strict + does not work
2023-08-24 17:23:49 +0200 <EvanR> especially in haskell
2023-08-24 17:23:57 +0200YuutaW(~YuutaW@2404:f4c0:f9c3:502::100:17b7) (Ping timeout: 248 seconds)
2023-08-24 17:27:04 +0200YuutaW(~YuutaW@mail.yuuta.moe)
2023-08-24 17:27:38 +0200 <Inst> i feel embarrassed because i still don't understand how this works :(
2023-08-24 17:27:38 +0200Inst(~liamzy@2601:6c4:4085:6d50::725c) (Remote host closed the connection)
2023-08-24 17:28:04 +0200 <EvanR> try evaluating more basic haskell expressions
2023-08-24 17:28:19 +0200Inst(~liamzy@2601:6c4:4085:6d50::ce87)
2023-08-24 17:28:32 +0200 <EvanR> > const 9 (error "404")
2023-08-24 17:28:33 +0200 <lambdabot> 9
2023-08-24 17:28:41 +0200 <EvanR> why didn't it crash
2023-08-24 17:29:00 +0200Guest60(~Guest60@2a00:1098:2f:2:b8d4:3ab9:d332:f00b) (Quit: Client closed)
2023-08-24 17:29:13 +0200 <Inst> didn't need to evaluate (error "404"
2023-08-24 17:29:38 +0200 <EvanR> > 9 `const` error "404
2023-08-24 17:29:39 +0200 <lambdabot> <hint>:1:21: error:
2023-08-24 17:29:39 +0200 <lambdabot> lexical error in string/character literal at end of input
2023-08-24 17:29:45 +0200 <EvanR> > 9 `const` (error "404)
2023-08-24 17:29:46 +0200 <lambdabot> <hint>:1:23: error:
2023-08-24 17:29:46 +0200 <lambdabot> lexical error in string/character literal at end of input
2023-08-24 17:29:48 +0200 <EvanR> WHAT
2023-08-24 17:30:06 +0200 <EvanR> Inst, chew on that one regardless
2023-08-24 17:30:12 +0200 <Inst> you forgot the "
2023-08-24 17:30:19 +0200 <Inst> > 9 'const' (error "404")
2023-08-24 17:30:21 +0200 <lambdabot> error:
2023-08-24 17:30:21 +0200 <lambdabot> • Syntax error on 'const'
2023-08-24 17:30:21 +0200 <lambdabot> Perhaps you intended to use TemplateHaskell or TemplateHaskellQuotes
2023-08-24 17:30:37 +0200 <Inst> > 9 `const` (error "404")
2023-08-24 17:30:38 +0200 <lambdabot> 9
2023-08-24 17:30:44 +0200 <EvanR> you don't need parens
2023-08-24 17:30:46 +0200 <Inst> 9 `const` error "404"
2023-08-24 17:30:57 +0200 <EvanR> anyway, what's the difference
2023-08-24 17:31:48 +0200 <Inst> btw, it's a bit awkward that SPJ named his cat Haskell
2023-08-24 17:31:56 +0200 <Inst> on a second-order level, i think
2023-08-24 17:33:17 +0200 <Inst> "Haskell passed on"
2023-08-24 17:34:57 +0200ulysses4ever(~artem@c-73-103-90-145.hsd1.in.comcast.net) (Ping timeout: 245 seconds)
2023-08-24 17:35:03 +0200geekosaur(~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b)))
2023-08-24 17:35:03 +0200allbery_b(~geekosaur@xmonad/geekosaur)
2023-08-24 17:35:06 +0200allbery_bgeekosaur
2023-08-24 17:36:03 +0200jonathan_(~jonathan@193.203.13.99) (Quit: Leaving)
2023-08-24 17:37:57 +0200ph88(~ph88@91.64.60.212)
2023-08-24 17:38:14 +0200ulysses4ever(~artem@c-73-103-90-145.hsd1.in.comcast.net)
2023-08-24 17:39:13 +0200 <ph88> i have nanosecond since unix epoc and seconds of timezone offset from UTC. Which function can i use to convert to UTCTime ?
2023-08-24 17:39:44 +0200powderhorn(~powderhor@207-153-12-54.static.fttp.usinternet.com)
2023-08-24 17:40:06 +0200 <EvanR> you can convert from unix time to UTCTime directly, it doesn't involve a time zone
2023-08-24 17:40:49 +0200 <EvanR> posixSecondsToUTCTime :: POSIXTime -> UTCTime, so first divide by one billion
2023-08-24 17:41:06 +0200 <ph88> and substract seconds of timezone ?
2023-08-24 17:41:21 +0200 <EvanR> there's no timezone, unix time is already in UTC
2023-08-24 17:41:56 +0200 <ph88> i have a integer indicating the timezone seconds from UTC
2023-08-24 17:41:57 +0200 <EvanR> assuming you didn't mess up the unix time somewhere
2023-08-24 17:42:07 +0200 <ph88> https://neo4j.com/docs/bolt/current/bolt/structure-semantics/#structure-legacy-datetime
2023-08-24 17:42:26 +0200 <EvanR> timezones are only for convert to local time from UTC
2023-08-24 17:42:42 +0200 <ph88> ah ok
2023-08-24 17:42:45 +0200 <EvanR> unix time is the same for everyone
2023-08-24 17:42:58 +0200 <ph88> how do i make a POSIXTime from Int ?
2023-08-24 17:43:23 +0200 <EvanR> fromIntegral, but you said it's nanoseconds, so after that conversion divide by a billion
2023-08-24 17:43:41 +0200 <ph88> i will drop the nanoseconds, it's in a second integer anyway
2023-08-24 17:43:50 +0200 <ph88> thanks EvanR
2023-08-24 17:43:50 +0200 <EvanR> ok then just fromIntegral
2023-08-24 17:44:07 +0200 <dolio> Inst: If you're literally talking about evaluating the function value seq, then yes that theoretically happens first. But in reality it probably doesn't because GHC knows what well-defined value that is at compile time.
2023-08-24 17:45:45 +0200 <Inst> i mean it should be able to optimize depending on whether seq's first argument is actually used, first
2023-08-24 17:45:53 +0200 <Inst> it can be optimized away if seq's first argument isn't used
2023-08-24 17:45:59 +0200 <dolio> Like, if you evaluate `1 + 3 * 5`, then (+) gets evaluated first, theoretically, but that evaluation completes almost immediately.
2023-08-24 17:46:29 +0200 <Inst> (+) 1 (3 * 5), outermost evaluation
2023-08-24 17:46:39 +0200_ht(~Thunderbi@28-52-174-82.ftth.glasoperator.nl)
2023-08-24 17:46:52 +0200 <EvanR> ph88, https://i.imgur.com/7ZucxfP.png take this map
2023-08-24 17:48:05 +0200YuutaW(~YuutaW@mail.yuuta.moe) (Ping timeout: 258 seconds)
2023-08-24 17:49:20 +0200stefan-_(~cri@42dots.de) (Quit: ZNC 1.8.2+deb2build5 - https://znc.in)
2023-08-24 17:49:29 +0200YuutaW(~YuutaW@mail.yuuta.moe)
2023-08-24 17:50:04 +0200stefan-_(~cri@42dots.de)
2023-08-24 17:50:33 +0200 <ph88> thx
2023-08-24 17:50:36 +0200 <drewjose> seq isn't lazy in the first argument so it can't optimise its evaluation away can it
2023-08-24 17:50:53 +0200 <dolio> No, seq is strict in both arguments.
2023-08-24 17:51:21 +0200lisbeths(uid135845@id-135845.lymington.irccloud.com) (Quit: Connection closed for inactivity)
2023-08-24 17:51:56 +0200 <dolio> drewjose: What I mean is, you're right.
2023-08-24 17:52:27 +0200 <drewjose> yes got that :) haskellers are naturally terse
2023-08-24 17:54:46 +0200jinsun(~jinsun@user/jinsun)
2023-08-24 17:56:26 +0200 <EvanR> a function "strict in an argument" will bottom if the argument is bottom. Kneejerk conclusion is that it therefore evaluates that argument. Which is probably wrong, but I can just tell whoever thinks that to show the proof and offload the mental burden xD
2023-08-24 17:56:32 +0200 <ph88> what's the difference between LocalTime and ZonedTime ?
2023-08-24 17:57:08 +0200Inst(~liamzy@2601:6c4:4085:6d50::ce87) (Remote host closed the connection)
2023-08-24 17:57:10 +0200dhil(~dhil@78.45.150.83.ewm.ftth.as8758.net)
2023-08-24 17:57:16 +0200 <EvanR> a ZonedTime is a LocalTime paired with a TimeZone, so it can be decomposed to a LocalTime or converted to UTCTime
2023-08-24 17:57:25 +0200Inst(~liamzy@2601:6c4:4085:6d50::1868)
2023-08-24 17:58:00 +0200cfricke(~cfricke@user/cfricke) (Ping timeout: 246 seconds)
2023-08-24 17:58:02 +0200 <EvanR> it's kind of lame because TimeZone is just an offset and not a TimeZoneSeries which is another package
2023-08-24 17:58:38 +0200Inst(~liamzy@2601:6c4:4085:6d50::1868) (Remote host closed the connection)
2023-08-24 17:59:59 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:4421:6684:8924:105c)
2023-08-24 18:00:15 +0200 <EvanR> LocalTime is like 1997/10/10 11:14:00 taken in isolation and no context
2023-08-24 18:00:40 +0200YuutaW(~YuutaW@mail.yuuta.moe) (Ping timeout: 246 seconds)
2023-08-24 18:01:10 +0200ripspin(~chatzilla@1.145.208.15) (Quit: ChatZilla 0.17 [SeaMonkey 2.53.17/20230727221859])
2023-08-24 18:01:23 +0200 <EvanR> you see that a lot in SQL
2023-08-24 18:01:37 +0200 <ph88> should i use TimeZoneSeries or ZonedTime ?\
2023-08-24 18:01:42 +0200 <EvanR> for what?
2023-08-24 18:03:50 +0200 <ph88> to keep times with timezones, main datetime data type in my app
2023-08-24 18:03:51 +0200YuutaW(~YuutaW@mail.yuuta.moe)
2023-08-24 18:04:34 +0200 <EvanR> standard procedure I think is to have a column of LocalTime and a column specifying the "time zone" as a string, the complicated version
2023-08-24 18:04:59 +0200 <EvanR> wait what am I saying no
2023-08-24 18:04:59 +0200gentauro(~gentauro@user/gentauro) (Read error: Connection reset by peer)
2023-08-24 18:05:08 +0200 <EvanR> you still didn't give enough info
2023-08-24 18:05:32 +0200 <EvanR> the best course of action heavily depends on the application
2023-08-24 18:07:34 +0200 <EvanR> e.g. a web app with a database often has all times in UTC and has timezones per user just for display. But a given application may have specialized requirements, like event planners don't care about the timezone because the event is in a known location. Hours of operation in local time naturally survive daylight savings time, etc
2023-08-24 18:07:36 +0200kuribas(~user@ip-188-118-57-242.reverse.destiny.be) (Quit: ERC (IRC client for Emacs 27.1))
2023-08-24 18:07:40 +0200ddellacosta(~ddellacos@146.70.165.10) (Ping timeout: 248 seconds)
2023-08-24 18:09:58 +0200ddellacosta(~ddellacos@143.244.47.89)
2023-08-24 18:11:03 +0200gentauro(~gentauro@user/gentauro)
2023-08-24 18:19:21 +0200mvk(~mvk@2607:fea8:5c9a:a600::1c6d)
2023-08-24 18:21:25 +0200chiselfuse(~chiselfus@user/chiselfuse) (Remote host closed the connection)
2023-08-24 18:22:08 +0200chiselfuse(~chiselfus@user/chiselfuse)
2023-08-24 18:29:36 +0200razetime(~quassel@117.254.37.99)
2023-08-24 18:31:47 +0200riatre(~quassel@2001:310:6000:f::5198:1) (Ping timeout: 246 seconds)
2023-08-24 18:32:51 +0200riatre(~quassel@2001:310:6000:f::5198:1)
2023-08-24 18:32:51 +0200machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 252 seconds)
2023-08-24 18:39:35 +0200acidjnk(~acidjnk@p200300d6e7072f45448198b239e9f563.dip0.t-ipconnect.de)
2023-08-24 18:40:33 +0200ulysses4ever(~artem@c-73-103-90-145.hsd1.in.comcast.net) (Ping timeout: 252 seconds)
2023-08-24 18:42:00 +0200Simikando(~Simikando@adsl-dyn1.91-127-51.t-com.sk)
2023-08-24 18:48:37 +0200ulysses4ever(~artem@c-73-103-90-145.hsd1.in.comcast.net)
2023-08-24 18:49:54 +0200danse-nr3_(~francesco@151.57.235.234) (Ping timeout: 252 seconds)
2023-08-24 18:50:05 +0200YuutaW(~YuutaW@mail.yuuta.moe) (Ping timeout: 245 seconds)
2023-08-24 18:51:35 +0200artem(~artem@2601:249:4380:8950:f474:e3f8:9806:671)
2023-08-24 18:52:30 +0200ulysses4ever(~artem@c-73-103-90-145.hsd1.in.comcast.net) (Read error: Connection reset by peer)
2023-08-24 18:53:23 +0200YuutaW(~YuutaW@mail.yuuta.moe)
2023-08-24 18:54:07 +0200razetime(~quassel@117.254.37.99) (Ping timeout: 245 seconds)
2023-08-24 18:54:47 +0200razetime(~quassel@117.254.37.17)
2023-08-24 18:56:46 +0200random-jellyfish(~random-je@user/random-jellyfish)
2023-08-24 18:57:57 +0200jinsun(~jinsun@user/jinsun) (Read error: Connection reset by peer)
2023-08-24 19:00:24 +0200jmcantrell(~weechat@user/jmcantrell)
2023-08-24 19:00:31 +0200razetime(~quassel@117.254.37.17) (Ping timeout: 246 seconds)
2023-08-24 19:01:58 +0200razetime(~quassel@117.254.37.190)
2023-08-24 19:03:02 +0200 <justsomeguy> What Haskell language features do I need to know to use this library? https://amazonka.brendanhay.nz/ I'm trying to launch an EC2 instance on AWS, but the examples seem impenetrable right now.
2023-08-24 19:07:29 +0200danza(~francesco@151.19.255.162)
2023-08-24 19:10:15 +0200thegeekinside(~thegeekin@189.180.79.225) (Ping timeout: 252 seconds)
2023-08-24 19:10:32 +0200 <juri_> when in doubt, find someone else who used it, and see what they did?
2023-08-24 19:10:35 +0200fryguybob(~fryguybob@cpe-24-94-50-22.stny.res.rr.com) (Quit: leaving)
2023-08-24 19:11:04 +0200thegeekinside(~thegeekin@189.128.149.137)
2023-08-24 19:12:51 +0200jmcantrell(~weechat@user/jmcantrell) (Quit: WeeChat 4.0.4)
2023-08-24 19:13:12 +0200jmcantrell(~weechat@user/jmcantrell)
2023-08-24 19:13:42 +0200pavonia(~user@user/siracusa) (Quit: Bye!)
2023-08-24 19:14:57 +0200mud(~mud@user/kadoban)
2023-08-24 19:15:09 +0200fryguybob(~fryguybob@cpe-24-94-50-22.stny.res.rr.com)
2023-08-24 19:18:39 +0200 <justsomeguy> All the examples I found were for an older version of the library that used different imports and exposed diffferent functions. There are some examples in the repo, but they all use Conduit, language extensions, lens, monad transformers...
2023-08-24 19:19:02 +0200 <justsomeguy> I don't see a forum, irc channel, or anything like that...
2023-08-24 19:20:00 +0200 <justsomeguy> I suppose I can file a GitHub issue to add some newbie friendly examples.
2023-08-24 19:20:34 +0200nate2(~nate@c-98-45-169-16.hsd1.ca.comcast.net)
2023-08-24 19:21:21 +0200razetime_(~quassel@117.254.37.38)
2023-08-24 19:21:37 +0200razetime(~quassel@117.254.37.190) (Ping timeout: 258 seconds)
2023-08-24 19:25:13 +0200jmcantrell(~weechat@user/jmcantrell) (Quit: WeeChat 4.0.4)
2023-08-24 19:25:56 +0200jmcantrell(~weechat@user/jmcantrell)
2023-08-24 19:26:12 +0200nate2(~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 252 seconds)
2023-08-24 19:27:06 +0200razetime_(~quassel@117.254.37.38) (Ping timeout: 245 seconds)
2023-08-24 19:30:01 +0200razetime(~quassel@117.254.36.88)
2023-08-24 19:32:04 +0200oo_miguel(~Thunderbi@78-11-179-96.static.ip.netia.com.pl) (Quit: oo_miguel)
2023-08-24 19:33:44 +0200oo_miguel(~Thunderbi@78-11-179-96.static.ip.netia.com.pl)
2023-08-24 19:36:04 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2023-08-24 19:36:06 +0200dcoutts(~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) (Ping timeout: 252 seconds)
2023-08-24 19:38:13 +0200ulysses4ever(~artem@c-73-103-90-145.hsd1.in.comcast.net)
2023-08-24 19:38:13 +0200artem(~artem@2601:249:4380:8950:f474:e3f8:9806:671) (Read error: Connection reset by peer)
2023-08-24 19:38:34 +0200Lycurgus(~juan@user/Lycurgus)
2023-08-24 19:40:19 +0200jinsun(~jinsun@user/jinsun)
2023-08-24 19:42:10 +0200YuutaW(~YuutaW@mail.yuuta.moe) (Ping timeout: 246 seconds)
2023-08-24 19:42:42 +0200razetime(~quassel@117.254.36.88) (Ping timeout: 252 seconds)
2023-08-24 19:44:26 +0200jmcantrell(~weechat@user/jmcantrell) (Quit: WeeChat 4.0.4)
2023-08-24 19:44:46 +0200jmcantrell(~weechat@user/jmcantrell)
2023-08-24 19:45:33 +0200YuutaW(~YuutaW@mail.yuuta.moe)
2023-08-24 19:49:13 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2023-08-24 19:51:21 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:4421:6684:8924:105c) (Remote host closed the connection)
2023-08-24 19:59:19 +0200CiaoSen(~Jura@2a05:5800:29d:c900:664b:f0ff:fe37:9ef)
2023-08-24 20:01:57 +0200Square2(~Square4@user/square) (Ping timeout: 252 seconds)
2023-08-24 20:05:54 +0200jabuxas(~jabuxas@user/jabuxas)
2023-08-24 20:08:09 +0200briandaed(~briandaed@185.234.210.211.r.toneticgroup.pl)
2023-08-24 20:09:16 +0200Simikando(~Simikando@adsl-dyn1.91-127-51.t-com.sk) (Quit: Leaving)
2023-08-24 20:11:56 +0200Lycurgus(~juan@user/Lycurgus) (Quit: Tschüss)
2023-08-24 20:22:04 +0200waleee(~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7)
2023-08-24 20:22:37 +0200danza(~francesco@151.19.255.162) (Read error: Connection reset by peer)
2023-08-24 20:22:44 +0200jabuxas(~jabuxas@user/jabuxas) (Quit: Leaving.)
2023-08-24 20:23:52 +0200danza(~francesco@151.37.224.108)
2023-08-24 20:27:45 +0200ft(~ft@80.141.182.88)
2023-08-24 20:31:02 +0200 <dsal> justsomeguy: Mostly just generic lens. It's pretty eays.
2023-08-24 20:31:05 +0200 <dsal> ez
2023-08-24 20:31:25 +0200 <dsal> I use it for mostly s3 and a bit of sqs and lambda.
2023-08-24 20:32:55 +0200 <[exa]> hey guys just checking, is this a thing with any consequences or was it a onetime scream? https://www.simplehaskell.org/
2023-08-24 20:33:11 +0200 <dsal> It's not even a thing.
2023-08-24 20:33:28 +0200 <dsal> I was working on a project that thought it was very important, but I couldn't find any two people who could agree on what it meant.
2023-08-24 20:34:51 +0200 <dsal> If you dig into some of the pages, you'll find a few different people who've said what simple things they think are important. And then you do the venn diagram and you end up with regular Haskell.
2023-08-24 20:35:06 +0200 <[exa]> yeah I kinda suspected.
2023-08-24 20:36:23 +0200 <dsal> It ended up being a nightmare. Some of the things the Guy Who Cared demanded were on most of the lists of things to avoid, and some of the things he forbade were on most of the lists of things to use.
2023-08-24 20:37:56 +0200justsomeguy(~justsomeg@user/justsomeguy) (Ping timeout: 260 seconds)
2023-08-24 20:44:14 +0200 <danza> i saw a mention to that project in a post linked today in haskell weekly, but i found the principles listed in that post as vague as the concept of "simple haskell"
2023-08-24 20:46:03 +0200 <danza> this is the post dev.to/zelenya/do-your-values-align-with-fp-values-48l9, for reference
2023-08-24 20:48:12 +0200 <danza> i have several issues with it, besides writing about values in an handwavy way, but the vagueness relates to what you were chatting about
2023-08-24 20:51:50 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:4421:6684:8924:105c)
2023-08-24 20:52:46 +0200hyvoid(~hyenavoid@222-0-178-69.static.gci.net) (Remote host closed the connection)
2023-08-24 20:53:13 +0200hyvoid(~hyenavoid@222-0-178-69.static.gci.net)
2023-08-24 20:54:20 +0200Pickchea(~private@user/pickchea)
2023-08-24 20:56:05 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:4421:6684:8924:105c) (Ping timeout: 246 seconds)
2023-08-24 20:56:13 +0200 <[exa]> also lots of "man I wish ghc was simple" vibes.... :]
2023-08-24 20:58:16 +0200justsomeguy(~justsomeg@user/justsomeguy)
2023-08-24 21:04:01 +0200azimut(~azimut@gateway/tor-sasl/azimut)
2023-08-24 21:04:07 +0200jle`(~jle`@cpe-23-240-75-236.socal.res.rr.com) (Ping timeout: 245 seconds)
2023-08-24 21:06:24 +0200jle`(~jle`@cpe-23-240-75-236.socal.res.rr.com)
2023-08-24 21:09:25 +0200myxos(~myxos@cpe-65-28-251-121.cinci.res.rr.com)
2023-08-24 21:09:42 +0200random-jellyfish(~random-je@user/random-jellyfish) (Quit: Client closed)
2023-08-24 21:10:07 +0200mc47(~mc47@xmonad/TheMC47) (Remote host closed the connection)
2023-08-24 21:16:13 +0200azimut(~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection)
2023-08-24 21:16:30 +0200azimut(~azimut@gateway/tor-sasl/azimut)
2023-08-24 21:20:00 +0200td_(~td@i5387091D.versanet.de) (Ping timeout: 256 seconds)
2023-08-24 21:21:38 +0200td_(~td@i53870920.versanet.de)
2023-08-24 21:23:25 +0200justsomeguy(~justsomeg@user/justsomeguy) (Quit: WeeChat 3.6)
2023-08-24 21:24:01 +0200coot(~coot@89-69-206-216.dynamic.chello.pl) (Quit: coot)
2023-08-24 21:29:43 +0200caryhartline(~caryhartl@168.182.58.169)
2023-08-24 21:30:46 +0200 <EvanR> simple haskell is one of the stages in the evolution of a haskell programmer
2023-08-24 21:30:59 +0200 <EvanR> check that out to see simple haskell
2023-08-24 21:32:27 +0200 <geekosaur> when we're talking about haskell, are we talking about haskell or are we talking about pseudo-idris?
2023-08-24 21:39:11 +0200idgaen(~idgaen@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 4.0.2)
2023-08-24 21:46:10 +0200 <monochrom> Unpopular opinion: Once again programmers forget that the meaning of "simple" is "it depends".
2023-08-24 21:48:01 +0200 <EvanR> "Industrial Haskell users are realizing that the key to delivering software on time and under budget is to keep it simple" wait a minute here. I haven't seen an industrial haskell thing yet that wasn't a monstrous complexity thing
2023-08-24 21:48:13 +0200 <EvanR> so maybe this is aspirational
2023-08-24 21:48:19 +0200 <EvanR> instead of empirical
2023-08-24 21:49:11 +0200 <EvanR> in a haskell job interview I mentioned I like to keep my haskell code simple, I didn't get the job!
2023-08-24 21:51:21 +0200 <monochrom> Have we seen an industrial haskell thing that is over time and/or over budget? :)
2023-08-24 21:51:53 +0200 <monochrom> In fact, how do you define over budget in the first place?
2023-08-24 21:53:30 +0200 <monochrom> The Chicago school of economics correct observe that everyone just complains "your product is overpriced, my product is underpriced" all the time anyway.
2023-08-24 21:53:39 +0200 <geekosaur> s/industrial haskell thing/industrial software thing/
2023-08-24 21:53:44 +0200 <EvanR> I've never heard of *under* budget. Only costs increase to meet the budget supplied
2023-08-24 21:56:09 +0200 <monochrom> One more unpopular opinion: The key to on time and under budget is to aim for less. If anything needs to be simple, it should be the spec.
2023-08-24 21:56:25 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2023-08-24 21:57:23 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2023-08-24 21:57:58 +0200artem(~artem@2601:408:c408:6d23:f474:e3f8:9806:671)
2023-08-24 21:58:19 +0200ulysses4ever(~artem@c-73-103-90-145.hsd1.in.comcast.net) (Read error: Connection reset by peer)
2023-08-24 21:58:25 +0200ulysses4ever(~artem@c-73-103-90-145.hsd1.in.comcast.net)
2023-08-24 22:01:14 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2023-08-24 22:01:28 +0200powderhorn(~powderhor@207-153-12-54.static.fttp.usinternet.com) (Quit: Client closed)
2023-08-24 22:01:46 +0200artem(~artem@2601:408:c408:6d23:f474:e3f8:9806:671) (Read error: Connection reset by peer)
2023-08-24 22:09:44 +0200Guest24(~Guest24@worthwhile.mesher.volia.net)
2023-08-24 22:09:49 +0200Guest_Artem(~Guest_Art@178.92.98.167)
2023-08-24 22:10:17 +0200Guest_ArtemArtem
2023-08-24 22:11:48 +0200 <ddellacosta> simple is so contextual, I don't see how anyone can identify some subset of Haskell that qualifies as "Simple"
2023-08-24 22:13:01 +0200Nixkernal(~Nixkernal@119.4.193.178.dynamic.wline.res.cust.swisscom.ch) (Ping timeout: 260 seconds)
2023-08-24 22:13:11 +0200 <dolio> Seems like marketing.
2023-08-24 22:14:06 +0200 <dolio> 'I read some headlines/reddit comments that Haskell requires PhDs, but this group is keeping it simple.'
2023-08-24 22:16:39 +0200 <EvanR> the K.I.S principle. Coined here and now
2023-08-24 22:17:54 +0200 <tomsmeding> arguably the "stupid" part here would mean that the spec is simple
2023-08-24 22:18:15 +0200 <tomsmeding> after all, what else would it mean for a program to be stupid than that it does just simple things
2023-08-24 22:18:34 +0200 <tomsmeding> (apart from doing the wrong thing, but that's not what this "stupid" refers to)
2023-08-24 22:19:59 +0200_ht(~Thunderbi@28-52-174-82.ftth.glasoperator.nl) (Quit: _ht)
2023-08-24 22:21:33 +0200 <dsal> We go through so much stuff to avoid using lens. Because doing a lot of stuff is more simple than just using a lib.
2023-08-24 22:21:38 +0200briandaed(~briandaed@185.234.210.211.r.toneticgroup.pl) (Remote host closed the connection)
2023-08-24 22:22:22 +0200bratwurst(~blaadsfa@2604:3d09:207f:f650:216:3eff:fe5a:a1f8)
2023-08-24 22:23:15 +0200pavonia(~user@user/siracusa)
2023-08-24 22:23:23 +0200 <tomsmeding> I mean, when I encounter a particularly jargon- or notation-heavy (for me) piece of maths, I do sometimes expand the notation into simpler concepts first, then try to understand it that way
2023-08-24 22:23:27 +0200 <tomsmeding> this is not always successful
2023-08-24 22:24:07 +0200 <tomsmeding> but if the jargon/notation is halfway decent, getting past the initial hurdle will make the maths more understandable _with_ the notation
2023-08-24 22:24:09 +0200 <Artem> ghci> [x | x<-[0..], x<5]
2023-08-24 22:24:10 +0200 <Artem> 
2023-08-24 22:24:10 +0200 <Artem> [0,1,2,3,4Interrupted.
2023-08-24 22:24:11 +0200 <Artem> Are there any languages or extensions for haskell that can perform such reasonings.
2023-08-24 22:24:31 +0200 <geekosaur> not for haskell, haskell is not mathematica
2023-08-24 22:25:10 +0200 <geekosaur> it does not reason about your expressions, and laziness by itself cannot prove that `x<5` will never become `True` again
2023-08-24 22:25:11 +0200 <tomsmeding> Artem: that kind of reasoning _is_ basically a theorem prover
2023-08-24 22:25:27 +0200 <tomsmeding> because what if the "<5" was "satisfies some weird math theorem"
2023-08-24 22:25:44 +0200 <dolio> Like the halting problem.
2023-08-24 22:25:45 +0200 <monochrom> This is why I don't say "expand definition into simpler terms", I say "expand definition into more elementary terms".
2023-08-24 22:25:51 +0200 <ncf> > takeWhile (< 5) [0..]
2023-08-24 22:25:52 +0200 <lambdabot> [0,1,2,3,4]
2023-08-24 22:26:02 +0200dcoutts(~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net)
2023-08-24 22:26:22 +0200 <monochrom> Some of the advanced definitions and abstractions are there to simplify things. Elementary is not always simple.
2023-08-24 22:26:39 +0200 <tomsmeding> Artem: hence you will find this kind of reasoning in theorem provers: mathematica can do very specialised reasoning about mostly analysis, but more general provers are e.g. SMT solver like Z3
2023-08-24 22:26:49 +0200 <tomsmeding> monochrom++
2023-08-24 22:27:36 +0200 <Artem> got it, thanks
2023-08-24 22:28:15 +0200 <tomsmeding> anyway about the simple/elementary stuff, my point was that not wanting to use lens may be the same desire to reduce to elementary terms to avoid having to learn heavy notation
2023-08-24 22:28:28 +0200 <dolio> Sometimes you have to do the opposite, though. Mathematicians have pre-expanded things into complicated 'elementary' terms because their idea is classically trivial. :)
2023-08-24 22:28:32 +0200 <tomsmeding> but after the learning curve, applications that benefit significantly from lens are probable actually _more_ readable
2023-08-24 22:28:33 +0200 <monochrom> Whenever you see a paper that says "an elementary proof of theorem foo" you know it is going to be a messy, precisely because sticking only to elementary backgrounds and "only the 500 most common English words that are 4 letters each or less" and that sort of things.
2023-08-24 22:28:50 +0200tomsmedinghas never used lens in anger
2023-08-24 22:29:08 +0200dhil(~dhil@78.45.150.83.ewm.ftth.as8758.net) (Ping timeout: 256 seconds)
2023-08-24 22:29:41 +0200Artem(~Guest_Art@178.92.98.167) (Quit: Client closed)
2023-08-24 22:30:06 +0200bgs(~bgs@212-85-160-171.dynamic.telemach.net) (Remote host closed the connection)
2023-08-24 22:30:50 +0200Guest_Artem(~Guest_Art@167-98-92-178.pool.ukrtel.net)
2023-08-24 22:31:03 +0200 <dsal> tomsmeding: I've got a data structure that contains a list of two different types of items which have ~16 types of subitems each of which contains other type-specific types, though many of these different things have bits in common. I have to do things like add up all of the a.[b].[c].d's which would just be `sumOf (folded b . _Something . folded c . d) a` but that's hard to read, so just write a lot of code instead.
2023-08-24 22:31:42 +0200 <tomsmeding> dsal: I'm not arguing against using lens
2023-08-24 22:31:45 +0200Guest24(~Guest24@worthwhile.mesher.volia.net) (Quit: Client closed)
2023-08-24 22:31:49 +0200 <dsal> Nah, I just mean I have a really good use case. :)
2023-08-24 22:31:53 +0200 <dsal> But it's "bad"
2023-08-24 22:32:10 +0200 <dsal> We do use OverloadedRecordDot, which I dislike quite a bit, but am at least putting to _some_ good use in here.
2023-08-24 22:32:10 +0200Guest_Artem(~Guest_Art@167-98-92-178.pool.ukrtel.net) (Client Quit)
2023-08-24 22:32:16 +0200 <geekosaur> crazy. I mean, I can read that and I am no lens expert
2023-08-24 22:32:20 +0200 <tomsmeding> I'm basically verbosely arguing that people that refuse to use lens are basically just unwilling to learn something with a steeper learning curve :p
2023-08-24 22:32:25 +0200 <tomsmeding> in which case it's weird that they're in haskell
2023-08-24 22:32:38 +0200 <tomsmeding> geekosaur: but can you write it
2023-08-24 22:32:41 +0200 <dsal> They argue that they don't want _other people_ to have to learn to read something new.
2023-08-24 22:32:45 +0200 <geekosaur> maybe
2023-08-24 22:32:47 +0200 <dolio> I've been confused about that kind of thing for a long time.
2023-08-24 22:32:55 +0200machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net)
2023-08-24 22:32:56 +0200 <ddellacosta> I mean, I think lens is a perfect example of something that can make your code a lot simpler, or a lot more complex, depending on your use-case and how you use it. It's a perfect example of why I don't think you can pin down what "simple Haskell" is
2023-08-24 22:33:04 +0200 <dsal> You can do some really weird things with lens. That's the bad part.
2023-08-24 22:33:18 +0200 <ddellacosta> but I don't fault people for not wanting to learn it either, it's a lot
2023-08-24 22:33:38 +0200 <dsal> I agree up until the part where we work very hard all the time to avoid it. heh
2023-08-24 22:33:55 +0200 <ddellacosta> yeah I mean to be fair there are good reasons for that in general
2023-08-24 22:34:16 +0200 <dsal> HasField is pretty handy for one very small use case, but it's the one I generally don't care all that much about.
2023-08-24 22:34:26 +0200jmdaemon(~jmdaemon@user/jmdaemon)
2023-08-24 22:34:42 +0200 <dolio> I still structure things using ideas from lens even when not using lens much. Like, write a traversal over something and derive a bunch of other functions from it.
2023-08-24 22:35:30 +0200 <dsal> Yeah, once it seeps into you, you do see how it simplifies a few patterns.
2023-08-24 22:35:42 +0200 <dolio> That's the important part of lens, to me.
2023-08-24 22:36:33 +0200 <dolio> Always write a traversal over something.
2023-08-24 22:36:36 +0200 <dsal> I end up doing stuff like the above by translating my lens code to just manual folds and stuff and it's… not that bad. Just feels unnecessary.
2023-08-24 22:36:59 +0200 <dolio> Otherwise you'll end up writing like 3 other functions that have the same structure eventually.
2023-08-24 22:40:27 +0200 <dolio> Then lens has some nice stuff for deriving the other things from the traversals, instead of wrapping them manually.
2023-08-24 22:40:44 +0200 <dolio> Also maybe auto-writing the traversals in the first place.
2023-08-24 22:40:51 +0200 <dsal> Simple Haskell Guy would always put me against the least-motivated junior developer and compare a simple toListOf kind of thing vs. ~10 lines of code to compare them. I had written something in a test like `thing ^.. stuff . folded . otherStuff . folded . _Just . foo` and the guy just declared he couldn't understand that.
2023-08-24 22:41:21 +0200 <tomsmeding> I mean I don't
2023-08-24 22:41:23 +0200 <dsal> So I walk through it and when I got to _Just I handwaved it as "this is a maybe and we just want the Just value" and Simple Haskell Guy interrupts me to explain that this is actually a prism and to explain what a prism is and all that.
2023-08-24 22:41:32 +0200 <tomsmeding> but that doesn't mean much because I've never actually used lens :D
2023-08-24 22:41:59 +0200mechap(~mechap@user/mechap)
2023-08-24 22:42:25 +0200Square2(~Square4@user/square)
2023-08-24 22:42:27 +0200 <dsal> Yeah, sure. I'm fine with people encountering stuff they don't immediately understand. I just don't think it makes sense to spend an hour arguing over a test assertion that I ended up having to spend another couple hours on writing in a way that Simple Haskell Guy thought was acceptable because Unmotivated Guy didn't immediately know what _Just meant.
2023-08-24 22:43:06 +0200gatekempt(~gatekempt@user/gatekempt) (Ping timeout: 252 seconds)
2023-08-24 22:43:14 +0200 <dsal> Simple Haskell Guy was a _huge_ test advocate who didn't test his code very well and seemed to be a little annoyed when I did.
2023-08-24 22:45:12 +0200 <geekosaur> this sounds to me like a "bail now" moment in the making
2023-08-24 22:45:49 +0200 <mauke> court later
2023-08-24 22:46:23 +0200 <dsal> He also had this weird theory about how you should have separate config concepts for parameters and config files and runtime config. Unmotivated Guy followed that pattern and we basically had 2-3 structures that were roughly identical except for like, one field and a function that plucked each field from A to B every time you changed something. So I introduced a "type parameter" and a type changing record change for that one field.
2023-08-24 22:47:10 +0200 <dsal> Unmotivated Guy thought that was way too complicated and we should just have pages of untested code with easily demonstrable bugs.
2023-08-24 22:47:41 +0200 <dsal> Anyway, list of people I don't ever want to work with again ++
2023-08-24 22:47:52 +0200 <tomsmeding> yeah that sounds like records 101
2023-08-24 22:48:09 +0200 <tomsmeding> I'd call that a _low-tech_ trick
2023-08-24 22:48:41 +0200 <dsal> I think to these people "simple haskell" means I can see everything that is happening. If you have to copy each field one at a time, then you can see the fields being copied.
2023-08-24 22:48:56 +0200 <tomsmeding> maybe they were scarred by C++
2023-08-24 22:49:37 +0200 <tomsmeding> also "seeing everything that is happening" is subjective, why expand _Just but not foldr
2023-08-24 22:49:39 +0200 <dsal> I honestly couldn't understand any of their motivations. I work with some people now who do things I don't like that much, but I don't think they're _dumb_.
2023-08-24 22:50:04 +0200mikoto-chan(~mikoto-ch@ip-83-134-209-157.dsl.scarlet.be)
2023-08-24 22:50:39 +0200 <dsal> Someone pointed this out today: https://journal.infinitenegativeutility.com/leaving-haskell-behind
2023-08-24 22:51:46 +0200 <dsal> There's a lot of "I did a thing once and it didn't work there so I'll never use this one thing again."
2023-08-24 22:51:49 +0200 <tomsmeding> domain name says it all?
2023-08-24 22:52:39 +0200 <dsal> It's fairly pro-haskell. Many of the negative bits aren't wrong.
2023-08-24 22:53:01 +0200 <dsal> And they're not even necessarily bad. Like, sometimes your code doesn't build on newer ghc.
2023-08-24 22:55:10 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2023-08-24 22:55:27 +0200fendor(~fendor@2a02:8388:1640:be00:af83:ade1:cd40:fe7a) (Remote host closed the connection)
2023-08-24 22:55:30 +0200waleee(~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) (Ping timeout: 244 seconds)
2023-08-24 22:57:32 +0200waleee(~waleee@h-176-10-137-138.NA.cust.bahnhof.se)
2023-08-24 22:59:24 +0200mvk(~mvk@2607:fea8:5c9a:a600::1c6d) (Ping timeout: 248 seconds)
2023-08-24 23:01:43 +0200 <ph88> in ZonedTime why is the time part a LocalTime and not UTCTime ?
2023-08-24 23:05:33 +0200 <glguy> So that it more directly matches the written representation without math
2023-08-24 23:05:37 +0200 <glguy> I would assume
2023-08-24 23:07:35 +0200 <ph88> should i store UTCTime or LocalTime in my database ?
2023-08-24 23:07:54 +0200 <ph88> i want to store the timezone too so i know in which timezone it was entered
2023-08-24 23:08:25 +0200 <glguy> If you intend to sort by UTC times, I'd store that
2023-08-24 23:08:56 +0200 <monochrom> I recommend UTC time and timezone unless I know what your application really needs.
2023-08-24 23:08:56 +0200 <ph88> yes
2023-08-24 23:09:12 +0200 <ph88> is there a type that has UTCTime and TimeZone ?
2023-08-24 23:09:26 +0200 <EvanR> local time + timezone(offset) can be converted to UTCTime
2023-08-24 23:09:29 +0200 <glguy> No, that wouldn't generally be useful enough to have a name, I think
2023-08-24 23:09:43 +0200 <EvanR> UTC *is* a time zone already
2023-08-24 23:09:55 +0200 <EvanR> UTC+0
2023-08-24 23:10:03 +0200 <glguy> Usually if you're storing time zones it's on the users record as a viewing preference, not the event
2023-08-24 23:10:09 +0200 <monochrom> Yeah we mean time zone of the user.
2023-08-24 23:10:53 +0200 <monochrom> This is the fundamental difficulty of giving advice without knowing what it's for.
2023-08-24 23:11:05 +0200 <ph88> is there any scenario in which i would want to know the timezone in which the datetime was entered ?
2023-08-24 23:11:09 +0200 <monochrom> For example everyone should just write in Haskell. :)
2023-08-24 23:11:16 +0200 <ph88> it's just a calendar app
2023-08-24 23:12:00 +0200 <monochrom> When the user demands to know "remind me which timezone I used back then"?
2023-08-24 23:12:13 +0200 <EvanR> I'm on a plane going from new york to hawaii, and enter something into the calendar
2023-08-24 23:12:17 +0200 <EvanR> what should the timezone be
2023-08-24 23:12:27 +0200 <EvanR> and who cares lol
2023-08-24 23:12:54 +0200 <monochrom> which brings back to what I said about if you want your software to be on time and under budget, aim for less, e.g., simply deny that kind of demands. :)
2023-08-24 23:13:22 +0200 <EvanR> (in that case, if anyone cares, they're out of luck, it seems)
2023-08-24 23:13:42 +0200 <ph88> it's a hobby project
2023-08-24 23:13:46 +0200 <monochrom> Wait, isn't ZonedTime UTC+zone?
2023-08-24 23:13:50 +0200 <EvanR> no
2023-08-24 23:14:01 +0200 <EvanR> that doesn't make sense
2023-08-24 23:14:21 +0200 <ph88> the database has a type like UTCTime + TimeZone https://neo4j.com/docs/bolt/current/bolt/structure-semantics/#structure-legacy-datetime
2023-08-24 23:14:23 +0200 <monochrom> oh it's localtime+zone
2023-08-24 23:14:42 +0200 <monochrom> Well, like you said, isomorphic. :)
2023-08-24 23:15:10 +0200 <EvanR> yeah you will encounter many time libraries that make no sense so beware
2023-08-24 23:15:49 +0200 <monochrom> Why not have utc+local+zone just for the sake of completeness and remove all hairsplitting :)
2023-08-24 23:15:55 +0200 <monochrom> @quote monochrom polymorphic
2023-08-24 23:15:55 +0200 <lambdabot> monochrom says: All pointless debates can be settled by going polymorphic.
2023-08-24 23:16:11 +0200 <EvanR> plus absolute time, plus universal time
2023-08-24 23:16:37 +0200CiaoSen(~Jura@2a05:5800:29d:c900:664b:f0ff:fe37:9ef) (Ping timeout: 245 seconds)
2023-08-24 23:16:52 +0200 <ph88> i think i was wrong about the comment on the database now that i'm reading the example
2023-08-24 23:17:54 +0200 <monochrom> hobby project => KISS => just UTC until you regret it
2023-08-24 23:17:56 +0200 <EvanR> ph88, imagine that UTCTime values represent points in real time in real history, and LocalTime is just a Date + HH:MM:SS with no context. Both are useful for different things. And time zone (series) are the very complicated bridge between them, which you might not need for your app at all
2023-08-24 23:18:18 +0200 <EvanR> and a Date is a square on a calendar
2023-08-24 23:18:48 +0200 <ph88> i think utc all the way is a good idea, i'm just taking a moment to think about it
2023-08-24 23:19:00 +0200 <geekosaur> if only time were that simple
2023-08-24 23:20:13 +0200 <EvanR> if I were making a simple calendar app, it would just use Date and time of day. It wouldn't need to know anything about daylight savings time in my country
2023-08-24 23:20:48 +0200 <EvanR> would work as long as my appointment isn't across state lines, esp arizona area where time is super messed up
2023-08-24 23:22:18 +0200nate2(~nate@c-98-45-169-16.hsd1.ca.comcast.net)
2023-08-24 23:22:25 +0200 <monochrom> Wait, I thought Illinois was messed up. :)
2023-08-24 23:23:02 +0200 <geekosaur> actually I think illinois is the easy one, they just don't do daylight/summer time
2023-08-24 23:23:10 +0200 <EvanR> northern arizona time doesn't correspond to california, utah, new mexico, or navajo time
2023-08-24 23:23:39 +0200todi(~snuckls@p4fd1a580.dip0.t-ipconnect.de) (Remote host closed the connection)
2023-08-24 23:24:08 +0200 <EvanR> the visitor center just puts those 4 clocks up and calls it a day
2023-08-24 23:27:06 +0200nate2(~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 260 seconds)
2023-08-24 23:27:57 +0200artem(~artem@2601:249:4380:8950:f474:e3f8:9806:671)
2023-08-24 23:27:57 +0200ulysses4ever(~artem@c-73-103-90-145.hsd1.in.comcast.net) (Read error: Connection reset by peer)
2023-08-24 23:28:30 +0200michalz(~michalz@185.246.207.203) (Remote host closed the connection)
2023-08-24 23:28:57 +0200 <ph88> Sat Sep 17 2112 23:53:47 GMT+0000 the moment where javascript can not accurately encode unix epoch in a 52bit mantissa of the floating point ^^
2023-08-24 23:29:57 +0200mvk(~mvk@2607:fea8:5c9a:a600::1c6d)
2023-08-24 23:30:27 +0200Tuplanolla(~Tuplanoll@91-159-68-236.elisa-laajakaista.fi)
2023-08-24 23:30:36 +0200 <EvanR> interesting
2023-08-24 23:30:44 +0200 <EvanR> I'll mark my calendar. In something other than javascript
2023-08-24 23:30:53 +0200 <ph88> xD
2023-08-24 23:39:14 +0200 <EvanR> hmm, localTimeToUTC utc (LocalTime (fromGregorian 2112 9 17) (TimeOfDay 23 53 47)) `diffUTCTime` posixSecondsToUTCTime 0 gives 4503599627s
2023-08-24 23:39:19 +0200 <EvanR> are you sure that can't fit in a double
2023-08-24 23:39:33 +0200 <EvanR> 52 is a lot of bits
2023-08-24 23:40:38 +0200 <mauke> doesn't javascript use milliseconds?
2023-08-24 23:41:31 +0200 <EvanR> after multiplying that number by 1000 and taking the log base 2 I get 42.0something
2023-08-24 23:41:53 +0200 <monochrom> Y2.1K
2023-08-24 23:42:08 +0200 <EvanR> ^
2023-08-24 23:42:28 +0200bratwurst(~blaadsfa@2604:3d09:207f:f650:216:3eff:fe5a:a1f8) (Remote host closed the connection)
2023-08-24 23:42:46 +0200bratwurst(~blaadsfa@2604:3d09:207f:f650:216:3eff:fe5a:a1f8)
2023-08-24 23:44:41 +0200 <hpc> > 2**52
2023-08-24 23:44:43 +0200 <lambdabot> 4.503599627370496e15
2023-08-24 23:45:19 +0200 <hpc> > 2**52 `div` 60 `div` 60 `div` 24 `div` 365
2023-08-24 23:45:21 +0200 <lambdabot> error:
2023-08-24 23:45:21 +0200 <lambdabot> • Ambiguous type variable ‘a0’ arising from a use of ‘show_M461004017431...
2023-08-24 23:45:21 +0200 <lambdabot> prevents the constraint ‘(Show a0)’ from being solved.
2023-08-24 23:45:39 +0200 <hpc> > 2**52 / 60 / 60 / 24 / 365
2023-08-24 23:45:41 +0200 <lambdabot> 1.4280820736207813e8
2023-08-24 23:45:42 +0200 <mauke> > 2^52 `div` 60 `div` 60 `div` 24 `div` 365
2023-08-24 23:45:43 +0200 <lambdabot> 142808207
2023-08-24 23:45:49 +0200 <hpc> that's a lot of years
2023-08-24 23:46:17 +0200 <EvanR> 4503599627... 4.503599627370496e15 ... probably just numerical coincidence as usual
2023-08-24 23:48:04 +0200 <hpc> off by a factor of 1e6
2023-08-24 23:50:21 +0200acidjnk(~acidjnk@p200300d6e7072f45448198b239e9f563.dip0.t-ipconnect.de) (Ping timeout: 245 seconds)
2023-08-24 23:51:16 +0200jabuxas(~jabuxas@user/jabuxas)
2023-08-24 23:55:22 +0200artem(~artem@2601:249:4380:8950:f474:e3f8:9806:671) (Read error: Connection reset by peer)
2023-08-24 23:55:26 +0200ulysses4ever(~artem@c-73-103-90-145.hsd1.in.comcast.net)
2023-08-24 23:56:24 +0200mikoto-chan(~mikoto-ch@ip-83-134-209-157.dsl.scarlet.be) (Ping timeout: 256 seconds)
2023-08-24 23:59:56 +0200mvk(~mvk@2607:fea8:5c9a:a600::1c6d) (Ping timeout: 245 seconds)