Home liberachat/#haskell: Logs Calendar

Logs on 2023-08-20 (liberachat/#haskell)

00:00:10 notzmv joins (~zmv@user/notzmv)
00:02:08 × ulysses4ever quits (~artem@172.58.147.22) (Ping timeout: 256 seconds)
00:04:03 arahael joins (~arahael@1.145.87.227)
00:05:42 × oo_miguel quits (~Thunderbi@78-11-179-96.static.ip.netia.com.pl) (Ping timeout: 260 seconds)
00:07:49 × caryhartline quits (~caryhartl@168.182.58.169) (Quit: caryhartline)
00:08:02 × jero98772 quits (~jero98772@2800:484:1d84:300::2) (Ping timeout: 260 seconds)
00:08:55 ulysses4ever joins (~artem@2607:fb91:2fa3:58e8:f474:e3f8:9806:671)
00:11:00 × artem quits (~artem@73.145.240.182) (Ping timeout: 250 seconds)
00:15:05 merijn joins (~merijn@088-129-128-083.dynamic.caiway.nl)
00:17:46 BigKozlowski joins (~BigKozlow@84.21.165.226)
00:19:10 artem joins (~artem@2601:249:4380:8950:f474:e3f8:9806:671)
00:21:32 × ulysses4ever quits (~artem@2607:fb91:2fa3:58e8:f474:e3f8:9806:671) (Ping timeout: 248 seconds)
00:22:06 × BigKozlowski quits (~BigKozlow@84.21.165.226) (Ping timeout: 245 seconds)
00:28:52 bratwurst joins (~blaadsfa@2604:3d09:207f:f650:216:3eff:fe5a:a1f8)
00:30:04 × ouroboros quits (~ouroboros@user/ouroboros) (Ping timeout: 250 seconds)
00:30:12 × acro quits (~acro@user/acro) (Ping timeout: 246 seconds)
00:34:16 ouroboros joins (~ouroboros@user/ouroboros)
00:36:30 acro joins (~acro@user/acro)
00:37:35 Feuermagier joins (~Feuermagi@user/feuermagier)
00:37:52 doyougnu joins (~doyougnu@45.46.170.68)
00:41:55 × szkl quits (uid110435@2a03:5180:f:5::1:af63) (Quit: Connection closed for inactivity)
00:46:39 ulysses4ever joins (~artem@73.145.241.182)
00:48:20 caryhartline joins (~caryhartl@168.182.58.169)
00:48:25 <arahael> The HLS for cabal scripts works pretty badly. :(
00:48:44 × artem quits (~artem@2601:249:4380:8950:f474:e3f8:9806:671) (Ping timeout: 248 seconds)
00:49:10 × merijn quits (~merijn@088-129-128-083.dynamic.caiway.nl) (Ping timeout: 256 seconds)
00:50:16 × shapr quits (~user@2600:1700:c640:3100:753c:594:e430:473e) (Remote host closed the connection)
00:50:51 shapr joins (~user@2600:1700:c640:3100:28bc:7f2a:b582:a6c)
00:51:03 × lottaquestions quits (~nick@2607:fa49:503d:b200:ef5b:a0d5:dc54:1113) (Quit: Konversation terminated!)
00:53:15 × caryhartline quits (~caryhartl@168.182.58.169) (Quit: caryhartline)
00:53:54 <arahael> Hmm, and running a single file script (using cabal, not stack), hangs at: Linking /var/folders/wm/zwl_q6c537l7rsh9c6tm4m0m0000gn/T/cabal-repl.-40374/dist-newstyle/build/aarch64-osx/ghc-9.2.8/fake-package-0/x/script/build/script/script ...
00:53:58 <arahael> Not sure how to fix that.
00:55:34 × phma quits (phma@2001:5b0:210d:fa8:9f82:cebd:52a4:eb8d) (Read error: Connection reset by peer)
01:03:52 × arahael quits (~arahael@1.145.87.227) (Ping timeout: 250 seconds)
01:04:41 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
01:05:43 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Client Quit)
01:10:33 × albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
01:10:36 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 246 seconds)
01:16:42 albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8)
01:19:08 × misterfish quits (~misterfis@84.53.85.146) (Ping timeout: 248 seconds)
01:23:16 × waleee quits (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) (Ping timeout: 246 seconds)
01:25:12 razetime joins (~quassel@117.254.36.38)
01:26:14 × razetime quits (~quassel@117.254.36.38) (Client Quit)
01:30:15 BigKozlowski joins (~BigKozlow@84.21.165.226)
01:33:12 × falafel quits (~falafel@216.68.6.51.dyn.plus.net) (Ping timeout: 246 seconds)
01:34:36 × BigKozlowski quits (~BigKozlow@84.21.165.226) (Ping timeout: 245 seconds)
01:35:16 × hugo quits (znc@verdigris.lysator.liu.se) (Ping timeout: 244 seconds)
01:49:12 artem joins (~artem@2601:249:4380:8950:f474:e3f8:9806:671)
01:51:51 × ulysses4ever quits (~artem@73.145.241.182) (Ping timeout: 260 seconds)
01:58:50 hugo joins (znc@verdigris.lysator.liu.se)
02:00:44 × bratwurst quits (~blaadsfa@2604:3d09:207f:f650:216:3eff:fe5a:a1f8) (Ping timeout: 248 seconds)
02:06:09 merijn joins (~merijn@088-129-128-083.dynamic.caiway.nl)
02:06:10 shriekingnoise joins (~shrieking@186.137.175.87)
02:06:18 machinedgod joins (~machinedg@198.53.218.113)
02:07:01 BigKozlowski joins (~BigKozlow@84.21.165.226)
02:07:27 × vulpine quits (xfnw@tilde.team) (Quit: Connection reset by purr)
02:08:43 arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net)
02:11:21 × BigKozlowski quits (~BigKozlow@84.21.165.226) (Ping timeout: 246 seconds)
02:12:58 × td_ quits (~td@i5387090E.versanet.de) (Ping timeout: 246 seconds)
02:13:27 × arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 246 seconds)
02:14:51 td_ joins (~td@i53870934.versanet.de)
02:15:23 phma joins (~phma@host-67-44-208-38.hnremote.net)
02:16:33 nate2 joins (~nate@c-98-45-169-16.hsd1.ca.comcast.net)
02:17:50 gastus_ joins (~gastus@185.6.123.193)
02:18:48 vulpine joins (xfnw@tilde.team)
02:20:40 × gastus quits (~gastus@185.6.123.210) (Ping timeout: 246 seconds)
02:26:01 AlexNoo_ joins (~AlexNoo@178.34.150.48)
02:28:42 × Alex_test quits (~al_test@178.34.161.177) (Ping timeout: 245 seconds)
02:29:12 × AlexZenon quits (~alzenon@178.34.161.177) (Ping timeout: 246 seconds)
02:29:32 × AlexNoo quits (~AlexNoo@178.34.161.177) (Ping timeout: 245 seconds)
02:30:36 × ft quits (~ft@80.141.190.80) (Ping timeout: 248 seconds)
02:32:22 ft joins (~ft@p4fc2ad78.dip0.t-ipconnect.de)
02:33:46 AlexZenon joins (~alzenon@178.34.150.48)
02:34:32 Alex_test joins (~al_test@178.34.150.48)
02:36:14 × shriekingnoise quits (~shrieking@186.137.175.87) (Quit: Quit)
02:40:03 × merijn quits (~merijn@088-129-128-083.dynamic.caiway.nl) (Ping timeout: 246 seconds)
02:40:54 jero98772 joins (~jero98772@2800:484:1d84:300::2)
02:43:45 BigKozlowski joins (~BigKozlow@84.21.165.226)
02:46:20 smalltalkman joins (uid545680@id-545680.hampstead.irccloud.com)
02:47:36 × dibblego quits (~dibblego@haskell/developer/dibblego) (Ping timeout: 246 seconds)
02:47:52 × BigKozlowski quits (~BigKozlow@84.21.165.226) (Ping timeout: 245 seconds)
02:48:36 shriekingnoise joins (~shrieking@186.137.175.87)
02:49:06 dibblego joins (~dibblego@116-255-1-151.ip4.superloop.au)
02:49:06 × dibblego quits (~dibblego@116-255-1-151.ip4.superloop.au) (Changing host)
02:49:06 dibblego joins (~dibblego@haskell/developer/dibblego)
02:51:22 ulysses4ever joins (~artem@c-73-103-90-145.hsd1.in.comcast.net)
02:51:22 × artem quits (~artem@2601:249:4380:8950:f474:e3f8:9806:671) (Read error: Connection reset by peer)
02:52:10 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
02:52:10 finn_elija joins (~finn_elij@user/finn-elija/x-0085643)
02:52:10 finn_elija is now known as FinnElija
02:59:15 × jero98772 quits (~jero98772@2800:484:1d84:300::2) (Ping timeout: 245 seconds)
03:05:57 aforemny joins (~aforemny@i59F516C9.versanet.de)
03:06:18 × dibblego quits (~dibblego@haskell/developer/dibblego) (Ping timeout: 246 seconds)
03:06:21 × aforemny_ quits (~aforemny@89.245.22.230) (Ping timeout: 248 seconds)
03:08:27 dibblego joins (~dibblego@116-255-1-151.ip4.superloop.au)
03:08:27 × dibblego quits (~dibblego@116-255-1-151.ip4.superloop.au) (Changing host)
03:08:27 dibblego joins (~dibblego@haskell/developer/dibblego)
03:09:20 Inst joins (~liamzy@2601:6c4:4085:6d50::ecce)
03:09:30 <Inst> Erm, can I ask a question about the runtime and how IO actually works?
03:09:52 <Inst> Does GHC compile main to be self-sufficient, or does main end up being bytecode to be interpreted by the runtime system?
03:10:36 <Inst> basically, how does main hook into the runtime, how do uses of unsafePerformIO hook into the runtime?
03:10:44 BigKozlowski joins (~BigKozlow@84.21.165.226)
03:12:32 lisbeths joins (uid135845@id-135845.lymington.irccloud.com)
03:13:35 <probie> Inst: There is no bytecode to be interpreted by the runtime. `unsafePerformIO` conjures a `State# RealWorld` out of thin air, but as far as compiled code is concerned it is not magical (in fact, how unmagical it is, is a source of many issues when using it)
03:14:26 <monochrom> I would go beyond "unmagic". It doesn't even exist in asm code.
03:14:37 <probie> `IO a` is a function from `State# RealWorld -> (# State# RealWorld, a #)` and `State# RealWorld` has a 0 byte representation
03:14:59 × BigKozlowski quits (~BigKozlow@84.21.165.226) (Ping timeout: 244 seconds)
03:16:37 × myme quits (~myme@2a01:799:d60:e400:4a23:a534:a4cd:8840) (Ping timeout: 245 seconds)
03:16:54 <EvanR> RealWorld is deeply unmagical
03:17:14 <monochrom> Also, unsafePerformIO discards the phantom state, not conjure it.
03:17:37 myme joins (~myme@2a01:799:d60:e400:8c94:2d5b:43cf:54e)
03:17:44 <monochrom> err nevermind, it conjures one.
03:18:06 <probie> monochrom: it conjures one to be immediately discareded
03:18:13 <probie> s/discareded/discarded/
03:18:46 × nate2 quits (~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 256 seconds)
03:26:49 <Inst> so, in general, it occurs at the level of the compiler, with some side effects being calls to the runtime system?
03:26:54 <Inst> i.e, let's say I putStrLn
03:27:23 <Inst> I forget what it is, but it's a function of type (State# RealWorld -> (# RealWorld, ()#) or is it vice versa
03:28:00 <Inst> i know putStrLn is sort of complicated, but in say, main = putStrLn "Hello, Haskell!"
03:28:07 <EvanR> :t putStrLn
03:28:08 <lambdabot> String -> IO ()
03:28:19 <Inst> welp, so I'm technically wrong, but you get what I'm asking, right?
03:28:35 <EvanR> String -> State# RealWorld -> (# State# RealWorld, () #)
03:28:42 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 246 seconds)
03:29:06 bilegeek joins (~bilegeek@2600:1008:b059:ae41:2aa3:6bea:2610:ccf9)
03:30:14 <Inst> the actual interaction level with the console, I guess, that's to do with the runtime?
03:30:50 <EvanR> yeah to see where I'd drill as far as you can go into the (haskell) code of putStrLn
03:31:12 <EvanR> console stuff is pretty involved, so maybe not a great place to start
03:31:49 <Inst> so at Cmm level, it's just a normal C function, with some calls to the GHC runtime
03:32:28 × machinedgod quits (~machinedg@198.53.218.113) (Ping timeout: 248 seconds)
03:33:11 <Inst> so, main = putStrLn "What is your name? >> getLine >>= \u -> for_ putStr ["Hello, ", u, ".\n"]
03:33:21 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
03:34:05 <Inst> that actually has a pretty straightforward hypothetical translation to Cmm, tbh
03:34:45 <EvanR> putStrLn isn't even close to a primitive so it's just a bad example
03:34:52 <Inst> thanks for your time, and sorry about it, I guess trying to understand the Cmm translation and how the semantics of IO >> translation should work under laziness
03:35:05 <Inst> is a bit annoying
03:35:12 <EvanR> I like to pretend I understand how FFI works
03:35:25 <EvanR> and alot of support code ends up calling to the ffi
03:36:02 <EvanR> but that's opens up a lot more questions, and yeah you're asking specifically about the runtime
03:36:40 <Inst> ummm, let's say
03:36:53 <Inst> putStrLn "Hello" >> undefined >> putStrLn "Goodbye"
03:37:03 <Inst> in the result code, all the putStrLns exist, right?
03:37:29 <Inst> as does a call to the RTS to trigger the undefined exception
03:38:41 <EvanR> in the compiled code, no I don't know if putStrLns would exist. Their haskell code could have been inlined transformed optimized etc
03:39:13 <EvanR> you could try looking at core to get an idea of what RTS primitives to ask about
03:39:14 <ski> (.. i wonder whether it would simplify `error foo blah' and `case error foo of ...' (with refutable matching, forcing) to `error foo' .. if so, the second `putStrLn' might disappear)
03:44:31 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection)
03:45:22 × hugo quits (znc@verdigris.lysator.liu.se) (Ping timeout: 246 seconds)
03:49:28 <Inst> I guess it goes into me not understanding laziness, i.e, via the Hudak "everything is a function" explanation, everything can be understood as a pointer to a value that only gets instantiated when evaluated
03:50:01 <Inst> i.e, let's say I have a conditional split IO code into two forks
03:50:14 <Inst> does the IO code actually exist before it's evaluated, or does it always exist in the binary?
03:52:11 × Inst quits (~liamzy@2601:6c4:4085:6d50::ecce) (Remote host closed the connection)
03:52:49 Inst joins (~liamzy@2601:6c4:4085:6d50::4a7d)
03:53:50 merijn joins (~merijn@088-129-128-083.dynamic.caiway.nl)
03:54:56 <EvanR> if you write a top level x = 1:2:3:x
03:54:57 <ski> not sure what you mean exactly
03:55:18 <EvanR> it's not a function, more like a structure with a pointer to code that can compute more structure if needed
03:58:07 <EvanR> don't confuse lazy evaluation of non-IO stuff with how IO gets executed by the RTS. When you run main, you are playing a different ball game. The first IO action is what drives the evaluation, so it can execute something and move on
03:58:21 <EvanR> the IO itself isn't (normally) lazy
03:58:29 hugo joins (znc@verdigris.lysator.liu.se)
03:58:42 × merijn quits (~merijn@088-129-128-083.dynamic.caiway.nl) (Ping timeout: 245 seconds)
03:59:15 <EvanR> IO gets interleaved with the lazy evaluation
03:59:33 <Inst> I get the feeling that IO was some kind of weird exception
03:59:40 <ski> with `foo >>= \x -> if plob x then bar else baz', the code for `bar' and `baz' would exist somewhere, and after executing `foo x', `prob x' would be forced, to (at least conceptually) yield `foo' or `bar' as result to continue execution. but i imagine that this would (in this concrete, non-indirected, example) probably be simiplified to expressing a conditional in the Cmm, whose branches execute `foo' or
03:59:46 <ski> `bar' directly, rather than constructing a `IO' action thunk, then making it forced
03:59:48 <Inst> and I actually think about ReaderT apparently being costless for the same reason
04:00:24 <Inst> like, a monad transformer over IO, does the entire monad transformer line get converted first before the IO parsing begins, or can it be done line by line?
04:03:56 arahael joins (~arahael@1.145.81.2)
04:08:57 × Buggys quits (Buggys@Buggy.shelltalk.net) (Ping timeout: 246 seconds)
04:10:56 <ski> converted, how ?
04:15:55 Buggys joins (Buggys@Buggy.shelltalk.net)
04:16:20 × shapr quits (~user@2600:1700:c640:3100:28bc:7f2a:b582:a6c) (Remote host closed the connection)
04:16:33 shapr joins (~user@2600:1700:c640:3100:7513:7153:4750:76c1)
04:20:59 × arahael quits (~arahael@1.145.81.2) (Read error: Connection reset by peer)
04:34:02 × ski quits (~ski@ext-1-303.eduroam.chalmers.se) (Ping timeout: 250 seconds)
04:35:56 libertyprime joins (~libertypr@203.96.203.44)
04:38:44 arahael joins (~arahael@1.145.93.51)
04:44:54 × hugo quits (znc@verdigris.lysator.liu.se) (Ping timeout: 256 seconds)
04:57:26 jmd_ joins (~jmdaemon@user/jmdaemon)
04:57:31 × arahael quits (~arahael@1.145.93.51) (Read error: Connection reset by peer)
04:58:03 × libertyprime quits (~libertypr@203.96.203.44) (Quit: leaving)
04:59:46 × Unicorn_Princess quits (~Unicorn_P@user/Unicorn-Princess/x-3540542) (Quit: Leaving)
05:04:43 hugo joins (znc@verdigris.lysator.liu.se)
05:15:40 sm joins (~sm@plaintextaccounting/sm)
05:17:47 × hugo quits (znc@verdigris.lysator.liu.se) (Ping timeout: 260 seconds)
05:21:20 × sm quits (~sm@plaintextaccounting/sm) (Ping timeout: 245 seconds)
05:22:07 Simikando joins (~Simikando@adsl-dyn1.91-127-51.t-com.sk)
05:25:45 × Simikando quits (~Simikando@adsl-dyn1.91-127-51.t-com.sk) (Client Quit)
05:26:19 Simikando joins (~Simikando@adsl-dyn1.91-127-51.t-com.sk)
05:28:45 hugo joins (znc@verdigris.lysator.liu.se)
05:37:13 BigKozlowski joins (~BigKozlow@84.21.165.150)
05:38:35 × bilegeek quits (~bilegeek@2600:1008:b059:ae41:2aa3:6bea:2610:ccf9) (Quit: Leaving)
05:42:22 merijn joins (~merijn@088-129-128-083.dynamic.caiway.nl)
05:46:49 misterfish joins (~misterfis@84-53-85-146.bbserv.nl)
05:53:10 wootehfoot joins (~wootehfoo@user/wootehfoot)
05:53:11 × Inst quits (~liamzy@2601:6c4:4085:6d50::4a7d) (Remote host closed the connection)
05:53:21 ss4 joins (~wootehfoo@user/wootehfoot)
05:53:31 Inst joins (~liamzy@2601:6c4:4085:6d50::ecce)
05:55:48 × jargon quits (~jargon@174-22-213-62.phnx.qwest.net) (Remote host closed the connection)
06:01:10 × hugo quits (znc@verdigris.lysator.liu.se) (Ping timeout: 246 seconds)
06:02:28 × ss4 quits (~wootehfoo@user/wootehfoot) (Quit: Leaving)
06:05:57 jonathan_ joins (~jonathan@193.203.13.25)
06:08:35 acidjnk joins (~acidjnk@p200300d6e7072f96b9b41a1c591e9c90.dip0.t-ipconnect.de)
06:16:33 × merijn quits (~merijn@088-129-128-083.dynamic.caiway.nl) (Ping timeout: 246 seconds)
06:20:59 × dibblego quits (~dibblego@haskell/developer/dibblego) (Ping timeout: 244 seconds)
06:22:28 idgaen joins (~idgaen@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c)
06:22:51 × misterfish quits (~misterfis@84-53-85-146.bbserv.nl) (Ping timeout: 246 seconds)
06:24:36 × wootehfoot quits (~wootehfoo@user/wootehfoot) (Quit: Leaving)
06:26:24 × BigKozlowski quits (~BigKozlow@84.21.165.150) (Remote host closed the connection)
06:29:36 dibblego joins (~dibblego@116-255-1-151.ip4.superloop.au)
06:29:36 × dibblego quits (~dibblego@116-255-1-151.ip4.superloop.au) (Changing host)
06:29:36 dibblego joins (~dibblego@haskell/developer/dibblego)
06:35:10 × migas quits (~migas@62.138.8.62) (Remote host closed the connection)
06:35:27 migas joins (~migas@astra4961.startdedicated.net)
06:36:31 × Simikando quits (~Simikando@adsl-dyn1.91-127-51.t-com.sk) (Quit: Leaving)
06:41:21 hugo joins (znc@verdigris.lysator.liu.se)
06:41:34 merijn joins (~merijn@83.128.129.88)
06:42:07 misterfish joins (~misterfis@178.226.72.131)
06:46:04 × merijn quits (~merijn@83.128.129.88) (Ping timeout: 248 seconds)
06:50:53 × NewtonTrendy quits (uid282092@user/bopqod) (Quit: Connection closed for inactivity)
06:54:59 mima joins (~mmh@net-93-148-96-78.cust.dsl.teletu.it)
06:55:44 BigKozlowski joins (~BigKozlow@194.5.60.24)
06:57:51 × Inst quits (~liamzy@2601:6c4:4085:6d50::ecce) (Ping timeout: 246 seconds)
07:00:40 sm joins (~sm@plaintextaccounting/sm)
07:05:55 × BigKozlowski quits (~BigKozlow@194.5.60.24) (Ping timeout: 246 seconds)
07:09:09 merijn joins (~merijn@088-129-128-083.dynamic.caiway.nl)
07:12:37 Inst joins (~liamzy@2601:6c4:4085:6d50::d375)
07:13:14 azimut joins (~azimut@gateway/tor-sasl/azimut)
07:13:57 × merijn quits (~merijn@088-129-128-083.dynamic.caiway.nl) (Ping timeout: 246 seconds)
07:17:49 × sm quits (~sm@plaintextaccounting/sm) (Quit: sm)
07:18:18 fendor joins (~fendor@2a02:8388:1640:be00:b586:6c06:a58:19a3)
07:25:25 merijn joins (~merijn@088-129-128-083.dynamic.caiway.nl)
07:29:22 × hugo quits (znc@verdigris.lysator.liu.se) (Ping timeout: 246 seconds)
07:35:57 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 246 seconds)
07:36:11 hugo joins (znc@verdigris.lysator.liu.se)
07:36:17 azimut joins (~azimut@gateway/tor-sasl/azimut)
07:37:54 × mikoto-chan quits (~mikoto-ch@85-76-165-132-nat.elisa-mobile.fi) (Ping timeout: 246 seconds)
07:40:01 _ht joins (~Thunderbi@82.174.52.28)
07:40:47 × dibblego quits (~dibblego@haskell/developer/dibblego) (Ping timeout: 245 seconds)
07:44:21 coot joins (~coot@89-69-206-216.dynamic.chello.pl)
07:46:32 dibblego joins (~dibblego@116-255-1-151.ip4.superloop.au)
07:46:33 × dibblego quits (~dibblego@116-255-1-151.ip4.superloop.au) (Changing host)
07:46:33 dibblego joins (~dibblego@haskell/developer/dibblego)
07:46:57 sm joins (~sm@plaintextaccounting/sm)
07:51:28 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:6085:9764:49dd:5dc5) (Remote host closed the connection)
07:53:25 × sm quits (~sm@plaintextaccounting/sm) (Ping timeout: 245 seconds)
07:55:20 sm joins (~sm@plaintextaccounting/sm)
07:59:36 × sm quits (~sm@plaintextaccounting/sm) (Ping timeout: 246 seconds)
07:59:50 × merijn quits (~merijn@088-129-128-083.dynamic.caiway.nl) (Ping timeout: 256 seconds)
08:03:27 merijn joins (~merijn@088-129-128-083.dynamic.caiway.nl)
08:03:45 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
08:09:11 × coot quits (~coot@89-69-206-216.dynamic.chello.pl) (Quit: coot)
08:10:20 titibandit joins (~titibandi@user/titibandit)
08:11:04 × titibandit quits (~titibandi@user/titibandit) (Remote host closed the connection)
08:13:21 × hugo quits (znc@verdigris.lysator.liu.se) (Ping timeout: 260 seconds)
08:13:23 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Read error: Connection reset by peer)
08:15:50 sm joins (~sm@plaintextaccounting/sm)
08:16:50 × mima quits (~mmh@net-93-148-96-78.cust.dsl.teletu.it) (Ping timeout: 256 seconds)
08:19:02 × shapr quits (~user@2600:1700:c640:3100:7513:7153:4750:76c1) (Remote host closed the connection)
08:19:15 shapr joins (~user@2600:1700:c640:3100:4a10:9cc3:c2a8:452b)
08:20:05 × sm quits (~sm@plaintextaccounting/sm) (Ping timeout: 245 seconds)
08:24:37 hugo joins (znc@verdigris.lysator.liu.se)
08:29:52 × dibblego quits (~dibblego@haskell/developer/dibblego) (Ping timeout: 256 seconds)
08:31:35 Tuplanolla joins (~Tuplanoll@91-159-68-236.elisa-laajakaista.fi)
08:32:06 × lisbeths quits (uid135845@id-135845.lymington.irccloud.com) (Quit: Connection closed for inactivity)
08:33:30 dibblego joins (~dibblego@116.255.1.151)
08:33:31 × dibblego quits (~dibblego@116.255.1.151) (Changing host)
08:33:31 dibblego joins (~dibblego@haskell/developer/dibblego)
08:37:32 szkl joins (uid110435@id-110435.uxbridge.irccloud.com)
08:41:42 sm joins (~sm@plaintextaccounting/sm)
08:45:55 × sm quits (~sm@plaintextaccounting/sm) (Ping timeout: 245 seconds)
08:47:00 × chiselfuse quits (~chiselfus@user/chiselfuse) (Remote host closed the connection)
08:47:37 chiselfuse joins (~chiselfus@user/chiselfuse)
08:49:42 × jonathan_ quits (~jonathan@193.203.13.25) (Ping timeout: 256 seconds)
08:52:01 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:bc38:61d8:7af5:2488)
08:53:00 × dibblego quits (~dibblego@haskell/developer/dibblego) (Ping timeout: 248 seconds)
08:54:37 dibblego joins (~dibblego@116-255-1-151.ip4.superloop.au)
08:54:37 × dibblego quits (~dibblego@116-255-1-151.ip4.superloop.au) (Changing host)
08:54:37 dibblego joins (~dibblego@haskell/developer/dibblego)
08:56:09 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:bc38:61d8:7af5:2488) (Ping timeout: 246 seconds)
09:02:51 gmg joins (~user@user/gehmehgeh)
09:13:06 × ursa-major quits (~ursa-majo@37.19.210.36) (Ping timeout: 250 seconds)
09:15:06 ursa-major joins (~ursa-majo@static-198-44-128-151.cust.tzulo.com)
09:15:19 × Inst quits (~liamzy@2601:6c4:4085:6d50::d375) (Remote host closed the connection)
09:15:36 Inst joins (~liamzy@2601:6c4:4085:6d50::ecce)
09:16:25 edwtjo joins (~edwtjo@h-155-4-52-185.A213.priv.bahnhof.se)
09:16:25 × edwtjo quits (~edwtjo@h-155-4-52-185.A213.priv.bahnhof.se) (Changing host)
09:16:25 edwtjo joins (~edwtjo@fsf/member/edwtjo)
09:22:12 × merijn quits (~merijn@088-129-128-083.dynamic.caiway.nl) (Ping timeout: 250 seconds)
09:27:02 × hugo quits (znc@verdigris.lysator.liu.se) (Ping timeout: 245 seconds)
09:33:11 coot joins (~coot@89-69-206-216.dynamic.chello.pl)
09:37:01 shriekingnoise_ joins (~shrieking@186.137.175.87)
09:37:20 hugo joins (znc@130.236.254.23)
09:38:26 × shriekingnoise quits (~shrieking@186.137.175.87) (Ping timeout: 256 seconds)
09:45:48 × shriekingnoise_ quits (~shrieking@186.137.175.87) (Ping timeout: 256 seconds)
09:56:43 Simikando joins (~Simikando@adsl-dyn1.91-127-51.t-com.sk)
09:57:45 dcoutts joins (~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net)
10:01:16 × L29Ah quits (~L29Ah@wikipedia/L29Ah) (Ping timeout: 248 seconds)
10:02:26 × dibblego quits (~dibblego@haskell/developer/dibblego) (Ping timeout: 260 seconds)
10:04:31 waleee joins (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7)
10:04:45 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
10:04:46 [_] joins (~itchyjunk@user/itchyjunk/x-7353470)
10:05:48 × Simikando quits (~Simikando@adsl-dyn1.91-127-51.t-com.sk) (Ping timeout: 246 seconds)
10:06:40 dibblego joins (~dibblego@116-255-1-151.ip4.superloop.au)
10:06:40 × dibblego quits (~dibblego@116-255-1-151.ip4.superloop.au) (Changing host)
10:06:40 dibblego joins (~dibblego@haskell/developer/dibblego)
10:08:30 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Client Quit)
10:08:48 [_] is now known as [itchyjunk]
10:11:04 × misterfish quits (~misterfis@178.226.72.131) (Ping timeout: 246 seconds)
10:12:33 × tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz)
10:14:29 sm joins (~sm@plaintextaccounting/sm)
10:17:40 tv joins (~tv@user/tv)
10:18:46 × sm quits (~sm@plaintextaccounting/sm) (Ping timeout: 246 seconds)
10:20:50 Pickchea joins (~private@user/pickchea)
10:21:03 libertyprime joins (~libertypr@203.96.203.44)
10:22:47 Feuermagier_ joins (~Feuermagi@user/feuermagier)
10:22:47 × Feuermagier quits (~Feuermagi@user/feuermagier) (Killed (mercury.libera.chat (Nickname regained by services)))
10:22:47 Feuermagier_ is now known as Feuermagier
10:24:49 misterfish joins (~misterfis@84-53-85-146.bbserv.nl)
10:29:14 × libertyprime quits (~libertypr@203.96.203.44) (Quit: leaving)
10:41:59 tromp joins (~textual@92.110.219.57)
10:49:04 sm joins (~sm@plaintextaccounting/sm)
10:53:25 × sm quits (~sm@plaintextaccounting/sm) (Ping timeout: 245 seconds)
10:53:35 Simikando joins (~Simikando@adsl-dyn1.91-127-51.t-com.sk)
10:53:44 × Simikando quits (~Simikando@adsl-dyn1.91-127-51.t-com.sk) (Remote host closed the connection)
10:58:20 × acidjnk quits (~acidjnk@p200300d6e7072f96b9b41a1c591e9c90.dip0.t-ipconnect.de) (Ping timeout: 256 seconds)
11:01:24 × mrmr1 quits (~mrmr@user/mrmr) (Quit: Bye, See ya later!)
11:01:42 acidjnk joins (~acidjnk@p200300d6e7072f9611bac84c98e29ab7.dip0.t-ipconnect.de)
11:02:55 codaraxis__ joins (~codaraxis@user/codaraxis)
11:05:51 × codaraxis___ quits (~codaraxis@user/codaraxis) (Ping timeout: 245 seconds)
11:07:44 mrmr1 joins (~mrmr@user/mrmr)
11:15:01 × tromp quits (~textual@92.110.219.57) (Quit: My iMac has gone to sleep. ZZZzzz…)
11:15:19 × Inst quits (~liamzy@2601:6c4:4085:6d50::ecce) (Remote host closed the connection)
11:15:24 × _d0t quits (~{-d0t-}@user/-d0t-/x-7915216) (Ping timeout: 248 seconds)
11:15:37 Inst joins (~liamzy@2601:6c4:4085:6d50::d375)
11:15:46 mima joins (~mmh@net-93-148-96-78.cust.dsl.teletu.it)
11:18:32 _d0t joins (~{-d0t-}@user/-d0t-/x-7915216)
11:21:33 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
11:24:40 × acidjnk quits (~acidjnk@p200300d6e7072f9611bac84c98e29ab7.dip0.t-ipconnect.de) (Ping timeout: 245 seconds)
11:32:32 × mima quits (~mmh@net-93-148-96-78.cust.dsl.teletu.it) (Ping timeout: 244 seconds)
11:34:01 logothesia joins (~logothesi@user/logothesia)
11:39:29 mima joins (~mmh@net-93-148-97-78.cust.vodafonedsl.it)
11:39:54 <logothesia> hi folks. I've been trying to build accelerate-examples but it fails with a mysterious c2hs error: https://paste.tomsmeding.com/fSxk209z
11:40:07 <logothesia> am I doing something silly, or is this a known issue?
11:40:49 <logothesia> sorry if this isn't the right place to ask, I tried emailing the list but I received a notice from google telling me that I don't have permission to post or something like that
11:40:49 × coot quits (~coot@89-69-206-216.dynamic.chello.pl) (Quit: coot)
11:40:57 sm joins (~sm@plaintextaccounting/sm)
11:41:03 coot joins (~coot@89-69-206-216.dynamic.chello.pl)
11:42:52 <logothesia> I also installed llvm 9.0.1, which seems to be the version of llvm-hs accelerate wants
11:44:05 <mauke> out of interest, what are the first lines of .stack-work/dist/x86_64-linux-tinfo6/Cabal-3.2.0.0/build/Foreign/CUDA/Path.i ?
11:45:13 × sm quits (~sm@plaintextaccounting/sm) (Ping timeout: 246 seconds)
11:47:56 <logothesia> hmm, .stack-work in the project directory itself doesn't seem to contain dist, only install
11:48:35 <logothesia> it does mention lower down a directory in /tmp
11:48:46 <logothesia> which seems to get cleaned up after the build
11:48:52 <logothesia> not sure if it's referring to that one
11:49:24 <logothesia> https://paste.tomsmeding.com/Auuy8l5G
11:50:02 <logothesia> this gets printed after the cabal messages (presumably by stack?)
11:55:01 × mima quits (~mmh@net-93-148-97-78.cust.vodafonedsl.it) (Ping timeout: 245 seconds)
11:58:35 × Pickchea quits (~private@user/pickchea) (Quit: Leaving)
11:59:10 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Read error: Connection reset by peer)
11:59:40 × waleee quits (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) (Ping timeout: 245 seconds)
12:01:25 waleee joins (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7)
12:09:44 × jmd_ quits (~jmdaemon@user/jmdaemon) (Ping timeout: 244 seconds)
12:13:11 Simikando joins (~Simikando@adsl-dyn1.91-127-51.t-com.sk)
12:18:20 Guest45 joins (~Guest45@95-25-87-91.broadband.corbina.ru)
12:18:45 × Guest45 quits (~Guest45@95-25-87-91.broadband.corbina.ru) (Client Quit)
12:25:58 falafel joins (~falafel@51.6.68.216)
12:26:50 × szkl quits (uid110435@id-110435.uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
12:29:17 kiro joins (~kiro@60.240.169.108)
12:29:40 × waleee quits (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) (Ping timeout: 246 seconds)
12:31:19 × kiro quits (~kiro@60.240.169.108) (Client Quit)
12:31:22 sm joins (~sm@plaintextaccounting/sm)
12:35:27 Lycurgus joins (~juan@user/Lycurgus)
12:35:30 × sm quits (~sm@plaintextaccounting/sm) (Ping timeout: 245 seconds)
12:41:09 × coot quits (~coot@89-69-206-216.dynamic.chello.pl) (Quit: coot)
12:41:23 coot joins (~coot@89-69-206-216.dynamic.chello.pl)
12:42:42 mvk joins (~mvk@2607:fea8:5c9a:a600::1c6d)
12:43:09 L29Ah joins (~L29Ah@wikipedia/L29Ah)
12:45:18 × idgaen quits (~idgaen@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 4.0.2)
12:51:29 × coot quits (~coot@89-69-206-216.dynamic.chello.pl) (Quit: coot)
12:51:43 coot joins (~coot@89-69-206-216.dynamic.chello.pl)
12:54:15 artem joins (~artem@c-73-103-90-145.hsd1.in.comcast.net)
12:54:16 × ulysses4ever quits (~artem@c-73-103-90-145.hsd1.in.comcast.net) (Read error: Connection reset by peer)
12:59:31 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
13:04:19 × Inst quits (~liamzy@2601:6c4:4085:6d50::d375) (Remote host closed the connection)
13:07:02 sm joins (~sm@plaintextaccounting/sm)
13:09:08 kupi joins (uid212005@id-212005.hampstead.irccloud.com)
13:09:40 × Lycurgus quits (~juan@user/Lycurgus) (Quit: Tschüss)
13:11:20 × sm quits (~sm@plaintextaccounting/sm) (Ping timeout: 245 seconds)
13:24:18 ulysses4ever joins (~artem@c-73-103-90-145.hsd1.in.comcast.net)
13:24:18 × artem quits (~artem@c-73-103-90-145.hsd1.in.comcast.net) (Read error: Connection reset by peer)
13:27:33 × Simikando quits (~Simikando@adsl-dyn1.91-127-51.t-com.sk) (Quit: Leaving)
13:32:13 × shapr quits (~user@2600:1700:c640:3100:4a10:9cc3:c2a8:452b) (Remote host closed the connection)
13:32:14 Inst joins (~liamzy@2601:6c4:4085:6d50::ecce)
13:32:28 shapr joins (~user@2600:1700:c640:3100:e4c2:b6ef:bc7:e0a2)
13:32:28 <Inst> You’ll see that the web browser magically refreshes once you save the file changes.
13:32:28 <Inst> Did it work? Congratulations 🎉 You’ve officially built your first haskell web application :) That makes you a haskell programmer. Welcome to the Haskell community! :)
13:33:11 <Inst> apparently the price of admission via IHP is figuring out how to install Nix, how to install IHP, how to get the sample program up, and how to edit and save the source files to experience the magic of live reloading
13:33:29 <Inst> that said, getting Nix working is not trivial
13:35:51 <Inst> and you can ship your first Haskell app to production in about 60-90 minutes with IHP.
13:47:42 mikoto-chan joins (~mikoto-ch@ip-83-134-209-157.dsl.scarlet.be)
13:48:25 zer0bitz_ is now known as zer0bitz
13:53:05 fweht joins (uid404746@id-404746.lymington.irccloud.com)
13:53:27 × notzmv quits (~zmv@user/notzmv) (Ping timeout: 260 seconds)
13:55:52 × teddyc quits (theodorc@cassarossa.samfundet.no) (Ping timeout: 240 seconds)
13:59:28 teddyc joins (theodorc@cassarossa.samfundet.no)
13:59:37 sm joins (~sm@plaintextaccounting/sm)
14:03:57 × sm quits (~sm@plaintextaccounting/sm) (Ping timeout: 246 seconds)
14:05:55 × Inst quits (~liamzy@2601:6c4:4085:6d50::ecce) (Ping timeout: 245 seconds)
14:16:37 <logothesia> mauke: is there a way to prevent stack from deleting temporary files?
14:22:02 × misterfish quits (~misterfis@84-53-85-146.bbserv.nl) (Ping timeout: 245 seconds)
14:26:38 waleee joins (~waleee@h-176-10-137-138.NA.cust.bahnhof.se)
14:26:49 × coot quits (~coot@89-69-206-216.dynamic.chello.pl) (Quit: coot)
14:27:06 coot joins (~coot@89-69-206-216.dynamic.chello.pl)
14:29:26 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
14:33:19 <albet70> how to find a index of a sub-byetstring in another bytestring?
14:34:06 bratwurst joins (~blaadsfa@2604:3d09:207f:f650:216:3eff:fe5a:a1f8)
14:36:33 christo joins (~christo@202.159.165.152)
14:37:09 × coot quits (~coot@89-69-206-216.dynamic.chello.pl) (Quit: coot)
14:37:24 coot joins (~coot@89-69-206-216.dynamic.chello.pl)
14:40:04 NewtonTrendy joins (uid282092@user/bopqod)
14:40:54 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
14:46:04 anselmschueler joins (~anselmsch@user/schuelermine)
14:48:44 × bratwurst quits (~blaadsfa@2604:3d09:207f:f650:216:3eff:fe5a:a1f8) (Ping timeout: 248 seconds)
14:48:47 <ncf> https://hackage.haskell.org/package/bytestring-0.12.0.2/docs/Data-ByteString.html#v:breakSubstring
14:50:05 crazazy joins (~user@130.89.171.133)
14:50:33 × anselmschueler quits (~anselmsch@user/schuelermine) (Client Quit)
14:50:45 anselmschueler joins (~anselmsch@user/schuelermine)
14:50:56 arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net)
14:51:53 artem joins (~artem@c-73-103-90-145.hsd1.in.comcast.net)
14:51:54 × ulysses4ever quits (~artem@c-73-103-90-145.hsd1.in.comcast.net) (Read error: Connection reset by peer)
14:54:14 × coot quits (~coot@89-69-206-216.dynamic.chello.pl) (Quit: coot)
14:55:46 × arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 256 seconds)
14:56:49 Unicorn_Princess joins (~Unicorn_P@user/Unicorn-Princess/x-3540542)
14:57:27 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Read error: Connection reset by peer)
14:58:16 × anselmschueler quits (~anselmsch@user/schuelermine) (Quit: WeeChat 4.0.3)
15:03:01 × christo quits (~christo@202.159.165.152) (Quit: WeeChat 3.8)
15:06:11 jero98772 joins (~jero98772@2800:484:1d84:300::2)
15:06:35 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
15:06:36 bratwurst joins (~blaadsfa@2604:3d09:207f:f650:216:3eff:fe5a:a1f8)
15:08:36 acidjnk joins (~acidjnk@p200300d6e7072f9611bac84c98e29ab7.dip0.t-ipconnect.de)
15:09:56 <EvanR> albet70, the package I linked last night also has that
15:11:21 <EvanR> I see breakSubstring exists now, cool
15:18:50 × crazazy quits (~user@130.89.171.133) (Ping timeout: 244 seconds)
15:20:31 × mikoto-chan quits (~mikoto-ch@ip-83-134-209-157.dsl.scarlet.be) (Ping timeout: 258 seconds)
15:21:48 × bratwurst quits (~blaadsfa@2604:3d09:207f:f650:216:3eff:fe5a:a1f8) (Ping timeout: 248 seconds)
15:26:20 wroathe joins (~wroathe@user/wroathe)
15:28:41 <wroathe> So I've got a profile that says roughly a third of my program's allocations are being made by this routine: https://gist.github.com/JustinChristensen/1a260e17984f0daae853fc5d56ab08f5 . This is using Megaparsec. What I'm attemping to do here is advance the parser state to the next field boundary (this is used by another routine that is buffering up positions in a list that gives me random access to their
15:28:47 <wroathe> positions at the end of parsing a row to build up my output)
15:29:34 <wroathe> Maybe you guys know of a better way to do this with Megaparsec. The two fields I'm updating there on the parser state are the stateInput and stateOffset, which are the remaining input to consume, and the offset from the beginning of the initial input stream
15:30:17 <wroathe> From what I can tell using `drop` like that is fairly common... but I'm wondering if that's what's responsible for making so many allocations. I'll attach the profile output to that gist too
15:31:32 <wroathe> Ok, gist updated
15:32:32 <wroathe> In C terms what I'm trying to model is advancing the pointer to the next field boundary, and then subtracting from the current position
15:32:55 <wroathe> So the question is if there's a way to do that here with the Megaparsec model of the parser state
15:33:37 <wroathe> Those two operations shouldn't even require memory allocation in C terms (yes, I know this is Haskell, I'm just trying to explain what I'm trying to achieve)
15:40:23 jonathan_ joins (~jonathan@193.203.13.34)
15:41:52 × pavonia quits (~user@user/siracusa) (Quit: Bye!)
15:42:05 sm joins (~sm@plaintextaccounting/sm)
15:42:50 <wroathe> The question for this channel is: can anyone point out where the allocations are being made by that routine?
15:44:09 <mauke> I assume laziness
15:46:27 <wroathe> Or maybe there's a good way to get a report of exactly what's being allocated. I guess I'll try to make sense of that heap profiling thing again.
15:47:19 <wroathe> A cool project for ghc would be to try and make it output profiling data that Chrome Developer Tools can consume
15:47:23 × sm quits (~sm@plaintextaccounting/sm) (Quit: sm)
15:47:36 tzh joins (~tzh@c-24-21-73-154.hsd1.wa.comcast.net)
15:54:32 <EvanR> I know you can profile retainers to see who is holding heap objects
15:55:21 sm joins (~sm@plaintextaccounting/sm)
15:55:44 <wroathe> yeah I'll give that a shot
15:55:50 <EvanR> note when you try to write haskell algorithms that increment and decrement counters, you need to make sure they get evaluated soon so the thunks don't pile up
15:56:22 <wroathe> EvanR: How would I do that in this case?
15:56:50 <EvanR> put the counter in a strict field, use bang patterns, or judicious use of seq
15:57:26 <wroathe> EvanR: https://github.com/mrkkrp/megaparsec/blob/master/Text/Megaparsec/State.hs#L43 I think this means it's already a strict field, right?
15:57:36 <EvanR> yeah it is
15:57:49 <EvanR> I was assume megaparsec's inner workings already... work
15:57:49 × gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer)
15:58:09 gentauro joins (~gentauro@user/gentauro)
15:58:16 × YuutaW quits (~YuutaW@mail.yuuta.moe) (Ping timeout: 246 seconds)
15:58:17 <wroathe> I suspect it's the `findIndex` or `drop` calls I'm making there
15:58:43 <wroathe> My naive assumption is that something like `drop` allocates an entirely new Text with the remaining content of the original input
15:59:31 <wroathe> brb
16:00:12 YuutaW joins (~YuutaW@mail.yuuta.moe)
16:01:07 <EvanR> no the result will point into the same underlying array
16:02:12 <EvanR> but if you iteratively drop on the same text object without doing anything with the intermediates, it could cause thunks to pile up.
16:02:29 <mauke> stateOffset is strict, stateInput is not
16:02:46 <mauke> also, I'm not sure the entire state thing is strict
16:03:13 notzmv joins (~zmv@user/notzmv)
16:03:51 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 246 seconds)
16:04:56 jonathan__ joins (~jonathan@193.203.13.91)
16:05:06 titibandit joins (~titibandi@user/titibandit)
16:06:23 AlexNoo_ is now known as AlexNoo
16:06:42 <AlexZenon> ����!
16:06:42 × yahb2 quits (~yahb2@2a01:4f8:c0c:5c7b::2) (Remote host closed the connection)
16:07:26 yahb2 joins (~yahb2@2a01:4f8:c0c:5c7b::2)
16:07:37 × jonathan_ quits (~jonathan@193.203.13.34) (Ping timeout: 260 seconds)
16:08:17 × sm quits (~sm@plaintextaccounting/sm) (Remote host closed the connection)
16:08:35 wroathe joins (~wroathe@user/wroathe)
16:08:40 <wroathe> back
16:08:57 sm joins (~sm@plaintextaccounting/sm)
16:09:20 RSCASTILHO joins (~RSCASTILH@187.40.124.54)
16:09:57 <EvanR> wroathe, ran into this warning while looking at the megaparsec code, might not be relevant xD https://i.imgur.com/jlc5TYQ.png
16:10:23 ulysses4ever joins (~artem@c-73-103-90-145.hsd1.in.comcast.net)
16:10:23 × artem quits (~artem@c-73-103-90-145.hsd1.in.comcast.net) (Read error: Connection reset by peer)
16:12:05 <wroathe> EvanR: To my knowledge I'm not calling that anywhere in my program, and I think that warning only pertains to the parser that you pass into that function as argument "p"
16:13:26 × sm quits (~sm@plaintextaccounting/sm) (Ping timeout: 250 seconds)
16:13:28 <EvanR> well it queries the offset, runs the parser, then queries the offset again
16:13:50 <EvanR> so if that parser does shenanigans, ...
16:13:57 <wroathe> right
16:14:13 <wroathe> yeah, but I'm not using that function anywhere (even indirectly)
16:14:17 × mvk quits (~mvk@2607:fea8:5c9a:a600::1c6d) (Ping timeout: 246 seconds)
16:15:21 sm joins (~sm@plaintextaccounting/sm)
16:16:47 <wroathe> I just need to dig in more to these heap profiling flags
16:17:32 <EvanR> is it that your program is very slow? or seems to leak memory or what
16:18:27 <wroathe> It's slower than expected. This is just a hobby thing, and I want to make it fast. Especially because the full run of it will consume a few gigabytes worth of data while standing up a docker image with a database.
16:19:16 <wroathe> Whole thing takes about ~2s for an 8 MB TSV file
16:19:26 <EvanR> I gather megaparsec is geared toward convenience rather than speed
16:20:14 <wroathe> It has benchmarks showing that it outperforms the other parser combinator libraries. At this point if it were the libraries fault I think it would be due to a weakness in the parser combinator model of parsing generally, and not something to do with megaparsec specifically
16:20:26 <wroathe> But I don't think it's the library. I suspect it's my routine.
16:21:05 × ddellacosta quits (~ddellacos@143.244.47.100) (Ping timeout: 258 seconds)
16:21:11 <wroathe> And in general I have a knack for finding use cases that libraries I use aren't built for :P
16:22:37 tremon joins (~tremon@83.80.159.219)
16:22:57 × son0p quits (~ff@191.104.6.44) (Quit: Bye)
16:24:42 ddellacosta joins (~ddellacos@143.244.47.100)
16:26:22 coot joins (~coot@89-69-206-216.dynamic.chello.pl)
16:32:12 × hugo quits (znc@130.236.254.23) (Ping timeout: 248 seconds)
16:35:12 × YuutaW quits (~YuutaW@mail.yuuta.moe) (Ping timeout: 240 seconds)
16:37:10 YuutaW joins (~YuutaW@mail.yuuta.moe)
16:38:45 machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net)
16:42:09 <stefan-_> when creating a jupyter notebook with an IHaskell kernel there is an error shown in the jupyter console: https://gist.github.com/dozed/adafc18951ffd32bc6c6e7c881f7d772
16:42:12 <stefan-_> any ideas how to fix this?
16:47:45 × titibandit quits (~titibandi@user/titibandit) (Ping timeout: 246 seconds)
16:48:01 hugo joins (znc@verdigris.lysator.liu.se)
16:48:12 <EvanR> stefan-_, I see https://github.com/IHaskell/IHaskell/issues/1385
16:48:13 × YuutaW quits (~YuutaW@mail.yuuta.moe) (Ping timeout: 244 seconds)
16:50:08 YuutaW joins (~YuutaW@mail.yuuta.moe)
16:51:01 Simikando joins (~Simikando@adsl-dyn1.91-127-51.t-com.sk)
16:52:35 × coot quits (~coot@89-69-206-216.dynamic.chello.pl) (Quit: coot)
16:53:03 son0p joins (~ff@191.104.6.44)
16:53:09 × justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.6)
16:53:34 × hugo quits (znc@verdigris.lysator.liu.se) (Ping timeout: 246 seconds)
16:54:12 <stefan-_> EvanR, thanks, at least I am not the only one facing that issue :)
16:59:19 danza joins (~francesco@151.47.141.240)
17:02:30 × sm quits (~sm@plaintextaccounting/sm) (Quit: sm)
17:03:22 × Simikando quits (~Simikando@adsl-dyn1.91-127-51.t-com.sk) (Ping timeout: 246 seconds)
17:04:47 × YuutaW quits (~YuutaW@mail.yuuta.moe) (Ping timeout: 260 seconds)
17:06:50 YuutaW joins (~YuutaW@mail.yuuta.moe)
17:13:06 × hololeap quits (~quassel@user/hololeap) (Quit: Bye)
17:14:15 hololeap joins (~quassel@user/hololeap)
17:14:46 hugo joins (znc@verdigris.lysator.liu.se)
17:16:12 <wroathe> lol... I was so excited for https://gitlab.haskell.org/ghc/ghc-debug. Le sigh: https://gist.github.com/JustinChristensen/08af9eeb053217d0e484a2b5dd52255a
17:16:50 mikoto-chan joins (~mikoto-ch@ip-83-134-209-157.dsl.scarlet.be)
17:18:56 coot joins (~coot@89-69-206-216.dynamic.chello.pl)
17:20:36 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 250 seconds)
17:24:58 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:bc38:61d8:7af5:2488)
17:26:34 sm joins (~sm@plaintextaccounting/sm)
17:29:01 × sm quits (~sm@plaintextaccounting/sm) (Client Quit)
17:29:11 × machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 246 seconds)
17:37:15 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 246 seconds)
17:41:11 justsomeguy joins (~justsomeg@user/justsomeguy)
17:43:13 <AlexZenon> riamo.ru
17:48:53 wroathe joins (~wroathe@207.153.38.140)
17:48:53 × wroathe quits (~wroathe@207.153.38.140) (Changing host)
17:48:53 wroathe joins (~wroathe@user/wroathe)
17:56:17 × connrs quits (~connrs@user/connrs) (Read error: Connection reset by peer)
17:56:35 <shapr> that looks like spam
17:59:24 connrs joins (~connrs@user/connrs)
17:59:47 ChanServ sets mode +o shapr
17:59:53 AlexZenon is kicked by shapr (Kicked by shapr)
17:59:54 AlexZenon joins (~alzenon@178.34.150.48)
18:00:18 <shapr> AlexZenon: please don't spam
18:00:21 <shapr> otherwise I'll have to ban you
18:00:33 <shapr> if you want to learn Haskell, this is a great place!
18:00:39 <shapr> if you want to spam, you will be removed
18:06:22 × coot quits (~coot@89-69-206-216.dynamic.chello.pl) (Quit: coot)
18:08:57 × kupi quits (uid212005@id-212005.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
18:09:52 thegeekinside joins (~thegeekin@189.217.90.224)
18:10:20 Simikando joins (~Simikando@adsl-dyn1.91-127-51.t-com.sk)
18:10:46 × thegeekinside quits (~thegeekin@189.217.90.224) (Remote host closed the connection)
18:14:12 szkl joins (uid110435@id-110435.uxbridge.irccloud.com)
18:14:57 × Simikando quits (~Simikando@adsl-dyn1.91-127-51.t-com.sk) (Ping timeout: 245 seconds)
18:26:10 sm joins (~sm@plaintextaccounting/sm)
18:26:56 Inst joins (~liamzy@2601:6c4:4085:6d50::d375)
18:30:51 × vgtw quits (~vgtw@user/vgtw) (Quit: ZNC - https://znc.in)
18:31:57 idgaen joins (~idgaen@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c)
18:32:12 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 248 seconds)
18:41:51 × son0p quits (~ff@191.104.6.44) (Quit: Bye)
18:47:56 × mikoto-chan quits (~mikoto-ch@ip-83-134-209-157.dsl.scarlet.be) (Ping timeout: 245 seconds)
18:56:32 vgtw joins (~vgtw@user/vgtw)
18:56:37 misterfish joins (~misterfis@84.53.85.146)
19:15:30 × jonathan__ quits (~jonathan@193.203.13.91) (Ping timeout: 245 seconds)
19:19:32 × fendor quits (~fendor@2a02:8388:1640:be00:b586:6c06:a58:19a3) (Remote host closed the connection)
19:20:19 artem joins (~artem@c-73-103-90-145.hsd1.in.comcast.net)
19:20:20 × ulysses4ever quits (~artem@c-73-103-90-145.hsd1.in.comcast.net) (Read error: Connection reset by peer)
19:20:29 ystael joins (~ystael@user/ystael)
19:20:51 × sm quits (~sm@plaintextaccounting/sm) (Quit: sm)
19:26:20 × justsomeguy quits (~justsomeg@user/justsomeguy) (Ping timeout: 245 seconds)
19:29:39 × Inst quits (~liamzy@2601:6c4:4085:6d50::d375) (Remote host closed the connection)
19:30:29 Inst joins (~liamzy@2601:6c4:4085:6d50::bea1)
19:38:47 × danza quits (~francesco@151.47.141.240) (Ping timeout: 260 seconds)
19:41:53 wroathe joins (~wroathe@207-153-38-140.fttp.usinternet.com)
19:41:53 × wroathe quits (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
19:41:53 wroathe joins (~wroathe@user/wroathe)
19:43:22 × dcoutts quits (~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) (Ping timeout: 244 seconds)
19:50:05 × YuutaW quits (~YuutaW@mail.yuuta.moe) (Ping timeout: 245 seconds)
19:50:51 shriekingnoise joins (~shrieking@186.137.175.87)
19:51:57 YuutaW joins (~YuutaW@mail.yuuta.moe)
19:55:26 mikoto-chan joins (~mikoto-ch@ip-83-134-209-157.dsl.scarlet.be)
20:02:23 × hololeap quits (~quassel@user/hololeap) (Quit: Bye)
20:03:36 hololeap joins (~quassel@user/hololeap)
20:04:02 × _ht quits (~Thunderbi@82.174.52.28) (Quit: _ht)
20:07:08 × misterfish quits (~misterfis@84.53.85.146) (Ping timeout: 248 seconds)
20:09:21 × idgaen quits (~idgaen@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 4.0.2)
20:12:05 Pickchea joins (~private@user/pickchea)
20:15:04 arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net)
20:18:52 × falafel quits (~falafel@51.6.68.216) (Ping timeout: 248 seconds)
20:21:36 × arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 244 seconds)
20:29:32 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 250 seconds)
20:30:38 jmdaemon joins (~jmdaemon@user/jmdaemon)
20:36:41 × hololeap quits (~quassel@user/hololeap) (Quit: Bye)
20:42:03 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 246 seconds)
20:42:44 × RSCASTILHO quits (~RSCASTILH@187.40.124.54) ()
20:44:06 wroathe joins (~wroathe@user/wroathe)
20:44:47 hololeap joins (~quassel@user/hololeap)
20:44:49 <tomsmeding> logothesia: ensure you have pull in c2hs 0.28.8
20:44:53 <tomsmeding> s/have//
20:45:20 <tomsmeding> try: cabal build --constraint 'c2hs >=0.28.8'
20:45:24 <tomsmeding> https://github.com/haskell/c2hs/issues/268
20:49:28 × mikoto-chan quits (~mikoto-ch@ip-83-134-209-157.dsl.scarlet.be) (Ping timeout: 246 seconds)
20:49:49 coot joins (~coot@89-69-206-216.dynamic.chello.pl)
20:57:07 pavonia joins (~user@user/siracusa)
20:57:25 × Inst quits (~liamzy@2601:6c4:4085:6d50::bea1) (Remote host closed the connection)
20:57:44 Inst joins (~liamzy@2601:6c4:4085:6d50::85eb)
21:02:35 × hololeap quits (~quassel@user/hololeap) (Quit: Bye)
21:04:06 × AlexZenon quits (~alzenon@178.34.150.48) (Ping timeout: 256 seconds)
21:05:37 hololeap joins (~quassel@user/hololeap)
21:11:18 AlexZenon joins (~alzenon@178.34.150.48)
21:16:12 caryhartline joins (~caryhartl@168.182.58.169)
21:20:14 merijn joins (~merijn@088-129-128-083.dynamic.caiway.nl)
21:20:46 falafel joins (~falafel@51.6.68.216)
21:21:48 × AlexZenon quits (~alzenon@178.34.150.48) (Ping timeout: 248 seconds)
21:22:40 sm joins (~sm@plaintextaccounting/sm)
21:23:38 dcoutts joins (~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net)
21:24:28 × zer0bitz quits (~zer0bitz@user/zer0bitz) (Read error: Connection reset by peer)
21:24:45 AlexZenon joins (~alzenon@178.34.150.48)
21:24:48 × merijn quits (~merijn@088-129-128-083.dynamic.caiway.nl) (Ping timeout: 246 seconds)
21:25:38 × caryhartline quits (~caryhartl@168.182.58.169) (Quit: caryhartline)
21:29:36 × AlexZenon quits (~alzenon@178.34.150.48) (Ping timeout: 245 seconds)
21:31:15 AlexZenon joins (~alzenon@178.34.150.48)
21:34:00 anselmschueler joins (~anselmsch@user/schuelermine)
21:34:57 × coot quits (~coot@89-69-206-216.dynamic.chello.pl) (Quit: coot)
21:35:56 × dibblego quits (~dibblego@haskell/developer/dibblego) (Ping timeout: 246 seconds)
21:36:45 × Inst quits (~liamzy@2601:6c4:4085:6d50::85eb) (Ping timeout: 245 seconds)
21:37:16 × dextaa quits (~DV@user/dextaa) (Ping timeout: 248 seconds)
21:40:20 dibblego joins (~dibblego@116-255-1-151.ip4.superloop.au)
21:40:20 × dibblego quits (~dibblego@116-255-1-151.ip4.superloop.au) (Changing host)
21:40:20 dibblego joins (~dibblego@haskell/developer/dibblego)
21:42:06 × acidjnk quits (~acidjnk@p200300d6e7072f9611bac84c98e29ab7.dip0.t-ipconnect.de) (Ping timeout: 246 seconds)
21:49:13 arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net)
21:49:28 econo_ joins (uid147250@id-147250.tinside.irccloud.com)
21:52:48 × jero98772 quits (~jero98772@2800:484:1d84:300::2) (Ping timeout: 246 seconds)
21:53:08 × sm quits (~sm@plaintextaccounting/sm) (Quit: sm)
21:53:42 × arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 245 seconds)
21:53:56 × shapr quits (~user@2600:1700:c640:3100:e4c2:b6ef:bc7:e0a2) (Remote host closed the connection)
21:54:09 shapr joins (~user@2600:1700:c640:3100:5507:bbc0:d0c9:b395)
21:54:29 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 246 seconds)
21:54:48 machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net)
21:59:30 × gmg quits (~user@user/gehmehgeh) (Quit: Leaving)
21:59:32 × dibblego quits (~dibblego@haskell/developer/dibblego) (Ping timeout: 245 seconds)
21:59:39 × machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Client Quit)
22:04:39 jero98772 joins (~jero98772@2800:484:1d84:300::2)
22:05:42 × stiell_ quits (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 246 seconds)
22:07:30 × Pickchea quits (~private@user/pickchea) (Quit: Leaving)
22:07:47 arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net)
22:08:15 dibblego joins (~dibblego@116-255-1-151.ip4.superloop.au)
22:08:15 × dibblego quits (~dibblego@116-255-1-151.ip4.superloop.au) (Changing host)
22:08:15 dibblego joins (~dibblego@haskell/developer/dibblego)
22:08:20 stiell_ joins (~stiell@gateway/tor-sasl/stiell)
22:09:11 ulysses4ever joins (~artem@c-73-103-90-145.hsd1.in.comcast.net)
22:09:11 × artem quits (~artem@c-73-103-90-145.hsd1.in.comcast.net) (Read error: Connection reset by peer)
22:11:37 × jero98772 quits (~jero98772@2800:484:1d84:300::2) (Ping timeout: 260 seconds)
22:12:47 × arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 260 seconds)
22:14:53 caryhartline joins (~caryhartl@168.182.58.169)
22:19:10 mikoto-chan joins (~mikoto-ch@85-76-46-81-nat.elisa-mobile.fi)
22:25:35 mvk joins (~mvk@2607:fea8:5c9a:a600::1c6d)
22:26:26 machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net)
22:29:08 × tremon quits (~tremon@83.80.159.219) (Quit: getting boxed in)
22:32:47 × fweht quits (uid404746@id-404746.lymington.irccloud.com) (Quit: Connection closed for inactivity)
22:46:20 × mikoto-chan quits (~mikoto-ch@85-76-46-81-nat.elisa-mobile.fi) (Ping timeout: 245 seconds)
22:49:20 <wroathe> Hey guys, so I've got a memory profile of my program that shows that lots of Text and ARR_WORDS are being allocated by my program. I think I know where this is happening, but what tools can I use to very clearly see the new allocation being made with my own two eyes?
22:49:47 <wroathe> I'm calling `drop` from Data.Text, and from what I can see in the text library code it looks like it creates a new Text object
22:50:05 <wroathe> What I'm wondering is if this strict annotation here: https://github.com/haskell/text/blob/master/src/Data/Text/Internal.hs#L66 means that it copies the inner array each time it does so?
22:50:24 hsxtrt joins (~hsxtrt@14-200-253-168.static.tpgi.com.au)
22:50:32 <wroathe> Here's where a new Text is created: https://github.com/haskell/text/blob/master/src/Data/Text.hs#L1450
22:51:16 <wroathe> Is there a compilation stage I can look at that would show me that calling drop is copying this array?
22:51:21 × anselmschueler quits (~anselmsch@user/schuelermine) (Quit: WeeChat 4.0.3)
22:51:52 <mauke> to me that looks like it creates a new wrapper object (of type Text), but does not copy the underlying array
22:52:16 <wroathe> Ah. I was wondering if the ! would change that behavior
22:52:28 <geekosaur> nope, it requires more than that
22:53:54 <wroathe> Hmm, this is the section of code I'm trying to figure out the problem with: https://gist.github.com/JustinChristensen/1a260e17984f0daae853fc5d56ab08f5
22:54:13 <wroathe> From earlier this morning. The profile says that this advanceTo routine is responsible for 33% of my program's allocations
22:54:46 <wroathe> The idea there is with megaparsec I'm trying to advance the input and offset to a TSV field boundary (and hoping to do that without any extra allocations)
22:55:17 <wroathe> Sorry, 37%
22:56:55 jargon joins (~jargon@174-22-213-62.phnx.qwest.net)
22:57:28 <EvanR> so how does findIndex work
22:58:35 <EvanR> i'll be interested to see how you do that without allocations
22:59:20 <wroathe> https://github.com/haskell/text/blob/9fc523cef77f02c465afe00a2f4ac67c388f9945/src/Data/Text.hs#L1956-L1961
22:59:37 <EvanR> ah it's from Data.Text
23:00:19 <wroathe> EvanR: Yeah, I don't truly mean zero allocation. I'm just trying to approximate how easy it woudl be to do something like this with an array in C to this context
23:00:23 × hsxtrt quits (~hsxtrt@14-200-253-168.static.tpgi.com.au) (Quit: This computer has gone to sleep)
23:00:55 <wroathe> The -hd profile I just ran shows Text and ARR_WORDS is the largest portion of allocation occuring
23:01:33 <EvanR> the Data.Text implementation code uses a stream framework which is subject to optimizations, like fusion
23:01:59 Guest|7 joins (~Guest|7@cpe-184-54-115-255.swo.res.rr.com)
23:02:08 <EvanR> you said you were reading 8MB file, so there's that
23:02:47 <wroathe> Yup
23:03:02 <wroathe> I'm trying to figure out how to get a screenshot of this report. One sec.
23:03:25 <EvanR> is it lazy I/O or fully loaded before parsing
23:03:34 <Guest|7> Hello! I'm trying to install GHCi on Artix linux. I saw the section about setting a platform-override for ghcup, but I can't find what the config overrides would be for Arch. Would anyone be able to tell me what command I should use?
23:04:08 <wroathe> EvanR: I'm just using Data.Text.IO readFile
23:04:09 <EvanR> if it's lazy I/O it's not surprising to see alot of allocating in the process of seeking forward
23:05:05 <shapr> there's a lot to learn in the world
23:05:39 <shapr> Guest|7: What's different about artix linux? What's a platform override?
23:07:18 <Guest|7> The issue is that when running `ghcup install ghci`, ghcup throws an error about 'undetected distro'. Arch and Artix are pretty similar, Artix just has more options for init systems. I got the platform override from here: https://www.haskell.org/ghcup/guide/#overriding-distro-detection
23:07:44 <Guest|7> But it only lists an example for Void and Ubuntu
23:09:35 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
23:10:10 <EvanR> wroathe, according to readFile (hGetContents) for Data.Text.IO, it will read chunks until none are left to read, concat them all and return them. So that's a lot of allocating, but should happen upfront at the beginning
23:11:07 <sclv> Guest|7: you can find a list of the platforms in the ghcup distro metadata yaml i think https://github.com/haskell/ghcup-metadata/blob/c88802ea8cf25a4e16227679dd89e8843ad7f759/ghcup-0.0.7.yaml
23:11:55 <Guest|7> Oh I see, thanks. I was just looking in the wrong place
23:12:05 <wroathe> EvanR: https://i.imgur.com/aETjZ8g.png
23:12:22 <wroathe> The amount of technical difficulty I had getting that screenshot on desktop linux makes me feel old :D
23:12:41 <EvanR> print screen works on default ubuntu right now
23:12:50 <wroathe> Yeah I'm on Fedora, and relatively new to it
23:12:54 <shapr> ( flameshot is a really good screenshot tool on Linux, according to my recent research )
23:12:55 <wroathe> I'm just getting used to grim/slurp
23:13:00 <wroathe> Using sway as my window manager
23:13:23 <wroathe> Yeah I just installed/used grimshot and it did what I needed
23:13:38 <wroathe> This is the result of running with -hd for my program: https://i.imgur.com/aETjZ8g.png
23:13:53 <EvanR> if you're expecting your program to be able to process everything in a fixed amount of memory, then your picture shows a space leak
23:14:17 <wroathe> Yeah, I gathered that much already
23:14:55 <wroathe> I don't think "fixed", but at the very least my goal is for something like advanceTo to not cost me 37% of my memory usage
23:14:57 <EvanR> I still wasn't sure if you were chasing something worth chasing xD
23:15:07 <shapr> Guest|7: did it work?
23:15:16 <Guest|7> not yet
23:15:45 <wroathe> Because again mentally I'm trying to implement "advance the pointer, subtract the difference to get the offset added, commit those to the parser state"
23:15:56 <probie> wroathe: do you get different results for memory usage when there's no lazy IO going on?
23:16:00 <wroathe> Which might not be possible with megaparsec, but I'm just seeing what options I've got
23:16:16 <wroathe> probie: How would I disable that? Which Data.Text routine are you thinking?
23:16:31 <EvanR> megaparsec does backtracking, so it might not be able to drop context it needs to possibly backtrack if there's a parse error some time before the end of the processing
23:17:03 <wroathe> EvanR: Well that's fine. In this mental model I'm describing there could be many parser states. As long as we're talking about pointers and not entirely new arrays the amount of overhead should be minimal
23:17:23 <wroathe> (sorry I know I'm trying to apply C understanding to an entirely different beast. try to bear with me)
23:17:41 <EvanR> your picture, it shows a fixed amount of ARR_WORDS
23:17:49 <EvanR> which is good
23:18:25 <EvanR> Text and the thing under ARR_WORDS is growing
23:18:35 <EvanR> along with a lot of other stuff
23:18:58 <EvanR> it looks like the ARR_WORDS grows to its max in the first 0.1 seconds, probably loading the file
23:19:30 <probie> wroathe: ignore me, for some reason I thought `Data.Text.readFile` was lazy, but it's not
23:19:39 × dolio quits (~dolio@130.44.134.54) (Quit: ZNC 1.8.2 - https://znc.in)
23:19:46 <EvanR> yeah
23:19:51 <wroathe> Here's the full program: https://gist.github.com/JustinChristensen/72e4eae8a8e6e4e4f9be09078770c504
23:21:00 dolio joins (~dolio@130.44.134.54)
23:21:15 jero98772 joins (~jero98772@2800:484:1d84:300::2)
23:23:07 × shapr quits (~user@2600:1700:c640:3100:5507:bbc0:d0c9:b395) (Remote host closed the connection)
23:23:21 shapr joins (~user@2600:1700:c640:3100:6898:ed8d:7f5e:e726)
23:23:41 <EvanR> on line 278 and 279 you're holding some strings (Text) while you recurse deeper into the parsing
23:23:52 <EvanR> finally it will all be linked into a list and returned
23:24:04 mikoto-chan joins (~mikoto-ch@85-76-46-81-nat.elisa-mobile.fi)
23:24:06 <EvanR> so it makes sense your Text constructors will steadily increase
23:24:20 <wroathe> Yeah I was wondering about that
23:24:31 <wroathe> But the confusing thing is that profiling is telling me that advanceTo is the problem
23:24:59 <EvanR> still not sure there is a problem yet
23:25:19 × Guest|7 quits (~Guest|7@cpe-184-54-115-255.swo.res.rr.com) (Quit: Connection closed)
23:25:40 <wroathe> I just added the full profile
23:25:41 <wroathe> To that gist
23:25:48 <wroathe> If you refresh
23:25:54 <EvanR> other than the obvious, you will wait until the end of parsing to return a giant linked list of strings
23:26:10 <wroathe> yeah, I expect that much
23:26:23 <EvanR> but since we don't know if parsing failed until we finish, we can't start process that list lazily with this plan
23:26:24 <wroathe> I'm just not expecting advanceTo to be responsible for 37% of allocations
23:27:07 <EvanR> well the code for findIndex does a bunch of stuff
23:27:22 <wroathe> So maybe that's the cost...
23:27:28 <wroathe> Hmm, I guessed it would've been drop
23:27:32 <EvanR> if it produces temporary constructors, they will be collected soon
23:27:48 × dolio quits (~dolio@130.44.134.54) (Quit: ZNC 1.8.2 - https://znc.in)
23:28:58 <EvanR> can you write a faster processor for this data, probably xD
23:29:31 <EvanR> maybe using pipes or conduit
23:29:48 <wroathe> faster in what sense?
23:30:00 × xff0x quits (~xff0x@138.64.86.45) (Quit: xff0x)
23:30:01 <wroathe> I'm fine with it buffering up my objects for the parse in memory
23:30:33 <wroathe> The way I've written it it should only examine each line of the file twice
23:30:35 <EvanR> fast runtime, less memory usage
23:31:28 <wroathe> Well, what's slow about this? (I'm just trying to understand what you see as costly here)
23:31:28 × caryhartline quits (~caryhartl@168.182.58.169) (Quit: caryhartline)
23:31:36 xff0x joins (~xff0x@2405:6580:b080:900:9c64:3e23:a36:74a0)
23:31:58 <EvanR> depends on what the goal is. To produce a giant list of strings in memory and then end the program?
23:32:27 <wroathe> EvanR: Haha, to insert into a database. I just haven't gotten that far yet.
23:32:43 <wroathe> I'm trying to get the parser perfect first, and then I'll write the "insert into my database" co de
23:32:46 <wroathe> code*
23:33:16 <EvanR> if you change it slightly to "insert every valid line (record) into the database" you could go much faster
23:33:54 <wroathe> That typically runs contradictory to everything I know about program speed :P I/O is expensive. It's much cheaper to buffer all of this up and then do large inserts
23:34:05 <wroathe> s/cheaper/faster/
23:34:51 <wroathe> I'm just trying to get rid of unnecessary allocations. I'm pretty happy with what's there so far besides strange results I'm seeing
23:35:53 <EvanR> when you read a file incrementally, it's buffered for you
23:36:18 <wroathe> I mean buffer the objects up that I'm then serializing into INSERT statements
23:36:44 <wroathe> Incremental I/O wouldn't help here. I think we might be saying the same thing
23:36:51 razetime joins (~quassel@117.254.37.152)
23:37:08 <EvanR> yeah, you can have a pipeline stage that chunks valid records if you want to put them all in one sql call
23:37:30 <wroathe> How is that different than what I'm doing here? It seems to me that the difference there is just the API
23:37:43 <EvanR> I just see a profile that grows to 100M before doing anything as possibly going faster, since having large heap footprint slows haskell down
23:38:13 <wroathe> I'm 1. Reading the entire file into memory, 2. Parsing its contents into records in memory, and then I'll be 3. Serializing those objects into large INSERT statements
23:38:46 dolio joins (~dolio@130.44.134.54)
23:38:50 <EvanR> yeah, that's chunk size = everything
23:39:21 <wroathe> It just seems strange that an 8MB file would result in 100MB of resident heap size for this
23:39:36 <wroathe> For a comparable C program I'd be surprised if I went over 20MB in total
23:39:44 <EvanR> depends on how large your string slices into the file are
23:39:46 <wroathe> For both the file in memory and my allocated structs
23:40:02 <EvanR> if each string is 1 character, 8 -> 100 would be lucky xD
23:40:11 hsxtrt joins (~hsxtrt@14-200-253-168.static.tpgi.com.au)
23:40:19 <wroathe> Yeah I think that's the rub
23:40:20 <EvanR> a Text has non trivial overhead
23:40:32 <EvanR> at least it's not 1 character
23:40:59 <EvanR> this is another reason you'd like to not load it all into memory at once
23:41:07 <wroathe> Hmm, I wonder if Bytestring or String would lead to better memory usage
23:41:20 <monochrom> Did you know that a list of length n takes 3*w*n bytes where w=4 or 8, and this is just for the (:) nodes, not even counting the elements?
23:41:21 <geekosaur> String will be much worse
23:41:21 <EvanR> not String, no which has that overhead for every single Char
23:41:39 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 246 seconds)
23:42:03 <monochrom> And the heap size is going to be 2*3*w*n because copying GC = double buffering like in computer graphics.
23:42:29 <wroathe> monochrom: where are you getting the 3 from?
23:42:44 <monochrom> How GHC does algebraic data types.
23:43:05 × xff0x quits (~xff0x@2405:6580:b080:900:9c64:3e23:a36:74a0) (Quit: xff0x)
23:43:13 <wroathe> Hmm, let me get the final list counts
23:43:38 <monochrom> A white-lie model that gives the correct answer but white-lie reason: each data constructor takes w bytes, each field is a pointer that also takes w bytes.
23:43:49 <wroathe> Oh shoot I'm about to be kicked out of this coffee shop. I'll be back on in a bit
23:43:50 <EvanR> the list nodes don't even show up in your profile because that's at the last moment before the program ends (without using the list)
23:43:51 <monochrom> (:) has 2 fields therefore (1+2)*w bytes.
23:43:54 caryhartline joins (~caryhartl@168.182.58.169)
23:44:17 <EvanR> profile after you print out the number of list nodes xD
23:44:33 <wroathe> EvanR: Yeah that adds even more. I've tested that.
23:45:00 <monochrom> The white lie is in "data constructor takes w bytes". In truth, it is a pointer to a chunk of code and info that represents the data constructor.
23:45:03 <EvanR> list is better used as a vehicle for lazy evaluation than a large data structure :tm:
23:46:03 Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915)
23:47:04 arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net)
23:47:32 <hpc> it's perhaps better to call it a control structure than a data structure
23:47:54 <EvanR> Control.List
23:47:56 <hpc> it's a loop in disguise, kind of like how a tree is a search in disguise
23:47:57 <EvanR> Data.Monad
23:48:17 <mauke> Data.Function
23:48:24 <EvanR> Function.Data
23:48:52 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 250 seconds)
23:48:56 <hpc> in other languages they still talk about say, alpha-beta search as a "search tree" rather than "this funny sort of recursive function call"
23:49:07 <monochrom> Basically people who are short on RAM know about the life hack that you can reduce space consumption by 50% just by switching back to 32-bit GHC.
23:49:08 <int-e> wroathe: Hmm, can you try making `i` strict in this line? https://gist.github.com/JustinChristensen/72e4eae8a8e6e4e4f9be09078770c504#file-parse-hs-L161 (so either with a bang pattern, (!i, "") or with i `seq` on the RHS)
23:49:35 <EvanR> they left
23:49:35 <hpc> the tree never materializes, unless you consider those function definitions a hard-coded version of it
23:49:42 <int-e> https://hackage.haskell.org/package/text-2.0.2/docs/src/Data.Text.Read.html#decimal looks like it'll leave an unevaluated `foldl'` around
23:49:45 <int-e> EvanR: oh, unlucky
23:50:18 <geekosaur> "I'll be back on in a bit"
23:50:28 <geekosaur> think they're looking for another open coffeeshop 🙂
23:50:33 <EvanR> ^
23:50:35 <hpc> monochrom: from a certain perspective, they're reducing space consumption by a factor of 4 billion :D
23:50:43 <int-e> Which maybe explains the odd Data.Text.Read.sat_s1Vc6 allocations *and* will also hang onto a bunch of `Text` data. (looking at https://i.imgur.com/aETjZ8g.png )
23:51:02 <int-e> (I'd probably forget if I didn't finish that thought.)
23:51:15 × mvk quits (~mvk@2607:fea8:5c9a:a600::1c6d) (Ping timeout: 246 seconds)
23:51:22 <hpc> (actually more than that, exponentials are ridiculous)
23:51:28 × arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 246 seconds)
23:51:40 × falafel quits (~falafel@51.6.68.216) (Ping timeout: 248 seconds)
23:52:10 <monochrom> Sunday evening anything open late is going to be tough.
23:52:33 <int-e> EvanR: "unlucky" - I used tab-completion to write that nick
23:52:52 <int-e> but didn't check again when I had finished typing the message
23:53:32 <EvanR> libera haskell IRC perpetual blinking neon sign that says OPEN
23:53:58 <EvanR> ok maybe not blinking that would drive me nuts
23:54:55 <monochrom> Some neon signs blink because of malfunction and old age. We're in good hands. >:)
23:55:43 <EvanR> yeah not blinking VCR 12:00, but stochastic
23:57:46 <monochrom> I feel that we are just confronting the well-understood "parsing with `many foo` takes linear space and the constant multiplier is huge too".
23:58:55 <int-e> monochrom: I mostly agree. I just didn't understand that one particular allocation.

All times are in UTC on 2023-08-20.