Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2021-05-19 15:21:19 <kritzefitz> merijn, ok, yes. But under the assumption that code in the target context can be arbitrarily complex (just as TH currently allows) I don't see how you can actually execute that code, without fully emulating the target architecture. davean has made some arguments why it is theoretically possible to do so, but it still seems too complex to me to realistically implement in a compiler. But maybe I'm just lacking imagination there.
2021-05-19 15:21:22 machinedgod joins (~machinedg@135-23-192-217.cpe.pppoe.ca)
2021-05-19 15:21:31 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Client Quit)
2021-05-19 15:21:42 × timCF quits (~i.tkachuk@254-149-20-81.sta.estpak.ee) (Ping timeout: 252 seconds)
2021-05-19 15:21:52 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2021-05-19 15:21:54 chris__ joins (~chris@81.96.113.213)
2021-05-19 15:21:58 elfets joins (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de)
2021-05-19 15:22:11 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
2021-05-19 15:22:20 <davean> There are some unknowable things - like the result of gettime on the target for example, or calling an unknown syscall
2021-05-19 15:22:40 × ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 265 seconds)
2021-05-19 15:22:40 <davean> Many of said tihngs won't be stable on the target machine either
2021-05-19 15:23:19 <davean> kritzefitz: Haskell mostly allows a small bytecode - what we already use in ghci for example.
2021-05-19 15:23:33 × ddellac__ quits (~ddellacos@ool-44c73afa.dyn.optonline.net) (Ping timeout: 240 seconds)
2021-05-19 15:23:43 <davean> So a lot of the surface area of execution is fairly trivial - this is related to "basic blocks" a core concept in compiler code generation
2021-05-19 15:24:02 <davean> kritzefitz: you only have to emulate what the compiler knows, not arbitrary things in *general* though there are some holes.
2021-05-19 15:24:06 Gurkenglas joins (~Gurkengla@unaffiliated/gurkenglas)
2021-05-19 15:24:54 <davean> not all said holes work well definedly/repeatably *ever anywhere* though, this would be undefined behavior. If you're allowed to do said things or not is a design spec
2021-05-19 15:25:27 <davean> can you call arbitrary syscalls in TH? currently sure, what it means to do so could be called into question, or it could be disalowed
2021-05-19 15:25:40 <davean> Right now it *is* questionable what it means
2021-05-19 15:25:44 × Unode quits (~Unode@unaffiliated/unode) (Quit: Off it goes)
2021-05-19 15:26:10 Unode joins (~Unode@unaffiliated/unode)
2021-05-19 15:26:19 raoulb joins (~weechat@2a02:169:5:a:27e1:9f6b:7a17:d828)
2021-05-19 15:26:34 mouseghost is now known as desperek
2021-05-19 15:27:18 × raoulb quits (~weechat@2a02:169:5:a:27e1:9f6b:7a17:d828) (Client Quit)
2021-05-19 15:27:25 × SoF quits (~SoF@unaffiliated/skillyonfire) (Quit: Zzzz... Xxxx...)
2021-05-19 15:27:29 <kritzefitz> davean, I see. As long as you restrict certain things in TH you can relatively easily emulate the things you know about. And it's pretty obvious that some of those things already would have to be restricted anyway, since you obviously can't access e.g. the file system of the target machine.
2021-05-19 15:27:33 × star_cloud quits (~star_clou@ec2-52-11-151-184.us-west-2.compute.amazonaws.com) (Excess Flood)
2021-05-19 15:27:44 <davean> kritzefitz: oh but currently I do in my TH!
2021-05-19 15:27:51 <davean> Seriously, I do
2021-05-19 15:28:07 <kritzefitz> But you don't do cross-compilation, do you?
2021-05-19 15:28:17 <davean> not often
2021-05-19 15:28:21 <davean> but I could
2021-05-19 15:28:27 <kritzefitz> With TH?
2021-05-19 15:28:30 <davean> sure
2021-05-19 15:28:35 <kritzefitz> How do you do that?
2021-05-19 15:28:37 <carbolymer> I'm looking at waitQSem implementation and I'm wondering about this part:
2021-05-19 15:28:37 <carbolymer> (i,b1,b2) <- takeMVar m
2021-05-19 15:28:37 <carbolymer> if i == 0
2021-05-19 15:28:37 <carbolymer> then do
2021-05-19 15:28:37 <carbolymer> b <- newEmptyMVar
2021-05-19 15:28:38 <carbolymer> putMVar m (i, b1, b:b2)
2021-05-19 15:28:40 <carbolymer> so there's no transaction around that, so it's possible that between take and put, someone else will modify `m`, right?
2021-05-19 15:28:44 <davean> externel interpriter, IO
2021-05-19 15:28:54 <kritzefitz> Ah, right. You mentioned that earlier.
2021-05-19 15:28:59 <davean> kritzefitz: I mean its dumb and quesitonable
2021-05-19 15:29:06 <davean> And we can *just* access files
2021-05-19 15:29:08 <maerwald> do we have a syscall sandbox tool like https://github.com/larsuhartmann/sydbox
2021-05-19 15:30:04 <davean> kritzefitz: I'd *like* cabal files to have a list of what TH might access (though it might be the open world) or something. Or some spec, over "arbitrary IO"
2021-05-19 15:30:23 <davean> we don't
2021-05-19 15:30:26 <davean> we have "run IO"
2021-05-19 15:30:42 <kritzefitz> davean, At least it doesn't cover all use-cases of cross-compilation. For starters it only works if you have access to a suitable target machine, which doesn't have to be the case with traditional cross-compilation. But it's definitely better than nothing.
2021-05-19 15:30:43 <davean> I think you can come up with reasons this can be bad
2021-05-19 15:30:53 <davean> kritzefitz: absolutely.
2021-05-19 15:31:05 <davean> kritzefitz: cross compilation is of course a spectrum.
2021-05-19 15:31:15 <davean> kritzefitz: for example, what does it mean to cross compile libblass?
2021-05-19 15:31:21 <davean> er libblas
2021-05-19 15:31:32 _ht joins (~quassel@82-169-194-8.biz.kpn.net)
2021-05-19 15:31:58 <davean> Part of libblas' compilation is a benchmark suite that finds the optimal version *for the host*
2021-05-19 15:32:11 <davean> cross compiling a self-optimizing build? Ok, great, whats that even mean?
2021-05-19 15:32:27 <kritzefitz> Heh, right.
2021-05-19 15:32:47 SoF joins (~SoF@unaffiliated/skillyonfire)
2021-05-19 15:32:56 × SoF quits (~SoF@unaffiliated/skillyonfire) (Client Quit)
2021-05-19 15:33:08 raichoo joins (~raichoo@dslb-188-109-063-198.188.109.pools.vodafone-ip.de)
2021-05-19 15:33:42 star_cloud joins (~star_clou@ec2-52-11-151-184.us-west-2.compute.amazonaws.com)
2021-05-19 15:33:42 SoF joins (~SoF@unaffiliated/skillyonfire)
2021-05-19 15:34:08 <kritzefitz> davean: The scope for TH in cabal files sounds like it could be useful in various cases. Yes.
2021-05-19 15:34:15 ech joins (~user@gateway/tor-sasl/ech)
2021-05-19 15:34:34 <kritzefitz> davean, I still gotta do some other stuff. Thanks for explaining!
2021-05-19 15:34:42 <Philonous> carbolymer, I think the idea is that all actions on the QSem will try to take the MVar as the first step. So all other threads that try to work on it at the same time block
2021-05-19 15:35:04 × Qwerky quits (~qwerky@178.197.228.14) (Remote host closed the connection)
2021-05-19 15:35:08 <davean> kritzefitz: its an interesting discussion with plenty of nuance!
2021-05-19 15:35:12 <davean> It was a pleasure
2021-05-19 15:35:28 ep1ctetus joins (~epictetus@ip72-194-54-201.sb.sd.cox.net)
2021-05-19 15:35:33 <carbolymer> Philonous: makes sense
2021-05-19 15:36:24 × Unode quits (~Unode@unaffiliated/unode) (Quit: Off it goes)
2021-05-19 15:36:36 <Philonous> carbolymer, Also, QSem doesn't export its constructor, so you can't just write a new function that sneakily fills the MVar while another thread is working on it.
2021-05-19 15:36:53 kapil_ joins (~kapil@o-k.website)
2021-05-19 15:37:20 × raichoo quits (~raichoo@dslb-188-109-063-198.188.109.pools.vodafone-ip.de) (Client Quit)
2021-05-19 15:38:03 Unode joins (~Unode@unaffiliated/unode)
2021-05-19 15:39:16 jneira[m] joins (~jneira@107.red-176-87-16.dynamicip.rima-tde.net)
2021-05-19 15:39:22 SethTisue joins (sid14912@gateway/web/irccloud.com/x-wxerksagjbsypjgg)
2021-05-19 15:40:47 qwerty2o_ joins (~qwerty2o@89-138-23-24.bb.netvision.net.il)
2021-05-19 15:41:05 × dolio quits (~dolio@haskell/developer/dolio) (Quit: ZNC 1.8.2 - https://znc.in)
2021-05-19 15:41:59 dolio joins (~dolio@haskell/developer/dolio)
2021-05-19 15:42:27 magthe joins (~magthe@c83-252-48-230.bredband.tele2.se)
2021-05-19 15:42:49 coot joins (~coot@37.30.58.122.nat.umts.dynamic.t-mobile.pl)
2021-05-19 15:43:12 × magthe quits (~magthe@c83-252-48-230.bredband.tele2.se) (Client Quit)
2021-05-19 15:43:17 × dolio quits (~dolio@haskell/developer/dolio) (Client Quit)
2021-05-19 15:43:34 × star_cloud quits (~star_clou@ec2-52-11-151-184.us-west-2.compute.amazonaws.com) (Excess Flood)
2021-05-19 15:44:38 Matthias1 joins (~matthias@li890-22.members.linode.com)
2021-05-19 15:44:50 star_cloud joins (~star_clou@ec2-52-11-151-184.us-west-2.compute.amazonaws.com)
2021-05-19 15:46:11 × Matthias1 quits (~matthias@li890-22.members.linode.com) (Read error: Connection reset by peer)
2021-05-19 15:47:31 × maylee quits (~mayleesia@dynamic-078-055-186-201.78.55.pool.telefonica.de) (Quit: Leaving)
2021-05-19 15:48:46 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 265 seconds)
2021-05-19 15:49:00 twopoint718 joins (~cjw@fsf/member/twopoint718)
2021-05-19 15:50:36 <sclv> ok to make clear people are voting with their feet to move to https://libera.chat/ i'm going to leave this channel. i already deregistered my nick, and i'll probably be on smaller channels for a while here just as things migrate.
2021-05-19 15:50:37 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2021-05-19 15:50:38 <sclv> bye all!
2021-05-19 15:50:44 sclv parts (sid39734@haskell/developer/sclv) ()
2021-05-19 15:50:49 z0k joins (~user@101.50.108.132)

All times are in UTC.