Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→
Page 1 .. 924 925 926 927 928 929 930 931 932 933 934 .. 5022
502,152 events total
2020-10-28 23:37:50 <monsterchrom> Yeah Halloween theme
2020-10-28 23:38:01 crestfallen is now known as wretchswollen
2020-10-28 23:38:31 <wretchswollen> I need to find the source monsterchrom . I probably doctored the paragraph to the best of my understanding
2020-10-28 23:39:24 <monsterchrom> There is totally no point in bringing up objects and morphism in Haskell. Not even in the context of the Functor type class.
2020-10-28 23:39:38 thir joins (~thir@p200300f27f0b7e004c18ab60065ea01b.dip0.t-ipconnect.de)
2020-10-28 23:40:03 <lyxia> ^
2020-10-28 23:40:09 <monsterchrom> Alternatively if the purpose is learning category theory, then learn from a proper category theory book independent of Haskell.
2020-10-28 23:40:10 <wretchswollen> ok I read bartosz a bit and it often goes there..
2020-10-28 23:40:24 <wretchswollen> I think it might be from that quarter
2020-10-28 23:40:42 <monsterchrom> I actually looked in Bartosz's and can't find it.
2020-10-28 23:40:54 <wretchswollen> not sure, I certainly didn't write it
2020-10-28 23:41:15 × nbloomf quits (~nbloomf@2600:1700:ad14:3020:1c75:523e:ddcb:cd98) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-28 23:41:38 <wretchswollen> I'll delete it. I like the exercise of getting to fmap = (.)
2020-10-28 23:41:39 jamm_ joins (~jamm@unaffiliated/jamm)
2020-10-28 23:41:45 <monsterchrom> Bartosz's is a case of "category theory for programmers" so first of all if you are not already a good programmer, one that has written 1000 lines of correct code, you can't use it.
2020-10-28 23:42:26 <monsterchrom> I don't understand how one looks at "category theory for programmers" and infers "so this is good for learning both at the same time".
2020-10-28 23:42:45 <wretchswollen> yeah it's tough. sometimes things do stick. I got a lot from a lesson on the kleisli operator
2020-10-28 23:43:13 × avoandmayo quits (~textual@122-58-158-238-adsl.sparkbb.co.nz) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-28 23:43:16 <wretchswollen> it helped me understand bind better
2020-10-28 23:43:43 <monsterchrom> Then again I also don't understand how there can be undergrad students who look at "prerequisite of this course" and can mentally edit it to "co-requsite of this course" and then email me "can I take your course and the prereq course at the same time? like it makes perfect sense?"
2020-10-28 23:43:44 × thir quits (~thir@p200300f27f0b7e004c18ab60065ea01b.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
2020-10-28 23:44:30 <wretchswollen> I had it easy: I studied Literature and my mom taught me to read well.
2020-10-28 23:44:40 ensyde joins (~ensyde@99-185-235-117.lightspeed.chrlnc.sbcglobal.net)
2020-10-28 23:45:57 <wretchswollen> thanks monsterchrom that takes the load off. but to be honest I'm still thinking about Axman6 's " ((->) r) is all functions which can accept an r "
2020-10-28 23:46:14 × jamm_ quits (~jamm@unaffiliated/jamm) (Ping timeout: 264 seconds)
2020-10-28 23:46:45 <koz_> monsterchrom: I would make a funny joke here, but I don't think I can think of two things where 'pre-X' and 'co-X' both exist
2020-10-28 23:46:46 whaletechno joins (~whaletech@unaffiliated/whaletechno)
2020-10-28 23:46:50 <koz_> Like, are cosheaves a thing?
2020-10-28 23:47:43 × jespada quits (~jespada@90.254.243.98) (Ping timeout: 256 seconds)
2020-10-28 23:47:47 <wretchswollen> yeah like I tried to sit in on abstract algebra, when pre algebra and calculus was 30 years old
2020-10-28 23:47:58 <wretchswollen> were*
2020-10-28 23:48:13 <wretchswollen> I meant preCalculus
2020-10-28 23:49:05 × ensyde quits (~ensyde@99-185-235-117.lightspeed.chrlnc.sbcglobal.net) (Ping timeout: 240 seconds)
2020-10-28 23:49:26 <wretchswollen> but hey, I'm beginning to understand bind, and yesterday made a huge headway with traversable
2020-10-28 23:50:37 tim joins (~user@S0106a84e3fe54613.ed.shawcable.net)
2020-10-28 23:50:48 Unhammer joins (~Unhammer@gateway/tor-sasl/unhammer)
2020-10-28 23:50:48 jespada joins (~jespada@90.254.243.98)
2020-10-28 23:50:53 × tim quits (~user@S0106a84e3fe54613.ed.shawcable.net) (Remote host closed the connection)
2020-10-28 23:51:38 natechan joins (~natechan@108-233-125-227.lightspeed.sntcca.sbcglobal.net)
2020-10-28 23:51:40 tput joins (~user@S0106a84e3fe54613.ed.shawcable.net)
2020-10-28 23:51:42 <Axman6> data Foo f = Foo { bar :: f Int,baz :: f Bool }; type ReadFoo = Foo ((->) String) -- ReadFoo ~= Foo {bar :: r -> Int, baz :: r -> Bool}. ((->) String) is the functor for functors which can accept Strings
2020-10-28 23:51:52 jcowan joins (sid325434@gateway/web/irccloud.com/x-evadozowlzlhtjmy)
2020-10-28 23:52:09 xocolatl joins (xocolatl@gateway/vpn/protonvpn/xocolatl)
2020-10-28 23:52:26 xocolatl parts (xocolatl@gateway/vpn/protonvpn/xocolatl) ("Leaving")
2020-10-28 23:52:57 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2020-10-28 23:53:38 ensyde joins (~ensyde@99-185-235-117.lightspeed.chrlnc.sbcglobal.net)
2020-10-28 23:53:38 × chkno quits (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net) (Read error: Connection reset by peer)
2020-10-28 23:53:39 <jcowan> A speculative question: I realize that Haskell patterns are fixed. But suppose they were extensible. What would matching against a procedure plausibly mean?
2020-10-28 23:53:39 <Axman6> for functions*
2020-10-28 23:54:02 chkno joins (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net)
2020-10-28 23:54:07 <Axman6> jcowan: like view patterns?
2020-10-28 23:54:24 <Axman6> or something else
2020-10-28 23:55:49 <wretchswollen> working...
2020-10-28 23:56:08 <tput> I'm writing an fft as an exercise. I have a vector of values which I need to divide into two sub vectors, composed of every other element. How can I do this *quickly*? Basically I'm looking for a performant stride or slice. I'm happy to change from vector to array or any other similar datatype.
2020-10-28 23:56:55 <wretchswollen> thanks Axman6
2020-10-28 23:56:59 <Axman6> tput: one way I've seen this done is how Repa would do it, where you just use functions to reindex into the original array
2020-10-28 23:57:03 <koz_> tput: By 'quickly' I assume you mean O(1)?
2020-10-28 23:57:29 <jcowan> Are view patterns implemented now?
2020-10-28 23:57:30 <koz_> If so, delayed arrays are indeed what you want - you'll be well-served by massiv, I think.
2020-10-28 23:57:43 <Axman6> they have been implemented for years jcowan
2020-10-28 23:57:44 <tput> yeah, I'd ideally like a reindexed view into the original data structure without copying
2020-10-28 23:58:00 <koz_> tput: Ah, then you can use generate from vector.
2020-10-28 23:58:15 <koz_> If you wanna be _sure_, then massiv's delayed arrays are what you're after.
2020-10-28 23:58:18 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds)
2020-10-28 23:58:23 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection)
2020-10-28 23:58:32 justanotheruser joins (~justanoth@unaffiliated/justanotheruser)
2020-10-28 23:58:34 <koz_> generate will _likely_ fuse, but I can't promise much.
2020-10-28 23:58:44 <Axman6> > let f ((\x -> x `mod` 3 == 0 && x `mod` 5 == 0) -> True) = "FizzBuzz"; f x = show x in map f [1..20]
2020-10-28 23:58:46 <lambdabot> ["1","2","3","4","5","6","7","8","9","10","11","12","13","14","FizzBuzz","16...
2020-10-28 23:59:03 <jcowan> Okay, thanks. I was under the impression they were part of Haskell at one time and then withdrawn.
2020-10-28 23:59:26 × falafel quits (~falafel@71-34-132-121.clsp.qwest.net) (Ping timeout: 264 seconds)
2020-10-29 00:00:01 × mdrjr1 quits (~mdrjr@217.146.82.202) ()
2020-10-29 00:01:13 <tput> at a glance it looks like generate will copy data to a new vector, which isn't ideal. but it might be good enough. I'll give it a try, thank you koz_
2020-10-29 00:01:21 <koz_> tput: It might fuse.
2020-10-29 00:01:22 polyrain joins (~polyrain@2001:8003:e501:6901:e039:127e:3f21:3e4c)
2020-10-29 00:01:31 <koz_> No way to know without looking at what gets emitted.
2020-10-29 00:01:46 <koz_> Again, if you want _certainty_, delayed arrays from massiv.
2020-10-29 00:02:25 × ransom quits (~c4264035@c-73-243-2-10.hsd1.co.comcast.net) (Ping timeout: 240 seconds)
2020-10-29 00:02:25 <tput> lol, indeed. rewrite rules are a blessing and a curse. I have used massiv before, but was hoping to avoid the dependency at the moment. Thanks again!
2020-10-29 00:02:43 <koz_> No worries. I think your use case is _exactly_ where delayed arrays shine.
2020-10-29 00:02:59 <koz_> Massiv also has a bunch of cool things that might be useful for FFTs (stencilling, for example).
2020-10-29 00:03:24 <Axman6> is massiv basically Repa 2.0?
2020-10-29 00:03:37 <koz_> Axman6: I guess?
2020-10-29 00:03:39 <tput> p.s. am I speaking to Domen? I'm definitly on the sidelines of the haskell community, but I'm trying to be a little more involved.
2020-10-29 00:03:43 <MarcelineVQ> it's like repa but bigger
2020-10-29 00:03:49 <koz_> tput: I am not Domen Kozar.
2020-10-29 00:03:57 <koz_> (much as I sometimes wish I was)
2020-10-29 00:04:01 <tput> ah, took a guess on the user name, sorry.
2020-10-29 00:04:14 <Axman6> koz_: don't let your dreams by dreams
2020-10-29 00:04:15 <koz_> Not a bad guess. I'm some variant of 'Koz' everywhere.
2020-10-29 00:04:27 <Axman6> be*
2020-10-29 00:04:29 <koz_> Axman6: Don't let your grammar by grammar either.
2020-10-29 00:04:31 <MarcelineVQ> don't let your memes be beans
2020-10-29 00:05:17 <tput> well now it feels like a small puzzle
2020-10-29 00:05:37 Axman6 insists on pronouncing koz_ "cuz" in his mind
2020-10-29 00:05:41 <koz_> Basically massiv takes some adjusting to, but it's _really_ good if you genuinely care about speedy arrays.
2020-10-29 00:05:45 <koz_> Axman6: LOL
2020-10-29 00:05:53 <koz_> I have a cousin with axes for hands.
2020-10-29 00:06:01 <koz_> Apparently.
2020-10-29 00:06:06 <Axman6> I guess that makes us family

All times are in UTC.