Home liberachat/#haskell: Logs Calendar

Logs: liberachat/#haskell

←Prev  Next→ 1,803,025 events total
2021-07-19 18:22:54 × euouae quits (~euouae@user/euouae) (Quit: Client closed)
2021-07-19 18:23:34 × chris_ quits (~chris@81.96.113.213) (Ping timeout: 268 seconds)
2021-07-19 18:29:59 zeenk joins (~zeenk@2a02:2f04:a106:9600:82fb:aed9:ca9:38d3)
2021-07-19 18:30:19 × Topsi quits (~Tobias@dyndsl-095-033-024-196.ewe-ip-backbone.de) (Quit: Leaving.)
2021-07-19 18:31:29 pavonia joins (~user@user/siracusa)
2021-07-19 18:33:26 × zangi quits (~zangi@103.154.230.230) (Ping timeout: 252 seconds)
2021-07-19 18:33:29 Matthias1 joins (~Matthias1@cpe-76-170-236-166.socal.res.rr.com)
2021-07-19 18:34:55 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 250 seconds)
2021-07-19 18:35:30 chris_ joins (~chris@81.96.113.213)
2021-07-19 18:35:31 × chris_ quits (~chris@81.96.113.213) (Remote host closed the connection)
2021-07-19 18:36:29 dunkeln joins (~dunkeln@188.71.231.232)
2021-07-19 18:37:58 chris_ joins (~chris@81.96.113.213)
2021-07-19 18:38:46 × Null_A quits (~null_a@2601:645:8700:2290:34e6:e307:f490:7d07) (Remote host closed the connection)
2021-07-19 18:40:46 Obo joins (~roberto@70.pool90-171-81.dynamic.orange.es)
2021-07-19 18:41:58 × chris_ quits (~chris@81.96.113.213) (Remote host closed the connection)
2021-07-19 18:43:27 × matijja quits (~matijja@193.77.181.201) (Quit: ZNC 1.8.1 - https://znc.in)
2021-07-19 18:44:47 × fef quits (~thedawn@user/thedawn) (Quit: Leaving)
2021-07-19 18:44:49 matijja joins (~matijja@193.77.181.201)
2021-07-19 18:45:17 burnsidesLlama joins (~burnsides@dhcp168-011.wadham.ox.ac.uk)
2021-07-19 18:46:51 chris_ joins (~chris@81.96.113.213)
2021-07-19 18:51:27 × chris_ quits (~chris@81.96.113.213) (Ping timeout: 255 seconds)
2021-07-19 18:55:01 × dwt_ quits (~dwt_@c-98-200-58-177.hsd1.tx.comcast.net) (Ping timeout: 268 seconds)
2021-07-19 18:59:40 × Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 268 seconds)
2021-07-19 19:01:27 hseg joins (~gesh@185.120.126.10)
2021-07-19 19:01:36 dwt_ joins (~dwt_@c-98-200-58-177.hsd1.tx.comcast.net)
2021-07-19 19:02:31 euouae joins (~euouae@user/euouae)
2021-07-19 19:02:37 × gioyik quits (~gioyik@gateway/tor-sasl/gioyik) (Remote host closed the connection)
2021-07-19 19:02:41 h98 joins (~h98@187.83.249.216.dyn.smithville.net)
2021-07-19 19:03:36 gioyik joins (~gioyik@gateway/tor-sasl/gioyik)
2021-07-19 19:04:02 <euouae> Hello why am I getting a stack overflow for this? sum $ map f [T x y z | x<-xs, y<-xs, z<-xs ] where xs has 256 elements
2021-07-19 19:04:22 <euouae> and f calculates the area of the triangle with vertices x y and z
2021-07-19 19:04:25 <Hecate> euouae: stack or heap?
2021-07-19 19:04:34 <euouae> Says stack on Gucci
2021-07-19 19:04:36 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2021-07-19 19:04:37 <euouae> Ghci
2021-07-19 19:05:44 <davean> 256^3?
2021-07-19 19:05:47 <h98> 256^3 = 16,777,216
2021-07-19 19:05:57 <euouae> I was hoping that it wouldn’t have to expand a 256^3 list before summing
2021-07-19 19:06:03 <geekosaur> is this sum being foldl again?
2021-07-19 19:06:23 <euouae> Are you asking me?
2021-07-19 19:06:30 <geekosaur> no
2021-07-19 19:07:00 <hseg> hi. have this generator http://ix.io/3tqe, and I would like to generalize it so its input generators can depend on each other's results (i.e. want to be able to pass [a -> Gen a])
2021-07-19 19:07:11 <Rembane> euouae: What happens if you replace sum with foldr1 (+) ?
2021-07-19 19:07:20 <hseg> have tried just doing that, but it involves a lot of churn
2021-07-19 19:07:26 <hseg> is there a more mtl'y way of writing this that can help avoid this churn
2021-07-19 19:07:28 <hseg> ?
2021-07-19 19:07:46 × dwt_ quits (~dwt_@c-98-200-58-177.hsd1.tx.comcast.net) (Ping timeout: 246 seconds)
2021-07-19 19:08:18 <Hecate> euouae: until you're on the version of GHC that has sum strict without optimisations, please enable them when you do stuff like that, otherwise space leaks will knock at your door
2021-07-19 19:09:10 <geekosaur> well, you also have to be on a version of ghc which allows optiimization in ghci
2021-07-19 19:09:11 <euouae> Okay so 8.6.5 is old
2021-07-19 19:09:31 chris_ joins (~chris@81.96.113.213)
2021-07-19 19:09:45 <euouae> Rembane got same thing much later
2021-07-19 19:10:05 <Rembane> euouae: Got it!
2021-07-19 19:10:06 × chris_ quits (~chris@81.96.113.213) (Remote host closed the connection)
2021-07-19 19:10:09 <euouae> Ok I guess I have to enable optimizations
2021-07-19 19:10:13 <euouae> Got what ?
2021-07-19 19:10:23 <davean> foldr' (+) 0 instead of sum sohuld fix it also
2021-07-19 19:11:22 <davean> (That doesn't require optimizations)
2021-07-19 19:11:36 <maerwald> anyone good with libarchive? Do you have a guarantee that when reading list of archive entries that the first entry is the root folder (if any)?
2021-07-19 19:12:31 <davean> maerwald: I certainly can make a tar that thats not true of.
2021-07-19 19:12:37 × dunkeln quits (~dunkeln@188.71.231.232) (Ping timeout: 268 seconds)
2021-07-19 19:12:48 × juhp quits (~juhp@128.106.188.66) (Quit: juhp)
2021-07-19 19:12:54 <maerwald> yeah... I want to strip the root folder, but libarchive API doesn't have that
2021-07-19 19:12:59 <davean> libarchive would have to pre-read the entire tar to avoid it, at best
2021-07-19 19:13:01 juhp joins (~juhp@128.106.188.66)
2021-07-19 19:13:27 <geekosaur> and there are versions of tar that re-output a folder after its contents to allow the other end to more easily set mtime etc.
2021-07-19 19:13:38 × o1lo01ol1o quits (~o1lo01ol1@bl11-109-140.dsl.telepac.pt) (Remote host closed the connection)
2021-07-19 19:14:17 <maerwald> the alternative is to unpack as-is, make sure you're on the same device and then do an atomic move operation, stripping the root folder away
2021-07-19 19:14:24 <euouae> Davean also gives me stack overflow
2021-07-19 19:14:27 <maerwald> but on windows, any file operation is doomed to have locking issues
2021-07-19 19:14:28 × benin0369 quits (~benin@183.82.177.8) (Ping timeout: 268 seconds)
2021-07-19 19:14:46 <euouae> You might be able to hack libarchive
2021-07-19 19:14:51 <maerwald> no time
2021-07-19 19:15:17 chris_ joins (~chris@81.96.113.213)
2021-07-19 19:16:30 <davean> maerwald: Conceptually you'd have to do 2 passes over a tar for that, at best
2021-07-19 19:16:51 <maerwald> I think the idea would be to lazily read all entries... fmap over them and strip the root dir, lazily create a new tar archive from the entries and then lazily unpack it
2021-07-19 19:17:05 <davean> why create a new tar archive?
2021-07-19 19:17:07 <euouae> Man pages are outdated
2021-07-19 19:17:11 <davean> why not just process them as you unpack?
2021-07-19 19:17:14 <euouae> Maybe read the source code
2021-07-19 19:17:16 <maerwald> davean: there's no function to unpack from entries
2021-07-19 19:17:44 <h98> euouae did you try foldr (\x y -> (f x) + y) 0 [T x y z ....]?
2021-07-19 19:18:46 <euouae> Maerwald: seems related https://github.com/libarchive/libarchive/wiki/WishList#seek-in-archives
2021-07-19 19:19:05 <euouae> H98 would thy be better?
2021-07-19 19:19:23 <maerwald> euouae: the haskell bindings might not be exhaustive
2021-07-19 19:19:48 × chris_ quits (~chris@81.96.113.213) (Ping timeout: 255 seconds)
2021-07-19 19:19:53 <euouae> Yeah you’d have to make that but even then I’m painting to the fact that it’s on a wishlist maereald
2021-07-19 19:20:11 <maerwald> I'd have to write my own version of `toDisk :: Entry FilePath ByteString -> IO ()`
2021-07-19 19:20:19 <maerwald> which sounds trivial, but isn't
2021-07-19 19:20:39 <euouae> Go for a solution that isn’t efficient but works?
2021-07-19 19:20:46 <maerwald> hardlinks, softlinks, preserving file properties
2021-07-19 19:21:34 <euouae> H98 also gives stack overflow
2021-07-19 19:21:55 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2021-07-19 19:23:00 AWizzArd_ is now known as AWizzArd
2021-07-19 19:23:33 × AWizzArd quits (~code@gehrels.uberspace.de) (Changing host)
2021-07-19 19:23:33 AWizzArd joins (~code@user/awizzard)
2021-07-19 19:24:05 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2021-07-19 19:24:10 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-07-19 19:27:21 <euouae> So the issue is ghci being silly right
2021-07-19 19:27:28 dwt_ joins (~dwt_@c-98-200-58-177.hsd1.tx.comcast.net)

All times are in UTC.