Perl 6 - the future is here, just unevenly distributed

IRC log for #parrot, 2014-03-27

Parrot | source cross referenced

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

All times shown according to UTC.

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

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

Parrot | source cross referenced