Home liberachat/#haskell: Logs Calendar

Logs: liberachat/#haskell

←Prev  Next→
Page 1 .. 831 832 833 834 835 836 837 838 839 840 841 .. 18025
1,802,415 events total
2021-07-07 04:16:56 hewxle joins (~hewxle@S010600fc8d321b13.vn.shawcable.net)
2021-07-07 04:24:20 × hewxle quits (~hewxle@S010600fc8d321b13.vn.shawcable.net) (Ping timeout: 252 seconds)
2021-07-07 04:25:41 jakalx parts (~jakalx@base.jakalx.net) ()
2021-07-07 04:26:20 gambpang joins (~ian@207.181.230.156)
2021-07-07 04:34:04 × Mathnerd314 quits (~Mathnerd3@2601:281:d080:4533::1000) (Quit: Client closed)
2021-07-07 04:36:41 hewxle joins (~hewxle@S010600fc8d321b13.vn.shawcable.net)
2021-07-07 04:39:01 × AgentM quits (~agentm@pool-162-83-130-212.nycmny.fios.verizon.net) (Quit: Leaving.)
2021-07-07 04:39:53 m7zs3gzw joins (~m7zs3gzw@188.170.172.108)
2021-07-07 04:41:37 × m7zs3gzw quits (~m7zs3gzw@188.170.172.108) (Remote host closed the connection)
2021-07-07 04:43:24 yauhsien joins (~yauhsien@61-231-39-135.dynamic-ip.hinet.net)
2021-07-07 04:47:46 × yauhsien quits (~yauhsien@61-231-39-135.dynamic-ip.hinet.net) (Ping timeout: 240 seconds)
2021-07-07 04:52:10 × dunkeln quits (~dunkeln@188.70.10.207) (Ping timeout: 240 seconds)
2021-07-07 04:55:47 jakalx joins (~jakalx@base.jakalx.net)
2021-07-07 04:57:16 fengctor joins (~fengctor@bras-base-ngflon0508w-grc-11-76-68-2-143.dsl.bell.ca)
2021-07-07 04:59:58 hewxle parts (~hewxle@S010600fc8d321b13.vn.shawcable.net) ()
2021-07-07 05:01:00 × gambpang quits (~ian@207.181.230.156) (Remote host closed the connection)
2021-07-07 05:05:11 × spatchkaa quits (~spatchkaa@S010600fc8da47b63.gv.shawcable.net) (Quit: Leaving)
2021-07-07 05:06:14 ptr_frac7al joins (~longlong@user/ptr-frac7al/x-0038398)
2021-07-07 05:11:22 hewxle joins (~hewxle@user/hewxle)
2021-07-07 05:13:05 × anandprabhu quits (~anandprab@94.202.243.198) (Quit: Leaving)
2021-07-07 05:13:05 dunkeln_ joins (~dunkeln@188.70.10.207)
2021-07-07 05:14:14 <Axman6> qrpnxz: which page?
2021-07-07 05:14:33 <qrpnxz> this https://wiki.haskell.org/Prime_numbers
2021-07-07 05:14:56 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 252 seconds)
2021-07-07 05:15:23 <Axman6> there was a talk on this recently actually, I'll see if I can find it
2021-07-07 05:16:55 mei joins (~mei@user/mei)
2021-07-07 05:18:13 <Axman6> I don't think this is the one I was after but it looks like you might enjoy it: https://www.youtube.com/watch?v=UPy7TXgrK1A
2021-07-07 05:19:36 <qrpnxz> :o thanks
2021-07-07 05:20:33 × dunkeln_ quits (~dunkeln@188.70.10.207) (Ping timeout: 252 seconds)
2021-07-07 05:21:18 dunkeln joins (~dunkeln@188.70.10.207)
2021-07-07 05:24:24 jneira joins (~jneira@212.8.115.226)
2021-07-07 05:29:43 × xff0x quits (~xff0x@2001:1a81:539d:3600:fb37:d824:cc4b:5c87) (Ping timeout: 246 seconds)
2021-07-07 05:29:51 <Axman6> I think this is the thing I was looking for: https://patternsinfp.wordpress.com/2021/05/10/the-genuine-sieve-of-eratosthenes/
2021-07-07 05:30:52 xff0x joins (~xff0x@2001:1a81:539d:3600:7f6d:8918:f53:97d7)
2021-07-07 05:31:35 <qrpnxz> huh, will look at that
2021-07-07 05:31:37 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-07-07 05:35:40 × canta quits (~canta@cvm0.d5k.one) (Quit: WeeChat 2.8)
2021-07-07 05:35:46 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds)
2021-07-07 05:35:50 × peterhil quits (~peterhil@dsl-hkibng32-54f849-252.dhcp.inet.fi) (Ping timeout: 265 seconds)
2021-07-07 05:44:43 yauhsien joins (~yauhsien@61-231-39-135.dynamic-ip.hinet.net)
2021-07-07 05:45:30 × hewxle quits (~hewxle@user/hewxle) (Ping timeout: 272 seconds)
2021-07-07 05:47:59 canta joins (~canta@user/canta)
2021-07-07 05:49:09 × yauhsien quits (~yauhsien@61-231-39-135.dynamic-ip.hinet.net) (Ping timeout: 252 seconds)
2021-07-07 05:49:38 × jonatan quits (~nate@h77-53-70-163.cust.a3fiber.se) (Remote host closed the connection)
2021-07-07 05:52:49 × hiruji quits (~hiruji@user/hiruji) (Read error: Connection reset by peer)
2021-07-07 05:53:29 hiruji joins (~hiruji@user/hiruji)
2021-07-07 05:58:44 × fengctor quits (~fengctor@bras-base-ngflon0508w-grc-11-76-68-2-143.dsl.bell.ca) (Read error: Connection reset by peer)
2021-07-07 06:05:20 × haskl[error] quits (~haskl@98.37.78.63) (Changing host)
2021-07-07 06:05:20 haskl[error] joins (~haskl@user/haskl)
2021-07-07 06:06:21 peterhil joins (~peterhil@dsl-hkibng32-54f849-252.dhcp.inet.fi)
2021-07-07 06:08:00 × slowButPresent quits (~slowButPr@user/slowbutpresent) (Quit: leaving)
2021-07-07 06:08:27 <haskl[error]> I'm going to make a website that has a graphical representation of chat rooms. Which libraries should I look at? Miso? `websockets`? Any suggestions?
2021-07-07 06:09:23 haskl[error] is now known as haskl
2021-07-07 06:12:46 × khumba quits (~khumba@user/khumba) ()
2021-07-07 06:14:04 <dminuoso> qrpnxz: Re aggressive optimizations in GCC/clang. All of these optimizations are either in accordance with the semantic model of the underlying language, or they are not observable.
2021-07-07 06:14:10 × beka quits (~beka@104-244-27-23.static.monkeybrains.net) (Ping timeout: 240 seconds)
2021-07-07 06:14:58 × dunkeln quits (~dunkeln@188.70.10.207) (Ping timeout: 240 seconds)
2021-07-07 06:16:39 × cheater quits (~Username@user/cheater) (Ping timeout: 252 seconds)
2021-07-07 06:16:43 Kirat joins (~Gill@103.217.122.15)
2021-07-07 06:16:50 cheater joins (~Username@user/cheater)
2021-07-07 06:17:16 kammka joins (~kammka@188.27.129.10)
2021-07-07 06:18:11 × Kirat quits (~Gill@103.217.122.15) (Client Quit)
2021-07-07 06:19:13 × jespada quits (~jespada@90.254.247.46) (Ping timeout: 258 seconds)
2021-07-07 06:20:33 <kammka> Hello! Could you guys point out why is my intuition wrong on this? According to this : -- foldl :: (b -> a -> b) -> b -> [a] -> b
2021-07-07 06:20:33 <kammka> -- foldl f b [] = b
2021-07-07 06:20:34 <kammka> -- foldl f b (x:xs) = foldl f (f b x) xs
2021-07-07 06:21:06 jespada joins (~jespada@90.254.247.46)
2021-07-07 06:22:10 × kammka quits (~kammka@188.27.129.10) (Quit: Client closed)
2021-07-07 06:22:21 kammka joins (~kammka@188.27.129.10)
2021-07-07 06:23:13 <dminuoso> kammka: Your client was closed. The last line we received was: 08:20:34 kammka | -- foldl f b (x:xs) = foldl f (f b x) xs
2021-07-07 06:24:14 <dminuoso> qrpnxz: In part the reason why Haskell gets away with pretty good performance, is because our evaluation model makes larger scale transformations easy. We have relatively little rules with regards to evaluation.
2021-07-07 06:24:14 <kammka> dminuoso : Oh, dang. I pasted the code here : https://paste.tomsmeding.com/AT3fU529
2021-07-07 06:24:27 <dminuoso> kammka: Alright! What does your intuition tell you?
2021-07-07 06:25:22 <kammka> That foldl (+) ((+) ((+) 0 2) 3) []
2021-07-07 06:25:23 <kammka> should pattern match to foldl f b [] and return that 0 that I put at the end
2021-07-07 06:25:26 <kammka> But surely that is wrong
2021-07-07 06:25:55 <dminuoso> kammka: Do you know how lists in Haskell are constructed with (:) and []?
2021-07-07 06:26:31 <kammka> Yes? I thought [3] is 3 : []
2021-07-07 06:27:19 <dminuoso> Yes, good. Just making sure that your basis is covered
2021-07-07 06:27:50 <shachaf> kammka: I think the question here is where the second 0 comes from on the last line.
2021-07-07 06:29:37 <kammka> I suppose I was thinking that the 0 comes from f b [] = b. Maybe I shouldnt have put it there..
2021-07-07 06:30:07 <kammka> I did this for foldr : https://paste.tomsmeding.com/TUcmHsST
2021-07-07 06:30:17 <kammka> And that seems ok, right?
2021-07-07 06:30:42 <dminuoso> Looks good
2021-07-07 06:31:59 <dminuoso> Well, you did expansoin both times right. So the way I think of foldr/foldl on lists, is that it replaces (:) with a function.
2021-07-07 06:32:01 <kammka> so I thought this : foldl (+) ((+) ((+) 0 2) 3) [] is equivalent to this: f b [] = b. Therefore I put that second 0 in the last line that probably should not be there
2021-07-07 06:32:16 takuan joins (~takuan@178-116-218-225.access.telenet.be)
2021-07-07 06:32:22 Gurkenglas joins (~Gurkengla@dslb-002-203-144-156.002.203.pools.vodafone-ip.de)
2021-07-07 06:32:40 <dminuoso> So for instance: foldr f z (1:2:3:[]) gives me: 1 `f` (2 `f` (3 `f` z))
2021-07-07 06:32:49 <dminuoso> Note how foldr replaces the (:) with f, and the final last element with z.
2021-07-07 06:33:09 <kammka> That is really helpful actually
2021-07-07 06:33:11 <dminuoso> The key difference between foldr and foldl is just how the `f` is associated here:
2021-07-07 06:33:40 <dminuoso> If we assumed foldl behaved like you assumed, foldl would give you:
2021-07-07 06:34:40 <dminuoso> ((1 `f` 2) `f` 3) `f` z -- but what happens instead, is that the `z` wanders to the left side
2021-07-07 06:34:41 <dminuoso> so you get:
2021-07-07 06:35:13 <dminuoso> foldl f z (1:2:3:[]) = (((z `f` 1) `f` 2) `f` 3)
2021-07-07 06:35:38 dhouthoo joins (~dhouthoo@178-117-36-167.access.telenet.be)
2021-07-07 06:35:53 <dminuoso> But also see how, conceptually we can think of foldl replacing (:) with f. And this might also give you a hint how both foldr and foldl go from left-to-right. It's just that what (:) is replaced with associates differently
2021-07-07 06:37:07 <kammka> It makes sense now. Mainly because of ' replace the (:) with f' ; And it just becomes a matter of association regarding the difference between foldl and foldr
2021-07-07 06:37:11 <kammka> Thanks a lot!!

All times are in UTC.