2022-06-26 00:01:39 +0200 | Topsi | (~Topsi@dyndsl-095-033-020-051.ewe-ip-backbone.de) |
2022-06-26 00:02:15 +0200 | Haskelytic | (~Haskelyti@118.179.211.17) |
2022-06-26 00:02:20 +0200 | shiraeeshi | (~shiraeesh@46.34.206.55) (Ping timeout: 255 seconds) |
2022-06-26 00:02:42 +0200 | <AndreasK> | I rather write the types twice than in an XML spec |
2022-06-26 00:03:45 +0200 | <dsal> | The good news is that if you do it in XML, you'll probably end up writing everything twice anyway because that's how we roll. |
2022-06-26 00:03:45 +0200 | shiraeeshi | (~shiraeesh@46.34.206.55) |
2022-06-26 00:03:53 +0200 | <monochrom> | haha |
2022-06-26 00:04:50 +0200 | jmcarthur | (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
2022-06-26 00:05:26 +0200 | michalz | (~michalz@185.246.204.119) (Remote host closed the connection) |
2022-06-26 00:06:27 +0200 | nate4 | (~nate@98.45.169.16) (Ping timeout: 268 seconds) |
2022-06-26 00:09:12 +0200 | machinedgod | (~machinedg@66.244.246.252) |
2022-06-26 00:10:13 +0200 | jmcarthur | (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
2022-06-26 00:10:31 +0200 | king_gs | (~Thunderbi@2806:103e:29:a4ff:9938:ec1d:a54a:6688) |
2022-06-26 00:11:14 +0200 | gmg | (~user@user/gehmehgeh) (Quit: Leaving) |
2022-06-26 00:12:23 +0200 | king_gs | (~Thunderbi@2806:103e:29:a4ff:9938:ec1d:a54a:6688) (Client Quit) |
2022-06-26 00:15:57 +0200 | <BusConscious> | hey I need a function f :: a -> b -> (a,b) f a b = (a,b) |
2022-06-26 00:16:02 +0200 | <BusConscious> | what is this called? |
2022-06-26 00:16:25 +0200 | <geekosaur> | :t (,) |
2022-06-26 00:16:26 +0200 | <lambdabot> | a -> b -> (a, b) |
2022-06-26 00:16:40 +0200 | <BusConscious> | thanks |
2022-06-26 00:16:49 +0200 | <BusConscious> | kind of makes sense |
2022-06-26 00:16:56 +0200 | misterfish | (~misterfis@ip214-130-173-82.adsl2.static.versatel.nl) (Ping timeout: 268 seconds) |
2022-06-26 00:17:06 +0200 | <BusConscious> | so , is just an infix operator when we write tuples? |
2022-06-26 00:17:11 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:cd28:27b2:2677:8e87) |
2022-06-26 00:17:21 +0200 | <ski> | sortof, but not quite |
2022-06-26 00:17:33 +0200 | <geekosaur> | sort of. there are some limitations, like you have to enable an extension to use it as a section |
2022-06-26 00:17:38 +0200 | <ski> | @type (,,) |
2022-06-26 00:17:39 +0200 | <lambdabot> | a -> b -> c -> (a, b, c) |
2022-06-26 00:17:50 +0200 | <ski> | `TupleSections' is a language extension |
2022-06-26 00:17:57 +0200 | <ski> | @type (,False,) |
2022-06-26 00:17:59 +0200 | <lambdabot> | t1 -> t2 -> (t1, Bool, t2) |
2022-06-26 00:18:21 +0200 | merijn | (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) |
2022-06-26 00:18:44 +0200 | <ski> | (and you can't write just `2,False', you have to write `(2,False)' (unlike in OCaml)) |
2022-06-26 00:19:51 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:cd28:27b2:2677:8e87) (Remote host closed the connection) |
2022-06-26 00:20:07 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:cd28:27b2:2677:8e87) |
2022-06-26 00:23:14 +0200 | johnw | (~johnw@76-234-69-149.lightspeed.frokca.sbcglobal.net) (Quit: ZNC - http://znc.in) |
2022-06-26 00:27:08 +0200 | jgeerds | (~jgeerds@55d45f48.access.ecotel.net) (Ping timeout: 272 seconds) |
2022-06-26 00:28:12 +0200 | chomwitt | (~chomwitt@2a02:587:dc0d:e600:8c30:8a72:c29d:62b2) (Quit: Leaving) |
2022-06-26 00:29:55 +0200 | hgolden | (~hgolden2@cpe-172-251-233-141.socal.res.rr.com) (Quit: Konversation terminated!) |
2022-06-26 00:29:58 +0200 | <monochrom> | It is the other way round. "(x, y)" is syntax sugar for "(,) x y". |
2022-06-26 00:30:23 +0200 | jmcarthur | (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
2022-06-26 00:33:25 +0200 | <BusConscious> | monochrom: Just applied that partially, that's why I asked: https://github.com/MartinErhardt/kell/blob/7d42d731fbe4df3cf3b38f8bbdd36dc9b2aa275f/TokParser.hs#L… |
2022-06-26 00:37:04 +0200 | quarkyalice | (~quarkyali@user/quarkyalice) |
2022-06-26 00:38:31 +0200 | <dsal> | Some people really don't like tuple sections because of a principled reason I don't want to understand. |
2022-06-26 00:39:13 +0200 | <ski> | hm ? |
2022-06-26 00:39:44 +0200 | <BusConscious> | ski: dsal: So with tuple sections I could have written (e,)? |
2022-06-26 00:39:55 +0200 | <ski> | (i can understand a general reason to feel a bit iffy about sections .. but i'm not sure if that's the reason those people had in mind) |
2022-06-26 00:39:58 +0200 | <ski> | BusConscious, yes |
2022-06-26 00:40:04 +0200 | <EvanR> | whatever is missing from the syntactic construction is where the argument goes |
2022-06-26 00:40:09 +0200 | <AndreasK> | I don't like them because I find they can make code harder to read :) But I've worked on code using them before and survived ;D |
2022-06-26 00:40:15 +0200 | <ski> | BusConscious : also (regardless), the surrounding brackets are redundant |
2022-06-26 00:40:36 +0200 | <ski> | (and `lastSep' seems to be unused) |
2022-06-26 00:40:39 +0200 | <geekosaur> | only reason I';ve ever heard is it stops people from using tuples (and possibly lists) with optional trailing comma like python |
2022-06-26 00:40:57 +0200 | <geekosaur> | pfft |
2022-06-26 00:41:06 +0200 | <ski> | that might be a plus, in my book .. not sure |
2022-06-26 00:41:20 +0200 | <BusConscious> | I find myself making way too many brackets in haskell generally |
2022-06-26 00:41:39 +0200 | <EvanR> | that trailing comma thing is probably some good lisp fodder. "silly comma users" xD |
2022-06-26 00:41:48 +0200 | <dsal> | The principled reason I've heard is that it makes `(,)` behave like a function when it's not. But, I feel like it's consistent with, e.g. `(^)`. |
2022-06-26 00:42:02 +0200 | <ski> | BusConscious : you should probably learn to use the `Applicative' combinators for parsers more |
2022-06-26 00:42:09 +0200 | <EvanR> | but, it is a function |
2022-06-26 00:42:13 +0200 | jgeerds | (~jgeerds@55d45f48.access.ecotel.net) |
2022-06-26 00:42:16 +0200 | jgeerds | (~jgeerds@55d45f48.access.ecotel.net) (Remote host closed the connection) |
2022-06-26 00:42:19 +0200 | ski | was just about to say |
2022-06-26 00:42:28 +0200 | <EvanR> | rather, it has the function type |
2022-06-26 00:42:38 +0200 | <EvanR> | so you can't tell if it's "not really" |
2022-06-26 00:44:28 +0200 | <BusConscious> | ski yeah applicative style can be very readable |
2022-06-26 00:44:36 +0200 | <dsal> | The principled people argue it's something quite different in particular ways that I don't care about. "you can just use `(,) 2` or `\x -> (x,2)`" -- which... I don't really find better. Similarly, if you look at `(2^)` vs. `(^) 2` -- it's much easier to read the latter incorrectly than the former. |
2022-06-26 00:44:42 +0200 | <BusConscious> | I use it more here https://github.com/MartinErhardt/kell/blob/master/WordExp.hs |
2022-06-26 00:45:04 +0200 | <ski> | parseToks = parseSepList <* (eof <|> op EOF) -- BusConscious, e.g. |
2022-06-26 00:45:28 +0200 | <BusConscious> | ski: Yupp I didn't know about <* until yesterday |
2022-06-26 00:45:32 +0200 | <ski> | BusConscious : also, you match on `(Word w)' in `case'-`of's, when it could be just `Word w' |
2022-06-26 00:46:15 +0200 | <BusConscious> | ski you're right as I said: too many brackets |
2022-06-26 00:46:20 +0200 | <ski> | BusConscious : and no need for `... >>= (\w -> ..w..)', just go `... >>= \w -> ..w..' (or `do w <- ...; ..w..') |
2022-06-26 00:47:58 +0200 | gurkenglas | (~gurkengla@dslb-002-203-144-112.002.203.pools.vodafone-ip.de) |
2022-06-26 00:48:03 +0200 | <ski> | parseAssignWord = (,) <$> parseXBDName <* char '=' <*> rest |
2022-06-26 00:49:03 +0200 | <Haskelytic> | fellas, i'm reading this blog post on parametricity https://www.well-typed.com/blog/2015/05/parametricity/ |
2022-06-26 00:49:12 +0200 | <Haskelytic> | the author mentions the notion of "closed type" |
2022-06-26 00:49:15 +0200 | <Haskelytic> | what does that mean? |
2022-06-26 00:49:15 +0200 | cyanide3dinner | (~cyanide4d@106.201.249.151) (Remote host closed the connection) |
2022-06-26 00:50:01 +0200 | <hpc> | closed types can't have stuff added to them after the fact |
2022-06-26 00:50:08 +0200 | <hpc> | Bool is a closed type |
2022-06-26 00:50:25 +0200 | <hpc> | something like java's Object is an open type, because you can extend it |
2022-06-26 00:50:27 +0200 | <ski> | `if nLs then newlineList else return ()' could be `when nLS newlineList' |
2022-06-26 00:50:56 +0200 | <Haskelytic> | hpc: what would be an example of an open type in Haskell? |
2022-06-26 00:51:34 +0200 | <BusConscious> | ski: ok that's interesting gotta bookmark "when" |
2022-06-26 00:51:35 +0200 | <hpc> | Functor f => (a -> b) -> f a -> f b |
2022-06-26 00:51:36 +0200 | Guest8247 | (~krjst@2604:a880:800:c1::16b:8001) (Quit: bye) |
2022-06-26 00:51:56 +0200 | krjst | (~krjst@2604:a880:800:c1::16b:8001) |
2022-06-26 00:52:18 +0200 | <hpc> | you can always write a new Functor instance, adding more stuff to that type |
2022-06-26 00:52:29 +0200 | quarkyalice | (~quarkyali@user/quarkyalice) (Quit: quarkyalice) |
2022-06-26 00:52:37 +0200 | <ski> | Haskelytic : what hpc mentioned is a different notion of "open" than what is referred to in the blag. in that context, "open" means that it has free variables. like `x + 1' is open, you can't compute it unless/until you give a specific value to `x' |
2022-06-26 00:53:05 +0200 | <hpc> | oh, heh |
2022-06-26 00:53:06 +0200 | merijn | (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 272 seconds) |
2022-06-26 00:53:07 +0200 | <ski> | (well, "open" vs. "closed" notion, really) |
2022-06-26 00:53:20 +0200 | <ski> | BusConscious : also `unless' |
2022-06-26 00:53:55 +0200 | <Haskelytic> | ski: but `x+1` is a term no? |
2022-06-26 00:54:04 +0200 | ski | might say `Dynamic' or `SomeException' are open (in the first sense) |
2022-06-26 00:54:17 +0200 | <ski> | Haskelytic : sure. (and ?) |
2022-06-26 00:54:37 +0200 | <ski> | (an open term) |
2022-06-26 00:55:01 +0200 | <Haskelytic> | I'm just a bit hung up on the terminology because I'm thinking open type and open term should be different, unless I'm misunderstanding something completely XD |
2022-06-26 00:55:09 +0200 | <Haskelytic> | Hmm but I get the idea |
2022-06-26 00:55:12 +0200 | <Haskelytic> | Thanks guys! |
2022-06-26 00:55:34 +0200 | <ski> | Haskelytic : it's the same notion of "open" in "open type" and "open term", just applied to types vs. terms |
2022-06-26 00:56:25 +0200 | <ski> | `Int -> [a] -> [a]' is an open type, since we haven't specified which type `a' is to be. otoh, `forall a. Int -> [a] -> [a]' is closed. it is the type of `take', e.g. |
2022-06-26 00:56:29 +0200 | <ski> | @type take |
2022-06-26 00:56:30 +0200 | <lambdabot> | Int -> [a] -> [a] |
2022-06-26 00:56:34 +0200 | <EvanR> | is an extensible variant an open type |
2022-06-26 00:57:18 +0200 | <ski> | however, Haskell commonly elides the `forall' part, making it implicit (iow, it implicitly inserts it for you, in some (not all) contexts) .. maybe this somewhat more difficult to get a clear hold of, initially |
2022-06-26 00:57:27 +0200 | <hpc> | would it be misleading to call an open term a closure? |
2022-06-26 00:57:49 +0200 | <ski> | well, the open term, together with its environment, i guess ? |
2022-06-26 00:58:21 +0200 | <hpc> | (that question was 90% pun) |
2022-06-26 00:58:44 +0200 | <ski> | (although, usually, "closure" is used for the implementation of the resulting value, when reducing such a term-in-environment .. more specifically when we can't GC away the environment, wrt the resulting value) |
2022-06-26 00:58:48 +0200 | <monochrom> | This is an open-and-shut case. :) |
2022-06-26 01:00:01 +0200 | <ski> | iirc this is where the term "closure" comes from, "closing the term (or its value), over its enclosing environment, making it self-contained" |
2022-06-26 01:00:04 +0200 | <Haskelytic> | Seems like I need more time to absorb all this lingo coming at me at mach speed :) |
2022-06-26 01:00:49 +0200 | <BusConscious> | ski: thanks for the feedback. The codebase in general and that file in particular is still kind of a mess as i rush towards turing completeness and more advanced control structures, but partially applying (,) and using when, unless, curry and uncurry are for sure tools to clean it up a bit |
2022-06-26 01:01:22 +0200 | <monochrom> | I think you don't need the word "closure" or its meaning until you wonder what's the magic that enables "\x -> x + y" to know which "y" it should use. |
2022-06-26 01:02:14 +0200 | <BusConscious> | Though it also ought to be said, that while applicative style is usually more readable, I also try to stay below 125 characters per line |
2022-06-26 01:02:33 +0200 | <monochrom> | Unless you are an advanced programmer or a compiler/interpreter writer, you don't really care other than "obviously lexical scoping". |
2022-06-26 01:03:05 +0200 | <monochrom> | (It is easier said than done. But how many people actually need to know how it's done?) |
2022-06-26 01:03:17 +0200 | lottaquestions | (~nick@2607:fa49:5041:a200:d970:339e:3d32:94d) (Quit: Konversation terminated!) |
2022-06-26 01:04:09 +0200 | <monochrom> | Therefore unpopular opinion: Experts throwing around the word "closure" just encourages either cargo-culting jargons or unnecessary distractions or both. |
2022-06-26 01:04:15 +0200 | <Haskelytic> | monochrom: I'm still in the "duh lexical scoping" camp |
2022-06-26 01:04:55 +0200 | <Haskelytic> | I've seen so many things called closures that sometimes I wonder if I'm insane or the author is ;) |
2022-06-26 01:05:01 +0200 | <monochrom> | As another example look at how many people say "isomorphic" without ever asking what it means. Most of them confess "I heard experts say it, therefore I say it." |
2022-06-26 01:05:45 +0200 | <Haskelytic> | Programming is sloppy business though so i can understand why most people might not be interested in precise definitions |
2022-06-26 01:05:55 +0200 | <Haskelytic> | I'm just trying to reduce my own sloppiness |
2022-06-26 01:06:16 +0200 | <monochrom> | "lexical scoping" is very precise. "closure" is an implementation detail. |
2022-06-26 01:06:39 +0200 | wroathe | (~wroathe@206-55-188-8.fttp.usinternet.com) |
2022-06-26 01:06:39 +0200 | wroathe | (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
2022-06-26 01:06:39 +0200 | wroathe | (~wroathe@user/wroathe) |
2022-06-26 01:06:53 +0200 | <EvanR> | unpopular opinion: programming doesn't have to be sloppy business |
2022-06-26 01:07:14 +0200 | <ski> | monochrom : sure. (as you know) closures (and free variables in general) are "just" an optimization over the substitution-model |
2022-06-26 01:07:26 +0200 | <ski> | BusConscious : usually i stay below 80 |
2022-06-26 01:07:30 +0200 | <monochrom> | "bijective" is very precise. "isomorphic" adds an extra condition, sure. But Ironically, everything is being sloppy about that extra condition. At which point actually "bijective" is more precise. |
2022-06-26 01:07:42 +0200 | <monochrom> | s/everything/everyone/ |
2022-06-26 01:08:41 +0200 | <Haskelytic> | EvanR: try saying that to the python programmers :) |
2022-06-26 01:08:44 +0200 | shiraeeshi | (~shiraeesh@46.34.206.55) (Ping timeout: 268 seconds) |
2022-06-26 01:08:58 +0200 | <ski> | yea, "closure" is an implementation-specific term. if you're not talking about implementation, it's probably better to say "function(al) value" or "first-class function" or "lambda abstraction" or "lexical/static scope", or something along those lines |
2022-06-26 01:09:03 +0200 | <EvanR> | bring it |
2022-06-26 01:09:32 +0200 | <EvanR> | come at me pythro |
2022-06-26 01:11:58 +0200 | kmein | (~weechat@user/kmein) (Ping timeout: 240 seconds) |
2022-06-26 01:12:41 +0200 | <BusConscious> | ski: how would you tidy up something like this? https://github.com/MartinErhardt/kell/blob/7d42d731fbe4df3cf3b38f8bbdd36dc9b2aa275f/TokParser.hs#L… |
2022-06-26 01:13:48 +0200 | <BusConscious> | when you have DataConstructor with a lot of different parameters and you want to create a new data structure from the old one that is equal in all of these parameters except one or some |
2022-06-26 01:14:06 +0200 | <BusConscious> | bc rn it feels super redundant to write something like this |
2022-06-26 01:17:07 +0200 | Haskelytic | (~Haskelyti@118.179.211.17) (Quit: Client closed) |
2022-06-26 01:18:00 +0200 | <EvanR> | you can factor out the common parts, or try your hand at extensible records |
2022-06-26 01:19:23 +0200 | kmein | (~weechat@user/kmein) |
2022-06-26 01:22:04 +0200 | <ski> | addAssign strstr cmd = cmd {assign = [strstr] ++ assign cmd} -- record update |
2022-06-26 01:24:22 +0200 | <BusConscious> | ski: aaaah that is really good to know thank you |
2022-06-26 01:24:41 +0200 | unit73e | (~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291) (Remote host closed the connection) |
2022-06-26 01:25:13 +0200 | Lord_of_Life | (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 256 seconds) |
2022-06-26 01:25:46 +0200 | elkcl | (~elkcl@broadband-37-110-156-162.ip.moscow.rt.ru) (Read error: Connection reset by peer) |
2022-06-26 01:25:50 +0200 | unit73e | (~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291) |
2022-06-26 01:26:40 +0200 | Lord_of_Life | (~Lord@user/lord-of-life/x-2819915) |
2022-06-26 01:27:21 +0200 | TonyStone | (~TonyStone@2603-7080-8607-c36a-514e-68a6-af12-10c9.res6.spectrum.com) (Ping timeout: 248 seconds) |
2022-06-26 01:27:36 +0200 | elkcl | (~elkcl@broadband-37-110-156-162.ip.moscow.rt.ru) |
2022-06-26 01:31:23 +0200 | <monochrom> | I think the python people don't mean to be sloppy, they just want to be flexible and extensible. |
2022-06-26 01:31:58 +0200 | BusConscious | (~martin@ip5f5bdf01.dynamic.kabel-deutschland.de) (Remote host closed the connection) |
2022-06-26 01:32:12 +0200 | Tuplanolla | (~Tuplanoll@91-159-69-97.elisa-laajakaista.fi) (Quit: Leaving.) |
2022-06-26 01:32:15 +0200 | Colere | (~colere@about/linux/staff/sauvin) |
2022-06-26 01:32:22 +0200 | <monochrom> | OTOH programming jokes are OK! :) |
2022-06-26 01:33:03 +0200 | <monochrom> | Haskell requires having attempted PhD and failed. >:) |
2022-06-26 01:33:36 +0200 | <geekosaur> | o.O |
2022-06-26 01:34:02 +0200 | <EvanR> | or is haskell just a side effect of that |
2022-06-26 01:34:11 +0200 | <monochrom> | I would think "refactoring" applies equally well to data type definitions. |
2022-06-26 01:35:25 +0200 | <monochrom> | You have "a function" and then later you desire "a 2nd function that's like the 1st with just one small change". You go "let me refactor the 1st function". |
2022-06-26 01:35:44 +0200 | <monochrom> | Why can't that also be s/function/type/ ? |
2022-06-26 01:36:59 +0200 | jao | (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Remote host closed the connection) |
2022-06-26 01:37:56 +0200 | yrlnry | (~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net) |
2022-06-26 01:39:42 +0200 | TonyStone | (~TonyStone@2603-7080-8607-c36a-09e4-c1eb-6da4-2a7c.res6.spectrum.com) |
2022-06-26 01:42:30 +0200 | yrlnry | (~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net) (Ping timeout: 272 seconds) |
2022-06-26 01:43:42 +0200 | mathr | (~claude@cpc98210-croy26-2-0-cust137.19-2.cable.virginm.net) (Quit: ->) |
2022-06-26 01:49:13 +0200 | motherfsck | (~motherfsc@user/motherfsck) (Ping timeout: 248 seconds) |
2022-06-26 02:01:35 +0200 | califax | (~califax@user/califx) (Remote host closed the connection) |
2022-06-26 02:01:48 +0200 | motherfsck | (~motherfsc@user/motherfsck) |
2022-06-26 02:03:09 +0200 | califax | (~califax@user/califx) |
2022-06-26 02:03:23 +0200 | alexhandy | (~trace@user/trace) |
2022-06-26 02:03:40 +0200 | jao | (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) |
2022-06-26 02:04:51 +0200 | waleee | (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 268 seconds) |
2022-06-26 02:06:17 +0200 | alexhandy2 | (~trace@user/trace) (Ping timeout: 248 seconds) |
2022-06-26 02:06:29 +0200 | Topsi | (~Topsi@dyndsl-095-033-020-051.ewe-ip-backbone.de) (Read error: Connection reset by peer) |
2022-06-26 02:12:08 +0200 | machinedgod | (~machinedg@66.244.246.252) (Ping timeout: 246 seconds) |
2022-06-26 02:14:54 +0200 | pleo | (~pleo@user/pleo) (Quit: quit) |
2022-06-26 02:22:45 +0200 | geekosaur | (~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b))) |
2022-06-26 02:22:45 +0200 | allbery_b | (~geekosaur@xmonad/geekosaur) |
2022-06-26 02:22:48 +0200 | allbery_b | geekosaur |
2022-06-26 02:40:37 +0200 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 268 seconds) |
2022-06-26 02:44:09 +0200 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) |
2022-06-26 02:48:42 +0200 | merijn | (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) |
2022-06-26 02:52:03 +0200 | zeenk | (~zeenk@2a02:2f04:a301:3d00:39df:1c4b:8a55:48d3) (Quit: Konversation terminated!) |
2022-06-26 02:52:57 +0200 | alp | (~alp@user/alp) (Ping timeout: 268 seconds) |
2022-06-26 02:55:12 +0200 | jmcarthur | (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
2022-06-26 02:55:28 +0200 | nate4 | (~nate@98.45.169.16) |
2022-06-26 03:00:21 +0200 | nate4 | (~nate@98.45.169.16) (Ping timeout: 268 seconds) |
2022-06-26 03:11:38 +0200 | <JensPetersen[m]> | Is there a tool that can rename a module? hls?? |
2022-06-26 03:23:02 +0200 | merijn | (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 255 seconds) |
2022-06-26 03:25:06 +0200 | ulvarrefr | (~user@188.124.56.153) (Ping timeout: 272 seconds) |
2022-06-26 03:33:26 +0200 | lainon | (~lainon@2601:7c0:c500:4d20:2ca2:483a:8f15:302d) |
2022-06-26 03:35:10 +0200 | lainon | (~lainon@2601:7c0:c500:4d20:2ca2:483a:8f15:302d) (Client Quit) |
2022-06-26 03:35:16 +0200 | <jackdk> | monochrom: because defining types in other languages is often a Big Ceremony, so it can feel like a different kind of thing |
2022-06-26 03:36:04 +0200 | lainon | (~lainon@2601:7c0:c500:4d20:2ca2:483a:8f15:302d) |
2022-06-26 03:39:49 +0200 | gurkenglas | (~gurkengla@dslb-002-203-144-112.002.203.pools.vodafone-ip.de) (Ping timeout: 268 seconds) |
2022-06-26 03:45:10 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:cd28:27b2:2677:8e87) (Remote host closed the connection) |
2022-06-26 03:52:08 +0200 | lainon | (~lainon@2601:7c0:c500:4d20:2ca2:483a:8f15:302d) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2022-06-26 03:53:13 +0200 | jmcarthur | (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
2022-06-26 03:56:50 +0200 | ski | . o O ( "To stand on high ceremony / First leap off hinge and bracket" -- Castle Master Rhyme ) |
2022-06-26 04:01:25 +0200 | chexum | (~quassel@gateway/tor-sasl/chexum) (Ping timeout: 268 seconds) |
2022-06-26 04:01:51 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:cc67:4409:a66e:32b4) |
2022-06-26 04:05:45 +0200 | chexum | (~quassel@gateway/tor-sasl/chexum) |
2022-06-26 04:13:35 +0200 | jao | (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 246 seconds) |
2022-06-26 04:18:40 +0200 | unit73e | (~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291) (Ping timeout: 268 seconds) |
2022-06-26 04:22:55 +0200 | pretty_dumm_guy | (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.5) |
2022-06-26 04:25:28 +0200 | chexum | (~quassel@gateway/tor-sasl/chexum) (Ping timeout: 268 seconds) |
2022-06-26 04:27:53 +0200 | chexum | (~quassel@gateway/tor-sasl/chexum) |
2022-06-26 04:44:56 +0200 | td_ | (~td@muedsl-82-207-238-209.citykom.de) (Ping timeout: 255 seconds) |
2022-06-26 04:45:47 +0200 | nate4 | (~nate@98.45.169.16) |
2022-06-26 04:46:52 +0200 | td_ | (~td@94.134.91.9) |
2022-06-26 04:52:35 +0200 | motherfsck | (~motherfsc@user/motherfsck) (Ping timeout: 268 seconds) |
2022-06-26 04:59:31 +0200 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer) |
2022-06-26 05:01:47 +0200 | yrlnry | (~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net) |
2022-06-26 05:05:35 +0200 | shapr | (~user@2600:4040:2d31:7100:a60f:9de4:efb4:6eb3) |
2022-06-26 05:06:46 +0200 | yrlnry | (~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net) (Ping timeout: 268 seconds) |
2022-06-26 05:07:56 +0200 | motherfsck | (~motherfsc@user/motherfsck) |
2022-06-26 05:19:14 +0200 | merijn | (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) |
2022-06-26 05:19:59 +0200 | Unicorn_Princess | (~Unicorn_P@93-103-228-248.dynamic.t-2.net) (Remote host closed the connection) |
2022-06-26 05:21:23 +0200 | motherfsck | (~motherfsc@user/motherfsck) (Ping timeout: 255 seconds) |
2022-06-26 05:22:32 +0200 | machinedgod | (~machinedg@66.244.246.252) |
2022-06-26 05:23:25 +0200 | nate4 | (~nate@98.45.169.16) (Ping timeout: 268 seconds) |
2022-06-26 05:24:25 +0200 | justsomeguy | (~justsomeg@user/justsomeguy) |
2022-06-26 05:30:01 +0200 | raym | (~raym@user/raym) (Ping timeout: 256 seconds) |
2022-06-26 05:30:16 +0200 | toluene | (~toluene@user/toulene) (Quit: Ping timeout (120 seconds)) |
2022-06-26 05:31:42 +0200 | toluene | (~toluene@user/toulene) |
2022-06-26 05:34:48 +0200 | motherfsck | (~motherfsc@user/motherfsck) |
2022-06-26 05:35:17 +0200 | raym | (~raym@user/raym) |
2022-06-26 05:35:36 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:cc67:4409:a66e:32b4) (Remote host closed the connection) |
2022-06-26 05:44:57 +0200 | raym | (~raym@user/raym) (Remote host closed the connection) |
2022-06-26 05:53:20 +0200 | merijn | (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 255 seconds) |
2022-06-26 05:57:32 +0200 | yauhsien | (~yauhsien@61-231-38-201.dynamic-ip.hinet.net) |
2022-06-26 06:00:40 +0200 | shiraeeshi | (~shiraeesh@109.166.58.140) |
2022-06-26 06:00:51 +0200 | yauhsien | (~yauhsien@61-231-38-201.dynamic-ip.hinet.net) (Read error: Connection reset by peer) |
2022-06-26 06:01:22 +0200 | Kaiepi | (~Kaiepi@156.34.47.253) |
2022-06-26 06:01:27 +0200 | yauhsien | (~yauhsien@61-231-38-201.dynamic-ip.hinet.net) |
2022-06-26 06:03:49 +0200 | nate4 | (~nate@98.45.169.16) |
2022-06-26 06:05:07 +0200 | raym | (~raym@user/raym) |
2022-06-26 06:08:23 +0200 | yauhsien | (~yauhsien@61-231-38-201.dynamic-ip.hinet.net) (Ping timeout: 246 seconds) |
2022-06-26 06:08:38 +0200 | xff0x | (~xff0x@2405:6580:b080:900:9d54:6002:d2f9:ffa6) (Ping timeout: 240 seconds) |
2022-06-26 06:10:36 +0200 | raym | (~raym@user/raym) (Remote host closed the connection) |
2022-06-26 06:13:10 +0200 | coot | (~coot@213.134.190.95) |
2022-06-26 06:14:24 +0200 | xff0x | (~xff0x@2405:6580:b080:900:a1f7:c498:d5bb:4b94) |
2022-06-26 06:14:33 +0200 | shriekingnoise | (~shrieking@201.212.175.181) (Quit: Quit) |
2022-06-26 06:16:26 +0200 | russruss | (~russruss@my.russellmcc.com) (Ping timeout: 246 seconds) |
2022-06-26 06:17:46 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:cc67:4409:a66e:32b4) |
2022-06-26 06:20:19 +0200 | russruss | (~russruss@my.russellmcc.com) |
2022-06-26 06:28:44 +0200 | jakalx | (~jakalx@base.jakalx.net) () |
2022-06-26 06:29:23 +0200 | jakalx | (~jakalx@base.jakalx.net) |
2022-06-26 06:29:24 +0200 | nate4 | (~nate@98.45.169.16) (Ping timeout: 272 seconds) |
2022-06-26 06:35:42 +0200 | raym | (~raym@user/raym) |
2022-06-26 06:40:04 +0200 | causal | (~user@50.35.83.177) (Quit: WeeChat 3.5) |
2022-06-26 06:51:02 +0200 | yauhsien | (~yauhsien@61-231-38-201.dynamic-ip.hinet.net) |
2022-06-26 06:57:09 +0200 | nate4 | (~nate@98.45.169.16) |
2022-06-26 06:57:15 +0200 | monochrom | (~trebla@216.138.220.146) (Quit: NO CARRIER) |
2022-06-26 06:57:59 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2022-06-26 06:58:36 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Client Quit) |
2022-06-26 07:04:26 +0200 | nate4 | (~nate@98.45.169.16) (Ping timeout: 255 seconds) |
2022-06-26 07:07:01 +0200 | yauhsien | (~yauhsien@61-231-38-201.dynamic-ip.hinet.net) (Ping timeout: 268 seconds) |
2022-06-26 07:10:15 +0200 | azimut | (~azimut@gateway/tor-sasl/azimut) |
2022-06-26 07:11:07 +0200 | iteratee | (~kyle@162.218.222.107) (Ping timeout: 240 seconds) |
2022-06-26 07:13:04 +0200 | monochrom | (trebla@216.138.220.146) |
2022-06-26 07:18:28 +0200 | nate4 | (~nate@98.45.169.16) |
2022-06-26 07:20:42 +0200 | shiraeeshi | (~shiraeesh@109.166.58.140) (Ping timeout: 272 seconds) |
2022-06-26 07:23:40 +0200 | nate4 | (~nate@98.45.169.16) (Ping timeout: 268 seconds) |
2022-06-26 07:24:30 +0200 | coot | (~coot@213.134.190.95) (Ping timeout: 272 seconds) |
2022-06-26 07:26:05 +0200 | Midjak | (~Midjak@82.66.147.146) |
2022-06-26 07:26:20 +0200 | wroathe | (~wroathe@user/wroathe) (Quit: leaving) |
2022-06-26 07:28:56 +0200 | machinedgod | (~machinedg@66.244.246.252) (Ping timeout: 272 seconds) |
2022-06-26 07:35:32 +0200 | leeb | (~leeb@KD106155002017.au-net.ne.jp) (Ping timeout: 246 seconds) |
2022-06-26 07:37:45 +0200 | leeb | (~leeb@KD106155001119.au-net.ne.jp) |
2022-06-26 07:39:02 +0200 | mikoto-chan | (~mikoto-ch@esm-84-240-99-143.netplaza.fi) (Ping timeout: 246 seconds) |
2022-06-26 07:39:10 +0200 | takuan | (~takuan@178-116-218-225.access.telenet.be) |
2022-06-26 07:47:06 +0200 | mon_aaraj | (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 268 seconds) |
2022-06-26 07:47:51 +0200 | mon_aaraj | (~MonAaraj@user/mon-aaraj/x-4416475) |
2022-06-26 07:49:42 +0200 | nate4 | (~nate@98.45.169.16) |
2022-06-26 07:49:45 +0200 | merijn | (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) |
2022-06-26 07:50:49 +0200 | notzmv | (~zmv@user/notzmv) (Ping timeout: 248 seconds) |
2022-06-26 07:55:38 +0200 | sm | is intrigued |
2022-06-26 07:56:53 +0200 | nate4 | (~nate@98.45.169.16) (Ping timeout: 246 seconds) |
2022-06-26 08:03:00 +0200 | frost | (~frost@user/frost) |
2022-06-26 08:05:24 +0200 | Kaiepi | (~Kaiepi@156.34.47.253) (Read error: Connection reset by peer) |
2022-06-26 08:06:00 +0200 | yauhsien | (~yauhsien@61-231-38-201.dynamic-ip.hinet.net) |
2022-06-26 08:09:13 +0200 | Kaiepi | (~Kaiepi@156.34.47.253) |
2022-06-26 08:12:37 +0200 | toluene | (~toluene@user/toulene) (Quit: Ping timeout (120 seconds)) |
2022-06-26 08:14:06 +0200 | toluene | (~toluene@user/toulene) |
2022-06-26 08:21:23 +0200 | yauhsien | (~yauhsien@61-231-38-201.dynamic-ip.hinet.net) (Ping timeout: 255 seconds) |
2022-06-26 08:23:50 +0200 | merijn | (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 246 seconds) |
2022-06-26 08:29:52 +0200 | cdsmith63 | (~cdsmith@c-73-184-127-183.hsd1.ga.comcast.net) (Ping timeout: 252 seconds) |
2022-06-26 08:29:59 +0200 | gurkenglas | (~gurkengla@dslb-002-203-144-112.002.203.pools.vodafone-ip.de) |
2022-06-26 08:29:59 +0200 | nate4 | (~nate@98.45.169.16) |
2022-06-26 08:35:01 +0200 | <sm> | I'm a little confused by the latest discussion on https://github.com/haskellfoundation/tech-proposals/issues/35 . Isn't the change from String to AbstractFilePath a major breaking change ? Isn't it normal practice to signal that with a big version change ? Wouldn't avoiding that be strictly speaking a kludge to try to reduce upgrade work ? |
2022-06-26 08:35:10 +0200 | allbery_b | (~geekosaur@xmonad/geekosaur) |
2022-06-26 08:35:10 +0200 | geekosaur | (~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b))) |
2022-06-26 08:35:13 +0200 | allbery_b | geekosaur |
2022-06-26 08:36:05 +0200 | nate4 | (~nate@98.45.169.16) (Ping timeout: 246 seconds) |
2022-06-26 08:51:55 +0200 | nate4 | (~nate@98.45.169.16) |
2022-06-26 08:54:17 +0200 | <Maxdamantus> | sm: not particularly knowledgable about this, but which parts are you looking at in particular? afaics stages 1 and 2 should be non-breaking. |
2022-06-26 08:54:50 +0200 | <Maxdamantus> | since they're just about adding the alias and warning when the alias is not used. |
2022-06-26 08:55:22 +0200 | <Maxdamantus> | (presumably stage 3 would be a breaking change, but dunno if that's what you're referring to) |
2022-06-26 08:56:10 +0200 | <sm> | Maxdamantus: where are those stages... the Current State section ? |
2022-06-26 08:56:36 +0200 | <Maxdamantus> | This is what I read the other day: https://gitlab.haskell.org/ghc/ghc/-/wikis/proposal/abstract-file-path (linked from the GH issue) |
2022-06-26 08:56:56 +0200 | nate4 | (~nate@98.45.169.16) (Ping timeout: 255 seconds) |
2022-06-26 08:57:36 +0200 | Sgeo | (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
2022-06-26 08:58:19 +0200 | Sgeo | (~Sgeo@user/sgeo) |
2022-06-26 08:58:29 +0200 | <sm> | wow, this is old.. page history doesn't show all of it either |
2022-06-26 08:59:35 +0200 | Kaiepi | (~Kaiepi@156.34.47.253) (Read error: Connection reset by peer) |
2022-06-26 09:00:10 +0200 | <Maxdamantus> | Hm. Didn't notice the date. I did notice that (m)aerwald seemed to be talking about details that were not in that wiki page. |
2022-06-26 09:02:01 +0200 | <sm> | thanks for the link. Yes I'm talking about whenever the API actually changes in a visible way |
2022-06-26 09:02:26 +0200 | <Maxdamantus> | The good thing about the wiki page is that it's not necessarily incompatible with how I think things should work. |
2022-06-26 09:03:46 +0200 | <Maxdamantus> | since at the end of the process, `FilePath` could just become an alias for a proper Unicode 8-bit string type (ie, UTF-8 without a well-formedness restriction). |
2022-06-26 09:07:25 +0200 | coot | (~coot@213.134.190.95) |
2022-06-26 09:08:16 +0200 | <EvanR> | ..I'm not sure how a utf-8 string type helps filepath issues? |
2022-06-26 09:08:39 +0200 | <EvanR> | even on linux, filesystems may not be using utf8 |
2022-06-26 09:08:52 +0200 | <Maxdamantus> | Right, so it shouldn't have a well-formedness restriction. |
2022-06-26 09:08:58 +0200 | <Maxdamantus> | It should allow any Unicode 8-bit string. |
2022-06-26 09:08:59 +0200 | <Maxdamantus> | afk |
2022-06-26 09:09:06 +0200 | <Maxdamantus> | (ie, any bytestring) |
2022-06-26 09:09:08 +0200 | <EvanR> | what's a unicode 8-bit string |
2022-06-26 09:09:35 +0200 | <EvanR> | bytestring might work |
2022-06-26 09:11:38 +0200 | cocreature | (~moritz@2a03:b0c0:3:d0::c8:f001) (Quit: WeeChat 3.0.1) |
2022-06-26 09:11:54 +0200 | <dsal> | I worked on a filesystem abstraction that used ByteString because it was necessary in order to represent all possible file paths on the system. It's annoying, but people do annoying things and avoiding the representation doesn't make it easier. |
2022-06-26 09:12:02 +0200 | Kaiepi | (~Kaiepi@156.34.47.253) |
2022-06-26 09:15:26 +0200 | <maerwald[m]> | Maxdamantus: what happens with filepaths that are not unicode? |
2022-06-26 09:16:00 +0200 | <energizer> | presumably nothing special |
2022-06-26 09:16:10 +0200 | <energizer> | they're just bytestrings |
2022-06-26 09:16:30 +0200 | <maerwald[m]> | Maxdamantus: btw... PEP 383 isn't total when converting from [Char]. It can fail |
2022-06-26 09:16:53 +0200 | <maerwald[m]> | energizer: I mean when you convert them to [Char] |
2022-06-26 09:17:02 +0200 | <energizer> | why would you tho |
2022-06-26 09:19:21 +0200 | <maerwald[m]> | energizer: because that's a common representation. If you want to filter all files that have a specific printable unicode character, you need to do that |
2022-06-26 09:20:01 +0200 | <maerwald[m]> | When you enforce UTF-8, you get garbage |
2022-06-26 09:20:48 +0200 | yauhsien | (~yauhsien@61-231-38-201.dynamic-ip.hinet.net) |
2022-06-26 09:21:44 +0200 | <maerwald[m]> | sm: not a breaking change. It's additional API, will not even be a major version bump |
2022-06-26 09:22:36 +0200 | <energizer> | maerwald[m]: yeah that conversion is fallible |
2022-06-26 09:23:13 +0200 | <maerwald[m]> | energizer: decoding with PEP 383 is total. Encoding isn't |
2022-06-26 09:23:14 +0200 | <sm> | maerwald: won't `FilePath` in haskell code have a different meaning at some point ? |
2022-06-26 09:23:23 +0200 | <maerwald[m]> | sm: probably not |
2022-06-26 09:23:28 +0200 | <sm> | I see.. thanks |
2022-06-26 09:23:44 +0200 | <maerwald[m]> | The new type will be OsPath |
2022-06-26 09:23:56 +0200 | <sm> | nice.. thanks for your work on it |
2022-06-26 09:25:16 +0200 | sm | proceeds to bikeshed "OsPath" |
2022-06-26 09:25:42 +0200 | <maerwald[m]> | energizer: we would need a Char type in Haskell that represents only Unicode scalars (without surrogates), but we don't have one |
2022-06-26 09:25:56 +0200 | <Maxdamantus> | maerwald[m]: if there's the "proper Unicode 8-bit string type" that I'm talking about (equivalent to `ByteString`, but more stringy), you wouldn't need to convert to `[Char]`. |
2022-06-26 09:26:21 +0200 | <Maxdamantus> | maerwald[m]: if you do convert to `[Char]`, that's essentially a Unicode conversion, where errors will be replaced with replacement characters. |
2022-06-26 09:26:38 +0200 | <Maxdamantus> | ie, just like what happens when converting from UTF-8 to UTF-16. |
2022-06-26 09:27:18 +0200 | <maerwald[m]> | Maxdamantus: that makes no sense. What do you do with filepaths that are not UTF-8? |
2022-06-26 09:27:32 +0200 | <Maxdamantus> | the idea is that for correct handling of arbitrary strings, there should be an obvious type to use. That applies to reading text from files as well as text from filenames. |
2022-06-26 09:27:35 +0200 | Sgeo | (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
2022-06-26 09:27:35 +0200 | <maerwald[m]> | You have to decode them first, then encode again |
2022-06-26 09:27:56 +0200 | <maerwald[m]> | That means you have to convert to [Char] |
2022-06-26 09:28:05 +0200 | <maerwald[m]> | And now you get garbage |
2022-06-26 09:29:26 +0200 | <Maxdamantus> | maerwald[m]: you should be able to do things like write them to standard out, or concatenate them to get bigger strings. Neither of those operations involve any conversion, so they shouldn't corrupt any data. |
2022-06-26 09:29:57 +0200 | <maerwald[m]> | Maxdamantus: you are corrupting data, you're just doing it in a lossless way |
2022-06-26 09:30:19 +0200 | <Maxdamantus> | maerwald[m]: no. If you're preserving the input bytes as output bytes, there's no data corruption. |
2022-06-26 09:30:32 +0200 | <maerwald[m]> | Anyone trying to interpret printable unicode chars gets garbage |
2022-06-26 09:30:41 +0200 | <maerwald[m]> | Yes that is corruption |
2022-06-26 09:30:52 +0200 | <Maxdamantus> | maerwald[m]: data corruption is when you have to replace bits of the input with replacement characters, which you only need to do when interacting with other encoding forms. |
2022-06-26 09:30:57 +0200 | <Maxdamantus> | eg, UTF-16 or [Char] |
2022-06-26 09:31:01 +0200 | <Maxdamantus> | $ echo $'\xff'foobar | grep -a a | xxd |
2022-06-26 09:31:02 +0200 | <Maxdamantus> | 00000000: ff66 6f6f 6261 720a .foobar. |
2022-06-26 09:31:30 +0200 | <maerwald[m]> | Maxdamantus: i consider this corruption, because I may get wrong results |
2022-06-26 09:31:35 +0200 | <Maxdamantus> | `grep` is a text-based command, but there's no reason for it to convert to UTF-16, so as demonstrated in that command, there's no need to corrupt the input data. |
2022-06-26 09:31:46 +0200 | <Maxdamantus> | how is it corruption if it didn't modify the input? |
2022-06-26 09:31:58 +0200 | <Maxdamantus> | corruption necessarily involves modifying something. |
2022-06-26 09:32:03 +0200 | <maerwald[m]> | Because you lost encoding information |
2022-06-26 09:32:39 +0200 | <Maxdamantus> | What encoding information was lost? |
2022-06-26 09:32:46 +0200 | <Maxdamantus> | There is no encoding information in the input. |
2022-06-26 09:32:53 +0200 | <maerwald[m]> | The original encoding |
2022-06-26 09:33:00 +0200 | <Maxdamantus> | and there's no encoding information in the output. Nothing was lost or corrupted. |
2022-06-26 09:33:03 +0200 | <maerwald[m]> | Of course there is |
2022-06-26 09:33:15 +0200 | <Maxdamantus> | The ill-formed Unicode sequence <FF> was preserved. |
2022-06-26 09:33:53 +0200 | <Maxdamantus> | If the operation had to convert to UTF-16 for some reason, it would likely have been replaced with U+FFFD, which would be a form of corruption (information loss). |
2022-06-26 09:34:11 +0200 | yauhsien | (~yauhsien@61-231-38-201.dynamic-ip.hinet.net) (Ping timeout: 246 seconds) |
2022-06-26 09:34:20 +0200 | <maerwald[m]> | If your filepath is CP932 and you convert it to escaped UTF-8 and then convert that to [Char], you lost the original encoding and get garbage |
2022-06-26 09:34:55 +0200 | <Maxdamantus> | Sure, but you should be able to do a lot of things without converting. |
2022-06-26 09:35:01 +0200 | <Maxdamantus> | That's how Unicode has been designed. |
2022-06-26 09:35:36 +0200 | <maerwald[m]> | Maxdamantus: yes, exactly. You should be able to do a lot of things without touching the encoding at all. That's what the propossl does |
2022-06-26 09:35:42 +0200 | <Maxdamantus> | and as I said the other day, that's how ICU works, and it's how other systems endorsed by the Unicode consortium work. |
2022-06-26 09:36:07 +0200 | <maerwald[m]> | Maxdamantus: UTF-8 escaping is not endorsed by the consortium |
2022-06-26 09:36:13 +0200 | <Maxdamantus> | maerwald[m]: right, which is why I said: |
2022-06-26 09:36:14 +0200 | <Maxdamantus> | 19:02:25 < Maxdamantus> The good thing about the wiki page is that it's not necessarily incompatible with how I think things should work. |
2022-06-26 09:36:17 +0200 | <Maxdamantus> | 19:03:46 < Maxdamantus> since at the end of the process, `FilePath` could just become an alias for a proper Unicode 8-bit string type (ie, UTF-8 without a well-formedness restriction). |
2022-06-26 09:36:24 +0200 | <maerwald[m]> | https://unicode.org/L2/L2009/09236-pep383-problems.html |
2022-06-26 09:36:56 +0200 | Midjak | (~Midjak@82.66.147.146) (Read error: Connection reset by peer) |
2022-06-26 09:37:33 +0200 | Midjak | (~Midjak@82.66.147.146) |
2022-06-26 09:38:03 +0200 | <Maxdamantus> | imo PEP-383 is a workaround to a bad Unicode implementation. |
2022-06-26 09:38:11 +0200 | <Maxdamantus> | It was devised after Python 3 was released. |
2022-06-26 09:38:13 +0200 | eod|fserucas_ | (~eod|fseru@193.65.114.89.rev.vodafone.pt) (Ping timeout: 256 seconds) |
2022-06-26 09:38:13 +0200 | eod|fserucas | (~eod|fseru@193.65.114.89.rev.vodafone.pt) (Ping timeout: 256 seconds) |
2022-06-26 09:38:23 +0200 | <Maxdamantus> | So I agree that there are problems with PEP-383. |
2022-06-26 09:38:26 +0200 | <maerwald[m]> | Maxdamantus: you were just suggesting to use it |
2022-06-26 09:38:39 +0200 | <Maxdamantus> | Where? |
2022-06-26 09:39:26 +0200 | <Maxdamantus> | I remember you mentioned the other day that it could be used to support round-tripping with `type FilePath = String`. |
2022-06-26 09:39:41 +0200 | <Maxdamantus> | I don't really like that though. |
2022-06-26 09:39:42 +0200 | <maerwald[m]> | That's the only way to convert arbitrary ByteStrings to UTF-8 without well formedness check |
2022-06-26 09:40:02 +0200 | <Maxdamantus> | My proposal is to not convert. |
2022-06-26 09:40:15 +0200 | <Maxdamantus> | There is no way to convert arbitrary `ByteString`s to well-formed UTF-8. |
2022-06-26 09:40:25 +0200 | <maerwald[m]> | Exactly |
2022-06-26 09:40:28 +0200 | <Maxdamantus> | (at least, not idempotently) |
2022-06-26 09:40:46 +0200 | <Maxdamantus> | Right, so the Unicode string type should just handle arbitrary bytestrings. |
2022-06-26 09:40:54 +0200 | <maerwald[m]> | So why would you call a bytestring UTF-8 then |
2022-06-26 09:42:06 +0200 | <Maxdamantus> | You can call it an 8-bit Unicode string if you want to be more explicit that there's no well-formedness constraint. I can't remember the exact terminology I've always used, but afaik "UTF-8 string" in Unicode basically means the same thing as "8-bit Unicode string", which doesn't imply well-formedness. |
2022-06-26 09:42:22 +0200 | <Maxdamantus> | "8-bit Unicode string" is equivalent to "bytestring". |
2022-06-26 09:42:51 +0200 | <maerwald[m]> | Uhm, no? |
2022-06-26 09:43:25 +0200 | jafarlihi | (~user@188.253.235.27) |
2022-06-26 09:43:30 +0200 | jafarlihi | l33th4x0r |
2022-06-26 09:43:52 +0200 | <Maxdamantus> | https://unicode.org/glossary/#U |
2022-06-26 09:43:54 +0200 | l33th4x0r | l337h4x0r |
2022-06-26 09:43:54 +0200 | <Maxdamantus> | > Unicode String. A code unit sequence containing code units of a particular Unicode encoding form (whether well-formed or not). (See definition D80 in Section 3.9, Unicode Encoding Forms.) |
2022-06-26 09:43:56 +0200 | <lambdabot> | <hint>:1:60: error: parse error on input ‘of’ |
2022-06-26 09:44:23 +0200 | <maerwald[m]> | UTF-8 doesn't denote arbitrary bytestrings |
2022-06-26 09:44:56 +0200 | <maerwald[m]> | The only way to handle arbitrary bytestrings is: 1. Not touch the bytestring at all and 2. Allow to specify the encoding when converting |
2022-06-26 09:45:04 +0200 | <maerwald[m]> | That's what the new API does |
2022-06-26 09:46:19 +0200 | <Maxdamantus> | https://www.unicode.org/versions/Unicode14.0.0/ch03.pdf |
2022-06-26 09:46:29 +0200 | <Maxdamantus> | > Unicode 8-bit string: A Unicode string containing only UTF-8 code units. |
2022-06-26 09:46:30 +0200 | <lambdabot> | <hint>:1:73: error: |
2022-06-26 09:46:30 +0200 | <lambdabot> | parse error (possibly incorrect indentation or mismatched brackets) |
2022-06-26 09:47:00 +0200 | Tuplanolla | (~Tuplanoll@91-159-69-97.elisa-laajakaista.fi) |
2022-06-26 09:47:06 +0200 | zeenk | (~zeenk@2a02:2f04:a301:3d00:39df:1c4b:8a55:48d3) |
2022-06-26 09:47:37 +0200 | <Maxdamantus> | > D78 Code unit sequence: An ordered sequence of one or more code units. |
2022-06-26 09:47:39 +0200 | <lambdabot> | <hint>:1:45: error: parse error on input ‘of’ |
2022-06-26 09:47:48 +0200 | <Maxdamantus> | > When the code unit is an 8-bit unit, a code unit sequence may also be referred to as a byte sequence. |
2022-06-26 09:47:50 +0200 | <lambdabot> | <hint>:1:36: error: parse error on input ‘,’ |
2022-06-26 09:48:06 +0200 | <Maxdamantus> | Should probably have used a different character for line quotes. |
2022-06-26 09:48:24 +0200 | <maerwald[m]> | Maxdamantus: that still follows the UTF-8 Bit distribution, which doesn't express arbitrary distribution |
2022-06-26 09:49:02 +0200 | <Maxdamantus> | maerwald[m]: that's not true. Feel free to read the Unicode chapter. |
2022-06-26 09:49:11 +0200 | <maerwald[m]> | I did |
2022-06-26 09:49:13 +0200 | <Maxdamantus> | maerwald[m]: it discusses ill-formed Unicode strings. |
2022-06-26 09:49:35 +0200 | <Maxdamantus> | maerwald[m]: it even gives examples of what it calls "UTF-8 code unit sequences" that are ill-formed. |
2022-06-26 09:49:58 +0200 | <maerwald[m]> | Well, what's the point to call it UTF-8 when it's arbitrary bytestrings then? |
2022-06-26 09:51:24 +0200 | <Maxdamantus> | maerwald[m]: why call it "text" if it can represent things that are not text, like "����"? |
2022-06-26 09:52:09 +0200 | <maerwald[m]> | I think this is not helpful |
2022-06-26 09:52:29 +0200 | <Maxdamantus> | Sure, it's not particularly relevant anyway. |
2022-06-26 09:53:00 +0200 | <Maxdamantus> | This is simply how the Unicode standard describes things. |
2022-06-26 09:53:38 +0200 | <Maxdamantus> | as I said, you can say "Unicode 8-bit string" to be explicit, which seems to be used in the standard. |
2022-06-26 09:54:48 +0200 | Guest18 | (~Guest18@cpc69054-oxfd25-2-0-cust844.4-3.cable.virginm.net) |
2022-06-26 09:55:26 +0200 | Guest18 | (~Guest18@cpc69054-oxfd25-2-0-cust844.4-3.cable.virginm.net) (Client Quit) |
2022-06-26 09:59:06 +0200 | notzmv | (~zmv@user/notzmv) |
2022-06-26 09:59:41 +0200 | dcoutts | (~duncan@host86-150-18-54.range86-150.btcentralplus.com) (Ping timeout: 268 seconds) |
2022-06-26 10:05:17 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:cc67:4409:a66e:32b4) (Remote host closed the connection) |
2022-06-26 10:05:36 +0200 | gmg | (~user@user/gehmehgeh) |
2022-06-26 10:09:10 +0200 | phma | (~phma@host-67-44-208-150.hnremote.net) (Read error: Connection reset by peer) |
2022-06-26 10:11:05 +0200 | phma | (phma@2001:5b0:210b:f1b8:dfb9:4399:11c9:1734) |
2022-06-26 10:20:27 +0200 | merijn | (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) |
2022-06-26 10:24:11 +0200 | img | (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in) |
2022-06-26 10:24:27 +0200 | img | (~img@user/img) |
2022-06-26 10:28:30 +0200 | alp | (~alp@user/alp) |
2022-06-26 10:29:38 +0200 | l337h4x0r | (~user@188.253.235.27) (Ping timeout: 255 seconds) |
2022-06-26 10:33:06 +0200 | MajorBiscuit | (~MajorBisc@2a02-a461-129d-1-193d-75d8-745d-e91e.fixed6.kpn.net) |
2022-06-26 10:33:08 +0200 | yauhsien | (~yauhsien@61-231-38-201.dynamic-ip.hinet.net) |
2022-06-26 10:33:28 +0200 | l337h4x0r | (~user@188.253.235.27) |
2022-06-26 10:36:07 +0200 | l337h4x0r | (~user@188.253.235.27) (Client Quit) |
2022-06-26 10:42:01 +0200 | yrlnry | (~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net) |
2022-06-26 10:42:32 +0200 | tzh | (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz) |
2022-06-26 10:44:41 +0200 | alp | (~alp@user/alp) (Ping timeout: 248 seconds) |
2022-06-26 10:45:29 +0200 | leib | (~leib@2405:201:900a:f088:496d:d4b9:714:29f5) |
2022-06-26 10:46:44 +0200 | yrlnry | (~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net) (Ping timeout: 255 seconds) |
2022-06-26 10:47:47 +0200 | yauhsien | (~yauhsien@61-231-38-201.dynamic-ip.hinet.net) (Ping timeout: 268 seconds) |
2022-06-26 10:55:24 +0200 | merijn | (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 272 seconds) |
2022-06-26 11:00:20 +0200 | Zach[m] | (~zoglesby@user/zoglesby) (Quit: You have been kicked for being idle) |
2022-06-26 11:01:19 +0200 | coot | (~coot@213.134.190.95) (Quit: coot) |
2022-06-26 11:05:41 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:cc67:4409:a66e:32b4) |
2022-06-26 11:10:08 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:cc67:4409:a66e:32b4) (Ping timeout: 255 seconds) |
2022-06-26 11:11:55 +0200 | alp | (~alp@user/alp) |
2022-06-26 11:13:46 +0200 | MajorBiscuit | (~MajorBisc@2a02-a461-129d-1-193d-75d8-745d-e91e.fixed6.kpn.net) (Ping timeout: 272 seconds) |
2022-06-26 11:19:13 +0200 | dcoutts | (~duncan@185.201.60.17) |
2022-06-26 11:19:38 +0200 | nate4 | (~nate@98.45.169.16) |
2022-06-26 11:24:58 +0200 | leib | (~leib@2405:201:900a:f088:496d:d4b9:714:29f5) (Remote host closed the connection) |
2022-06-26 11:25:06 +0200 | shiraeeshi | (~shiraeesh@109.166.58.140) |
2022-06-26 11:25:18 +0200 | leib | (~leib@2405:201:900a:f088:496d:d4b9:714:29f5) |
2022-06-26 11:27:14 +0200 | nate4 | (~nate@98.45.169.16) (Ping timeout: 255 seconds) |
2022-06-26 11:28:08 +0200 | alp | (~alp@user/alp) (Ping timeout: 255 seconds) |
2022-06-26 11:36:38 +0200 | _ht | (~quassel@231-169-21-31.ftth.glasoperator.nl) |
2022-06-26 11:41:28 +0200 | dcoutts | (~duncan@185.201.60.17) (Remote host closed the connection) |
2022-06-26 11:44:32 +0200 | Batzy | (~quassel@user/batzy) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
2022-06-26 11:47:02 +0200 | Batzy | (~quassel@user/batzy) |
2022-06-26 11:49:17 +0200 | mon_aaraj | (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 246 seconds) |
2022-06-26 11:58:02 +0200 | leeb | (~leeb@KD106155001119.au-net.ne.jp) (Ping timeout: 246 seconds) |
2022-06-26 12:00:56 +0200 | mc47 | (~mc47@xmonad/TheMC47) |
2022-06-26 12:01:47 +0200 | mon_aaraj | (~MonAaraj@user/mon-aaraj/x-4416475) |
2022-06-26 12:06:47 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:c51d:2109:9c76:c05f) |
2022-06-26 12:09:29 +0200 | coot | (~coot@213.134.190.95) |
2022-06-26 12:10:01 +0200 | alp | (~alp@user/alp) |
2022-06-26 12:11:20 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:c51d:2109:9c76:c05f) (Ping timeout: 255 seconds) |
2022-06-26 12:11:24 +0200 | lisbeths | (uid135845@id-135845.lymington.irccloud.com) |
2022-06-26 12:19:04 +0200 | benin0 | (~benin@183.82.24.201) |
2022-06-26 12:19:20 +0200 | coot | (~coot@213.134.190.95) (Quit: coot) |
2022-06-26 12:19:52 +0200 | coot | (~coot@213.134.190.95) |
2022-06-26 12:26:55 +0200 | auri | (~auri@fsf/member/auri) () |
2022-06-26 12:27:17 +0200 | auri | (~auri@fsf/member/auri) |
2022-06-26 12:31:51 +0200 | auri_ | (~auri@fsf/member/auri) |
2022-06-26 12:34:26 +0200 | auri | (~auri@fsf/member/auri) (Ping timeout: 246 seconds) |
2022-06-26 12:38:10 +0200 | alp | (~alp@user/alp) (Ping timeout: 268 seconds) |
2022-06-26 12:43:52 +0200 | merijn | (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) |
2022-06-26 12:46:41 +0200 | kenaryn | (~aurele@cre71-h03-89-88-44-27.dsl.sta.abo.bbox.fr) |
2022-06-26 12:57:22 +0200 | MajorBiscuit | (~MajorBisc@2a02-a461-129d-1-193d-75d8-745d-e91e.fixed6.kpn.net) |
2022-06-26 12:57:49 +0200 | dcoutts | (~duncan@host86-187-167-237.range86-187.btcentralplus.com) |
2022-06-26 12:58:08 +0200 | mon_aaraj | (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 255 seconds) |
2022-06-26 12:59:20 +0200 | econo | (uid147250@user/econo) (Quit: Connection closed for inactivity) |
2022-06-26 13:00:07 +0200 | mon_aaraj | (~MonAaraj@user/mon-aaraj/x-4416475) |
2022-06-26 13:00:46 +0200 | joo-_ | (~joo-_@fsf/member/joo--) (Quit: leaving) |
2022-06-26 13:01:48 +0200 | joo-_ | (~joo-_@172-105-65-159.ip.linodeusercontent.com) |
2022-06-26 13:01:48 +0200 | joo-_ | (~joo-_@172-105-65-159.ip.linodeusercontent.com) (Changing host) |
2022-06-26 13:01:48 +0200 | joo-_ | (~joo-_@fsf/member/joo--) |
2022-06-26 13:08:40 +0200 | myme1 | (~myme@2a01:799:d5a:cd00:3de4:f2de:722d:a4ae) (Ping timeout: 248 seconds) |
2022-06-26 13:09:42 +0200 | myme1 | (~myme@2a01:799:d5a:cd00:af:3abd:b96f:39bf) |
2022-06-26 13:13:34 +0200 | coot | (~coot@213.134.190.95) (Quit: coot) |
2022-06-26 13:15:47 +0200 | mon_aaraj | (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 268 seconds) |
2022-06-26 13:17:27 +0200 | mon_aaraj | (~MonAaraj@user/mon-aaraj/x-4416475) |
2022-06-26 13:18:51 +0200 | <kenaryn> | Hello. I implemented an instance for a new data type following a Chris Allen's book exercice. It compiles and I understand not how to call it in the REPL; the compiler tells me the data constructor is not in scope. Can someone guide me please? https://paste.tomsmeding.com/SwliVMAg |
2022-06-26 13:19:06 +0200 | vbeatrice[m] | (~vbeatrice@2001:470:69fc:105::3ebf) |
2022-06-26 13:20:05 +0200 | <[Leary]> | That's the type constructor. Your data constructor is `Two`. |
2022-06-26 13:20:33 +0200 | <[Leary]> | Also, that Eq instance can be derived. |
2022-06-26 13:21:49 +0200 | <kenaryn> | The instance implementation itself is the exercice's purpose. |
2022-06-26 13:24:04 +0200 | <kenaryn> | Calling the data constructor (i.e. `Two 11 12 == Two 9 1`) produces the same error. |
2022-06-26 13:25:19 +0200 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection) |
2022-06-26 13:26:40 +0200 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) |
2022-06-26 13:26:42 +0200 | <shiraeeshi> | the command is ":l the-name-of-the-file.hs" |
2022-06-26 13:27:20 +0200 | <[Leary]> | Yes, that or import the module. |
2022-06-26 13:33:23 +0200 | <kenaryn> | Apologies, I loaded the wrong module. Thank you. |
2022-06-26 13:47:37 +0200 | merijn | (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 248 seconds) |
2022-06-26 13:47:53 +0200 | BusConscious | (~martin@ip5f5bdf01.dynamic.kabel-deutschland.de) |
2022-06-26 13:48:29 +0200 | <BusConscious> | hello everyone, yesterday I learned about record update syntax |
2022-06-26 13:48:49 +0200 | <BusConscious> | now I want to do something like: append f toAdd cmd = cmd { f = [toAdd] ++ f cmd} |
2022-06-26 13:49:14 +0200 | <BusConscious> | where f is the field of list type I want to append stuff to |
2022-06-26 13:49:28 +0200 | <BusConscious> | but it says "Not in scope: 'f'" |
2022-06-26 13:49:54 +0200 | <geekosaur> | sadly, f can't be a variable there |
2022-06-26 13:50:06 +0200 | <geekosaur> | this is the big wart in record update syntax |
2022-06-26 13:50:45 +0200 | <[Leary]> | Unfortunately, record fields aren't first class. Fortunately, this has lead to the invention of lenses. Unfortunately again, lenses can't be recommended to beginners. |
2022-06-26 13:53:51 +0200 | cdsmith57 | (~cdsmith@c-73-184-127-183.hsd1.ga.comcast.net) |
2022-06-26 13:58:05 +0200 | mon_aaraj | (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 246 seconds) |
2022-06-26 13:59:09 +0200 | <BusConscious> | I will look into that sooner or later though |
2022-06-26 13:59:14 +0200 | nate4 | (~nate@98.45.169.16) |
2022-06-26 13:59:15 +0200 | <BusConscious> | https://hackage.haskell.org/package/lens-tutorial-1.0.4/docs/Control-Lens-Tutorial.html |
2022-06-26 13:59:33 +0200 | <BusConscious> | Do lenses only work with template haskell? |
2022-06-26 14:00:01 +0200 | <[Leary]> | No, it's just convenient to eliminate boilerplate. |
2022-06-26 14:01:33 +0200 | frost | (~frost@user/frost) (Quit: Client closed) |
2022-06-26 14:01:43 +0200 | dschrempf | (~dominik@070-207.dynamic.dsl.fonira.net) |
2022-06-26 14:02:05 +0200 | frost | (~frost@user/frost) |
2022-06-26 14:04:30 +0200 | nate4 | (~nate@98.45.169.16) (Ping timeout: 268 seconds) |
2022-06-26 14:06:16 +0200 | merijn | (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) |
2022-06-26 14:07:33 +0200 | <maerwald[m]> | You can also use generics to derive them |
2022-06-26 14:13:34 +0200 | jafarlihi | (~user@188.253.235.27) |
2022-06-26 14:13:47 +0200 | jafarlihi | l337h4x0r |
2022-06-26 14:16:22 +0200 | frost | (~frost@user/frost) (Ping timeout: 252 seconds) |
2022-06-26 14:18:40 +0200 | dschrempf | (~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.5) |
2022-06-26 14:22:30 +0200 | cyanide3dinner | (~cyanide4d@106.201.249.151) |
2022-06-26 14:26:09 +0200 | <BusConscious> | I heeded to some advice ski gave me https://github.com/MartinErhardt/kell/commit/11ba0e73baa6cbed12c5a98fd5af9bb45e72c47c |
2022-06-26 14:28:17 +0200 | xkuru | (~xkuru@user/xkuru) |
2022-06-26 14:28:22 +0200 | l337h4x0r | (~user@188.253.235.27) (Read error: Connection reset by peer) |
2022-06-26 14:29:34 +0200 | <BusConscious> | In addition I also mapped over (-> TokParser String) in lines 108 and 84 and did applicative Syntax in line 139 over (-> TokParser [(a,Token)]) |
2022-06-26 14:30:38 +0200 | <BusConscious> | not sure if this makes the code more readable though when compared to the original lambda solution I retained in line 94 |
2022-06-26 14:30:41 +0200 | yrlnry | (~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net) |
2022-06-26 14:33:31 +0200 | jafarlihi | (~user@188.253.229.248) |
2022-06-26 14:37:58 +0200 | <BusConscious> | derp mapping over (-> TokParser String) is just concatenation lol |
2022-06-26 14:46:00 +0200 | lainon | (~lainon@2601:7c0:c500:4d20:2ca2:483a:8f15:302d) |
2022-06-26 14:46:48 +0200 | <[Leary]> | BusConscious: I see several cases of `if a then Just b else Nothing` or equivalent. For that you can write `guard a $> b` instead. |
2022-06-26 14:47:32 +0200 | shriekingnoise | (~shrieking@201.212.175.181) |
2022-06-26 14:47:55 +0200 | jao | (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) |
2022-06-26 14:55:02 +0200 | rekahsoft | (~rekahsoft@bras-base-wdston4533w-grc-02-142-113-160-8.dsl.bell.ca) |
2022-06-26 14:55:21 +0200 | rekahsoft | (~rekahsoft@bras-base-wdston4533w-grc-02-142-113-160-8.dsl.bell.ca) (Remote host closed the connection) |
2022-06-26 14:55:55 +0200 | rekahsoft | (~rekahsoft@bras-base-wdston4533w-grc-02-142-113-160-8.dsl.bell.ca) |
2022-06-26 14:58:04 +0200 | mon_aaraj | (~MonAaraj@user/mon-aaraj/x-4416475) |
2022-06-26 15:00:35 +0200 | <BusConscious> | [Leary]: So what guard does it creates either failed empty monad if the predicate is false or an empty monad then we use $> to map a constant function that evaluates to b over that monad. |
2022-06-26 15:00:59 +0200 | <BusConscious> | and we can only do that if the monad is not empty. And in the maybe monad Nothing is the empty monad |
2022-06-26 15:01:25 +0200 | <BusConscious> | is this the correct explanation of what's going on there? |
2022-06-26 15:02:25 +0200 | <BusConscious> | correction: it creates either failed empty monad if the predicate is false or a monad with value () |
2022-06-26 15:03:25 +0200 | <[Leary]> | It sounds like you understand. |
2022-06-26 15:03:35 +0200 | <geekosaur> | although in all cases it's "monadic value" |
2022-06-26 15:05:04 +0200 | <[Leary]> | Yeah, the terminology is a bit off. I'd also note that the value isn't even necessarily monadic; it only needs Alternative. |
2022-06-26 15:07:17 +0200 | jafarlihi | (~user@188.253.229.248) (Quit: WeeChat 3.5) |
2022-06-26 15:14:29 +0200 | rekahsoft | (~rekahsoft@bras-base-wdston4533w-grc-02-142-113-160-8.dsl.bell.ca) (Ping timeout: 255 seconds) |
2022-06-26 15:14:36 +0200 | unit73e | (~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291) |
2022-06-26 15:18:52 +0200 | rekahsoft | (~rekahsoft@bras-base-wdston4533w-grc-02-142-113-160-8.dsl.bell.ca) |
2022-06-26 15:21:09 +0200 | lisbeths | (uid135845@id-135845.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
2022-06-26 15:21:22 +0200 | pavonia | (~user@user/siracusa) (Quit: Bye!) |
2022-06-26 15:28:22 +0200 | lisbeths | (uid135845@id-135845.lymington.irccloud.com) |
2022-06-26 15:29:00 +0200 | dcoutts | (~duncan@host86-187-167-237.range86-187.btcentralplus.com) (Ping timeout: 272 seconds) |
2022-06-26 15:34:51 +0200 | pleo | (~pleo@user/pleo) |
2022-06-26 15:42:08 +0200 | phma | (phma@2001:5b0:210b:f1b8:dfb9:4399:11c9:1734) (Read error: Connection reset by peer) |
2022-06-26 15:43:08 +0200 | phma | (~phma@2001:5b0:210d:23f8:ec0e:65c8:65bb:d30) |
2022-06-26 15:49:48 +0200 | machinedgod | (~machinedg@66.244.246.252) |
2022-06-26 15:55:07 +0200 | rodental | (~rodental@38.146.5.222) |
2022-06-26 15:56:06 +0200 | jespada | (~jespada@cpc121022-nmal24-2-0-cust171.19-2.cable.virginm.net) |
2022-06-26 16:16:19 +0200 | shapr | (~user@2600:4040:2d31:7100:a60f:9de4:efb4:6eb3) (Remote host closed the connection) |
2022-06-26 16:22:38 +0200 | cheater | (~Username@user/cheater) (Ping timeout: 268 seconds) |
2022-06-26 16:22:39 +0200 | cheater1__ | (~Username@user/cheater) |
2022-06-26 16:22:43 +0200 | cheater1__ | cheater |
2022-06-26 16:25:37 +0200 | cyanide3dinner | (~cyanide4d@106.201.249.151) (Remote host closed the connection) |
2022-06-26 16:27:20 +0200 | even4void | (even4void@came.here.for-some.fun) (Quit: fBNC - https://bnc4free.com) |
2022-06-26 16:27:23 +0200 | xacktm | (xacktm@user/xacktm) (Quit: fBNC - https://bnc4free.com) |
2022-06-26 16:27:24 +0200 | andreas303 | (andreas303@ip227.orange.bnc4free.com) (Quit: fBNC - https://bnc4free.com) |
2022-06-26 16:27:47 +0200 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) |
2022-06-26 16:30:42 +0200 | <unit73e> | do you guys use stack or cabal more? |
2022-06-26 16:31:08 +0200 | <[exa]> | cabal |
2022-06-26 16:31:28 +0200 | <geekosaur> | it's about 50-50 in here, and reportedly skewed more toward stack in other venues |
2022-06-26 16:31:52 +0200 | <unit73e> | I use cabal more but only because stack apparently didn't like having multiple executables or at least I didn't figure out how |
2022-06-26 16:32:01 +0200 | <unit73e> | and I needed that |
2022-06-26 16:32:08 +0200 | <geekosaur> | I personally never use stack |
2022-06-26 16:32:20 +0200 | <unit73e> | I don't see much of an advantage tbh |
2022-06-26 16:32:20 +0200 | merijn | (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 255 seconds) |
2022-06-26 16:32:25 +0200 | <unit73e> | It's sort of a "maven" |
2022-06-26 16:32:43 +0200 | <unit73e> | but if anyone can convince me otherwise |
2022-06-26 16:33:07 +0200 | mima | (~mmh@aftr-62-216-210-207.dynamic.mnet-online.de) (Ping timeout: 268 seconds) |
2022-06-26 16:33:18 +0200 | <geekosaur> | especially with the 3.8 prerelease which adds among other things better support for stackage resolvers, the two do pretty much the same things in somewhat different ways |
2022-06-26 16:33:43 +0200 | mima | (~mmh@aftr-62-216-210-153.dynamic.mnet-online.de) |
2022-06-26 16:35:03 +0200 | <[Leary]> | I used it for a while, back when its original selling point of "cabal is broken" still held water. Now it's like, a philosophical difference. |
2022-06-26 16:35:11 +0200 | <unit73e> | so it seems yes. stack seems reduntant to me and actually complicates a bit more because it has .cabal anyway |
2022-06-26 16:35:52 +0200 | <unit73e> | at least stack has shown what was the problem |
2022-06-26 16:36:19 +0200 | hgolden | (~hgolden2@cpe-172-251-233-141.socal.res.rr.com) |
2022-06-26 16:36:34 +0200 | <unit73e> | now cabal could have terminal colors, that annoys me |
2022-06-26 16:37:03 +0200 | <geekosaur> | I think stack still has more traction in industry, because it's easier to set up a local resolver than a local hackage |
2022-06-26 16:37:35 +0200 | <geekosaur> | and it's often important in those contexts to make sure everyone's on the same page re package versions |
2022-06-26 16:37:45 +0200 | <unit73e> | yes and the original premise makes sense in the industry because you want a fixed set of versions given a base version |
2022-06-26 16:38:09 +0200 | <[exa]> | unit73e: some super complicated projects have it as a requirement and it kinda makes sense there, esp. if you need very precise ghc versioning or so |
2022-06-26 16:38:38 +0200 | <cdsmith> | My advice is that stack is a reasonable choice if you only want to build your project with one set of dependencies. Its "advantage" now is that it makes it easy to build from a blessed set of dependencies, including GHC version and such. But if you're maintaining libraries that need to work across many GHC and dependency versions, stack just doesn't make any sense at all. |
2022-06-26 16:38:56 +0200 | <c_wraith> | yeah, stack is sort of hostile towards library authors |
2022-06-26 16:39:24 +0200 | <c_wraith> | at least it doesn't recommend publishing libraries with totally broken .cabal files anymore |
2022-06-26 16:39:33 +0200 | jmcarthur | (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
2022-06-26 16:40:09 +0200 | <unit73e> | right, that's my feeling too. the restrictions actually slow down progress. if everyone followed semantic versioning (or the equivalent) it wouldn't be a problem but here we are. |
2022-06-26 16:40:25 +0200 | <[exa]> | packaging is hard |
2022-06-26 16:40:28 +0200 | <unit73e> | yup |
2022-06-26 16:41:26 +0200 | <[exa]> | linear versions do not manage various multiple interwingled features very well |
2022-06-26 16:43:17 +0200 | cheater | (~Username@user/cheater) (Quit: Killed (rox (Requested by panasync))) |
2022-06-26 16:44:03 +0200 | cheater | (~Username@user/cheater) |
2022-06-26 16:49:53 +0200 | xacktm | (xacktm@user/xacktm) |
2022-06-26 16:52:11 +0200 | andreas303 | (andreas303@ip227.orange.bnc4free.com) |
2022-06-26 16:52:58 +0200 | jmcarthur | (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Read error: Connection reset by peer) |
2022-06-26 16:52:59 +0200 | jmcarthur_ | (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
2022-06-26 16:53:49 +0200 | jmcarthur_ | (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Client Quit) |
2022-06-26 16:56:35 +0200 | even4void | (even4void@came.here.for-some.fun) |
2022-06-26 16:58:02 +0200 | Unicorn_Princess | (~Unicorn_P@93-103-228-248.dynamic.t-2.net) |
2022-06-26 16:59:06 +0200 | merijn | (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) |
2022-06-26 17:03:56 +0200 | merijn | (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 246 seconds) |
2022-06-26 17:06:41 +0200 | adrazalan | (~adrazalan@42.191.189.65) |
2022-06-26 17:11:11 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:c51d:2109:9c76:c05f) |
2022-06-26 17:14:14 +0200 | jmcarthur | (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
2022-06-26 17:15:32 +0200 | shiraeeshi | (~shiraeesh@109.166.58.140) (Ping timeout: 255 seconds) |
2022-06-26 17:15:37 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:c51d:2109:9c76:c05f) (Ping timeout: 248 seconds) |
2022-06-26 17:21:22 +0200 | tzh | (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) |
2022-06-26 17:32:17 +0200 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:c51d:2109:9c76:c05f) |
2022-06-26 17:33:41 +0200 | justsomeguy | (~justsomeg@user/justsomeguy) (Ping timeout: 246 seconds) |
2022-06-26 17:36:10 +0200 | <SridharRatnakuma> | `type family F a b where F a b = undefined`. What's the simplest way to implement this such that `F "Foo" "Foo_Bar" == "bar"`? AFAICT, I could build it from scratch using `UnconsSymbol` - but that feels too low-level. |
2022-06-26 17:37:25 +0200 | jmcarthur | (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Quit: Textual IRC Client: www.textualapp.com) |
2022-06-26 17:39:05 +0200 | jmcarthur | (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
2022-06-26 17:40:58 +0200 | chexum | (~quassel@gateway/tor-sasl/chexum) (Ping timeout: 268 seconds) |
2022-06-26 17:41:09 +0200 | lisbeths | (uid135845@id-135845.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
2022-06-26 17:41:35 +0200 | chexum | (~quassel@gateway/tor-sasl/chexum) |
2022-06-26 17:42:15 +0200 | <SridharRatnakuma> | Real-world context, if anyone's wondering: https://github.com/srid/ema/pull/96 |
2022-06-26 17:44:35 +0200 | dcoutts | (~duncan@host86-150-18-54.range86-150.btcentralplus.com) |
2022-06-26 17:45:10 +0200 | TonyStone | (~TonyStone@2603-7080-8607-c36a-09e4-c1eb-6da4-2a7c.res6.spectrum.com) (Ping timeout: 272 seconds) |
2022-06-26 17:46:35 +0200 | <sm> | <..obligatory balancing advocacy for stack's strengths here..> |
2022-06-26 17:47:40 +0200 | <unit73e> | SridharRatnakuma, I don't get it |
2022-06-26 17:47:59 +0200 | <unit73e> | what's the objective? |
2022-06-26 17:50:54 +0200 | <dmj`> | SridharRatnakuma: probably defining families StripPrefix, Drop and then ToLower. |
2022-06-26 17:51:12 +0200 | jmcarthur | (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
2022-06-26 17:51:26 +0200 | pleo | (~pleo@user/pleo) (Ping timeout: 268 seconds) |
2022-06-26 17:52:36 +0200 | pleo | (~pleo@user/pleo) |
2022-06-26 17:56:40 +0200 | <dmj`> | > ord 'a' - ord 'A' |
2022-06-26 17:56:42 +0200 | <lambdabot> | 32 |
2022-06-26 17:57:12 +0200 | simeon | (~pi@dslb-088-071-128-104.088.071.pools.vodafone-ip.de) (Ping timeout: 272 seconds) |
2022-06-26 17:57:14 +0200 | <dmj`> | type family ToLower (c :: Char) :: Nat where ToLower c = NatToChar (CharToNat c + 32) |
2022-06-26 17:58:09 +0200 | causal | (~user@50.35.83.177) |
2022-06-26 17:58:16 +0200 | TonyStone | (~TonyStone@2603-7080-8607-c36a-09e4-c1eb-6da4-2a7c.res6.spectrum.com) |
2022-06-26 17:59:32 +0200 | <unit73e> | so he objective is to strip the prefix and lower case with a map from type to string? |
2022-06-26 18:00:20 +0200 | <dmj`> | unit73e: yea, could do convert to camel case from snake case, then strip prefix |
2022-06-26 18:00:35 +0200 | <dmj`> | and toLower |
2022-06-26 18:02:03 +0200 | justsomeguy | (~justsomeg@user/justsomeguy) |
2022-06-26 18:03:15 +0200 | nate4 | (~nate@98.45.169.16) |
2022-06-26 18:03:17 +0200 | simeon | (~pi@dslb-088-071-128-104.088.071.pools.vodafone-ip.de) |
2022-06-26 18:04:45 +0200 | jmcarthur | (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
2022-06-26 18:06:46 +0200 | <SridharRatnakuma> | Here's an opportunity to author a type-level `Symbol` processing library |
2022-06-26 18:08:52 +0200 | pwug | (~pwug@user/pwug) |
2022-06-26 18:11:59 +0200 | <dmj`> | SridharRatnakuma: hah, for real |
2022-06-26 18:12:07 +0200 | arjun | (~arjun@user/arjun) |
2022-06-26 18:12:29 +0200 | <dmj`> | SridharRatnakuma: alex-type-level |
2022-06-26 18:12:50 +0200 | <SridharRatnakuma> | Ah, `UnconsSymbol` is only available from 9.2.1. |
2022-06-26 18:14:09 +0200 | merijn | (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) |
2022-06-26 18:15:50 +0200 | nate4 | (~nate@98.45.169.16) (Ping timeout: 255 seconds) |
2022-06-26 18:16:40 +0200 | <kenaryn> | Please what are the numeric types that implement NOT the Num type class? |
2022-06-26 18:19:34 +0200 | <kenaryn> | Seems to me there are Scientific and Rational. |
2022-06-26 18:20:39 +0200 | <kenaryn> | Another questions: how the compiler perform a division without implementing a division method in Num type class? |
2022-06-26 18:25:03 +0200 | econo | (uid147250@user/econo) |
2022-06-26 18:26:03 +0200 | <ski> | @instances-importing Data.Ratio Num |
2022-06-26 18:26:05 +0200 | <lambdabot> | Double, Float, Int, Integer, Product a, Ratio a, Sum a, Word |
2022-06-26 18:26:14 +0200 | <ski> | @src Rational |
2022-06-26 18:26:14 +0200 | <lambdabot> | type Rational = Ratio Integer |
2022-06-26 18:26:28 +0200 | <ski> | also `Scientific' seems to be in `Num' |
2022-06-26 18:28:27 +0200 | <ski> | it's not clear what you mean by "numeric types". often that is taken to mean those types that are instances of `Num'. (although i'm sure, with alternative/redesigned numeric classes, one could possibly have some types that are instances of those, but not `Num' and friends. i guess one'd lose literal overloading with `fromInteger' and `fromRational', though) |
2022-06-26 18:29:14 +0200 | <kenaryn> | Thank you ski. I understand not all what you say but you're kind. |
2022-06-26 18:29:45 +0200 | machinedgod | (~machinedg@66.244.246.252) (Ping timeout: 256 seconds) |
2022-06-26 18:30:35 +0200 | <geekosaur> | as for division, there are two kinds of division: integer division and floating division. as such, `div` is in the Interal typeclass and (/) is in the Fractional typeclass |
2022-06-26 18:30:44 +0200 | <geekosaur> | both of which require Num |
2022-06-26 18:31:00 +0200 | <geekosaur> | *Integral |
2022-06-26 18:31:37 +0200 | jinsun__ | (~jinsun@user/jinsun) |
2022-06-26 18:31:37 +0200 | jinsun | (~jinsun@user/jinsun) (Killed (erbium.libera.chat (Nickname regained by services))) |
2022-06-26 18:31:37 +0200 | jinsun__ | jinsun |
2022-06-26 18:32:09 +0200 | jinsun | Guest1949 |
2022-06-26 18:32:09 +0200 | jinsun__ | (~jinsun@user/jinsun) |
2022-06-26 18:32:09 +0200 | Guest1949 | (~jinsun@user/jinsun) (Killed (zinc.libera.chat (Nickname regained by services))) |
2022-06-26 18:32:09 +0200 | jinsun__ | jinsun |
2022-06-26 18:32:46 +0200 | lewisje | (~lewisje@2001:470:1f11:14e:50c5:a481:bb91:9810) |
2022-06-26 18:33:08 +0200 | lewisje | (~lewisje@2001:470:1f11:14e:50c5:a481:bb91:9810) (Remote host closed the connection) |
2022-06-26 18:34:01 +0200 | <geekosaur> | and Rational is separate from both since it's a ratio; you use (%) with that |
2022-06-26 18:34:30 +0200 | <monochrom> | Ugh Rational is an instance of Fractional too. |
2022-06-26 18:34:35 +0200 | <monochrom> | > 3/4 :: Rational |
2022-06-26 18:34:37 +0200 | <lambdabot> | 3 % 4 |
2022-06-26 18:34:49 +0200 | <geekosaur> | right, but you still have % |
2022-06-26 18:35:11 +0200 | <monochrom> | It is the rationale behind edwardk using % for a different purpose in lens. "You already have / " |
2022-06-26 18:35:18 +0200 | <ski> | kenaryn : well, an implementation can provide type-specific operations (like e.g. division), without involving type classes like `Integral' (overloaded operation for integral division) or `Fractional' (overloaded operation for "exact" division (for lack of a better term) .. for floating-point types it isn't exact, but as near approximate to that as possible. it's still different from integral division, which |
2022-06-26 18:35:24 +0200 | <ski> | is specified in combination with remainder, a different thing) |
2022-06-26 18:35:54 +0200 | <geekosaur> | there are other instances of Num as well, if you import Data.Fixed for example |
2022-06-26 18:36:08 +0200 | <geekosaur> | @instances-importing Data.Fixed Num |
2022-06-26 18:36:10 +0200 | <lambdabot> | Double, Fixed a, Float, Int, Integer, Product a, Sum a, Word |
2022-06-26 18:36:44 +0200 | <geekosaur> | (the `a` in `Fixed a` indicates the fixed-point precision; a number of them come predefined, or you can roll your own) |
2022-06-26 18:37:06 +0200 | <geekosaur> | Deci, Cento, Milli, Micro, Nano, etc. |
2022-06-26 18:37:36 +0200 | <ski> | kenaryn : e.g. GHC (in `GHC.Float') defines `divideFloat :: Float -> Float -> Float' and `divideDouble :: Double -> Double -> Double' (in terms of primitive operations `divideFloat#' and `divideDouble#' for unboxed `Float#' and `Double#' types), and *then* makes `Float' and `Double' instances of `Fractional', by defining `(/)' for those types to call those previously defined operations |
2022-06-26 18:37:44 +0200 | <dmj`> | SridharRatnakuma: https://gist.github.com/9af59531f17150d23b6ecc870be6bc2c |
2022-06-26 18:37:55 +0200 | lewisje | (~lewisje@2001:470:1f11:14e:50c5:a481:bb91:9810) |
2022-06-26 18:43:06 +0200 | <ski> | (`divideFloat#' and `divideDouble#', as well as the types `Float#' and `Double#' is not defined in the library (`base') source for GHC, but rather is given a primitive implementation, that uses machine-supported floating-point formats and instructions. there are other types handled primitively, like `Char',`Int',`Integer',`Word',`(->)' (function types),`Array',`IO',`IORef',`IOArray',.. as well) |
2022-06-26 18:43:17 +0200 | merijn | (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 255 seconds) |
2022-06-26 18:43:33 +0200 | azimut | (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection) |
2022-06-26 18:43:58 +0200 | <ski> | (hm, is there an architecture that GHC supports, that doesn't provide machine-supported floating-point ops, so that one has to rely on a software-implementation of them ?) |
2022-06-26 18:44:19 +0200 | <ski> | (iirc, that is the case for GCC) |
2022-06-26 18:44:36 +0200 | <dolio> | Seems doubtful. |
2022-06-26 18:45:09 +0200 | <geekosaur> | I think ghc supports soft-float ARM still |
2022-06-26 18:45:10 +0200 | <ski> | i guess, `-fvia-C', maybe |
2022-06-26 18:45:17 +0200 | <geekosaur> | via-C is long gone |
2022-06-26 18:46:04 +0200 | <ski> | i haven't looked at it in a long while, but it looks like the man page still lists it |
2022-06-26 18:46:18 +0200 | <geekosaur> | unregisterised is still there but not in released versions |
2022-06-26 18:46:36 +0200 | <ski> | mhm |
2022-06-26 18:47:34 +0200 | <geekosaur> | ah, seems that's where unregisterised mode is hiding these days |
2022-06-26 18:47:55 +0200 | <geekosaur> | per the manual (I'm looking at 9.2.2 since 9.2.3 never had one uploaded) |
2022-06-26 18:48:11 +0200 | <ski> | link ? |
2022-06-26 18:48:29 +0200 | <geekosaur> | https://downloads.haskell.org/ghc/9.2.1/docs/html/users_guide/codegens.html?highlight=fvia%20c#c-c… |
2022-06-26 18:48:38 +0200 | <geekosaur> | oh, 9.2.1 even |
2022-06-26 18:48:50 +0200 | <geekosaur> | right, I was looking for the release notes last night |
2022-06-26 18:49:06 +0200 | <geekosaur> | mostly I have 8.10.7 up since that's what I still use locally |
2022-06-26 18:49:41 +0200 | <geekosaur> | while bgamari and I try to figure out how the heap gets smashed with xmonad under 9.x 😕 |
2022-06-26 18:55:22 +0200 | azimut | (~azimut@gateway/tor-sasl/azimut) |
2022-06-26 18:55:31 +0200 | <SridharRatnakuma> | <dmj`> "Sridhar Ratnakumar: https://gist..." <- Thanks 🙂 |
2022-06-26 18:55:31 +0200 | <SridharRatnakuma> | (Currently building the world because nixpkgs doesn't have 9.2 cached) |
2022-06-26 18:59:50 +0200 | pleo | (~pleo@user/pleo) (Ping timeout: 240 seconds) |
2022-06-26 19:00:14 +0200 | <monochrom> | Oh w00t soft float, haven't seen that for decades since Pentium :) |
2022-06-26 19:01:04 +0200 | <geekosaur> | and possibly not then since linux shipped with in-kernel fp emulation for a couple decades |
2022-06-26 19:01:15 +0200 | <monochrom> | Nice. |
2022-06-26 19:01:26 +0200 | <monochrom> | <3 abstractions |
2022-06-26 19:01:48 +0200 | <dmj`> | SridharRatnakuma: np |
2022-06-26 19:02:11 +0200 | <geekosaur> | someone probably still supports it as a loadable module probably, although iirc it was removed from the standard kernel some years back |
2022-06-26 19:02:29 +0200 | <geekosaur> | whoops, minus one of those "probably"s |
2022-06-26 19:03:30 +0200 | <geekosaur> | in particular I think debian still supports machines old enough to require either x87 or emulation thereof |
2022-06-26 19:03:42 +0200 | <monochrom> | It's OK, I know how to do join :: Prob (Prob a) -> Prob a :) |
2022-06-26 19:04:03 +0200 | <geekosaur> | wasn't that called Random? }😆 |
2022-06-26 19:04:18 +0200 | <geekosaur> | hm, fancy smiley mode mishandled that |
2022-06-26 19:04:41 +0200 | nate4 | (~nate@98.45.169.16) |
2022-06-26 19:10:37 +0200 | BusConscious | (~martin@ip5f5bdf01.dynamic.kabel-deutschland.de) (Remote host closed the connection) |
2022-06-26 19:10:37 +0200 | ski | . o O ( Commodore 64 has a somewhat weird (software-implemented) 5-bytes floating-point format, 8-bit exponent (incl. sign, excess-128), 32-bit mantissa (incl. sign, excl. leading `1' bit). <https://www.c64-wiki.com/wiki/Floating_point_arithmetic> ) |
2022-06-26 19:12:20 +0200 | pretty_dumm_guy | (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
2022-06-26 19:12:47 +0200 | <darkling> | So did the Spectrum. Looks very similar to that (I'd have to look up the exact layout) |
2022-06-26 19:14:28 +0200 | notzmv | (~zmv@user/notzmv) (Ping timeout: 272 seconds) |
2022-06-26 19:18:09 +0200 | jmcarthur | (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
2022-06-26 19:22:28 +0200 | jmcarthur | (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
2022-06-26 19:30:29 +0200 | <jchia[m]> | Is there a way to get the pathname of the currently executing haskell file (run under ghc) or haskell executable file? Apparently, getProgName gives only the filename without the directory. I care only about Linux. |
2022-06-26 19:30:52 +0200 | jmcarthur | (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
2022-06-26 19:31:22 +0200 | <juri_> | /proc/<pid>/? |
2022-06-26 19:31:27 +0200 | <jchia[m]> | There's a C function getProgArgv() called by getProgArg, but I don't think Haskell programs get to call RTS C functions directly. |
2022-06-26 19:31:53 +0200 | <jchia[m]> | that would involve parsing the ghc or haskell exe command-line, somewhat fragile. |
2022-06-26 19:38:04 +0200 | jmcarthur | (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
2022-06-26 19:38:36 +0200 | <hpc> | there's https://hackage.haskell.org/package/system-argv0-0.1.1/docs/System-Argv0.html |
2022-06-26 19:39:50 +0200 | <hpc> | heh, there's also https://hackage.haskell.org/package/base-4.16.1.0/docs/System-Environment.html#v:getExecutablePath right underneath getProgName |
2022-06-26 19:39:51 +0200 | yauhsien | (~yauhsien@61-231-38-201.dynamic-ip.hinet.net) |
2022-06-26 19:40:43 +0200 | ayx | (~nodebot@103.208.69.22) |
2022-06-26 19:42:30 +0200 | yax1 | (~nodebot@103.208.69.22) |
2022-06-26 19:43:32 +0200 | <sm> | ❤️ c64 and spectrum tips showing up in #haskell 🚀 |
2022-06-26 19:44:02 +0200 | jakalx | (~jakalx@base.jakalx.net) (Error from remote client) |
2022-06-26 19:44:14 +0200 | jmcarthur | (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
2022-06-26 19:44:28 +0200 | jakalx | (~jakalx@base.jakalx.net) |
2022-06-26 19:44:47 +0200 | yax2 | (~nodebot@103.208.69.22) |
2022-06-26 19:44:52 +0200 | yauhsien | (~yauhsien@61-231-38-201.dynamic-ip.hinet.net) (Ping timeout: 272 seconds) |
2022-06-26 19:45:52 +0200 | mjan22640 | (~Srain@212.17.33.215) (Remote host closed the connection) |
2022-06-26 19:46:52 +0200 | yax_ | (~yaxl@2402:e280:3e30:264:85cd:eb52:f5bc:9c40) |
2022-06-26 19:47:26 +0200 | Everything | (~Everythin@37.115.210.35) |
2022-06-26 19:52:59 +0200 | vglfr | (~vglfr@coupling.penchant.volia.net) (Ping timeout: 246 seconds) |
2022-06-26 19:53:42 +0200 | <yax_> | hi |
2022-06-26 19:54:40 +0200 | pseigo | (~pseigo@d108-173-20-33.abhsia.telus.net) |
2022-06-26 19:54:50 +0200 | <jchia[m]> | hpc: Those 2 ways work fine for a compiled executable, but unfortunately not when running a Haskell script under 'ghc'. |
2022-06-26 19:56:18 +0200 | <hpc> | aaaah, that makes more sense |
2022-06-26 19:56:39 +0200 | shiraeeshi | (~shiraeesh@109.166.58.140) |
2022-06-26 19:59:09 +0200 | pleo | (~pleo@user/pleo) |
2022-06-26 20:00:44 +0200 | merijn | (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) |
2022-06-26 20:04:38 +0200 | nate4 | (~nate@98.45.169.16) (Ping timeout: 268 seconds) |
2022-06-26 20:05:50 +0200 | <jchia[m]> | But I guess I can live with that. I'll just build the executable. |
2022-06-26 20:06:16 +0200 | yax_ | (~yaxl@2402:e280:3e30:264:85cd:eb52:f5bc:9c40) (Quit: Leaving) |
2022-06-26 20:07:02 +0200 | michalz | (~michalz@185.246.204.125) |
2022-06-26 20:08:14 +0200 | machinedgod | (~machinedg@66.244.246.252) |
2022-06-26 20:08:15 +0200 | <geekosaur> | I don't understand "running a Haskell script under 'ghc'". wouldn't that be runghc? |
2022-06-26 20:08:36 +0200 | <geekosaur> | although it looks like runghc does have that problem, getExecutablePath returns the path to ghc itself |
2022-06-26 20:10:45 +0200 | notzmv | (~zmv@user/notzmv) |
2022-06-26 20:11:04 +0200 | <SridharRatnakuma> | dmj`: maybe I should use this for <9.2 support, https://blog.csongor.co.uk/symbol-parsing-haskell/ |
2022-06-26 20:11:06 +0200 | <SridharRatnakuma> | >>> :t listify @"Hello" |
2022-06-26 20:11:06 +0200 | <SridharRatnakuma> | listify @"Hello" :: Proxy '["H", "e", "l", "l", "o"] |
2022-06-26 20:12:01 +0200 | Sgeo | (~Sgeo@user/sgeo) |
2022-06-26 20:12:46 +0200 | <dmj`> | SridharRatnakuma: fancy |
2022-06-26 20:13:39 +0200 | ayx | (~nodebot@103.208.69.22) (Read error: Connection reset by peer) |
2022-06-26 20:13:39 +0200 | yax1 | (~nodebot@103.208.69.22) (Read error: Connection reset by peer) |
2022-06-26 20:13:39 +0200 | yax2 | (~nodebot@103.208.69.22) (Read error: Connection reset by peer) |
2022-06-26 20:15:50 +0200 | _ht | (~quassel@231-169-21-31.ftth.glasoperator.nl) (Remote host closed the connection) |
2022-06-26 20:17:10 +0200 | machinedgod | (~machinedg@66.244.246.252) (Ping timeout: 240 seconds) |
2022-06-26 20:19:04 +0200 | yax__ | (~yax__@user/yax/x-9576643) |
2022-06-26 20:19:46 +0200 | leib | (~leib@2405:201:900a:f088:496d:d4b9:714:29f5) (Read error: Connection reset by peer) |
2022-06-26 20:20:33 +0200 | coot | (~coot@213.134.190.95) |
2022-06-26 20:20:38 +0200 | <geekosaur> | mm, I think the only way to get the source path is via template haskell. by the time it's executing bytecode, it has no idea where that bytecode came from |
2022-06-26 20:21:16 +0200 | <geekosaur> | it's executing from memory, and that memory might have come from ghc -e, template haskell, runghc, ghci prompt, etc. |
2022-06-26 20:21:51 +0200 | coot | (~coot@213.134.190.95) (Client Quit) |
2022-06-26 20:22:03 +0200 | coot | (~coot@213.134.190.95) |
2022-06-26 20:24:19 +0200 | yax__ | (~yax__@user/yax/x-9576643) (Quit: Leaving) |
2022-06-26 20:32:38 +0200 | justsomeguy | (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.5) |
2022-06-26 20:34:53 +0200 | merijn | (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 255 seconds) |
2022-06-26 20:35:16 +0200 | Midjak | (~Midjak@82.66.147.146) (Quit: This computer has gone to sleep) |
2022-06-26 20:37:01 +0200 | stackdroid18 | (14094@user/stackdroid) |
2022-06-26 20:42:46 +0200 | pwug | (~pwug@user/pwug) (Quit: Leaving) |
2022-06-26 20:45:17 +0200 | dtman34 | (~dtman34@2601:446:4400:2ad9:1078:b9d6:ea9f:9bfa) (Quit: ZNC 1.7.2+deb3 - https://znc.in) |
2022-06-26 20:45:27 +0200 | machinedgod | (~machinedg@184.68.192.218) |
2022-06-26 20:45:37 +0200 | dtman34 | (~dtman34@2601:446:4400:2ad9:d46d:4cbc:f1f6:2b62) |
2022-06-26 20:45:57 +0200 | pseigo | (~pseigo@d108-173-20-33.abhsia.telus.net) (Ping timeout: 268 seconds) |
2022-06-26 20:47:53 +0200 | yax__ | (~yax__@user/yax/x-9576643) |
2022-06-26 20:48:09 +0200 | <yax__> | what is a monad |
2022-06-26 20:48:56 +0200 | <c_wraith> | yax__: usually that question leads to unhelpful answers. what are you actually trying to learn? |
2022-06-26 20:49:05 +0200 | <monochrom> | Show me how you would answer "what is a numbers", and I might know how to answer "what is a monad?" |
2022-06-26 20:49:53 +0200 | <hpc> | perhaps start with "what is a functor" |
2022-06-26 20:50:07 +0200 | <yax__> | :DD |
2022-06-26 20:50:11 +0200 | <monochrom> | Hell, life and programming are full of those phenomena. |
2022-06-26 20:50:39 +0200 | <hpc> | you'll need to understand that first, and it's more intuitive if you're coming from another language |
2022-06-26 20:50:56 +0200 | <monochrom> | So I was teaching a C & Unix course and I discussed FILE* and I said "streams". A student asked "what is a stream?" |
2022-06-26 20:51:16 +0200 | <monochrom> | My answer: "How would you answer 'what are numbers?'" |
2022-06-26 20:51:35 +0200 | <monochrom> | The student was very smart. She realized "oh, it has to come down to that" |
2022-06-26 20:51:56 +0200 | coot | (~coot@213.134.190.95) (Quit: coot) |
2022-06-26 20:52:48 +0200 | <c_wraith> | I asked a bunch of mathematicians how they'd define numbers once. The best answer they could come up with was "numbers are things that look and act like numbers" |
2022-06-26 20:52:52 +0200 | <monochrom> | A stream is whatever that you get from fopen, and that you can use fclose, fprintf, fwrite, etc. You have to go axiomatic aka API. There is no other "definition". |
2022-06-26 20:53:40 +0200 | <geekosaur> | that's because it's the best you can do in English. there's a better definition if you're willing to talk theory 🙂 |
2022-06-26 20:53:59 +0200 | <unit73e> | hum but streams are easier to explain, no? because a stream is a sequence of readable chunks in a binary. or am I being too specific? |
2022-06-26 20:54:11 +0200 | nate4 | (~nate@98.45.169.16) |
2022-06-26 20:54:13 +0200 | <yax__> | "think of it like a stream of data flowing from one source to a destination" |
2022-06-26 20:54:25 +0200 | <c_wraith> | I was willing to talk theory. Numbers are just too vague of a concept, when you look at all the things that get called "numbers". |
2022-06-26 20:54:34 +0200 | <monochrom> | With "readable" you are still not doing better than "supports such API". |
2022-06-26 20:54:39 +0200 | pseigo | (~pseigo@node-1w7jr9ye7hx4fkp40wi692pl2.ipv6.telus.net) |
2022-06-26 20:54:44 +0200 | <unit73e> | yeah I guess |
2022-06-26 20:55:15 +0200 | <unit73e> | comparing explaning numebers to monad is good imo though, because you can explain specific implementations of monads but explaining the general concept is harder |
2022-06-26 20:55:25 +0200 | <ski> | what does "readable" have to do with "streams" ? |
2022-06-26 20:55:52 +0200 | <ski> | (does "readable" mean that there's parsing involved somewhere ? or just that you can extract values ?) |
2022-06-26 20:55:59 +0200 | <monochrom> | The API has fread and getc and fscanf. |
2022-06-26 20:56:03 +0200 | <yax__> | monoid in the category of endofunctors 😪 |
2022-06-26 20:56:31 +0200 | <ski> | the *monoidal* category of endofunctors |
2022-06-26 20:56:51 +0200 | <ski> | (but yes, that is a "HHOS" joke) |
2022-06-26 20:57:20 +0200 | <unit73e> | isn't it better to explain a monad as a design pattern the respective laws? that covers everything |
2022-06-26 20:57:20 +0200 | <ski> | yax__ : *are* you actually trying to do/learn something specific/concrete ? |
2022-06-26 20:57:28 +0200 | <c_wraith> | unlike some things, Monad actually has a precise definition. But learning it doesn't really help. |
2022-06-26 20:57:51 +0200 | <ski> | unit73e : yes. specifically to avoid certain kinds of boiler-plate code, i'd say |
2022-06-26 20:58:32 +0200 | <unit73e> | that does cover and explain why it exists in the first place |
2022-06-26 20:59:12 +0200 | <yax__> | yeah i would unironically love to know how an instance of applicative for (-> r) forms the s combinator |
2022-06-26 20:59:27 +0200 | <c_wraith> | yax__: the thing is, that's *really* hollow. |
2022-06-26 20:59:37 +0200 | <c_wraith> | yax__: the answer is "it does because it's the only thing it can do" |
2022-06-26 21:00:04 +0200 | <monochrom> | You can pretty much find out the only way (->) r can be an Applicative. Then compare the only solution to <*> with the S combinator. |
2022-06-26 21:00:08 +0200 | <ski> | yax__ : i find "Escaping Hell with Monads" by Philip Nilsson in 2017-05-08 at <https://philipnilsson.github.io/Badness10k/escaping-hell-with-monads/> a nice (non-tutorial) elaboration of the kind of (boiler-plate) problem that monads solve |
2022-06-26 21:00:24 +0200 | <yax__> | ski: thanks |
2022-06-26 21:01:14 +0200 | <yax__> | c_wraith: the way i internalized <*> is that its just a multiarg fmap |
2022-06-26 21:01:42 +0200 | <monochrom> | Actually I am beginning to feel that teaching Monad and then Applicative and Functor may work better. |
2022-06-26 21:01:59 +0200 | <yax__> | so (x <*> y <*> z) forming (x z) ( y z) feels weird to me |
2022-06-26 21:02:14 +0200 | <c_wraith> | note.. that's not what that does. |
2022-06-26 21:02:42 +0200 | <ski> | `(f <*> x <*> y) r' is `(f r) (x r) (y r)' |
2022-06-26 21:03:21 +0200 | <monochrom> | (x z) (y z) is (x <*> y) z |
2022-06-26 21:03:21 +0200 | <ski> | it "distributes" an "environment/context/config" (`r') to each "branch" |
2022-06-26 21:03:50 +0200 | <yax__> | monochrom: ok that makes way more sense, thanks |
2022-06-26 21:03:57 +0200 | <yax__> | i had a completely different and wrong idea |
2022-06-26 21:04:00 +0200 | <yax__> | thanks :D |
2022-06-26 21:05:00 +0200 | <ski> | (therefore `\r -> (..r..) (..r..) (..r..)' is `(\r -> ..r..) <*> (\r -> ..r..) <*> (\r -> ..r..)', pushing the lambdas inward. this is one part of the lambda calculus to SKI combinators translation, eliminating lambdas) |
2022-06-26 21:06:40 +0200 | <dmj`> | yax__: its a burrito https://emorehouse.wescreates.wesleyan.edu/silliness/burrito_monads.pdf |
2022-06-26 21:07:51 +0200 | <monochrom> | Applicative is curry burrito. currito.com |
2022-06-26 21:08:40 +0200 | <ski> | monochrom : why `Functor' after `Monad', though ? |
2022-06-26 21:08:50 +0200 | <yax__> | monads that let you extract the value out of the context should be tacos tho |
2022-06-26 21:09:02 +0200 | califax | (~califax@user/califx) (Remote host closed the connection) |
2022-06-26 21:09:06 +0200 | <ski> | tacomonads ? |
2022-06-26 21:09:18 +0200 | <unit73e> | maybe tacos are monads |
2022-06-26 21:09:31 +0200 | <yax__> | no, burritos are |
2022-06-26 21:09:36 +0200 | <yax__> | ! |
2022-06-26 21:09:42 +0200 | <geekosaur> | there are more tacos than burritos in the monad universe |
2022-06-26 21:09:46 +0200 | <ski> | @type Control.Comonad.extract |
2022-06-26 21:09:48 +0200 | <lambdabot> | Control.Comonad.Comonad w => w a -> a |
2022-06-26 21:10:22 +0200 | califax | (~califax@user/califx) |
2022-06-26 21:10:56 +0200 | lainon | (~lainon@2601:7c0:c500:4d20:2ca2:483a:8f15:302d) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2022-06-26 21:11:36 +0200 | califax | (~califax@user/califx) (Remote host closed the connection) |
2022-06-26 21:13:07 +0200 | califax | (~califax@user/califx) |
2022-06-26 21:15:47 +0200 | [_] | (~itchyjunk@user/itchyjunk/x-7353470) |
2022-06-26 21:16:47 +0200 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 268 seconds) |
2022-06-26 21:19:10 +0200 | Guest|17 | (~Guest|17@223.186.135.189) |
2022-06-26 21:20:15 +0200 | [_] | (~itchyjunk@user/itchyjunk/x-7353470) (Client Quit) |
2022-06-26 21:20:27 +0200 | <Guest|17> | I have ubuntu on Windows with x86 arch. I can not install ghc. I get ghc-pkg: Couldn't open database /home/abhisek/.ghcup/ghc/9.2.3/lib/ghc-9.2.3/package.conf.d |
2022-06-26 21:20:32 +0200 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) |
2022-06-26 21:22:46 +0200 | <maerwald> | Guest|17: WSL1? |
2022-06-26 21:22:59 +0200 | <yax__> | use ghcup? |
2022-06-26 21:23:02 +0200 | pseigo | (~pseigo@node-1w7jr9ye7hx4fkp40wi692pl2.ipv6.telus.net) (Ping timeout: 272 seconds) |
2022-06-26 21:23:05 +0200 | nate4 | (~nate@98.45.169.16) (Ping timeout: 248 seconds) |
2022-06-26 21:23:10 +0200 | <Guest|17> | I don't have WSL at all |
2022-06-26 21:23:13 +0200 | <geekosaur> | yax__, that is ghcup from the path |
2022-06-26 21:23:19 +0200 | <yax__> | mb |
2022-06-26 21:23:27 +0200 | <maerwald> | Guest|17: how are you running ubuntu inside windows? |
2022-06-26 21:23:53 +0200 | <Guest|17> | It's the app "Ubuntu on Windows" |
2022-06-26 21:24:05 +0200 | <maerwald> | that's WSL I think |
2022-06-26 21:24:12 +0200 | <Guest|17> | You can install this from windows store |
2022-06-26 21:24:16 +0200 | <monochrom> | Yes 100% WSL, just not sure 1 or 2. |
2022-06-26 21:24:22 +0200 | <Guest|17> | Command 'wsl' not found, but can be installed with: |
2022-06-26 21:24:23 +0200 | <Guest|17> | sudo apt install wsl |
2022-06-26 21:24:48 +0200 | <geekosaur> | wsl isn't a command, it's a subsystem |
2022-06-26 21:24:50 +0200 | Everything | (~Everythin@37.115.210.35) (Quit: leaving) |
2022-06-26 21:24:54 +0200 | <monochrom> | I think my students report that it's 2 now. |
2022-06-26 21:25:00 +0200 | <maerwald> | Guest|17: wsl -l -v |
2022-06-26 21:25:10 +0200 | alp | (~alp@user/alp) |
2022-06-26 21:25:17 +0200 | cheater | (~Username@user/cheater) (Ping timeout: 255 seconds) |
2022-06-26 21:25:23 +0200 | <Guest|17> | It's not a command ? |
2022-06-26 21:25:28 +0200 | <geekosaur> | if you're running ubuntu on windows, it's either version 1 or 2 of the windows subsystem for linux |
2022-06-26 21:25:36 +0200 | cheater | (~Username@user/cheater) |
2022-06-26 21:25:49 +0200 | <maerwald> | google says it's a command |
2022-06-26 21:25:52 +0200 | <Guest|17> | OK you suggest to install the command and check the version ? |
2022-06-26 21:26:12 +0200 | <maerwald> | you need to run this in cmd or powershell |
2022-06-26 21:26:15 +0200 | <maerwald> | not in ubuntu |
2022-06-26 21:26:29 +0200 | <maerwald> | (as admin I think) |
2022-06-26 21:26:32 +0200 | <yax__> | what windows u have |
2022-06-26 21:26:41 +0200 | <Guest|17> | 10 |
2022-06-26 21:26:56 +0200 | <Guest|17> | NAME STATE VERSION |
2022-06-26 21:26:56 +0200 | <Guest|17> | * Ubuntu Running 1 |
2022-06-26 21:27:00 +0200 | <geekosaur> | okay, I thought that was wslinfo or some such but I can't find it in logs |
2022-06-26 21:27:14 +0200 | <geekosaur> | sorry wsladmin |
2022-06-26 21:27:18 +0200 | <geekosaur> | but whatever |
2022-06-26 21:27:46 +0200 | pleo | (~pleo@user/pleo) (Quit: quit) |
2022-06-26 21:27:51 +0200 | <Guest|17> | How do I update to 2 ? |
2022-06-26 21:28:04 +0200 | <yax__> | google |
2022-06-26 21:28:21 +0200 | <monochrom> | Do you need to? |
2022-06-26 21:28:33 +0200 | <geekosaur> | wsl1 has a number of bugs |
2022-06-26 21:29:02 +0200 | <geekosaur> | iirc even if it can find the package database it fails trying to lock it |
2022-06-26 21:29:13 +0200 | <monochrom> | Oh, that. |
2022-06-26 21:29:20 +0200 | <yax__> | wsl 1 was very arcane and mostly experimental |
2022-06-26 21:29:34 +0200 | <yax__> | methinks |
2022-06-26 21:29:53 +0200 | <geekosaur> | it was hacked together from the old windows posix subsystem, which was kinda deficient |
2022-06-26 21:31:49 +0200 | <geekosaur> | I still think it's a pity they gave up on it and used hyper-v; a proper linux subsystem for windows would have technically been *very* interesting |
2022-06-26 21:32:12 +0200 | <yax__> | linux gets EEE'd when |
2022-06-26 21:34:12 +0200 | yax__ | shivers |
2022-06-26 21:34:37 +0200 | <Guest|17> | It needs to update the kernel. Will check on tomorrow. Thank you guys for the help. appreciate it |
2022-06-26 21:34:51 +0200 | <geekosaur> | I think they would have had enough trouble keeping it up to date that it wouldn't have survived anyway |
2022-06-26 21:35:08 +0200 | <geekosaur> | but linux as a microkernel service… |
2022-06-26 21:35:10 +0200 | <yax__> | cant u just install ghc on windows |
2022-06-26 21:35:28 +0200 | mikoto-chan | (~mikoto-ch@esm-84-240-99-143.netplaza.fi) |
2022-06-26 21:35:42 +0200 | <geekosaur> | that's got its own annoyances since it needs to install msys2 |
2022-06-26 21:36:06 +0200 | <yax__> | it auto does it for you |
2022-06-26 21:36:17 +0200 | <yax__> | source: me running ghc on windows |
2022-06-26 21:36:40 +0200 | <geekosaur> | does that bbut there have been version issues in the recent past |
2022-06-26 21:36:54 +0200 | <yax__> | yes |
2022-06-26 21:37:08 +0200 | <yax__> | source: me (reinstalled thrice) |
2022-06-26 21:37:23 +0200 | <Guest|17> | I haven't tried it. I thought maybe it's easier to install on linux. |
2022-06-26 21:37:43 +0200 | <geekosaur> | (also stack's handling of the whole msys2 thing is an utter hack, because it can't really do any better) |
2022-06-26 21:38:10 +0200 | <yax__> | hm ive always used cabal so idk anything about that |
2022-06-26 21:38:12 +0200 | <geekosaur> | well, withoutu having a separate msys2 for every ghc, which would be stupidly wasteful |
2022-06-26 21:39:08 +0200 | <yax__> | i only have 1 ghc |
2022-06-26 21:39:12 +0200 | nate4 | (~nate@98.45.169.16) |
2022-06-26 21:40:54 +0200 | shapr | (~user@2600:4040:2d31:7100:a97b:7b9:d36c:3fa5) |
2022-06-26 21:41:14 +0200 | <geekosaur> | yeh, but stack installs one for every resolver in use |
2022-06-26 21:41:28 +0200 | <geekosaur> | and stack's still quite popular |
2022-06-26 21:41:32 +0200 | <yax__> | true |
2022-06-26 21:41:50 +0200 | <yax__> | i dont really use haskell for anything serious tho |
2022-06-26 21:42:11 +0200 | <yax__> | so i really dont deal with build systems and stuff |
2022-06-26 21:44:38 +0200 | nate4 | (~nate@98.45.169.16) (Ping timeout: 255 seconds) |
2022-06-26 21:44:51 +0200 | Topsi | (~Topsi@dyndsl-095-033-093-085.ewe-ip-backbone.de) |
2022-06-26 21:49:49 +0200 | yax__ | (~yax__@user/yax/x-9576643) (byee) |
2022-06-26 21:52:17 +0200 | <hololeap> | I'm playing around with this API which is essentially: Semigroup s => class Foo s a where foo :: WriterT (Maybe s) m a |
2022-06-26 21:53:27 +0200 | <hololeap> | more specifically `WriterT (Maybe (Last s)) m a` |
2022-06-26 21:55:07 +0200 | <hololeap> | I'd like to ensure at compile time that the computation ends with `Just (Last s)`, possibly by creating a new GADT |
2022-06-26 21:55:16 +0200 | Guest|17 | (~Guest|17@223.186.135.189) (Quit: Connection closed) |
2022-06-26 21:55:56 +0200 | <hololeap> | TaggedMaybe (j :: IsJust) a where TaggedJust :: a -> TaggedMaybe 'True a; TaggedNothing :: TaggedMaybe 'False a |
2022-06-26 21:56:10 +0200 | pleo | (~pleo@user/pleo) |
2022-06-26 21:57:01 +0200 | <hololeap> | then I can make `foo`s signature `WriterT (TaggedMaybe 'True s) m a` |
2022-06-26 21:57:15 +0200 | <ski> | `IsJust' ? |
2022-06-26 21:57:26 +0200 | <hololeap> | type IsJust = Bool |
2022-06-26 21:58:16 +0200 | <hololeap> | the problem is, I don't see any way to make a sane Applicative instance for TaggedMaybe without putting it inside an existential wrapper, which causes all kinds of issues with the API |
2022-06-26 21:58:17 +0200 | <ski> | i don't see how you conveniently change the index `j' |
2022-06-26 21:58:24 +0200 | <ski> | like with `(>>=)' |
2022-06-26 21:58:35 +0200 | arjun | (~arjun@user/arjun) (Ping timeout: 255 seconds) |
2022-06-26 21:58:38 +0200 | acidjnk | (~acidjnk@dynamic-046-114-170-212.46.114.pool.telefonica.de) |
2022-06-26 21:58:39 +0200 | <ski> | (or `(<*>)', if you prefer) |
2022-06-26 21:58:47 +0200 | lainon | (~lainon@c-68-46-201-40.hsd1.al.comcast.net) |
2022-06-26 21:59:08 +0200 | <hololeap> | yeah, that's the problem, and I was curious if anyone had figured out a clever way around this |
2022-06-26 21:59:15 +0200 | cdsmith57 | (~cdsmith@c-73-184-127-183.hsd1.ga.comcast.net) (Quit: Client closed) |
2022-06-26 21:59:16 +0200 | <ski> | hololeap : i guess we're talking about the same problem |
2022-06-26 21:59:28 +0200 | nate4 | (~nate@98.45.169.16) |
2022-06-26 21:59:58 +0200 | azimut | (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 268 seconds) |
2022-06-26 22:00:31 +0200 | <ski> | there is `IxMonad' .. i wonder if there's anything for a monoid (type-level) index |
2022-06-26 22:02:22 +0200 | merijn | (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) |
2022-06-26 22:07:33 +0200 | eod|fserucas_ | (~eod|fseru@1.64.114.89.rev.vodafone.pt) |
2022-06-26 22:07:33 +0200 | eod|fserucas | (~eod|fseru@1.64.114.89.rev.vodafone.pt) |
2022-06-26 22:08:38 +0200 | titibandit | (~thibaut@xdsl-78-34-167-250.nc.de) |
2022-06-26 22:09:54 +0200 | cheater | (~Username@user/cheater) (Ping timeout: 272 seconds) |
2022-06-26 22:09:54 +0200 | cheater1__ | (~Username@user/cheater) |
2022-06-26 22:09:58 +0200 | cheater1__ | cheater |
2022-06-26 22:10:41 +0200 | titibandit | (~thibaut@xdsl-78-34-167-250.nc.de) (Remote host closed the connection) |
2022-06-26 22:12:07 +0200 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection) |
2022-06-26 22:12:14 +0200 | arjun | (~arjun@user/arjun) |
2022-06-26 22:13:37 +0200 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) |
2022-06-26 22:14:51 +0200 | arjun | (~arjun@user/arjun) (Client Quit) |
2022-06-26 22:15:30 +0200 | nate4 | (~nate@98.45.169.16) (Ping timeout: 240 seconds) |
2022-06-26 22:22:17 +0200 | machinedgod | (~machinedg@184.68.192.218) (Ping timeout: 248 seconds) |
2022-06-26 22:25:54 +0200 | <SridharRatnakuma> | dmj`: That package is slow as a tortoise. I ended up going GHC 9.2 route. https://stackoverflow.com/a/72764893/55246 |
2022-06-26 22:26:28 +0200 | yax__ | (~yax__@user/yax/x-9576643) |
2022-06-26 22:28:25 +0200 | _xor | (~xor@74.215.182.83) (Quit: WeeChat 3.4.1) |
2022-06-26 22:30:01 +0200 | mikoto-chan | (~mikoto-ch@esm-84-240-99-143.netplaza.fi) (Ping timeout: 256 seconds) |
2022-06-26 22:31:56 +0200 | mikoto-chan | (~mikoto-ch@esm-84-240-99-143.netplaza.fi) |
2022-06-26 22:32:03 +0200 | nate4 | (~nate@98.45.169.16) |
2022-06-26 22:36:30 +0200 | merijn | (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 240 seconds) |
2022-06-26 22:37:41 +0200 | {-d0t-} | (~q_q@user/-d0t-/x-7915216) |
2022-06-26 22:38:17 +0200 | <{-d0t-}> | ohai! I haven't used servant in a while now and I feel lost. How do I return a custom code for a request? |
2022-06-26 22:41:02 +0200 | cosimone | (~user@93-44-186-171.ip98.fastwebnet.it) (Remote host closed the connection) |
2022-06-26 22:42:11 +0200 | machinedgod | (~machinedg@66.244.246.252) |
2022-06-26 22:43:23 +0200 | jmcarthur | (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
2022-06-26 22:44:06 +0200 | yax__ | (~yax__@user/yax/x-9576643) () |
2022-06-26 22:46:49 +0200 | nate4 | (~nate@98.45.169.16) (Ping timeout: 268 seconds) |
2022-06-26 22:46:49 +0200 | mikoto-chan | (~mikoto-ch@esm-84-240-99-143.netplaza.fi) (Ping timeout: 268 seconds) |
2022-06-26 22:48:30 +0200 | waleee | (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) |
2022-06-26 22:54:21 +0200 | mc47 | (~mc47@xmonad/TheMC47) (Remote host closed the connection) |
2022-06-26 22:56:44 +0200 | jmcarthur | (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
2022-06-26 23:00:32 +0200 | ashln | (~ashln@98.38.236.123) (Quit: Lost terminal) |
2022-06-26 23:04:01 +0200 | mon_aaraj | (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 256 seconds) |
2022-06-26 23:12:43 +0200 | xacktm | (xacktm@user/xacktm) (Ping timeout: 268 seconds) |
2022-06-26 23:12:57 +0200 | even4void | (even4void@came.here.for-some.fun) (Ping timeout: 248 seconds) |
2022-06-26 23:13:29 +0200 | andreas303 | (andreas303@ip227.orange.bnc4free.com) (Ping timeout: 248 seconds) |
2022-06-26 23:17:02 +0200 | machinedgod | (~machinedg@66.244.246.252) (Ping timeout: 268 seconds) |
2022-06-26 23:18:43 +0200 | machinedgod | (~machinedg@66.244.246.252) |
2022-06-26 23:19:22 +0200 | adium | (adium@user/adium) (Quit: Stable ZNC by #bnc4you) |
2022-06-26 23:20:22 +0200 | wroathe | (~wroathe@206-55-188-8.fttp.usinternet.com) |
2022-06-26 23:20:22 +0200 | wroathe | (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
2022-06-26 23:20:22 +0200 | wroathe | (~wroathe@user/wroathe) |
2022-06-26 23:20:44 +0200 | jonathanx | (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Remote host closed the connection) |
2022-06-26 23:21:05 +0200 | jonathanx | (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) |
2022-06-26 23:22:44 +0200 | <hololeap> | is it possible to stick a value in a typeclass, like `class Foo a where fooName :: String` |
2022-06-26 23:23:12 +0200 | <hololeap> | or does it _have_ to reference a, e.g. `fooName :: proxy a -> String` |
2022-06-26 23:23:56 +0200 | nate4 | (~nate@98.45.169.16) |
2022-06-26 23:24:38 +0200 | <hololeap> | I would like to avoid Proxy and just use TypeApplications, if possible, e.g. `fooName @MyFoo` |
2022-06-26 23:24:45 +0200 | <ski> | it doesn't have to, you can use `fooName @a', with `TypeApplications' |
2022-06-26 23:24:56 +0200 | Topsi | (~Topsi@dyndsl-095-033-093-085.ewe-ip-backbone.de) (Read error: Connection reset by peer) |
2022-06-26 23:25:33 +0200 | <ski> | well, you also need `AllowAmbiguousTypes' |
2022-06-26 23:25:53 +0200 | andreas303 | (andreas303@ip227.orange.bnc4free.com) |
2022-06-26 23:26:02 +0200 | <ski> | (also not all people are that happy with `TypeApplications') |
2022-06-26 23:26:03 +0200 | <hololeap> | ah, gotcha |
2022-06-26 23:26:28 +0200 | <hololeap> | why not? |
2022-06-26 23:27:02 +0200 | <ski> | (e.g. suddenly now it matters in which order your type variables are generalized .. even if you haven't written an explicit `forall'. i'd possibly like to see the extension restricted to the latter case, where there is an explicitly documented ordering) |
2022-06-26 23:27:14 +0200 | adium | (adium@user/adium) |
2022-06-26 23:27:46 +0200 | even4void | (even4void@came.here.for-some.fun) |
2022-06-26 23:28:45 +0200 | <monochrom> | Provide two methods, one of them has the "p a" parameter, one doesn't. :) |
2022-06-26 23:29:06 +0200 | <ski> | (or make one of them a non-method, that calls the other) |
2022-06-26 23:29:53 +0200 | <hololeap> | fooNameForLusers (_ :: p a) = fooName @a |
2022-06-26 23:30:05 +0200 | <ski> | hololeap : in some cases, btw, it may be better to use a phantom type |
2022-06-26 23:30:44 +0200 | <ski> | fooName :: Foo a -- where `Foo a' just contains a `String' |
2022-06-26 23:31:13 +0200 | MajorBiscuit | (~MajorBisc@2a02-a461-129d-1-193d-75d8-745d-e91e.fixed6.kpn.net) (Ping timeout: 268 seconds) |
2022-06-26 23:31:44 +0200 | <hololeap> | hm ok. could I define it as `type Foo a = String` ? |
2022-06-26 23:31:58 +0200 | <ski> | well, `newtype', rather |
2022-06-26 23:32:07 +0200 | <ski> | (otherwise you still need `AllowAmbiguousTypes') |
2022-06-26 23:32:13 +0200 | <hololeap> | I see |
2022-06-26 23:32:19 +0200 | jmcarthur | (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
2022-06-26 23:32:19 +0200 | jmcarthur | (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Client Quit) |
2022-06-26 23:32:34 +0200 | <ski> | @hoogle Tagged |
2022-06-26 23:32:35 +0200 | <lambdabot> | module Data.Tagged |
2022-06-26 23:32:35 +0200 | <lambdabot> | Data.Tagged newtype Tagged s b |
2022-06-26 23:32:35 +0200 | <lambdabot> | Data.Tagged Tagged :: b -> Tagged s b |
2022-06-26 23:33:04 +0200 | xacktm | (xacktm@user/xacktm) |
2022-06-26 23:34:06 +0200 | cosimone | (~user@93-44-186-171.ip98.fastwebnet.it) |
2022-06-26 23:35:18 +0200 | <hololeap> | yeah, especially since I can `derive newtype IsString` |
2022-06-26 23:36:21 +0200 | jmcarthur | (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
2022-06-26 23:38:44 +0200 | jmcarthur | (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Client Quit) |
2022-06-26 23:40:25 +0200 | takuan | (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
2022-06-26 23:43:44 +0200 | n3t | (n3t@user/n3t) (WeeChat 3.3) |
2022-06-26 23:45:03 +0200 | jmcarthur | (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
2022-06-26 23:45:18 +0200 | dos__^^` | (~user@2409:8a55:e215:3930:58b9:4cff:fea0:d9) |
2022-06-26 23:45:38 +0200 | dos__^^ | (~user@user/dos/x-1723657) (Ping timeout: 240 seconds) |
2022-06-26 23:49:44 +0200 | <kenaryn> | Please why does `:t (/) 1 2` returns `:: Fractional a => a` despite Chris Allen's book stating that type class Fractional is defaulting to Double type? |
2022-06-26 23:50:16 +0200 | ashln | (~ashln@98.38.236.123) |
2022-06-26 23:50:35 +0200 | <EvanR> | defaulting happens if you ask it to evaluate (/) 1 2 |
2022-06-26 23:50:38 +0200 | <EvanR> | in ghci |
2022-06-26 23:50:49 +0200 | <kenaryn> | I'm currently using the REPL. |
2022-06-26 23:50:50 +0200 | <EvanR> | in which case it has to pick something or else complain |
2022-06-26 23:51:02 +0200 | <EvanR> | evaluation and asking for the type are not the same thing |
2022-06-26 23:51:39 +0200 | yax__ | (~yax__@user/yax/x-9576643) |
2022-06-26 23:51:40 +0200 | <kenaryn> | Allright, I didn't know about that. So there are some basic informations that are permanently unavailable for the user. |
2022-06-26 23:52:01 +0200 | <EvanR> | :t (/) 1 2 |
2022-06-26 23:52:02 +0200 | <lambdabot> | Fractional a => a |
2022-06-26 23:52:06 +0200 | <EvanR> | > (/) 1 2 |
2022-06-26 23:52:07 +0200 | <lambdabot> | 0.5 |
2022-06-26 23:52:10 +0200 | <monochrom> | :t does not use the defaulting rules |
2022-06-26 23:52:35 +0200 | <kenaryn> | Understood, thanks gentlemen. |
2022-06-26 23:53:16 +0200 | yax__ | (~yax__@user/yax/x-9576643) () |
2022-06-26 23:54:57 +0200 | <monochrom> | You have to put code in a file, load that file, and ask about identifiers and/or expressions in that file, to see defaulting in action. |
2022-06-26 23:55:21 +0200 | <monochrom> | which is different from ":type <one-shot expression>" |
2022-06-26 23:55:45 +0200 | <monochrom> | For example if your file has "x = 1", then :type x will correct say Integer. |
2022-06-26 23:55:53 +0200 | <dolio> | @type 1/2 |
2022-06-26 23:55:54 +0200 | <lambdabot> | Fractional a => a |
2022-06-26 23:55:57 +0200 | <dolio> | @type +d 1/2 |
2022-06-26 23:55:59 +0200 | <lambdabot> | Double |
2022-06-26 23:56:10 +0200 | <dolio> | Read the help. :þ |
2022-06-26 23:56:55 +0200 | gmg | (~user@user/gehmehgeh) (Quit: Leaving) |
2022-06-26 23:58:02 +0200 | <monochrom> | For example if your file has "main = print 1", then there is a command for asking for the type of the "1" on that line of code specifically (you have to enter the line number and column number, or let an editor do it for you), and it will correctly say "that's Integer". |
2022-06-26 23:58:15 +0200 | pavonia | (~user@user/siracusa) |
2022-06-26 23:58:16 +0200 | <monochrom> | But these do not apply to a pedestrian ":type 1". |
2022-06-26 23:58:41 +0200 | gurkenglas | (~gurkengla@dslb-002-203-144-112.002.203.pools.vodafone-ip.de) (Ping timeout: 246 seconds) |
2022-06-26 23:59:38 +0200 | <monochrom> | Ugh why am I using 1 instead of 0? :) |
2022-06-26 23:59:48 +0200 | <dolio> | @type +d 0 |
2022-06-26 23:59:50 +0200 | <lambdabot> | Integer |