2025-02-26 00:00:53 +0100 | <tomsmeding> | hololeap: sepBy ((,) <$> manyTill (char ':') <*> manyTill (lookAhead (oneOf ":," <|> eof))) (char ',') ? |
2025-02-26 00:01:24 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-26 00:01:26 +0100 | ljdarj1 | (~Thunderbi@user/ljdarj) ljdarj |
2025-02-26 00:02:18 +0100 | <hololeap> | hm, you would think with Parsec being a monad, it could be done with: sepBy anyChar (char ',') >>= mapM (...) |
2025-02-26 00:02:28 +0100 | <tomsmeding> | anyChar parses _one_ character |
2025-02-26 00:02:55 +0100 | <hololeap> | right, s/anyChar/(many anyChar)/ |
2025-02-26 00:03:04 +0100 | <tomsmeding> | also, while you can process the result of parsing later using (>>=), parsec always parses _from_ the input string |
2025-02-26 00:03:13 +0100 | ljdarj | (~Thunderbi@user/ljdarj) (Ping timeout: 248 seconds) |
2025-02-26 00:03:13 +0100 | ljdarj1 | ljdarj |
2025-02-26 00:03:56 +0100 | <tomsmeding> | you can't "re-inject" some arbitrary string into the source to be parsed |
2025-02-26 00:04:22 +0100 | <hololeap> | I see |
2025-02-26 00:05:03 +0100 | <tomsmeding> | of course you technically can just start a new parser for that string, and you can also `setInput`, but typically both are a bad idea |
2025-02-26 00:05:52 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
2025-02-26 00:06:24 +0100 | <tomsmeding> | hololeap: also, that "sepBy (many anyChar) (char ',')" wouldn't even work: the `many anyChar` would consume the entire input from here, and because it consumed input, it would count as "succeeded" which means it doesn't backtrack |
2025-02-26 00:07:16 +0100 | <tomsmeding> | % import Text.Parsec |
2025-02-26 00:07:16 +0100 | <yahb2> | <no output> |
2025-02-26 00:07:24 +0100 | <tomsmeding> | % parse (sepBy (many anyChar) (char ',')) "<stdin>" "abc,def,ghi" |
2025-02-26 00:07:24 +0100 | <yahb2> | Right ["abc,def,ghi"] |
2025-02-26 00:07:41 +0100 | <tomsmeding> | hm, let's see if I can whiteboard code |
2025-02-26 00:07:56 +0100 | <tomsmeding> | % parse (sepBy ((,) <$> manyTill (char ':') <*> manyTill (lookAhead (oneOf ":," <|> eof))) (char ',')) "<stdin>" "this:that,black:white" |
2025-02-26 00:07:56 +0100 | <yahb2> | <interactive>:287:23: error: [GHC-83865] ; • Couldn't match expected type: ParsecT ; String () GHC.Internal.Data.Functor.Identity.Identity a1 ; ... |
2025-02-26 00:08:07 +0100 | <tomsmeding> | evidently not! |
2025-02-26 00:08:23 +0100 | <tomsmeding> | % parse (sepBy ((,) <$> manyTill anyChar (char ':') <*> manyTill anyChar (lookAhead (oneOf ":," <|> eof))) (char ',')) "<stdin>" "this:that,black:white" |
2025-02-26 00:08:23 +0100 | <yahb2> | <interactive>:289:99: error: [GHC-83865] ; • Couldn't match type ‘()’ with ‘Char’ ; Expected: ParsecT ; String () GHC.Internal.Data.Functor.Identity.Identity Char ; ... |
2025-02-26 00:08:26 +0100 | <monochrom> | Yikes, abuse of lookAhead again. |
2025-02-26 00:08:50 +0100 | <monochrom> | many (satisfy (/= ',')) pretty please |
2025-02-26 00:08:59 +0100 | <tomsmeding> | I guess |
2025-02-26 00:09:49 +0100 | <monochrom> | What you should really lament, if you like, is that parsec is not regex, so whereas in regex you just have to say ".*,.*", you simply can't do that in parsec. |
2025-02-26 00:10:09 +0100 | <tomsmeding> | % parse (sepBy ((,) <$> (many (satisfy (/= ':')) <* char ':') <*> many (satisfy (`notElem` ":,"))) (char ',')) "<stdin>" "this:that,black:white" |
2025-02-26 00:10:09 +0100 | <yahb2> | Right [("this","that"),("black","white")] |
2025-02-26 00:10:20 +0100 | <tomsmeding> | hololeap: there |
2025-02-26 00:10:29 +0100 | foul_owl | (~kerry@174-21-138-88.tukw.qwest.net) foul_owl |
2025-02-26 00:10:32 +0100 | <hololeap> | cool, thanks :) |
2025-02-26 00:10:43 +0100 | <tomsmeding> | monochrom: thanks, it's been too long since I parsec'd, this is also nicer to write |
2025-02-26 00:10:44 +0100 | <monochrom> | BTW the "convenience" of regex allowing that is avenged by the fact that such high non-determinism causes exp-time or exp-space. |
2025-02-26 00:10:57 +0100 | <hololeap> | although I wonder if it would be more readable to just do this with span from Data.List |
2025-02-26 00:11:37 +0100 | <tomsmeding> | if you write out that <$> <*> sequence as a do-block, it gets much more readable |
2025-02-26 00:11:39 +0100 | <monochrom> | Oh, the split package has tools for that too. |
2025-02-26 00:12:12 +0100 | <monochrom> | You can write your own recursion over span. But the split package does that for you. |
2025-02-26 00:12:40 +0100 | <tomsmeding> | hololeap: https://paste.tomsmeding.com/QHaiHEVF |
2025-02-26 00:12:43 +0100 | <monochrom> | Although, I confess that I want 0 dependencies so I wrote my own recursion :) |
2025-02-26 00:12:53 +0100 | <tomsmeding> | but yes, a splitting function is perhaps nicer here |
2025-02-26 00:16:46 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-26 00:20:18 +0100 | rvalue | (~rvalue@user/rvalue) (Quit: ZNC - https://znc.in) |
2025-02-26 00:21:03 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds) |
2025-02-26 00:23:46 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-26 00:28:14 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 252 seconds) |
2025-02-26 00:32:08 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-26 00:36:46 +0100 | __monty__ | (~toonn@user/toonn) (Quit: leaving) |
2025-02-26 00:37:49 +0100 | rvalue | (~rvalue@user/rvalue) rvalue |
2025-02-26 00:38:43 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds) |
2025-02-26 00:50:12 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-26 00:51:13 +0100 | src | (~src@user/src) src |
2025-02-26 00:55:05 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 268 seconds) |
2025-02-26 00:58:51 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-26 00:59:26 +0100 | <EvanR> | is parsec more or less powerful than regex |
2025-02-26 00:59:41 +0100 | <EvanR> | does it hinge on whether unlimited lookahead is regex |
2025-02-26 01:00:25 +0100 | <geekosaur> | if regex is extended with "functions", see raku |
2025-02-26 01:00:36 +0100 | <mauke> | parsec can nest |
2025-02-26 01:00:57 +0100 | <geekosaur> | but there's some question as to whether that's actually "regex" (I think the "actually should be regular" ship sailed years ago) |
2025-02-26 01:03:28 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 265 seconds) |
2025-02-26 01:07:40 +0100 | <EvanR> | I guess irregular expressions isn't particularly marketable |
2025-02-26 01:10:48 +0100 | mange | (~user@user/mange) mange |
2025-02-26 01:11:03 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-26 01:12:50 +0100 | <jackdk> | Don't we call those "perl compatible"? |
2025-02-26 01:13:47 +0100 | <mauke> | I think "perl compatible" is mostly about syntax (ok, and some features as well) |
2025-02-26 01:14:08 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-26 01:14:16 +0100 | <mauke> | backreferences existed long before perl |
2025-02-26 01:15:31 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 244 seconds) |
2025-02-26 01:16:44 +0100 | Googulator78 | (~Googulato@2a01-036d-0106-0c81-ad7c-ac56-196b-c9a2.pool6.digikabel.hu) |
2025-02-26 01:16:45 +0100 | <EvanR> | now I have to pull out the history to figure out what "long before perl" means |
2025-02-26 01:17:04 +0100 | <geekosaur> | egrep |
2025-02-26 01:18:28 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
2025-02-26 01:19:42 +0100 | <mauke> | https://unix.stackexchange.com/questions/623521/why-does-ed-support-backreferences-but-not-alterna… |
2025-02-26 01:20:10 +0100 | Googulator | (~Googulato@2a01-036d-0106-0c81-ad7c-ac56-196b-c9a2.pool6.digikabel.hu) (Ping timeout: 240 seconds) |
2025-02-26 01:21:54 +0100 | Smiles | (uid551636@id-551636.lymington.irccloud.com) Smiles |
2025-02-26 01:26:59 +0100 | <geekosaur> | mm, right, forgot ed went back even further |
2025-02-26 01:29:31 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-26 01:29:38 +0100 | <ski> | geekosaur : "IrRegular Expressions" by foof at <https://synthcode.com/scheme/irregex/> |
2025-02-26 01:32:29 +0100 | krei-se- | (~krei-se@p3ee0f060.dip0.t-ipconnect.de) krei-se |
2025-02-26 01:32:35 +0100 | <mauke> | the bell labs regex code wasn't freely available, so perl 2.0 incorporated henry spencer's implementation, which used backtracking |
2025-02-26 01:33:36 +0100 | krei-se | (~krei-se@p3ee0fb6e.dip0.t-ipconnect.de) (Ping timeout: 252 seconds) |
2025-02-26 01:33:52 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
2025-02-26 01:34:49 +0100 | ski | . o O ( "Regular Expression Matching Can Be Simple And Fast (but is slow in Java, Perl, PHP, Python, Ruby, ...)" by Russ Cox in 2007-01 at <https://swtch.com/~rsc/regexp/regexp1.html> ) |
2025-02-26 01:36:02 +0100 | <mauke> | "With the exception of backreferences, the features provided by the slow backtracking implementations can be provided by the automata-based implementations at dramatically faster, more consistent speeds." is of course wrong |
2025-02-26 01:36:26 +0100 | misterfish | (~misterfis@84.53.85.146) (Ping timeout: 252 seconds) |
2025-02-26 01:40:22 +0100 | JuanDaugherty | (~juan@user/JuanDaugherty) JuanDaugherty |
2025-02-26 01:44:53 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-26 01:45:24 +0100 | <geekosaur> | yeh, I think pretty much everyone was using Spencer's code back then |
2025-02-26 01:49:25 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds) |
2025-02-26 01:51:03 +0100 | sprotte24 | (~sprotte24@p200300d16f33ea00547a79769710f53f.dip0.t-ipconnect.de) (Quit: Leaving) |
2025-02-26 01:53:34 +0100 | peterbecich | (~Thunderbi@syn-047-229-123-186.res.spectrum.com) peterbecich |
2025-02-26 01:56:13 +0100 | xff0x | (~xff0x@2405:6580:b080:900:3152:bac6:3fc:3eb6) (Ping timeout: 252 seconds) |
2025-02-26 01:56:47 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-26 02:00:15 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-26 02:01:00 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 252 seconds) |
2025-02-26 02:02:13 +0100 | zungi | (~tory@user/andrewchawk) (Remote host closed the connection) |
2025-02-26 02:04:40 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
2025-02-26 02:06:47 +0100 | zungi | (~tory@user/andrewchawk) andrewchawk |
2025-02-26 02:07:36 +0100 | JuanDaugherty | (~juan@user/JuanDaugherty) (Quit: praxis.meansofproduction.biz (juan@acm.org)) |
2025-02-26 02:08:19 +0100 | takuan | (~takuan@d8D86B601.access.telenet.be) (Ping timeout: 252 seconds) |
2025-02-26 02:15:39 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-26 02:16:05 +0100 | machinedgod | (~machinedg@d108-173-18-100.abhsia.telus.net) (Ping timeout: 248 seconds) |
2025-02-26 02:17:25 +0100 | <cheater> | i'm still dismayed that no one extended regex to include negative matches |
2025-02-26 02:17:41 +0100 | <cheater> | since they can always be compiled down to a finite amount of positive matches |
2025-02-26 02:18:01 +0100 | <cheater> | just that negative matches are human readable and the positive version isn't |
2025-02-26 02:18:37 +0100 | <geekosaur> | actual perl REs have negative matches |
2025-02-26 02:18:52 +0100 | <cheater> | as in, "matching this rejects the match"? |
2025-02-26 02:18:57 +0100 | <geekosaur> | or at least negative lookahead |
2025-02-26 02:19:01 +0100 | <geekosaur> | yes |
2025-02-26 02:19:11 +0100 | <cheater> | how would you match for hat, but not within the word what? |
2025-02-26 02:19:28 +0100 | yegorc | (~yegorc@user/yegorc) yegorc |
2025-02-26 02:19:42 +0100 | peterbecich | (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 252 seconds) |
2025-02-26 02:19:53 +0100 | <Square> | If I have a project that contains .cabal files it seems newer versions of cabal tries to use all these files to resolve dependencies. Is there a way to neglect other .cabal files in a project? |
2025-02-26 02:20:07 +0100 | <Square> | s/contains/contains several/ |
2025-02-26 02:20:38 +0100 | <cheater> | idk but maybe cabal.project |
2025-02-26 02:20:44 +0100 | <geekosaur> | --ignore-project |
2025-02-26 02:21:24 +0100 | <geekosaur> | this isn't usually what you actually want, though, as it can lead to mutually incompatible project components |
2025-02-26 02:21:48 +0100 | <geekosaur> | which is why cabal solves for the whole project |
2025-02-26 02:22:16 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
2025-02-26 02:23:07 +0100 | <Square> | thanks. I'm migrating a project - sub-project by sub-project. |
2025-02-26 02:23:32 +0100 | <Square> | ...so during that phase it might help me to work on them individually first |
2025-02-26 02:27:01 +0100 | alp | (~alp@2001:861:8ca0:4940:d9b2:488b:3c7b:5f95) (Ping timeout: 252 seconds) |
2025-02-26 02:33:42 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-26 02:38:41 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 268 seconds) |
2025-02-26 02:42:30 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-26 02:42:55 +0100 | <geekosaur> | you might do better making a temporary project file containing only the parts you need, because eventually you'll hit dependencies within the project and will need them to be visible |
2025-02-26 02:43:48 +0100 | yegorc | (~yegorc@user/yegorc) (Leaving) |
2025-02-26 02:44:18 +0100 | <Square> | gotcha. I'll keep that in mind if I run into problems |
2025-02-26 02:44:25 +0100 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) bitdex |
2025-02-26 02:45:23 +0100 | Tuplanolla | (~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) (Ping timeout: 245 seconds) |
2025-02-26 02:47:12 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 272 seconds) |
2025-02-26 02:47:26 +0100 | messewix | (~jmc@user/messewix) messewix |
2025-02-26 02:47:57 +0100 | <mauke> | cheater: (?<!w)hat |
2025-02-26 02:48:42 +0100 | <cheater> | nice |
2025-02-26 02:48:46 +0100 | <cheater> | does this work in any greps? |
2025-02-26 02:48:57 +0100 | <mauke> | the positive version is (?:^|[^w])hat |
2025-02-26 02:49:04 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-26 02:49:56 +0100 | <mauke> | should work in GNU grep -P |
2025-02-26 02:50:04 +0100 | <mauke> | and ack, if you count that as a grep |
2025-02-26 02:50:12 +0100 | xff0x | (~xff0x@fsb6a9491c.tkyc517.ap.nuro.jp) |
2025-02-26 02:53:25 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
2025-02-26 02:54:49 +0100 | acidjnk_new | (~acidjnk@p200300d6e7283f3800c9913f6d25b0a5.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
2025-02-26 03:04:27 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-26 03:04:31 +0100 | olivial_ | (~benjaminl@2601:1c0:847f:9c70:223:24ff:fe66:4370) (Read error: Connection reset by peer) |
2025-02-26 03:04:45 +0100 | olivial | (~benjaminl@user/benjaminl) benjaminl |
2025-02-26 03:08:53 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds) |
2025-02-26 03:12:04 +0100 | vanishingideal | (~vanishing@user/vanishingideal) (Ping timeout: 244 seconds) |
2025-02-26 03:13:59 +0100 | vanishingideal | (~vanishing@user/vanishingideal) vanishingideal |
2025-02-26 03:19:51 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-26 03:20:22 +0100 | <cheater> | mauke: fantastic |
2025-02-26 03:20:29 +0100 | <cheater> | i guess rg doesn't do it though? |
2025-02-26 03:20:42 +0100 | <cheater> | rg... sigh... |
2025-02-26 03:21:51 +0100 | <mauke> | needs --pcre2, apparently |
2025-02-26 03:24:02 +0100 | weary-traveler | (~user@user/user363627) user363627 |
2025-02-26 03:24:14 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
2025-02-26 03:28:55 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-26 03:31:00 +0100 | Smiles | (uid551636@id-551636.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
2025-02-26 03:31:09 +0100 | <haskellbridge> | <Bowuigi> cheater both structural regular expressions (Bell Labs, some time ago) and PEG have negative matches IIRC |
2025-02-26 03:31:32 +0100 | <cheater> | hmmmm |
2025-02-26 03:31:33 +0100 | <cheater> | thank you |
2025-02-26 03:31:34 +0100 | <haskellbridge> | <Bowuigi> Structural regex seems to be more powerful. It's definitely more practical for interactive usage |
2025-02-26 03:31:46 +0100 | <cheater> | what's structural |
2025-02-26 03:33:02 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 252 seconds) |
2025-02-26 03:35:15 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-26 03:39:40 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds) |
2025-02-26 03:40:07 +0100 | <haskellbridge> | <Bowuigi> Instead of operating in lines, it operates in selections. It can do things like "select all strings matching this pattern, even if spread across multiple lines", "replace using this pattern on these selections", "invert selected" and more |
2025-02-26 03:41:37 +0100 | <haskellbridge> | <Bowuigi> So SRE is for interactive usage (that was what it was designed for, based on Bell Labs' documentation), and PEG is like CFG but more language parsing oriented |
2025-02-26 03:44:02 +0100 | pointlessslippe1 | (~pointless@62.106.85.17) (Read error: Connection reset by peer) |
2025-02-26 03:44:34 +0100 | <mauke> | not very structured if it doesn't handle nesting |
2025-02-26 03:45:06 +0100 | <mauke> | e.g. you can't easily say "select the current block of code" |
2025-02-26 03:50:31 +0100 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection) |
2025-02-26 03:50:37 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-26 03:51:17 +0100 | bilegeek | (~bilegeek@2600:1008:b06e:701b:8c92:bcff:3789:c22c) bilegeek |
2025-02-26 03:51:37 +0100 | pointlessslippe1 | (~pointless@62.106.85.17) pointlessslippe1 |
2025-02-26 03:51:50 +0100 | peterbecich | (~Thunderbi@syn-047-229-123-186.res.spectrum.com) peterbecich |
2025-02-26 03:52:14 +0100 | lol_ | jcarpenter2 |
2025-02-26 03:52:53 +0100 | L29Ah | (~L29Ah@wikipedia/L29Ah) (Ping timeout: 244 seconds) |
2025-02-26 03:57:14 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
2025-02-26 04:08:39 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-26 04:12:53 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds) |
2025-02-26 04:14:59 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-26 04:19:14 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 252 seconds) |
2025-02-26 04:24:02 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-26 04:27:59 +0100 | tromp | (~textual@2a02:a210:cba:8500:b949:287e:6bbd:873b) |
2025-02-26 04:28:36 +0100 | tromp | (~textual@2a02:a210:cba:8500:b949:287e:6bbd:873b) (Client Quit) |
2025-02-26 04:29:03 +0100 | <Square> | Template haskell has changed a bit between GHC 8.6 and 9.6. I cant wrap my head on the new signature for DataInstD |
2025-02-26 04:29:04 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 268 seconds) |
2025-02-26 04:29:17 +0100 | <Square> | Was: DataInstD Cxt Name [Type] (Maybe Kind) [Con] [DerivClause] |
2025-02-26 04:29:33 +0100 | <Square> | Now: DataInstD Cxt (Maybe [TyVarBndr ()]) Type (Maybe Kind) [Con] [DerivClause] |
2025-02-26 04:31:18 +0100 | <Square> | so for "class MyClass a b where ; data MyData a b" I declared an instance with... |
2025-02-26 04:32:09 +0100 | <Square> | DataInstD [] (mkName "MyData") [aType,bType] (Nothing) constructors [deriveClause] |
2025-02-26 04:32:48 +0100 | <Square> | I'm not sure how to migrate that to 9.6 |
2025-02-26 04:35:39 +0100 | peterbecich | (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 252 seconds) |
2025-02-26 04:36:21 +0100 | plitter | (~plitter@user/plitter) (Ping timeout: 248 seconds) |
2025-02-26 04:39:23 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-26 04:40:58 +0100 | ljdarj | (~Thunderbi@user/ljdarj) (Ping timeout: 265 seconds) |
2025-02-26 04:43:54 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 260 seconds) |
2025-02-26 04:51:45 +0100 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) bitdex |
2025-02-26 04:53:54 +0100 | PHO` | (~pho@akari.cielonegro.org) (Ping timeout: 248 seconds) |
2025-02-26 04:54:03 +0100 | PHO` | (~pho@akari.cielonegro.org) PHO` |
2025-02-26 04:54:46 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-26 04:59:12 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
2025-02-26 05:00:20 +0100 | sp1ff | (~user@c-67-160-173-55.hsd1.wa.comcast.net) (Remote host closed the connection) |
2025-02-26 05:01:43 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-26 05:03:36 +0100 | vanishingideal | (~vanishing@user/vanishingideal) (Ping timeout: 252 seconds) |
2025-02-26 05:06:01 +0100 | pointlessslippe1 | (~pointless@62.106.85.17) (Read error: Connection reset by peer) |
2025-02-26 05:06:10 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 252 seconds) |
2025-02-26 05:07:10 +0100 | kaskal | (~kaskal@2a02:8388:15bf:c200:69b8:13b6:b9c5:a489) (Ping timeout: 272 seconds) |
2025-02-26 05:09:46 +0100 | pointlessslippe1 | (~pointless@62.106.85.17) pointlessslippe1 |
2025-02-26 05:10:07 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-26 05:14:31 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds) |
2025-02-26 05:24:11 +0100 | ensyde | (~ensyde@2601:5c6:c200:6dc0::46e1) ensyde |
2025-02-26 05:25:35 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-26 05:30:01 +0100 | foul_owl | (~kerry@174-21-138-88.tukw.qwest.net) (Ping timeout: 244 seconds) |
2025-02-26 05:31:49 +0100 | Square | (~Square4@user/square) (Ping timeout: 248 seconds) |
2025-02-26 05:32:12 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
2025-02-26 05:41:45 +0100 | kyoshiblood | (~kyoshiblo@45.236.190.129) |
2025-02-26 05:42:44 +0100 | kyoshiblood | (~kyoshiblo@45.236.190.129) (Client Quit) |
2025-02-26 05:42:53 +0100 | foul_owl | (~kerry@94.156.149.97) foul_owl |
2025-02-26 05:43:38 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-26 05:47:48 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-26 05:48:21 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds) |
2025-02-26 05:48:45 +0100 | michalz | (~michalz@185.246.207.203) |
2025-02-26 05:49:42 +0100 | hgolden | (~hgolden@2603:8000:9d00:3ed1:6ff3:8389:b901:6363) (Remote host closed the connection) |
2025-02-26 05:52:01 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 248 seconds) |
2025-02-26 05:54:13 +0100 | euphores | (~SASL_euph@user/euphores) (Quit: Leaving.) |
2025-02-26 05:58:15 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-26 06:01:06 +0100 | peterbecich | (~Thunderbi@syn-047-229-123-186.res.spectrum.com) peterbecich |
2025-02-26 06:02:41 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds) |
2025-02-26 06:07:25 +0100 | robobub | (uid248673@id-248673.uxbridge.irccloud.com) robobub |
2025-02-26 06:13:40 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-26 06:15:12 +0100 | euphores | (~SASL_euph@user/euphores) euphores |
2025-02-26 06:17:41 +0100 | messewix | (~jmc@user/messewix) (Quit: Konversation terminated!) |
2025-02-26 06:18:02 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
2025-02-26 06:24:12 +0100 | kaskal | (~kaskal@84-115-238-56.cable.dynamic.surfer.at) kaskal |
2025-02-26 06:29:31 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-26 06:33:51 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-26 06:34:10 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
2025-02-26 06:37:53 +0100 | peterbecich | (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 248 seconds) |
2025-02-26 06:38:12 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 252 seconds) |
2025-02-26 06:39:48 +0100 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 264 seconds) |
2025-02-26 06:41:32 +0100 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) bitdex |
2025-02-26 06:42:05 +0100 | peterbecich | (~Thunderbi@syn-047-229-123-186.res.spectrum.com) peterbecich |
2025-02-26 06:44:52 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-26 06:45:27 +0100 | kaskal | (~kaskal@84-115-238-56.cable.dynamic.surfer.at) (Ping timeout: 244 seconds) |
2025-02-26 06:47:04 +0100 | Unicorn_Princess | (~Unicorn_P@user/Unicorn-Princess/x-3540542) Unicorn_Princess |
2025-02-26 06:49:19 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 260 seconds) |
2025-02-26 07:00:16 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-26 07:07:10 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
2025-02-26 07:16:44 +0100 | peterbecich | (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 260 seconds) |
2025-02-26 07:18:19 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-26 07:18:31 +0100 | takuan | (~takuan@d8D86B601.access.telenet.be) |
2025-02-26 07:19:35 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-26 07:20:14 +0100 | jle` | (~jle`@2603:8001:3b00:11:8847:ede:a8ef:d8cd) jle` |
2025-02-26 07:22:52 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds) |
2025-02-26 07:23:43 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 245 seconds) |
2025-02-26 07:33:39 +0100 | fp | (~Thunderbi@130.233.70.89) fp |
2025-02-26 07:33:41 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-26 07:38:13 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds) |
2025-02-26 07:40:21 +0100 | jle` | (~jle`@2603:8001:3b00:11:8847:ede:a8ef:d8cd) (Ping timeout: 248 seconds) |
2025-02-26 07:41:28 +0100 | jle` | (~jle`@2603:8001:3b00:11:240e:f2a:571:e822) jle` |
2025-02-26 07:43:16 +0100 | tabaqui1 | (~root@87.200.129.102) tabaqui |
2025-02-26 07:48:25 +0100 | jongkook90 | (~jongkook9@user/jongkook90) (Remote host closed the connection) |
2025-02-26 07:49:05 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-26 07:49:47 +0100 | ensyde | (~ensyde@2601:5c6:c200:6dc0::46e1) (Quit: WeeChat 4.5.1) |
2025-02-26 07:54:19 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 265 seconds) |
2025-02-26 07:59:15 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-26 08:03:36 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 246 seconds) |
2025-02-26 08:05:19 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-26 08:09:08 +0100 | j1n37- | (~j1n37@user/j1n37) (Ping timeout: 252 seconds) |
2025-02-26 08:09:08 +0100 | Lord_of_Life | (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 245 seconds) |
2025-02-26 08:09:33 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 245 seconds) |
2025-02-26 08:09:59 +0100 | Lord_of_Life | (~Lord@user/lord-of-life/x-2819915) Lord_of_Life |
2025-02-26 08:12:28 +0100 | j1n37 | (~j1n37@user/j1n37) j1n37 |
2025-02-26 08:14:38 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-26 08:15:16 +0100 | tromp | (~textual@2a02:a210:cba:8500:b949:287e:6bbd:873b) |
2025-02-26 08:18:07 +0100 | ash3en | (~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) ash3en |
2025-02-26 08:19:42 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 276 seconds) |
2025-02-26 08:21:42 +0100 | weary-traveler | (~user@user/user363627) (Remote host closed the connection) |
2025-02-26 08:27:25 +0100 | misterfish | (~misterfis@84.53.85.146) misterfish |
2025-02-26 08:29:06 +0100 | zungi | (~tory@user/andrewchawk) (Remote host closed the connection) |
2025-02-26 08:29:36 +0100 | zungi | (~tory@user/andrewchawk) andrewchawk |
2025-02-26 08:30:02 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-26 08:31:29 +0100 | machinedgod | (~machinedg@d108-173-18-100.abhsia.telus.net) machinedgod |
2025-02-26 08:34:41 +0100 | GdeVolpiano | (~GdeVolpia@user/GdeVolpiano) (Ping timeout: 244 seconds) |
2025-02-26 08:34:42 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds) |
2025-02-26 08:39:52 +0100 | vanishingideal | (~vanishing@user/vanishingideal) vanishingideal |
2025-02-26 08:41:33 +0100 | GdeVolpiano | (~GdeVolpia@user/GdeVolpiano) GdeVolpiano |
2025-02-26 08:45:24 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-26 08:45:50 +0100 | euleritian | (~euleritia@ip4d17fae8.dynamic.kabel-deutschland.de) (Remote host closed the connection) |
2025-02-26 08:49:49 +0100 | jle` | (~jle`@2603:8001:3b00:11:240e:f2a:571:e822) (Ping timeout: 252 seconds) |
2025-02-26 08:51:24 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-26 08:51:48 +0100 | jle` | (~jle`@2603:8001:3b00:11:8ed8:2d9f:d44c:86d1) jle` |
2025-02-26 08:52:10 +0100 | euleritian | (~euleritia@ip4d17fae8.dynamic.kabel-deutschland.de) |
2025-02-26 08:52:15 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds) |
2025-02-26 08:52:40 +0100 | jle` | (~jle`@2603:8001:3b00:11:8ed8:2d9f:d44c:86d1) (Client Quit) |
2025-02-26 08:52:51 +0100 | ft | (~ft@p3e9bc68d.dip0.t-ipconnect.de) (Quit: leaving) |
2025-02-26 08:53:03 +0100 | jle` | (~jle`@2603:8001:3b00:11:8ed8:2d9f:d44c:86d1) jle` |
2025-02-26 08:53:42 +0100 | alp | (~alp@2001:861:8ca0:4940:de90:3201:9e0e:e126) |
2025-02-26 08:55:39 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 244 seconds) |
2025-02-26 08:58:13 +0100 | jle` | (~jle`@2603:8001:3b00:11:8ed8:2d9f:d44c:86d1) (Ping timeout: 248 seconds) |
2025-02-26 08:59:51 +0100 | sord937 | (~sord937@gateway/tor-sasl/sord937) sord937 |
2025-02-26 09:00:01 +0100 | caconym | (~caconym@user/caconym) (Quit: bye) |
2025-02-26 09:01:02 +0100 | caconym | (~caconym@user/caconym) caconym |
2025-02-26 09:14:33 +0100 | ash3en | (~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) (Ping timeout: 245 seconds) |
2025-02-26 09:14:54 +0100 | ash3en | (~Thunderbi@146.70.124.222) ash3en |
2025-02-26 09:28:34 +0100 | florida | (~florida@2a02:ab88:7200:6a00:762b:62ff:fe83:1a1b) |
2025-02-26 09:30:16 +0100 | Sgeo_ | (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
2025-02-26 09:30:41 +0100 | acidjnk_new | (~acidjnk@p200300d6e7283f8044b147bcd5cee5e7.dip0.t-ipconnect.de) acidjnk |
2025-02-26 09:33:27 +0100 | ash3en | (~Thunderbi@146.70.124.222) (Ping timeout: 252 seconds) |
2025-02-26 09:34:05 +0100 | <tomsmeding> | @tell Square it seems the `Type [Name]` has moved into the `Type`: instead of `DataInstD _ n [t1,t2]` write `DataInstD _ Nothing (n `AppT` t1 `AppT` t2)` |
2025-02-26 09:34:05 +0100 | <lambdabot> | Consider it noted. |
2025-02-26 09:34:38 +0100 | <tomsmeding> | @tell Square trick: you can evaluate quotes in ghci and see what AST they produce, e.g. [d| data instance T [x] = A x | B (T x) |] |
2025-02-26 09:34:38 +0100 | <lambdabot> | Consider it noted. |
2025-02-26 09:36:44 +0100 | aforemny_ | (~aforemny@2001:9e8:6cc7:1800:f602:cc4c:87fe:731d) aforemny |
2025-02-26 09:37:08 +0100 | aforemny | (~aforemny@i59F4C45F.versanet.de) (Ping timeout: 252 seconds) |
2025-02-26 09:39:14 +0100 | CiaoSen | (~Jura@2a02:8071:64e1:7180:4e50:ddff:fe9b:8922) CiaoSen |
2025-02-26 09:42:01 +0100 | merijn | (~merijn@77.242.116.146) merijn |
2025-02-26 09:43:43 +0100 | tromp | (~textual@2a02:a210:cba:8500:b949:287e:6bbd:873b) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2025-02-26 09:43:48 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-26 09:44:01 +0100 | laxmik | (~laxmik@ip-109-40-48-158.web.vodafone.de) laxmik |
2025-02-26 09:44:35 +0100 | petrichor | (~znc-user@user/petrichor) (Quit: ZNC 1.8.2 - https://znc.in) |
2025-02-26 09:44:50 +0100 | laxmik | (~laxmik@ip-109-40-48-158.web.vodafone.de) (Client Quit) |
2025-02-26 09:45:51 +0100 | petrichor | (~znc-user@user/petrichor) petrichor |
2025-02-26 09:48:24 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 260 seconds) |
2025-02-26 09:51:24 +0100 | <dminuoso> | Hah, I had exactly the same stuff written into the input buffer, but I believed that this @tell thing surely did not survive the freenode libera crisis. :-) |
2025-02-26 09:55:14 +0100 | <tomsmeding> | lambdabot transcends worlds! |
2025-02-26 10:02:26 +0100 | LainExperiments | (~LainExper@user/LainExperiments) LainExperiments |
2025-02-26 10:06:31 +0100 | __monty__ | (~toonn@user/toonn) toonn |
2025-02-26 10:07:10 +0100 | LainExperiments5 | (~LainExper@user/LainExperiments) LainExperiments |
2025-02-26 10:07:32 +0100 | LainExperiments6 | (~LainExper@user/LainExperiments) LainExperiments |
2025-02-26 10:08:03 +0100 | LainExperiments6 | (~LainExper@user/LainExperiments) (Client Quit) |
2025-02-26 10:09:10 +0100 | LainExperiments8 | (~LainExper@user/LainExperiments) LainExperiments |
2025-02-26 10:09:36 +0100 | LainExperiments8 | (~LainExper@user/LainExperiments) (Write error: Broken pipe) |
2025-02-26 10:10:40 +0100 | LainExperiments | (~LainExper@user/LainExperiments) (Ping timeout: 240 seconds) |
2025-02-26 10:11:09 +0100 | chele | (~chele@user/chele) chele |
2025-02-26 10:17:47 +0100 | <tomsmeding> | How are the components of a GHC version called? E.g. for 9.12.1, how do I call the "9", the "12" and the "1"? |
2025-02-26 10:18:39 +0100 | <tomsmeding> | the GHC user guide ( https://downloads.haskell.org/ghc/latest/docs/users_guide/intro.html#ghc-version-numbering-policy ) seems to call the "1" the "patchlevel number", and uses the word "major release" for any abstract version x.y.z |
2025-02-26 10:19:04 +0100 | <tomsmeding> | the HLS GHC version support page ( https://haskell-language-server.readthedocs.io/en/latest/support/ghc-version-support.html ) seems to use "minor" for "1" and "major" for "9.12", but it's a little bit unclear |
2025-02-26 10:20:32 +0100 | <tomsmeding> | Stackage seems to use the same terminology as HLS ( https://github.com/commercialhaskell/stackage#frequently-asked-questions ) |
2025-02-26 10:20:42 +0100 | <tomsmeding> | (but it's not specified, just implied) |
2025-02-26 10:22:46 +0100 | GdeVolpiano | (~GdeVolpia@user/GdeVolpiano) (Quit: WeeChat 4.4.3) |
2025-02-26 10:24:20 +0100 | GdeVolpiano | (~GdeVolpia@user/GdeVolpiano) GdeVolpiano |
2025-02-26 10:25:30 +0100 | <tomsmeding> | ah, and the GHC wiki calls any N.M.1 a major release, and any N.M.{2,3,...} a minor release! https://gitlab.haskell.org/ghc/ghc/-/wikis/GHC-status#1-release-practices |
2025-02-26 10:26:19 +0100 | bionade24 | (~quassel@2a03:4000:33:45b::1) (Read error: Connection reset by peer) |
2025-02-26 10:26:40 +0100 | bionade24 | (~quassel@2a03:4000:33:45b::1) bionade24 |
2025-02-26 10:26:52 +0100 | Smiles | (uid551636@id-551636.lymington.irccloud.com) Smiles |
2025-02-26 10:29:13 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-26 10:29:23 +0100 | merijn | (~merijn@77.242.116.146) (Ping timeout: 244 seconds) |
2025-02-26 10:29:53 +0100 | rvalue | (~rvalue@user/rvalue) (Ping timeout: 248 seconds) |
2025-02-26 10:31:10 +0100 | LainExperiments5 | (~LainExper@user/LainExperiments) (Ping timeout: 240 seconds) |
2025-02-26 10:32:12 +0100 | LainExperiments | (~LainExper@user/LainExperiments) LainExperiments |
2025-02-26 10:33:18 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 244 seconds) |
2025-02-26 10:34:35 +0100 | tzh | (~tzh@c-76-115-131-146.hsd1.or.comcast.net) (Quit: zzz) |
2025-02-26 10:35:30 +0100 | rvalue | (~rvalue@user/rvalue) rvalue |
2025-02-26 10:35:34 +0100 | merijn | (~merijn@77.242.116.146) merijn |
2025-02-26 10:35:35 +0100 | <cheater> | what do you call a pair of functions in mathematics f, g, f: X -> Y and g: Y -> X such that \A x \in X \E f(x) and \A y \in Y \E g(y)? |
2025-02-26 10:36:04 +0100 | <tomsmeding> | what do you mean with "\E f(x)"? |
2025-02-26 10:36:59 +0100 | lxsameer | (~lxsameer@Serene/lxsameer) lxsameer |
2025-02-26 10:37:13 +0100 | <tomsmeding> | perhaps you meant "\A x \in X \E y (f(x) = y)"? |
2025-02-26 10:37:22 +0100 | <tomsmeding> | or something |
2025-02-26 10:39:43 +0100 | <Leary> | tomsmeding: In line with HLS: 9.12 ~ major (version (numbers)); 1 ~ minor (version (number)). At least that's the language I would use; I doubt there's an official decree. |
2025-02-26 10:40:25 +0100 | <tomsmeding> | Leary: Well, then the GHC user guide disagrees, and the GHC wiki contests the nuance. :P |
2025-02-26 10:40:32 +0100 | merijn | (~merijn@77.242.116.146) (Ping timeout: 244 seconds) |
2025-02-26 10:41:16 +0100 | <tomsmeding> | though actually the GHC wiki terminology is rather close to this |
2025-02-26 10:41:56 +0100 | <cheater> | tomsmeding: yes. that's a shorthand. |
2025-02-26 10:42:07 +0100 | <Leary> | Multiple terminologies can coexist. I also don't consider the language around /releases/ to conflict with the language for the version components. |
2025-02-26 10:42:32 +0100 | <tomsmeding> | cheater: so then that first formula says that f is total? I.e. it returns a result for every x? |
2025-02-26 10:42:37 +0100 | <cheater> | yes |
2025-02-26 10:42:40 +0100 | swamp_ | (~zmt00@user/zmt00) zmt00 |
2025-02-26 10:42:55 +0100 | <cheater> | a pair of total functions between two sets going in opposite directions |
2025-02-26 10:42:56 +0100 | <tomsmeding> | I don't see any connection between f and g here |
2025-02-26 10:43:04 +0100 | <tomsmeding> | those are just a pair of functions |
2025-02-26 10:43:10 +0100 | <tomsmeding> | functions are total by default in mathematics |
2025-02-26 10:43:31 +0100 | <tomsmeding> | it's the concept of a "partial function" that needs explicit note |
2025-02-26 10:43:38 +0100 | kaskal | (~kaskal@84-115-238-111.cable.dynamic.surfer.at) kaskal |
2025-02-26 10:43:42 +0100 | <cheater> | they are total on their domains, but their domains don't have to line up like they do in my hypothesis |
2025-02-26 10:43:42 +0100 | <tomsmeding> | (and that's usually modelled as a total function to Y + 1) |
2025-02-26 10:44:02 +0100 | <tomsmeding> | Leary: That's fair |
2025-02-26 10:44:34 +0100 | <cheater> | f and g are connected by the property i listed above: they are total on sets that contain each other's codomains |
2025-02-26 10:45:02 +0100 | <tomsmeding> | cheater: if the functions have some equation relating them, then there may be appropriate terminology, but without any equation relating them, I don't think there's a word for this |
2025-02-26 10:45:44 +0100 | <cheater> | the only property is that if you start in one set, you can infinitely go between the two sets using f and g. possibly ending at some limit element or not. |
2025-02-26 10:45:48 +0100 | zmt01 | (~zmt00@user/zmt00) (Ping timeout: 252 seconds) |
2025-02-26 10:45:51 +0100 | <tomsmeding> | if f and g are continuous and bijective, then they are homeomorphisms, for example |
2025-02-26 10:45:55 +0100 | <cheater> | i think that's interesting enough. |
2025-02-26 10:46:18 +0100 | <cheater> | no, they have no such property as stated |
2025-02-26 10:47:02 +0100 | tromp | (~textual@2a02:a210:cba:8500:b949:287e:6bbd:873b) |
2025-02-26 10:48:39 +0100 | <cheater> | if no such thing is described then i shall coin that as a speculative function pair (or tuple for a more complex graph) |
2025-02-26 10:49:13 +0100 | <tomsmeding> | you can call it a "back-and-forth" |
2025-02-26 10:51:04 +0100 | xff0x | (~xff0x@fsb6a9491c.tkyc517.ap.nuro.jp) (Ping timeout: 272 seconds) |
2025-02-26 10:51:20 +0100 | merijn | (~merijn@77.242.116.146) merijn |
2025-02-26 10:52:11 +0100 | <cheater> | that sounds like something out of control theory. |
2025-02-26 10:54:20 +0100 | <[exa]> | cheater: you can just say that compositions of f and g are total |
2025-02-26 10:54:37 +0100 | <cheater> | i don't like puzzle definitions |
2025-02-26 10:54:41 +0100 | <tomsmeding> | that's not quite the same statement, is it? |
2025-02-26 10:55:40 +0100 | <[exa]> | the totality of the composition implies exactly the domain-is-a-superset property that was requested, and I just run it in both directions |
2025-02-26 10:55:55 +0100 | <[exa]> | so I'd say it's the same |
2025-02-26 10:55:59 +0100 | <tomsmeding> | depends on what compositions you mean when you say "compositions of f and g" |
2025-02-26 10:56:17 +0100 | <tomsmeding> | if it's just "f . g", then it's weaker; if you also include "f . f", then it's stronger |
2025-02-26 10:57:10 +0100 | <[exa]> | f.f doesn't type |
2025-02-26 10:57:24 +0100 | <tomsmeding> | but if you already have the types of f and g, there's nothing more to specify! |
2025-02-26 10:57:26 +0100 | <[exa]> | ah well okay in math that could cause issues, I see |
2025-02-26 10:58:01 +0100 | <[exa]> | anyway yeah, I'd say the original definiton would need a bit more of a spirit to it to actually spawn a useful name |
2025-02-26 10:59:04 +0100 | <Leary> | I'm still not sure what the original statement is supposed to be. f and g are partial functions with opposite co/domains and the property that each is total on the other's range? |
2025-02-26 10:59:08 +0100 | <tomsmeding> | https://ncatlab.org/nlab/show/concept+with+an+attitude |
2025-02-26 11:00:22 +0100 | bilegeek | (~bilegeek@2600:1008:b06e:701b:8c92:bcff:3789:c22c) (Quit: Leaving) |
2025-02-26 11:01:12 +0100 | acidjnk_new | (~acidjnk@p200300d6e7283f8044b147bcd5cee5e7.dip0.t-ipconnect.de) (Ping timeout: 272 seconds) |
2025-02-26 11:02:38 +0100 | <[exa]> | oh that's a nice site. |
2025-02-26 11:04:00 +0100 | acidsys | (~crameleon@openSUSE/member/crameleon) (Ping timeout: 244 seconds) |
2025-02-26 11:04:44 +0100 | <cheater> | you don't know about ncatlab? |
2025-02-26 11:04:59 +0100 | <cheater> | anyways i think the idea of being able to bounce back and forth an infinite amount of times is pretty interesting |
2025-02-26 11:05:44 +0100 | <cheater> | it can easily create congruences, for example |
2025-02-26 11:05:47 +0100 | <cheater> | and a topology |
2025-02-26 11:06:11 +0100 | <cheater> | and can be continuated |
2025-02-26 11:06:18 +0100 | <cheater> | even smoothly so |
2025-02-26 11:09:10 +0100 | <tomsmeding> | I'd personally expect that as soon as that bouncing has any kind of _property_ (it converges, or you end up where you started, ...) then it _does_ have a name |
2025-02-26 11:09:54 +0100 | <ames> | just don't listen to nlab when it comes to type theory |
2025-02-26 11:10:29 +0100 | ski | (~ski@remote11.chalmers.se) (Ping timeout: 248 seconds) |
2025-02-26 11:10:40 +0100 | <ames> | it ranges from subtly incorrect and extra verbose to complete and utter bullshit |
2025-02-26 11:12:40 +0100 | acidjnk_new | (~acidjnk@p200300d6e7283f8044b147bcd5cee5e7.dip0.t-ipconnect.de) acidjnk |
2025-02-26 11:14:06 +0100 | ski | (~ski@remote11.chalmers.se) |
2025-02-26 11:14:57 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-26 11:19:46 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 268 seconds) |
2025-02-26 11:20:24 +0100 | acidsys | (~crameleon@openSUSE/member/crameleon) crameleon |
2025-02-26 11:23:28 +0100 | hattckory | (~hattckory@149.102.242.103) |
2025-02-26 11:36:54 +0100 | merijn | (~merijn@77.242.116.146) (Ping timeout: 260 seconds) |
2025-02-26 11:39:03 +0100 | <ncf> | cheater: it's just a pair of functions. all functions are total unless stated otherwise, in mathematics |
2025-02-26 11:40:09 +0100 | merijn | (~merijn@77.242.116.146) merijn |
2025-02-26 11:48:10 +0100 | xff0x | (~xff0x@2405:6580:b080:900:17f4:b7d4:84ba:3a30) |
2025-02-26 11:50:23 +0100 | acidjnk_new | (~acidjnk@p200300d6e7283f8044b147bcd5cee5e7.dip0.t-ipconnect.de) (Ping timeout: 245 seconds) |
2025-02-26 11:57:04 +0100 | <tomsmeding> | @tell Athas You may get better performance with 'ad' if you use Numeric.AD.Double _and_ enable the +ffi flag |
2025-02-26 11:57:04 +0100 | <lambdabot> | Consider it noted. |
2025-02-26 11:57:36 +0100 | <Athas> | tomsmeding: I do use Numeric.AD.Double, but what does +ffi do? |
2025-02-26 11:57:52 +0100 | <tomsmeding> | Athas: it switches to taping in C, instead of in haskell |
2025-02-26 11:58:40 +0100 | <Athas> | Well, that ought to make a difference. Now to see if I remember how to set cabal flags. |
2025-02-26 11:59:21 +0100 | <tomsmeding> | `constraints: ad +ffi` in cabal.project |
2025-02-26 11:59:40 +0100 | <tomsmeding> | I wonder why this flag is not enabled by default |
2025-02-26 12:00:02 +0100 | <Athas> | Flags are the worst part of the Hackage ecosystem. |
2025-02-26 12:00:25 +0100 | <Athas> | Well, let's see. |
2025-02-26 12:01:02 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-26 12:02:07 +0100 | LainExperiments2 | (~LainExper@user/LainExperiments) LainExperiments |
2025-02-26 12:02:56 +0100 | LainExperiments4 | (~LainExper@user/LainExperiments) LainExperiments |
2025-02-26 12:03:28 +0100 | Everything | (~Everythin@46.211.65.235) Everything |
2025-02-26 12:04:40 +0100 | LainExperiments | (~LainExper@user/LainExperiments) (Ping timeout: 240 seconds) |
2025-02-26 12:06:01 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 268 seconds) |
2025-02-26 12:08:40 +0100 | LainExperiments2 | (~LainExper@user/LainExperiments) (Ping timeout: 240 seconds) |
2025-02-26 12:12:53 +0100 | Digitteknohippie | (~user@user/digit) Digit |
2025-02-26 12:15:23 +0100 | Digit | (~user@user/digit) (Ping timeout: 245 seconds) |
2025-02-26 12:20:17 +0100 | merijn | (~merijn@77.242.116.146) (Ping timeout: 252 seconds) |
2025-02-26 12:20:18 +0100 | LainExperiments | (~LainExper@user/LainExperiments) LainExperiments |
2025-02-26 12:23:10 +0100 | LainExperiments4 | (~LainExper@user/LainExperiments) (Ping timeout: 240 seconds) |
2025-02-26 12:27:28 +0100 | xff0x | (~xff0x@2405:6580:b080:900:17f4:b7d4:84ba:3a30) (Ping timeout: 245 seconds) |
2025-02-26 12:31:01 +0100 | Everything | (~Everythin@46.211.65.235) (Ping timeout: 248 seconds) |
2025-02-26 12:33:00 +0100 | merijn | (~merijn@77.242.116.146) merijn |
2025-02-26 12:33:48 +0100 | plitter | (~plitter@user/plitter) plitter |
2025-02-26 12:41:24 +0100 | LainExperiments3 | (~LainExper@user/LainExperiments) LainExperiments |
2025-02-26 12:43:10 +0100 | merijn | (~merijn@77.242.116.146) (Ping timeout: 272 seconds) |
2025-02-26 12:44:20 +0100 | LainExperiments2 | (~LainExper@user/LainExperiments) LainExperiments |
2025-02-26 12:44:40 +0100 | LainExperiments | (~LainExper@user/LainExperiments) (Ping timeout: 240 seconds) |
2025-02-26 12:46:27 +0100 | <Athas> | tomsmeding: I don't see any difference, but perhaps I am holding it wrong. |
2025-02-26 12:46:39 +0100 | LainExperiments | (~LainExper@user/LainExperiments) LainExperiments |
2025-02-26 12:48:28 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-26 12:49:40 +0100 | LainExperiments3 | (~LainExper@user/LainExperiments) (Ping timeout: 240 seconds) |
2025-02-26 12:50:21 +0100 | <tomsmeding> | Athas: if you `nm` your executable, does it reference `tape_backPropagate`? |
2025-02-26 12:50:53 +0100 | <tomsmeding> | that distinguishes between an ad +ffi and an ad -ffi build for me |
2025-02-26 12:51:19 +0100 | <Athas> | It does not. |
2025-02-26 12:51:42 +0100 | <Athas> | I assume cabal's logic for recompiling dependencies on flag changes is sound, right? |
2025-02-26 12:51:50 +0100 | <tomsmeding> | it worked for me! |
2025-02-26 12:52:10 +0100 | LainExperiments2 | (~LainExper@user/LainExperiments) (Ping timeout: 240 seconds) |
2025-02-26 12:52:29 +0100 | <Athas> | And 'constraints: ad +ffi' in my cabal.project is enough? |
2025-02-26 12:52:30 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 244 seconds) |
2025-02-26 12:53:45 +0100 | <tomsmeding> | well, I put a newline and an indent after the `:`, but otherwise, yes, that's exactly what I did |
2025-02-26 12:53:53 +0100 | <Athas> | Oh, this is interesting. I don't see tape_backPropagate when I use Numeric.AD.Double in my kmeans implementation, but I do see it when I use it for the dummy 'hello' benchmark. |
2025-02-26 12:54:33 +0100 | <tomsmeding> | Athas: aren't you doing reverse-then-forward in kmeans? i.e. your reverse mode is not actually on Doubles, but on dual numbers? |
2025-02-26 12:54:36 +0100 | Googulator78 | (~Googulato@2a01-036d-0106-0c81-ad7c-ac56-196b-c9a2.pool6.digikabel.hu) (Quit: Client closed) |
2025-02-26 12:54:44 +0100 | merijn | (~merijn@77.242.116.146) merijn |
2025-02-26 12:54:51 +0100 | <Athas> | tomsmeding: yes, but I'm just using a single exported function from Numeric.AD.Double. |
2025-02-26 12:54:58 +0100 | Googulator78 | (~Googulato@2a01-036d-0106-0c81-ad7c-ac56-196b-c9a2.pool6.digikabel.hu) |
2025-02-26 12:54:58 +0100 | <tomsmeding> | the whole point of Numeric.AD.Double is that it optimises the `Reverse s Double` case |
2025-02-26 12:55:02 +0100 | <Athas> | But now I have an interesting result. Do you remember I had a version that "ought" to be faster, but wasn't? |
2025-02-26 12:55:13 +0100 | <tomsmeding> | something something hessian jacobian product? |
2025-02-26 12:55:14 +0100 | <Athas> | When I use that version, I do see significant speedup with +ffi. |
2025-02-26 12:55:28 +0100 | <tomsmeding> | interesting! |
2025-02-26 12:55:42 +0100 | <tomsmeding> | What function from Numeric.AD.Double aer you using in the version that doesn't get vaster? |
2025-02-26 12:55:46 +0100 | <tomsmeding> | *faster |
2025-02-26 12:55:49 +0100 | <Athas> | The commented-out code seems to perform quite OK now: https://github.com/gradbench/gradbench/blob/main/tools/haskell/src/GradBench/KMeans.hs#L78-L95 |
2025-02-26 12:55:56 +0100 | <Athas> | We'll see if the memory issue has also been solved. |
2025-02-26 12:56:26 +0100 | <tomsmeding> | oh I guess `hessian'` |
2025-02-26 12:57:10 +0100 | <tomsmeding> | the FFI code is specifically for ReverseDouble; I guess `Reverse s SparseDouble` only benefits from being specialised to Double in Haskell-land, not fro mthe FFI code |
2025-02-26 12:57:36 +0100 | <tomsmeding> | so this seems consistent, to me |
2025-02-26 12:57:49 +0100 | <Athas> | Memory usage isn't promising. |
2025-02-26 12:57:54 +0100 | <tomsmeding> | except that hessianProduct also doesn't use ReverseDouble! |
2025-02-26 12:58:06 +0100 | <Athas> | Yeah, it OOM'ed again. |
2025-02-26 12:58:16 +0100 | <Athas> | But it's certainly a lot faster. |
2025-02-26 12:58:34 +0100 | <Athas> | A little more than 2x. |
2025-02-26 12:59:57 +0100 | <Athas> | If gradbench handled the OOM a little more gracefully, then I'd prefer this solution. It looks nice. |
2025-02-26 13:05:49 +0100 | <Hecate> | yo |
2025-02-26 13:05:57 +0100 | <Hecate> | can hlint apply rules to type signatures? |
2025-02-26 13:05:58 +0100 | <Hecate> | https://www.reddit.com/r/haskellquestions/comments/1iylzer/is_it_possible_to_make_hlint_rules_for_… |
2025-02-26 13:08:20 +0100 | L29Ah | (~L29Ah@wikipedia/L29Ah) L29Ah |
2025-02-26 13:08:36 +0100 | jespada | (~jespada@2800:a4:2358:c700:f051:395a:5b5:8278) jespada |
2025-02-26 13:11:12 +0100 | zungi | (~tory@user/andrewchawk) (Remote host closed the connection) |
2025-02-26 13:11:38 +0100 | zungi | (~tory@user/andrewchawk) andrewchawk |
2025-02-26 13:13:21 +0100 | L29Ah | (~L29Ah@wikipedia/L29Ah) () |
2025-02-26 13:15:53 +0100 | ash3en | (~Thunderbi@146.70.124.222) ash3en |
2025-02-26 13:17:03 +0100 | L29Ah | (~L29Ah@wikipedia/L29Ah) L29Ah |
2025-02-26 13:17:04 +0100 | xff0x | (~xff0x@2405:6580:b080:900:3aeb:7d91:ba3:21b4) |
2025-02-26 13:26:58 +0100 | L29Ah | (~L29Ah@wikipedia/L29Ah) () |
2025-02-26 13:27:20 +0100 | L29Ah | (~L29Ah@wikipedia/L29Ah) L29Ah |
2025-02-26 13:27:44 +0100 | LainExperiments | (~LainExper@user/LainExperiments) (Quit: Client closed) |
2025-02-26 13:28:32 +0100 | LainExperiments | (~LainExper@user/LainExperiments) LainExperiments |
2025-02-26 13:30:40 +0100 | L29Ah | (~L29Ah@wikipedia/L29Ah) () |
2025-02-26 13:30:56 +0100 | L29Ah | (~L29Ah@wikipedia/L29Ah) L29Ah |
2025-02-26 13:31:42 +0100 | fp1 | (~Thunderbi@2001:708:150:10::1d80) fp |
2025-02-26 13:32:09 +0100 | fp | (~Thunderbi@130.233.70.89) (Quit: fp) |
2025-02-26 13:34:08 +0100 | mange | (~user@user/mange) (Quit: Zzz...) |
2025-02-26 13:34:12 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-26 13:36:22 +0100 | fp1 | (~Thunderbi@2001:708:150:10::1d80) (Ping timeout: 272 seconds) |
2025-02-26 13:36:42 +0100 | fp | (~Thunderbi@2001:708:20:1406::1370) fp |
2025-02-26 13:38:41 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 248 seconds) |
2025-02-26 13:42:25 +0100 | CiaoSen | (~Jura@2a02:8071:64e1:7180:4e50:ddff:fe9b:8922) (Ping timeout: 248 seconds) |
2025-02-26 13:42:44 +0100 | Digitteknohippie | Digit |
2025-02-26 13:43:50 +0100 | florida | (~florida@2a02:ab88:7200:6a00:762b:62ff:fe83:1a1b) (Remote host closed the connection) |
2025-02-26 13:44:35 +0100 | SlackCoder | (~SlackCode@64-94-63-8.ip.weststar.net.ky) SlackCoder |
2025-02-26 13:46:50 +0100 | ash3en | (~Thunderbi@146.70.124.222) (Quit: ash3en) |
2025-02-26 13:53:55 +0100 | acidjnk_new | (~acidjnk@p200300d6e7283f800515f6261b26a150.dip0.t-ipconnect.de) acidjnk |
2025-02-26 14:05:02 +0100 | dsrt^ | (~dsrt@108.192.66.114) (Ping timeout: 268 seconds) |
2025-02-26 14:05:09 +0100 | LainExperiments | (~LainExper@user/LainExperiments) (Quit: Client closed) |
2025-02-26 14:05:39 +0100 | off^ | (~off@108.192.66.114) (Ping timeout: 260 seconds) |
2025-02-26 14:06:11 +0100 | lortabac | (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) lortabac |
2025-02-26 14:08:10 +0100 | dsrt^ | (~dsrt@108.192.66.114) |
2025-02-26 14:08:30 +0100 | off^ | (~off@108.192.66.114) |
2025-02-26 14:09:50 +0100 | ash3en | (~Thunderbi@146.70.124.222) ash3en |
2025-02-26 14:10:18 +0100 | misterfish | (~misterfis@84.53.85.146) (Ping timeout: 244 seconds) |
2025-02-26 14:10:31 +0100 | ash3en | (~Thunderbi@146.70.124.222) (Client Quit) |
2025-02-26 14:17:33 +0100 | LainExperiments | (~LainExper@user/LainExperiments) LainExperiments |
2025-02-26 14:19:56 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-26 14:23:24 +0100 | florida | (~florida@2a02:ab88:7200:6a00:762b:62ff:fe83:1a1b) |
2025-02-26 14:23:44 +0100 | florida | (~florida@2a02:ab88:7200:6a00:762b:62ff:fe83:1a1b) (Remote host closed the connection) |
2025-02-26 14:24:14 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 252 seconds) |
2025-02-26 14:37:47 +0100 | acidjnk_new | (~acidjnk@p200300d6e7283f800515f6261b26a150.dip0.t-ipconnect.de) (Ping timeout: 252 seconds) |
2025-02-26 14:40:24 +0100 | zungi | (~tory@user/andrewchawk) (Ping timeout: 264 seconds) |
2025-02-26 14:42:52 +0100 | ystael | (~ystael@user/ystael) (Ping timeout: 272 seconds) |
2025-02-26 14:45:06 +0100 | zungi | (~tory@user/andrewchawk) andrewchawk |
2025-02-26 14:54:19 +0100 | weary-traveler | (~user@user/user363627) user363627 |
2025-02-26 15:02:45 +0100 | CiaoSen | (~Jura@2a02:8071:64e1:7180:4e50:ddff:fe9b:8922) CiaoSen |
2025-02-26 15:06:00 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-26 15:09:02 +0100 | LainExperiments | (~LainExper@user/LainExperiments) (Quit: Client closed) |
2025-02-26 15:10:25 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 252 seconds) |
2025-02-26 15:15:08 +0100 | LainExperiments | (~LainExper@user/LainExperiments) LainExperiments |
2025-02-26 15:16:49 +0100 | LainExperiments9 | (~LainExper@user/LainExperiments) LainExperiments |
2025-02-26 15:21:40 +0100 | LainExperiments | (~LainExper@user/LainExperiments) (Ping timeout: 240 seconds) |
2025-02-26 15:32:10 +0100 | LainExperiments9 | (~LainExper@user/LainExperiments) (Ping timeout: 240 seconds) |
2025-02-26 15:33:53 +0100 | Miroboru | (~myrvoll@178-164-114.82.3p.ntebredband.no) (Quit: Lost terminal) |
2025-02-26 15:34:05 +0100 | L29Ah | (~L29Ah@wikipedia/L29Ah) (Read error: Connection reset by peer) |
2025-02-26 15:35:55 +0100 | LainExperiments | (~LainExper@user/LainExperiments) LainExperiments |
2025-02-26 15:41:28 +0100 | pavonia | (~user@user/siracusa) (Quit: Bye!) |
2025-02-26 15:41:51 +0100 | alp | (~alp@2001:861:8ca0:4940:de90:3201:9e0e:e126) (Ping timeout: 268 seconds) |
2025-02-26 15:51:26 +0100 | ystael | (~ystael@user/ystael) ystael |
2025-02-26 15:55:04 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-26 15:55:23 +0100 | SlackCoder | (~SlackCode@64-94-63-8.ip.weststar.net.ky) (Quit: Leaving) |
2025-02-26 15:59:08 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 245 seconds) |
2025-02-26 16:19:10 +0100 | vanishingideal | (~vanishing@user/vanishingideal) (Ping timeout: 244 seconds) |
2025-02-26 16:19:46 +0100 | L29Ah | (~L29Ah@wikipedia/L29Ah) L29Ah |
2025-02-26 16:21:09 +0100 | vanishingideal | (~vanishing@user/vanishingideal) vanishingideal |
2025-02-26 16:21:10 +0100 | LainExperiments | (~LainExper@user/LainExperiments) (Ping timeout: 240 seconds) |
2025-02-26 16:21:19 +0100 | eL_Bart0 | (eL_Bart0@dietunichtguten.org) |
2025-02-26 16:25:57 +0100 | CiaoSen | (~Jura@2a02:8071:64e1:7180:4e50:ddff:fe9b:8922) (Ping timeout: 252 seconds) |
2025-02-26 16:27:53 +0100 | misterfish | (~misterfis@84.53.85.146) misterfish |
2025-02-26 16:36:37 +0100 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "") |
2025-02-26 16:38:32 +0100 | gmg | (~user@user/gehmehgeh) (Remote host closed the connection) |
2025-02-26 16:39:16 +0100 | gmg | (~user@user/gehmehgeh) gehmehgeh |
2025-02-26 16:39:25 +0100 | littlecow96 | (~littlecow@2a09:bac3:311:105::1a:d0) |
2025-02-26 16:40:27 +0100 | littlecow96 | (~littlecow@2a09:bac3:311:105::1a:d0) (Client Quit) |
2025-02-26 16:40:33 +0100 | vanishingideal | (~vanishing@user/vanishingideal) (Ping timeout: 248 seconds) |
2025-02-26 16:40:44 +0100 | littlecoww | (~littlecow@2a09:bac3:311:105::1a:d0) |
2025-02-26 16:41:04 +0100 | Digitteknohippie | (~user@user/digit) Digit |
2025-02-26 16:42:13 +0100 | Digit | (~user@user/digit) (Ping timeout: 248 seconds) |
2025-02-26 16:42:13 +0100 | vanishingideal | (~vanishing@user/vanishingideal) vanishingideal |
2025-02-26 16:43:08 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-26 16:45:40 +0100 | ephilalethes | (~noumenon@2001:d08:1a00:bc0:aa7e:eaff:fede:ff94) noumenon |
2025-02-26 16:47:49 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 260 seconds) |
2025-02-26 16:52:00 +0100 | acidjnk_new | (~acidjnk@p200300d6e7283f80c89649a85ed7ab43.dip0.t-ipconnect.de) acidjnk |
2025-02-26 16:55:58 +0100 | littlecoww | (~littlecow@2a09:bac3:311:105::1a:d0) (Quit: Client closed) |
2025-02-26 17:08:23 +0100 | chele | (~chele@user/chele) (Remote host closed the connection) |
2025-02-26 17:27:36 +0100 | <ski> | cheater : "they are total on sets that contain each other's codomains" -- no. `Y' *is* the codomain of `f', and `X' *is* the codomain of `g'. doesn't matter whether every element of those sets are "hit" by the respective functions |
2025-02-26 17:28:06 +0100 | <cheater> | huh? |
2025-02-26 17:28:44 +0100 | <ski> | if you say `f : X -> Y', then `Y' is the codomain of `f' |
2025-02-26 17:29:12 +0100 | lortabac | (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) (Quit: WeeChat 4.5.1) |
2025-02-26 17:29:38 +0100 | <ski> | so, claiming that `g : Y -> X' is total on a set that contains the codomain of `f' means that `g' is total on a set which contains `Y'. iow, `g' is just a total function, no need to complicate the phrasing |
2025-02-26 17:30:33 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-26 17:30:42 +0100 | acidjnk_new | (~acidjnk@p200300d6e7283f80c89649a85ed7ab43.dip0.t-ipconnect.de) (Ping timeout: 272 seconds) |
2025-02-26 17:31:07 +0100 | <ski> | but presumably you didn't mean it like that, and so you likely meant to say "range" or "image", instead of "codomain". the range of `f' (or the image of `f' (on `X')) is the subset of the codomain `Y', that is actually "hit" by `f', the subset of values that you can actually obtain as outputs |
2025-02-26 17:31:39 +0100 | <cheater> | ok, yeah |
2025-02-26 17:32:42 +0100 | jespada | (~jespada@2800:a4:2358:c700:f051:395a:5b5:8278) (Ping timeout: 246 seconds) |
2025-02-26 17:32:43 +0100 | <ski> | and then you meant to claim that the partial function `g : Y -> X' was total on this subset of `Y' (which can be written `Img(f)', or `f[X]', or `exists_f X') |
2025-02-26 17:33:23 +0100 | tomsmeding | would prefer a symbol other than `->' for a partial function |
2025-02-26 17:35:08 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 272 seconds) |
2025-02-26 17:35:14 +0100 | acidjnk_new | (~acidjnk@p200300d6e7283f8040a776c2da6f4573.dip0.t-ipconnect.de) acidjnk |
2025-02-26 17:35:41 +0100 | jespada | (~jespada@2800:a4:230f:300:5891:d568:1db3:6726) jespada |
2025-02-26 17:37:20 +0100 | alp | (~alp@2001:861:8ca0:4940:b08e:d43c:4f53:7730) |
2025-02-26 17:40:11 +0100 | j1n37- | (~j1n37@user/j1n37) j1n37 |
2025-02-26 17:40:48 +0100 | j1n37 | (~j1n37@user/j1n37) (Ping timeout: 245 seconds) |
2025-02-26 17:42:14 +0100 | Square | (~Square@user/square) Square |
2025-02-26 17:43:29 +0100 | Square2 | (~Square4@user/square) Square |
2025-02-26 17:43:57 +0100 | Digitteknohippie | Digit |
2025-02-26 17:48:24 +0100 | florida | (~florida@2a02:ab88:7200:6a00:762b:62ff:fe83:1a1b) |
2025-02-26 17:54:46 +0100 | fp | (~Thunderbi@2001:708:20:1406::1370) (Ping timeout: 272 seconds) |
2025-02-26 17:56:37 +0100 | euphores | (~SASL_euph@user/euphores) (Quit: Leaving.) |
2025-02-26 18:01:33 +0100 | euphores | (~SASL_euph@user/euphores) euphores |
2025-02-26 18:01:54 +0100 | merijn | (~merijn@77.242.116.146) (Ping timeout: 260 seconds) |
2025-02-26 18:05:04 +0100 | hgolden | (~hgolden@2603:8000:9d00:3ed1:6ff3:8389:b901:6363) hgolden |
2025-02-26 18:11:12 +0100 | ystael | (~ystael@user/ystael) (Ping timeout: 246 seconds) |
2025-02-26 18:16:51 +0100 | euleritian | (~euleritia@ip4d17fae8.dynamic.kabel-deutschland.de) (Ping timeout: 265 seconds) |
2025-02-26 18:17:28 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-26 18:18:12 +0100 | zungi | (~tory@user/andrewchawk) (Ping timeout: 264 seconds) |
2025-02-26 18:19:54 +0100 | zungi | (~tory@user/andrewchawk) andrewchawk |
2025-02-26 18:20:16 +0100 | califax_ | (~califax@user/califx) califx |
2025-02-26 18:20:36 +0100 | califax | (~califax@user/califx) (Ping timeout: 264 seconds) |
2025-02-26 18:21:28 +0100 | califax_ | califax |
2025-02-26 18:21:49 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 252 seconds) |
2025-02-26 18:25:49 +0100 | econo_ | (uid147250@id-147250.tinside.irccloud.com) |
2025-02-26 18:28:43 +0100 | target_i | (~target_i@user/target-i/x-6023099) target_i |
2025-02-26 18:37:31 +0100 | Katarushisu | (~Katarushi@finc-20-b2-v4wan-169598-cust1799.vm7.cable.virginm.net) (Quit: The Lounge - https://thelounge.chat) |
2025-02-26 18:38:22 +0100 | Katarushisu | (~Katarushi@finc-20-b2-v4wan-169598-cust1799.vm7.cable.virginm.net) Katarushisu |
2025-02-26 18:40:24 +0100 | florida | (~florida@2a02:ab88:7200:6a00:762b:62ff:fe83:1a1b) (Quit: Leaving) |
2025-02-26 18:40:33 +0100 | ephilalethes | (~noumenon@2001:d08:1a00:bc0:aa7e:eaff:fede:ff94) (Quit: Leaving) |
2025-02-26 18:46:12 +0100 | driib318 | (~driib@vmi931078.contaboserver.net) driib |
2025-02-26 18:47:19 +0100 | driib318 | (~driib@vmi931078.contaboserver.net) (Client Quit) |
2025-02-26 18:48:20 +0100 | zungi | (~tory@user/andrewchawk) (Remote host closed the connection) |
2025-02-26 18:48:57 +0100 | zungi | (~tory@user/andrewchawk) andrewchawk |
2025-02-26 18:52:24 +0100 | acidjnk_new | (~acidjnk@p200300d6e7283f8040a776c2da6f4573.dip0.t-ipconnect.de) (Ping timeout: 272 seconds) |
2025-02-26 18:53:00 +0100 | acidjnk_new | (~acidjnk@p200300d6e7283f80fcc6edffa39079b3.dip0.t-ipconnect.de) |
2025-02-26 18:57:46 +0100 | Square2 | (~Square4@user/square) (Ping timeout: 252 seconds) |
2025-02-26 18:59:06 +0100 | hseg | (~gesh@46.120.20.40) hseg |
2025-02-26 19:01:02 +0100 | <hseg> | I'm working on https://github.com/simonmichael/hledger/issues/2332, and the folks at #linux tell me the correct fallback to a missing terminfo entry in my case is to explicitly call ioctl. Other than https://hackage.haskell.org/package/ioctl which seems pretty much abandoned, is there another package wrapping the ioctl system call? |
2025-02-26 19:03:13 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-26 19:04:51 +0100 | tzh | (~tzh@c-76-115-131-146.hsd1.or.comcast.net) |
2025-02-26 19:06:48 +0100 | peterbecich | (~Thunderbi@syn-047-229-123-186.res.spectrum.com) peterbecich |
2025-02-26 19:07:23 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 244 seconds) |
2025-02-26 19:07:55 +0100 | <haskellbridge> | <sm> Thanks for looking at that @hseg. I don't know the answer, but it would need to be installable on windows also to avoid complicating packaging. |
2025-02-26 19:08:36 +0100 | <haskellbridge> | <sm> Are you considering something more fancy than just catching the setupTermFromEnv error ? |
2025-02-26 19:09:15 +0100 | <hseg> | Was going to just catch and work with TERM=dumb, but was worrying that was standards-incorrect |
2025-02-26 19:09:45 +0100 | <hseg> | People on #linux recommended using the TIOCGWINSZ ioctl as a fallback instead |
2025-02-26 19:10:02 +0100 | <hseg> | https://hackage.haskell.org/package/terminal-size appears to be the most recent package supporting this, and it supports windows! |
2025-02-26 19:10:14 +0100 | lxsameer | (~lxsameer@Serene/lxsameer) (Ping timeout: 252 seconds) |
2025-02-26 19:10:19 +0100 | <geekosaur> | ioctl is kind of a nightmare to work with, you really want to wrap the POSIX higher level routines — but the terminal width and height appear to not be POSIX |
2025-02-26 19:10:42 +0100 | <EvanR> | tomsmeding, right arrow but it fades out from black ink to nothing as you go right |
2025-02-26 19:12:06 +0100 | <EvanR> | right arrow with a hazard badge |
2025-02-26 19:12:08 +0100 | <dolio> | Often it's an arrow with only the top point. |
2025-02-26 19:12:22 +0100 | Everything | (~Everythin@46-133-48-141.mobile.vf-ua.net) Everything |
2025-02-26 19:12:41 +0100 | <EvanR> | ⇀ |
2025-02-26 19:12:42 +0100 | <tomsmeding> | Y 15-14> X |
2025-02-26 19:12:50 +0100 | ljdarj | (~Thunderbi@user/ljdarj) ljdarj |
2025-02-26 19:13:23 +0100 | <dolio> | ⇀ |
2025-02-26 19:13:30 +0100 | <tomsmeding> | (for best effect, view on a dark terminal) |
2025-02-26 19:13:43 +0100 | <EvanR> | a right arrow that forks, one way goes to the target type, the other way doesn't |
2025-02-26 19:14:15 +0100 | <hseg> | geekosaur: Right -- if you look at the ticket I'm working on, this is a fallback for if the terminfo entry is absent |
2025-02-26 19:14:41 +0100 | <geekosaur> | yes, I started from the ticket |
2025-02-26 19:15:08 +0100 | <mauke> | terminfo size entries are kinda useless unless you're dealing with an actual terminal, which no one does |
2025-02-26 19:15:38 +0100 | <geekosaur> | I was commenting on the recommendation to use `ioctl`; if you do that, you should FFI to it directly because a generalized ioctl binding is pretty much impossible (the third type depends on the value of the second parameter) |
2025-02-26 19:16:24 +0100 | califax | (~califax@user/califx) (Ping timeout: 264 seconds) |
2025-02-26 19:16:45 +0100 | <hseg> | right -- the code I'm considering including FFIs to it and only exposes it already partially applied in its second parameter |
2025-02-26 19:16:51 +0100 | <hseg> | https://github.com/biegunka/terminal-size/blob/master/src/System/Console/Terminal/Posix.hsc |
2025-02-26 19:17:18 +0100 | <hseg> | AFAICT, it looks sensible |
2025-02-26 19:17:59 +0100 | sord937 | (~sord937@gateway/tor-sasl/sord937) (Quit: sord937) |
2025-02-26 19:18:40 +0100 | <mauke> | yeah, needs capi if you don't want to write a C wrapper |
2025-02-26 19:19:05 +0100 | <mauke> | oh hey, that's my alignment macro! I invented that |
2025-02-26 19:19:15 +0100 | <hseg> | I see the package is used by darcs and idris, loos like a safe dependency |
2025-02-26 19:19:32 +0100 | <hseg> | what does that alignment macro do? |
2025-02-26 19:20:08 +0100 | <mauke> | computes the required alignment of a given type (by asking the C compiler) |
2025-02-26 19:20:17 +0100 | <mauke> | nowadays it's built into hsc2hs, I believe |
2025-02-26 19:20:51 +0100 | <hseg> | yeah, the #alignment macro, looking at the hsc2hs docs |
2025-02-26 19:22:32 +0100 | <mauke> | the idea is to declare a struct with a char as its first member (which throws off the alignment of the second member) and then check how much padding the C compiler inserted before the second member |
2025-02-26 19:22:32 +0100 | tv | (~tv@user/tv) (Read error: Connection reset by peer) |
2025-02-26 19:23:46 +0100 | <c_wraith> | I thought compilers were allowed to re-order members |
2025-02-26 19:23:54 +0100 | <mauke> | nope |
2025-02-26 19:24:37 +0100 | califax | (~califax@user/califx) califx |
2025-02-26 19:24:37 +0100 | <mauke> | C++ compilers are allowed to re-order segments separated by visibility markers, but that's it |
2025-02-26 19:24:43 +0100 | <c_wraith> | ah. Silly language. Make no guarantees about their relative offsets, but require them to be in order. |
2025-02-26 19:24:51 +0100 | <mauke> | (public:, private:, protected:) |
2025-02-26 19:25:33 +0100 | <dolio> | They need to be in order because you're allowed to do a rudimentary sort of subtyping on structs, I think. |
2025-02-26 19:25:44 +0100 | <mauke> | yes, the "common prefix" hack |
2025-02-26 19:26:22 +0100 | peterbecich | (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 252 seconds) |
2025-02-26 19:26:47 +0100 | <dolio> | I guess it's possible you could accomplish that while doing some reordering, but it'd be pretty complicated to pull off. |
2025-02-26 19:28:47 +0100 | acidjnk_new | (~acidjnk@p200300d6e7283f80fcc6edffa39079b3.dip0.t-ipconnect.de) (Ping timeout: 268 seconds) |
2025-02-26 19:29:01 +0100 | Unicorn_Princess | (~Unicorn_P@user/Unicorn-Princess/x-3540542) (Remote host closed the connection) |
2025-02-26 19:35:30 +0100 | Everything | (~Everythin@46-133-48-141.mobile.vf-ua.net) (Quit: leaving) |
2025-02-26 19:37:28 +0100 | Everything | (~Everythin@46-133-48-141.mobile.vf-ua.net) Everything |
2025-02-26 19:39:24 +0100 | L29Ah | (~L29Ah@wikipedia/L29Ah) (Read error: Connection reset by peer) |
2025-02-26 19:40:58 +0100 | L29Ah | (~L29Ah@wikipedia/L29Ah) L29Ah |
2025-02-26 19:41:35 +0100 | fun-safe-math | (~fun-safe-@2601:1c2:1b7f:801f:6422:3799:4fbd:4a99) (Quit: No Ping reply in 180 seconds.) |
2025-02-26 19:42:23 +0100 | zungi | (~tory@user/andrewchawk) (Remote host closed the connection) |
2025-02-26 19:42:45 +0100 | zungi | (~tory@user/andrewchawk) andrewchawk |
2025-02-26 19:42:50 +0100 | fun-safe-math | (~fun-safe-@2601:1c2:1b7f:801f:26d6:a094:aa3b:66cd) fun-safe-math |
2025-02-26 19:49:17 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-26 19:50:58 +0100 | tv | (~tv@user/tv) tv |
2025-02-26 19:53:22 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 244 seconds) |
2025-02-26 19:53:47 +0100 | lxsameer | (~lxsameer@Serene/lxsameer) lxsameer |
2025-02-26 19:54:06 +0100 | jespada | (~jespada@2800:a4:230f:300:5891:d568:1db3:6726) (Quit: My Mac has gone to sleep. ZZZzzz…) |
2025-02-26 19:54:10 +0100 | haskellbridge | (~hackager@syn-024-093-192-219.res.spectrum.com) (Read error: Connection reset by peer) |
2025-02-26 19:54:57 +0100 | jespada | (~jespada@2800:a4:230f:300:5891:d568:1db3:6726) jespada |
2025-02-26 19:56:56 +0100 | <tomsmeding> | dolio: surely you could use all possible prefixes of a struct? Then the ordering ends up fixed |
2025-02-26 19:57:28 +0100 | <dolio> | I don't know. |
2025-02-26 19:59:06 +0100 | haskellbridge | (~hackager@syn-024-093-192-219.res.spectrum.com) hackager |
2025-02-26 19:59:06 +0100 | ChanServ | +v haskellbridge |
2025-02-26 19:59:38 +0100 | <dolio> | Certainly if you don't do something else tricky, that's true. |
2025-02-26 19:59:42 +0100 | ljdarj | (~Thunderbi@user/ljdarj) (Ping timeout: 246 seconds) |
2025-02-26 20:01:07 +0100 | <dolio> | I once read about an OCaml implementation using the statically available type information to calculate flat array representations of every 'object' type, even though you can use them as arbitrary subtypes. |
2025-02-26 20:01:26 +0100 | <tomsmeding> | that would need to be a full-program transformation |
2025-02-26 20:01:33 +0100 | <dolio> | Yeah. |
2025-02-26 20:01:45 +0100 | <tomsmeding> | C compilers are conventionally very translation-unit-oriented :) |
2025-02-26 20:01:49 +0100 | <dolio> | I didn't say it was easy. :þ |
2025-02-26 20:01:53 +0100 | <tomsmeding> | though LTO exists |
2025-02-26 20:02:01 +0100 | ljdarj | (~Thunderbi@user/ljdarj) ljdarj |
2025-02-26 20:02:47 +0100 | euleritian | (~euleritia@ip4d17fae8.dynamic.kabel-deutschland.de) |
2025-02-26 20:03:03 +0100 | <tomsmeding> | if you can see all code, then you can indeed pull such tricks. But given that this is C, as soon as you pull in other (already-compiled) libraries and give them references to your structs _somehow_, or if you include some assembly code, or if you muck with pointers in the right way, I'd expect it gets very hard to change the encoding of structs |
2025-02-26 20:03:30 +0100 | <tomsmeding> | it's expected that you can compile some code to a shared library with compiler X, then link that into some other C code also compiled with X, and have the structs be compatible |
2025-02-26 20:03:53 +0100 | <tomsmeding> | so if the compiler reorders things, it'll have to do so deterministically and based only (I think?) on the struct definition itself |
2025-02-26 20:04:17 +0100 | <tomsmeding> | and perhaps that other code in the shared library can use prefixes of _your_ structs! |
2025-02-26 20:04:55 +0100 | <tomsmeding> | Maybe some of this is not possible in "standard C" and only in conventional C. |
2025-02-26 20:05:27 +0100 | <dolio> | Well, yeah, I'm not exactly sure what all you can get away with within the standard. |
2025-02-26 20:05:58 +0100 | <tomsmeding> | if things are as usual in C land, then probably very little |
2025-02-26 20:06:10 +0100 | <tomsmeding> | and simultaneously more than you'd like. :P |
2025-02-26 20:06:30 +0100 | <geekosaur> | there is also what is exposed in object files and include files, which is not all that the original compiler knows and in particular doesn't reveal reorderings very well |
2025-02-26 20:06:53 +0100 | <geekosaur> | (GHC gets around this by carrying extra information in `.hi` files) |
2025-02-26 20:07:16 +0100 | <tomsmeding> | (in fact it doesn't reveal reorderings _at all_. :P) |
2025-02-26 20:09:13 +0100 | <geekosaur> | I think it can be inferred from pointers, presuming such exist |
2025-02-26 20:09:27 +0100 | <geekosaur> | but that means the inker needs to be a lot smarter |
2025-02-26 20:10:33 +0100 | <TMA> | C standard leaves many things unspecified. A conforming implementation must make the same struct that is used in different compilation units translate in a way that makes both compilation units able to access it. |
2025-02-26 20:10:40 +0100 | <geekosaur> | in fact, there's a decent number of restrictions in Haskell (GHC or otherwise) which come from "we can't teach the linker how Haskell works" |
2025-02-26 20:13:13 +0100 | <TMA> | It also needs to make two structs that share some prefix of the fields be compatible. (So struct A { int * p; char c; int i; double d; } and struct B { int * p; char c; int i; char * s; } need to share the memory locations od p, c and i;) |
2025-02-26 20:13:54 +0100 | <tomsmeding> | by induction, that second requirement fixes the ordering completely |
2025-02-26 20:14:34 +0100 | <TMA> | C standard does not prescribe the conforming implementation ("compiler") to be interoperable with any other compiler, or even with itself with a different set of flags/options. |
2025-02-26 20:15:59 +0100 | Smiles | (uid551636@id-551636.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
2025-02-26 20:17:06 +0100 | <monochrom> | I am too lazy to check the C standard. But I want to point out that there is one x86 ABI standard and one x64 ABI standard that C compilers targetting those platforms will comply to, and the two ABI standards are very specific about structs, function call arguments, etc., so that various C compilers, nay, various languages, can interoperate when they are on the same platform. |
2025-02-26 20:17:39 +0100 | <tomsmeding> | those ABIs say something about _structs_? |
2025-02-26 20:17:59 +0100 | <TMA> | for example a struct S { char c1; int i; char c2; } s; might be organized such that offsetof(struct S, c1) == 0, offsetof(struct S, i) == 4, offsetof(struct S, c2) == 1 |
2025-02-26 20:18:19 +0100 | <TMA> | or it might be offsetof(struct S, c1) == 0, offsetof(struct S, i) == 4, offsetof(struct S, c2) == 8 |
2025-02-26 20:18:41 +0100 | <tomsmeding> | oh fair |
2025-02-26 20:19:06 +0100 | <TMA> | or even offsetof(struct S, c1) == 0, offsetof(struct S, i) == 1, offsetof(struct S, c2) == 5 |
2025-02-26 20:19:44 +0100 | <TMA> | the requirement says only "be consistent when there are multiple compilation units" |
2025-02-26 20:19:45 +0100 | Smiles | (uid551636@id-551636.lymington.irccloud.com) Smiles |
2025-02-26 20:21:41 +0100 | <TMA> | tomsmeding: some ABI prescribe layout of structs. others don't |
2025-02-26 20:23:11 +0100 | <TMA> | monochrom: if only that was so straightforward. there are multiple ABI standards for x86 and x86_64 |
2025-02-26 20:23:40 +0100 | <monochrom> | yikes oh well heh |
2025-02-26 20:23:49 +0100 | <monochrom> | I guess there is an xkcd for that. |
2025-02-26 20:24:05 +0100 | <TMA> | on linux they use a derivative of the Itanium ABI |
2025-02-26 20:24:19 +0100 | <TMA> | on Windows Microsoft uses its own |
2025-02-26 20:24:47 +0100 | <TMA> | clang and gcc use somewhat different ABI for C++ |
2025-02-26 20:24:57 +0100 | <TMA> | and the list goes on and on and on |
2025-02-26 20:26:24 +0100 | <EvanR> | dolio, the rudimentary subtyping with structs isn't actually guaranteed to work if all you have is a C standard |
2025-02-26 20:26:35 +0100 | <EvanR> | it's a folk practice |
2025-02-26 20:26:43 +0100 | <dolio> | No, that part is in there, I'm pretty sure. |
2025-02-26 20:26:57 +0100 | <EvanR> | I was also pretty sure xD |
2025-02-26 20:27:03 +0100 | ljdarj | (~Thunderbi@user/ljdarj) (Ping timeout: 245 seconds) |
2025-02-26 20:27:15 +0100 | <dolio> | I don't really feel like finding it, though. |
2025-02-26 20:28:03 +0100 | <EvanR> | casting a pointer to an incompatible type is undefined behavior |
2025-02-26 20:28:43 +0100 | <EvanR> | it might seem intuitive that structs which differ by being a prefix of another is compatible but its not |
2025-02-26 20:29:33 +0100 | <monochrom> | Yeah I think I saw the Linux Itanium-based one. |
2025-02-26 20:33:11 +0100 | Tuplanolla | (~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) Tuplanolla |
2025-02-26 20:35:41 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-26 20:36:21 +0100 | sprotte24 | (~sprotte24@p200300d16f39ea0090c1360b4b7260ad.dip0.t-ipconnect.de) |
2025-02-26 20:37:21 +0100 | misterfish | (~misterfis@84.53.85.146) (Ping timeout: 248 seconds) |
2025-02-26 20:39:19 +0100 | misterfish | (~misterfis@84.53.85.146) misterfish |
2025-02-26 20:40:24 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 265 seconds) |
2025-02-26 20:44:46 +0100 | <dolio> | I don't know if you can do it with pointers. But you can put all the structs with the same prefix in a union, and access the members of the prefix via any of the union disjuncts. |
2025-02-26 20:45:37 +0100 | <dolio> | Normally if you access the portion of a union that wasn't used to build it, it's undefined behavior, but there's special dispensation for structs. |
2025-02-26 20:47:29 +0100 | tccq | (~user@user/tccq) (Remote host closed the connection) |
2025-02-26 20:50:28 +0100 | <EvanR> | yes unions work |
2025-02-26 20:51:46 +0100 | <EvanR> | I thought this was this "hope my struct defined the same way for the first 16 bytes" will work if pointer to it is casted, which is use in the sockets API |
2025-02-26 20:52:29 +0100 | <dolio> | Yeah, I can't find that, so I guess that doesn't work. You have to put all your structures in a union. |
2025-02-26 20:53:52 +0100 | <dolio> | Or use the variable length array at the end of a struct or something. |
2025-02-26 20:53:55 +0100 | weary-traveler | (~user@user/user363627) (Remote host closed the connection) |
2025-02-26 20:53:58 +0100 | pavonia | (~user@user/siracusa) siracusa |
2025-02-26 20:54:34 +0100 | acidjnk_new | (~acidjnk@p200300d6e7283f80fcc6edffa39079b3.dip0.t-ipconnect.de) acidjnk |
2025-02-26 20:54:48 +0100 | zungi | (~tory@user/andrewchawk) (Ping timeout: 264 seconds) |
2025-02-26 20:55:51 +0100 | peterbecich | (~Thunderbi@syn-047-229-123-186.res.spectrum.com) peterbecich |
2025-02-26 20:58:10 +0100 | chiselfuse | (~chiselfus@user/chiselfuse) (Remote host closed the connection) |
2025-02-26 20:59:30 +0100 | vanishingideal | (~vanishing@user/vanishingideal) (Remote host closed the connection) |
2025-02-26 21:00:02 +0100 | caconym | (~caconym@user/caconym) (Quit: bye) |
2025-02-26 21:00:39 +0100 | ljdarj | (~Thunderbi@user/ljdarj) ljdarj |
2025-02-26 21:00:43 +0100 | caconym | (~caconym@user/caconym) caconym |
2025-02-26 21:01:16 +0100 | misterfish | (~misterfis@84.53.85.146) (Ping timeout: 244 seconds) |
2025-02-26 21:01:50 +0100 | chiselfuse | (~chiselfus@user/chiselfuse) chiselfuse |
2025-02-26 21:04:18 +0100 | hgolden | (~hgolden@2603:8000:9d00:3ed1:6ff3:8389:b901:6363) (Remote host closed the connection) |
2025-02-26 21:05:24 +0100 | hseg | (~gesh@46.120.20.40) (Ping timeout: 272 seconds) |
2025-02-26 21:09:01 +0100 | lxsameer | (~lxsameer@Serene/lxsameer) (Ping timeout: 244 seconds) |
2025-02-26 21:10:28 +0100 | peterbecich | (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 272 seconds) |
2025-02-26 21:12:05 +0100 | hgolden | (~hgolden@2603:8000:9d00:3ed1:6ff3:8389:b901:6363) hgolden |
2025-02-26 21:12:20 +0100 | weary-traveler | (~user@user/user363627) user363627 |
2025-02-26 21:17:10 +0100 | justsomeguy | (~justsomeg@user/justsomeguy) justsomeguy |
2025-02-26 21:21:45 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-26 21:22:03 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-26 21:25:54 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 252 seconds) |
2025-02-26 21:31:34 +0100 | ash3en | (~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) ash3en |
2025-02-26 21:33:00 +0100 | ft | (~ft@p3e9bc68d.dip0.t-ipconnect.de) ft |
2025-02-26 21:37:27 +0100 | misterfish | (~misterfis@84.53.85.146) misterfish |
2025-02-26 21:38:49 +0100 | Guest0 | (~Guest0@2a00:20:0:8685:7afd:8c7b:235a:df44) |
2025-02-26 21:39:20 +0100 | Guest0 | (~Guest0@2a00:20:0:8685:7afd:8c7b:235a:df44) (Client Quit) |
2025-02-26 21:40:56 +0100 | todi | (~todi@p57803331.dip0.t-ipconnect.de) todi |
2025-02-26 21:57:15 +0100 | Everything | (~Everythin@46-133-48-141.mobile.vf-ua.net) (Quit: leaving) |
2025-02-26 21:58:24 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds) |
2025-02-26 21:59:15 +0100 | misterfish | (~misterfis@84.53.85.146) (Ping timeout: 252 seconds) |
2025-02-26 22:07:49 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-26 22:09:57 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-26 22:11:52 +0100 | meooow | (~meooow@2400:6180:100:d0::ad9:e001) (Quit: q) |
2025-02-26 22:12:03 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 244 seconds) |
2025-02-26 22:12:59 +0100 | codolio | (~dolio@130.44.140.168) dolio |
2025-02-26 22:13:11 +0100 | ash3en | (~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) (Quit: ash3en) |
2025-02-26 22:14:07 +0100 | meooow | (~meooow@2400:6180:100:d0::ad9:e001) meooow |
2025-02-26 22:14:49 +0100 | dolio | (~dolio@130.44.140.168) (Read error: Connection reset by peer) |
2025-02-26 22:16:16 +0100 | remedan | (~remedan@ip-62-245-108-153.bb.vodafone.cz) (Quit: Bye!) |
2025-02-26 22:16:44 +0100 | ash3en | (~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) ash3en |
2025-02-26 22:17:08 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 268 seconds) |
2025-02-26 22:17:40 +0100 | zungi | (~tory@user/andrewchawk) andrewchawk |
2025-02-26 22:20:00 +0100 | remedan | (~remedan@ip-62-245-108-153.bb.vodafone.cz) remedan |