Newest at the top
| 2026-06-23 20:51:07 +0000 | <jaror> | That way you still have O(1) access to the first element and fast iteration, but you also have fast length and fast indexing |
| 2026-06-23 20:50:09 +0000 | <jaror> | c_wraith, so a better alternative would be a list of arrays that double in length? Maybe someone should write a library for that. |
| 2026-06-23 20:48:02 +0000 | <geekosaur> | yeh, HLS disabled Stan by default a couple versions ago IIRC |
| 2026-06-23 20:47:27 +0000 | <monochrom> | I only have a mild case of static typing OCD. |
| 2026-06-23 20:46:47 +0000 | <monochrom> | Those who care so much about totality can please switch over to Lean and leave Haskell alone. I chose Haskell because I want its compromises, not because I have totality OCD. |
| 2026-06-23 20:45:44 +0000 | jreicher | (~joelr@user/jreicher) (Quit: In transit) |
| 2026-06-23 20:45:27 +0000 | <monochrom> | Like, GHC -Wall already gives you more than enough silly warnings, you don't need another warner. |
| 2026-06-23 20:45:20 +0000 | <jaror> | at least in vscodium |
| 2026-06-23 20:45:12 +0000 | <jaror> | and I think recent versions of HLS don't enable it by default |
| 2026-06-23 20:44:57 +0000 | <jaror> | those warnings are from Stan by the way which you should be able to disable separately |
| 2026-06-23 20:44:50 +0000 | <monochrom> | Or even better, don't use it, use a plain editor. |
| 2026-06-23 20:44:17 +0000 | <monochrom> | IMO you should just tell your LSP+IED to shut up. Those warnings are getting silly. |
| 2026-06-23 20:43:03 +0000 | merijn | (~merijn@62.45.136.136) (Ping timeout: 252 seconds) |
| 2026-06-23 20:40:00 +0000 | <c_wraith> | Which is the main thing lists are used for |
| 2026-06-23 20:39:54 +0000 | <c_wraith> | But it's significantly worse than list for iterating in order |
| 2026-06-23 20:39:45 +0000 | <c_wraith> | I guess that's true for the universe of possible things |
| 2026-06-23 20:39:15 +0000 | <jaror> | It's better than lists for most things |
| 2026-06-23 20:38:43 +0000 | <c_wraith> | Seq is... Seq is not great. Like it's fine as a quick proof of concept. But nearly every use people have for it can be done better by something more focused |
| 2026-06-23 20:38:35 +0000 | merijn | (~merijn@62.45.136.136) merijn |
| 2026-06-23 20:33:20 +0000 | tromp | (~textual@2001:1c00:340e:2700:e1be:7d8f:de85:da97) |
| 2026-06-23 20:30:34 +0000 | <jaror> | (Not actually the Array type from the array package) |
| 2026-06-23 20:27:55 +0000 | merijn | (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds) |
| 2026-06-23 20:26:10 +0000 | <jaror> | Arrays and Seq are also pretty standard. I think they should be used more. |
| 2026-06-23 20:23:02 +0000 | merijn | (~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn |
| 2026-06-23 20:22:44 +0000 | <gentauro> | jaror: I think I could. But for my usage, standard list should do the job (and yes, I know they aren't inf) |
| 2026-06-23 20:17:03 +0000 | <jaror> | very fast |
| 2026-06-23 20:16:05 +0000 | <lambdabot> | -9223372036854775808 |
| 2026-06-23 20:16:03 +0000 | <int-e> | > let s = iterate (\x -> x <> x) (Seq.singleton ()) !! 63 in Seq.length s |
| 2026-06-23 20:14:30 +0000 | <jaror> | They also have much faster length fuctions |
| 2026-06-23 20:14:02 +0000 | <jaror> | If you know your lists are finite, can't you use another type like an array or Seq? |
| 2026-06-23 20:13:06 +0000 | <gentauro> | I guess I just have to live with the warnings. |
| 2026-06-23 20:12:48 +0000 | merijn | (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
| 2026-06-23 20:12:47 +0000 | <gentauro> | jaror: but to use `compareLength` you need to have some static value and you get an order (LT,EQ,GT). I want a number xD |
| 2026-06-23 20:11:52 +0000 | <gentauro> | int-e: fair enough :) |
| 2026-06-23 20:11:14 +0000 | <yahb2> | Data.List.compareLength :: [a] -> Int -> Ordering |
| 2026-06-23 20:11:14 +0000 | <gentauro> | % :t Data.List.compareLength |
| 2026-06-23 20:11:10 +0000 | <yahb2> | <interactive>:1:1: error: [GHC-76037] ; • Not in scope: data constructor ‘Data.ListcompareLength’ ; • Note: No module named ‘Data’ is imported. |
| 2026-06-23 20:11:10 +0000 | <gentauro> | % :t Data.ListcompareLength |
| 2026-06-23 20:11:05 +0000 | <int-e> | gentauro: whereas I did the thing where I didn't read context |
| 2026-06-23 20:10:58 +0000 | <yahb2> | <interactive>:1:1: error: [GHC-88464] ; Variable not in scope: compareLength |
| 2026-06-23 20:10:58 +0000 | <gentauro> | % :t compareLength |
| 2026-06-23 20:10:53 +0000 | <lambdabot> | <hint>:1:1: error: parse error on input `:' |
| 2026-06-23 20:10:52 +0000 | <gentauro> | > :t compareLength |
| 2026-06-23 20:09:47 +0000 | <gentauro> | jaror: ahhh |
| 2026-06-23 20:09:36 +0000 | <jaror> | Yeah, I suggested Data.List.compareLength, not genericLength |
| 2026-06-23 20:09:19 +0000 | <gentauro> | we are in the same boat :) |
| 2026-06-23 20:09:19 +0000 | <int-e> | gentauro: it's an equivalent to length ;) |
| 2026-06-23 20:09:12 +0000 | <gentauro> | jaror: gives the same warning (LSP + IED) -> ` ✲ Name: Infinite: ghc-internal/genericLength` |
| 2026-06-23 20:08:07 +0000 | merijn | (~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn |
| 2026-06-23 20:07:51 +0000 | <jaror> | what's the question? |