2023-06-18 00:02:36 +0200 | merijn | (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 260 seconds) |
2023-06-18 00:03:37 +0200 | coot | (~coot@89-69-206-216.dynamic.chello.pl) (Quit: coot) |
2023-06-18 00:16:20 +0200 | acidjnk | (~acidjnk@p200300d6e7072f8821c033a15ffbac05.dip0.t-ipconnect.de) (Ping timeout: 240 seconds) |
2023-06-18 00:16:52 +0200 | machinedgod | (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 240 seconds) |
2023-06-18 00:18:14 +0200 | merijn | (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) |
2023-06-18 00:18:50 +0200 | arrowhead | (~arrowhead@2603-7000-9b3f-6934-f03e-aa04-3ee2-7e43.res6.spectrum.com) |
2023-06-18 00:23:18 +0200 | merijn | (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 252 seconds) |
2023-06-18 00:27:32 +0200 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 240 seconds) |
2023-06-18 00:32:41 +0200 | dunj3 | (~dunj3@kingdread.de) (Server closed connection) |
2023-06-18 00:34:53 +0200 | dunj3 | (~dunj3@kingdread.de) |
2023-06-18 00:47:04 +0200 | <nyc> | I've got a cabal.project file in the top-level directory and some foo.cabal files in a directory below. How do I run a test suite target defined in the cabal file below? |
2023-06-18 00:50:48 +0200 | titibandit | (~titibandi@user/titibandit) (Read error: Connection reset by peer) |
2023-06-18 00:55:02 +0200 | <sclv> | nyc: add those cabal files to the packages: section of the cabal file |
2023-06-18 00:55:08 +0200 | <sclv> | of the project file |
2023-06-18 00:55:48 +0200 | <sclv> | and then run like “cabal test foo:test-suites” or “cabal test foo” |
2023-06-18 01:01:17 +0200 | wroathe | (~wroathe@207-153-38-140.fttp.usinternet.com) |
2023-06-18 01:01:17 +0200 | wroathe | (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host) |
2023-06-18 01:01:17 +0200 | wroathe | (~wroathe@user/wroathe) |
2023-06-18 01:03:59 +0200 | merijn | (~merijn@86-86-29-250.fixed.kpn.net) |
2023-06-18 01:04:06 +0200 | fendor | (~fendor@2a02:8388:1640:be00:7aca:a77a:4a28:631a) (Remote host closed the connection) |
2023-06-18 01:04:46 +0200 | <arrowhead> | I have this problem but I don't have a packaga.yaml : https://stackoverflow.com/questions/69956129/what-to-do-so-i-can-import-data-list-split-module-in-… |
2023-06-18 01:05:08 +0200 | <arrowhead> | How do I solve it? Even addind a package.yaml with dependencies: - split == 0.2.3.3 it still doesn't work |
2023-06-18 01:05:23 +0200 | <arrowhead> | I have already added ", split" to my Project.cabal file and '- split-0.2.3.3" to my stack.yaml's extra-deps. Both cabal and stack will build and run fine. Also did cabal install split --lib. |
2023-06-18 01:05:33 +0200 | <arrowhead> | How do I fix VS Code complaining about my import Data.List.Split saying "Could not find module ‘Data.List.Split’"? |
2023-06-18 01:06:49 +0200 | <sclv> | the issue is you need to configure vs code to run via the project at all. |
2023-06-18 01:07:29 +0200 | <arrowhead> | I have the plugin settings checked to use ghcup, is that what you mean? |
2023-06-18 01:07:34 +0200 | <sclv> | #haskell-language-server has the experts, but is low traffic |
2023-06-18 01:07:41 +0200 | <arrowhead> | ok will try that |
2023-06-18 01:07:52 +0200 | <sclv> | not just ghcup. the cradle to use the cabal.project or stack.project |
2023-06-18 01:08:11 +0200 | <arrowhead> | what is the cradle? |
2023-06-18 01:08:54 +0200 | <arrowhead> | "How to manage/find HLS installations." > GHCup |
2023-06-18 01:09:16 +0200 | <sclv> | https://haskell-language-server.readthedocs.io/en/latest/configuration.html#configuring-your-proje… |
2023-06-18 01:09:29 +0200 | <geekosaur> | isn't it considered a bug if you need an explicit cradle these days? |
2023-06-18 01:09:33 +0200 | harveypwca | (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) |
2023-06-18 01:09:51 +0200 | <sclv> | idk im just pointing to the docs |
2023-06-18 01:10:10 +0200 | <arrowhead> | Ah. I'm not getting any cradle issues... at least that I an see |
2023-06-18 01:10:12 +0200 | <arrowhead> | can* |
2023-06-18 01:12:00 +0200 | mstksg | (~jle`@cpe-23-240-75-236.socal.res.rr.com) |
2023-06-18 01:14:59 +0200 | jle` | (~jle`@cpe-23-240-75-236.socal.res.rr.com) (Ping timeout: 240 seconds) |
2023-06-18 01:16:32 +0200 | deglazewithcheet | (~deglazewi@209-188-121-236.taosnet.com) |
2023-06-18 01:17:17 +0200 | deglazewithcheet | shef |
2023-06-18 01:17:33 +0200 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:4849:878d:c616:458f) (Remote host closed the connection) |
2023-06-18 01:20:56 +0200 | bcmiller | (~bm3719@66.42.95.185) (Server closed connection) |
2023-06-18 01:21:12 +0200 | bcmiller | (~bm3719@66.42.95.185) |
2023-06-18 01:21:50 +0200 | <arrowhead> | sclv: thank you for the help anyways |
2023-06-18 01:22:14 +0200 | nate2 | (~nate@c-98-45-169-16.hsd1.ca.comcast.net) |
2023-06-18 01:22:20 +0200 | Feuermagier | (~Feuermagi@user/feuermagier) (Ping timeout: 240 seconds) |
2023-06-18 01:22:20 +0200 | arrowhead | (~arrowhead@2603-7000-9b3f-6934-f03e-aa04-3ee2-7e43.res6.spectrum.com) (Read error: Connection reset by peer) |
2023-06-18 01:23:48 +0200 | shef | (~deglazewi@209-188-121-236.taosnet.com) (Ping timeout: 252 seconds) |
2023-06-18 01:25:11 +0200 | arrowhead | (~arrowhead@2603-7000-9b3f-6934-a88a-36a7-e0af-5d4c.res6.spectrum.com) |
2023-06-18 01:27:07 +0200 | nate2 | (~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 258 seconds) |
2023-06-18 01:27:31 +0200 | bilegeek | (~bilegeek@2600:1008:b085:8180:1da1:2103:9ba6:bd4d) |
2023-06-18 01:27:47 +0200 | Tuplanolla | (~Tuplanoll@91-159-68-236.elisa-laajakaista.fi) (Quit: Leaving.) |
2023-06-18 01:31:12 +0200 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 240 seconds) |
2023-06-18 01:32:27 +0200 | <Nosrep> | what would prevent ghc from doing the worker-wrapper transformation on this demand signature? |
2023-06-18 01:32:32 +0200 | <Nosrep> | Str=<1P(1P(1L,SL,SL,SL,SL,1L),1P(1L,SL,SL,SL,SL,1L),A,A,SL)> |
2023-06-18 01:32:37 +0200 | <arrowhead> | I fixed it by accident! The solution was to add my project folder to VS Code's Workspace. That made the IDE stop underlining red the "import Data.List.Split" file and now I have a fully-functional IDE+LSP from GHCup. Amazing work. Thank you all. |
2023-06-18 01:33:06 +0200 | Unicorn_Princess | (~Unicorn_P@user/Unicorn-Princess/x-3540542) (Remote host closed the connection) |
2023-06-18 01:35:32 +0200 | <[Leary]> | Nosrep: Just a guess, but everything in there is either lazy or absent, so there's nothing for a wrapper to unbox. |
2023-06-18 01:37:12 +0200 | merijn | (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 240 seconds) |
2023-06-18 01:37:33 +0200 | <Nosrep> | i thought it only looked at the outer layer for unboxing? which is 1P which should be strict |
2023-06-18 01:38:19 +0200 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:2847:13c1:54f7:ebbc) |
2023-06-18 01:39:21 +0200 | <Nosrep> | https://www.youtube.com/watch?v=XiTO1EGKrhE over here (around 19:33) there's a signature of 1P(A,1L,MP(L)) which does get the worker |
2023-06-18 01:41:56 +0200 | mxs | (~mxs@user/mxs) (Ping timeout: 265 seconds) |
2023-06-18 01:41:59 +0200 | hiredman | (~hiredman@frontier1.downey.family) (Remote host closed the connection) |
2023-06-18 01:42:05 +0200 | mxs | (~mxs@user/mxs) |
2023-06-18 01:42:44 +0200 | Angelz | (Angelz@2605:6400:30:fc15:d55b:fa6c:bd14:9973) (Ping timeout: 240 seconds) |
2023-06-18 01:42:44 +0200 | arrowhead | (~arrowhead@2603-7000-9b3f-6934-a88a-36a7-e0af-5d4c.res6.spectrum.com) (Read error: Connection reset by peer) |
2023-06-18 01:43:36 +0200 | hugo | (znc@verdigris.lysator.liu.se) (Ping timeout: 258 seconds) |
2023-06-18 01:44:04 +0200 | arrowhead | (~arrowhead@2603-7000-9b3f-6934-a88a-36a7-e0af-5d4c.res6.spectrum.com) |
2023-06-18 01:47:19 +0200 | takuan | (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
2023-06-18 01:49:45 +0200 | merijn | (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) |
2023-06-18 01:49:45 +0200 | arrowhead | (~arrowhead@2603-7000-9b3f-6934-a88a-36a7-e0af-5d4c.res6.spectrum.com) (Read error: Connection reset by peer) |
2023-06-18 01:50:31 +0200 | arrowhead | (~arrowhead@2603-7000-9b3f-6934-a88a-36a7-e0af-5d4c.res6.spectrum.com) |
2023-06-18 01:50:36 +0200 | hugo | (znc@verdigris.lysator.liu.se) |
2023-06-18 01:54:05 +0200 | merijn | (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 240 seconds) |
2023-06-18 01:55:06 +0200 | mauke_ | (~mauke@user/mauke) |
2023-06-18 01:56:32 +0200 | mauke | (~mauke@user/mauke) (Ping timeout: 240 seconds) |
2023-06-18 01:56:32 +0200 | arrowhead | (~arrowhead@2603-7000-9b3f-6934-a88a-36a7-e0af-5d4c.res6.spectrum.com) (Read error: Connection reset by peer) |
2023-06-18 01:56:32 +0200 | mauke_ | mauke |
2023-06-18 01:57:05 +0200 | arrowhead | (~arrowhead@2603-7000-9b3f-6934-a88a-36a7-e0af-5d4c.res6.spectrum.com) |
2023-06-18 01:58:08 +0200 | notzmv | (~zmv@user/notzmv) |
2023-06-18 02:09:10 +0200 | Dykam | (Dykam@dykam.nl) (Server closed connection) |
2023-06-18 02:09:19 +0200 | Dykam | (Dykam@dykam.nl) |
2023-06-18 02:22:01 +0200 | pieguy128 | (~pieguy128@bras-base-mtrlpq5031w-grc-56-65-92-162-12.dsl.bell.ca) (Quit: ZNC 1.8.2 - https://znc.in) |
2023-06-18 02:22:21 +0200 | pieguy128 | (~pieguy128@bras-base-mtrlpq5031w-grc-56-65-92-162-12.dsl.bell.ca) |
2023-06-18 02:25:15 +0200 | merijn | (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) |
2023-06-18 02:25:52 +0200 | YuutaW | (~YuutaW@mail.yuuta.moe) |
2023-06-18 02:29:52 +0200 | merijn | (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 240 seconds) |
2023-06-18 02:31:38 +0200 | <ijqq> | Hi I'm struggling to come up with a way to parse escapes in strings using applicative parsing. The issue is that my function to check an escape needs to take a look at multiple characters, so it works on strings. But I don't know how to make a parser that will parse everything between quotes, but also check for any amount of escapes. Well, I know that I could do it with a few case ofs but I don't know how to do it using the parsing |
2023-06-18 02:31:38 +0200 | <ijqq> | functions that I've defined. Here is the file, it's quite messy but the string parsing function is on line 93 http://sprunge.us/jfTxfg. |
2023-06-18 02:33:26 +0200 | <[Leary]> | Nosrep: I had to go read up on demand signatures to remind myself how to interpret them. My next best guess is that, with the function using 3 out of 5 fields from the outer product, GHC chooses not to unpack it. And without unpacking it, nothing further can be done. |
2023-06-18 02:34:27 +0200 | <Nosrep> | hm maybe |
2023-06-18 02:37:53 +0200 | <EvanR> | ijqq, with monadic parsing you could use manyTill to parse elements of the string until you encounter a (bare) quote. Escaped quote would be consumed by the inner parser |
2023-06-18 02:41:13 +0200 | <ijqq> | EvanR ah interesting. I am trying to do it with just applicative ( I don't really know or understand monads yet xd) but thank you. I'll keep trying. |
2023-06-18 02:43:31 +0200 | <EvanR> | I don't see a way to do it with *just* applicative and nothing else |
2023-06-18 02:44:10 +0200 | <ijqq> | Oh right |
2023-06-18 02:44:40 +0200 | extor | (~extor@ns3018124.ip-149-202-82.eu) |
2023-06-18 02:45:23 +0200 | <ijqq> | Did you look at the code I put? It has alternative too by the way, I forgot to say. |
2023-06-18 02:45:28 +0200 | <EvanR> | the <*> operation lets you combine two parsers sequentially |
2023-06-18 02:45:45 +0200 | <EvanR> | :t manyTill |
2023-06-18 02:45:46 +0200 | <lambdabot> | error: Variable not in scope: manyTill |
2023-06-18 02:46:12 +0200 | <EvanR> | manyTill :: Alternative m => m a -> m end -> m [a] |
2023-06-18 02:47:01 +0200 | <EvanR> | Alternative adds the ability to repeat a parser |
2023-06-18 02:47:20 +0200 | <EvanR> | so looks like you don't need monads |
2023-06-18 02:47:44 +0200 | merijn | (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) |
2023-06-18 02:49:18 +0200 | <ijqq> | In my code i have Parser a = Parser {parse :: String -> Maybe (String, a)} so I think I can definitely write a function which will be like Parser $\ case ('\\':xs) | x `elem` escapeChars ... .But I was wondering how to write something similar to how my other functions are |
2023-06-18 02:49:51 +0200 | <EvanR> | if you write explicit code that's another story |
2023-06-18 02:50:35 +0200 | <EvanR> | if you implemented Alternative you can use manyTill from Text.Parser.Combinators |
2023-06-18 02:50:35 +0200 | arrowhead | (~arrowhead@2603-7000-9b3f-6934-a88a-36a7-e0af-5d4c.res6.spectrum.com) (Read error: Connection reset by peer) |
2023-06-18 02:51:54 +0200 | arrowhead | (~arrowhead@2603-7000-9b3f-6934-a88a-36a7-e0af-5d4c.res6.spectrum.com) |
2023-06-18 02:53:33 +0200 | <ijqq> | Hmm, I don't seem to have that library; I can't import it. But thanks for the help, maybe I'll try write something similar. |
2023-06-18 02:54:13 +0200 | <EvanR> | you could read the docs if you don't want to add the package https://hackage.haskell.org/package/parsers-0.12.11/docs/Text-Parser-Combinators.html#v:manyTill |
2023-06-18 02:55:07 +0200 | <EvanR> | the implementation is 1 line |
2023-06-18 02:56:09 +0200 | fweht | (uid404746@id-404746.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
2023-06-18 03:04:25 +0200 | machinedgod | (~machinedg@d198-53-218-113.abhsia.telus.net) |
2023-06-18 03:04:25 +0200 | arrowhead | (~arrowhead@2603-7000-9b3f-6934-a88a-36a7-e0af-5d4c.res6.spectrum.com) (Read error: Connection reset by peer) |
2023-06-18 03:05:20 +0200 | arrowhead | (~arrowhead@2603-7000-9b3f-6934-a88a-36a7-e0af-5d4c.res6.spectrum.com) |
2023-06-18 03:05:45 +0200 | tomku | (~tomku@user/tomku) (Ping timeout: 260 seconds) |
2023-06-18 03:09:24 +0200 | L29Ah | (~L29Ah@wikipedia/L29Ah) (Ping timeout: 252 seconds) |
2023-06-18 03:09:38 +0200 | <ijqq> | manyTill :: Alternative m => m a -> m end -> m [a] I still don't really understand how I can use it. So end would be a parser that inspects two chars and if the first is not a backslash and second is a quote, then it succeeds? And the m a I think would be a Parser String as I need to look at two chars at a time. So then It'd give me Parser [String]? |
2023-06-18 03:09:48 +0200 | tomku | (~tomku@user/tomku) |
2023-06-18 03:10:12 +0200 | albet70 | (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
2023-06-18 03:13:15 +0200 | Ranhir | (~Ranhir@157.97.53.139) (Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/) |
2023-06-18 03:16:20 +0200 | albet70 | (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
2023-06-18 03:16:52 +0200 | Ranhir | (~Ranhir@157.97.53.139) |
2023-06-18 03:17:06 +0200 | harveypwca | (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) (Quit: Leaving) |
2023-06-18 03:22:14 +0200 | merijn | (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 252 seconds) |
2023-06-18 03:22:55 +0200 | tomku | (~tomku@user/tomku) (Read error: Connection reset by peer) |
2023-06-18 03:26:26 +0200 | chromoblob | (~user@37.113.180.121) |
2023-06-18 03:27:09 +0200 | tomku | (~tomku@user/tomku) |
2023-06-18 03:33:39 +0200 | <EvanR> | ijqq, end would inspect 1 char, to see if it's a " |
2023-06-18 03:34:34 +0200 | <EvanR> | the a in m a is what type the parser produces, not what it inspects |
2023-06-18 03:35:18 +0200 | <EvanR> | so if you are parsing a string literal to get character by character (interpreting escapes in the process), a = Char and [a] is String |
2023-06-18 03:36:59 +0200 | tomku | (~tomku@user/tomku) (Read error: Connection reset by peer) |
2023-06-18 03:38:30 +0200 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 240 seconds) |
2023-06-18 03:39:44 +0200 | <monochrom> | manyTill is unlikely to help if you need lookahead/backtrack of 2 or more characters. |
2023-06-18 03:39:59 +0200 | trev | (~trev@user/trev) |
2023-06-18 03:40:41 +0200 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) |
2023-06-18 03:41:45 +0200 | <monochrom> | Err, no, I was wrong. |
2023-06-18 03:42:11 +0200 | <EvanR> | the inner parser here could consume 1 or 2 characters to generate the next literal character |
2023-06-18 03:42:58 +0200 | <monochrom> | Yeah, I just realized that "foo :: Parser Char" does not mean that it cannot consume 2 characters. |
2023-06-18 03:45:29 +0200 | Angelz | (~Angelz@2605:6400:30:fc15:9bd1:2217:41cd:bb15) |
2023-06-18 03:46:34 +0200 | <monochrom> | foo = satisfy (/= '\\') <|> (char '\\' *> fmap translate_escape_code anyChar) |
2023-06-18 03:48:49 +0200 | <EvanR> | that lines of code makes me hate /= |
2023-06-18 03:49:14 +0200 | <monochrom> | > let (!=) = (/=) in 1 != 2 |
2023-06-18 03:49:15 +0200 | <lambdabot> | True |
2023-06-18 03:49:28 +0200 | <monochrom> | I think you can do that if you hate /= :) |
2023-06-18 03:49:33 +0200 | <monochrom> | In fact, =) |
2023-06-18 03:49:52 +0200 | hugo | (znc@verdigris.lysator.liu.se) (Ping timeout: 240 seconds) |
2023-06-18 03:50:42 +0200 | <monochrom> | I think you can also do this: |
2023-06-18 03:50:49 +0200 | <monochrom> | > let (\=) = (/=) in 1 \= 2 |
2023-06-18 03:50:51 +0200 | <lambdabot> | True |
2023-06-18 03:51:00 +0200 | <monochrom> | foo = satisfy (\= '\\') <|> (char '\\' *> fmap translate_escape_code anyChar) |
2023-06-18 03:51:50 +0200 | <monochrom> | "monochrom received a backlash for proposing backslash-intensive code" :) |
2023-06-18 03:51:50 +0200 | arrowhead | (~arrowhead@2603-7000-9b3f-6934-a88a-36a7-e0af-5d4c.res6.spectrum.com) (Read error: Connection reset by peer) |
2023-06-18 03:52:16 +0200 | tomku | (~tomku@user/tomku) |
2023-06-18 03:52:46 +0200 | arrowhead | (~arrowhead@2603-7000-9b3f-6934-a88a-36a7-e0af-5d4c.res6.spectrum.com) |
2023-06-18 03:52:59 +0200 | parseval | (sid239098@id-239098.helmsley.irccloud.com) (Server closed connection) |
2023-06-18 03:53:13 +0200 | parseval | (sid239098@id-239098.helmsley.irccloud.com) |
2023-06-18 04:04:58 +0200 | wroathe | (~wroathe@207-153-38-140.fttp.usinternet.com) |
2023-06-18 04:04:58 +0200 | wroathe | (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host) |
2023-06-18 04:04:58 +0200 | wroathe | (~wroathe@user/wroathe) |
2023-06-18 04:04:58 +0200 | arrowhead | (~arrowhead@2603-7000-9b3f-6934-a88a-36a7-e0af-5d4c.res6.spectrum.com) (Read error: Connection reset by peer) |
2023-06-18 04:06:20 +0200 | arrowhead | (~arrowhead@2603-7000-9b3f-6934-a88a-36a7-e0af-5d4c.res6.spectrum.com) |
2023-06-18 04:07:02 +0200 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:2847:13c1:54f7:ebbc) (Remote host closed the connection) |
2023-06-18 04:07:50 +0200 | gurkenglas | (~user@dynamic-046-114-176-022.46.114.pool.telefonica.de) |
2023-06-18 04:14:33 +0200 | bilegeek | (~bilegeek@2600:1008:b085:8180:1da1:2103:9ba6:bd4d) (Quit: Leaving) |
2023-06-18 04:15:25 +0200 | nate2 | (~nate@c-98-45-169-16.hsd1.ca.comcast.net) |
2023-06-18 04:16:16 +0200 | finn_elija | (~finn_elij@user/finn-elija/x-0085643) |
2023-06-18 04:16:16 +0200 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija))) |
2023-06-18 04:16:16 +0200 | finn_elija | FinnElija |
2023-06-18 04:22:19 +0200 | <[Leary]> | ijqq: You can do what you want with what you've already written. Consider something of the form: `char '"' *> (fmap _ . many) (isMany _ <|> escape) <* char '"'`. I'd venture it's faster too, though you may need to rewrite `isMany` as a primitive. |
2023-06-18 04:29:27 +0200 | mud | (~mud@user/kadoban) (Remote host closed the connection) |
2023-06-18 04:29:52 +0200 | tomku | (~tomku@user/tomku) (Ping timeout: 240 seconds) |
2023-06-18 04:29:52 +0200 | mud | (~mud@user/kadoban) |
2023-06-18 04:30:20 +0200 | hpc | (~juzz@ip98-169-35-163.dc.dc.cox.net) (Ping timeout: 240 seconds) |
2023-06-18 04:30:33 +0200 | hpc | (~juzz@ip98-169-35-163.dc.dc.cox.net) |
2023-06-18 04:31:16 +0200 | oneeyedalien | (~oneeyedal@user/oneeyedalien) |
2023-06-18 04:32:01 +0200 | tomku | (~tomku@user/tomku) |
2023-06-18 04:32:01 +0200 | arrowhead | (~arrowhead@2603-7000-9b3f-6934-a88a-36a7-e0af-5d4c.res6.spectrum.com) (Read error: Connection reset by peer) |
2023-06-18 04:32:46 +0200 | arrowhead | (~arrowhead@2603-7000-9b3f-6934-a88a-36a7-e0af-5d4c.res6.spectrum.com) |
2023-06-18 04:38:40 +0200 | hugo | (znc@verdigris.lysator.liu.se) |
2023-06-18 04:38:40 +0200 | arrowhead | (~arrowhead@2603-7000-9b3f-6934-a88a-36a7-e0af-5d4c.res6.spectrum.com) (Read error: Connection reset by peer) |
2023-06-18 04:39:14 +0200 | td_ | (~td@i5387091A.versanet.de) (Ping timeout: 252 seconds) |
2023-06-18 04:39:16 +0200 | arrowhead | (~arrowhead@2603-7000-9b3f-6934-a88a-36a7-e0af-5d4c.res6.spectrum.com) |
2023-06-18 04:41:13 +0200 | td_ | (~td@i5387092E.versanet.de) |
2023-06-18 04:41:21 +0200 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:2847:13c1:54f7:ebbc) |
2023-06-18 04:43:23 +0200 | tomku | (~tomku@user/tomku) (Read error: Connection reset by peer) |
2023-06-18 04:44:16 +0200 | tomku | (~tomku@user/tomku) |
2023-06-18 04:52:11 +0200 | jinsun | (~jinsun@user/jinsun) (Ping timeout: 246 seconds) |
2023-06-18 04:54:00 +0200 | merijn | (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) |
2023-06-18 04:57:04 +0200 | jinsun | (~jinsun@user/jinsun) |
2023-06-18 05:02:20 +0200 | bitmapper | (uid464869@id-464869.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
2023-06-18 05:03:32 +0200 | tomku | (~tomku@user/tomku) (Ping timeout: 240 seconds) |
2023-06-18 05:14:32 +0200 | chromoblob | (~user@37.113.180.121) (Ping timeout: 240 seconds) |
2023-06-18 05:18:39 +0200 | nate2 | (~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 258 seconds) |
2023-06-18 05:19:55 +0200 | arrowhead | (~arrowhead@2603-7000-9b3f-6934-a88a-36a7-e0af-5d4c.res6.spectrum.com) (Read error: Connection reset by peer) |
2023-06-18 05:21:03 +0200 | arrowhead | (~arrowhead@2603-7000-9b3f-6934-a88a-36a7-e0af-5d4c.res6.spectrum.com) |
2023-06-18 05:22:01 +0200 | chromoblob | (~user@37.113.180.121) |
2023-06-18 05:27:32 +0200 | merijn | (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 240 seconds) |
2023-06-18 05:32:49 +0200 | ijqq | (uid603979@id-603979.helmsley.irccloud.com) (Quit: Connection closed for inactivity) |
2023-06-18 05:38:23 +0200 | <mauke> | > let (≠) = (/=) in 1 ≠ 2 |
2023-06-18 05:38:24 +0200 | <lambdabot> | True |
2023-06-18 05:39:43 +0200 | azimut | (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection) |
2023-06-18 05:39:43 +0200 | arrowhead | (~arrowhead@2603-7000-9b3f-6934-a88a-36a7-e0af-5d4c.res6.spectrum.com) (Read error: Connection reset by peer) |
2023-06-18 05:40:10 +0200 | azimut | (~azimut@gateway/tor-sasl/azimut) |
2023-06-18 05:40:35 +0200 | arrowhead | (~arrowhead@2603-7000-9b3f-6934-a88a-36a7-e0af-5d4c.res6.spectrum.com) |
2023-06-18 05:42:50 +0200 | <EvanR> | \o/ |
2023-06-18 05:42:52 +0200 | <EvanR> | ⦻ |
2023-06-18 05:43:04 +0200 | falafel | (~falafel@2607:fb91:86c:d890:3d8c:5948:319b:d394) |
2023-06-18 05:43:32 +0200 | <EvanR> | who needs unicode, just =<backspace>/ |
2023-06-18 05:50:16 +0200 | Inst | (~Inst@2601:6c4:4081:2fc0:4f54:13aa:bf33:bb41) |
2023-06-18 05:50:17 +0200 | <Inst> | wait |
2023-06-18 05:50:32 +0200 | <Inst> | well, i guess voidf still isn't a monad because free monads are cheating |
2023-06-18 05:50:35 +0200 | <Inst> | but it's giggly |
2023-06-18 05:52:34 +0200 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 252 seconds) |
2023-06-18 05:53:09 +0200 | gurkenglas | (~user@dynamic-046-114-176-022.46.114.pool.telefonica.de) (Ping timeout: 258 seconds) |
2023-06-18 05:59:09 +0200 | meeks | (~meeks@2600:6c5e:1300:28:4756:6a12:671:5a0d) |
2023-06-18 06:01:16 +0200 | falafel | (~falafel@2607:fb91:86c:d890:3d8c:5948:319b:d394) (Remote host closed the connection) |
2023-06-18 06:02:07 +0200 | meeks | (~meeks@2600:6c5e:1300:28:4756:6a12:671:5a0d) (Quit: WeeChat 3.5) |
2023-06-18 06:11:45 +0200 | <Nosrep> | after further experimentation on the worker-wrapper thing i have discovered on a flat datatype of Words ghc refuses to do the worker-wrapper trick when there are >10 Words in the type |
2023-06-18 06:12:09 +0200 | <Nosrep> | this also happens when i put the Words in another datatype like a tuple with 2 elements, the maximum is 5 of those wrapper datatypes so still 10 words total |
2023-06-18 06:12:25 +0200 | <Nosrep> | whats ghc's rationale for limiting it at 10 |
2023-06-18 06:15:42 +0200 | tomku | (~tomku@user/tomku) |
2023-06-18 06:16:33 +0200 | <Nosrep> | hm -fmax-worker-args |
2023-06-18 06:25:20 +0200 | azimut | (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 240 seconds) |
2023-06-18 06:44:08 +0200 | machinedgod | (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 258 seconds) |
2023-06-18 06:44:38 +0200 | Midjak | (~Midjak@82.66.147.146) (Quit: This computer has gone to sleep) |
2023-06-18 06:45:21 +0200 | tomku | (~tomku@user/tomku) (Read error: Connection reset by peer) |
2023-06-18 06:48:16 +0200 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection) |
2023-06-18 06:50:27 +0200 | tomku | (~tomku@user/tomku) |
2023-06-18 06:52:20 +0200 | bontaq | (~user@ool-45779b84.dyn.optonline.net) (Ping timeout: 252 seconds) |
2023-06-18 07:08:14 +0200 | nadja | (~dequbed@banana-new.kilobyte22.de) (Server closed connection) |
2023-06-18 07:08:52 +0200 | nadja | (~dequbed@2a01:4f8:201:34c7::1) |
2023-06-18 07:09:00 +0200 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) |
2023-06-18 07:20:25 +0200 | tomku | (~tomku@user/tomku) (Read error: Connection reset by peer) |
2023-06-18 07:21:24 +0200 | coot | (~coot@89.69.206.216) |
2023-06-18 07:21:25 +0200 | arrowhead | (~arrowhead@2603-7000-9b3f-6934-a88a-36a7-e0af-5d4c.res6.spectrum.com) (Read error: Connection reset by peer) |
2023-06-18 07:22:12 +0200 | arrowhead | (~arrowhead@cpe-74-66-76-151.nyc.res.rr.com) |
2023-06-18 07:22:55 +0200 | smoge | (~smoge@2603-7000-4b42-1100-9dab-c33e-5e93-2285.res6.spectrum.com) |
2023-06-18 07:25:05 +0200 | tomku | (~tomku@user/tomku) |
2023-06-18 07:28:46 +0200 | <smoge> | can someone help a beginner to define a type? |
2023-06-18 07:32:18 +0200 | <smoge> | http://recherche.ircam.fr/equipes/repmus/OpenMusic/user-doc/DocFiles/Documentation/Rhythm.html |
2023-06-18 07:32:34 +0200 | <smoge> | It isn't quite right: |
2023-06-18 07:32:34 +0200 | <smoge> | data RTMNode = RTMInt Int | RTMList [RTMNode] deriving (Show) |
2023-06-18 07:33:28 +0200 | <pavonia> | What's wrong with it? |
2023-06-18 07:34:40 +0200 | <smoge> | A Rhythm Tree is a list of lists, it can be a list of ints (1 1 1 2), or one of the items can be subdivided, for example, 1 becomes (1 (1 1 1)). the list would become ((1 (1 1 1)) 1 1 2) |
2023-06-18 07:34:53 +0200 | <smoge> | I can't translate that into a type |
2023-06-18 07:36:00 +0200 | <smoge> | It's a way to represent music rhythms |
2023-06-18 07:36:26 +0200 | <davean> | Do you mean you want data RTMNode = RTMInt Int | RTMList Int [RTMNode] deriving (Show)? |
2023-06-18 07:36:40 +0200 | <davean> | I'm a little confused as to what you mean is off |
2023-06-18 07:36:45 +0200 | <chromoblob> | why doesn't your definition work? |
2023-06-18 07:37:16 +0200 | <davean> | can it not nest further? You say tree so I assume it can |
2023-06-18 07:37:19 +0200 | <smoge> | because my original definition is too general, thatnks davean, maybe it will work, I'll test it |
2023-06-18 07:37:37 +0200 | <smoge> | it should be recursive, yes |
2023-06-18 07:37:57 +0200 | <smoge> | http://recherche.ircam.fr/equipes/repmus/OpenMusic/user-doc/DocFiles/Documentation/Rhythm.html |
2023-06-18 07:37:58 +0200 | <chromoblob> | RTMList [RTMList [RTMInt 1, RTMList [RTMInt 1, RTMInt 1, RTMInt 1]], RTMInt 1, RTMInt 1, RTMInt 2] |
2023-06-18 07:38:00 +0200 | <davean> | you might also want to see NonEmpty |
2023-06-18 07:38:16 +0200 | <probie> | I'd be inclined to go with `data RTMNode = RTMNode Int [RTMNode]` |
2023-06-18 07:38:33 +0200 | <smoge> | why NonEmpty? |
2023-06-18 07:39:28 +0200 | <smoge> | Is it problematic to use |
2023-06-18 07:39:28 +0200 | <smoge> | showRTM :: RTMNode -> String |
2023-06-18 07:39:29 +0200 | <smoge> | showRTM (RTMInt i) = show i |
2023-06-18 07:39:29 +0200 | <smoge> | showRTM (RTMList l) = "(" ++ unwords (map showRTM l) ++ ")" |
2023-06-18 07:39:42 +0200 | <smoge> | so it would show a more readable output |
2023-06-18 07:40:56 +0200 | <chromoblob> | showRTM seems fine |
2023-06-18 07:41:14 +0200 | <smoge> | @probie why? in addiction to RTMNode = RTMInt Int | RTMList Int [RTMNode] ? |
2023-06-18 07:41:14 +0200 | <lambdabot> | Unknown command, try @list |
2023-06-18 07:41:24 +0200 | <smoge> | probie why? in addiction to RTMNode = RTMInt Int | RTMList Int [RTMNode] ? |
2023-06-18 07:43:07 +0200 | <probie> | smoge: You can't have an empty list. I'm just being lazy and folding `data RTMNode = RTMInt Int | RTMList Int (NonEmpty RTMNode)` into a single constructor |
2023-06-18 07:44:44 +0200 | <smoge> | makes sense, thanks |
2023-06-18 07:44:44 +0200 | tomku | (~tomku@user/tomku) (Read error: Connection reset by peer) |
2023-06-18 07:44:59 +0200 | oneeyedalien | (~oneeyedal@user/oneeyedalien) (Quit: Leaving) |
2023-06-18 07:45:14 +0200 | <probie> | but on re-reading I don't think this is sufficient, since according to the spec, I need to support fractions, and at the measure level, genuinely need pairs (at least if I want to distinguish between things like 4/4 and 2/2) |
2023-06-18 07:46:45 +0200 | <smoge> | Yes, that's just part of the syntax. Those are the time signatures. I'll need a type for that I think |
2023-06-18 07:48:04 +0200 | hpc | (~juzz@ip98-169-35-163.dc.dc.cox.net) (Ping timeout: 252 seconds) |
2023-06-18 07:48:38 +0200 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer) |
2023-06-18 07:49:56 +0200 | tomku | (~tomku@user/tomku) |
2023-06-18 07:50:20 +0200 | hpc | (~juzz@98.169.35.163) |
2023-06-18 07:51:30 +0200 | phileasfogg | (~phileasfo@user/phileasfogg) (Server closed connection) |
2023-06-18 07:51:53 +0200 | phileasfogg | (~phileasfo@user/phileasfogg) |
2023-06-18 07:52:30 +0200 | <smoge> | Where should I start to write a little parser for this? Any tips? |
2023-06-18 07:53:56 +0200 | jpds | (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection) |
2023-06-18 07:55:40 +0200 | jpds | (~jpds@gateway/tor-sasl/jpds) |
2023-06-18 07:56:08 +0200 | <smoge> | beatParser :: Parser RTMNode |
2023-06-18 07:56:09 +0200 | <smoge> | beatParser = RTMInt . read <$> many1 digit |
2023-06-18 07:56:09 +0200 | <smoge> | rtmParser :: Parser RTMNode |
2023-06-18 07:56:10 +0200 | <smoge> | rtmParser = try beatParser <|> listParser |
2023-06-18 07:56:10 +0200 | <smoge> | listParser :: Parser RTMNode |
2023-06-18 07:56:11 +0200 | <smoge> | listParser = do |
2023-06-18 07:56:11 +0200 | <smoge> | _ <- char '(' |
2023-06-18 07:56:12 +0200 | <smoge> | nodes <- sepBy rtmParser (many1 space) |
2023-06-18 07:56:12 +0200 | <smoge> | _ <- char ')' |
2023-06-18 07:56:13 +0200 | <smoge> | return $ RTMList nodes |
2023-06-18 07:56:13 +0200 | <smoge> | parseRTM :: String -> Either ParseError RTMNode |
2023-06-18 07:56:14 +0200 | <smoge> | parseRTM = parse rtmParser "" |
2023-06-18 07:59:29 +0200 | <mauke> | listParser = RTMList <$> (char '(' *> sepBy rtmParser (many1 space) <* char ')') -- using Applicative |
2023-06-18 07:59:37 +0200 | <probie> | Does that handle rests? (which are represented with negative numbers) |
2023-06-18 07:59:48 +0200 | dy | (sid3438@user/dy) (Server closed connection) |
2023-06-18 08:00:25 +0200 | dy | (sid3438@user/dy) |
2023-06-18 08:03:31 +0200 | <probie> | I also think it fails when there are spaces where you don't expect, for example, try it on `(2( (1(1 1 1 1))(1(1 1 1 1)))` |
2023-06-18 08:08:39 +0200 | tomku | (~tomku@user/tomku) (Read error: Connection reset by peer) |
2023-06-18 08:08:56 +0200 | <smoge> | Yes, it's not very good. But I'm just starting with Haskell. I'd appreciate some tips |
2023-06-18 08:10:30 +0200 | <probie> | I'm not sure what parsing library you're using, but it probably has some sort of `lexeme` combinator that you probably want to look into using for handling whitespace |
2023-06-18 08:11:56 +0200 | <smoge> | thanks probie. yes, I haven't thought about rests yet.... |
2023-06-18 08:13:48 +0200 | tomku | (~tomku@user/tomku) |
2023-06-18 08:15:05 +0200 | <smoge> | probie, Parsec. I think you're suggesting this? https://hackage.haskell.org/package/parsec-3.1.3/docs/Text-Parsec-Token.html#v:lexeme |
2023-06-18 08:15:30 +0200 | jinsun | (~jinsun@user/jinsun) (Ping timeout: 240 seconds) |
2023-06-18 08:16:03 +0200 | jinsun | (~jinsun@user/jinsun) |
2023-06-18 08:16:58 +0200 | puke | (~puke@user/puke) (Remote host closed the connection) |
2023-06-18 08:25:16 +0200 | Pickchea | (~private@user/pickchea) |
2023-06-18 08:26:32 +0200 | acidjnk | (~acidjnk@p5dd870a3.dip0.t-ipconnect.de) |
2023-06-18 08:33:53 +0200 | jonathan_ | (~jonathan@83.252.3.92) |
2023-06-18 08:39:17 +0200 | lottaquestions_ | (~nick@2607:fa49:503f:6d00:ed09:2f19:74f7:7b05) |
2023-06-18 08:41:26 +0200 | lottaquestions | (~nick@2607:fa49:503f:6d00:a5bc:3af4:48cc:9dd6) (Ping timeout: 265 seconds) |
2023-06-18 08:41:43 +0200 | puke | (~puke@user/puke) |
2023-06-18 08:41:58 +0200 | emmanuelux | (~emmanuelu@user/emmanuelux) (Ping timeout: 252 seconds) |
2023-06-18 08:43:24 +0200 | monochrom | (trebla@216.138.220.146) (Quit: NO CARRIER) |
2023-06-18 08:44:08 +0200 | lottaquestions_ | (~nick@2607:fa49:503f:6d00:ed09:2f19:74f7:7b05) (Client Quit) |
2023-06-18 08:44:32 +0200 | lottaquestions_ | (~nick@2607:fa49:503f:6d00:ed09:2f19:74f7:7b05) |
2023-06-18 08:48:56 +0200 | cafkafk | (~cafkafk@fsf/member/cafkafk) (Ping timeout: 240 seconds) |
2023-06-18 08:51:13 +0200 | cafkafk | (~cafkafk@fsf/member/cafkafk) |
2023-06-18 09:01:00 +0200 | shapr | (~user@2600:1700:c640:3100:11cd:d5ec:6209:48bd) (Ping timeout: 260 seconds) |
2023-06-18 09:01:11 +0200 | takuan | (~takuan@178.116.218.225) |
2023-06-18 09:01:32 +0200 | monochrom | (trebla@216.138.220.146) |
2023-06-18 09:10:12 +0200 | jargon | (~jargon@184.101.75.235) (Ping timeout: 252 seconds) |
2023-06-18 09:13:15 +0200 | gmg | (~user@user/gehmehgeh) |
2023-06-18 09:13:36 +0200 | gmg | (~user@user/gehmehgeh) (Client Quit) |
2023-06-18 09:13:39 +0200 | conjunctive | (sid433686@id-433686.helmsley.irccloud.com) (Server closed connection) |
2023-06-18 09:14:15 +0200 | conjunctive | (sid433686@2a03:5180:f:1::6:9e16) |
2023-06-18 09:16:25 +0200 | Pickchea | (~private@user/pickchea) (Quit: Leaving) |
2023-06-18 09:17:00 +0200 | lambdabot | (~lambdabot@haskell/bot/lambdabot) (Server closed connection) |
2023-06-18 09:18:03 +0200 | zxrom | (~zxrom@mm-196-2-212-37.vitebsk.dynamic.pppoe.byfly.by) (Quit: Leaving) |
2023-06-18 09:19:03 +0200 | gmg | (~user@user/gehmehgeh) |
2023-06-18 09:19:08 +0200 | lambdabot | (~lambdabot@silicon.int-e.eu) |
2023-06-18 09:19:08 +0200 | lambdabot | (~lambdabot@silicon.int-e.eu) (Changing host) |
2023-06-18 09:19:08 +0200 | lambdabot | (~lambdabot@haskell/bot/lambdabot) |
2023-06-18 09:20:48 +0200 | merijn | (~merijn@86.86.29.250) |
2023-06-18 09:26:53 +0200 | dtman34 | (~dtman34@2601:447:d000:93c9:2c61:433f:e0a9:a7c4) |
2023-06-18 09:36:00 +0200 | dtman34 | (~dtman34@2601:447:d000:93c9:2c61:433f:e0a9:a7c4) (Ping timeout: 260 seconds) |
2023-06-18 09:36:01 +0200 | dtman34_ | (~dtman34@2601:447:d000:93c9:b581:a620:d736:2367) |
2023-06-18 09:36:58 +0200 | zxrom | (~zxrom@mm-196-2-212-37.vitebsk.dynamic.pppoe.byfly.by) |
2023-06-18 09:40:49 +0200 | Tuplanolla | (~Tuplanoll@91-159-68-236.elisa-laajakaista.fi) |
2023-06-18 09:44:42 +0200 | dtman34 | (~dtman34@2601:447:d000:93c9:626c:6ed7:c046:4c00) |
2023-06-18 09:44:44 +0200 | dtman34_ | (~dtman34@2601:447:d000:93c9:b581:a620:d736:2367) (Ping timeout: 240 seconds) |
2023-06-18 09:49:15 +0200 | ubert | (~Thunderbi@p200300ecdf0da912f884ed912556b966.dip0.t-ipconnect.de) (Quit: ubert) |
2023-06-18 09:49:33 +0200 | Guest44 | (~Guest39@1.145.147.142) |
2023-06-18 09:54:12 +0200 | merijn | (~merijn@86.86.29.250) (Ping timeout: 240 seconds) |
2023-06-18 09:59:23 +0200 | <Guest44> | trouble getting started with this command: |
2023-06-18 09:59:23 +0200 | <Guest44> | ghci part18.lhs |
2023-06-18 09:59:24 +0200 | <Guest44> | where part18.lhs comes from https://www.haskell.org/tutorial/code/ |
2023-06-18 09:59:24 +0200 | <Guest44> | error reported: part18.lhs:46:12: error: |
2023-06-18 09:59:25 +0200 | <Guest44> | • No instance for (Applicative SM) |
2023-06-18 09:59:25 +0200 | <Guest44> | arising from the superclasses of an instance declaration |
2023-06-18 09:59:26 +0200 | <Guest44> | • In the instance declaration for ‘Monad SM’ |
2023-06-18 09:59:26 +0200 | <Guest44> | line 46 starts with > instance Monad in the following: |
2023-06-18 09:59:45 +0200 | <Guest44> | Section 9.3 |
2023-06-18 09:59:46 +0200 | <Guest44> | > type S = Int |
2023-06-18 09:59:46 +0200 | <Guest44> | > data SM a = SM (S -> (a,S)) -- The monadic type |
2023-06-18 09:59:47 +0200 | <Guest44> | > instance Monad SM where |
2023-06-18 09:59:47 +0200 | <Guest44> | > -- defines state propagation |
2023-06-18 09:59:48 +0200 | <lambdabot> | <hint>:1:1: error: parse error on input ‘type’ |
2023-06-18 09:59:48 +0200 | <Guest44> | > SM c1 >>= fc2 = SM (\s0 -> let (r,s1) = c1 s0 |
2023-06-18 09:59:48 +0200 | <lambdabot> | <hint>:1:1: error: parse error on input ‘data’ |
2023-06-18 09:59:48 +0200 | <Guest44> | > SM c2 = fc2 r in |
2023-06-18 09:59:49 +0200 | <Guest44> | > c2 s1) |
2023-06-18 09:59:49 +0200 | <lambdabot> | <hint>:1:1: error: parse error on input ‘instance’ |
2023-06-18 09:59:49 +0200 | <Guest44> | > return k = SM (\s -> (k,s)) |
2023-06-18 10:08:40 +0200 | <probie> | Guest44: That tutorial might be outdated. You now also need to define an `Applicative` instance. |
2023-06-18 10:10:27 +0200 | <probie> | Since you've already defined a monad instance, you should be able to do something like `instance Applicative SM where { pure = return; f <*> x = do { f' <- f; x' <- x; pure (f' x') }}` |
2023-06-18 10:13:25 +0200 | <probie> | also, in future if it's more than about 3 lines, use something like https://paste.tomsmeding.com and share the link |
2023-06-18 10:21:50 +0200 | <Guest44> | ok thanks probie |
2023-06-18 10:22:32 +0200 | merijn | (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) |
2023-06-18 10:23:14 +0200 | hammond | (proscan@user/hammond2) (Server closed connection) |
2023-06-18 10:23:22 +0200 | hammond | (proscan@gateway02.insomnia247.nl) |
2023-06-18 10:30:25 +0200 | Philonous | (~Philonous@user/philonous) (Quit: ZNC - https://znc.in) |
2023-06-18 10:30:51 +0200 | Philonous | (~Philonous@user/philonous) |
2023-06-18 10:31:50 +0200 | davean | (~davean@davean.sciesnet.net) (Server closed connection) |
2023-06-18 10:32:36 +0200 | davean | (~davean@67.205.182.208) |
2023-06-18 10:44:54 +0200 | hueso_ | (~root@user/hueso) (Server closed connection) |
2023-06-18 10:45:06 +0200 | hueso | (~root@user/hueso) |
2023-06-18 10:49:14 +0200 | alexherbo2 | (~alexherbo@2a02-842a-8180-4601-e9ea-f8a5-e557-b41f.rev.sfr.net) |
2023-06-18 10:51:11 +0200 | mcglk | (~mcglk@131.191.19.145) (Remote host closed the connection) |
2023-06-18 10:55:49 +0200 | aforemny | (~aforemny@static.248.158.34.188.clients.your-server.de) (Ping timeout: 268 seconds) |
2023-06-18 10:57:48 +0200 | _ht | (~Thunderbi@28-52-174-82.ftth.glasoperator.nl) |
2023-06-18 10:58:50 +0200 | dtman34 | (~dtman34@2601:447:d000:93c9:626c:6ed7:c046:4c00) (Ping timeout: 260 seconds) |
2023-06-18 10:58:50 +0200 | dtman34_ | (~dtman34@2601:447:d000:93c9:49a3:2ee1:9e07:c081) |
2023-06-18 11:01:37 +0200 | tzh | (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz) |
2023-06-18 11:01:40 +0200 | aforemny_ | (~aforemny@2001:9e8:6ce0:8f00:7cf4:9859:63d6:96a8) |
2023-06-18 11:02:30 +0200 | aforemny_ | (~aforemny@2001:9e8:6ce0:8f00:7cf4:9859:63d6:96a8) (Quit: ZNC 1.8.2 - https://znc.in) |
2023-06-18 11:03:34 +0200 | aforemny | (~aforemny@2001:9e8:6ce0:8f00:7cf4:9859:63d6:96a8) |
2023-06-18 11:08:42 +0200 | aforemny | (~aforemny@2001:9e8:6ce0:8f00:7cf4:9859:63d6:96a8) (Quit: ZNC 1.8.2 - https://znc.in) |
2023-06-18 11:09:40 +0200 | fendor | (~fendor@2a02:8388:1640:be00:7aca:a77a:4a28:631a) |
2023-06-18 11:10:16 +0200 | aforemny | (~aforemny@2001:9e8:6ce0:8f00:7cf4:9859:63d6:96a8) |
2023-06-18 11:12:20 +0200 | Lord_of_Life | (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 240 seconds) |
2023-06-18 11:13:17 +0200 | Lord_of_Life | (~Lord@user/lord-of-life/x-2819915) |
2023-06-18 11:15:52 +0200 | gurkenglas | (~user@dynamic-046-114-182-229.46.114.pool.telefonica.de) |
2023-06-18 11:22:41 +0200 | Guest44 | (~Guest39@1.145.147.142) (Quit: Client closed) |
2023-06-18 11:25:25 +0200 | merijn | (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 240 seconds) |
2023-06-18 11:43:14 +0200 | <tomsmeding> | :t Control.Monad.ap -- probie |
2023-06-18 11:43:16 +0200 | <lambdabot> | Monad m => m (a -> b) -> m a -> m b |
2023-06-18 11:43:38 +0200 | <tomsmeding> | {pure = return; (<*>) = ap} is a sufficient definition for Applicative once you have Monad |
2023-06-18 11:45:18 +0200 | titibandit | (~titibandi@user/titibandit) |
2023-06-18 11:48:57 +0200 | <probie> | tomsmeding: but that requires importing `Control.Monad` |
2023-06-18 11:52:26 +0200 | tubogram44711 | (~tubogram@user/tubogram) (Quit: See ya later!) |
2023-06-18 11:55:22 +0200 | <tomsmeding> | it does yeah |
2023-06-18 11:55:41 +0200 | gnalzo | (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) |
2023-06-18 11:55:54 +0200 | zxrom | (~zxrom@mm-196-2-212-37.vitebsk.dynamic.pppoe.byfly.by) (Leaving) |
2023-06-18 11:59:20 +0200 | kritzefitz | (~kritzefit@debian/kritzefitz) (Read error: Connection reset by peer) |
2023-06-18 11:59:36 +0200 | kritzefitz | (~kritzefit@debian/kritzefitz) |
2023-06-18 12:01:34 +0200 | tubogram44711 | (~tubogram@user/tubogram) |
2023-06-18 12:03:13 +0200 | merijn | (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) |
2023-06-18 12:07:28 +0200 | p3n | (~p3n@217.198.124.246) |
2023-06-18 12:08:59 +0200 | merijn | (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 240 seconds) |
2023-06-18 12:09:42 +0200 | Pickchea | (~private@user/pickchea) |
2023-06-18 12:11:25 +0200 | titibandit | (~titibandi@user/titibandit) (Ping timeout: 240 seconds) |
2023-06-18 12:13:30 +0200 | chromoblob | (~user@37.113.180.121) (Ping timeout: 260 seconds) |
2023-06-18 12:13:32 +0200 | titibandit | (~titibandi@user/titibandit) |
2023-06-18 12:20:10 +0200 | vgtw | (~vgtw@user/vgtw) (Server closed connection) |
2023-06-18 12:20:33 +0200 | vgtw | (~vgtw@user/vgtw) |
2023-06-18 12:20:50 +0200 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:2847:13c1:54f7:ebbc) (Remote host closed the connection) |
2023-06-18 12:25:59 +0200 | Inst | (~Inst@2601:6c4:4081:2fc0:4f54:13aa:bf33:bb41) (Ping timeout: 240 seconds) |
2023-06-18 12:26:07 +0200 | chromoblob | (~user@37.113.180.121) |
2023-06-18 12:27:55 +0200 | Inst | (~Inst@c-76-101-10-131.hsd1.fl.comcast.net) |
2023-06-18 12:31:48 +0200 | cafkafk | (~cafkafk@fsf/member/cafkafk) (Remote host closed the connection) |
2023-06-18 12:35:46 +0200 | merijn | (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) |
2023-06-18 12:36:03 +0200 | Sgeo | (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
2023-06-18 12:37:48 +0200 | cafkafk | (~cafkafk@fsf/member/cafkafk) |
2023-06-18 12:44:02 +0200 | <jackdk> | What name would you give this function? `Functor e => (forall x. f x -> e (g x)) -> Coyoneda f a -> e (Coyoneda g a)` |
2023-06-18 12:44:22 +0200 | <jackdk> | It's like a `traversish` analogue of `hoist` |
2023-06-18 12:48:57 +0200 | Unicorn_Princess | (~Unicorn_P@user/Unicorn-Princess/x-3540542) |
2023-06-18 12:49:54 +0200 | ubert | (~Thunderbi@p200300ecdf0da912f884ed912556b966.dip0.t-ipconnect.de) |
2023-06-18 12:50:30 +0200 | [Leary] | (~Leary]@user/Leary/x-0910699) (Server closed connection) |
2023-06-18 12:50:31 +0200 | michalz | (~michalz@185.246.207.217) |
2023-06-18 12:50:49 +0200 | michalz | (~michalz@185.246.207.217) (Remote host closed the connection) |
2023-06-18 12:54:33 +0200 | <ncf> | hoistFCoyoneda? |
2023-06-18 12:56:43 +0200 | <probie> | Can we directly go `Functor e => Coyoneda (e g) a -> e (Coyoneda g a)`? |
2023-06-18 12:57:00 +0200 | <probie> | s/(e g)/(Compose e g)/ |
2023-06-18 12:59:14 +0200 | <probie> | `\(Coyenda f (Compose x)) -> fmap (Coyoneda f) x` |
2023-06-18 13:00:20 +0200 | <probie> | I think that function should get a name, and then it's really just `thatFunction . hoist` |
2023-06-18 13:00:59 +0200 | <ncf> | still have to insert Compose and getCompose in the middle |
2023-06-18 13:01:02 +0200 | AlexNoo | (~AlexNoo@178.34.163.88) (Read error: Connection reset by peer) |
2023-06-18 13:01:25 +0200 | AlexNoo | (~AlexNoo@178.34.163.88) |
2023-06-18 13:01:43 +0200 | <ncf> | well, hoist (Compose . f) or something |
2023-06-18 13:03:33 +0200 | <probie> | To match `Functor e => (forall x. f x -> e (g x)) -> Coyoneda f a -> e (Coyoneda g a)`, sure. But this is conceptually just a regular hoist, followed by lowering the coyoneda one layer |
2023-06-18 13:10:12 +0200 | L29Ah | (~L29Ah@wikipedia/L29Ah) |
2023-06-18 13:10:22 +0200 | merijn | (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 252 seconds) |
2023-06-18 13:10:31 +0200 | Unicorn_Princess | (~Unicorn_P@user/Unicorn-Princess/x-3540542) (Remote host closed the connection) |
2023-06-18 13:13:44 +0200 | __monty__ | (~toonn@user/toonn) |
2023-06-18 13:17:17 +0200 | waleee | (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) |
2023-06-18 13:21:19 +0200 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:2847:13c1:54f7:ebbc) |
2023-06-18 13:21:25 +0200 | titibandit | (~titibandi@user/titibandit) (Ping timeout: 240 seconds) |
2023-06-18 13:21:35 +0200 | titibandit | (~titibandi@user/titibandit) |
2023-06-18 13:23:25 +0200 | Techcable | (~Techcable@user/Techcable) |
2023-06-18 13:25:32 +0200 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:2847:13c1:54f7:ebbc) (Ping timeout: 240 seconds) |
2023-06-18 13:25:32 +0200 | titibandit | (~titibandi@user/titibandit) (Read error: Connection reset by peer) |
2023-06-18 13:26:46 +0200 | [Leary] | (~Leary]@user/Leary/x-0910699) |
2023-06-18 13:29:19 +0200 | titibandit | (~titibandi@user/titibandit) |
2023-06-18 13:33:39 +0200 | astra | (sid289983@id-289983.hampstead.irccloud.com) (Server closed connection) |
2023-06-18 13:34:20 +0200 | titibandit | (~titibandi@user/titibandit) (Ping timeout: 240 seconds) |
2023-06-18 13:34:27 +0200 | astra | (sid289983@2a03:5180:f:4::4:6cbf) |
2023-06-18 13:34:29 +0200 | titibandit | (~titibandi@user/titibandit) |
2023-06-18 13:36:10 +0200 | merijn | (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) |
2023-06-18 13:38:40 +0200 | acidjnk | (~acidjnk@p5dd870a3.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
2023-06-18 13:40:29 +0200 | merijn | (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 240 seconds) |
2023-06-18 13:41:22 +0200 | bontaq | (~user@ool-45779b84.dyn.optonline.net) |
2023-06-18 13:56:43 +0200 | pavonia | (~user@user/siracusa) (Quit: Bye!) |
2023-06-18 13:58:59 +0200 | Pickchea | (~private@user/pickchea) (Quit: Leaving) |
2023-06-18 13:59:55 +0200 | takuan | (~takuan@178.116.218.225) (Remote host closed the connection) |
2023-06-18 14:02:56 +0200 | ec | (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds) |
2023-06-18 14:03:34 +0200 | ec | (~ec@gateway/tor-sasl/ec) |
2023-06-18 14:04:39 +0200 | azimut | (~azimut@gateway/tor-sasl/azimut) |
2023-06-18 14:12:39 +0200 | sa1 | (sid7690@id-7690.ilkley.irccloud.com) (Server closed connection) |
2023-06-18 14:12:52 +0200 | sa1 | (sid7690@id-7690.ilkley.irccloud.com) |
2023-06-18 14:12:53 +0200 | alexherbo2 | (~alexherbo@2a02-842a-8180-4601-e9ea-f8a5-e557-b41f.rev.sfr.net) (Remote host closed the connection) |
2023-06-18 14:13:52 +0200 | jonathan_ | (~jonathan@83.252.3.92) (Ping timeout: 240 seconds) |
2023-06-18 14:17:10 +0200 | merijn | (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) |
2023-06-18 14:20:17 +0200 | titibandit | (~titibandi@user/titibandit) (Ping timeout: 265 seconds) |
2023-06-18 14:22:03 +0200 | titibandit | (~titibandi@user/titibandit) |
2023-06-18 14:30:40 +0200 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) |
2023-06-18 14:35:27 +0200 | thaumavorio | (~thaumavor@thaumavor.io) (Server closed connection) |
2023-06-18 14:37:44 +0200 | thaumavorio | (~thaumavor@162.243.123.105) |
2023-06-18 14:40:25 +0200 | gurkenglas | (~user@dynamic-046-114-182-229.46.114.pool.telefonica.de) (Ping timeout: 240 seconds) |
2023-06-18 14:40:59 +0200 | <ddrone[m]> | Is there a way to print out parse tree of a Haskell module as parsed by GHC to see its internal AST structure? |
2023-06-18 14:41:10 +0200 | <ddrone[m]> | I have ParsedModule as returned by this function https://hackage.haskell.org/package/ghc-exactprint-1.7.0.1/docs/Language-Haskell-GHC-ExactPrint-Pa… |
2023-06-18 14:41:47 +0200 | <ddrone[m]> | But the problem there's no Show instance, and using ppr prints out rendered syntax |
2023-06-18 14:43:50 +0200 | coot | (~coot@89.69.206.216) (Quit: coot) |
2023-06-18 14:44:58 +0200 | coot | (~coot@89.69.206.216) |
2023-06-18 14:45:18 +0200 | <[exa]> | ddrone[m]: is there no --ddump-... option ? |
2023-06-18 14:45:48 +0200 | <[exa]> | ah so it's hiding it via ppr |
2023-06-18 14:46:42 +0200 | <[exa]> | if there's a Generic instance on the stuff, you might have luck with the generic printing libs around |
2023-06-18 14:47:52 +0200 | gurkenglas | (~user@46.114.182.229) |
2023-06-18 14:49:44 +0200 | <jackdk> | probie: like `lowerCoyonedaC :: Functor f => Coyoneda (Compose f g) a -> f (Coyoneda g a)`? |
2023-06-18 14:50:40 +0200 | <geekosaur> | ddrone[m], check for an Outputtable instance iirc |
2023-06-18 14:51:21 +0200 | <ddrone[m]> | <[exa]> "ddrone: is there no --ddump..." <- Oh didn't think, turns out `-ddump-parsed-ast` works, thanks! |
2023-06-18 14:51:38 +0200 | ijqq | (uid603979@id-603979.helmsley.irccloud.com) |
2023-06-18 14:51:56 +0200 | merijn | (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 252 seconds) |
2023-06-18 14:53:20 +0200 | <ddrone[m]> | FTR https://hackage.haskell.org/package/ghc-9.6.1/docs/GHC-Hs-Dump.html#v:showAstData that's the function -ddump-parsed-ast uses |
2023-06-18 14:55:43 +0200 | fendor | (~fendor@2a02:8388:1640:be00:7aca:a77a:4a28:631a) (Remote host closed the connection) |
2023-06-18 14:58:16 +0200 | <[exa]> | ah ok good nice. :D |
2023-06-18 15:02:26 +0200 | <ddrone[m]> | Unfortunately looking at parse trees is not as enlightening as I thought it would be |
2023-06-18 15:02:49 +0200 | <ddrone[m]> | Any chance someone can point me to usages of ghc-exactprint source transformations? |
2023-06-18 15:03:25 +0200 | <ddrone[m]> | The only codebase I've looked so far to get the sense of it is HLS, looking for more examples |
2023-06-18 15:06:48 +0200 | merijn | (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) |
2023-06-18 15:11:17 +0200 | merijn | (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 258 seconds) |
2023-06-18 15:14:03 +0200 | mcglk | (~mcglk@131.191.19.145) |
2023-06-18 15:16:07 +0200 | jonathan_ | (~jonathan@c83-252-3-92.bredband.tele2.se) |
2023-06-18 15:23:03 +0200 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:2847:13c1:54f7:ebbc) |
2023-06-18 15:23:12 +0200 | <ijqq> | hi [Leary], I just saw your message. I'm sorry I don't exactly follow what you mean by `char '"' *> (fmap _ . many) (isMany _ <|> escape) <* char '"'`. I tried the first _ as concat and the second _ as (/= '\\'). So I thought it would be parse many times either something that isn't an escape or an escape char, and then concat those all together to form a string. But now it just hangs on the input. Would you be able to explain a bit |
2023-06-18 15:23:12 +0200 | <ijqq> | more please? |
2023-06-18 15:23:37 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2023-06-18 15:27:08 +0200 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:2847:13c1:54f7:ebbc) (Ping timeout: 240 seconds) |
2023-06-18 15:35:00 +0200 | tomku | (~tomku@user/tomku) (Read error: Connection reset by peer) |
2023-06-18 15:35:44 +0200 | tomku | (~tomku@user/tomku) |
2023-06-18 15:37:10 +0200 | <ncf> | i think many (many x) will always hang, since the inner parser can succeed with an empty list indefinitely? |
2023-06-18 15:37:20 +0200 | <ncf> | you probably want the inner parser to be non-nullable |
2023-06-18 15:37:58 +0200 | <ncf> | (i'm not sure what isMany is) |
2023-06-18 15:44:42 +0200 | <ijqq> | ah okay. http://sprunge.us/aPE1T6 this is the code. yep I changed isMany to isSome and it now doesn't hang, the code is now `str = char '"' *> (fmap concat . many) (isSome (\x -> x /= '\\' && x /= '"') <|> escape) <* char '"'` (though it still doesn't parse escapes correctly) . i think i'm on the right track now, thank you. So the second bracketed expression is the inner parser right? And the fmap is just getting as many of those as |
2023-06-18 15:44:42 +0200 | <ijqq> | possible. |
2023-06-18 15:46:11 +0200 | <ijqq> | I think the <* char '"' at the end needs to be replaced with something that checks for a preceding backslash maybe |
2023-06-18 15:47:03 +0200 | <ncf> | escape should handle that |
2023-06-18 15:47:21 +0200 | <ncf> | on the other hand you probably want isSome to also reject " |
2023-06-18 15:47:53 +0200 | <ncf> | otherwise "a"b" might be accepted |
2023-06-18 15:49:46 +0200 | <ijqq> | i thought that isSome (\x -> x /= '\\' && x /= '"') handles that? |
2023-06-18 15:49:55 +0200 | machinedgod | (~machinedg@d198-53-218-113.abhsia.telus.net) |
2023-06-18 15:50:04 +0200 | Midjak | (~Midjak@82.66.147.146) |
2023-06-18 15:50:26 +0200 | <ncf> | well yes, but that's not what's in your last paste |
2023-06-18 15:50:43 +0200 | <ncf> | oh, next line |
2023-06-18 15:51:51 +0200 | <ijqq> | oh yep sorry my bad. although it still doesn't work haha |
2023-06-18 15:52:15 +0200 | <ncf> | how so? |
2023-06-18 15:53:30 +0200 | acidjnk | (~acidjnk@2003:d6:e707:2f24:4af:8cce:d4f:7715) |
2023-06-18 15:53:50 +0200 | jonathan_ | (~jonathan@c83-252-3-92.bredband.tele2.se) (Ping timeout: 258 seconds) |
2023-06-18 15:55:00 +0200 | <ijqq> | here are some examples http://sprunge.us/EP24JM |
2023-06-18 15:55:18 +0200 | <ijqq> | so escape works but escaping a quote doesn't work |
2023-06-18 16:00:08 +0200 | <ijqq> | oh I get it because of (\x -> x /= '\\' && x /= '"') |
2023-06-18 16:00:16 +0200 | <ncf> | i don't see what's wrong here |
2023-06-18 16:00:34 +0200 | <ncf> | remember you have to escape twice: once for ghci and once for your parser |
2023-06-18 16:00:43 +0200 | <ncf> | so if you want to test whether \" is parsed correctly you need to use \\\" |
2023-06-18 16:01:01 +0200 | <ijqq> | oh |
2023-06-18 16:01:04 +0200 | <ijqq> | i see |
2023-06-18 16:01:07 +0200 | <ijqq> | so it does work correctly |
2023-06-18 16:01:22 +0200 | <ijqq> | oops |
2023-06-18 16:02:00 +0200 | <ijqq> | well thank you very much for the help :) |
2023-06-18 16:02:43 +0200 | <ncf> | (and, to test \n, you need \\n) |
2023-06-18 16:03:13 +0200 | <ijqq> | ah cool |
2023-06-18 16:03:31 +0200 | <ijqq> | now I need to just fix the case of empty string, as I changed the isMany to isSome to prevent it from hanging |
2023-06-18 16:03:54 +0200 | <ncf> | you still have an outer many, so the empty string is still accepted |
2023-06-18 16:04:10 +0200 | jonathan_ | (~jonathan@83.252.3.92) |
2023-06-18 16:04:29 +0200 | <ijqq> | oh oops, my bad with the escapes again |
2023-06-18 16:05:22 +0200 | <ijqq> | it's actually quite cool this way. i didn't think to have an inner and outer parser |
2023-06-18 16:05:43 +0200 | <ijqq> | you guys are smart haha |
2023-06-18 16:16:33 +0200 | gurkenglas | (~user@46.114.182.229) (Read error: Connection reset by peer) |
2023-06-18 16:18:08 +0200 | TMA | (tma@twin.jikos.cz) (Ping timeout: 248 seconds) |
2023-06-18 16:18:08 +0200 | acidjnk_new | (~acidjnk@p200300d6e7072f24519cabbd94a7f195.dip0.t-ipconnect.de) |
2023-06-18 16:21:32 +0200 | acidjnk | (~acidjnk@2003:d6:e707:2f24:4af:8cce:d4f:7715) (Ping timeout: 240 seconds) |
2023-06-18 16:25:08 +0200 | rburkholder | (~blurb@96.45.2.121) |
2023-06-18 16:27:16 +0200 | Unicorn_Princess | (~Unicorn_P@user/Unicorn-Princess/x-3540542) |
2023-06-18 16:28:08 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2023-06-18 16:35:50 +0200 | acarrico | (~acarrico@dhcp-68-142-49-163.greenmountainaccess.net) (Server closed connection) |
2023-06-18 16:36:13 +0200 | acarrico | (~acarrico@dhcp-68-142-49-163.greenmountainaccess.net) |
2023-06-18 16:36:18 +0200 | dorin | (~dorin@79.115.55.108) |
2023-06-18 16:38:31 +0200 | ub | (~Thunderbi@p200300ecdf0da9ac5cdf960cafa3cfa2.dip0.t-ipconnect.de) |
2023-06-18 16:39:12 +0200 | chromoblob | (~user@37.113.180.121) (Ping timeout: 240 seconds) |
2023-06-18 16:39:50 +0200 | ubert | (~Thunderbi@p200300ecdf0da912f884ed912556b966.dip0.t-ipconnect.de) (Ping timeout: 258 seconds) |
2023-06-18 16:39:50 +0200 | ub | ubert |
2023-06-18 16:40:00 +0200 | o-90 | (~o-90@gateway/tor-sasl/o-90) |
2023-06-18 16:40:05 +0200 | segfaultfizzbuzz | (~segfaultf@12.172.217.142) |
2023-06-18 16:42:04 +0200 | <segfaultfizzbuzz> | so i think if i understand correctly, the mathematician's instruction set architecture is called a cartesian closed category? |
2023-06-18 16:49:52 +0200 | bitmapper | (uid464869@id-464869.lymington.irccloud.com) |
2023-06-18 16:50:33 +0200 | T_S__ | (sid501726@id-501726.uxbridge.irccloud.com) (Server closed connection) |
2023-06-18 16:50:47 +0200 | T_S__ | (sid501726@id-501726.uxbridge.irccloud.com) |
2023-06-18 16:51:36 +0200 | <leah2> | if you dare call lambda calculus an isa, maybe |
2023-06-18 16:51:57 +0200 | <segfaultfizzbuzz> | a mathematician's abstract computer, if you like |
2023-06-18 16:52:09 +0200 | <segfaultfizzbuzz> | in other words, turing machines are not really useful imo |
2023-06-18 16:55:19 +0200 | <leah2> | it depends what you wanna proof |
2023-06-18 16:55:22 +0200 | <leah2> | prove* |
2023-06-18 16:57:46 +0200 | o-90 | (~o-90@gateway/tor-sasl/o-90) (Remote host closed the connection) |
2023-06-18 16:58:33 +0200 | <segfaultfizzbuzz> | i am looking at the definition of the CCC on wikipedia and it requires a product and exponential... intuitively i have difficulty seeing the distinction between product and exponential as they are both binary operators |
2023-06-18 17:00:12 +0200 | agander_m | (sid407952@id-407952.tinside.irccloud.com) (Server closed connection) |
2023-06-18 17:00:17 +0200 | tomku | (~tomku@user/tomku) (Read error: Connection reset by peer) |
2023-06-18 17:00:21 +0200 | agander_m | (sid407952@id-407952.tinside.irccloud.com) |
2023-06-18 17:00:52 +0200 | <ncf> | product is (,), exponential is (->) |
2023-06-18 17:01:20 +0200 | <segfaultfizzbuzz> | sure but what distinguishes (,) from (->) |
2023-06-18 17:02:37 +0200 | <ncf> | well surely you agree that (a, b) and a -> b are different types (and that they ought to be) |
2023-06-18 17:02:57 +0200 | <ncf> | (in general; they might happen to be isomorphic in a few cases) |
2023-06-18 17:03:06 +0200 | <segfaultfizzbuzz> | my best intuition here would be to focus on the cardinality, and to say that the cardinaility of (X,Y) translates to "count the pair X and Y", the cardinality of (->) translates to "count all functions from X to Y" |
2023-06-18 17:03:29 +0200 | <segfaultfizzbuzz> | and so (,) refers to the "endpoints" whereas (->) refers to the all paths between the endpoints |
2023-06-18 17:03:43 +0200 | <segfaultfizzbuzz> | and then the function implementation would be a specific path between endpoints |
2023-06-18 17:05:55 +0200 | tomku | (~tomku@user/tomku) |
2023-06-18 17:07:08 +0200 | merijn | (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) |
2023-06-18 17:10:30 +0200 | Teacup | (~teacup@user/teacup) (Server closed connection) |
2023-06-18 17:11:09 +0200 | Teacup | (~teacup@user/teacup) |
2023-06-18 17:12:40 +0200 | zer0bitz_ | (~zer0bitz@user/zer0bitz) |
2023-06-18 17:13:31 +0200 | zer0bitz | (~zer0bitz@user/zer0bitz) (Ping timeout: 240 seconds) |
2023-06-18 17:20:45 +0200 | segfaultfizzbuzz | (~segfaultf@12.172.217.142) (Ping timeout: 240 seconds) |
2023-06-18 17:22:29 +0200 | josias | (~mottmatri@2001:470:69fc:105::b6c) |
2023-06-18 17:23:19 +0200 | tired | (~tired@user/tired) (Server closed connection) |
2023-06-18 17:23:41 +0200 | tired | (~tired@user/tired) |
2023-06-18 17:24:09 +0200 | segfaultfizzbuzz | (~segfaultf@12.172.217.142) |
2023-06-18 17:24:23 +0200 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:2847:13c1:54f7:ebbc) |
2023-06-18 17:28:29 +0200 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:2847:13c1:54f7:ebbc) (Ping timeout: 240 seconds) |
2023-06-18 17:33:33 +0200 | TMA | (tma@91.219.245.39) |
2023-06-18 17:39:29 +0200 | lisbeths | (uid135845@id-135845.lymington.irccloud.com) |
2023-06-18 17:39:42 +0200 | <tomsmeding> | when do we have a * b == b^a ? :p |
2023-06-18 17:40:17 +0200 | <tomsmeding> | e.g. if a == b == 2, i.e. (Bool, Bool) ~= (Bool -> Bool) |
2023-06-18 17:40:36 +0200 | <tomsmeding> | at least as sets -- same cardinality. Isomorphism as objects in the CCC, perhaps not |
2023-06-18 17:41:32 +0200 | tomku | (~tomku@user/tomku) (Ping timeout: 240 seconds) |
2023-06-18 17:41:56 +0200 | merijn | (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 258 seconds) |
2023-06-18 17:42:11 +0200 | nehsou^ | (~nehsou@c-71-204-38-59.hsd1.ga.comcast.net) (Remote host closed the connection) |
2023-06-18 17:42:48 +0200 | Inst | (~Inst@c-76-101-10-131.hsd1.fl.comcast.net) (Ping timeout: 252 seconds) |
2023-06-18 17:43:11 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2023-06-18 17:47:59 +0200 | user__ | (~user@dynamic-046-114-182-229.46.114.pool.telefonica.de) |
2023-06-18 17:50:01 +0200 | <ncf> | i think it works in a CCC, if by Bool you mean the coproduct of two terminal objects |
2023-06-18 17:50:13 +0200 | <ncf> | haven't checked too carefully |
2023-06-18 17:51:05 +0200 | dorin | (~dorin@79.115.55.108) (Ping timeout: 246 seconds) |
2023-06-18 17:51:44 +0200 | ec | (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds) |
2023-06-18 17:52:10 +0200 | ec | (~ec@gateway/tor-sasl/ec) |
2023-06-18 17:53:41 +0200 | tomku | (~tomku@user/tomku) |
2023-06-18 17:58:29 +0200 | ddellacosta | (~ddellacos@143.244.47.89) |
2023-06-18 18:01:08 +0200 | tomku | (~tomku@user/tomku) (Ping timeout: 252 seconds) |
2023-06-18 18:01:18 +0200 | tom_ | (~tom@2a00:23c8:970c:4801:5b6a:e81b:79dc:f684) (Read error: Connection reset by peer) |
2023-06-18 18:01:47 +0200 | dsrt^ | (~dsrt@c-71-204-38-59.hsd1.ga.comcast.net) |
2023-06-18 18:01:57 +0200 | tom_ | (~tom@2a00:23c8:970c:4801:5b6a:e81b:79dc:f684) |
2023-06-18 18:03:22 +0200 | tomku | (~tomku@user/tomku) |
2023-06-18 18:04:20 +0200 | segfaultfizzbuzz | (~segfaultf@12.172.217.142) (Ping timeout: 240 seconds) |
2023-06-18 18:10:23 +0200 | driib | (~driib@vmi931078.contaboserver.net) (Quit: The Lounge - https://thelounge.chat) |
2023-06-18 18:10:39 +0200 | segfaultfizzbuzz | (~segfaultf@12.172.217.142) |
2023-06-18 18:11:07 +0200 | driib | (~driib@176.57.184.141) |
2023-06-18 18:13:10 +0200 | tzh | (~tzh@c-24-21-73-154.hsd1.or.comcast.net) |
2023-06-18 18:16:45 +0200 | driib | (~driib@176.57.184.141) (Read error: Connection reset by peer) |
2023-06-18 18:17:06 +0200 | driib | (~driib@vmi931078.contaboserver.net) |
2023-06-18 18:19:50 +0200 | bontaq | (~user@ool-45779b84.dyn.optonline.net) (Ping timeout: 252 seconds) |
2023-06-18 18:21:22 +0200 | gnalzo | (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 3.8) |
2023-06-18 18:23:23 +0200 | merijn | (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) |
2023-06-18 18:23:40 +0200 | chromoblob | (~user@37.113.180.121) |
2023-06-18 18:25:09 +0200 | <segfaultfizzbuzz> | but wait, b^a, which if i understand correctly is b -> a, which translates to "all functions from b to a" includes all noninvertible functions from b to a |
2023-06-18 18:25:22 +0200 | takuan | (~takuan@178-116-218-225.access.telenet.be) |
2023-06-18 18:25:27 +0200 | <segfaultfizzbuzz> | but if a and b are Bool then a*b is always invertible |
2023-06-18 18:26:30 +0200 | <segfaultfizzbuzz> | and furthermore b^a does not in general include the same functions as a^b due to the inclusion of noninvertible functions |
2023-06-18 18:26:49 +0200 | <ncf> | b^a is a -> b |
2023-06-18 18:27:08 +0200 | <segfaultfizzbuzz> | ok then apply that patch to the last few lines ;) |
2023-06-18 18:27:39 +0200 | <ncf> | what does it mean for a*b to be invertible? |
2023-06-18 18:27:54 +0200 | merijn | (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 252 seconds) |
2023-06-18 18:28:48 +0200 | <segfaultfizzbuzz> | like in the sense of a group, so there would be an inverse b^-1 |
2023-06-18 18:29:00 +0200 | <segfaultfizzbuzz> | so that a*b*b^-1 = a*(b*b^-1) = a |
2023-06-18 18:29:00 +0200 | <ncf> | but a*b is not a type of functions... |
2023-06-18 18:29:09 +0200 | <[exa]> | segfaultfizzbuzz: how come bool functions are all invertible? |
2023-06-18 18:29:17 +0200 | <ncf> | the noninvertible functions Bool -> Bool correspond to the pairs (a, b) : (Bool, Bool) with a /= b (at least if you're using the "obvious" isomorphism) |
2023-06-18 18:29:23 +0200 | <segfaultfizzbuzz> | ah wait they aren't, i can have 0 lol |
2023-06-18 18:29:29 +0200 | <segfaultfizzbuzz> | b = 0, nvm lol |
2023-06-18 18:30:08 +0200 | driib | (~driib@vmi931078.contaboserver.net) (Remote host closed the connection) |
2023-06-18 18:30:25 +0200 | <ncf> | er sorry, with a == b |
2023-06-18 18:30:35 +0200 | driib | (~driib@vmi931078.contaboserver.net) |
2023-06-18 18:30:47 +0200 | <segfaultfizzbuzz> | but if a and b were nonzero rationals you could have the inclusion of the multiplicative inverses |
2023-06-18 18:43:09 +0200 | <segfaultfizzbuzz> | that is to say, if the type of a and b is nonzero rationals, then a*b always has an inverse for any b, but a -> b can include noninvertible functions,... |
2023-06-18 18:43:39 +0200 | toastloop | (~toastloop@user/toastloop) |
2023-06-18 18:43:47 +0200 | driib | (~driib@vmi931078.contaboserver.net) (Remote host closed the connection) |
2023-06-18 18:43:47 +0200 | <segfaultfizzbuzz> | but perhaps that is boring |
2023-06-18 18:44:08 +0200 | driib | (~driib@vmi931078.contaboserver.net) |
2023-06-18 18:44:32 +0200 | <ncf> | this does not make any sense |
2023-06-18 18:44:50 +0200 | <ncf> | what is a -> b, if a and b are rational numbers? |
2023-06-18 18:44:56 +0200 | azimut | (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 240 seconds) |
2023-06-18 18:45:26 +0200 | wootehfoot | (~wootehfoo@user/wootehfoot) |
2023-06-18 18:45:40 +0200 | <segfaultfizzbuzz> | that would be a function from a to b, where a and b are nonzero rational numbers |
2023-06-18 18:46:34 +0200 | <segfaultfizzbuzz> | for example if f : a -> b then f x = (-1) * x would qualify, as would g x = (1/3) * x |
2023-06-18 18:46:49 +0200 | <segfaultfizzbuzz> | excuse me, g : a -> b there as well |
2023-06-18 18:48:02 +0200 | <ncf> | do you mean a function f : ℚ* → ℚ* such that f(a) = b? why would those qualify, if we know nothing about a and b? |
2023-06-18 18:48:17 +0200 | <segfaultfizzbuzz> | those would happen to be invertible functions ... but h x = 1 where h : a -> b also is a function h mapping rationals to rationals, and h in this case is noninvertible |
2023-06-18 18:48:49 +0200 | <segfaultfizzbuzz> | correct f : ℚ* → ℚ* |
2023-06-18 18:49:22 +0200 | <ncf> | and your point is? |
2023-06-18 18:49:23 +0200 | <segfaultfizzbuzz> | ah here a and b were both ℚ* |
2023-06-18 18:49:40 +0200 | econo_ | (uid147250@id-147250.tinside.irccloud.com) |
2023-06-18 18:49:57 +0200 | <segfaultfizzbuzz> | my point is that multiplication can sometimes mandate invertibility depending on what it acts on, whereas functions never mandate invertibility |
2023-06-18 18:52:30 +0200 | <ncf> | but we were talking about products of types (in the categorical sense), not multiplication of rational numbers |
2023-06-18 18:53:37 +0200 | <segfaultfizzbuzz> | yes and the distinction between product and exponentiation |
2023-06-18 18:55:32 +0200 | <ncf> | you might as well ask about the distinction between apples and cars |
2023-06-18 18:55:41 +0200 | <segfaultfizzbuzz> | and so i am saying that one distinction is that depending on the underlying type, products can require invertibility whereas exponentiation always includes noninvertible |
2023-06-18 18:56:02 +0200 | <segfaultfizzbuzz> | well product and exponentiation are both binary operators so the distinction is not obvious |
2023-06-18 18:57:23 +0200 | <ncf> | you might as well say that apples and cars are both physical objects so the distinction is not obvious |
2023-06-18 18:57:39 +0200 | <ncf> | still no idea what "products can require invertibility" is supposed to mean |
2023-06-18 18:58:10 +0200 | driib | (~driib@vmi931078.contaboserver.net) (Remote host closed the connection) |
2023-06-18 18:58:32 +0200 | driib | (~driib@vmi931078.contaboserver.net) |
2023-06-18 18:58:46 +0200 | <segfaultfizzbuzz> | ncf: i mean sure if you are talking about massive point particles from very far away, there is really only the mass to worry about |
2023-06-18 18:59:37 +0200 | <segfaultfizzbuzz> | let p : ℚ* → ℚ* and let e : ℚ* → ℚ* where p is a product and e is an exponentiation |
2023-06-18 18:59:46 +0200 | <segfaultfizzbuzz> | p must be invertible whereas e may be noninvertible |
2023-06-18 18:59:59 +0200 | <segfaultfizzbuzz> | therefore p and e are not the same |
2023-06-18 19:01:04 +0200 | <tomsmeding> | products are not functions |
2023-06-18 19:01:43 +0200 | <segfaultfizzbuzz> | oh wow really? |
2023-06-18 19:01:51 +0200 | <tomsmeding> | a product a * b can be modelled in type theory as a dependent function (b : Bool) -> (case b of false -> a ; true -> b) |
2023-06-18 19:01:51 +0200 | <tomsmeding> | :p |
2023-06-18 19:01:55 +0200 | <tomsmeding> | in _that_ sense it might be a function |
2023-06-18 19:02:22 +0200 | <tomsmeding> | your saying "let p : ℚ* → ℚ* where p is a product" makes little sense to me |
2023-06-18 19:02:46 +0200 | <segfaultfizzbuzz> | well... i suppose p is uniquely defined in that case? |
2023-06-18 19:02:57 +0200 | <tomsmeding> | like, p is a product -- of which two things? |
2023-06-18 19:03:10 +0200 | <tomsmeding> | (or of which collection of things, if you want n-ary products) |
2023-06-18 19:03:14 +0200 | ysh____ | (sid6017@id-6017.ilkley.irccloud.com) (Server closed connection) |
2023-06-18 19:03:22 +0200 | <tomsmeding> | product of ℚ* and ℚ*? Or something else? |
2023-06-18 19:03:25 +0200 | ysh____ | (sid6017@id-6017.ilkley.irccloud.com) |
2023-06-18 19:03:34 +0200 | <segfaultfizzbuzz> | ah right let me fix the definitions: p : ℚ* → ℚ* → ℚ* and e : ℚ* → ℚ* → ℚ* |
2023-06-18 19:04:05 +0200 | <tomsmeding> | okay so p is multiplication in ℚ* and e is exponentiation in ℚ* |
2023-06-18 19:04:34 +0200 | emmanuelux | (~emmanuelu@user/emmanuelux) |
2023-06-18 19:04:48 +0200 | <segfaultfizzbuzz> | p is probably unique (?) but e may not be, although p might be nonunique up to something like inversion 1/x and negation -x |
2023-06-18 19:05:14 +0200 | <tomsmeding> | in what sense is ℚ* a category? |
2023-06-18 19:05:26 +0200 | <tomsmeding> | because if it isn't, we're not talking about the same kind of product in the first place |
2023-06-18 19:05:35 +0200 | <segfaultfizzbuzz> | ℚ* is a ... type? |
2023-06-18 19:05:38 +0200 | <tomsmeding> | yeah |
2023-06-18 19:05:45 +0200 | <segfaultfizzbuzz> | or maybe a set? if you want? |
2023-06-18 19:05:54 +0200 | <segfaultfizzbuzz> | a type is a category? probably? |
2023-06-18 19:05:55 +0200 | <tomsmeding> | a product operation is a thing that a _category_ might have |
2023-06-18 19:06:07 +0200 | <tomsmeding> | if you want a product on ℚ*, ℚ* first has to be a category |
2023-06-18 19:06:27 +0200 | <tomsmeding> | and I believe it isn't a category in a relevant way |
2023-06-18 19:07:17 +0200 | <tomsmeding> | Haskell types form a category (kind of... details), where the types are the objects and functions are the morphisms |
2023-06-18 19:07:29 +0200 | <tomsmeding> | and the haskell pair type is the product in that category |
2023-06-18 19:07:53 +0200 | <tomsmeding> | in Set, the product is the cartesian product of sets |
2023-06-18 19:08:15 +0200 | dtman34_ | (~dtman34@2601:447:d000:93c9:49a3:2ee1:9e07:c081) (Ping timeout: 260 seconds) |
2023-06-18 19:08:32 +0200 | <tomsmeding> | the only link with multiplication of numbers that I know (though I know very little of CT, so YMMV) is that in Set, the cardinalities multiply |
2023-06-18 19:08:44 +0200 | <tomsmeding> | and this cardinality situation is quite common; same holds in Hask |
2023-06-18 19:09:13 +0200 | <tomsmeding> | segfaultfizzbuzz: "a type is a category?" -- a category has objects and morphisms, what are the objects and the morphisms of ℚ*? ;) |
2023-06-18 19:09:23 +0200 | <dolio> | It has related algebraic properties, too. |
2023-06-18 19:09:34 +0200 | <segfaultfizzbuzz> | well ℚ* does define objects. ... so perhaps product is a method of counting morphisms where the value of b is the index, ... |
2023-06-18 19:09:46 +0200 | <tomsmeding> | dolio: commutativity, associativity, distribution over sums/coproducts? |
2023-06-18 19:09:57 +0200 | <dolio> | Yeah, stuff like that. |
2023-06-18 19:10:14 +0200 | <tomsmeding> | segfaultfizzbuzz: sure, we could call the numbers of ℚ* its objects. But then what is the collection of morphisms from 4 to 7.6? |
2023-06-18 19:10:28 +0200 | tomsmeding | has no clue |
2023-06-18 19:10:49 +0200 | <tomsmeding> | only once you have a definition of a "morphism" in the category, can you even formulate what a categorical product _is_ |
2023-06-18 19:11:03 +0200 | <segfaultfizzbuzz> | well there are at least two classes of morphisms of interest, the product and the exponentiation |
2023-06-18 19:11:12 +0200 | <tomsmeding> | those are not of the right type |
2023-06-18 19:11:16 +0200 | <ncf> | there are a couple choices you can make, but i'm not sure any of them give rise to a CCC |
2023-06-18 19:11:38 +0200 | <tomsmeding> | segfaultfizzbuzz: the morphisms go from one object to another |
2023-06-18 19:11:48 +0200 | <segfaultfizzbuzz> | both endpoints must be specified? |
2023-06-18 19:12:01 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2023-06-18 19:12:36 +0200 | <tomsmeding> | like in Set, a morphism from A to B is a function from A to B; in Hask, similarly; in Rel (binary relations), objects are sets and a morphism from A to B is a subset of A x B (their cartesian product) |
2023-06-18 19:12:37 +0200 | <segfaultfizzbuzz> | so the morphism cannot be a "nice" description of a function ... like if the morphism was SHA256 |
2023-06-18 19:12:46 +0200 | driib | (~driib@vmi931078.contaboserver.net) (Remote host closed the connection) |
2023-06-18 19:13:03 +0200 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:2847:13c1:54f7:ebbc) |
2023-06-18 19:13:06 +0200 | driib | (~driib@vmi931078.contaboserver.net) |
2023-06-18 19:13:10 +0200 | <segfaultfizzbuzz> | you cannot describe morphisms in many useful cases because it is unrealistic to enumerate both endpoints |
2023-06-18 19:13:11 +0200 | <tomsmeding> | in other words, in Set, Hom(A, B) = {functions from A to B}, and similarly for the others -- Hom(A, B) is notation for the set of morphisms from A to B in a category |
2023-06-18 19:13:16 +0200 | <tomsmeding> | what is Hom(4, 7.6)? |
2023-06-18 19:13:21 +0200 | <segfaultfizzbuzz> | whereas it is substantially always realistic to enumerate the "inputs" to the function |
2023-06-18 19:13:28 +0200 | <tomsmeding> | it's gotta be a set of _things_ |
2023-06-18 19:13:31 +0200 | <tomsmeding> | not necessarily functions |
2023-06-18 19:13:41 +0200 | <monochrom> | To muddle the discussion, recall that the standard way to cast a group as a category is that the category has only one object of no content itself, the content is that group elements are endomorphisms over that object of no content. |
2023-06-18 19:13:56 +0200 | <tomsmeding> | and there has to be some sense of combination of an element of Hom(A, B) and an element of Hom(B, C) to an element of Hom(A, C) |
2023-06-18 19:14:32 +0200 | <tomsmeding> | monochrom: does the resulting single-object category have a product? (honest question) |
2023-06-18 19:14:42 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2023-06-18 19:14:57 +0200 | tomsmeding | guesses no |
2023-06-18 19:15:28 +0200 | <tomsmeding> | but anyway it would be a category that looks completely different from what segfaultfizzbuzz is, I think, envisioning |
2023-06-18 19:15:32 +0200 | <monochrom> | But let's muddle the discussion even more! The standard way to cast a partially-ordered set as a category is that elements are objects, morphisms happen (uniquely) iff x<=y using the partial order. |
2023-06-18 19:15:45 +0200 | <monochrom> | I don't know. Haven't thought of that. |
2023-06-18 19:15:53 +0200 | <tomsmeding> | hm that'd be closer |
2023-06-18 19:16:16 +0200 | <dolio> | Product in a partial order is max, though. |
2023-06-18 19:16:29 +0200 | <monochrom> | Using the partial order idea, Hom(4, 7.6) is a singleton set of no content other than the fact that it is a singleton set. :) |
2023-06-18 19:16:41 +0200 | <tomsmeding> | dolio: min, right? |
2023-06-18 19:16:53 +0200 | <ncf> | for a group G to have categorical products, you'd need the single object to be the product of itself and itself, which means that a map * → * is equivalent to two maps * → * |
2023-06-18 19:17:11 +0200 | <ncf> | so, you need an iso G ≃ G × G i guess |
2023-06-18 19:17:42 +0200 | <ncf> | (does it have to be a group isomorphism, or merely sets?) |
2023-06-18 19:18:07 +0200 | <dolio> | Oh, yeah. |
2023-06-18 19:18:31 +0200 | bradparker | (sid262931@id-262931.uxbridge.irccloud.com) (Server closed connection) |
2023-06-18 19:18:40 +0200 | bradparker | (sid262931@id-262931.uxbridge.irccloud.com) |
2023-06-18 19:21:20 +0200 | <tomsmeding> | ncf: reading the universal property of a product on nlab, it sounds to me like * is the product of * and * if there are two morphisms p1,p2 : * -> *, such that for any two morphisms f1,f2 : * -> *, there is a unique morphism h : * -> * such that pi ∘ h = fi |
2023-06-18 19:22:31 +0200 | danza | (~francesco@151.44.185.43) |
2023-06-18 19:23:08 +0200 | <monochrom> | Choose p1 = p2 = the identity element of the group. >:) |
2023-06-18 19:23:17 +0200 | <tomsmeding> | i.e. in the group: ∃p1,p2. ∀f1,f2. ∃h. (p1 h = f1) & (p2 h = f2); thus p2^{-1} f2 = h = p1^{-1} f1, thus f2 = p2 p1^{-1} f1 |
2023-06-18 19:23:18 +0200 | wroathe | (~wroathe@50.205.197.50) |
2023-06-18 19:23:18 +0200 | wroathe | (~wroathe@50.205.197.50) (Changing host) |
2023-06-18 19:23:18 +0200 | wroathe | (~wroathe@user/wroathe) |
2023-06-18 19:23:34 +0200 | <tomsmeding> | so f2 is determined by f1, so there can only be one element in the group? |
2023-06-18 19:23:52 +0200 | <tomsmeding> | surely if there is more than one element, one can choose f2 so that it doesn't satisfy the relation |
2023-06-18 19:24:02 +0200 | <tomsmeding> | making * not the product of * and * |
2023-06-18 19:24:04 +0200 | <monochrom> | Err right oops. |
2023-06-18 19:24:13 +0200 | <tomsmeding> | have I gotten this right? |
2023-06-18 19:24:19 +0200 | <tomsmeding> | that would be surprising |
2023-06-18 19:24:21 +0200 | danza | (~francesco@151.44.185.43) (Client Quit) |
2023-06-18 19:24:23 +0200 | <ncf> | yeah sounds like it |
2023-06-18 19:24:23 +0200 | <monochrom> | Yeah you're right. |
2023-06-18 19:24:31 +0200 | tomsmeding | is bludgeoning through stuff I kinda understand |
2023-06-18 19:25:02 +0200 | <monochrom> | Letting the symbols do the work is the best kind of understanding. >:D |
2023-06-18 19:25:11 +0200 | <tomsmeding> | so does it have a product? Well only if the group is the trivial group :p |
2023-06-18 19:25:11 +0200 | <tomsmeding> | yes |
2023-06-18 19:25:17 +0200 | <monochrom> | SYMBOLS DON'T LIE |
2023-06-18 19:25:32 +0200 | <tomsmeding> | not when the number of symbols and laws to check is this low |
2023-06-18 19:26:00 +0200 | driib | (~driib@vmi931078.contaboserver.net) (Remote host closed the connection) |
2023-06-18 19:26:18 +0200 | <tomsmeding> | this was good practice for me |
2023-06-18 19:26:19 +0200 | driib | (~driib@vmi931078.contaboserver.net) |
2023-06-18 19:26:27 +0200 | <monochrom> | OK that was an exaggeration. I have seen philosopher-wannabes use symbols to lie. |
2023-06-18 19:26:36 +0200 | monochrom | is looking at Euler |
2023-06-18 19:27:01 +0200 | <int-e> | that's not the symbols' fault |
2023-06-18 19:27:06 +0200 | <segfaultfizzbuzz> | so then does this connect to my original question: what is the difference between product and exponential ? |
2023-06-18 19:27:30 +0200 | <segfaultfizzbuzz> | in light of the fact that both are binary operators |
2023-06-18 19:27:50 +0200 | <int-e> | are we really doing syntax and semantics |
2023-06-18 19:27:59 +0200 | <ncf> | i have no idea what we're doing |
2023-06-18 19:28:15 +0200 | <ncf> | looking for a difference between two things that is not covered by "they are not the same thing, clearly" |
2023-06-18 19:28:17 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2023-06-18 19:28:25 +0200 | <geekosaur> | wasn't that question like the first thing answered? |
2023-06-18 19:28:39 +0200 | <monochrom> | Oh that reminds me of on Friday at school we had a discussion on being anal and pedantic about the definition of "binary operator". |
2023-06-18 19:28:44 +0200 | <geekosaur> | if that answer didn't satisfy you then you're doing philosophy, not math |
2023-06-18 19:28:44 +0200 | smoge | (~smoge@2603-7000-4b42-1100-9dab-c33e-5e93-2285.res6.spectrum.com) (Ping timeout: 246 seconds) |
2023-06-18 19:29:04 +0200 | <dolio> | Why would all binary operators be the same? |
2023-06-18 19:29:08 +0200 | <ncf> | that must be why i can't make sense of this conversation 🙃 |
2023-06-18 19:29:29 +0200 | <monochrom> | As it turns out, if you are to be pedantic, foo::AxB->C qualifies as a binary operator iff A=C or B=C. |
2023-06-18 19:29:31 +0200 | <segfaultfizzbuzz> | well only the input values can index the output of the binary operator... |
2023-06-18 19:29:39 +0200 | <tomsmeding> | segfaultfizzbuzz: they are both binary operators, but they have to satisfy different laws |
2023-06-18 19:29:51 +0200 | <monochrom> | And to some people, even more strongly A=B=C. |
2023-06-18 19:30:16 +0200 | <dolio> | I mean, people have been talking a lot about numbers. Do you have this confusion with numbers? |
2023-06-18 19:30:24 +0200 | <dolio> | 2*3 = 6, 2^3 = 8. |
2023-06-18 19:30:27 +0200 | <int-e> | monochrom: scalar products have A = B != C. |
2023-06-18 19:30:29 +0200 | cheater | (~Username@user/cheater) (Ping timeout: 240 seconds) |
2023-06-18 19:30:34 +0200 | <monochrom> | We had that discussion because in standard linear algebra definitions it's said "blah blah binary operator blah blah" and the student decided to really ask what does "binary operator" mean. |
2023-06-18 19:30:49 +0200 | <dolio> | 2+3 = 5 |
2023-06-18 19:31:33 +0200 | <int-e> | And I guess if you are detailed about matrix products, that'll give you an example where all three sets are usually distinct... oh and the operator is heavily overloaded. |
2023-06-18 19:31:48 +0200 | <dolio> | 2|3 = 3, 2&3 = 2 |
2023-06-18 19:32:37 +0200 | <tomsmeding> | all binary operators, but all have different properties |
2023-06-18 19:32:41 +0200 | <monochrom> | Eventually I said "forget it, if it's infix it's a binary operator, yes it's just syntax" |
2023-06-18 19:32:57 +0200 | <tomsmeding> | monochrom: that's what programming languages do :p |
2023-06-18 19:33:05 +0200 | chromoblob | (~user@37.113.180.121) (Ping timeout: 240 seconds) |
2023-06-18 19:33:51 +0200 | <monochrom> | But the student did look for "binary operator/ion" on Wikipedia and it's a whole rabbit hole. |
2023-06-18 19:34:50 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2023-06-18 19:37:23 +0200 | monochrom | prefers 2+2=4, 2*2=4, 2^2=4 >:D |
2023-06-18 19:37:49 +0200 | nshepperd2 | (nshepperd@2600:3c03::f03c:92ff:fe28:92c9) (Server closed connection) |
2023-06-18 19:38:05 +0200 | nshepperd2 | (nshepperd@2600:3c03::f03c:92ff:fe28:92c9) |
2023-06-18 19:39:25 +0200 | driib | (~driib@vmi931078.contaboserver.net) (Remote host closed the connection) |
2023-06-18 19:39:48 +0200 | driib | (~driib@vmi931078.contaboserver.net) |
2023-06-18 19:40:08 +0200 | user__ | (~user@dynamic-046-114-182-229.46.114.pool.telefonica.de) (Ping timeout: 252 seconds) |
2023-06-18 19:41:38 +0200 | <int-e> | monochrom: tune in for the next episode when we learn about monads |
2023-06-18 19:42:07 +0200 | <monochrom> | :( |
2023-06-18 19:42:22 +0200 | <monochrom> | OK no worries, :) |
2023-06-18 19:42:42 +0200 | <int-e> | (I'll admit that "monad" is quite a bit more specific than "binary operator") |
2023-06-18 19:42:56 +0200 | <monochrom> | Oh haha |
2023-06-18 19:43:02 +0200 | <tomsmeding> | similarly, in the ring {0}, where (+), (*), (|) and (&) are all the same thing! |
2023-06-18 19:43:07 +0200 | monochrom | hugs his monadic second-order logic |
2023-06-18 19:43:11 +0200 | <tomsmeding> | (not sure what to do with (^)) |
2023-06-18 19:43:22 +0200 | <ncf> | laser eyes Leibniz |
2023-06-18 19:43:31 +0200 | <monochrom> | I think 0^0 = 1 = 0 still works. |
2023-06-18 19:43:45 +0200 | <tomsmeding> | surely there is some law that breaks |
2023-06-18 19:43:49 +0200 | <tomsmeding> | what laws does ^ even have |
2023-06-18 19:43:59 +0200 | <tomsmeding> | or is this the lawless wild west |
2023-06-18 19:44:07 +0200 | <segfaultfizzbuzz> | i'm not sure whether i'm being mocked here,... my difficulty understanding the distinctions between binary operators stems from the fact that the outputs of the binary operator functions can be indexed by the inputs (specifically the cartesian product of the inputs) |
2023-06-18 19:44:30 +0200 | <tomsmeding> | segfaultfizzbuzz: you are not being mocked, but we're having trouble formulating the answer in a way that makes sense to you |
2023-06-18 19:44:36 +0200 | <monochrom> | x^0 = 1, x^(n+1)= x * x^n. But recall 1=0. "This is fine." |
2023-06-18 19:45:05 +0200 | <int-e> | x^(a+b) = x^a * x^b |
2023-06-18 19:45:28 +0200 | <segfaultfizzbuzz> | put another way: "my binary operator LUT is better than your binary LUT" |
2023-06-18 19:45:37 +0200 | <int-e> | (preconditions omitted) |
2023-06-18 19:45:44 +0200 | <tomsmeding> | segfaultfizzbuzz: did you one of my later messages? (+) and (*) are both binary operators, but we expect them to behave differently (i.e. they have different laws), and some of those laws explicitly involve both. For example, a*(b+c) = a*b + a*c |
2023-06-18 19:45:48 +0200 | <tomsmeding> | similarly for (,) and (->) |
2023-06-18 19:46:07 +0200 | user__ | (~user@46.114.182.229) |
2023-06-18 19:46:19 +0200 | Inst | (~Inst@2601:6c4:4081:2fc0:add4:91ad:5330:1cfd) |
2023-06-18 19:46:31 +0200 | <segfaultfizzbuzz> | oh is there a distribution law for (,) and (->) ? |
2023-06-18 19:46:32 +0200 | <tomsmeding> | we expect the product to be associative, i.e. (a x b) x c should be isomorphic to a x (b x c) |
2023-06-18 19:46:48 +0200 | <tomsmeding> | but we don't expect (a -> b) -> c ~= a -> (b -> c) |
2023-06-18 19:46:56 +0200 | <segfaultfizzbuzz> | ah hmm |
2023-06-18 19:47:15 +0200 | <tomsmeding> | on the other hand, we do expect a -> (b -> c) ~= (a, b) -> c |
2023-06-18 19:47:24 +0200 | <tomsmeding> | err, (a x b) -> c; I need to be consistent with notation |
2023-06-18 19:47:28 +0200 | <tomsmeding> | that's called currying |
2023-06-18 19:47:38 +0200 | <tomsmeding> | and it's the eta-law of categorical exponentials |
2023-06-18 19:47:43 +0200 | <tomsmeding> | there are more laws |
2023-06-18 19:47:49 +0200 | pat67 | (~pat67@145.14.135.137) (Quit: Leaving) |
2023-06-18 19:48:06 +0200 | <tomsmeding> | not quite distribution, but it _is_ a law that connects both |
2023-06-18 19:48:11 +0200 | <tomsmeding> | in a cartesian closed category, that is |
2023-06-18 19:49:54 +0200 | <tomsmeding> | hm, perhaps this is even the only law (outside from (x) being a categorical product, that is) |
2023-06-18 19:50:30 +0200 | <tomsmeding> | meh, no, some naturality conditions |
2023-06-18 19:50:32 +0200 | driib | (~driib@vmi931078.contaboserver.net) (Remote host closed the connection) |
2023-06-18 19:50:44 +0200 | <tomsmeding> | anyway segfaultfizzbuzz does this perspective from the laws make more sense to you? |
2023-06-18 19:51:00 +0200 | <dolio> | It's a defining characteristic, but usually it satisfies other laws in specific scenarios. |
2023-06-18 19:51:14 +0200 | driib | (~driib@176.57.184.141) |
2023-06-18 19:51:15 +0200 | <dolio> | Analogous to arithmetic. |
2023-06-18 19:51:25 +0200 | gnalzo | (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) |
2023-06-18 19:51:56 +0200 | tomsmeding | has to leave, thanks for the CT practice all |
2023-06-18 19:52:33 +0200 | <monochrom> | :) |
2023-06-18 19:53:32 +0200 | segfaultfizzbuzz | (~segfaultf@12.172.217.142) (Ping timeout: 240 seconds) |
2023-06-18 19:55:27 +0200 | <dolio> | In categories, it's even easier to tell apart than in arithmetic, in some ways, because exponentials have a type like: C^op × C -> C. |
2023-06-18 19:55:43 +0200 | <dolio> | Which means it flips the direction of arrows for one of its positions. |
2023-06-18 19:55:43 +0200 | Unicorn_Princess | (~Unicorn_P@user/Unicorn-Princess/x-3540542) (Ping timeout: 265 seconds) |
2023-06-18 19:56:43 +0200 | segfaultfizzbuzz | (~segfaultf@12.172.217.142) |
2023-06-18 19:58:51 +0200 | lisbeths | (uid135845@id-135845.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
2023-06-18 19:58:58 +0200 | <dolio> | So I suppose exponentials might not even fit a strict definition of "binary operator" on categories. |
2023-06-18 19:59:37 +0200 | <dolio> | That's why reflexive graphs are so much better than categories. :þ |
2023-06-18 20:01:04 +0200 | segfaultfizzbuzz | reads the logs btw |
2023-06-18 20:02:03 +0200 | driib | (~driib@176.57.184.141) (Read error: Connection reset by peer) |
2023-06-18 20:02:25 +0200 | driib | (~driib@vmi931078.contaboserver.net) |
2023-06-18 20:02:27 +0200 | <ncf> | dolio: don't they also have a notion of opposite? |
2023-06-18 20:02:43 +0200 | <dolio> | Who's "they"? |
2023-06-18 20:03:01 +0200 | <dolio> | Oh, reflexive graphs? |
2023-06-18 20:03:26 +0200 | <ncf> | yes |
2023-06-18 20:03:56 +0200 | <ncf> | just flip all the edges |
2023-06-18 20:04:22 +0200 | <segfaultfizzbuzz> | tomsmeding: regarding whether this makes sense, thanks for the effort here... i am trying to understand... |
2023-06-18 20:04:23 +0200 | <dolio> | Yeah, you can take the opposite. But you don't need to to have a well defined exponential 'relator,' I think. |
2023-06-18 20:07:18 +0200 | <segfaultfizzbuzz> | so another way to look at this is that you have n "arguments" to a function like so: f : a -> b -> c -> d -> ... -> z |
2023-06-18 20:08:41 +0200 | <segfaultfizzbuzz> | and you can have constraints (or symmetries) on such functions |
2023-06-18 20:08:44 +0200 | driib | (~driib@vmi931078.contaboserver.net) (Read error: Connection reset by peer) |
2023-06-18 20:08:56 +0200 | <segfaultfizzbuzz> | categories care about associativity for instance |
2023-06-18 20:09:05 +0200 | driib | (~driib@vmi931078.contaboserver.net) |
2023-06-18 20:10:28 +0200 | <segfaultfizzbuzz> | umm i am having some difficulty articulating this in a nicely precise way |
2023-06-18 20:10:38 +0200 | <segfaultfizzbuzz> | let me try again: |
2023-06-18 20:11:09 +0200 | <segfaultfizzbuzz> | associativity, commutativity, invertability, etc might all be seen as enumerating some form of symmetry or identity on functions |
2023-06-18 20:11:24 +0200 | finn_elija | (~finn_elij@user/finn-elija/x-0085643) |
2023-06-18 20:11:24 +0200 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija))) |
2023-06-18 20:11:24 +0200 | finn_elija | FinnElija |
2023-06-18 20:11:49 +0200 | gentauro | (~gentauro@user/gentauro) (Ping timeout: 258 seconds) |
2023-06-18 20:11:56 +0200 | <segfaultfizzbuzz> | is there a sensible completion of the set (associativity, commutativity, invertability, ...) |
2023-06-18 20:12:18 +0200 | <Cale> | There's like... universal algebra |
2023-06-18 20:12:43 +0200 | bjobjo | (~bjobjo@user/bjobjo) (Quit: leaving) |
2023-06-18 20:12:56 +0200 | <monochrom> | I'm a conservative, and I'll say no. |
2023-06-18 20:14:27 +0200 | <Cale> | The result you get depends on how you abstract over those things |
2023-06-18 20:15:35 +0200 | <Cale> | But they're all equational constraints with first order quantifiers, so you could say the set of all sentences in the first order language having a single binary operator |
2023-06-18 20:16:15 +0200 | <Cale> | That's maybe more than you wanted |
2023-06-18 20:16:23 +0200 | <segfaultfizzbuzz> | interesting, but you could go beyond binary...? |
2023-06-18 20:16:45 +0200 | cheater | (~Username@user/cheater) |
2023-06-18 20:16:48 +0200 | dtman34 | (~dtman34@c-76-156-89-180.hsd1.mn.comcast.net) |
2023-06-18 20:16:51 +0200 | <segfaultfizzbuzz> | i failed to construct something but i was thinking one could maybe say something about a rotation or other permutation on n arguments |
2023-06-18 20:17:14 +0200 | <Cale> | https://en.wikipedia.org/wiki/Model_theory |
2023-06-18 20:17:30 +0200 | <Cale> | Would be a further generalization of that. |
2023-06-18 20:18:23 +0200 | <segfaultfizzbuzz> | interesting |
2023-06-18 20:18:36 +0200 | <Cale> | You can have arbitrary collections of n-ary relation and function symbols and then axioms written in terms of those and equality and logical connectives that need to be satisfied, and then interpret those as applying to some set together with suitable relations and functions on it |
2023-06-18 20:18:57 +0200 | bjobjo | (~bjobjo@user/bjobjo) |
2023-06-18 20:19:33 +0200 | <Cale> | https://en.wikipedia.org/wiki/Universal_algebra also is perhaps a bit closer to what you were originally asking about |
2023-06-18 20:19:55 +0200 | Unicorn_Princess | (~Unicorn_P@user/Unicorn-Princess/x-3540542) |
2023-06-18 20:20:30 +0200 | <Cale> | Universal algebra is a little more constrained, in that the axioms being discussed in that setting don't involve arbitrary logic, they're universally quantified equations. |
2023-06-18 20:23:24 +0200 | driib | (~driib@vmi931078.contaboserver.net) (Read error: Connection reset by peer) |
2023-06-18 20:23:46 +0200 | driib | (~driib@vmi931078.contaboserver.net) |
2023-06-18 20:23:49 +0200 | merijn | (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) |
2023-06-18 20:24:26 +0200 | <Cale> | and then you can go even further with generalizing these pictures, to many-sorted logics, or categorical semantics, where you don't just have one set that your quantifiers are ranging over |
2023-06-18 20:28:39 +0200 | gentauro | (~gentauro@user/gentauro) |
2023-06-18 20:31:29 +0200 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 265 seconds) |
2023-06-18 20:34:38 +0200 | driib | (~driib@vmi931078.contaboserver.net) (Read error: Connection reset by peer) |
2023-06-18 20:35:00 +0200 | driib | (~driib@vmi931078.contaboserver.net) |
2023-06-18 20:35:32 +0200 | cyphase | (~cyphase@user/cyphase) (Ping timeout: 240 seconds) |
2023-06-18 20:36:12 +0200 | cyphase | (~cyphase@user/cyphase) |
2023-06-18 20:36:29 +0200 | <segfaultfizzbuzz> | 🤯 |
2023-06-18 20:39:04 +0200 | rf | (~rf@2605:59c8:179c:f610:381a:41b2:b045:204d) |
2023-06-18 20:42:39 +0200 | Ekho | (~Ekho@user/ekho) (Server closed connection) |
2023-06-18 20:42:40 +0200 | <segfaultfizzbuzz> | the jacobi identity might be something useful as an example of something nonobvious to include in the set (assoc, commut, invert, etc) |
2023-06-18 20:44:03 +0200 | machinedgod | (~machinedg@d198-53-218-113.abhsia.telus.net) (Quit: Lost terminal) |
2023-06-18 20:47:14 +0200 | hamishmack | (sid389057@id-389057.hampstead.irccloud.com) (Server closed connection) |
2023-06-18 20:47:24 +0200 | hamishmack | (sid389057@id-389057.hampstead.irccloud.com) |
2023-06-18 20:48:38 +0200 | driib | (~driib@vmi931078.contaboserver.net) (Remote host closed the connection) |
2023-06-18 20:48:39 +0200 | bitmapper | (uid464869@id-464869.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
2023-06-18 20:48:58 +0200 | driib | (~driib@vmi931078.contaboserver.net) |
2023-06-18 20:51:10 +0200 | mc47 | (~mc47@xmonad/TheMC47) |
2023-06-18 20:54:23 +0200 | Ekho | (~Ekho@user/ekho) |
2023-06-18 20:55:54 +0200 | Pickchea | (~private@user/pickchea) |
2023-06-18 20:55:54 +0200 | dmj` | (sid72307@id-72307.hampstead.irccloud.com) (Server closed connection) |
2023-06-18 20:56:23 +0200 | dmj` | (sid72307@id-72307.hampstead.irccloud.com) |
2023-06-18 20:58:36 +0200 | merijn | (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 252 seconds) |
2023-06-18 20:59:39 +0200 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:2847:13c1:54f7:ebbc) (Remote host closed the connection) |
2023-06-18 21:00:27 +0200 | <segfaultfizzbuzz> | thx for the math bbl |
2023-06-18 21:00:28 +0200 | segfaultfizzbuzz | (~segfaultf@12.172.217.142) (Quit: segfaultfizzbuzz) |
2023-06-18 21:02:30 +0200 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:2847:13c1:54f7:ebbc) |
2023-06-18 21:04:42 +0200 | driib | (~driib@vmi931078.contaboserver.net) (Remote host closed the connection) |
2023-06-18 21:05:02 +0200 | driib | (~driib@vmi931078.contaboserver.net) |
2023-06-18 21:07:24 +0200 | dtman34 | (~dtman34@c-76-156-89-180.hsd1.mn.comcast.net) (Ping timeout: 252 seconds) |
2023-06-18 21:12:37 +0200 | dtman34 | (~dtman34@2601:447:d000:93c9:49a3:2ee1:9e07:c081) |
2023-06-18 21:14:17 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2023-06-18 21:14:50 +0200 | Inst | (~Inst@2601:6c4:4081:2fc0:add4:91ad:5330:1cfd) (Ping timeout: 260 seconds) |
2023-06-18 21:18:23 +0200 | Inst | (~Inst@2601:6c4:4081:2fc0:c22:b297:94d:820e) |
2023-06-18 21:18:41 +0200 | Inst | (~Inst@2601:6c4:4081:2fc0:c22:b297:94d:820e) (Read error: Connection reset by peer) |
2023-06-18 21:18:44 +0200 | driib | (~driib@vmi931078.contaboserver.net) (Remote host closed the connection) |
2023-06-18 21:19:05 +0200 | driib | (~driib@vmi931078.contaboserver.net) |
2023-06-18 21:28:06 +0200 | driib | (~driib@vmi931078.contaboserver.net) (Remote host closed the connection) |
2023-06-18 21:28:26 +0200 | driib | (~driib@vmi931078.contaboserver.net) |
2023-06-18 21:34:09 +0200 | driib | (~driib@vmi931078.contaboserver.net) (Read error: Connection reset by peer) |
2023-06-18 21:34:51 +0200 | driib | (~driib@176.57.184.141) |
2023-06-18 21:35:14 +0200 | Natch | (~natch@c-9e07225c.038-60-73746f7.bbcust.telenor.se) (Remote host closed the connection) |
2023-06-18 21:37:58 +0200 | Natch | (~natch@c-9e07225c.038-60-73746f7.bbcust.telenor.se) |
2023-06-18 21:43:30 +0200 | fendor | (~fendor@2a02:8388:1640:be00:7aca:a77a:4a28:631a) |
2023-06-18 21:46:40 +0200 | driib | (~driib@176.57.184.141) (Remote host closed the connection) |
2023-06-18 21:47:00 +0200 | driib | (~driib@vmi931078.contaboserver.net) |
2023-06-18 21:50:03 +0200 | mechap | (~mechap@user/mechap) |
2023-06-18 21:51:28 +0200 | Sgeo | (~Sgeo@user/sgeo) |
2023-06-18 21:53:22 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2023-06-18 21:54:27 +0200 | bontaq | (~user@ool-45779b84.dyn.optonline.net) |
2023-06-18 21:59:41 +0200 | biberu | (~biberu@user/biberu) (Read error: Connection reset by peer) |
2023-06-18 21:59:49 +0200 | driib | (~driib@vmi931078.contaboserver.net) (Read error: Connection reset by peer) |
2023-06-18 22:00:12 +0200 | driib | (~driib@vmi931078.contaboserver.net) |
2023-06-18 22:02:51 +0200 | merijn | (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) |
2023-06-18 22:05:14 +0200 | biberu | (~biberu@user/biberu) |
2023-06-18 22:06:05 +0200 | michalz | (~michalz@185.246.207.201) |
2023-06-18 22:08:21 +0200 | merijn | (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 258 seconds) |
2023-06-18 22:11:16 +0200 | driib | (~driib@vmi931078.contaboserver.net) (Remote host closed the connection) |
2023-06-18 22:11:36 +0200 | driib | (~driib@vmi931078.contaboserver.net) |
2023-06-18 22:22:12 +0200 | jero98772 | (~jero98772@2800:484:1d7f:5d36::2) (Ping timeout: 240 seconds) |
2023-06-18 22:23:17 +0200 | driib | (~driib@vmi931078.contaboserver.net) (Remote host closed the connection) |
2023-06-18 22:23:32 +0200 | pavonia | (~user@user/siracusa) |
2023-06-18 22:24:00 +0200 | driib | (~driib@176.57.184.141) |
2023-06-18 22:24:47 +0200 | chromoblob | (~user@37.113.180.121) |
2023-06-18 22:26:16 +0200 | merijn | (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) |
2023-06-18 22:27:48 +0200 | _ht | (~Thunderbi@28-52-174-82.ftth.glasoperator.nl) (Remote host closed the connection) |
2023-06-18 22:28:49 +0200 | takuan | (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
2023-06-18 22:33:34 +0200 | merijn | (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 252 seconds) |
2023-06-18 22:34:25 +0200 | jero98772 | (~jero98772@2800:484:1d7f:5d36::2) |
2023-06-18 22:36:13 +0200 | Zamyatins_Sky | (~Zamyatins@broadband-188-255-84-143.ip.moscow.rt.ru) |
2023-06-18 22:36:50 +0200 | driib | (~driib@176.57.184.141) (Remote host closed the connection) |
2023-06-18 22:37:13 +0200 | driib | (~driib@vmi931078.contaboserver.net) |
2023-06-18 22:37:46 +0200 | <Zamyatins_Sky> | Hi! Has anyone here tried the `beam` package (specifically, with SQLite backend)? For some reason, I can't even build the docs, because the build-docs.sh script complains about `TypeError: load() missing 1 required positional argument: 'Loader' |
2023-06-18 22:37:47 +0200 | jaror[m] | (~jaror@2001:470:69fc:105::265) |
2023-06-18 22:43:27 +0200 | wootehfoot | (~wootehfoo@user/wootehfoot) (Quit: Leaving) |
2023-06-18 22:46:06 +0200 | trev | (~trev@user/trev) (Quit: trev) |
2023-06-18 22:47:12 +0200 | jonathan_ | (~jonathan@83.252.3.92) (Ping timeout: 240 seconds) |
2023-06-18 22:47:51 +0200 | Wojciech_K | (~Wojciech_@2a01:4f9:6a:18a8::239) (Quit: ZNC 1.7.5+deb4 - https://znc.in) |
2023-06-18 22:48:29 +0200 | Wojciech_K | (~Wojciech_@2a01:4f9:6a:18a8::239) |
2023-06-18 22:49:52 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2023-06-18 22:50:04 +0200 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:2847:13c1:54f7:ebbc) (Remote host closed the connection) |
2023-06-18 22:50:41 +0200 | driib | (~driib@vmi931078.contaboserver.net) (Read error: Connection reset by peer) |
2023-06-18 22:50:53 +0200 | brettgilio | (~brettgili@2001:19f0:5c00:27fc:5400:4ff:fe7a:1f8e) (Quit: The Lounge - https://thelounge.chat) |
2023-06-18 22:51:01 +0200 | driib | (~driib@vmi931078.contaboserver.net) |
2023-06-18 22:51:39 +0200 | brettgilio | (~brettgili@2001:19f0:5c00:27fc:5400:4ff:fe7a:1f8e) |
2023-06-18 22:51:41 +0200 | brettgilio | (~brettgili@2001:19f0:5c00:27fc:5400:4ff:fe7a:1f8e) (Client Quit) |
2023-06-18 22:52:20 +0200 | brettgilio | (~brettgili@2001:19f0:5c00:27fc:5400:4ff:fe7a:1f8e) |
2023-06-18 23:00:40 +0200 | merijn | (~merijn@145.90.225.2) |
2023-06-18 23:01:30 +0200 | rembo10 | (~rembo10@main.remulis.com) (Server closed connection) |
2023-06-18 23:02:09 +0200 | rembo10 | (~rembo10@2a01:4f9:c010:b5b9::1) |
2023-06-18 23:02:58 +0200 | driib | (~driib@vmi931078.contaboserver.net) (Remote host closed the connection) |
2023-06-18 23:03:18 +0200 | driib | (~driib@vmi931078.contaboserver.net) |
2023-06-18 23:06:28 +0200 | <Cale> | Zamyatins_Sky: We use beam where I work, but with the postgres backend, and we're using nix to build things, so I haven't had to mess with build-docs.sh |
2023-06-18 23:07:05 +0200 | tromp | (~textual@92.110.219.57) |
2023-06-18 23:07:51 +0200 | <Cale> | I also usually just read the docs online, they're on hackage https://hackage.haskell.org/package/beam-core and here https://haskell-beam.github.io/beam/ |
2023-06-18 23:08:21 +0200 | driib | (~driib@vmi931078.contaboserver.net) (Remote host closed the connection) |
2023-06-18 23:09:05 +0200 | driib | (~driib@176.57.184.141) |
2023-06-18 23:09:50 +0200 | Midjak | (~Midjak@82.66.147.146) (Quit: This computer has gone to sleep) |
2023-06-18 23:13:25 +0200 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:2847:13c1:54f7:ebbc) |
2023-06-18 23:14:39 +0200 | <Zamyatins_Sky> | Actually I do not need to build docs specifically, I want to use beam in my side project, and I am trying to figure out why the basic thing (conversion of custom types, which is explicitly described in docs) does not work |
2023-06-18 23:16:05 +0200 | titibandit | (~titibandi@user/titibandit) (Read error: Connection reset by peer) |
2023-06-18 23:17:18 +0200 | <ijqq> | So if I have a parser called char which is Char - Parser Char, I can make a string parser as stringParser = traverse char. But how can I define this parser using <*> and char? |
2023-06-18 23:17:37 +0200 | <ijqq> | char -> Parser Char * |
2023-06-18 23:18:50 +0200 | maerwald | (~maerwald@mail.hasufell.de) (Server closed connection) |
2023-06-18 23:19:09 +0200 | maerwald | (~maerwald@mail.hasufell.de) |
2023-06-18 23:20:21 +0200 | driib | (~driib@176.57.184.141) (Remote host closed the connection) |
2023-06-18 23:20:42 +0200 | driib | (~driib@vmi931078.contaboserver.net) |
2023-06-18 23:22:57 +0200 | tromp | (~textual@92.110.219.57) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2023-06-18 23:24:18 +0200 | <monochrom> | No, not traverse. Perhaps many or some. |
2023-06-18 23:24:55 +0200 | <monochrom> | err actually, |
2023-06-18 23:24:58 +0200 | <monochrom> | @type traverse |
2023-06-18 23:24:58 +0200 | glguy | (~glguy@libera/staff-emeritus/glguy) |
2023-06-18 23:24:59 +0200 | <lambdabot> | (Traversable t, Applicative f) => (a -> f b) -> t a -> f (t b) |
2023-06-18 23:25:19 +0200 | <monochrom> | Ah yeah traverse is right, you're going for [Char] -> Parser Char. |
2023-06-18 23:25:30 +0200 | Pickchea | (~private@user/pickchea) (Quit: Leaving) |
2023-06-18 23:25:57 +0200 | <monochrom> | traverse is implemented in the standard library by <*> pure and recursion in the "obvious" way. |
2023-06-18 23:27:19 +0200 | S11001001 | (sid42510@id-42510.ilkley.irccloud.com) (Server closed connection) |
2023-06-18 23:27:30 +0200 | S11001001 | (sid42510@id-42510.ilkley.irccloud.com) |
2023-06-18 23:27:35 +0200 | <monochrom> | err [Char] -> Parser [Char] |
2023-06-18 23:27:43 +0200 | <ijqq> | oh okay |
2023-06-18 23:27:49 +0200 | <ijqq> | I mean, I understand that it must be |
2023-06-18 23:28:01 +0200 | <ijqq> | But I guess the obvious way is not so obvious to me :/ |
2023-06-18 23:28:07 +0200 | <ijqq> | Maybe I'll keep thikning about it |
2023-06-18 23:28:11 +0200 | <glguy> | I've been revisiting my previous alex/happy generated TOML parser that I'd previously abandoned because the TOML specification is 1) a disaster to lex, 2) is a mess when it comes to what you're allowed to define or not with super/subtables/dottedkey-defined-tables, etc. but I think I've got it all worked out now :) https://glguy.net/gitea/glguy/toml |
2023-06-18 23:28:15 +0200 | <monochrom> | Perhaps liftA2 (:) makes it more obvious than <*> |
2023-06-18 23:28:46 +0200 | <glguy> | Other than those two complaints, I still rather like toml as a config language option |
2023-06-18 23:29:06 +0200 | michalz | (~michalz@185.246.207.201) (Remote host closed the connection) |
2023-06-18 23:30:02 +0200 | driib | (~driib@vmi931078.contaboserver.net) (Remote host closed the connection) |
2023-06-18 23:30:30 +0200 | <monochrom> | accept ['a', 'b', 'c'] = accept 'a', then accept ['b', 'c'], use (:) to combine their respective answers. |
2023-06-18 23:30:46 +0200 | driib | (~driib@176.57.184.141) |
2023-06-18 23:30:52 +0200 | hugo | (znc@verdigris.lysator.liu.se) (Ping timeout: 240 seconds) |
2023-06-18 23:32:08 +0200 | cafkafk | (~cafkafk@fsf/member/cafkafk) (Ping timeout: 240 seconds) |
2023-06-18 23:32:12 +0200 | jero98772 | (~jero98772@2800:484:1d7f:5d36::2) (Ping timeout: 240 seconds) |
2023-06-18 23:32:35 +0200 | fendor | (~fendor@2a02:8388:1640:be00:7aca:a77a:4a28:631a) (Remote host closed the connection) |
2023-06-18 23:34:12 +0200 | merijn | (~merijn@145.90.225.2) (Ping timeout: 240 seconds) |
2023-06-18 23:34:37 +0200 | cafkafk | (~cafkafk@fsf/member/cafkafk) |
2023-06-18 23:34:39 +0200 | bilegeek | (~bilegeek@2600:1008:b0a2:c545:7bfb:76e2:41bb:db48) |
2023-06-18 23:35:19 +0200 | driib | (~driib@176.57.184.141) (Remote host closed the connection) |
2023-06-18 23:35:39 +0200 | driib | (~driib@vmi931078.contaboserver.net) |
2023-06-18 23:36:56 +0200 | <ijqq> | I think it got it |
2023-06-18 23:36:57 +0200 | <ijqq> | http://sprunge.us/XDEmJR |
2023-06-18 23:37:17 +0200 | machinedgod | (~machinedg@d198-53-218-113.abhsia.telus.net) |
2023-06-18 23:37:26 +0200 | <ijqq> | the char'' |
2023-06-18 23:37:39 +0200 | <ijqq> | oh it should be called chars oops |
2023-06-18 23:38:07 +0200 | <monochrom> | Yeah :) |
2023-06-18 23:38:22 +0200 | <ijqq> | cool, thank you for the help :) |
2023-06-18 23:39:20 +0200 | <monochrom> | For the <*> version you just recall liftA2 (:) foo bar = (:) <$> foo <*> bar |
2023-06-18 23:40:43 +0200 | <ijqq> | was just doing that |
2023-06-18 23:40:45 +0200 | <ijqq> | nice |
2023-06-18 23:40:54 +0200 | <ijqq> | thank you :) |
2023-06-18 23:41:01 +0200 | <ijqq> | now I can go back to using traverse haha |
2023-06-18 23:41:08 +0200 | driib | (~driib@vmi931078.contaboserver.net) (Read error: Connection reset by peer) |
2023-06-18 23:41:49 +0200 | driib | (~driib@176.57.184.141) |
2023-06-18 23:42:16 +0200 | mc47 | (~mc47@xmonad/TheMC47) (Remote host closed the connection) |
2023-06-18 23:43:32 +0200 | <ijqq> | oh cool glguy, i am trying to write one now |
2023-06-18 23:44:19 +0200 | <glguy> | ijqq: Sure, if you're doing parser exercises, this could be a good project |
2023-06-18 23:44:30 +0200 | jero98772 | (~jero98772@2800:484:1d7f:5d36::2) |
2023-06-18 23:45:19 +0200 | <ijqq> | Yeah it's been interesting so far |
2023-06-18 23:45:57 +0200 | <glguy> | https://toml.io/en/v1.0.0 |
2023-06-18 23:47:18 +0200 | driib | (~driib@176.57.184.141) (Read error: Connection reset by peer) |
2023-06-18 23:47:39 +0200 | driib | (~driib@vmi931078.contaboserver.net) |
2023-06-18 23:48:10 +0200 | <ijqq> | Yep i've been going through that. I have only a few bits working, I can parse arrays and strings and numbers so far. But I still have lots left to do like figuring out how to actually assign all the correct stuff and then implementing more detailed stuff, like all the types of strings and the escapes and so on. |
2023-06-18 23:48:12 +0200 | hugo | (znc@verdigris.lysator.liu.se) |
2023-06-18 23:49:31 +0200 | coot | (~coot@89.69.206.216) (Quit: coot) |
2023-06-18 23:49:52 +0200 | <Zamyatins_Sky> | Cale: I have composed a minimal reproductable example. I would really appreciate if you could look at that: https://bpa.st/FHQVG. |
2023-06-18 23:53:00 +0200 | hugo | (znc@verdigris.lysator.liu.se) (Ping timeout: 258 seconds) |
2023-06-18 23:53:29 +0200 | <Zamyatins_Sky> | It is basically what tutorial says, but with other wording.. yet I get a type mismatch: Couldn't match expected type ‘HaskellLiteralForQExpr StatsFormat’ with actual type ‘StatsFormat’ |
2023-06-18 23:53:32 +0200 | driib | (~driib@vmi931078.contaboserver.net) (Read error: Connection reset by peer) |
2023-06-18 23:53:53 +0200 | driib | (~driib@vmi931078.contaboserver.net) |
2023-06-18 23:55:10 +0200 | <Zamyatins_Sky> | Moreover, if I add `default_` instead of `val_ 0` as the first argument to `StatsSingle` (to exploit the autoincrement), I get another error: Couldn't match type ‘QGenExpr ctxt0 be0 s0 a0’ with ‘Int’, Expected: Columnar Identity Int, Actual: QGenExpr ctxt0 be0 s0 a0 |
2023-06-18 23:59:04 +0200 | <Cale> | on which line? |
2023-06-18 23:59:17 +0200 | hugo | (znc@verdigris.lysator.liu.se) |
2023-06-18 23:59:47 +0200 | <Zamyatins_Sky> | Cale: Main.hs:93:44 |