Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→
Page 1 .. 725 726 727 728 729 730 731 732 733 734 735 .. 5022
502,152 events total
2020-10-19 07:18:30 jespada joins (~jespada@90.254.245.15)
2020-10-19 07:21:04 × thir quits (~thir@p200300f27f2f0100d058ed1e9e148e98.dip0.t-ipconnect.de) (Ping timeout: 244 seconds)
2020-10-19 07:22:40 coot joins (~coot@37.30.52.68.nat.umts.dynamic.t-mobile.pl)
2020-10-19 07:23:24 × ephemera_ quits (~E@122.34.1.187) (Quit: No Ping reply in 180 seconds.)
2020-10-19 07:23:46 ephemera_ joins (~E@122.34.1.187)
2020-10-19 07:24:25 <dminuoso> gnumonik: regarding your initial question, consider this counter example. Imagine this function `general` existed, and you applied it to `putStrLn`, what would that even do?
2020-10-19 07:25:14 <dminuoso> Remember it can't apply anything to function passed to it to anything, because it's fully polymorphic in `a`
2020-10-19 07:25:28 <dminuoso> *It cant apply the function passed to it to anything
2020-10-19 07:26:56 × nbloomf quits (~nbloomf@2600:1700:ad14:3020:e14d:f5f1:4984:f268) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-19 07:27:15 <dminuoso> If it cant apply to it, how can it come up with an arbitrary monadic value? Recall, since it's also polymorphic over *any* Monad m, it can't craft concrete effect values other than through pure.
2020-10-19 07:27:19 <dminuoso> (Or `return` rather)
2020-10-19 07:27:43 <dminuoso> But for pure, it'd need some value of `a -> b` for all choices of a and b, again not possible
2020-10-19 07:28:01 rtb joins (~quassel@ip5f5bce51.dynamic.kabel-deutschland.de)
2020-10-19 07:28:02 <dminuoso> The most defined implementation possible would be `general _ = pure undefined`
2020-10-19 07:28:49 × berberman quits (~berberman@unaffiliated/berberman) (Ping timeout: 244 seconds)
2020-10-19 07:29:09 berberman joins (~berberman@unaffiliated/berberman)
2020-10-19 07:31:02 × mac10688 quits (~mac10688@c-76-115-116-76.hsd1.or.comcast.net) (Ping timeout: 265 seconds)
2020-10-19 07:31:35 × jchia quits (~jchia@58.32.66.236) (Ping timeout: 258 seconds)
2020-10-19 07:31:47 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2020-10-19 07:32:27 <merijn> dminuoso: pffft
2020-10-19 07:32:34 <merijn> dminuoso: "pure unsafeCoerce" :p
2020-10-19 07:35:43 <dminuoso> Well.
2020-10-19 07:35:51 ping is now known as niko
2020-10-19 07:35:56 <dminuoso> At that point, why not straight unsafeCoerce?
2020-10-19 07:37:29 × cole-h quits (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Quit: Goodbye)
2020-10-19 07:37:55 × rtb quits (~quassel@ip5f5bce51.dynamic.kabel-deutschland.de) (Remote host closed the connection)
2020-10-19 07:38:52 jchia joins (~jchia@58.32.66.236)
2020-10-19 07:39:28 × ensyde_ quits (~ensyde@2600:1702:2e30:1a40:ec42:dd4:da87:efd) (Quit: WeeChat 2.9)
2020-10-19 07:39:29 cole-h joins (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net)
2020-10-19 07:39:42 lep-delete is now known as Guest88073
2020-10-19 07:41:11 alp joins (~alp@2a01:e0a:58b:4920:8c2d:a3c8:958f:8d3d)
2020-10-19 07:41:45 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-19 07:42:33 AceNovo joins (~chris@184.101.162.142)
2020-10-19 07:43:23 × Unhammer quits (~Unhammer@gateway/tor-sasl/unhammer) (Ping timeout: 240 seconds)
2020-10-19 07:43:31 <Ariakenom> koz_, why that one. and not ex https://github.com/nh2/static-haskell-nix
2020-10-19 07:44:09 <koz_> Ariakenom: Because I have zero idea how that thing works or how to use it. I wanna get things from first principles ideally, and that's just too magical and has too much going on as far as I can tell.
2020-10-19 07:44:10 × cole-h quits (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Ping timeout: 256 seconds)
2020-10-19 07:44:12 <dminuoso> Ariakenom: the overlay is quite broken and unstable for starters
2020-10-19 07:44:37 <koz_> However, your advice helped - I'm closer than I was!
2020-10-19 07:44:41 <dminuoso> Every few commits on nixpkgs master the overlay breaks
2020-10-19 07:45:01 <dminuoso> I'd rather use plain nix + dockerTools if I wanted a portable deployment
2020-10-19 07:45:02 <Ariakenom> ouch
2020-10-19 07:45:07 <dminuoso> From experience that works much more reliable
2020-10-19 07:45:13 × jchia quits (~jchia@58.32.66.236) (Ping timeout: 264 seconds)
2020-10-19 07:45:45 <Ariakenom> koz_, in the default.nix in that repo, the option with those library flags is configureFlags
2020-10-19 07:46:12 <dminuoso> koz_: I can give you a quick guide how to use that overlay
2020-10-19 07:46:26 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds)
2020-10-19 07:46:30 <dminuoso> (You really want that, as there's many subtleties when building static things in nix)
2020-10-19 07:46:46 jchia joins (~jchia@45.32.62.73)
2020-10-19 07:46:47 <koz_> dminuoso: You mean static-haskell-nix?
2020-10-19 07:46:51 <dminuoso> yes
2020-10-19 07:47:09 <koz_> dminuoso: That would be good.
2020-10-19 07:48:10 × jchia quits (~jchia@45.32.62.73) (Remote host closed the connection)
2020-10-19 07:48:25 <dminuoso> koz_: https://gist.github.com/dminuoso/15222b2cb2a8b791525f902fe5beee4e
2020-10-19 07:48:37 Guest88073 is now known as lep-delete
2020-10-19 07:48:38 jchia joins (~jchia@45.32.62.73)
2020-10-19 07:48:46 <dminuoso> (This is in the middle of my emacs buffer, so there might be some very basic but obvious issues)
2020-10-19 07:49:17 <dminuoso> The json file contains just `{"url": "git://github.com/nh2/static-haskell-nix","ref": "master","rev": "dbce18f4808d27f6a51ce31585078b49c86bd2b5"}`
2020-10-19 07:49:26 <dminuoso> So you can equivalently use fetchTarball or fetchGitHub
2020-10-19 07:49:38 <dminuoso> There's really not much to it.
2020-10-19 07:50:35 <koz_> OK. I'm very new to Nix, so I'm not too sure what's going on here. Specifically, what of this is general across any use of this overlay, as opposed to your specific thing you're working on?
2020-10-19 07:50:46 <koz_> Like, what's a hello-world default.nix for it?
2020-10-19 07:51:24 × GyroW quits (~GyroW@unaffiliated/gyrow) (Ping timeout: 260 seconds)
2020-10-19 07:51:30 <dminuoso> koz_: It sets up GHC and libraries up appropriately to support static linking
2020-10-19 07:51:32 GyroW_ joins (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be)
2020-10-19 07:51:32 × GyroW_ quits (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host)
2020-10-19 07:51:32 GyroW_ joins (~GyroW@unaffiliated/gyrow)
2020-10-19 07:51:35 × irc_user quits (uid423822@gateway/web/irccloud.com/x-wddvdkxotqakcvrc) (Quit: Connection closed for inactivity)
2020-10-19 07:51:42 <dminuoso> At its core, it boils down to two ideas being married here:
2020-10-19 07:52:02 <dminuoso> First:
2020-10-19 07:52:09 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-19 07:52:27 <dminuoso> To build a haskell package, I use callCabal2nix to dynamically generate a derivation that is always up-to-date. This is better than calling cabal2nix manually
2020-10-19 07:52:38 thir joins (~thir@p200300f27f2f0100d058ed1e9e148e98.dip0.t-ipconnect.de)
2020-10-19 07:52:54 <koz_> OK, that makes sense.
2020-10-19 07:52:55 <dminuoso> Then, the derivation gets mixed into haskellPackages using an overlay
2020-10-19 07:53:17 × christo quits (~chris@81.96.113.213) (Remote host closed the connection)
2020-10-19 07:53:20 <dminuoso> At first that might seem silly, but it ties better into several tools, and it makes it easier if you have other packages that depend on it
2020-10-19 07:53:33 × plutoniix quits (~q@ppp-27-55-70-11.revip3.asianet.co.th) (Read error: Connection reset by peer)
2020-10-19 07:53:34 × jchia quits (~jchia@45.32.62.73) (Ping timeout: 260 seconds)
2020-10-19 07:53:41 <dminuoso> So you pretend that your derivation sits inside the regular nixpkgs haskellPackages attribute set
2020-10-19 07:54:24 <dminuoso> Im doing that overlay a bit more elaborate, since I want this to work with any compiler. If you're fine with just the canonical GHC compiler, the overlay is much simpler there.
2020-10-19 07:54:33 mac10688 joins (~mac10688@c-76-115-116-76.hsd1.or.comcast.net)
2020-10-19 07:54:34 borne joins (~fritjof@200116b864f0110043d332954cf9072f.dip.versatel-1u1.de)
2020-10-19 07:54:45 <dminuoso> https://gist.github.com/dminuoso/15222b2cb2a8b791525f902fe5beee4e#file-default-nix-L11
2020-10-19 07:55:05 <dminuoso> This is where I build up the nixpkgs with my own overlay that mixes freyja in
2020-10-19 07:55:20 <dminuoso> Specifically, I overlay staticPkgs
2020-10-19 07:55:27 <koz_> OK, so let me see if I understand this correctly.
2020-10-19 07:55:44 <koz_> Lines 1-9 I need to get the overlay no matter what I'm building.
2020-10-19 07:56:25 <koz_> Lines 12-26 is a list of a) things I wanna build and b) dependencies.
2020-10-19 07:56:39 <dminuoso> not dependencies
2020-10-19 07:56:42 <dminuoso> I just do overrides there
2020-10-19 07:56:43 × thir quits (~thir@p200300f27f2f0100d058ed1e9e148e98.dip0.t-ipconnect.de) (Ping timeout: 244 seconds)
2020-10-19 07:56:54 <dminuoso> Because some dependencies are sometimes not buildable out the box for some reasons
2020-10-19 07:56:57 <koz_> Oh, I see.
2020-10-19 07:57:04 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 260 seconds)
2020-10-19 07:57:07 <koz_> You have dontChecks and things.
2020-10-19 07:57:09 <dminuoso> right
2020-10-19 07:57:17 <dminuoso> *and* that's where I mix in my own derivation
2020-10-19 07:57:21 <koz_> And callCabal2Nix.
2020-10-19 07:57:24 Unhammer joins (~Unhammer@gateway/tor-sasl/unhammer)

All times are in UTC.