Logs: liberachat/#haskell
| 2021-08-14 06:31:37 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 258 seconds) |
| 2021-08-14 06:31:38 | Lord_of_Life_ | is now known as Lord_of_Life |
| 2021-08-14 06:39:43 | × | vrilles quits (~vrilles@user/aman) (Quit: vrilles) |
| 2021-08-14 06:50:16 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-08-14 07:03:59 | × | lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection) |
| 2021-08-14 07:07:15 | <tomsmeding> | hololeap: in case you hadn't already figured it out: the problem in your applyExtraArgs function is exactly what I said earlier about non-injective type families |
| 2021-08-14 07:07:31 | <tomsmeding> | Where if Foo is non-injective, ghc can't infer a from knowing what Foo a is |
| 2021-08-14 07:07:50 | <tomsmeding> | In this case, ghc can't infer r from knowing what WithExtraArgs as r is |
| 2021-08-14 07:08:40 | <tomsmeding> | Hm but it's weird |
| 2021-08-14 07:11:28 | <tomsmeding> | Yeah I bet that your fucking problem is AllowAmbiguousTypes |
| 2021-08-14 07:11:31 | <tomsmeding> | I knew it |
| 2021-08-14 07:11:36 | <tomsmeding> | I hate AllowAmbiguousTypes |
| 2021-08-14 07:11:46 | <tomsmeding> | applyExtraArgs is uncallable |
| 2021-08-14 07:12:18 | × | tripoli quits (~tripoli@69.233.98.238) (Quit: tripoli) |
| 2021-08-14 07:12:43 | <tomsmeding> | Unless you give it actual type applications |
| 2021-08-14 07:13:10 | <tomsmeding> | Type ascriptions (like you've done here) aren't enough because of the non-injective type family that doesn't actually say what r is |
| 2021-08-14 07:13:55 | <tomsmeding> | I bet if you give the call of applyExtraArgs in the last line of foo two type applications, @as' @r, then it'll compile |
| 2021-08-14 07:19:04 | <tomsmeding> | hololeap: ah, actually only @_ @r is necessary of course, because as is already pinned down by the Sing thing |
| 2021-08-14 07:20:05 | <tomsmeding> | also with the current code you can remove the proxy argument from 'foo' since its type variable, a, is already inferrable from the function-typed argument |
| 2021-08-14 07:20:19 | <tomsmeding> | ((->) _is_ injective since it's a data constructor :p ) |
| 2021-08-14 07:20:40 | → | yoctocell joins (~user@h87-96-130-155.cust.a3fiber.se) |
| 2021-08-14 07:22:46 | <Cajun> | so im trying to build monomer because i saw it on the subreddit, but despite having freetype2 on my path and all installed via my package manager, it refuses to see ft2build.h, specifically when building nanovg. also, the required version for nanovg is >= 0.8 but nanovg only goes to 0.7, what gives? |
| 2021-08-14 07:24:10 | → | pfurla_ joins (~pfurla@ool-3f8fcb0f.dyn.optonline.net) |
| 2021-08-14 07:24:17 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 248 seconds) |
| 2021-08-14 07:26:27 | <Cajun> | more specifically, it spits this out: https://paste.tomsmeding.com/zJHTNu8Z |
| 2021-08-14 07:26:40 | <Cajun> | i have freetype2 set up, the dir is on the path, so why cant it find the header? |
| 2021-08-14 07:27:20 | → | o1lo01ol1o joins (~o1lo01ol1@89.214.83.229) |
| 2021-08-14 07:27:29 | × | pfurla quits (~pfurla@ool-3f8fcb0f.dyn.optonline.net) (Ping timeout: 248 seconds) |
| 2021-08-14 07:29:08 | <tomsmeding> | Cajun: this PR on nanovg-hs bumps version to 0.8; presumably fjvallarino assumes this is merged soon :p https://github.com/cocreature/nanovg-hs/pull/14 |
| 2021-08-14 07:29:24 | <tomsmeding> | only sounds relevant if you're using windows |
| 2021-08-14 07:30:13 | <Cajun> | im on windows but WSL, so its irrelevant |
| 2021-08-14 07:30:24 | <tomsmeding> | Cajun: re include paths: presumably it's only looking in the standard include paths, e.g. /usr/include, not in /usr/include/freetype2 |
| 2021-08-14 07:30:30 | <maerwald[m]> | https://github.com/fjvallarino/monomer/issues/7 |
| 2021-08-14 07:30:50 | <maerwald[m]> | the hackage version is simply broken |
| 2021-08-14 07:30:59 | <Cajun> | tomsmeding: well i have `/usr/include/freetype2` on the path so... |
| 2021-08-14 07:31:19 | <tomsmeding> | Cajun: which path? |
| 2021-08-14 07:31:28 | <Cajun> | whatever $PATH is |
| 2021-08-14 07:31:35 | → | euouae joins (~euouae@user/euouae) |
| 2021-08-14 07:31:41 | <tomsmeding> | maerwald[m]: your build log is outdated, because there _is_ a 0.7 on hackage, just not a 0.8 :p (point still stands) |
| 2021-08-14 07:31:50 | ← | euouae parts (~euouae@user/euouae) () |
| 2021-08-14 07:31:54 | <tomsmeding> | Cajun: $PATH is completely unrelated to finding libraries, it's for finding executables |
| 2021-08-14 07:32:04 | <tomsmeding> | s/libraries/header files/ |
| 2021-08-14 07:32:05 | <maerwald[m]> | tomsmeding: how's my build log outdated? |
| 2021-08-14 07:32:11 | <tomsmeding> | though the libraries statement is also true |
| 2021-08-14 07:32:14 | <maerwald[m]> | the dependency is nanovg>=0.8 && <1.0 |
| 2021-08-14 07:32:15 | <Cajun> | ah that would make sense, im not too great with linux yet :P |
| 2021-08-14 07:32:21 | <tomsmeding> | maerwald[m]: your cabal only has nanovg 0.6 but 0.7 exists on hackage |
| 2021-08-14 07:32:36 | <tomsmeding> | (not that that helps yet) |
| 2021-08-14 07:32:41 | <Cajun> | well `nanovg>=0.8 && <1.0` would still fail yeah |
| 2021-08-14 07:33:20 | <Cajun> | its why im using --allow-older just to see if it wants to work |
| 2021-08-14 07:33:33 | <tomsmeding> | Cajun: seeing that header file would happen with one of two changes: 1. the include is changed to #include <freetype2/ft2build.h>, or 2. gcc gets -I/usr/include/freetype2 |
| 2021-08-14 07:33:40 | → | drd joins (~drd@93-39-151-19.ip76.fastwebnet.it) |
| 2021-08-14 07:34:40 | <Cajun> | could i move the `freetypes` folder and the `ft2build.h` header outside of `/usr/include/freetypes2` into `/usr/include` ? |
| 2021-08-14 07:35:03 | <Cajun> | it seems like whats in the `/include/freetypes2` folder is how all of the other headers in there are formatted |
| 2021-08-14 07:35:04 | → | Axman6 joins (~Axman6@user/axman6) |
| 2021-08-14 07:35:58 | <tomsmeding> | Cajun: yeah that's a pretty standard layout as you have it currently |
| 2021-08-14 07:36:19 | <tomsmeding> | while you _could_ copy the folder contents, I strongly recommend you don't |
| 2021-08-14 07:36:26 | <tomsmeding> | I'll have a try building it |
| 2021-08-14 07:36:26 | <Cajun> | hmm well what does `gcc gets -I/usr/include/freetype2` mean? |
| 2021-08-14 07:37:06 | <tomsmeding> | gcc needs that as an additional command-line argument |
| 2021-08-14 07:37:41 | <Cajun> | so how can i pass that through `cabal build` ? or do i just do that command alone |
| 2021-08-14 07:38:06 | <tomsmeding> | I _think_ nanovg needs to add 'cc-options: -I/usr/include/freetype2' in this 'else'-branch https://github.com/cocreature/nanovg-hs/blob/master/nanovg.cabal#L90 |
| 2021-08-14 07:38:09 | <tomsmeding> | but uncertain |
| 2021-08-14 07:39:27 | <Cajun> | so nanovg is just broke currently? |
| 2021-08-14 07:39:37 | <tomsmeding> | yeah |
| 2021-08-14 07:39:49 | <tomsmeding> | perhaps there are systems where it isn't, because I think this is a linux-specific issue |
| 2021-08-14 07:41:37 | <maerwald> | tomsmeding: extra-include-dirs |
| 2021-08-14 07:41:47 | <tomsmeding> | ah |
| 2021-08-14 07:43:06 | <Cajun> | well im glad im not going crazy :) thanks for making this make sense! |
| 2021-08-14 07:43:08 | <maerwald> | nanovg has too many issues, I get c2hs errors |
| 2021-08-14 07:44:26 | <maerwald> | also, freetype has pkgconfig files |
| 2021-08-14 07:44:38 | <maerwald> | why is it not using those |
| 2021-08-14 07:45:05 | × | sm2n quits (~sm2n@user/sm2n) (Ping timeout: 248 seconds) |
| 2021-08-14 07:45:27 | <tomsmeding> | maerwald: shouldn't it be include-dirs instead of extra-include-dirs? |
| 2021-08-14 07:45:43 | <maerwald> | extra-include-dirs you can pass on the cmdline |
| 2021-08-14 07:45:51 | <tomsmeding> | ah right |
| 2021-08-14 07:45:52 | <zyklotomic> | is there a way to type a do statement? |
| 2021-08-14 07:46:03 | <zyklotomic> | like x <- do :: [Int] |
| 2021-08-14 07:46:23 | <maerwald> | x :: [Int] <- do |
| 2021-08-14 07:46:30 | <tomsmeding> | maerwald: probably the author of nanovg isn't very familiar with linux :p |
| 2021-08-14 07:46:38 | <zyklotomic> | maerwald: thumbs up lol |
| 2021-08-14 07:47:10 | <maerwald> | tomsmeding: that would surprise me |
| 2021-08-14 07:48:11 | <tomsmeding> | seems indeed just adding ', freetype2' to that pkgconfig-depends makes it work |
| 2021-08-14 07:48:52 | <maerwald> | pkgconfig isn't well implemented in cabal, because it doesn't allow falling back to other means |
| 2021-08-14 07:49:13 | <maerwald> | often times whether you have pkg-config of a lib depends on the library version or even the distro |
| 2021-08-14 07:49:23 | <tomsmeding> | right |
| 2021-08-14 07:49:41 | <maerwald> | https://github.com/haskell/cabal/issues/6771 |
| 2021-08-14 07:49:42 | <tomsmeding> | lol monomer itself doesn't build |
| 2021-08-14 07:50:09 | <Cajun> | are you getting the version dependency issue? |
| 2021-08-14 07:50:22 | <Cajun> | or is this another issue with the library... |
| 2021-08-14 07:50:50 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3ab-85.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 2021-08-14 07:50:56 | × | timCF quits (~timCF@200-149-20-81.sta.estpak.ee) (Ping timeout: 268 seconds) |
| 2021-08-14 07:50:57 | × | timCF_ quits (~timCF@200-149-20-81.sta.estpak.ee) (Ping timeout: 248 seconds) |
| 2021-08-14 07:51:13 | <tomsmeding> | no I actually got so far as to compile monomer itself https://paste.tomsmeding.com/tLnOGV5Y |
| 2021-08-14 07:51:32 | <tomsmeding> | by relaxing the nanovg bounds to 0.7 and adding freetype2 to the pkgconfig-depends list of nanovg |
| 2021-08-14 07:51:47 | <maerwald> | use nanosvg 0.8 |
| 2021-08-14 07:52:02 | <tomsmeding> | right |
| 2021-08-14 07:52:54 | <maerwald> | https://github.com/fjvallarino/monomer/pull/8 |
| 2021-08-14 07:53:10 | <maerwald> | oops |
| 2021-08-14 07:53:14 | <maerwald> | that's a broken PR |
All times are in UTC.