Parrot 6.2.0 "Imperial Amazon" | parrot.org/ | Log: irclog.perlgeek.de/parrot | #parrotsketch meeting Tuesday 19:30 UTC
Set by moderator on 19 March 2014.
01:21 cooper joined 02:03 rurban1 joined 02:05 rurban2 joined 02:15 rurban1 joined 06:47 zby_home joined 07:25 denisboyun joined 08:08 FROGGS joined 08:36 FROGGS joined 09:13 Nicholas joined 09:14 Nicholas left 09:35 he joined 10:50 FROGGS joined 11:18 woolfy joined 11:35 denis_boyun joined 13:56 bluescreen joined 14:28 punter joined
punter i'm beginning to learn perl 6. Is Parrot or Rakudo the thing I should install? 14:31
PerlJam punter: Parrot is a VM, Rakudo is a Perl 6.
punter: Rakudo supports several backend VMs, parrot is one of those. 14:32
punter I see
FROGGS punter: download rakudo (or rakudo star, which contains modules too), and configure it
in the configure line you can choose to build for parrot backend and/or jvm and/or moarvm 14:33
PerlJam punter: see rakudo.org for links to the latest release
FROGGS like in: perl Configure.pl --backends=parrot,jvm,moar --gen-parrot --gen-moar --make-install 14:34
punter Ok, I have Rakudo running with some system I don't remember by heart. I'll keep it this way for now.
FROGGS :o)
punter I wrote a few scripts, even. 14:35
I'm surprised there's no Perl6 channel on MagNET
PerlJam punter: Also, see #perl6 on freenode
:)
FROGGS #perl6 in freenode
punter thanks
So, with Parrot, will we one day be able to write JavaScript snippets inside our Perl programs? 14:36
or use JS libs from Perl? 14:37
FROGGS if somebody would spent enough time to implement JS in parrot... but I doubt that
on the other hand there was a GSoC project to glue the rakudo to a JS backend, and that is very far 14:38
so maybe this way
15:26 rurban1 joined 15:32 bluescreen joined 16:30 punter_ joined 17:41 Psyche^ joined 17:49 denisboyun_ joined 18:08 FROGGS joined 18:13 punter joined 18:19 bluescreen_ joined 18:27 rurban1 joined 18:28 Chirag joined 18:44 jsut joined 18:46 FROGGS joined
Chirag Hey! I was wondering if there is another channel for GSoC? 18:53
Coke #soc-help 19:03
Chirag thanks! :) 19:05
rurban Chirag: You can check out my rurban/pmc2c_orig branch. I already did half of the work 19:21
I know that you are not that good in perl, that's why
Chirag wow! i'll do that right away! 19:22
rurban And I have some ideas how to add the missing GC write barriers to the ops
Chirag Perl seems easy.. I am sure I can pick it up quickly 19:23
rurban Yeah, but the pmc2c compiler is a bit tricky. You can try ti fix the rest in the compiler. You need to check the return lines. if how many, if in a block, ... 19:26
every return needs a write barrier 19:27
Chirag this is associated with our original problem of having too many pmcs returned.. right? 19:31
rurban no. this is one of the unnecessarily nested method calls 19:32
only a vere small optimization. but it affects also the fast path 19:33
too many PMCs is in the PCC (CallContext)
Chirag oh..
19:41 TonyC_ joined
Chirag What are UNUSED(INTERP) and UNUSED(SELF)? 19:49
PerlJam they are unused :) 20:00
rurban in ops, they are markers for the ops compiler to SHIM the args 20:01
Now what is SHIM? :)
Chirag ? 20:02
rurban SHIM tells the compiler that those args are unused (via __attribute__unused__) 20:03
Chirag oh.. so the GC can free them? 20:04
rurban # define __attribute__unused__ __attribute__((__unused__))
well, the compiler can ignore them if possible
it's an optional trait
in non-ops UNUSED is a wrapper around noise to fool the compiler that this variable is used. It costs some cycles 20:05
in non-ops it mainly policy to keep the warnings happy
if we have too many warnings we miss the important ones. so we try to be warnings free (almost -Werror) 20:06
so SHIM_INTERP is SHIM(INTERP) which is interp __attribute__((__unused__)) 20:07
see also ASSERT_ARGS which are generated automatically via make headerizer to update the header and cc argument checks 20:08
Chirag ok.. 20:09
rurban This is a pretty cool system the others don't use, so their code quality is worse than ours. But we don't annotate concurrency or blocking behavior for the threading system yet. QEMU is a bit better there 20:10
(cil and gabriel.kerneis.info/software/cpc/ are the more advanced QEMU tricks) 20:14
Chirag parrot plans to create threads in the future? 20:17
rurban parrot has very nice threads already 20:18
Chirag so whats not concurrent?
rurban better than most other languages. they scale up to the number of physical CPU core linearily
ie "non-blocking"
but most perl6 people don't understand it yet 20:19
Coke *eyeroll*
Chirag non-blocking as in one thread has no control over the other?
rurban there's one master which controls a thread pool 20:20
dngor Dynamically allocated VM pipelines?
rurban read access to foreign vars is non-blocking
write access is only via the owner via deferred async calls
the thread-pool is pre-allocated 20:21
all access to foreign vars is via automatically created proxies
each gc in a thread sees only its own vars 20:22
Chirag so blocking may be introduced to lock reading a foreign var?
rurban See parrot.org/news/parrot-threads-perl...dar-day-11 20:23
not blocking, just wait
Chirag till its being written..
rurban the writer needs to create an async call to write and needs to wait until this prioritized scheduled task is executed.
20:25 brrt joined
Chirag understood.. 20:25
20:25 brrt left
rurban so we don't pass copies of vars around, and we don't do messaging, but still have similar performance 20:26
in moarvm they block all objects, arrays and hashes on every write 20:27
like in mysql: read-only is fast
Chirag yeah 20:28
rurban in perl5 they link all data at shared thread initialization, which is very slow.
parrot is more like postgresql with a concurrent writer backend doing the updates 20:31
Chirag: And reading a foreign var is non-blocking, even if someone else is writing to it. 20:33
Only the owner may write, so it's always consistent and non-blocking
Chirag thats the problem
it should be locked right>
? 20:34
rurban Our limitation is that a subtask may not create other tasks. Only main may create other tasks
No, we do without locking.
only owner may write, everybody may read
Chirag oh
makes sense
rurban only moarvm and other conventional languages do locking 20:35
Chirag why can't a subtask fork another thread?
rurban modern vms, like erlang, parrot or clojure do without. but all are different
The subtask porblem is described here: lists.parrot.org/pipermail/parrot-d...07295.html 20:36
But this is not a major problem and can be implemented. 20:37
erlang does message passing, immutable values only accross threads. clojure does efficient shared sub datastructures on updates. each thread sees only their manipulated version, which shares the common parts 20:39
go is like erlang
20:40 zby_home joined
rurban parrot can works with references (true shared vars) but limits access of non-atomic vars through proxies and only-owner-may-write 20:40
Chirag ok..
rurban sorry for my typos 20:41
Chirag really interesting .. that link 20:42
typos.. where? :D 20:43
rurban can works
what I meant about blocking behaviour above (with annotations) is for the IO subsystem. if the call waits for the recipient or not 20:44
Non-blocking IO is best done via async events, but not native threads 20:45
Chirag oh .. i first thought only blocking access to the data 20:47
rurban native threads (we call them tasks) are best used for CPU intensive or parallelizable work
thanksfully we don't block on data, only in network waits
and our scheduler is preemptive 20:48
Chirag for async
rurban mostly for alarm, sleep and shared var updates yet 20:49
we don't have async IO yet
Chirag you had mentioned ASSERT_ARGS... how is it related to GC? just to check if used or unused? 20:50
rurban not at all
ASSERT_ARGS is just for compiler checks 20:51
Chirag what does it assert?
rurban All optional argument type annotations 20:52
Chirag oh.. 20:53
rurban see lib/Parrot/Headerizer/Functions.pm 20:54
ARGIN|ARGOUT|ARGMOD|ARGFREE_NOTNULL|NOTNULL 20:55
and for the return type: PARROT_CAN_RETURN_NULL, PARROT_CANNOT_RETURN_NULL and so on 20:56
PARROT_IGNORABLE_RESULT, PARROT_WARN_UNUSED_RESULT, PARROT_PURE_FUNCTION, PARROT_CONST_FUNCTION 20:57
see include/parrot/compiler.h for those
Chirag alright.. will do 20:58
rurban the headerizer is a perl script which creates the ASSERTS for the headers, the return types are understood directly by the C compiler
Chirag one last question.. i havent included the write barrier TODO list in my proposal.. I cant change it now? 21:00
rurban Not important. It's just a side-step in the better pmc generation 21:03
Chirag ohk..
rurban We can generate better pmc methods and moving the GC write barrier directly into the method is the technical trick
so we can avoid one function call 21:04
Chirag neat!
rurban that's the easiest goal to achieve. improving fill_params is the other. we would be happy with that 21:05
I also started with a nice benchmarking suite for you. linux perf stat
I already have some numbers from 1.8 to 6.2 21:06
Chirag cachegrind?
rurban perf stat. cachegrind is for manually inspecting what could be wrong.
Chirag ok.. i ll install it 21:07
rurban I'll put that into a seperate repo, because it needs to run with older parrots also
perf needs to match your kernel
perf stat -r4 ../run-bench.sh >/dev/null 2>> ../log.bench 21:08
and run-bench runs some known to work pir scripts
Chirag i ll do that 21:09
rurban I haven't published the scripts yet 21:10
I wanted to add a gnuplot script also, and some post-processors
Chirag oh.. i ll wait
i ll leave now.. 21:12
bye! :)
rurban Util: Can you create a parrot-bench repo for me? I have insufficient perms 21:14
Coke I might be able to.
rurban I'll do at rurban/parrot-bench 21:15
Coke parrot/parrot-bench or parrot/bench ?
rurban parrot/parrot-bench
Coke do you want me to init the repo or leave it empty?
rurban empty is ok 21:16
Coke github.com/parrot/parrot-bench
rurban ERROR: Permission to parrot/parrot-bench.git denied to rurban 21:17
Coke try again? 21:19
(added parrot/developers as collaborators on that project) 21:22
heading out. I'll try to check in again when I get home.
rurban better, thanks 21:23
github.com/parrot/parrot-bench 21:30
I had a pretty high load for those benchmarks, as I use this machine for smoking and VMs also 21:32
22:05 rurban1 joined 22:07 rurban2 joined
rurban I'll add faster and better hash to parrot: github.com/rurban/smhasher 22:23
22:29 mirjam joined 22:30 mirjam left 22:41 rurban1 joined 23:01 sorear joined 23:12 rurban1 joined 23:14 rurban2 joined