2024/11/11

Newest at the top

2024-11-11 12:44:58 +0100 <mauke> Leonard76: https://play-haskell.tomsmeding.com/saved/Kmp64Ubg
2024-11-11 12:44:46 +0100 <Leonard76> This is what it says when I try to give it a MyMap https://paste.tomsmeding.com/KxW8xotW
2024-11-11 12:44:14 +0100youthlic(~Thunderbi@user/youthlic) (Remote host closed the connection)
2024-11-11 12:43:36 +0100 <Leonard76> Yes I've also noticed that error
2024-11-11 12:43:18 +0100 <Leonard76> I tried giving it a list of ints but it outputs this error https://paste.tomsmeding.com/VFyOE5Or
2024-11-11 12:42:20 +0100 <mauke> you're passing a Map, but the function expects a MyMap
2024-11-11 12:42:11 +0100 <mauke> actually, there are two errors
2024-11-11 12:40:44 +0100 <mauke> so the input must be a map whose values are lists of ints
2024-11-11 12:40:33 +0100 <mauke> type is reduce :: MyMap String [Int] -> MyMap String Int
2024-11-11 12:38:56 +0100 <Leonard76> sorry, just the functor
2024-11-11 12:38:14 +0100 <mauke> what's a functor monad
2024-11-11 12:37:12 +0100merijn(~merijn@77.242.116.146) (Ping timeout: 276 seconds)
2024-11-11 12:36:35 +0100 <Leonard76> I don't know what the arguments of `reduce` might be, I have tried with `reduce (Map.fromList [(5,"c"), (3,"b")])` but it outputs this error log https://paste.tomsmeding.com/XFaWSEif , I don't know how to move forwards from here =L
2024-11-11 12:35:41 +0100Leonard26(~Leonard26@49.236.10.26) (Ping timeout: 256 seconds)
2024-11-11 12:34:24 +0100 <Leonard76> I am trying to understand the Functor monad a little bit better. I found this stack post https://stackoverflow.com/questions/27197419/haskell-functors?rq=3 and I'm now trying to "take it apart" bit by bit. I am however stuck at the `reduce` function. I am implementing this in ghci like so https://paste.tomsmeding.com/YeMX4fJ6.
2024-11-11 12:34:23 +0100 <Leonard76> Hello! =D How are you?
2024-11-11 12:31:39 +0100Leonard76(~Leonard26@49.236.10.26)
2024-11-11 12:30:23 +0100Leonard26(~Leonard26@49.236.10.26)
2024-11-11 12:29:47 +0100merijn(~merijn@77.242.116.146) merijn
2024-11-11 12:27:46 +0100NN12(~NN12@31.154.179.218)
2024-11-11 12:27:43 +0100 <mauke> that your function was too strict
2024-11-11 12:26:33 +0100 <yin> mauke: what did you think?
2024-11-11 12:26:23 +0100supercode(~supercode@user/supercode) supercode
2024-11-11 12:25:03 +0100 <mauke> that's what I thought
2024-11-11 12:24:57 +0100 <lambdabot> 3
2024-11-11 12:24:55 +0100 <mauke> > let (m,mls) = foldr (\x ~(mx,ls') -> (max x mx,m:ls')) (0,[]) ls; ls = [1 ..] in length (take 3 mls)
2024-11-11 12:24:35 +0100 <lambdabot> mueval-core: Time limit exceeded
2024-11-11 12:24:28 +0100 <mauke> > let (m,mls) = foldr (\x (mx,ls') -> (max x mx,m:ls')) (0,[]) ls; ls = [1 ..] in length (take 3 mls)
2024-11-11 12:24:24 +0100NN12(~NN12@31.154.179.218) (Quit: Client closed)
2024-11-11 12:24:08 +0100 <lambdabot> [3,3,3]
2024-11-11 12:24:07 +0100 <ncf> this one (slide 121) https://www.irif.fr/~mellies/mpri/mpri-m2/mpri-mellies-slides-3.pdf
2024-11-11 12:24:06 +0100 <mauke> > let (m,mls) = foldr (\x (mx,ls') -> (max x mx,m:ls')) (0,[]) ls; ls = [1,2,3] in mls
2024-11-11 12:23:39 +0100mari-estel(~mari-este@user/mari-estel) mari-estel
2024-11-11 12:23:04 +0100mari17644(~mari-este@user/mari-estel) (Ping timeout: 260 seconds)
2024-11-11 12:22:30 +0100 <ncf> in this case the knot would be the usual diagram for the trace operator i guess
2024-11-11 12:22:27 +0100xff0x(~xff0x@2405:6580:b080:900:d852:39eb:7a5e:9b9f)
2024-11-11 12:21:32 +0100 <ncf> e.g. as used here https://doisinkidney.com/posts/2018-12-18-traversing-graphs.html
2024-11-11 12:21:01 +0100 <ncf> yes*
2024-11-11 12:20:57 +0100 <ncf> i guess it could also mean circular programming more generally, in which case yess
2024-11-11 12:18:29 +0100 <ncf> so, no
2024-11-11 12:18:23 +0100 <ncf> i think usually "tying the knot" means building a cyclic data structure?
2024-11-11 12:16:42 +0100merijn(~merijn@77.242.116.146) (Ping timeout: 252 seconds)
2024-11-11 12:16:31 +0100 <yin> -- are we "tying the knot" on m?
2024-11-11 12:15:39 +0100 <yin> (m,mls) = foldr (\x (mx,ls') -> (max x mx,m:ls')) (0,[]) ls
2024-11-11 12:12:56 +0100 <yin> oops i made a typo
2024-11-11 12:11:20 +0100 <yin> is this an instance of "tying the knot"? `(m,mls) = foldr (\x (mx,ls') -> (max x mx,mls:ls')) (0,[]) ls`
2024-11-11 12:09:16 +0100agent314(~quassel@169.150.203.52) agent314
2024-11-11 11:57:47 +0100merijn(~merijn@77.242.116.146) merijn
2024-11-11 11:55:23 +0100hgolden(~hgolden@2603:8000:9d00:3ed1:6c70:1ac0:d127:74dd) (Ping timeout: 245 seconds)
2024-11-11 11:54:42 +0100merijn(~merijn@77.242.116.146) (Ping timeout: 252 seconds)