Logs: freenode/#haskell
| 2021-03-18 07:12:53 | × | sjtfre quits (~sjtfre@124.239.70.146) (Ping timeout: 260 seconds) |
| 2021-03-18 07:13:51 | <slack1256> | There is a `DayOfWeek` on the time-1.9.3 version which is not present on the 1.8.0.2 one. That gets re-exported on `Data.Time` and clashes with a constructor on hquantlib-time. When that last library was written, time was like the 1.8 version and didn't export that module. |
| 2021-03-18 07:14:11 | → | _ht joins (~quassel@82-169-194-8.biz.kpn.net) |
| 2021-03-18 07:14:21 | → | fendor joins (~fendor@178.115.131.140.wireless.dyn.drei.com) |
| 2021-03-18 07:14:23 | <slack1256> | The problem only manifest in nixos because it tries to allow newer versions of libraries when you are inside a `nix-shell`. |
| 2021-03-18 07:14:38 | <CodeKiwi> | more people need to min max imports :( |
| 2021-03-18 07:14:41 | <slack1256> | Basically, it has nothing to do with ghc per se, but the version inside the nix-shell. |
| 2021-03-18 07:15:15 | <slack1256> | CodeKiwi: wouldn't have helped, the version of `time` you get in your nix-shell depends on your version of nixpkgs. |
| 2021-03-18 07:15:28 | × | famubu quits (~famubu@117.206.45.254) (Ping timeout: 245 seconds) |
| 2021-03-18 07:16:27 | <slack1256> | If you run it outside a nix-shell via a `cabal v2-build` it will build with the right constrains. |
| 2021-03-18 07:16:41 | <jackdk> | `newtype Foo p f a b = Foo p a (f b); instance (Functor f, Profunctor p) => Profunctor (Foo p f)` <- what is this actually called? |
| 2021-03-18 07:16:59 | <slack1256> | Anyways, those packages are old. Maybe you could drop the upper-bounds, and make them use the current time API? |
| 2021-03-18 07:16:59 | → | michalz joins (~user@185.246.204.59) |
| 2021-03-18 07:17:16 | <slack1256> | Foo ? |
| 2021-03-18 07:18:22 | <jackdk> | slack1256: sure, but is there a common name for it in the libraries? Looks like `Biff p Identity f` but wondering if there's something better? |
| 2021-03-18 07:21:07 | <CodeKiwi> | slack1256: but outside of a nix shell i don't have zlib :( |
| 2021-03-18 07:21:32 | <CodeKiwi> | [nix-shell:~/projects/github.com/paulrzcz/hquantlib/hquantlib-time-0.0.4.1]$ ghc-pkg field time version |
| 2021-03-18 07:21:32 | <CodeKiwi> | version: 1.8.0.2 |
| 2021-03-18 07:21:38 | <CodeKiwi> | hahahaha :D |
| 2021-03-18 07:21:55 | → | Major_Biscuit joins (~Major_Bis@82-169-100-198.biz.kpn.net) |
| 2021-03-18 07:22:11 | <slack1256> | There it ought to work! |
| 2021-03-18 07:22:16 | <CodeKiwi> | previously: kiwi@mvp-nixos hquantlib-time-0.0.4.1 [master]$ nix-shell -p "haskellPackages.ghcWithPackages (pkgs: with pkgs; [])" -I nixpkgs=channel:nixos-20.03 |
| 2021-03-18 07:23:03 | <slack1256> | You can also omit the `time` requeriment on the shell.nix file, and let cabal download and build the correct version. |
| 2021-03-18 07:23:09 | <CodeKiwi> | anyway but what do i do if i want to use these libraries in my projects :( |
| 2021-03-18 07:23:52 | <slack1256> | Fixing those libraries is mechanical, is only hiding or making the import lists explicit. |
| 2021-03-18 07:24:25 | <slack1256> | An alternative is to only specify special libraries in the shell.nix file and let cabal inside the shell fill the holes. |
| 2021-03-18 07:25:28 | <CodeKiwi> | i do a little of both https://gist.github.com/Kiwi/ffc08bffb15798dc4b1ec2a1c47c6191#file-program-cabal-hs |
| 2021-03-18 07:26:00 | × | molehillish quits (~molehilli@2600:8800:8d06:1800:e0d0:506b:db48:8ec8) (Remote host closed the connection) |
| 2021-03-18 07:26:05 | <slack1256> | (I got the same problem with a LTS 16.19 requeriment ;_; ) |
| 2021-03-18 07:26:28 | <slack1256> | Yoo another turtle user :-) |
| 2021-03-18 07:26:34 | → | molehillish joins (~molehilli@2600:8800:8d06:1800:e0d0:506b:db48:8ec8) |
| 2021-03-18 07:26:57 | <slack1256> | yeah, but I have always found the nix-shell shebangs to be slow |
| 2021-03-18 07:27:39 | <CodeKiwi> | (that gist is kind of a "because i can" experiment that i don't usually use lol) |
| 2021-03-18 07:28:17 | <slack1256> | Anyways, I will go to sleep. |
| 2021-03-18 07:28:20 | <slack1256> | Good luck. |
| 2021-03-18 07:28:25 | × | slack1256 quits (~slack1256@dvc-186-186-101-190.movil.vtr.net) (Remote host closed the connection) |
| 2021-03-18 07:28:58 | <CodeKiwi> | what i really use is this https://dpaste.com/5RBZC5ALQ |
| 2021-03-18 07:29:21 | → | sjtfre joins (~sjtfre@124.239.70.146) |
| 2021-03-18 07:29:51 | → | chele joins (~chele@ip5b40237d.dynamic.kabel-deutschland.de) |
| 2021-03-18 07:31:14 | × | molehillish quits (~molehilli@2600:8800:8d06:1800:e0d0:506b:db48:8ec8) (Ping timeout: 264 seconds) |
| 2021-03-18 07:31:45 | <CodeKiwi> | clearly the next feature is to select the ghc compiler and nixpkgs version |
| 2021-03-18 07:32:40 | × | sord937 quits (~sord937@gateway/tor-sasl/sord937) (Remote host closed the connection) |
| 2021-03-18 07:33:00 | → | sord937 joins (~sord937@gateway/tor-sasl/sord937) |
| 2021-03-18 07:35:10 | → | Mrbuck joins (~Mrbuck@gateway/tor-sasl/mrbuck) |
| 2021-03-18 07:36:34 | × | Major_Biscuit quits (~Major_Bis@82-169-100-198.biz.kpn.net) (Ping timeout: 265 seconds) |
| 2021-03-18 07:38:42 | × | matryoshka quits (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) (Ping timeout: 265 seconds) |
| 2021-03-18 07:39:52 | → | Lord_of_Life joins (~Lord@unaffiliated/lord-of-life/x-0885362) |
| 2021-03-18 07:40:35 | → | rdivyanshu joins (uid322626@gateway/web/irccloud.com/x-aqtspivhgbbjplug) |
| 2021-03-18 07:44:41 | → | idhugo joins (~idhugo@87-49-147-45-mobile.dk.customer.tdc.net) |
| 2021-03-18 07:45:42 | × | knupfer quits (~Thunderbi@200116b82c062100c4a7805106b9f6d2.dip.versatel-1u1.de) (Ping timeout: 244 seconds) |
| 2021-03-18 07:47:45 | × | sjtfre quits (~sjtfre@124.239.70.146) (Read error: Connection reset by peer) |
| 2021-03-18 07:47:55 | → | pjb joins (~t@2a01cb04063ec50019789bb8481aa192.ipv6.abo.wanadoo.fr) |
| 2021-03-18 07:48:05 | → | sjtfre joins (~sjtfre@124.239.70.146) |
| 2021-03-18 07:48:43 | → | danvet joins (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa) |
| 2021-03-18 07:49:21 | × | idhugo quits (~idhugo@87-49-147-45-mobile.dk.customer.tdc.net) (Ping timeout: 256 seconds) |
| 2021-03-18 07:50:04 | × | howdoi quits (uid224@gateway/web/irccloud.com/x-hubpohkbjuuxxmge) (Quit: Connection closed for inactivity) |
| 2021-03-18 07:50:28 | × | cole-h quits (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Ping timeout: 245 seconds) |
| 2021-03-18 07:51:13 | → | Major_Biscuit joins (~Major_Bis@82-169-100-198.biz.kpn.net) |
| 2021-03-18 07:55:12 | → | dhruvasagar joins (~dhruvasag@49.207.63.69) |
| 2021-03-18 07:55:19 | → | z0k joins (~user@115-186-141-88.nayatel.pk) |
| 2021-03-18 07:55:47 | × | sjtfre quits (~sjtfre@124.239.70.146) (Read error: Connection reset by peer) |
| 2021-03-18 07:56:06 | → | sjtfre joins (~sjtfre@124.239.70.146) |
| 2021-03-18 07:56:13 | → | knupfer joins (~Thunderbi@200116b82c0621001d06987cde0b66e7.dip.versatel-1u1.de) |
| 2021-03-18 07:56:21 | <dhruvasagar> | I have a function `f :: (String -> Maybe String)` and I have a `a :: (Maybe String)`, if I do a <$> f, I end up with `Maybe (Maybe String)`, how can I avoid the nesting of maybe ? |
| 2021-03-18 07:57:07 | → | idhugo joins (~idhugo@87-49-147-45-mobile.dk.customer.tdc.net) |
| 2021-03-18 07:57:16 | <dminuoso> | Use =<< instead of <$> |
| 2021-03-18 07:57:24 | <dminuoso> | Or do-notation |
| 2021-03-18 07:57:41 | <dminuoso> | Or, you can also use <=< / >=> |
| 2021-03-18 07:57:45 | <dhruvasagar> | dminuoso: but how do I return a Maybe String from the do ? |
| 2021-03-18 07:57:49 | × | jonathanx quits (~jonathan@h-176-109.A357.priv.bahnhof.se) (Remote host closed the connection) |
| 2021-03-18 07:58:09 | → | Franciman joins (~francesco@host-79-53-62-46.retail.telecomitalia.it) |
| 2021-03-18 07:58:18 | <SIben> | dhruvasagar: "return x" with x a string |
| 2021-03-18 07:58:38 | <dhruvasagar> | SIben: yes that is logical :D, I am getting confused though |
| 2021-03-18 07:58:44 | → | idhugo_ joins (~idhugo@80-62-116-180-mobile.dk.customer.tdc.net) |
| 2021-03-18 07:58:56 | <dhruvasagar> | dminuoso: i'll look at `<=<` and `>=>` as well, thanks |
| 2021-03-18 07:59:53 | <SIben> | btw dhruvasagar, "<$>" should be used with your function on the left hand side :) |
| 2021-03-18 08:00:00 | <SIben> | (not that this matters here since it is not well typed anyway) |
| 2021-03-18 08:00:12 | <dminuoso> | dhruvasagar: All three options are equivalent. I tend to favor =<< when applicable. |
| 2021-03-18 08:00:19 | <dminuoso> | Though do-notation for Maybe can be handy in some cases. |
| 2021-03-18 08:00:41 | × | knupfer quits (~Thunderbi@200116b82c0621001d06987cde0b66e7.dip.versatel-1u1.de) (Ping timeout: 244 seconds) |
| 2021-03-18 08:01:18 | × | idhugo quits (~idhugo@87-49-147-45-mobile.dk.customer.tdc.net) (Ping timeout: 245 seconds) |
| 2021-03-18 08:01:34 | <dhruvasagar> | maybe my reduction isn't very practical, would you guys be willing to look at my horrible code ? |
| 2021-03-18 08:02:50 | <SIben> | Sure :) |
| 2021-03-18 08:03:25 | × | tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz) |
| 2021-03-18 08:03:28 | × | sjtfre quits (~sjtfre@124.239.70.146) (Remote host closed the connection) |
| 2021-03-18 08:03:49 | <dhruvasagar> | https://gist.github.com/dhruvasagar/fcda1bd59d96e5320e2ca936e0da39c8 |
| 2021-03-18 08:04:22 | <dhruvasagar> | SIben: dminuoso it may be bit hard to follow, or not, but the main thing I am struggling with is the manyByIndent |
| 2021-03-18 08:04:58 | → | kuribas joins (~user@ptr-25vy0i92dp498ona6ki.18120a2.ip6.access.telenet.be) |
| 2021-03-18 08:05:54 | <dhruvasagar> | I am doing this as a learning exercise, I don't want to use Parsec at this point |
| 2021-03-18 08:06:04 | → | gds joins (~user@2a01:4b00:8605:9800:4103:dbd5:9f3c:6103) |
| 2021-03-18 08:06:07 | → | pyuk joins (~vroom@217.138.252.180) |
| 2021-03-18 08:06:07 | × | puke quits (~vroom@217.138.252.180) (Read error: Connection reset by peer) |
| 2021-03-18 08:06:25 | <dhruvasagar> | A lot of code here is borrowed from the json parser build by tsoding |
| 2021-03-18 08:07:08 | × | bitmagie quits (~Thunderbi@200116b8060fe700383a25a1bbfaa0e2.dip.versatel-1u1.de) (Quit: bitmagie) |
| 2021-03-18 08:07:59 | → | coot joins (~coot@37.30.58.223.nat.umts.dynamic.t-mobile.pl) |
| 2021-03-18 08:09:09 | <dhruvasagar> | SIben: sorry if it's unreadable |
| 2021-03-18 08:09:30 | <dhruvasagar> | looks like I found a solution, perhaps you can help refactor it ? |
| 2021-03-18 08:10:53 | <SIben> | dhruvasagar: sorry, I have a meeting in 5 min and it is a bit long :) |
| 2021-03-18 08:11:05 | <dhruvasagar> | SIben: that's cool, thanks for trying |
| 2021-03-18 08:12:04 | <SIben> | Let me know what you come up with, I can try to help again when I am free :) |
All times are in UTC.