Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2021-03-21 22:29:35 <ski> See : Allegory, Copycat, Metaphor, Numerology, Prisoners, Square Wheels.
2021-03-21 22:29:45 <ski> -- "Locus Solum : From the rules of logic to the logic of rules" (Appendix A, "A pure waste of paper") by Jean-Yves Girard in 2001 at <https://girard.perso.math.cnrs.fr/0.pdf>
2021-03-21 22:30:01 ski . o O ( "Science Fictions" <https://www.smbc-comics.com/comic/science-fictions> )
2021-03-21 22:30:21 × coot quits (~coot@37.30.58.223.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
2021-03-21 22:30:41 mav1 joins (~mav@ip-88-152-11-222.hsi03.unitymediagroup.de)
2021-03-21 22:37:35 × ixlun quits (~matthew@109.249.184.133) (Ping timeout: 256 seconds)
2021-03-21 22:43:09 × juri_ quits (~juri@178.63.35.222) (Ping timeout: 264 seconds)
2021-03-21 22:43:14 son0p joins (~son0p@181.136.122.143)
2021-03-21 22:45:13 <hpc> that makes me think of godel escher bach's "stories", which seemed to all go something like "Socrates: imagine you have an A, B, and C such that blah blah blah blah"
2021-03-21 22:45:24 <hpc> and all i could think reading it was "jeez, just give me the actual equation"
2021-03-21 22:46:57 <ski> it can be a stepping stone, i suppose
2021-03-21 22:47:24 × matryoshka quits (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) (Ping timeout: 265 seconds)
2021-03-21 22:50:06 chirpsalot joins (~Chirps@pool-98-115-239-235.phlapa.fios.verizon.net)
2021-03-21 22:50:10 Chobbes joins (~Chobbes@pool-98-115-239-235.phlapa.fios.verizon.net)
2021-03-21 22:50:28 × kiweun quits (~kiweun@cpe98524a8cef7c-cm98524a8cef7a.cpe.net.cable.rogers.com) (Remote host closed the connection)
2021-03-21 22:51:13 × molehillish quits (~molehilli@ip98-167-226-26.ph.ph.cox.net) (Remote host closed the connection)
2021-03-21 22:51:18 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 245 seconds)
2021-03-21 22:52:53 hackage sbv 8.13 - SMT Based Verification: Symbolic Haskell theorem prover using SMT solving. https://hackage.haskell.org/package/sbv-8.13 (LeventErkok)
2021-03-21 22:53:04 kiweun joins (~kiweun@2607:fea8:2a62:9600:c874:3671:2027:3155)
2021-03-21 23:00:56 × mav1 quits (~mav@ip-88-152-11-222.hsi03.unitymediagroup.de) (Ping timeout: 240 seconds)
2021-03-21 23:02:37 Sorny joins (~Sornaensi@077213203030.dynamic.telenor.dk)
2021-03-21 23:04:22 Sornaens1 joins (~Sornaensi@077213203030.dynamic.telenor.dk)
2021-03-21 23:05:03 × Sornaensis quits (~Sornaensi@077213203030.dynamic.telenor.dk) (Ping timeout: 260 seconds)
2021-03-21 23:07:39 bgamari joins (~bgamari@72.65.101.179)
2021-03-21 23:07:45 × Sorny quits (~Sornaensi@077213203030.dynamic.telenor.dk) (Ping timeout: 264 seconds)
2021-03-21 23:08:11 × elfets quits (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Ping timeout: 256 seconds)
2021-03-21 23:08:19 curl joins (5ce955fb@gateway/web/cgi-irc/kiwiirc.com/ip.92.233.85.251)
2021-03-21 23:08:21 × knupfer quits (~Thunderbi@200116b82c854200c01b3ec09b839738.dip.versatel-1u1.de) (Quit: knupfer)
2021-03-21 23:08:51 × son0p quits (~son0p@181.136.122.143) (Quit: leaving)
2021-03-21 23:09:27 __minoru__shirae joins (~shiraeesh@109.166.57.171)
2021-03-21 23:13:18 × timCF quits (~i.tkachuk@m91-129-99-43.cust.tele2.ee) (Ping timeout: 265 seconds)
2021-03-21 23:14:15 <LogicUpgrade> We need a new paragidm: mutable functional programming
2021-03-21 23:14:26 <curl> no we dont
2021-03-21 23:14:35 <LogicUpgrade> Erlang is kinda there with process dictionaries
2021-03-21 23:14:45 <monochrom> It is not new at all. Scheme and SML already have it.
2021-03-21 23:14:46 × usr25 quits (~usr25@unaffiliated/usr25) (Quit: Leaving)
2021-03-21 23:14:56 <monochrom> More meta-ly, are you done?
2021-03-21 23:15:10 <LogicUpgrade> monochrom, well we need it in a way that makes it an official approach, rather than seen as some mix
2021-03-21 23:15:15 <curl> purity is power...
2021-03-21 23:15:21 <curl> why dispense of that?
2021-03-21 23:15:35 <curl> what do you hope to gain that could make up for whats lost?
2021-03-21 23:15:43 <LogicUpgrade> Perfectly pure water can't even freeze. How'd we make ice-cream then
2021-03-21 23:15:54 <curl> monochrom: its a troll?
2021-03-21 23:16:08 <monochrom> I'm planning to ban. Any objection?
2021-03-21 23:16:15 <LogicUpgrade> :P
2021-03-21 23:16:27 <curl> i object in principle yes
2021-03-21 23:16:42 <curl> LogicUpgrade: pack it in
2021-03-21 23:16:52 <ski> @quote jlf
2021-03-21 23:16:52 <lambdabot> jlf says: sufficiently advanced ignorance is indistinguishable from trolling
2021-03-21 23:17:00 <ski> ;)
2021-03-21 23:17:17 <LogicUpgrade> I am dumb, I'm very dumb
2021-03-21 23:18:03 <curl> a discussion on mutable programing doesnt sound bad, but if you cant actually have such a conversation...
2021-03-21 23:18:06 <LogicUpgrade> But still what if we had a walled-off mutable part of every program. I don't mean via monads, but entirely.
2021-03-21 23:18:21 <LogicUpgrade> Isolated, but mutable
2021-03-21 23:18:25 <ski> look into "effect systems" ?
2021-03-21 23:18:33 <Axman6> LogicUpgrade: we already have exactly that
2021-03-21 23:19:23 <Axman6> the ST monad gives us honest to goodness mutation, in a guaranteed pure wrapper. Haskell programs actually use it all the time behind the scenes
2021-03-21 23:22:50 <ski> you could implement `sort :: Ord a => [a] -> [a]', using `ST', e.g., possibly using (in-place) quicksort on a locally allocated array
2021-03-21 23:27:50 <lechner> Hi, in an interactive example with 'find' from Data.List, typing ':t' returns a Foldable prefix in "find :: Foldable t => (a -> Bool) -> t a -> Maybe a" while the expected output from the example should just be "find :: (a -> Bool) -> [a] -> Maybe a". Am I using a newer (or older) version of GHCI? What is a Foldable, please? Thanks! http://learnyouahaskell.com/modules
2021-03-21 23:28:44 <Axman6> a few years ago several functions which used to be list only werre generalised to any foldable
2021-03-21 23:28:57 <Axman6> % :t Data.List.find
2021-03-21 23:28:57 <yahb> Axman6: forall {t :: * -> *} {a}. Foldable t => (a -> Bool) -> t a -> Maybe a
2021-03-21 23:29:03 <Axman6> % :t Data.List.find @[]
2021-03-21 23:29:03 <yahb> Axman6: forall {a}. (a -> Bool) -> [a] -> Maybe a
2021-03-21 23:29:22 <Axman6> they are the same type when t ~ []
2021-03-21 23:29:40 <lechner> Axman6: ah, thanks!
2021-03-21 23:30:25 <Axman6> % :t getFirst . foldMap (First . Just)
2021-03-21 23:30:25 <yahb> Axman6: forall {t :: * -> *} {a}. Foldable t => t a -> Maybe a
2021-03-21 23:31:11 <Axman6> % :t \p -> getFirst . foldMap (\x -> First $ if p x then Just x else Nothing)
2021-03-21 23:31:11 <yahb> Axman6: forall {t :: * -> *} {a}. Foldable t => (a -> Bool) -> t a -> Maybe a
2021-03-21 23:31:45 <lechner> Also, why do I not see parentheses for ":t elemIndex" around (Eq a) as in the example, please? elemIndex :: Eq a => a -> [a] -> Maybe Int (same link)
2021-03-21 23:33:39 × heatsink_ quits (~heatsink@2600:1700:bef1:5e10:90f:37ea:5699:98fc) (Remote host closed the connection)
2021-03-21 23:34:11 <hololeap> lechner: the parentheses aren't required when you have one constraint
2021-03-21 23:34:37 <hololeap> so, it could be written "Eq a => ..." or "(Eq a) => ..."
2021-03-21 23:34:41 <lechner> what do they mean, please?
2021-03-21 23:34:44 ski prefers the former
2021-03-21 23:35:35 <ski> the brackets there are only required/mandatory, when you have multiple constraints, rather than just one, in which case they're optional
2021-03-21 23:36:10 <ski> @type elemIndex :: ((Eq a)) => a -> [a] -> Maybe Int -- you can add multiple pairs, if you really like to, although it'd look strange and ugly
2021-03-21 23:36:12 <lambdabot> Eq a => a -> [a] -> Maybe Int
2021-03-21 23:36:14 <hololeap> it means that it takes any type (represented by the type variable 'a'), but the "Eq a" constraint means that the type has to have an instance of the Eq typeclass
2021-03-21 23:36:16 <ski> > ((42))
2021-03-21 23:36:19 <lambdabot> 42
2021-03-21 23:36:54 <hololeap> :i Eq
2021-03-21 23:37:00 <hololeap> % :i Eq
2021-03-21 23:37:00 <yahb> hololeap: type Eq :: * -> Constraint; class Eq a where; (==) :: a -> a -> Bool; (/=) :: a -> a -> Bool; {-# MINIMAL (==) | (/=) #-}; -- Defined in `GHC.Classes'; instance [safe] Eq MonoN -- Defined at <interactive>:42:43; instance [safe] forall w (m :: * -> *) a. (Eq w, Data.Functor.Classes.Eq1 m, Eq a) => Eq (WriterT w m a) -- Defined in `Control.Monad.Trans.Writer.Lazy'; instance [safe] forall (f :: * ->
2021-03-21 23:37:05 <hololeap> oof
2021-03-21 23:37:10 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
2021-03-21 23:37:30 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-03-21 23:37:33 × DavidEichmann quits (~david@47.27.93.209.dyn.plus.net) (Remote host closed the connection)
2021-03-21 23:37:34 <hololeap> lechner, does that make sense to you?
2021-03-21 23:38:31 molehillish joins (~molehilli@2600:8800:8d06:1800:c1f2:e355:53f0:4ab8)
2021-03-21 23:39:01 <hololeap> in simple terms, it means that the type has to have (==) defined
2021-03-21 23:39:02 <lechner> so (Eq a, Ord a) would mean ordered with an identity (although Ord prabably implies Eq)?
2021-03-21 23:39:21 <monochrom> Ord implies Eq.
2021-03-21 23:41:00 <hololeap> lechner: right, "Eq a" means the type has to have some notion of equal values, and "Ord a" means it has to have some notion of one value being less than or greater than another value
2021-03-21 23:41:22 × santiweight quits (622165e4@c-98-33-101-228.hsd1.ca.comcast.net) (Ping timeout: 240 seconds)
2021-03-21 23:41:28 <hololeap> and, yes, you can't make something an instance of Ord without it first being an instance of Eq
2021-03-21 23:42:14 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 256 seconds)
2021-03-21 23:42:18 <ski> (because with an ordering, you get equality anyway, so there's no point with not having it an instance of `Eq' as well, in that case)
2021-03-21 23:42:21 <hololeap> so, you could just write it "Ord a" in that particular case

All times are in UTC.