Newest at the top
2025-01-27 05:31:51 +0100 | <yahb2> | 42 'q' |
2025-01-27 05:31:51 +0100 | <int-e> | % putStrLn it |
2025-01-27 05:30:45 +0100 | aforemny_ | (~aforemny@2001:9e8:6ce1:cf00:b6f1:625c:54b4:a44b) (Ping timeout: 248 seconds) |
2025-01-27 05:30:06 +0100 | aforemny | (~aforemny@i577B125E.versanet.de) aforemny |
2025-01-27 05:28:53 +0100 | <int-e> | also, that's an opinion, ymmv |
2025-01-27 05:28:43 +0100 | <EvanR> | hmm |
2025-01-27 05:28:28 +0100 | <int-e> | in terms of writing the code :P |
2025-01-27 05:28:07 +0100 | <EvanR> | why is that |
2025-01-27 05:28:00 +0100 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) merijn |
2025-01-27 05:27:50 +0100 | <int-e> | EvanR: It's probably too much information, but `unwords` is unironically superior to repeated ++ " " ++ that often appear in manual formatting of several values. |
2025-01-27 05:27:19 +0100 | <EvanR> | stringly typed languages ftw |
2025-01-27 05:27:03 +0100 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds) |
2025-01-27 05:26:59 +0100 | <EvanR> | just kidding |
2025-01-27 05:26:50 +0100 | <EvanR> | you made a string containing values of different types! |
2025-01-27 05:26:08 +0100 | <yahb2> | "42 'q'" |
2025-01-27 05:26:08 +0100 | <int-e> | % unwords [show 42, show 'q'] |
2025-01-27 05:25:15 +0100 | <yahb2> | "42'q'" |
2025-01-27 05:25:15 +0100 | <mauke> | % show 42 <> show 'q' |
2025-01-27 05:24:40 +0100 | <lambdabot> | print x = putStrLn (show x) |
2025-01-27 05:24:40 +0100 | <mauke> | @src print |
2025-01-27 05:23:31 +0100 | <Tikosh> | Thank you so much for your instruction |
2025-01-27 05:22:06 +0100 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) merijn |
2025-01-27 05:20:51 +0100 | <yahb2> | Hello World! |
2025-01-27 05:20:51 +0100 | <EvanR> | % putStrLn "Hello World!" |
2025-01-27 05:20:31 +0100 | <Tikosh> | i was intending to make a console application. i only run it from the REPL. did not compile it, yet. |
2025-01-27 05:19:48 +0100 | <Tikosh> | oh. i see |
2025-01-27 05:19:36 +0100 | <EvanR> | notice the quotation marks |
2025-01-27 05:19:27 +0100 | <yahb2> | "Hello World" |
2025-01-27 05:19:27 +0100 | <EvanR> | % print "Hello World" |
2025-01-27 05:19:20 +0100 | <yahb2> | 7 |
2025-01-27 05:19:20 +0100 | <EvanR> | % print 7 |
2025-01-27 05:19:05 +0100 | <Tikosh> | alright |
2025-01-27 05:19:01 +0100 | <EvanR> | putStrLn |
2025-01-27 05:18:50 +0100 | <Tikosh> | EvanR: so just go with putStrLn or print? |
2025-01-27 05:18:22 +0100 | <EvanR> | yes printf is kind of an awkward thing to go for in basic haskell |
2025-01-27 05:17:50 +0100 | <Tikosh> | or on the REPL |
2025-01-27 05:17:27 +0100 | <Tikosh> | int-e: I was told to put printf. originally it had print in it. i was running the mian from the REPL in Emacs |
2025-01-27 05:17:18 +0100 | <int-e> | (putStrLn <string> prints a line) |
2025-01-27 05:16:47 +0100 | <int-e> | (Or, if you *want* to use printf, use "%s" and pass an extra argument whereever you're using user input.) |
2025-01-27 05:16:44 +0100 | <Tikosh> | int-e: alrighty then |
2025-01-27 05:15:45 +0100 | <EvanR> | 👍 |
2025-01-27 05:15:44 +0100 | <int-e> | The code may be a tad too simple to comment on usefully. I wouldn't use `printf` (try using "%s" as your name) |
2025-01-27 05:15:28 +0100 | <Tikosh> | EvanR: alright. ill practice |
2025-01-27 05:15:18 +0100 | <Tikosh> | EvanR: I still don't understand. sorry. I got a haskell textbook and started reading it for fun |
2025-01-27 05:15:07 +0100 | <EvanR> | but you can practice making higher order functions like interact to factor out some common I/O patterns |
2025-01-27 05:14:17 +0100 | <EvanR> | your program begins with a different pattern, yeah |
2025-01-27 05:13:46 +0100 | <Tikosh> | EvanR: alright |
2025-01-27 05:13:39 +0100 | <int-e> | meh it'll be awkward because there are prompts |
2025-01-27 05:13:27 +0100 | <EvanR> | and does the getting of input and printing of response for you |
2025-01-27 05:13:10 +0100 | <EvanR> | it takes a function like your questionOne function as argument |