Newest at the top
| 2026-02-24 22:57:07 +0100 | <tomsmeding> | that's probably easiest, yes (use ghcup) |
| 2026-02-24 22:56:55 +0100 | <Guest81> | So i need ghci. Thanks all. |
| 2026-02-24 22:55:48 +0100 | <tomsmeding> | ghci does quite a bit more than just an interpreter for basic expressions, and "learn you a haskell" assumes ghci |
| 2026-02-24 22:55:46 +0100 | <mauke> | a = [1,2,3] is not an expression |
| 2026-02-24 22:55:35 +0100 | <tomsmeding> | it is an interpreter, but not ghci |
| 2026-02-24 22:55:12 +0100 | ChaiTRex | (~ChaiTRex@user/chaitrex) ChaiTRex |
| 2026-02-24 22:55:10 +0100 | <Guest81> | OK so basically "Try it!" is not a true interpreter. |
| 2026-02-24 22:55:02 +0100 | <geekosaur> | probably just hint |
| 2026-02-24 22:55:00 +0100 | <monochrom> | Who writes 1000 lines of code on a REPL anyway? Be realistic. |
| 2026-02-24 22:54:51 +0100 | ChaiTRex | (~ChaiTRex@user/chaitrex) (Remote host closed the connection) |
| 2026-02-24 22:54:33 +0100 | astra | (sid289983@id-289983.hampstead.irccloud.com) |
| 2026-02-24 22:54:32 +0100 | prdak | (~Thunderbi@user/prdak) (Ping timeout: 268 seconds) |
| 2026-02-24 22:54:31 +0100 | <tomsmeding> | play.haskell.org is not a repl, though :) |
| 2026-02-24 22:54:20 +0100 | <tomsmeding> | apparently it accepts only full expressions |
| 2026-02-24 22:54:19 +0100 | astra | (sid289983@user/amish) (Server closed connection) |
| 2026-02-24 22:54:18 +0100 | <monochrom> | But play.haskell.org is better. |
| 2026-02-24 22:54:07 +0100 | <tomsmeding> | ah yes, that does work Guest81 ^ |
| 2026-02-24 22:53:51 +0100 | <monochrom> | "let a = [1,2,3] in length a" |
| 2026-02-24 22:53:35 +0100 | <monochrom> | Oh that. Sorry! |
| 2026-02-24 22:53:23 +0100 | <tomsmeding> | monochrom: we're talking about the "Try it!" thing on haskell.org, which is stupid and broken |
| 2026-02-24 22:53:12 +0100 | <monochrom> | "let a = [1,2,3]" also works for me. |
| 2026-02-24 22:53:06 +0100 | <tomsmeding> | there's https://play.haskell.org if you want to upgrade to writing a full program (which doesn't have to be complicated!); otherwise, either install ghci, or there may be some other online repl |
| 2026-02-24 22:52:47 +0100 | <monochrom> | "a = [1,2,3]" works for me. |
| 2026-02-24 22:52:32 +0100 | <EvanR> | "interesting" |
| 2026-02-24 22:52:21 +0100 | <Guest81> | <no location info>: not an expression: ‘let a = [1,2,3]’ |
| 2026-02-24 22:52:20 +0100 | <Guest81> | no go: let a = [1,2,3] |
| 2026-02-24 22:52:08 +0100 | <tomsmeding> | it doesn't there |
| 2026-02-24 22:52:02 +0100 | <EvanR> | a = [1,2,3] ought to work in ghci and at top level? |
| 2026-02-24 22:51:55 +0100 | <tomsmeding> | that "Try it!" prompt on haskell.org is not a proper haskell interpreter |
| 2026-02-24 22:51:40 +0100 | <Rembane> | Guest81: Try a let a = [1,2,3] |
| 2026-02-24 22:51:20 +0100 | <Guest81> | I am reading "learn you a Haskell ..." and I am using interactive on the haskell.org homepage. But when I input a simple equality such as "a = [1,2,3]" is get a parse error. What am I doing wrong? |
| 2026-02-24 22:51:08 +0100 | <lantti> | I'm in the process of re-evaluating that assumption :) |
| 2026-02-24 22:50:48 +0100 | <lantti> | I suspected the printing because I realized there is an analytic solution to the actual problem and generating the lists is just some math operations and [1..xyz] |
| 2026-02-24 22:50:44 +0100 | <mauke> | back when I did SPOJ, I got significant time improvements by bypassing stdio |
| 2026-02-24 22:50:36 +0100 | <tomsmeding> | maybe in this tight loop that's true |
| 2026-02-24 22:50:29 +0100 | <tomsmeding> | (that's a claim) |
| 2026-02-24 22:50:28 +0100 | <EvanR> | i was going to say C is the one where you are sometimes trying to deduce how slow printing is |
| 2026-02-24 22:50:21 +0100 | merijn | (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 265 seconds) |
| 2026-02-24 22:50:15 +0100 | <monochrom> | After compiling with -O, the IO monad doesn't exist in the machine code. |
| 2026-02-24 22:50:10 +0100 | <mauke> | printing is slow in C, too |
| 2026-02-24 22:49:38 +0100 | <EvanR> | printing it out doesn't sound like the crunchy part |
| 2026-02-24 22:49:28 +0100 | <EvanR> | this problem that separates a million integers into two sets that adds up to the same thing |
| 2026-02-24 22:48:20 +0100 | <EvanR> | people mistake what's slow all the time, that's a haskell thing |
| 2026-02-24 22:48:19 +0100 | Guest81 | (~Guest81@52.144.37.132) |
| 2026-02-24 22:48:16 +0100 | <monochrom> | No, it says a lot about people having double standards. |
| 2026-02-24 22:47:58 +0100 | <newmind> | why something as simple as "print out this list of numbers" might be slow |
| 2026-02-24 22:47:33 +0100 | <EvanR> | it? |
| 2026-02-24 22:47:07 +0100 | <newmind> | .o( but it does say a lot about haskell as a language/ecosystem that we're discussing it ) |
| 2026-02-24 22:46:06 +0100 | <monochrom> | I am unconvinced that (putStrLn . unwords . map show) is too slow. It's only 0.05 seconds on my laptop if you redirect to a file (which is the right thing to do if you're simulating an online autotester; if you let it go to a terminal, then the bottleneck is the terminal) |
| 2026-02-24 22:45:47 +0100 | <haskellbridge> | <ijouw> I want this https://hackage-content.haskell.org/package/Boolean-0.2.4/docs/Data-Boolean.html#t:OrdB and then define a function nubOrd' :: (OrdB a, BooleanOf a ~ Bool) => [a] -> [a] ; (maybe i should just not reimplement everything...) |