Logs: liberachat/#haskell
| 2021-08-14 20:39:50 | <hpc> | make things interesting, re-encode to UTF-32 and take the last two bits from each byte :D |
| 2021-08-14 20:40:16 | <aarchi> | This is the snippet for printing an arbitrary-precision int as a char: putChar (toEnum (fromInteger n)). In GHC<6.12, that would have printed n%256 as a byte, right? |
| 2021-08-14 20:40:39 | <int-e> | yes |
| 2021-08-14 20:40:49 | <aarchi> | Modern GHC treats that as a UTF-32 codepoint |
| 2021-08-14 20:41:05 | × | burnsidesLlama quits (~burnsides@client-8-91.eduroam.oxuni.org.uk) (Ping timeout: 258 seconds) |
| 2021-08-14 20:42:00 | <aarchi> | Does (or has) getLine have different line ending handling per OS, i.e. LF/CRLF/CR? |
| 2021-08-14 20:42:11 | <hpc> | yes |
| 2021-08-14 20:42:19 | <geekosaur> | that's aforementioned newline translation |
| 2021-08-14 20:42:28 | <hpc> | https://hackage.haskell.org/package/base-4.15.0.0/docs/System-IO.html#v:hSetNewlineMode |
| 2021-08-14 20:42:35 | <int-e> | aarchi: the quote above mentions newline conventions as well |
| 2021-08-14 20:42:54 | <int-e> | isn't there a LFCR convention too? |
| 2021-08-14 20:43:09 | <hololeap> | what's the difference between a DSL and a EDSL? would would blaze-html count as? |
| 2021-08-14 20:43:42 | <int-e> | hololeap: the difference is that EDSL must fit into the language's syntax; DSL can use preprocessors. |
| 2021-08-14 20:43:49 | <int-e> | E = "embedded" |
| 2021-08-14 20:44:03 | <dmj`> | Is there a way to overlap an instance by just adding a single constraint or will it always be considered duplicate |
| 2021-08-14 20:44:07 | <hpc> | nix is a dsl, dhall is an edsl |
| 2021-08-14 20:44:12 | <hololeap> | ok, so this is actually an EDSL, even though it calls itself a DSL: https://hackage.haskell.org/package/cascading |
| 2021-08-14 20:44:16 | <aarchi> | int-e: Acorn BBC and Spool OS used CRLF: https://en.wikipedia.org/wiki/Newline |
| 2021-08-14 20:44:17 | <hololeap> | that's what confused me |
| 2021-08-14 20:44:17 | <int-e> | Of course that distinction is blurred when you have quasiquoters |
| 2021-08-14 20:44:27 | <aarchi> | int-e: edit: those two used LFCR |
| 2021-08-14 20:44:47 | <hpc> | er, dhall is a dsl too |
| 2021-08-14 20:45:21 | <int-e> | aarchi: Yeah, stupid autocorrecting brains ;-) |
| 2021-08-14 20:45:38 | <aarchi> | Yeah. LFCR just feels so wrong |
| 2021-08-14 20:46:29 | <monochrom> | Classic Mac used LFCR. |
| 2021-08-14 20:46:37 | <aarchi> | Really? I thought it was CR |
| 2021-08-14 20:46:50 | <geekosaur> | same here |
| 2021-08-14 20:47:15 | <monochrom> | Ah my bad. |
| 2021-08-14 20:47:51 | <hololeap> | what I really want is an EDSL very much in the spirit of elm-ui that outputs CSS |
| 2021-08-14 20:47:54 | <hololeap> | https://github.com/mdgriffith/elm-ui |
| 2021-08-14 20:48:01 | <hololeap> | "Many layout errors (like you'd run into using CSS) are just not possible to write in the first place!" |
| 2021-08-14 20:48:12 | <hololeap> | that's the killer feature I'm after |
| 2021-08-14 20:49:27 | → | nate1 joins (~nate@2600:1010:b02a:2679:2dce:c77d:8f55:dad5) |
| 2021-08-14 20:49:54 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 258 seconds) |
| 2021-08-14 20:52:11 | <aarchi> | Are stdin/stdout text or binary Handles, i.e. do they translate LF<->CRLF by default? |
| 2021-08-14 20:52:21 | <c_wraith> | text |
| 2021-08-14 20:53:06 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection) |
| 2021-08-14 20:54:57 | → | geekosaur joins (~geekosaur@xmonad/geekosaur) |
| 2021-08-14 20:57:32 | → | Erutuon joins (~Erutuon@user/erutuon) |
| 2021-08-14 20:58:22 | × | nate1 quits (~nate@2600:1010:b02a:2679:2dce:c77d:8f55:dad5) (Ping timeout: 272 seconds) |
| 2021-08-14 21:01:16 | → | Guest21 joins (~Guest21@2a02:aa1:1010:e9f8:8986:a924:83c:1c23) |
| 2021-08-14 21:03:04 | → | Guest54 joins (~Guest54@187.83.249.216.dyn.smithville.net) |
| 2021-08-14 21:04:36 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 268 seconds) |
| 2021-08-14 21:07:07 | <hololeap> | i like how the website for clay (css EDSL) has an obnoxious floating title and menu that takes up almost half of the screen |
| 2021-08-14 21:10:37 | <Guest21> | Hello I am new to Haskell could someone help me out? We are going to find the largest number under 100,000 that's divisible by 3829. GHCI is complaining about precedence with my mod predicate. |
| 2021-08-14 21:10:48 | → | myShoggoth joins (~myShoggot@97-120-70-214.ptld.qwest.net) |
| 2021-08-14 21:10:49 | <Guest21> | findLargestDiv' = last . filter (`mod` 3829 == 0) [1..100000] |
| 2021-08-14 21:11:56 | <monochrom> | Yeah the computer thinks you mean (`mod` (3829 == 0)). |
| 2021-08-14 21:12:10 | <monochrom> | You are really better off writing a lambda. |
| 2021-08-14 21:12:40 | <hololeap> | are you asking how to fix it or are you confused about the error message? |
| 2021-08-14 21:13:26 | <Guest21> | Asking how to fix it, if it's even possible to do it that way. I solved it with list comprehensions but I want to do it with filter and map. |
| 2021-08-14 21:15:15 | → | mousey joins (~skymouse@gateway/tor-sasl/mousey) |
| 2021-08-14 21:16:23 | <hololeap> | > findLargestDiv' = last . filter (\i -> i `mod` 3829 == 0) [1..100000] |
| 2021-08-14 21:16:24 | <lambdabot> | <hint>:1:17: error: parse error on input ‘=’ |
| 2021-08-14 21:16:41 | <hololeap> | > findLargestDiv' = last . filter (\i -> i `mod` 3829 == 0) |
| 2021-08-14 21:16:43 | <lambdabot> | <hint>:1:17: error: parse error on input ‘=’ |
| 2021-08-14 21:18:25 | <hololeap> | > let findLargestDiv' = last . filter (\i -> i `mod` 3829 == 0) |
| 2021-08-14 21:18:27 | <lambdabot> | <no location info>: error: |
| 2021-08-14 21:18:27 | <lambdabot> | not an expression: ‘let findLargestDiv' = last . filter (\i -> i `mod` 3... |
| 2021-08-14 21:18:40 | <hololeap> | not sure what's up with lambdabot... |
| 2021-08-14 21:18:54 | → | wroathe joins (~wroathe@96-88-30-181-static.hfc.comcastbusiness.net) |
| 2021-08-14 21:18:57 | <monochrom> | expression ≠ declaration |
| 2021-08-14 21:19:06 | <monochrom> | has always been that way since day one |
| 2021-08-14 21:19:11 | <hololeap> | % findLargestDiv' = last . filter (\i -> i `mod` 3829 == 0) |
| 2021-08-14 21:19:11 | <yahb> | hololeap: |
| 2021-08-14 21:19:20 | <hololeap> | % findLargestDiv' [1..100000] |
| 2021-08-14 21:19:21 | <yahb> | hololeap: 99554 |
| 2021-08-14 21:19:54 | <hololeap> | I thought it hooked into a GHCI session or something. yahb has always been more intuitive to me |
| 2021-08-14 21:20:22 | <monochrom> | No. lambdabot is only hint and/or mueval. |
| 2021-08-14 21:21:51 | <hololeap> | how would you do a declaration with lambdabot? |
| 2021-08-14 21:21:58 | <monochrom> | Don't. |
| 2021-08-14 21:21:59 | <hpc> | @let likethis = "like this" |
| 2021-08-14 21:22:00 | <lambdabot> | Defined. |
| 2021-08-14 21:22:07 | <hololeap> | ok |
| 2021-08-14 21:22:13 | <hpc> | @undefine |
| 2021-08-14 21:22:13 | <lambdabot> | Undefined. |
| 2021-08-14 21:22:37 | × | aguapesada quits (~aguapesad@2804:14c:8793:8e2f:311f:1da6:1cf6:61ea) (Ping timeout: 245 seconds) |
| 2021-08-14 21:22:44 | <hololeap> | Guest21: sorry for the noise, did you get your question answered? |
| 2021-08-14 21:23:01 | → | Ariakenom joins (~patrik@c83-255-154-140.bredband.tele2.se) |
| 2021-08-14 21:23:06 | <monochrom> | GHCi too didn't take most declarations until a decade ago or 5 years ago or something. |
| 2021-08-14 21:24:03 | <monochrom> | It required "let" for "let <pat> = <expr", and it didn't take "data X = X", "import List". |
| 2021-08-14 21:24:11 | <monochrom> | (And yes back then it was called "List".) |
| 2021-08-14 21:24:29 | → | pfurla joins (~pfurla@ool-3f8fcb0f.dyn.optonline.net) |
| 2021-08-14 21:24:47 | <hololeap> | when I first started with haskell, ghci was like that. and then right after that it changed to the current behavior which is much more intuitive for me |
| 2021-08-14 21:25:55 | → | aguapesada joins (~aguapesad@2804:14c:8793:8e2f:311f:1da6:1cf6:61ea) |
| 2021-08-14 21:27:49 | <hpc> | i thought i was joking when i told people ghci was a giant do block |
| 2021-08-14 21:27:59 | <hpc> | turns out it really was, back then lol |
| 2021-08-14 21:28:12 | × | pfurla_ quits (~pfurla@ool-3f8fcb0f.dyn.optonline.net) (Ping timeout: 272 seconds) |
| 2021-08-14 21:28:29 | <aarchi> | Are there significant I/O differences between Haskell 98 and 2010? |
| 2021-08-14 21:28:58 | <hpc> | in what way? |
| 2021-08-14 21:29:00 | <hpc> | performance? |
| 2021-08-14 21:29:44 | <monochrom> | I think no. |
| 2021-08-14 21:30:07 | × | Ariakenom quits (~patrik@c83-255-154-140.bredband.tele2.se) (Quit: WeeChat 3.1) |
| 2021-08-14 21:30:13 | <aarchi> | I'm mostly interested in encoding-related changes |
| 2021-08-14 21:30:13 | <Guest21> | hololeap yeah I figured it out, however I am stuck once again if you want to lend a hand. =) |
| 2021-08-14 21:30:14 | <monochrom> | The requirement of Unicode compliance was there in Haskell 98 or earlier. |
| 2021-08-14 21:30:22 | → | Ariakenom joins (~patrik@c83-255-154-140.bredband.tele2.se) |
| 2021-08-14 21:30:30 | <hololeap> | Guest21: go ahead and ask |
| 2021-08-14 21:30:42 | <monochrom> | It was actual implementations like GHC and Hugs that ignored that until a decade ago or something. |
| 2021-08-14 21:31:26 | <Guest21> | We are going to find the sum of all odd squares that are smaller than 10 000. |
All times are in UTC.