Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2020-11-25 12:56:42 <dminuoso> Something like `list-tries` for example is just containers with a trie implementation behind
2020-11-25 12:57:10 <n0042> Got me looking up what a `trie` is on Wikipedia. Neat stuff. Thanks guys
2020-11-25 13:00:12 da39a3ee5e6b4b0d joins (~da39a3ee5@171.5.161.165)
2020-11-25 13:00:49 <[exa]> dminuoso: it's good that there's the concept of tries. Cf. C++ STL doesn't have tries and people end up making stuff like map<list_of_path_elems, whatever>
2020-11-25 13:01:16 <merijn> [exa]: Metric trees are even cooler!
2020-11-25 13:02:02 <dminuoso> [exa]: to be fair, the map *could* be trie backed
2020-11-25 13:02:05 <dminuoso> That's sort of what we have in haskell
2020-11-25 13:02:36 <dminuoso> (well containers uses balanced binary tries)
2020-11-25 13:02:51 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-11-25 13:02:53 texasmynsted joins (~texasmyns@212.102.45.112)
2020-11-25 13:03:00 <merijn> dminuoso: C++'s std::map is a balanced binary tree
2020-11-25 13:03:33 <merijn> dminuoso: There's no such thing as a "binary trie" (well, I suppose if you have like, lists of boolean as input? >.>)
2020-11-25 13:03:38 × gentauro quits (~gentauro@unaffiliated/gentauro) (Quit: leaving)
2020-11-25 13:03:56 × geowiesnot quits (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 240 seconds)
2020-11-25 13:04:05 <dminuoso> oh that was a typo sorry
2020-11-25 13:04:17 <merijn> Anyhoo, speaking of trees
2020-11-25 13:05:14 × texasmynsted quits (~texasmyns@212.102.45.112) (Read error: Connection reset by peer)
2020-11-25 13:05:26 texasmynsted joins (~texasmyns@212.102.45.112)
2020-11-25 13:05:50 <merijn> Suppose I have one a represenation of a tree that's efficient, but inconvenient to program against and wanna expose it as a regular ADT (which is easy to program with), anyone every do something like that? I feel like pattern synonyms should work, but not entirely sure how >.>
2020-11-25 13:07:18 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 260 seconds)
2020-11-25 13:07:55 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2020-11-25 13:08:44 Guest_10 joins (1f028586@31.2.133.134)
2020-11-25 13:09:37 <Guest_10> hi
2020-11-25 13:10:04 × Guest_10 quits (1f028586@31.2.133.134) (Remote host closed the connection)
2020-11-25 13:10:50 AlterEgo- joins (~ladew@124-198-158-163.dynamic.caiway.nl)
2020-11-25 13:11:06 <dminuoso> merijn: write the iso by hand?
2020-11-25 13:11:11 <dminuoso> two functions, done
2020-11-25 13:11:26 <dminuoso> (you'd want one for testing anyway)
2020-11-25 13:11:28 <merijn> dminuoso: I don't wanna reify the ADT
2020-11-25 13:12:05 <ski> (you want some kind of slices ?)
2020-11-25 13:12:10 <merijn> I just wanna program against the ADT representation like I've directly snorted a Ryan Newton talk :p
2020-11-25 13:12:44 knupfer joins (~Thunderbi@200116b82ca96500a0407cfffebb5266.dip.versatel-1u1.de)
2020-11-25 13:13:23 × knupfer quits (~Thunderbi@200116b82ca96500a0407cfffebb5266.dip.versatel-1u1.de) (Remote host closed the connection)
2020-11-25 13:13:36 knupfer joins (~Thunderbi@200116b82ca965000d9a6def15a910ad.dip.versatel-1u1.de)
2020-11-25 13:14:20 <tomsmeding> first write projection functions (for use in view patterns) and smart constructors, incrementally rewrite your program using them, developing the correct vocabulary along the way, and finally distill the result in some pattern synonyms?
2020-11-25 13:14:31 <merijn> See 1 hour and 7 minutes into this talk: https://www.youtube.com/watch?v=lC5UWG5N8oY
2020-11-25 13:14:55 ski . o O ( <https://downloads.haskell.org/~ghc/latest/docs/html/libraries/ghc-compact-0.1.0.0/GHC-Compact.html> )
2020-11-25 13:15:32 <merijn> ski: That's somewhat related, yes and in fact part of the talk I linked ;)
2020-11-25 13:17:04 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
2020-11-25 13:18:11 × sh9 quits (~sh9@softbank060116136158.bbtec.net) (Quit: WeeChat 2.8)
2020-11-25 13:18:36 × Jonkimi727406120 quits (~Jonkimi@113.87.161.66) (Ping timeout: 272 seconds)
2020-11-25 13:18:41 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2020-11-25 13:19:01 kindaro joins (5cf52cdd@h92-245-44-221.dyn.bashtel.ru)
2020-11-25 13:19:08 son0p joins (~son0p@181.136.122.143)
2020-11-25 13:20:12 <kindaro> When I run `cabal build` and then `cabal install --installdir=./deployment --install-method=copy --overwrite-policy=always`, it appears that the same build work is performed twice. How can I only build once and copy the executable to the designated place?
2020-11-25 13:20:24 FreeBirdLjj joins (~freebirdl@101.228.42.108)
2020-11-25 13:21:05 × Bergle_2 quits (~Bergle_4@101.165.90.119) (Remote host closed the connection)
2020-11-25 13:21:25 <kindaro> Currently, `cabal install …` is taking the amount of time very near to that of `cabal build`, and also looking at `ps -o command` shows that `ghc` is being invoked.
2020-11-25 13:21:25 Bergle_2 joins (~Bergle_4@101.165.90.119)
2020-11-25 13:21:28 Er joins (5fa448e7@95.164.72.231)
2020-11-25 13:22:07 gentauro joins (~gentauro@unaffiliated/gentauro)
2020-11-25 13:23:31 <merijn> Currently the way you can only build once and copy is to, well, skip running cabal build first? :p
2020-11-25 13:23:43 Franciman joins (~francesco@host-82-54-193-143.retail.telecomitalia.it)
2020-11-25 13:24:09 <kindaro> It is not acceptable because I need to acquire the exit status of `cabal build` and `cabal test` before I deploy.
2020-11-25 13:24:24 <merijn> There are a bunch of obscure reasons why install rebuilds everything from a clean slate. Some practical, and some due to lack of engineering effort to reduce this
2020-11-25 13:25:08 × Franciman quits (~francesco@host-82-54-193-143.retail.telecomitalia.it) (Client Quit)
2020-11-25 13:25:16 <kindaro> Unfortunate! Can I find out where `cabal build` stores the executable so I may copy it by hand?
2020-11-25 13:25:54 × star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Remote host closed the connection)
2020-11-25 13:26:08 <merijn> Latest alpha release of cabal-install has list-bins, if you use an older version there's
2020-11-25 13:26:12 <merijn> @hackage cabal-plan
2020-11-25 13:26:12 <lambdabot> https://hackage.haskell.org/package/cabal-plan
2020-11-25 13:26:14 star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com)
2020-11-25 13:26:15 × Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer)
2020-11-25 13:26:36 <merijn> kindaro: Note that copying by hand can get you in trouble if you use, e.g., data-files
2020-11-25 13:26:43 Franciman joins (~francesco@host-82-54-193-143.retail.telecomitalia.it)
2020-11-25 13:27:07 Tario joins (~Tario@201.192.165.173)
2020-11-25 13:27:09 × Er quits (5fa448e7@95.164.72.231) (Ping timeout: 245 seconds)
2020-11-25 13:28:15 × kindaro quits (5cf52cdd@h92-245-44-221.dyn.bashtel.ru) (Remote host closed the connection)
2020-11-25 13:28:33 Boomerang_ joins (~Boomerang@xd520f68c.cust.hiper.dk)
2020-11-25 13:30:23 <dminuoso> merijn: What's the protocol for that?
2020-11-25 13:30:48 <dminuoso> Is there some release command planned, that would give me a tarball with build artifacts in the correct directory structure?
2020-11-25 13:31:00 × Boomerang quits (~Boomerang@xd520f68c.cust.hiper.dk) (Ping timeout: 256 seconds)
2020-11-25 13:31:12 <dminuoso> Or.. can you override getDataFileName?
2020-11-25 13:31:35 <dminuoso> Guess I could just write my own Paths_foo module
2020-11-25 13:32:07 <merijn> dminuoso: When you run install you can control where they get put via flags, which will set getDataFileName, etc. as needed
2020-11-25 13:32:18 kindaro joins (5cf52cdd@h92-245-44-221.dyn.bashtel.ru)
2020-11-25 13:32:23 adm joins (~adm@43.229.88.197)
2020-11-25 13:32:25 <dminuoso> mmm j
2020-11-25 13:32:27 <merijn> dminuoso: I wanna work on proper prefix-independence
2020-11-25 13:32:36 × supercoven quits (~Supercove@dsl-hkibng31-54fabf-192.dhcp.inet.fi) (Ping timeout: 240 seconds)
2020-11-25 13:32:41 <merijn> at some unspecified moment where I have time, energy, and motivation
2020-11-25 13:32:48 <merijn> So...probably somewhere in the next 3 years :p
2020-11-25 13:33:03 <kindaro> merijn, thank you for explanations. Is there a ticket somewhere tracking those obscure reasons?
2020-11-25 13:33:03 hseg joins (~gesh@IGLD-84-228-238-117.inter.net.il)
2020-11-25 13:33:11 <hseg> where did mtimes vanish to?
2020-11-25 13:33:40 × adm quits (~adm@43.229.88.197) (Remote host closed the connection)
2020-11-25 13:34:04 <dminuoso> % :t stimes
2020-11-25 13:34:04 <yahb> dminuoso: forall {a} {b}. (Semigroup a, Integral b) => b -> a -> a
2020-11-25 13:34:06 <dminuoso> This?
2020-11-25 13:34:10 <hseg> or has it been deprecated in favour of stimes?
2020-11-25 13:34:13 <hseg> :t mtimes
2020-11-25 13:34:15 <lambdabot> error: Variable not in scope: mtimes
2020-11-25 13:34:24 <Uniaika> there's Data.Semigroup mtimesDefault :: (Integral b, Monoid a) => b -> a -> a
2020-11-25 13:34:30 <hseg> mtimes :: (Monoid a, Integral b) => b -> a -> a
2020-11-25 13:35:31 <merijn> kindaro: basically, I think install *always* builds from "first do sdist, then build from there" to ensure the package description is sane, I couldn't quickly find a ticket
2020-11-25 13:35:35 <hseg> right. and stimesMonoid :: (Integral b, Monoid a) => b -> a -> a is even better, using exponent halving
2020-11-25 13:35:47 <dminuoso> hseg: I dont see a way mtimes and stimes could differ, it would lead to incoherence.
2020-11-25 13:35:54 brisbin joins (~patrick@pool-173-49-158-4.phlapa.fios.verizon.net)
2020-11-25 13:36:02 × star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Excess Flood)
2020-11-25 13:36:04 <dminuoso> The mtimes bit is odd, did it ever exist?

All times are in UTC.