2025/11/21

Newest at the top

2025-11-21 03:50:02 +0100 <EvanR> strlen in C is also not O(1), which no one is surprised by
2025-11-21 03:48:44 +0100 <jreicher> I think that's more because a list isn't just a list in other languages.
2025-11-21 03:48:34 +0100 <monochrom> And some other times, "a student coded up `isEmpty xs = length xs == 0`, why is it stupid?"
2025-11-21 03:47:53 +0100 <monochrom> Sometimes I even put that on exams.
2025-11-21 03:47:31 +0100 <monochrom> Probably this: You think "length xs" takes O(1) time, my students do too. No, it takes Ω(length xs) time.
2025-11-21 03:47:26 +0100 <haskellbridge> <sm> aha there it is. Im no expert at this but repeatedly getting the length of lists is wasteful
2025-11-21 03:47:19 +0100 <sam113101> the elixir version: https://paste.centos.org/view/raw/9ea27c56
2025-11-21 03:45:20 +0100 <jreicher> hailstone numbers. :)
2025-11-21 03:45:10 +0100 <haskellbridge> <sm> sam113101: if you post it somewhere, like the discourse, people will show you how to make it fast
2025-11-21 03:45:04 +0100 <sam113101> https://paste.centos.org/view/016a1c20
2025-11-21 03:44:38 +0100 <jreicher> sam113101: have you attempted any kind of explicit state change in the code?
2025-11-21 03:44:10 +0100 <lambdabot> monochrom says: einstein's theory implies that haskell cannot be faster than c
2025-11-21 03:44:09 +0100 <monochrom> @quote monochrom einstein
2025-11-21 03:43:43 +0100 <EvanR> it's programming language relativistic time dilation
2025-11-21 03:43:37 +0100 <fgarcia> and i think for haskell, correctness is the first thing that is implemented. speed is a bit of a bonus. for languages, assembly or C++ would probably be faster as i think they advertise execution speed
2025-11-21 03:43:22 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 265 seconds)
2025-11-21 03:43:08 +0100 <EvanR> but if you translated haskell algorithms to C it would also slow down
2025-11-21 03:42:48 +0100 <EvanR> it could very well be the case you translate an imperative algorithm to haskell using some bespoke monad and it slows down
2025-11-21 03:41:42 +0100 <fgarcia> this is after it has been compiled? :O
2025-11-21 03:41:40 +0100 <sam113101> but it might still be me indeed
2025-11-21 03:41:30 +0100 <sam113101> I think I reproduced the same algorithm faithfully across the multiple languages
2025-11-21 03:41:13 +0100 <monochrom> If it's 4 seconds vs 2 seconds, I had that usually, sure. Not 30 vs 2.
2025-11-21 03:40:48 +0100 <monochrom> I'll just say I never had that problem, so I can't reproduce it.
2025-11-21 03:40:17 +0100 <jreicher> How do you know the language is the problem and not your code?
2025-11-21 03:39:37 +0100 <sam113101> make code takes 30s to run will it takes 2s in most other languages
2025-11-21 03:39:03 +0100 <sam113101> I'm not happy with the performance of haskell
2025-11-21 03:38:31 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-11-21 03:32:23 +0100connrs(~connrs@user/connrs) connrs
2025-11-21 03:32:11 +0100connrs(~connrs@user/connrs) (Read error: Connection reset by peer)
2025-11-21 03:29:44 +0100down200(~down200@shell.lug.mtu.edu) (Quit: ZNC - https://znc.in)
2025-11-21 03:27:40 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
2025-11-21 03:26:02 +0100L29Ah(~L29Ah@wikipedia/L29Ah) L29Ah
2025-11-21 03:23:08 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-11-21 03:20:51 +0100Googulator52(~Googulato@2a01-036d-0106-0231-4475-80b4-5cdc-43d6.pool6.digikabel.hu) (Quit: Client closed)
2025-11-21 03:20:43 +0100Googulator87(~Googulato@2a01-036d-0106-0231-4475-80b4-5cdc-43d6.pool6.digikabel.hu)
2025-11-21 03:13:19 +0100L29Ah(~L29Ah@wikipedia/L29Ah) (Read error: Connection reset by peer)
2025-11-21 03:12:08 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 240 seconds)
2025-11-21 03:08:25 +0100marlino(~marlino@96-8-193-95.block0.gvtc.com)
2025-11-21 03:07:44 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-11-21 03:06:26 +0100haltingsolver(~cmo@2604:3d09:207f:8000::d1dc)
2025-11-21 03:06:03 +0100haltingsolver(~cmo@2604:3d09:207f:8000::d1dc) (Remote host closed the connection)
2025-11-21 03:03:05 +0100trickard_(~trickard@cpe-90-98-47-163.wireline.com.au)
2025-11-21 03:02:52 +0100trickard_(~trickard@cpe-90-98-47-163.wireline.com.au) (Read error: Connection reset by peer)
2025-11-21 02:57:55 +0100mange(~mange@user/mange) (Ping timeout: 264 seconds)
2025-11-21 02:57:19 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
2025-11-21 02:56:55 +0100AlexZenon(~alzenon@94.233.240.123)
2025-11-21 02:55:01 +0100itaipu(~itaipu@168.121.97.28) itaipu
2025-11-21 02:52:21 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-11-21 02:49:14 +0100 <chromoblob> [exa]: sorry, what? what's "act"?
2025-11-21 02:43:26 +0100califax(~califax@user/califx) califx