Logs: liberachat/#haskell
| 2025-11-21 00:45:05 | × | xff0x quits (~xff0x@2405:6580:b080:900:8837:488e:4fa1:2e) (Ping timeout: 264 seconds) |
| 2025-11-21 00:48:09 | → | merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl) |
| 2025-11-21 00:52:52 | × | merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 256 seconds) |
| 2025-11-21 01:03:34 | → | merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl) |
| 2025-11-21 01:06:51 | → | omidmash6 joins (~omidmash@user/omidmash) |
| 2025-11-21 01:08:28 | × | merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds) |
| 2025-11-21 01:08:41 | × | omidmash quits (~omidmash@user/omidmash) (Ping timeout: 244 seconds) |
| 2025-11-21 01:08:41 | omidmash6 | is now known as omidmash |
| 2025-11-21 01:13:07 | × | vetkat quits (~vetkat@user/vetkat) (Quit: So long, and thanks for all the fish) |
| 2025-11-21 01:15:52 | → | bggd joins (~bgg@2a01:e0a:819:1510:3835:521f:ca74:58be) |
| 2025-11-21 01:18:56 | → | merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl) |
| 2025-11-21 01:22:41 | → | ert485 joins (~ert485@207.195.86.11) |
| 2025-11-21 01:22:48 | → | vetkat joins (~vetkat@user/vetkat) |
| 2025-11-21 01:23:21 | × | ert485 quits (~ert485@207.195.86.11) (Quit: Client closed) |
| 2025-11-21 01:23:24 | × | merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
| 2025-11-21 01:23:58 | → | mange joins (~mange@user/mange) |
| 2025-11-21 01:24:51 | → | ert485 joins (~ert485@207.195.86.11) |
| 2025-11-21 01:27:13 | × | synchrom1 quits (~john@2406:5a00:2412:2c00:394c:fa0b:5fac:c256) (Read error: Connection reset by peer) |
| 2025-11-21 01:28:35 | → | synchromesh joins (~john@2406:5a00:2412:2c00:58f6:2167:890b:2ed2) |
| 2025-11-21 01:28:46 | × | acidjnk quits (~acidjnk@p200300d6e71719764cede409c055dd1e.dip0.t-ipconnect.de) (Ping timeout: 246 seconds) |
| 2025-11-21 01:28:54 | × | trickard quits (~trickard@cpe-90-98-47-163.wireline.com.au) (Read error: Connection reset by peer) |
| 2025-11-21 01:29:06 | → | trickard_ joins (~trickard@cpe-90-98-47-163.wireline.com.au) |
| 2025-11-21 01:30:01 | × | ert485 quits (~ert485@207.195.86.11) (Quit: Client closed) |
| 2025-11-21 01:32:11 | × | califax quits (~califax@user/califx) (Remote host closed the connection) |
| 2025-11-21 01:34:18 | → | merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl) |
| 2025-11-21 01:34:34 | → | ert485 joins (~ert485@207.195.86.11) |
| 2025-11-21 01:34:59 | × | ert485 quits (~ert485@207.195.86.11) (Client Quit) |
| 2025-11-21 01:35:21 | → | AlexNoo_ joins (~AlexNoo@94.233.240.123) |
| 2025-11-21 01:37:04 | × | AlexZenon quits (~alzenon@178.34.162.20) (Ping timeout: 256 seconds) |
| 2025-11-21 01:38:51 | × | AlexNoo quits (~AlexNoo@178.34.162.20) (Ping timeout: 250 seconds) |
| 2025-11-21 01:40:18 | × | peterbecich quits (~Thunderbi@172.222.148.214) (Quit: peterbecich) |
| 2025-11-21 01:40:23 | → | aditya_an1l joins (~aditya_an@user/aditya-an1l:63825) |
| 2025-11-21 01:41:14 | → | xff0x joins (~xff0x@fsb6a9491c.tkyc517.ap.nuro.jp) |
| 2025-11-21 01:41:30 | × | merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 265 seconds) |
| 2025-11-21 01:41:44 | × | itaipu quits (~itaipu@168.121.97.28) (Ping timeout: 240 seconds) |
| 2025-11-21 01:42:56 | × | ubert1 quits (~Thunderbi@178.165.175.248.wireless.dyn.drei.com) (Quit: ubert1) |
| 2025-11-21 01:43:12 | → | ert485 joins (~ert485@207.195.86.11) |
| 2025-11-21 01:43:24 | × | ert485 quits (~ert485@207.195.86.11) (Client Quit) |
| 2025-11-21 01:43:26 | → | califax joins (~califax@user/califx) |
| 2025-11-21 01:49:14 | <chromoblob> | [exa]: sorry, what? what's "act"? |
| 2025-11-21 01:52:21 | → | merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl) |
| 2025-11-21 01:55:01 | → | itaipu joins (~itaipu@168.121.97.28) |
| 2025-11-21 01:56:55 | → | AlexZenon joins (~alzenon@94.233.240.123) |
| 2025-11-21 01:57:19 | × | merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds) |
| 2025-11-21 01:57:55 | × | mange quits (~mange@user/mange) (Ping timeout: 264 seconds) |
| 2025-11-21 02:02:52 | × | trickard_ quits (~trickard@cpe-90-98-47-163.wireline.com.au) (Read error: Connection reset by peer) |
| 2025-11-21 02:03:05 | → | trickard_ joins (~trickard@cpe-90-98-47-163.wireline.com.au) |
| 2025-11-21 02:06:03 | × | haltingsolver quits (~cmo@2604:3d09:207f:8000::d1dc) (Remote host closed the connection) |
| 2025-11-21 02:06:26 | → | haltingsolver joins (~cmo@2604:3d09:207f:8000::d1dc) |
| 2025-11-21 02:07:44 | → | merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl) |
| 2025-11-21 02:08:25 | → | marlino joins (~marlino@96-8-193-95.block0.gvtc.com) |
| 2025-11-21 02:12:08 | × | merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 240 seconds) |
| 2025-11-21 02:13:19 | × | L29Ah quits (~L29Ah@wikipedia/L29Ah) (Read error: Connection reset by peer) |
| 2025-11-21 02:20:43 | → | Googulator87 joins (~Googulato@2a01-036d-0106-0231-4475-80b4-5cdc-43d6.pool6.digikabel.hu) |
| 2025-11-21 02:20:51 | × | Googulator52 quits (~Googulato@2a01-036d-0106-0231-4475-80b4-5cdc-43d6.pool6.digikabel.hu) (Quit: Client closed) |
| 2025-11-21 02:23:08 | → | merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl) |
| 2025-11-21 02:26:02 | → | L29Ah joins (~L29Ah@wikipedia/L29Ah) |
| 2025-11-21 02:27:40 | × | merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds) |
| 2025-11-21 02:29:44 | × | down200 quits (~down200@shell.lug.mtu.edu) (Quit: ZNC - https://znc.in) |
| 2025-11-21 02:32:11 | × | connrs quits (~connrs@user/connrs) (Read error: Connection reset by peer) |
| 2025-11-21 02:32:23 | → | connrs joins (~connrs@user/connrs) |
| 2025-11-21 02:38:31 | → | merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl) |
| 2025-11-21 02:39:03 | <sam113101> | I'm not happy with the performance of haskell |
| 2025-11-21 02:39:37 | <sam113101> | make code takes 30s to run will it takes 2s in most other languages |
| 2025-11-21 02:40:17 | <jreicher> | How do you know the language is the problem and not your code? |
| 2025-11-21 02:40:48 | <monochrom> | I'll just say I never had that problem, so I can't reproduce it. |
| 2025-11-21 02:41:13 | <monochrom> | If it's 4 seconds vs 2 seconds, I had that usually, sure. Not 30 vs 2. |
| 2025-11-21 02:41:30 | <sam113101> | I think I reproduced the same algorithm faithfully across the multiple languages |
| 2025-11-21 02:41:40 | <sam113101> | but it might still be me indeed |
| 2025-11-21 02:41:42 | <fgarcia> | this is after it has been compiled? :O |
| 2025-11-21 02:42:48 | <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 02:43:08 | <EvanR> | but if you translated haskell algorithms to C it would also slow down |
| 2025-11-21 02:43:22 | × | merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 265 seconds) |
| 2025-11-21 02:43:37 | <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 02:43:43 | <EvanR> | it's programming language relativistic time dilation |
| 2025-11-21 02:44:09 | <monochrom> | @quote monochrom einstein |
| 2025-11-21 02:44:10 | <lambdabot> | monochrom says: einstein's theory implies that haskell cannot be faster than c |
| 2025-11-21 02:44:38 | <jreicher> | sam113101: have you attempted any kind of explicit state change in the code? |
| 2025-11-21 02:45:04 | <sam113101> | https://paste.centos.org/view/016a1c20 |
| 2025-11-21 02:45:10 | <haskellbridge> | <sm> sam113101: if you post it somewhere, like the discourse, people will show you how to make it fast |
| 2025-11-21 02:45:20 | <jreicher> | hailstone numbers. :) |
| 2025-11-21 02:47:19 | <sam113101> | the elixir version: https://paste.centos.org/view/raw/9ea27c56 |
| 2025-11-21 02:47:26 | <haskellbridge> | <sm> aha there it is. Im no expert at this but repeatedly getting the length of lists is wasteful |
| 2025-11-21 02:47:31 | <monochrom> | Probably this: You think "length xs" takes O(1) time, my students do too. No, it takes Ω(length xs) time. |
| 2025-11-21 02:47:53 | <monochrom> | Sometimes I even put that on exams. |
| 2025-11-21 02:48:34 | <monochrom> | And some other times, "a student coded up `isEmpty xs = length xs == 0`, why is it stupid?" |
| 2025-11-21 02:48:44 | <jreicher> | I think that's more because a list isn't just a list in other languages. |
| 2025-11-21 02:50:02 | <EvanR> | strlen in C is also not O(1), which no one is surprised by |
| 2025-11-21 02:50:37 | <jreicher> | That's a nice comparison. it's probably because they know what a string "really" is in C. |
| 2025-11-21 02:50:59 | <sam113101> | well it's a linked list in haskell right? it's also a linked list in elixir |
| 2025-11-21 02:51:11 | <monochrom> | And some other other times, I make a question that goes "design a list data structure that caches length, and code up prepend, append, etc." |
| 2025-11-21 02:51:17 | <jreicher> | With extra book keeping which, if you also did in Haskell, would give you the performance you expect. |
| 2025-11-21 02:52:02 | <sam113101> | oh really? didn't know about this "book keeping" |
| 2025-11-21 02:52:17 | <EvanR> | the length of a list in elixir is also not O(1) |
| 2025-11-21 02:52:32 | <haskellbridge> | <sm> why don't we have this magical bookkeeping 🧙♂️ |
| 2025-11-21 02:53:23 | <EvanR> | if you're comparing the elixir code performance to haskell, then make sure you're compiling with optimizations |
| 2025-11-21 02:53:24 | <sam113101> | it was from my understanding that you had to walk through the entire list to count it |
| 2025-11-21 02:53:29 | <monochrom> | Probably 90% of the time if you need O(1)-time length you also need other things such that vector is better for example. |
| 2025-11-21 02:53:55 | → | merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl) |
| 2025-11-21 02:54:53 | <EvanR> | if that doesn't fix it, then start looking for unintended and unhelpful (and unoptimized away) laziness |
All times are in UTC.