2026/04/06

Newest at the top

2026-04-06 22:15:02 +0000 <_JusSx_> mauke: thank you very much
2026-04-06 22:14:00 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-04-06 22:10:41 +0000 <_JusSx_> yeah inRange is better
2026-04-06 22:10:03 +0000 <lambdabot> Ix a => (a, a) -> a -> Bool
2026-04-06 22:10:02 +0000 <_JusSx_> :t inRange
2026-04-06 22:09:39 +0000 <lambdabot> False
2026-04-06 22:09:38 +0000 <mauke> > inRange ('a', 'z') 'é'
2026-04-06 22:08:51 +0000 <_JusSx_> i need to remove test isLower and isUpper with another test
2026-04-06 22:07:04 +0000 <lambdabot> True
2026-04-06 22:07:03 +0000 <mauke> > isLower 'é'
2026-04-06 22:05:42 +0000divlamir_divlamir
2026-04-06 22:05:42 +0000divlamir(~divlamir@user/divlamir) (Ping timeout: 255 seconds)
2026-04-06 22:04:24 +0000 <_JusSx_> https://paste.tomsmeding.com/A4OhO4GM
2026-04-06 22:03:10 +0000divlamir_(~divlamir@user/divlamir) divlamir
2026-04-06 22:03:05 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds)
2026-04-06 22:02:54 +0000 <_JusSx_> c_wraith: it's a problem in CodeWars. www.codewars.com. I think the tester is passing a malformed string
2026-04-06 22:00:19 +0000karenw(~karenw@user/karenw) (Ping timeout: 264 seconds)
2026-04-06 21:59:28 +0000arandombit(~arandombi@user/arandombit) arandombit
2026-04-06 21:59:28 +0000arandombit(~arandombi@2a02:2455:8656:7100:71fa:b47d:cf44:d9a9) (Changing host)
2026-04-06 21:59:28 +0000arandombit(~arandombi@2a02:2455:8656:7100:71fa:b47d:cf44:d9a9)
2026-04-06 21:58:38 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-04-06 21:55:25 +0000 <mauke> https://tio.run/##y0gszk7Nyfn/PzO3IL@oRMElsSRRzzkjsUhBI78oRZOLKzcxM0/BykrB019BQxPCs1VIyedSAIJiBRtdhfTUEp/MvFSwQEFRZl6JgkZuYoECULdCseb//@bGMYZGBqaWRjFqRjYxhsbGRuamAA
2026-04-06 21:54:11 +0000 <c_wraith> Here's the question you need to answer: Do you have a String that you want to represent at run time, or a String literal that you want to embed in the source code?
2026-04-06 21:52:38 +0000 <c_wraith> Haskell chose a common convention, going back at least as far as C, to use \ as the escape character indicating that something special is going on.
2026-04-06 21:52:34 +0000 <mauke> we're talking about Haskell source code. that's not input
2026-04-06 21:52:18 +0000 <_JusSx_> the input is given. i can't change it
2026-04-06 21:52:02 +0000target_i(~target_i@user/target-i/x-6023099) (Quit: leaving)
2026-04-06 21:51:49 +0000 <lambdabot> True
2026-04-06 21:51:48 +0000 <mauke> > '\n' == chr 10
2026-04-06 21:51:33 +0000 <c_wraith> Because literals are embedded in a larger document, they can't be totally freeform.
2026-04-06 21:51:14 +0000 <c_wraith> String literals are source code. A String value exist when the program is running.
2026-04-06 21:51:12 +0000 <mauke> that's a single character, not a two-character sequence
2026-04-06 21:51:07 +0000 <_JusSx_> so the func will never find a \
2026-04-06 21:50:59 +0000 <lambdabot> 1
2026-04-06 21:50:57 +0000 <mauke> > length "\n"
2026-04-06 21:50:40 +0000 <mauke> you don't have a \
2026-04-06 21:50:30 +0000 <mauke> no
2026-04-06 21:50:27 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds)
2026-04-06 21:50:24 +0000 <_JusSx_> so i need to code a func that put a `\' when it find \
2026-04-06 21:50:08 +0000 <TMA> jreicher: that being said, those languages might not need an OS or rather they ARE the OS like Lisp Machine Lisp or Sinclair BASIC
2026-04-06 21:48:47 +0000 <mauke> _JusSx_: you need to write \\ to get a single \ character in a string
2026-04-06 21:47:43 +0000 <TMA> jreicher: I know. I did even write an OS as an assignment in a course.
2026-04-06 21:47:38 +0000divlamir_divlamir
2026-04-06 21:47:38 +0000divlamir(~divlamir@user/divlamir) (Ping timeout: 252 seconds)
2026-04-06 21:46:13 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-04-06 21:46:10 +0000divlamir_(~divlamir@user/divlamir) divlamir
2026-04-06 21:43:01 +0000 <c_wraith> You could do something with a fancy quasiquoter to get closer to raw strings, but they still need some sort of delimiter. Probably the easiest answer is to move those strings outside of source. Put them in a separate text file, so they're never treated as Haskell source.
2026-04-06 21:40:22 +0000 <c_wraith> string literals have escape sequences. But that's a property of string literals in source, not strings themselves.
2026-04-06 21:40:06 +0000jmcantrell_(~weechat@user/jmcantrell) (Ping timeout: 246 seconds)
2026-04-06 21:39:51 +0000 <c_wraith> Ah. The issue you're running into, then, is that string literals are not raw