Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2021-03-23 04:09:50 Tario joins (~Tario@201.192.165.173)
2021-03-23 04:11:26 DataComputist joins (~lumeng@50.43.26.251)
2021-03-23 04:13:25 × ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Remote host closed the connection)
2021-03-23 04:13:25 × Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer)
2021-03-23 04:13:53 olligobber joins (olligobber@gateway/vpn/privateinternetaccess/olligobber)
2021-03-23 04:13:53 ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta)
2021-03-23 04:14:11 Tario joins (~Tario@201.192.165.173)
2021-03-23 04:15:38 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-03-23 04:18:06 × ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 256 seconds)
2021-03-23 04:18:33 × MidAutumnHotaru1 quits (~MidAutumn@unaffiliated/midautumnhotaru) (Ping timeout: 264 seconds)
2021-03-23 04:18:37 × olligobber quits (olligobber@gateway/vpn/privateinternetaccess/olligobber) (Ping timeout: 256 seconds)
2021-03-23 04:18:44 remal parts (~remal@d24-57-234-201.home.cgocable.net) ()
2021-03-23 04:19:35 × codygman__ quits (~user@47.186.207.161) (Ping timeout: 265 seconds)
2021-03-23 04:19:42 × xff0x_ quits (~xff0x@2001:1a81:5377:7c00:1d9b:fbcc:ac5f:34bc) (Ping timeout: 260 seconds)
2021-03-23 04:19:54 <sim590> how can I import package in ghci?
2021-03-23 04:19:59 <sim590> something with -package somehting?
2021-03-23 04:20:27 xff0x_ joins (~xff0x@2001:1a81:5377:7c00:1d05:c585:2fef:d379)
2021-03-23 04:20:44 toorevitimirp joins (~tooreviti@117.182.183.55)
2021-03-23 04:20:45 <Axman6> I don't think you can do it once you've started a ghci session, you need to start ghci with -package foo (if I'm wrong I would like to know the answer too!)
2021-03-23 04:21:01 <guest323> sim590: cabal?
2021-03-23 04:21:11 × azure1 quits (~azure@103.154.230.130) (Read error: Connection reset by peer)
2021-03-23 04:21:54 <sim590> I don't have the package. I want to do it quick in front of someone. Can I install the package to use it live like cabal install <package>?
2021-03-23 04:22:07 <dmwit> Axman6: You can :set -package from within ghci. But it has to already be installed of course.
2021-03-23 04:22:31 azure1 joins (~azure@103.154.230.130)
2021-03-23 04:23:12 <sim590> Yeah. It's just when I have a project.cabal file, downloads when I build are only local to the project, right?
2021-03-23 04:23:22 <dmwit> sim590: I think the modern way is `cabal install --libs foo --package-env default && ghci -package-env default`.
2021-03-23 04:23:28 <monochrom> https://cabal.readthedocs.io/en/3.4/cabal-commands.html#cabal-v2-run and scroll a bit down for "also supports running script files". This is the fastest way including least learning.
2021-03-23 04:23:38 Sathiana joins (~kath@185-113-98-38.cust.bredband2.com)
2021-03-23 04:24:00 <sclv> You can also cabal repl and pass it packages
2021-03-23 04:24:24 <sclv> and it’ll launch the repl with packages in scope
2021-03-23 04:24:27 <dmwit> Wait, how?
2021-03-23 04:24:34 <dmwit> I feel like I've tried and failed to do that in the past.
2021-03-23 04:25:03 <sclv> cabal repl —build-depends containers
2021-03-23 04:25:07 <sclv> Iirc
2021-03-23 04:25:17 <sim590> Weird. It says http://ix.io/2TOK when I'm trying to cabal install --libs random
2021-03-23 04:25:18 <monochrom> "cabal v2-repl --build-depends "vector >= 0.12 && < 0.13"" from https://cabal.readthedocs.io/en/3.4/cabal-commands.html#cabal-v2-repl
2021-03-23 04:25:18 × Sathiana quits (~kath@185-113-98-38.cust.bredband2.com) (Client Quit)
2021-03-23 04:25:48 Sathiana joins (~kath@185-113-98-38.cust.bredband2.com)
2021-03-23 04:25:54 <monochrom> s/--libs/--lib/
2021-03-23 04:26:12 <sim590> Oh OK. Thanks!
2021-03-23 04:27:31 <dmwit> sclv: ooooh, I was trying `--constraint`.
2021-03-23 04:27:48 <dmwit> Well this is great.
2021-03-23 04:27:53 <sim590> Weird. It just said "up to date" when I installed it, but earlier, it said it couldn't load the package. Anyway, now it's there. weird.
2021-03-23 04:28:05 × unyu quits (~pyon@unaffiliated/pyon) (Quit: test)
2021-03-23 04:29:51 <monochrom> The other thing I learned recently is that if you don't want those chatty messages "downloading... building... up to date... using environment file..." you can use -v0. This can be important if you're feeding stdout to another program that gets confused by those messages.
2021-03-23 04:30:05 Vadrigar_ joins (~Vadrigar@ip5b417208.dynamic.kabel-deutschland.de)
2021-03-23 04:33:32 olligobber joins (olligobber@gateway/vpn/privateinternetaccess/olligobber)
2021-03-23 04:34:34 × Vadrigar_ quits (~Vadrigar@ip5b417208.dynamic.kabel-deutschland.de) (Ping timeout: 265 seconds)
2021-03-23 04:39:02 × DataComputist quits (~lumeng@50.43.26.251) (Ping timeout: 264 seconds)
2021-03-23 04:44:52 DataComputist joins (~lumeng@50.43.26.251)
2021-03-23 04:47:18 ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta)
2021-03-23 04:49:13 × Tario quits (~Tario@201.192.165.173) (Ping timeout: 256 seconds)
2021-03-23 04:49:33 frozenErebus joins (~frozenEre@94.128.81.87)
2021-03-23 04:50:05 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 272 seconds)
2021-03-23 04:52:06 × kam1 quits (~kam1@37.129.96.190) (Read error: Connection reset by peer)
2021-03-23 04:52:22 × ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 260 seconds)
2021-03-23 04:58:40 kam1 joins (~kam1@37.129.96.190)
2021-03-23 04:58:41 × ezrakilty quits (~ezrakilty@97-113-58-224.tukw.qwest.net) (Remote host closed the connection)
2021-03-23 04:59:10 × kam1 quits (~kam1@37.129.96.190) (Read error: Connection reset by peer)
2021-03-23 05:06:32 lupulin joins (~lupulo@163.117.64.56)
2021-03-23 05:06:42 × lupulo quits (~lupulo@163.117.64.56) (Read error: Connection reset by peer)
2021-03-23 05:07:18 × DataComputist quits (~lumeng@50.43.26.251) (Quit: Leaving...)
2021-03-23 05:07:33 chibi joins (~chibi@75-26-238-119.lightspeed.glvwil.sbcglobal.net)
2021-03-23 05:09:26 <chibi> Hello. Is it normal for V2 from the linear package to take up a lot of time/RAM?
2021-03-23 05:09:41 DataComputist joins (~lumeng@50.43.26.251)
2021-03-23 05:10:18 <chibi> I have 4 calls to V2 in a ~350 line application and it took up 25% of all time and ~40% of all my RAM
2021-03-23 05:10:59 <chibi> ...which was only for about 16 seconds, I tried running it longer but it ends up causing an OOM crash after like 40 seconds and I have to reboot :P
2021-03-23 05:14:09 pieguy128_ joins (~pieguy128@bras-base-mtrlpq5031w-grc-47-67-70-101-46.dsl.bell.ca)
2021-03-23 05:14:13 × mozzarella quits (~sam@unaffiliated/sam113101) (Ping timeout: 245 seconds)
2021-03-23 05:14:20 mozzarel1 joins (~sam@unaffiliated/sam113101)
2021-03-23 05:14:34 mozzarel1 is now known as mozzarella
2021-03-23 05:14:41 × pieguy128 quits (~pieguy128@bras-base-mtrlpq5031w-grc-47-67-70-101-46.dsl.bell.ca) (Ping timeout: 265 seconds)
2021-03-23 05:15:20 × Kaivo quits (~Kaivo@104-200-86-99.mc.derytele.com) (Ping timeout: 256 seconds)
2021-03-23 05:15:32 kam1 joins (~kam1@37.129.96.190)
2021-03-23 05:16:02 Kaivo joins (~Kaivo@104-200-86-99.mc.derytele.com)
2021-03-23 05:16:26 × ryxai quits (~textual@pool-71-183-41-241.nycmny.fios.verizon.net) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2021-03-23 05:18:05 <dmwit> What an odd question. I don't think I have ever written a program for which V2 took up a lot of time/RAM, so no, it's definitely not normal.
2021-03-23 05:18:20 <dmwit> But then using V2 in the first place is not normal, because I don't think I have ever written a program that used it.
2021-03-23 05:19:07 <dmwit> In the grand scheme of things, programming at all probably is not normal.
2021-03-23 05:25:05 <chibi> Heh, that's true. I'm using the SDL graphics library, and one of it's data types is a Rectangle type that uses V2, so that's why I'm using it. Profile log says that's all fmap's fault so...
2021-03-23 05:25:22 <edwardk> chibi: what are you doing with those V2s is perhaps more the question
2021-03-23 05:25:22 <chibi> Maybe V2 just has an innefficient fmap implementation?
2021-03-23 05:25:40 <edwardk> fmap f (V2 a b) = V2 (f a) (f b)
2021-03-23 05:25:48 <edwardk> and V2 is strict in both args
2021-03-23 05:26:28 dmwit wonders if edwardk's crystal ball is showing him more than dmwit's is
2021-03-23 05:26:52 <chibi> Lemme just share the two functions I'm calling it from
2021-03-23 05:26:53 <edwardk> you might be fmapping with some big scary computation but most things folks wind up fmapping over that type for sdl purposes are little things like swapping out CInts for Ints and the like
2021-03-23 05:26:55 <dmwit> chibi: More directly: if you want help, you're probably gonna have to do some minimizing and share some code.
2021-03-23 05:27:20 <edwardk> V2 is rather deliberately quite boring
2021-03-23 05:27:51 ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta)
2021-03-23 05:28:18 <edwardk> to the point that when linear switches over to run on top the new distributive it'll be able to be generated almost entirely automatically
2021-03-23 05:28:19 <edwardk> https://github.com/ekmett/distributive/blob/main/distributive/src/Data/Rep/Internal.hs#L1966
2021-03-23 05:28:28 × kam1 quits (~kam1@37.129.96.190) (Read error: Connection reset by peer)
2021-03-23 05:28:59 <chibi> https://p.sicp.me/bA6iE.hs
2021-03-23 05:29:05 <chibi> This code's hacky all over mind
2021-03-23 05:29:16 <chibi> So apologies for that to start with
2021-03-23 05:29:42 <chibi> 3>
2021-03-23 05:30:26 <edwardk> nothing there looks too slow. there's a few things i'd change like ent^.entPos^._1 to ent^.entPos._1
2021-03-23 05:30:57 <chibi> The one thing that might be ig here is multiplying and rouning those floating point values *160, would that be enough to cause those functions to eat up resources like that?
2021-03-23 05:31:06 <edwardk> and you could proably use an iso between (a,a) and V2 a to get both halves of the Pos at a time

All times are in UTC.