Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2021-05-16 22:27:57 olligobber joins (olligobber@gateway/vpn/privateinternetaccess/olligobber)
2021-05-16 22:28:48 × ddellacosta quits (~ddellacos@86.106.143.113) (Ping timeout: 252 seconds)
2021-05-16 22:30:37 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-05-16 22:30:51 × nicholasbulka quits (~nicholasb@2601:900:4301:da0:b0b3:4831:47cc:ab06) (Ping timeout: 250 seconds)
2021-05-16 22:31:24 × neiluj quits (~jco@unaffiliated/neiluj) (Remote host closed the connection)
2021-05-16 22:33:27 × sheepduck quits (~sheepduck@2607:fea8:2a60:b700::cafd) (Ping timeout: 250 seconds)
2021-05-16 22:35:14 <inkbottle[m]> Are Haskell libraries regular `elf` `.so` files? (I'm trying to get more aware of the building process, so I don't freak out every time something goes wrong. Next link says, when it's compiled, it's `.so` file: https://rufflewind.com/2017-02-25/using-libraries.)
2021-05-16 22:35:37 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
2021-05-16 22:35:50 <mniip> haskell libraries consist of .so objects containing executable code, and .hi files containing haskell interfaces
2021-05-16 22:36:14 <inkbottle[m]> tx
2021-05-16 22:36:29 <mniip> the latter includes anything to do with types, pragmas, unfoldings for inlinings, etc
2021-05-16 22:36:48 <mniip> stuff like how to better optimize a program using this library etc
2021-05-16 22:37:43 <mniip> you don't need that information at runtime, hence not part of the .so, but you need that information to compile something against the library using a *haskell* library barrier and not a *C* library barrier
2021-05-16 22:37:57 <inkbottle[m]> This latter part is used during the first stages of the compilation: type checking, etc?
2021-05-16 22:38:11 <inkbottle[m]> okay
2021-05-16 22:38:16 <mniip> it's used throughout
2021-05-16 22:39:25 ddellaco_ joins (~ddellacos@ool-44c73afa.dyn.optonline.net)
2021-05-16 22:39:50 <mniip> I had some slides for this somewhere
2021-05-16 22:39:51 star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com)
2021-05-16 22:40:23 <mniip> http://tcp.st/dhupy.png
2021-05-16 22:40:30 <inkbottle[m]> nice.
2021-05-16 22:40:35 <mniip> http://tcp.st/yh_mh.png
2021-05-16 22:40:44 <mniip> vastly simplified but generally the idea
2021-05-16 22:40:59 <mniip> dependent modules' hi files are loaded somewhere around parse/rename
2021-05-16 22:43:13 Tario joins (~Tario@201.192.165.173)
2021-05-16 22:43:16 cole-h joins (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net)
2021-05-16 22:44:35 <inkbottle[m]> So, usually, when you need a haskell-library to compile some haskell file of yours, you do not need the source code for the lib. The elf-amd64 binaries and `.hi` files, installed at the right location, might be sufficient?
2021-05-16 22:45:10 <mniip> yes
2021-05-16 22:45:21 × ddellaco_ quits (~ddellacos@ool-44c73afa.dyn.optonline.net) (Ping timeout: 268 seconds)
2021-05-16 22:45:27 <mniip> the story has a few more steps in it to do with packages though
2021-05-16 22:45:48 <mniip> ghc has a package database which lists for every package its modules and where to find the so's, hi's etc
2021-05-16 22:45:58 <mniip> when you import a module ghc looks into the package database
2021-05-16 22:46:15 × hmachado quits (~hmachado@185.163.110.100) (Remote host closed the connection)
2021-05-16 22:46:36 <geekosaur> the package db tells it not only where to find the .so and .hi but also how to link them and any dependencies including external/C dependencies
2021-05-16 22:46:38 × patlv quits (~patlv@unaffiliated/patlv) (Remote host closed the connection)
2021-05-16 22:46:47 <mniip> good point
2021-05-16 22:46:56 <mniip> another thing to mention is that ghc has these things called "ways"
2021-05-16 22:47:20 <mniip> which are significant alterations of what the compiled code (and possibly the RTS) looks like
2021-05-16 22:47:40 <mniip> this includes stuff like threaded-ness, profiling, dynamic linking support
2021-05-16 22:48:13 <mniip> enabling/disabling these options will produce vastly different code, hence ghc will use different suffixes for compilation products
2021-05-16 22:48:27 <mniip> e.g. .dyn_o, .dyn_hi
2021-05-16 22:49:54 <mniip> this is the foe of archlinux's haskell packages
2021-05-16 22:50:34 <mniip> because they only include things built in the "dyn" way, hence you cannot link against the libraries you install unless you also compile your program in the "dyn" way
2021-05-16 22:51:09 jamm_ joins (~jamm@unaffiliated/jamm)
2021-05-16 22:51:12 <mniip> the generally accepted understanding is that using distribution-provided packages for developing haskell programs is a Bad Idea
2021-05-16 22:51:38 <inkbottle[m]> That I gathered
2021-05-16 22:54:20 × DTZUZU quits (~DTZUZO@205.ip-149-56-132.net) (Read error: Connection reset by peer)
2021-05-16 22:54:21 × finn_elija quits (~finn_elij@gateway/tor-sasl/finnelija/x-67402716) (Ping timeout: 240 seconds)
2021-05-16 22:54:27 <inkbottle[m]> Cabal is finding the libraries installed on your system (I mean among other things).
2021-05-16 22:54:44 × xcmw quits (~textual@2603-6011-2200-f103-1090-4073-ea46-f74d.res6.spectrum.com) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2021-05-16 22:55:33 × jamm_ quits (~jamm@unaffiliated/jamm) (Ping timeout: 250 seconds)
2021-05-16 22:56:29 nbloomf joins (~nbloomf@2600:1700:ad14:3020:5d48:8adb:4f7a:141b)
2021-05-16 22:57:04 × alx741 quits (~alx741@186.178.108.187) (Ping timeout: 252 seconds)
2021-05-16 22:57:22 heatsink joins (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2021-05-16 22:57:46 × stree quits (~stree@68.36.8.116) (Ping timeout: 240 seconds)
2021-05-16 22:58:04 finn_elija joins (~finn_elij@gateway/tor-sasl/finnelija/x-67402716)
2021-05-16 22:58:57 DTZUZU joins (~DTZUZO@205.ip-149-56-132.net)
2021-05-16 22:58:59 Lucci0 joins (~Lucci0@modemcable159.116-21-96.mc.videotron.ca)
2021-05-16 22:59:20 × Deide quits (~Deide@217.155.19.23) (Quit: Seeee yaaaa)
2021-05-16 22:59:55 <geekosaur> cabal is maintaining per-project package databases to avoid version conflicts, among other things
2021-05-16 23:01:41 × heatsink quits (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds)
2021-05-16 23:02:09 xcmw joins (~textual@2603-6011-2200-f103-1090-4073-ea46-f74d.res6.spectrum.com)
2021-05-16 23:02:31 pav5088 joins (~pav5088@138.199.47.158)
2021-05-16 23:03:08 ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta)
2021-05-16 23:03:10 × zfnmxt quits (~zfnmxt@unaffiliated/zfnmxt) (Quit: Bye!)
2021-05-16 23:05:35 nicholasbulka joins (~nicholasb@2601:900:4301:da0:b0b3:4831:47cc:ab06)
2021-05-16 23:05:40 × elliott_ quits (~elliott_@pool-108-18-30-46.washdc.fios.verizon.net) (Read error: Connection reset by peer)
2021-05-16 23:05:47 × a6a45081-2b83 quits (~aditya@171.76.17.86) (Quit: Konversation terminated!)
2021-05-16 23:05:56 elliott_ joins (~elliott_@pool-108-18-30-46.washdc.fios.verizon.net)
2021-05-16 23:07:41 × ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 240 seconds)
2021-05-16 23:08:47 <inkbottle[m]> "Kpathsea is a library to do path searching". I suppose the way Cabal is finding things is unrelated to "kpathsea". I suppose the libraries, which are packaged, can be installed in different places on the system: like system wide (which we said is discouraged), in ~/.local (?), in the project directory itself. And Cabal is looking for them at these places.
2021-05-16 23:10:11 stree joins (~stree@68.36.8.116)
2021-05-16 23:10:49 × nicholasbulka quits (~nicholasb@2601:900:4301:da0:b0b3:4831:47cc:ab06) (Ping timeout: 245 seconds)
2021-05-16 23:10:59 × hgolden quits (~hgolden2@cpe-172-114-84-61.socal.res.rr.com) (Quit: Konversation terminated!)
2021-05-16 23:11:54 alx741 joins (~alx741@186.178.108.105)
2021-05-16 23:12:09 <geekosaur> ghc does that looking. cabal is about managing things so ghc sees only what it should see for a given project, to avoid it grabbing the wrong versions of things
2021-05-16 23:12:39 <inkbottle[m]> ok
2021-05-16 23:12:47 <geekosaur> because grabbing the wrong versions of things was what it did under cabal v1 which only managed global and per-user packages
2021-05-16 23:14:46 × conal quits (~conal@64.71.133.70) (Read error: Connection reset by peer)
2021-05-16 23:14:47 <geekosaur> hence what was miscalled "cabal hell" but was really ghc's fault because rather than track version dependencies it grabbed the first version of something it found, and would do things like diamond dependencies where package A was built against B 1.0, package C was built against B 1.1, then ghc would happily try to link A with C without recomciling
2021-05-16 23:14:47 <geekosaur> Bs
2021-05-16 23:17:44 conal joins (~conal@64.71.133.70)
2021-05-16 23:18:26 <inkbottle[m]> Was it that "gap" that "stack" was here to fix? (I mean I've always used stack...)
2021-05-16 23:18:58 × ixlun quits (~user@109.249.184.235) (Read error: Connection reset by peer)
2021-05-16 23:19:27 <inkbottle[m]> Trying to introduce more consistency in which version of the package was used?
2021-05-16 23:19:43 <geekosaur> stack was the first to address this problem. cabal v2 then came up with an alternative solution
2021-05-16 23:19:59 <inkbottle[m]> got it
2021-05-16 23:20:06 <geekosaur> stack's solution being to start from well defined ghc+set of packages
2021-05-16 23:20:34 <geekosaur> so everything would have  a consistent baseline to work from
2021-05-16 23:20:50 <inkbottle[m]> So maybe easier to use.
2021-05-16 23:21:11 <geekosaur> esier in some ways, but nearly impossible if you needed a combination there isn't an lts for
2021-05-16 23:21:16 × acidjnk_new quits (~acidjnk@p5487d90a.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
2021-05-16 23:21:28 ixlun joins (~user@109.249.184.235)
2021-05-16 23:21:36 <inkbottle[m]> Yes, that I understand
2021-05-16 23:21:58 × mnrmnaugh quits (~mnrmnaugh@unaffiliated/mnrmnaugh) (Read error: Connection reset by peer)
2021-05-16 23:22:00 × son0p quits (~ff@181.136.122.143) (Remote host closed the connection)
2021-05-16 23:22:36 <Uniaika> geekosaur: <3 thanks for signing the letter on Freenode's independence, with dibblego
2021-05-16 23:23:01 <geekosaur> np
2021-05-16 23:23:12 <dibblego> :)
2021-05-16 23:23:53 <Uniaika> (:

All times are in UTC.