Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2015-05-12

| Channels | #moarvm index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:02 timotimo the changes seem to happen almost exclusively in the regex engine
00:02 timotimo the test file i'm using only triggers it a lot because it's so much perl6 code it wants to parse during startup
00:02 timotimo so i'll have a look at how it changes the core setting compilation
01:07 colomon joined #moarvm
01:18 oetiker joined #moarvm
02:45 dalek MoarVM: cc20af6 | timotimo++ | src/jit/emit_x64.dasc:
02:45 dalek MoarVM: more compact jit for add, sub, bor, band and bxor
02:45 dalek MoarVM:
02:45 dalek MoarVM: those can load the argument from the stack and do the
02:45 dalek MoarVM: instruction in-memory ("in-place"), leading to smaller
02:45 dalek MoarVM: code (one mov saved)
02:45 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/cc20af6466
03:18 tadzik joined #moarvm
03:39 agentzh_ joined #moarvm
04:00 agentzh_ joined #moarvm
05:03 agentzh_ joined #moarvm
05:34 FROGGS[mobile] joined #moarvm
07:06 FROGGS joined #moarvm
07:08 rurban joined #moarvm
07:09 zakharyas joined #moarvm
07:12 Ven joined #moarvm
07:30 Ven joined #moarvm
07:50 lizmat joined #moarvm
08:24 Ven joined #moarvm
08:48 Ven joined #moarvm
08:51 agentzh_ joined #moarvm
09:19 Ven joined #moarvm
09:49 Ven joined #moarvm
10:45 Ven joined #moarvm
10:58 Ven joined #moarvm
11:18 timotimo right now i'm thinking perhaps a few more places could be made to use accumulator-in-memory addition/subtraction/... if we shuffle some "set" instructions around more carefully in spesh
11:23 brrt joined #moarvm
11:23 brrt \o
11:23 brrt timotimo++ :-) patch works well
11:23 timotimo cool :)
11:24 timotimo but i'm afraid, if the code just turns a "add 1 2 3; set 2 1" into an "add 2 2 3; set 1 2", it won't save much
11:24 timotimo well, it'll still save a mov all in all
11:24 timotimo so i guess that's nice
11:25 brrt yeah, it is
11:26 brrt its probably a very very minor win, but still cool
11:27 timotimo i think i need to run the core setting compilation through cachegrind 10 times before and after to get a reliable comparison ...
11:28 brrt :-) right
11:29 brrt but it doesn't hurt, for one thing
11:29 timotimo looking at just the "bytecode size" lines, there's some visible difference, but all in all it's very, very small
11:29 timotimo however, that doesn't factor in what gets run how often
11:30 timotimo that's why i cachegrind
11:34 brrt right
11:46 agentzh_ joined #moarvm
12:01 colomon joined #moarvm
12:23 Ven joined #moarvm
12:48 agentzh_ joined #moarvm
13:22 hoelzro since panda will install .so files into $INSTALL_DIR/share/perl6/site/lib, would it make sense to add that directory to the executable's rpath/runpath so that dlopen() can find the .so files installed there?
13:23 tadzik yes
13:23 tadzik I can't think of any reason why that's not a good idea
13:27 FROGGS we would have to do that in the wrapper scripts I think
13:29 nwc10 ideally we'd use a linker option to add to it.
13:29 nwc10 umm. yes. um.
13:29 nwc10 at MoarVM build time.
13:29 nwc10 OK.
13:29 FROGGS nwc10: see
13:29 nwc10 yet another reason for wanting fakecutables.
13:30 timotimo yes
13:30 * hoelzro thinks of what that would mean for the JVM
13:30 timotimo if we want perl6 to shine at ludum dare, we want fakecutables
13:30 timotimo ideally, fakecutables that you can also build for the windows backend from a unix box and vice versa
13:30 timotimo and osx, too
13:31 hoelzro sorry, fakecutables?
13:32 FROGGS an executable that invokes moar with moarvm bytecode
13:32 timotimo a single executable that contains a moarvm, the code you're running as well as libraries, apparently
13:32 FROGGS like 'perl6 -MFoo myscript.pl' compiled to a myscript.exe
13:33 hoelzro ahhhh
13:33 hoelzro I was thinking about something like that; I was going to call it sixpack =)
13:33 FROGGS and that one contains an ELF binary, but also moarvm bytecode (the latter makes it fake but cute)
13:33 hoelzro heh
13:33 agentzh_ joined #moarvm
13:34 nwc10 I think, mininally and least ambiguously, a single executable that contains all the functionality of the wrapper scripts that we generate, such as perl6-m, and (preferably, but technically not absolutely necessary) also contains (at least) the first bytecode file that the wrapper loads
13:34 timotimo fwiw, zip archives have their "header" at the very end of the file, and all the values are relative, afaik
13:34 nwc10 timotimo: indeed
13:34 timotimo so you can just cat a zip archive to the end of an exe file, because the executables will look at the beginning only
13:34 timotimo or something like that
13:34 timotimo that's how the python people make it
13:35 nwc10 yes, but IIRC ideally you then fix up the zip central directory file offsets
13:35 nwc10 (to stop any tools warning)
13:35 timotimo ah, ok
13:35 timotimo gotta run now/soon
13:35 nwc10 and if you're feeling like poor quality steganography, you could also hide stuff between files within the zip file
13:46 jnthn hoelzro++ # 6pack :D
13:47 hoelzro feel free to use the name =)
13:47 jnthn no no, feel free to implement it! :P
13:48 hoelzro I'll see what I can do =)
14:36 Ven joined #moarvm
14:44 Ven joined #moarvm
15:20 agentzh_ joined #moarvm
16:23 FROGGS[mobile] joined #moarvm
16:35 agentzh_ joined #moarvm
17:13 FROGGS joined #moarvm
17:56 vendethiel joined #moarvm
18:47 FROGGS[mobile] joined #moarvm
19:14 dalek MoarVM/cunion: 8a2504f | FROGGS++ | / (13 files):
19:14 dalek MoarVM/cunion: add support for CUnion repr
19:14 dalek MoarVM/cunion: review: https://github.com/MoarVM/MoarVM/commit/8a2504f8a3
19:15 timotimo ooh
19:16 FROGGS I just reapplied the union branch to master and pushed to this new branch
19:17 masak a CUnion, is that like mermen, mermaids and sea monsters going on strike now and then?
19:18 * masak .oO( "equal pay for equal work! no more under-the-water deals!" )
19:18 timotimo ok
19:19 FROGGS timotimo: though I hope to make into next week's weekly :o)
19:22 timotimo that'd be nice
19:22 timotimo do we have anything for making inlined sized arrays doable?
19:24 FROGGS[mobile]2 joined #moarvm
19:25 brrt joined #moarvm
19:25 brrt fakexecutable are a really good topic for a hackathon
19:26 brrt many different objectives and solutions
19:26 brrt relatively easy doable in a weekend, too
19:26 timotimo hahaha
19:26 timotimo you're funny
19:28 brrt why?
19:28 timotimo many people have tried
19:28 brrt ok, what makes you think it can't be done in a weekend, provided you have some consensus on what you want
19:28 timotimo i don't know, tbh
19:29 timotimo i didn't try doing it yet
19:29 brrt the python way of fakexcecutable is very different from what nwc10 just mentioned, which is relatively easily doable
19:29 brrt in fact...
19:30 brrt the python way isnt very difficult, strictly speaking, either
19:30 hoelzro brrt: how does python do it?
19:30 brrt i think timotimo mentioned it :-)
19:31 brrt http://irclog.perlgeek.de/moarvm/2015-05-12#i_10589168
19:31 timotimo right, there's something that puts the python.exe "at the start" and finishes the file with a zipfile that the import statement knows how to load stuff from
19:32 * brrt nods
19:33 brrt and if you can rig the moar executable to detect this situation and load from the zip archive, well, you're golden
19:33 hoelzro ah ha
19:33 brrt on of my main difficulties is: do you want to require a c compiler and/or linker, or not
19:33 hoelzro on the target system?
19:33 brrt because in the latter case you can even link to libmoar.so
19:33 brrt on the builder system
19:34 brrt (actually libmoar.a)
19:34 hoelzro I think I would require a build env on the building system
19:34 hoelzro at least to start
19:35 brrt but my point is, that suggests a very different set of solutions from the case where you do not
19:35 hoelzro indeed
19:35 brrt well, that does mean that 90% of windows users won't be able to *make* fakexecutables even if they have perl6 installed
19:35 brrt and you can plausibly hack around it
19:35 hoelzro if I end up making this (which I probably won't), I would target Linux first
19:36 hoelzro Windows (w/o a build system) would be a bonus
19:37 brrt well, i'd think windows users would be the most common target, and then macs, and only then linux
19:37 brrt linux folks have containers these days
19:37 hoelzro sure
19:37 hoelzro linux would be my first target because I know it =)
19:37 hoelzro more of a POC
19:38 brrt faiir enough, and no pressure
19:38 brrt but that's why i'd say it's a good hackathon topic
19:38 hoelzro it is!
19:38 brrt because then you can discuss
19:38 brrt bbiab
20:12 rurban joined #moarvm
20:25 cygx joined #moarvm
20:25 cygx o/
20:26 FROGGS hi cygx
20:26 cygx hoelzro: brrt: I already made an nqp fakecutable some time ago ( https://gist.github.com/cygx/f7eb20d6c73294f72245 ), embedding the .moarvm files via the linker
20:26 hoelzro cygx: nice
20:26 FROGGS and brrt attempted it and me also :o)
20:26 cygx but to work for Perl6 modules, you'll probably have to hack the ModuleLoader
20:27 FROGGS correct
20:27 FROGGS though, we CompUnitRepos now, so we can do more these days
20:27 cygx I'm probably not tackling that any time soon
20:28 cygx but what I'm actually planning to do is create a single, standalone MoarVM+NQP+Rakudo binary
20:31 cygx if someone does get around to implementing Perl6-level fakecutables, it wouldn't be too hard to throw in TinyCC as well
20:32 cygx that way, windows users wouldn't need their own toolchain
20:36 japhb FROGGS: It occurs to me that it would be a useful test of whether the CUR design/API is sufficiently flexible
20:36 hoelzro I don't care if someone else does it, I just really want the name 6pack to be used =)
20:38 FROGGS japhb: aye, problem is that time on earth is limited for me :S
20:39 japhb FROGGS: So do all your programming on plane flights?
20:39 FROGGS to save a handful seconds?
20:40 FROGGS but the api should be good enough, given we can load stuff from json blobs
20:42 brrt joined #moarvm
20:43 brrt cygx: that actually looks quite a bit like my own design, although i embedded the binaries in a header file rather than using a linker
20:46 cygx brrt: in my next iteration, I'm going to just hotpatch the object files
20:47 brrt many wow
20:47 brrt all in perl6, i suppose :-P
20:48 cygx brrt: there's no wow involved - just a unique string that I can find and replace
20:49 brrt hmm, right, hadn't thought about it that way
21:00 brrt wat: https://dresden-pm.github.io/gpw2015/html/talks/VmStatus.html#28
21:00 brrt jits are not a 100% performance win
21:00 brrt not even an idea how much sense that would make
21:01 Peter_R joined #moarvm
21:02 timotimo brrt: don't underestimate rurban
21:02 timotimo also, steal his ideas after he's implemented the things :)
21:02 brrt ah, that's rurbans talk then
21:02 timotimo aye
21:02 brrt that explains a lot
21:02 cygx brrt: 100% performance win could mean double its speed
21:03 timotimo that's what's meant, yeah
21:03 brrt ugh.... that.... kind of language-quantitive thing makes my head hurt
21:03 brrt but fair enough
21:03 timotimo hm?
21:03 brrt ... and that's not ambitious enough :-P
21:04 brrt it's like 90% efficiency or a 4,2 coefficient of performance etc...
21:05 brrt specificallly, 100% performance implies 'the most you could possibly get out of it'
21:06 japhb brrt: Are you allowed a nondeterministic oracle?
21:06 japhb ;-)
21:07 timotimo ah, now i understand what you mean
21:07 * brrt is not entirely getting the joke possibly due to a language barrier
21:07 brrt performance is a vague, nonsensical term
21:08 brrt (i have so many blog posts still to write :-o i still have to kill the myth of the elegant direct threaded interpreter)
21:10 brrt japhb: oh i get it :-)
21:15 * brrt is tired :-(
21:15 brrt see you tomorrow
21:19 * cygx is going to leave as well
21:19 cygx bye o/
21:19 cygx left #moarvm
21:24 Peter_R joined #moarvm
21:31 Peter_R joined #moarvm

| Channels | #moarvm index | Today | | Search | Google Search | Plain-Text | summary