Logs: freenode/#haskell
| 2020-11-07 17:31:00 | <hekkaidekapus> | merijn: hehe… |
| 2020-11-07 17:31:08 | <geekosaur> | % :set -fprint-explicit-foralls |
| 2020-11-07 17:31:09 | <yahb> | geekosaur: |
| 2020-11-07 17:31:15 | <fgaz> | merijn geekosaur I fixed data-files in v2-run in my first SoC iirc |
| 2020-11-07 17:31:17 | <geekosaur> | % :t (id,id) |
| 2020-11-07 17:31:17 | <yahb> | geekosaur: forall {a1} {a2}. (a1 -> a1, a2 -> a2) |
| 2020-11-07 17:31:23 | <merijn> | fgaz: \o/ |
| 2020-11-07 17:31:34 | <merijn> | fgaz: Well, now you know it wasn't for nothing! |
| 2020-11-07 17:31:58 | <fgaz> | Not too much of an hack, simply an environment variable which overrides hardcoded Paths_ stuff |
| 2020-11-07 17:31:58 | <motte> | hekkaidekapus: there already exists a decoder for decoding lists that contain duplicate elements - setIgnoringDuplicates |
| 2020-11-07 17:33:13 | <fgaz> | merijn: shouldn't distros use the Cabal interface? Otherwise it's just layering build tools for nothing |
| 2020-11-07 17:33:36 | <fgaz> | Which actually is a thing for rust and go, which don't have the Cabal vs cabal-install separation |
| 2020-11-07 17:33:48 | <hekkaidekapus> | motte: Then, what’s wrong with lifting S.fromList into your list decoder? IMO, orphans (what you’re trying to do) and overlapping instances are not worth it in this case. |
| 2020-11-07 17:34:04 | <merijn> | fgaz: How you build doesn't really matter |
| 2020-11-07 17:34:42 | <merijn> | fgaz: The point is that the end result needs to be prefix independent, and installing executables inside "your" prefix which may rely on their own prefix independence isn't obvious |
| 2020-11-07 17:34:46 | <merijn> | Actually |
| 2020-11-07 17:34:53 | <monochrom> | Distros usually use Setup.hs. Setup.hs usually uses the Cabal interface. |
| 2020-11-07 17:34:55 | <merijn> | How *does* that work for libraries |
| 2020-11-07 17:35:15 | <merijn> | fgaz: Well...maybe the problem is already solved :p |
| 2020-11-07 17:35:31 | <monochrom> | Setup.hs also has a lot of command line options that serve distro packaging needs, e.g., separate steps of building, copying. |
| 2020-11-07 17:35:50 | <dcoutts> | prefix independent libs is awkward for libs with data files |
| 2020-11-07 17:35:53 | <merijn> | I mean, cabal-install literally just calls into Setup.hs, so... |
| 2020-11-07 17:36:06 | <fgaz> | with cabal-install you always have the store as runtime dep though |
| 2020-11-07 17:36:06 | <fgaz> | it doesn't, the store is always a dependency |
| 2020-11-07 17:36:07 | <fgaz> | well, unless you are lucky and you have only statically-linked no-data-files stuff |
| 2020-11-07 17:36:09 | <merijn> | dcoutts: But does it even work right now? |
| 2020-11-07 17:36:25 | <dcoutts> | merijn: I think it works for everything except libs with data files |
| 2020-11-07 17:36:32 | <merijn> | dcoutts: ugh |
| 2020-11-07 17:36:52 | <merijn> | dcoutts: Well, on the bright side, if I solve this for run-tool-depends then fixing the library case seems trivial enough |
| 2020-11-07 17:37:08 | <merijn> | Since the problems seem identical |
| 2020-11-07 17:37:37 | <dcoutts> | one needs a convention on how to find lib data files relative to the exe that uses them |
| 2020-11-07 17:37:53 | <matthew-> | geekosaur: thanks - I didn't know about yahb |
| 2020-11-07 17:38:18 | <merijn> | Well, you need a convention on how to *install* things relative to the executable, finding follows trivially from there ;) |
| 2020-11-07 17:38:47 | <merijn> | dcoutts: Do you happen to know where in Cabal the Paths_ generation stuff (roughly) is? |
| 2020-11-07 17:39:10 | <fgaz> | Or you could also just use the same approach as data files (Paths_), and then both can be fixed together... somehow... |
| 2020-11-07 17:39:10 | <fgaz> | I think there's an issue about overhauling Paths_ generation to make it relocatable somewhere |
| 2020-11-07 17:39:22 | → | Jeanne-Kamikaze joins (~Jeanne-Ka@68.235.43.102) |
| 2020-11-07 17:39:36 | <merijn> | fgaz: It is already relocatable by setting the proper environment variables, I'm pretty sure? |
| 2020-11-07 17:39:50 | <fgaz> | merijn: it's in Cabal/Distribution/Simple/Build/PathsModule.hs |
| 2020-11-07 17:39:52 | <merijn> | Which means packagers just have to indirect via a shell script which sets those correctly |
| 2020-11-07 17:40:10 | <motte> | hekkaidekapus: `S.fromList <$> list` doesn't type check though? not sure how i would use S.fromList with the decoder |
| 2020-11-07 17:40:18 | <fgaz> | merijn: you'd have to set env variables for every dep with data files |
| 2020-11-07 17:40:23 | <merijn> | motte: "fmap S.fromList . list" works |
| 2020-11-07 17:40:49 | <fgaz> | merijn: rather, distros usually just use the Setup.hs interface to install stuff in the right places |
| 2020-11-07 17:40:57 | <motte> | merijn: oh, thanks |
| 2020-11-07 17:41:06 | <monochrom> | May I suggest Windows Registry? >:) |
| 2020-11-07 17:41:22 | → | jamm_ joins (~jamm@unaffiliated/jamm) |
| 2020-11-07 17:41:48 | <dcoutts> | merijn, fgaz: what I wanted to do (at some point in the past) was to add a flag --prefix-independent which would "do the right thing" and conflict with any othe config flags that would cause a prefix-dependence. It might require certain conventions (to handle data files etc). |
| 2020-11-07 17:41:54 | <merijn> | fgaz: If that's true (I'm not sure) That's an artifact of the current (mistaken) assumption that there's only a package's install files", rather than "those of the transitive dependencies" |
| 2020-11-07 17:42:03 | × | lawr3nce quits (~lawr3nce@gateway/tor-sasl/lawr3nce) (Ping timeout: 240 seconds) |
| 2020-11-07 17:42:30 | hackage | yesod-auth-hashdb 1.7.1.5 - Authentication plugin for Yesod. https://hackage.haskell.org/package/yesod-auth-hashdb-1.7.1.5 (paulrouse) |
| 2020-11-07 17:42:46 | <hekkaidekapus> | > S.fromList <$> pure [1, 1, 2, 3, 3] -- motte |
| 2020-11-07 17:42:48 | <lambdabot> | error: |
| 2020-11-07 17:42:48 | <lambdabot> | • Ambiguous type variable ‘f0’ arising from a use of ‘show_M442697496552... |
| 2020-11-07 17:42:48 | <lambdabot> | prevents the constraint ‘(Show |
| 2020-11-07 17:42:57 | <merijn> | dcoutts: That's seems reasonable |
| 2020-11-07 17:43:13 | <motte> | hekkaidekapus: but i still need to write an overlapping instance? |
| 2020-11-07 17:43:20 | <merijn> | dcoutts: I dread the thought of adding a flag to cabal(-install), though >.> |
| 2020-11-07 17:43:49 | <dcoutts> | Heh, It's not that bad. This would be primarily a Cabal Setup.hs flag. |
| 2020-11-07 17:43:52 | <merijn> | I don't think any mere mortal understands the weird ass indirection through Setup.hs via Cabal |
| 2020-11-07 17:43:57 | <monochrom> | I have a cunning plan! The lack of --prefix=foo means prefix independence. |
| 2020-11-07 17:44:07 | <fgaz> | merijn: "assumption that there's only a package's install files" isn't that true though? When using the Setup.hs interface of a specific package |
| 2020-11-07 17:44:18 | <monochrom> | How do you like my idea of subtracting a flag? :) |
| 2020-11-07 17:44:31 | <merijn> | monochrom: That won't work, because --prefix would install everything relative to that, which many distros don't do/want |
| 2020-11-07 17:44:44 | <dcoutts> | monochrom: it needs a bit more than that. All the other file flags have to be '$prefix/' for starters. |
| 2020-11-07 17:45:06 | <merijn> | fgaz: It's not, because if you install an executable in a prefix independent way the transitive dependencies linked in need to be able to find their stuff too |
| 2020-11-07 17:45:31 | × | Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer) |
| 2020-11-07 17:45:50 | <fgaz> | merijn: ah yes, I thought you were referring to the current prefix-dependent way |
| 2020-11-07 17:45:50 | <dcoutts> | monochrom: the benefit of an explicit flag is that it's a clear declaration of intent, so it means it's reasonable for it to impose restrictions, whereas just not specifying --prefix is a bit weak |
| 2020-11-07 17:46:12 | <fgaz> | whoosh |
| 2020-11-07 17:46:17 | <fgaz> | (I think) |
| 2020-11-07 17:46:24 | → | DataComputist joins (~lumeng@static-50-43-26-251.bvtn.or.frontiernet.net) |
| 2020-11-07 17:46:43 | <merijn> | monochrom: I like your idea of subtracting a flag IFF you field all user questions/complaints pertaining to it on all social media :) |
| 2020-11-07 17:46:48 | <merijn> | Sounds like a fair deal! |
| 2020-11-07 17:47:07 | <monochrom> | Well yeah once again backward compatibility strikes. |
| 2020-11-07 17:47:40 | <hekkaidekapus> | motte: No because of this: list :: Decoder a -> Decoder [a]; S.fromList :: Ord a => [a] -> S.Set a; What do you think is the type of `fmap S.fromList . list`? |
| 2020-11-07 17:47:50 | <merijn> | All problems with Cabal/cabal-install boil down to two categories: 1) backwards compat and 2) people hate robust future-proof design :) |
| 2020-11-07 17:48:13 | <merijn> | (see the relentless moaning about listing modules and upper bounds) |
| 2020-11-07 17:48:23 | × | Ariakenom quits (~Ariakenom@h-82-196-111-76.NA.cust.bahnhof.se) (Read error: Connection reset by peer) |
| 2020-11-07 17:48:49 | <geekosaur> | "I never make mistakes!" |
| 2020-11-07 17:48:53 | <dcoutts> | monochrom: it's not just backwards compat: asking for prefix independence really adds constraints compared to prefix-dependence. |
| 2020-11-07 17:49:03 | <dcoutts> | It's not a bad thing to be explicit about that. |
| 2020-11-07 17:51:04 | → | Ariakenom joins (~Ariakenom@h-82-196-111-76.NA.cust.bahnhof.se) |
| 2020-11-07 17:53:36 | × | DataComputist quits (~lumeng@static-50-43-26-251.bvtn.or.frontiernet.net) (Quit: Leaving...) |
| 2020-11-07 17:53:57 | <fgaz> | by the way is there any other language / build tool / package manager that can offer prefix independence and supports data files? |
| 2020-11-07 17:53:58 | <fgaz> | and that does that well |
| 2020-11-07 17:54:43 | <fgaz> | ...AppImage I guess :-P |
| 2020-11-07 17:56:39 | × | alp quits (~alp@88.126.45.36) (Ping timeout: 260 seconds) |
| 2020-11-07 17:57:09 | <geekosaur> | docker, sort of? |
| 2020-11-07 17:57:24 | <geekosaur> | more realistically speaking, it's a Hard Problem |
| 2020-11-07 17:58:56 | → | solonarv joins (~solonarv@astrasbourg-653-1-263-62.w92-161.abo.wanadoo.fr) |
| 2020-11-07 18:00:01 | × | Eric-K quits (~Eric-K@s91904426.blix.com) () |
| 2020-11-07 18:02:36 | → | borne joins (~fritjof@200116b864092f009eed9778381c1dff.dip.versatel-1u1.de) |
| 2020-11-07 18:02:54 | × | raichoo quits (~raichoo@dslb-178-009-074-104.178.009.pools.vodafone-ip.de) (Quit: Lost terminal) |
| 2020-11-07 18:07:51 | → | polyphem joins (~p0lyph3m@2a02:810d:640:776c:76d7:55f6:f85b:c889) |
| 2020-11-07 18:10:21 | × | knupfer quits (~Thunderbi@200116b82cc0b900204cae1ce61735e2.dip.versatel-1u1.de) (Remote host closed the connection) |
| 2020-11-07 18:10:30 | → | knupfer joins (~Thunderbi@200116b82cc0b9002da38997f72b7245.dip.versatel-1u1.de) |
| 2020-11-07 18:12:35 | <Cheery> | merijn: you or smb. told me about this regex library. |
| 2020-11-07 18:13:09 | <Cheery> | I didk check inside it, I find the exact same implementation as mine. |
| 2020-11-07 18:13:28 | <Cheery> | or oh.. it's a bit different |
All times are in UTC.