Logs: freenode/#haskell
| 2020-10-30 03:24:55 | → | Stanley00 joins (~stanley00@unaffiliated/stanley00) |
| 2020-10-30 03:25:12 | <hyiltiz-M> | Do people not using Matrix see this Avatar icon? |
| 2020-10-30 03:25:21 | <unihernandez22> | https://pastebin.com/JttfKa2t |
| 2020-10-30 03:25:32 | <unihernandez22> | Is there another way to do that? |
| 2020-10-30 03:25:41 | <unihernandez22> | Because it is too slow |
| 2020-10-30 03:25:46 | <jamestmartin> | hyiltiz-M: I don't know what you're talking about, so I'd say probably not |
| 2020-10-30 03:26:19 | <unihernandez22> | It is for these benchmarks https://github.com/jabbalaci/SpeedTests |
| 2020-10-30 03:26:22 | <sm[m]> | hyiltiz-M: not even matrix users see it :) just a place holder H avatar here |
| 2020-10-30 03:31:05 | × | theDon quits (~td@muedsl-82-207-238-079.citykom.de) (Ping timeout: 240 seconds) |
| 2020-10-30 03:31:10 | <hyiltiz-M> | Awesome! I'd hate to clutter everyone's IRC cache with a stupic avatar |
| 2020-10-30 03:31:26 | × | conal_ quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 2020-10-30 03:31:39 | → | vicfred joins (~vicfred@unaffiliated/vicfred) |
| 2020-10-30 03:32:05 | → | jedws joins (~jedws@101.184.150.81) |
| 2020-10-30 03:33:17 | → | theDon joins (~td@94.134.91.17) |
| 2020-10-30 03:33:27 | × | jedws quits (~jedws@101.184.150.81) (Client Quit) |
| 2020-10-30 03:33:27 | × | Aquazi quits (uid312403@gateway/web/irccloud.com/x-hdjxwzczxilznuyg) (Quit: Connection closed for inactivity) |
| 2020-10-30 03:34:01 | × | christo quits (~chris@81.96.113.213) (Remote host closed the connection) |
| 2020-10-30 03:34:59 | <unihernandez22> | Can anyone help me? :) |
| 2020-10-30 03:35:31 | × | polyrain quits (~polyrain@130.102.13.189) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 2020-10-30 03:35:41 | × | falafel_ quits (~falafel@71-34-132-121.clsp.qwest.net) (Ping timeout: 268 seconds) |
| 2020-10-30 03:35:45 | × | ddellacosta quits (~dd@86.106.121.168) (Ping timeout: 240 seconds) |
| 2020-10-30 03:36:45 | <koz_> | unihernandez22: Make your cache a Vector. |
| 2020-10-30 03:36:50 | <koz_> | !! on lists is not very good. |
| 2020-10-30 03:37:30 | <hyiltiz> | unihernandez22: u don't seem to be using memoisation either (tho the cache variable seems to be trying to do so?) |
| 2020-10-30 03:39:26 | × | Stanley00 quits (~stanley00@unaffiliated/stanley00) (Read error: Connection reset by peer) |
| 2020-10-30 03:39:56 | → | Stanley00 joins (~stanley00@unaffiliated/stanley00) |
| 2020-10-30 03:40:05 | × | Gurkenglas quits (~Gurkengla@unaffiliated/gurkenglas) (Ping timeout: 240 seconds) |
| 2020-10-30 03:40:50 | <dibblego> | > :t (!!) -- ftw |
| 2020-10-30 03:40:50 | <dibblego> | (!!) -- ftw :: Ixed s => s -> Index s -> Maybe (IxValue s) |
| 2020-10-30 03:40:52 | <lambdabot> | <hint>:1:1: error: <hint>:1:1: error: parse error on input ‘:’ |
| 2020-10-30 03:41:39 | <unihernandez22> | hyiltiz: The cache are the squares of the digits |
| 2020-10-30 03:42:40 | <hyiltiz> | yeah i see that; but the rec. func. isM isn't re-uisng any of its computations, no? |
| 2020-10-30 03:42:59 | <unihernandez22> | No |
| 2020-10-30 03:43:24 | <unihernandez22> | Because the algorithm must be the same as the other languages, for the benchmark |
| 2020-10-30 03:44:40 | → | christo joins (~chris@81.96.113.213) |
| 2020-10-30 03:45:09 | × | andi- quits (~andi-@NixOS/user/andi-) (Remote host closed the connection) |
| 2020-10-30 03:45:18 | → | slack1256 joins (~slack1256@191.126.7.140) |
| 2020-10-30 03:46:41 | → | codygman joins (codygman@gateway/vpn/privateinternetaccess/codygman) |
| 2020-10-30 03:46:56 | × | fandi__ quits (~fandi@118.97.77.114) (Read error: Connection reset by peer) |
| 2020-10-30 03:47:13 | → | motherfsck joins (~motherfsc@unaffiliated/motherfsck) |
| 2020-10-30 03:47:17 | × | motherfsck quits (~motherfsc@unaffiliated/motherfsck) (Client Quit) |
| 2020-10-30 03:48:04 | × | Tario quits (~Tario@201.192.165.173) (Ping timeout: 240 seconds) |
| 2020-10-30 03:49:24 | × | slack1256 quits (~slack1256@191.126.7.140) (Remote host closed the connection) |
| 2020-10-30 03:50:08 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds) |
| 2020-10-30 03:50:17 | → | andi- joins (~andi-@NixOS/user/andi-) |
| 2020-10-30 03:52:41 | → | polyrain joins (~polyrain@130.102.13.189) |
| 2020-10-30 03:53:38 | → | Stanley|00 joins (~stanley00@unaffiliated/stanley00) |
| 2020-10-30 03:54:09 | arahaelHour | is now known as arahael |
| 2020-10-30 03:54:14 | <dolio> | It's not a cache of the squares of digits, though. |
| 2020-10-30 03:54:26 | <unihernandez22> | dolio ?? |
| 2020-10-30 03:54:42 | <dolio> | It's a cache of digits raised to themselves as a power. |
| 2020-10-30 03:54:53 | <unihernandez22> | Oh, yes |
| 2020-10-30 03:55:09 | → | Stanley00_ joins (~stanley00@unaffiliated/stanley00) |
| 2020-10-30 03:55:56 | → | thir joins (~thir@p200300f27f0b7e004c18ab60065ea01b.dip0.t-ipconnect.de) |
| 2020-10-30 03:56:10 | → | Tario joins (~Tario@201.192.165.173) |
| 2020-10-30 03:56:33 | <dolio> | If it is supposed to be squares, using a list is almost certain to be slower. |
| 2020-10-30 03:57:11 | → | nineonine joins (~textual@216-19-190-182.dyn.novuscom.net) |
| 2020-10-30 03:57:16 | × | Stanley00 quits (~stanley00@unaffiliated/stanley00) (Ping timeout: 268 seconds) |
| 2020-10-30 03:57:28 | <unihernandez22> | No, I got confused |
| 2020-10-30 03:57:46 | <unihernandez22> | It's suposed to be the digits raised to themselves |
| 2020-10-30 03:58:24 | × | Stanley|00 quits (~stanley00@unaffiliated/stanley00) (Ping timeout: 240 seconds) |
| 2020-10-30 03:58:25 | × | ensyde quits (~ensyde@99-185-235-117.lightspeed.chrlnc.sbcglobal.net) (Ping timeout: 240 seconds) |
| 2020-10-30 03:58:45 | <dolio> | Well, I'm unsure what would be faster in some of those scenarios. I'd probably bet on the list still being slower, I guess. |
| 2020-10-30 03:58:58 | × | nineonine quits (~textual@216-19-190-182.dyn.novuscom.net) (Client Quit) |
| 2020-10-30 03:59:22 | <unihernandez22> | https://pastebin.com/si3PT0Wr |
| 2020-10-30 03:59:27 | <unihernandez22> | That's a bit faster |
| 2020-10-30 04:00:58 | × | thir quits (~thir@p200300f27f0b7e004c18ab60065ea01b.dip0.t-ipconnect.de) (Ping timeout: 268 seconds) |
| 2020-10-30 04:01:51 | → | falafel_ joins (~falafel@71-34-132-121.clsp.qwest.net) |
| 2020-10-30 04:02:40 | → | ensyde joins (~ensyde@99-185-235-117.lightspeed.chrlnc.sbcglobal.net) |
| 2020-10-30 04:03:26 | × | codygman quits (codygman@gateway/vpn/privateinternetaccess/codygman) (Ping timeout: 268 seconds) |
| 2020-10-30 04:03:36 | → | codygman joins (codygman@gateway/vpn/privateinternetaccess/codygman) |
| 2020-10-30 04:03:49 | × | howdoi quits (uid224@gateway/web/irccloud.com/x-vtjahgetnoyujbco) (Quit: Connection closed for inactivity) |
| 2020-10-30 04:05:07 | <Axman6> | unihernandez22: btw, filter (\i -> isMunchausen i) [0 .. 440_000_000] is the same as filter isMunchausen [0 .. 440_000_000] |
| 2020-10-30 04:06:12 | <unihernandez22> | Oh yes, that's because the function was different before |
| 2020-10-30 04:07:38 | → | dbmikus joins (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) |
| 2020-10-30 04:07:45 | × | codygman quits (codygman@gateway/vpn/privateinternetaccess/codygman) (Ping timeout: 240 seconds) |
| 2020-10-30 04:07:57 | <Axman6> | this feels like one of those problems that spending sometime thinking about it would let you drasticly reduce the number of numbers you needed to check |
| 2020-10-30 04:07:58 | → | codygman joins (~codygman@47-184-107-46.dlls.tx.frontiernet.net) |
| 2020-10-30 04:08:37 | <Axman6> | I assume there's some relatively simple relationship between calc n and calc (n+1) |
| 2020-10-30 04:09:03 | <Axman6> | I find this code quite hard to follow though |
| 2020-10-30 04:09:23 | <Axman6> | it feels like it's just a fold over the digits |
| 2020-10-30 04:10:21 | <unihernandez22> | calc is the sum of digits raised to themselves |
| 2020-10-30 04:10:28 | <unihernandez22> | as a power |
| 2020-10-30 04:11:12 | <Axman6> | I would try and make things a little simpler to follow by doing something like calc = sum . map recourse . digits or something |
| 2020-10-30 04:11:24 | <Axman6> | rather than passing in f to recourse |
| 2020-10-30 04:12:21 | × | dbmikus quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 258 seconds) |
| 2020-10-30 04:12:45 | <Axman6> | breaking the problem down into smaller, composible parts will make it clearer what the relationship between n and n+1 is, at least |
| 2020-10-30 04:12:53 | <dsal> | That `return 0` is super weird. If you got rid of that, you could also get rid of the do. And you could get rid of the lambda in the filter. |
| 2020-10-30 04:13:12 | <dsal> | `main = mapM_ print $ filter isMunchausen [0 .. 440_000_000]` |
| 2020-10-30 04:13:33 | <Axman6> | surprised that return 0 even type checks, but then remembered that main can have type IO a |
| 2020-10-30 04:13:45 | <Axman6> | even though we always use main :: IO () |
| 2020-10-30 04:13:54 | <dsal> | Ah. I didn't realize that. I've never seen that. Yeah, I always () |
| 2020-10-30 04:14:44 | <dolio> | I don't think it actually does what is expected, though. |
| 2020-10-30 04:15:18 | <dolio> | It should be `exitSuccess` if you want to do that explicitly. |
| 2020-10-30 04:15:28 | <Axman6> | yeah I'm not convinced it does either... thouggh IU just realised I was parsing cache ! r + f q ad cache ! (r + f q) and not (cache ! r) + (f q) |
| 2020-10-30 04:16:05 | Axman6 | has had about three hours sleep and struggles to type at the best of times. Good luck everybody |
| 2020-10-30 04:16:23 | × | justsomeguy quits (~justsomeg@unaffiliated/--/x-3805311) (Ping timeout: 268 seconds) |
| 2020-10-30 04:18:26 | <unihernandez22> | dsal, I changed that, but the problem here is the speed |
| 2020-10-30 04:19:10 | <dsal> | Sure, understood. I'm just looking at all the things. My brain can translate code without understanding it. I'm on that level right now. |
| 2020-10-30 04:20:04 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
All times are in UTC.