Newest at the top
2024-11-12 02:02:30 +0100 | peterbecich | (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 246 seconds) |
2024-11-12 02:02:17 +0100 | td_ | (~td@i53870914.versanet.de) |
2024-11-12 02:00:54 +0100 | td_ | (~td@i5387091E.versanet.de) (Ping timeout: 260 seconds) |
2024-11-12 01:52:30 +0100 | housemate | (~housemate@146.70.66.228) (Quit: "I saw it in a tiktok video and thought that it was the most smartest answer ever." ~ AnonOps Radio [some time some place] | I AM THE DERIVATIVE I AM GOING TANGENT TO THE CURVE!) |
2024-11-12 01:34:37 +0100 | <haskellbridge> | <thirdofmay18081814goya> fantastic ty |
2024-11-12 01:34:36 +0100 | xff0x | (~xff0x@2405:6580:b080:900:d852:39eb:7a5e:9b9f) (Ping timeout: 276 seconds) |
2024-11-12 01:33:44 +0100 | <Leary> | https://en.wikipedia.org/wiki/Parametricity |
2024-11-12 01:32:11 +0100 | <haskellbridge> | <thirdofmay18081814goya> Leary: is there a specific sense in which you're using "parametricity" here? getting overwhelmed by the search results |
2024-11-12 01:25:56 +0100 | <haskellbridge> | <thirdofmay18081814goya> hm I'll read up on that, ty!! |
2024-11-12 01:25:07 +0100 | <Leary> | thirdofmay: Parametricity and the first functor law give you uniqueness (and the second functor law). |
2024-11-12 01:24:39 +0100 | <lambdabot> | g . h = k . f => $map_F g . fmap h = fmap k . $map_F f |
2024-11-12 01:24:39 +0100 | <Leary> | @free fmap :: (a -> b) -> F a -> F b |
2024-11-12 01:19:00 +0100 | falafel | (~falafel@2600:1700:99f4:2050:653b:1b0b:44f2:30f1) (Ping timeout: 276 seconds) |
2024-11-12 01:13:22 +0100 | falafel | (~falafel@2600:1700:99f4:2050:653b:1b0b:44f2:30f1) falafel |
2024-11-12 01:13:03 +0100 | falafel | (~falafel@2600:1700:99f4:2050:c99f:7c1:9343:9cff) (Remote host closed the connection) |
2024-11-12 01:10:45 +0100 | <haskellbridge> | <thirdofmay18081814goya> do the fmap definitions in prelude satisfy some sort of uniqueness property? |
2024-11-12 01:10:35 +0100 | <haskellbridge> | <thirdofmay18081814goya> cough rewording |
2024-11-12 01:09:00 +0100 | <haskellbridge> | <thirdofmay18081814goya> some form* |
2024-11-12 01:08:53 +0100 | <haskellbridge> | <thirdofmay18081814goya> do the fmap definitions in prelude have some for of uniqueness property? |
2024-11-12 01:04:46 +0100 | Lord_of_Life | (~Lord@user/lord-of-life/x-2819915) Lord_of_Life |
2024-11-12 01:04:26 +0100 | Lord_of_Life | (~Lord@user/lord-of-life/x-2819915) (Quit: Laa shay'a waqi'un moutlaq bale kouloun moumkine) |
2024-11-12 01:04:14 +0100 | fp | (~Thunderbi@87-92-78-48.bb.dnainternet.fi) (Remote host closed the connection) |
2024-11-12 00:58:12 +0100 | agent314 | (~quassel@static-198-44-129-53.cust.tzulo.com) (Ping timeout: 276 seconds) |
2024-11-12 00:57:40 +0100 | <fp> | *the errors would bubble up |
2024-11-12 00:57:13 +0100 | <fp> | Ok I think I understand. The difference with tokens is that I'd be working with Parsec String, so errors would naturally occur for the whole token. I'd fall down to a Parsec Char just for the validation, which would bubble up. Does that sound right? |
2024-11-12 00:57:08 +0100 | Sgeo | (~Sgeo@user/sgeo) Sgeo |
2024-11-12 00:54:39 +0100 | <glguy> | There will be some class of characters you don't mind ending on: whitespace, (, ), etc. |
2024-11-12 00:54:18 +0100 | <glguy> | notFollowedBy or using lookAhead (same idea) to check that you're OK with the boundary that you ended on |
2024-11-12 00:52:43 +0100 | <glguy> | that wouldn't necessarily use parsec. If you want to do it in parsec I expect you'll have to use notFollowedBy to detect that your token ended on an OK boundary |
2024-11-12 00:50:44 +0100 | <glguy> | You have to write a program that processes the string using the rules you have in mind; there isn't a shortcut |
2024-11-12 00:50:22 +0100 | <glguy> | you processed the string turning it into tokens until you got to the end of the string |
2024-11-12 00:49:50 +0100 | <fp> | Sure but how did that check the whole string? |
2024-11-12 00:49:28 +0100 | <glguy> | by the thing that turned it into tokens |
2024-11-12 00:49:20 +0100 | <glguy> | if you had it set up with tokens then that's already done |
2024-11-12 00:48:46 +0100 | <fp> | I guess the question become, if I have it set up with tokens, how do I write the parser so that it checks if the whole token matches instead of just the beginning |
2024-11-12 00:48:24 +0100 | Everything | (~Everythin@46.211.220.37) (Quit: leaving) |
2024-11-12 00:44:17 +0100 | <glguy> | but if you don't want to completely rethink your design maybe spend some time looking at "notFollowedBy" and hack it together |
2024-11-12 00:44:08 +0100 | Tuplanolla | (~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) (Ping timeout: 244 seconds) |
2024-11-12 00:43:48 +0100 | <c_wraith> | You need to identify a sequence of characters as a single token, and then check that the token is valid *as a token* |
2024-11-12 00:43:24 +0100 | <c_wraith> | you're fundamentally asking about a tokenizing issue |
2024-11-12 00:43:22 +0100 | <glguy> | and then you'd try to turn it into one and find it had invalid characters |
2024-11-12 00:43:14 +0100 | jinsun | (~jinsun@user/jinsun) (Ping timeout: 248 seconds) |
2024-11-12 00:43:12 +0100 | <glguy> | it would because you'd get "#b0110a" as a token that you'd try to process and you'd decide it needs to be a binary number literal because of the first two characters |
2024-11-12 00:43:02 +0100 | <fp> | Or will it? |
2024-11-12 00:42:25 +0100 | <fp> | But right now I'm really just trying to get this to work against single tokens. My test string is '#b0110a', which tokenization won't help |
2024-11-12 00:40:36 +0100 | <glguy> | If you're doing a lisp your tokens might be something like, '(' ')' and sequences of stuff that's delimited by whitespace |
2024-11-12 00:40:23 +0100 | <c_wraith> | oh, then yeah. tokenize and parse separately |
2024-11-12 00:39:53 +0100 | <fp> | or 234 |
2024-11-12 00:38:59 +0100 | <glguy> | Parsec is parameterized to work over an arbitrary stream of arbitrary tokens |
2024-11-12 00:38:54 +0100 | <lambdabot> | have |