Perl 6 - the future is here, just unevenly distributed

IRC log for #parrot, 2014-04-23

Parrot | source cross referenced

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

All times shown according to UTC.

Time Nick Message
01:23 FROGGS_ joined #parrot
02:01 particle joined #parrot
02:39 rurban1 joined #parrot
02:42 cooper joined #parrot
02:44 rurban2 joined #parrot
03:48 plobsing joined #parrot
04:31 Psyche^ joined #parrot
05:50 rurban1 joined #parrot
05:52 rurban2 joined #parrot
06:53 rurban1 joined #parrot
07:53 rurban1 joined #parrot
08:07 particle joined #parrot
08:49 basiliscos joined #parrot
08:54 rurban1 joined #parrot
08:54 FROGGS joined #parrot
09:55 rurban1 joined #parrot
10:56 rurban1 joined #parrot
11:56 rurban1 joined #parrot
12:57 rurban1 joined #parrot
13:39 bluescreen joined #parrot
13:49 bluescreen_ joined #parrot
13:58 rurban1 joined #parrot
14:15 rurban1 joined #parrot
14:23 particle joined #parrot
14:58 me joined #parrot
15:14 me Hi, is there interest in rewriting the parrot/tools in pir or pasm ?
15:15 FROGGS me: hi
15:15 FROGGS me: what could be the reason to do that?
15:17 FROGGS I mean, my guess is that at least some of them are used to build parrot, so you would have a bootstrapping problem if these were not Perl 5 scripts anymore
15:18 me more streamlined development environment. Ive been tinkering with parrot and I noticed I had to jump through a few hoops to dabble with the pct. ie, i had to install strawberry perl.
15:18 FROGGS I see
15:18 me i thought it might be nice if you could do it all from within parrot itself
15:18 FROGGS but as I said, you can only rewrite scripts that are not used to build parrot
15:19 rurban there was interest, and it was an explicit goal once, yes.
15:20 rurban ops2c for example was previously perl5, and is now nqp. This turned out to be bad.
15:20 me maybe I will start with a few dev tools like make_language, and bring my progress to parrot
15:20 rurban make_language should be easy, yes.
15:21 me awesome, i thought id ask here before i started.
15:21 FROGGS me: but anyway, I do not think you can come around installing a Perl 5... you'll need to run Configure.PL at least :o)
15:22 me yea, i will start with the easy stuff, make_language seemed simple and self contained
15:22 FROGGS me: have fun
15:22 FROGGS brb &
15:23 rurban but we rather need better examples, benchmarks and tests if you want to learn pir. pasm is deprecated.
15:23 rurban or pir libraries, like semaphores or threaded hyper-op helpers for perl6
15:24 rurban the tools are pretty hard to maintain in pir/nqp. perl5 is usually easier
15:24 me im interested in seeing golang on parrot
15:24 rurban that would a good lang to target, yes
15:25 rurban go or rust or elixir or D
15:25 me these small project will get me familiar with parrot
15:26 me running golang on parrot would be nice, golang has very little supported platforms
15:27 rurban because they have their own compiler and linker. but now they got gccgo back in
15:29 rurban golang would be a good fit, because of select and channels. moarvm did the same recently but they still have their lock based threading model, while parrot data structures need no locks
15:29 rurban we need to defer writes to the owner, which is a different kind of beast. but fits better to golang
15:31 bluescreen joined #parrot
15:31 me ok, I will get my feet wet with the dev tools rewrites, and learn more about parrot. I might take up the golang challenge.
15:32 rurban :) the parser and compiler will be easy and fun. but the lib support is not that easy then. parrots idea was to share lib code accross languages (as in .net). but we are still lacking
15:33 rurban I'm not so happy with dev/tools rewrites btw.
15:35 me Why?
15:36 me I thought it would be nice to have the dev tools written in a langauge the vm understood.
15:36 rurban nice yes, but maintaining perl5 tools is even nicer. we still have no dev tools to deal with pir code. no debugger
15:37 rurban missing libraries
15:37 rurban refactoring previous tools from perl5 to pir turned out bad for parrot (jit, ops2c)
15:38 rurban just saying that it is not the best idea
15:40 me oh, seemed like a cool project that I could use to get myself familiar with parrot, rewriting one tool at a time, and maybe even digging deeper into the core of parrot
15:44 me I will take what you said into consideration and rethink my approach to learning parrot. thanks for responding.
15:47 rurban :)
15:48 rurban but converting make_language is not a problem. would be an easy enough project and we don't care that much about it
15:49 me a few tools are self contained, so it shouldn't be a big deal.
15:50 rurban we were considering removing our old nqp-rx and use the new upstream one, but we have now tools requiring it.
15:54 Chirag joined #parrot
16:00 Chirag Hey!
16:00 Chirag I am trying to add WBs to arrayiterator.pmc but I am not sure if I am doing it right..
16:00 Chirag For instance, I changed
16:00 Chirag VTABLE FLOATVAL pop_float() {
16:00 Chirag -----
16:00 Chirag SET_ATTR_pos(INTERP, SELF, --pos);
16:00 Chirag return VTABLE_get_number_keyed_int(INTERP, array, pos);
16:00 Chirag }
16:01 Chirag to -->
16:01 Chirag VTABLE FLOATVAL pop_float() {
16:01 Chirag -----
16:01 Chirag SET_ATTR_pos(INTERP, SELF, --pos);
16:01 Chirag PARROT_GC_WRITE_BARRIER(interp, _self);
16:01 Chirag arrayiterator.c gets updated accordingly but 'make' still shows TODO GC WB to pop_float
16:01 Chirag Where am I going wrong?
16:03 rurban Because you need to change the pmc2c compiler to omit that warning if you see that the WB is already there :)
16:03 rurban I just added that warning, but the code is not complete nor correct yet
16:04 Chirag oh.. I was expecting it to magically disappear :D
16:04 rurban ah, and write SELF instead of _self in .pmc files
16:04 rurban :)
16:04 Chirag and INTERP
16:04 Chirag right?
16:06 FROGGS joined #parrot
16:14 rurban yes
16:14 Chirag rurban: how to change the pmc2c compiler?
16:14 Chirag to omit the warning?
16:17 rurban look at the code, and my changes to pmc2c in the branch
16:18 Chirag ok..
16:33 rurban see # Skip methods with manual WBs.
16:33 rurban next if $self->vtable_method_has_manual_wb($name);
16:35 rurban so we can add manual :manual_wb attributes to each method. see capture.pmc and fixedintegerarray.pmc
16:36 rurban or we can parse for PARROT_GC_WRITE_BARRIER in the body
16:36 rurban and set $method->attrs->{manual_wb} then
16:38 Chirag ok.. i was going through  pmc2c/emitter.pm .. but that todo warning is for all the pmc files .. I ll try what you have suggested
16:40 rurban add_write_barrier is wrong. it should really use rewrite_RETURNS
16:40 rurban I'll clean it up a bit
16:46 rurban `git grep RETURN\( src/pmc` shows the already correct code which can get WB automatically
16:47 rurban lower case return not
16:50 Chirag should I make all the ones i edit - manual >
16:51 Chirag ?
16:53 rurban wait a bit. I'll improve pmc2s
16:54 rurban You can add manual WB where needed, and pmc2c will pick it up. If not, and you use RETURN() pmc2c will WB it automatically
16:54 bluescreen joined #parrot
17:13 rurban and be sure to make clean before make, because the pmc vtables are cached.
17:13 Chirag I think I am missing a trick here..
17:14 Chirag according to me, I have two alternatives - automatic or manual WB
17:14 Chirag 1. automatic does not require me to add "PARROT_GC_WRITE_BARRIER(INTERP, SELF);" or "manual_wb"
17:14 Chirag "RETURN(VTABLE_get_number_keyed_int(INTERP, array, pos));" should suffice
17:14 Chirag 2. manual would look like -
17:14 Chirag VTABLE FLOATVAL pop_float():manual_wb {
17:14 Chirag }
17:15 rurban 3rd case: manual by simply adding a PARROT_GC_WRITE_BARRIER or /* no PARROT_GC_WRITE_BARRIER
17:15 rurban I'm just coding this one
17:15 Chirag so i have got that right?
17:16 rurban RETURN did only work for PCCMETHOD's, I'll add support for all method types now
17:16 rurban yes
17:16 rurban exactly
17:17 Chirag but the first case doesnt get rid of the TODO warning and the second case throws an error of RETURN being an implicit declaration
17:17 Chirag oh only PCC methods
17:17 rurban extra work is only needed for cases without manual PARROT_GC_WRITE_BARRIER yet, and with multiple returns, or where the single last return bla needs a WB
17:18 rurban current work: https://gist.github.com/rurban/11224739
17:19 Chirag but why is the first case not getting rid of the warning?
17:19 rurban the warning is wrong
17:20 Chirag oh..
17:29 rurban and add_write_barrier is also wrong
17:50 rurban1 joined #parrot
17:52 rurban2 joined #parrot
17:55 benabik joined #parrot
18:01 Coke eliminating in-repo tools that require nqp-rx is probably a good idea, esp. since we have another language written for parrot that we ship. We should probably standardize on that one. (And anything that happens post-build that is currently using perl5 could be switched to be written in that lang also. It's just the stuff that happens pre-build that's tricky)
18:01 Coke (^^ from deep in backlog)
18:36 rurban1 joined #parrot
19:15 Chirag rurban: In default.pmc, there are no pop_float, pop_integer ... functions;
19:15 Chirag but default.c has them
19:17 Chirag Where do I put the write barriers? there are no values returning for any function
19:37 rurban default needs none I guess
19:39 rurban well, a few: add_method, assign_pmc, and the arithmetic methods which return PMCs
19:40 rurban divide
19:40 rurban the other methods are auto-generated by pmc2c
19:41 rurban because default and undef are fallbacks
19:48 bluescreen joined #parrot
19:54 Chirag so i ll just ignore the TODO warnings for them
19:55 rurban yes. I added a new :no_wb attribute in my gist
19:55 rurban :manual_wb if the WB is hidden in a macro (like capture)
19:56 rurban :no_wb if no WB is needed at all
19:57 Chirag I have used manual_wb even if its  not hidden
19:57 rurban yeah, but we could remove it when the compilers sees the WB
19:58 cooper joined #parrot
19:58 Chirag I have pushed two commits till now .. can u please take a look to see if i am doing it right?
20:01 rurban well, for arrayiterator.pmc the :manual_wb's are not really needed. we just need to improve pmc2c. the WB look good
20:02 rurban same for callcontext.pmc
20:03 Chirag so i ll remove manual_wb from all of them?
20:04 rurban yes, it's too much noise
20:04 Chirag alright so manual .. only when WB is hidden
20:04 rurban or :no_wb when no WB is needed
20:05 Chirag so that would be for all the remaining functions ..
20:06 rurban yes
20:06 rurban all which do not create a new PMC
20:07 rurban with pointers to the old one
20:07 rurban so simple INTVAL, FLOATVAL, STRING are safe without
20:07 rurban this will speed up our methods measurably
20:08 Chirag i cant update my branch with your changes now?
20:09 rurban see e.g. for glossary http://www.iecc.com/gclist/GC-algorithms.html
20:09 rurban my changes are not really good enough yet. add_write_barrier still broken
20:09 rurban but you can try to debug it
20:10 rurban Ok, I'll push it as WIP
20:12 Chirag I came across this before.. will give it another read
20:12 dalek parrot/rurban/pmc2c_orig: d3f21ff | rurban++ | lib/Parrot/Pmc2c/ (4 files):
20:12 dalek parrot/rurban/pmc2c_orig: [pmc2c] WIP :no_wb, detection of :manual_wb, RETURN() also for VTABLE methods
20:12 dalek parrot/rurban/pmc2c_orig:
20:12 dalek parrot/rurban/pmc2c_orig: add_write_barrier now calls Parrot::Pmc2c::PCCMETHOD::rewrite_RETURNs, but
20:12 dalek parrot/rurban/pmc2c_orig: this does not work yet.
20:12 dalek parrot/rurban/pmc2c_orig: review: https://github.com/parrot/parrot/commit/d3f21ff254
20:12 dalek parrot/rurban/pmc2c_orig: 94cecb2 | rurban++ | src/pmc/ (2 files):
20:12 dalek parrot/rurban/pmc2c_orig: [pmc] partially use new WB markers
20:12 dalek parrot/rurban/pmc2c_orig: review: https://github.com/parrot/parrot/commit/94cecb2dd9
20:13 rurban WB is only needed when GC pointers (i.e. PMC stuff) interact with each other during a GC
20:13 rurban INT, FLOAT are atomic
20:14 rurban you can rebase now
20:14 rurban git fetch; git rebase rurban/pmc2c_orig
20:15 rurban you can try to debug  add_write_barrier. the manual_wb attribute must be visible for the method, but is not
20:15 rurban You can increase your perl debugging foo :)
20:16 rurban step until gen_c, then set a breakpoint at add_write_barrier
20:16 rurban perl -d -Ilib tools/build/pmc2c.pl --c  src/pmc/arrayiterator.pmc
20:18 Chirag I ll change the manual_wb part and look into this tomorrow .. early classes :(
20:19 rurban perl -d -Ilib tools/build/pmc2c.pl --dump  src/pmc/arrayiterator.dump it is
20:19 rurban The trick is to tell the compiler to do most of the stupid and obvious work
20:19 rurban no prob, have fun
20:19 Chirag thanks! bye :)
20:55 dalek parrot/rurban/pmc2c_orig: 164fd19 | rurban++ | lib/Parrot/Pmc2c/Parser.pm:
20:55 dalek parrot/rurban/pmc2c_orig: [pmc2c] set manual_wb for :no_wb and PARROT_GC_WRITE_BARRIER in --dump
20:55 dalek parrot/rurban/pmc2c_orig:
20:55 dalek parrot/rurban/pmc2c_orig: detect it now earlier, in the parser
20:55 dalek parrot/rurban/pmc2c_orig: review: https://github.com/parrot/parrot/commit/164fd1998c
22:01 dalek parrot/rurban/pmc2c_orig: 8a61e52 | rurban++ | lib/Parrot/Pmc2c/Method.pm:
22:01 dalek parrot/rurban/pmc2c_orig: [pmc2c] small decl optimization
22:01 dalek parrot/rurban/pmc2c_orig: review: https://github.com/parrot/parrot/commit/8a61e523eb
22:01 dalek parrot: 532d915 | rurban++ | examples/shootout/regexdna.pir:
22:01 dalek parrot: [examples] enable regexdna.pir argv to allow gdb debugging
22:01 dalek parrot:
22:01 dalek parrot: we now accept an optional filename arg to regexdna.pir
22:01 dalek parrot: to study GC write barrier crashes with
22:01 dalek parrot: gdb --args ./parrot examples/shootout/regexdna.pir examples/shootout/regexdna.pir_input
22:01 dalek parrot: review: https://github.com/parrot/parrot/commit/532d915c69
22:02 dalek parrot/rurban/pmc2c_orig: 3e8b2f5 | rurban++ | / (49 files):
22:02 dalek parrot/rurban/pmc2c_orig: pmc2c: inline gc write barrier into vtable methods
22:02 dalek parrot/rurban/pmc2c_orig:
22:02 dalek parrot/rurban/pmc2c_orig: removed wrong UNUSED(INTERP) and UNUSED(SELF)
22:02 dalek parrot/rurban/pmc2c_orig: some methods with return values are marked TODO, need to add the write barriers manually.
22:02 dalek parrot/rurban/pmc2c_orig:
22:02 dalek parrot/rurban/pmc2c_orig: A missing write barrier caused one error:
22:02 dalek parrot/rurban/pmc2c_orig: t/examples/shootout.t: 16 examples/shootout/regexdna.pir SEGV
22:02 dalek parrot/rurban/pmc2c_orig:
22:02 dalek parrot/rurban/pmc2c_orig: TODO GC write barrier to:
22:02 dalek parrot/rurban/pmc2c_orig: default.pop_float
22:02 dalek parrot/rurban/pmc2c_orig: default.pop_integer
22:02 dalek parrot/rurban/pmc2c_orig: default.pop_pmc
22:02 dalek parrot/rurban/pmc2c_orig: default.pop_string
22:02 dalek parrot/rurban/pmc2c_orig: default.shift_float
22:02 dalek parrot/rurban/pmc2c_orig: default.shift_integer
22:02 dalek parrot/rurban/pmc2c_orig: default.shift_pmc
22:02 dalek parrot/rurban/pmc2c_orig: default.shift_string
22:02 dalek parrot/rurban/pmc2c_orig: CallContext.shift_pmc
22:02 dalek parrot/rurban/pmc2c_orig: CallContext.shift_string
22:02 dalek parrot/rurban/pmc2c_orig: Key.shift_pmc
22:02 dalek parrot/rurban/pmc2c_orig: ArrayIterator.pop_float
22:02 dalek parrot/rurban/pmc2c_orig: ArrayIterator.pop_integer
22:02 dalek parrot/rurban/pmc2c_orig: ArrayIterator.pop_pmc
22:02 dalek parrot/rurban/pmc2c_orig: ArrayIterator.pop_string
22:02 dalek parrot/rurban/pmc2c_orig: ArrayIterator.shift_float
22:02 dalek parrot/rurban/pmc2c_orig: ArrayIterator.shift_integer
22:02 dalek parrot/rurban/pmc2c_orig: ArrayIterator.shift_pmc
22:02 dalek parrot/rurban/pmc2c_orig: ArrayIterator.shift_string
22:02 dalek parrot/rurban/pmc2c_orig: Task.pop_pmc
22:02 dalek parrot/rurban/pmc2c_orig: Capture.pop_float
22:02 dalek parrot/rurban/pmc2c_orig: Capture.pop_integer
22:02 dalek parrot/rurban/pmc2c_orig: Capture.pop_pmc
22:02 dalek parrot/rurban/pmc2c_orig: Capture.pop_string
22:02 dalek parrot/rurban/pmc2c_orig: Capture.shift_float
22:02 dalek parrot/rurban/pmc2c_orig: Capture.shift_integer
22:02 dalek parrot/rurban/pmc2c_orig: Capture.shift_pmc
22:02 dalek parrot/rurban/pmc2c_orig: Capture.shift_string
22:02 dalek parrot/rurban/pmc2c_orig: HashIterator.shift_integer
22:02 dalek parrot/rurban/pmc2c_orig: HashIterator.shift_pmc
22:02 dalek parrot/rurban/pmc2c_orig: HashIterator.shift_string
22:02 dalek parrot/rurban/pmc2c_orig: ImageIOThaw.shift_float
22:02 dalek parrot/rurban/pmc2c_orig: ImageIOThaw.shift_integer
22:02 dalek parrot/rurban/pmc2c_orig: ImageIOThaw.shift_pmc
22:02 dalek parrot/rurban/pmc2c_orig: ImageIOThaw.shift_string
22:02 dalek parrot/rurban/pmc2c_orig: ResizablePMCArray.pop_float
22:02 dalek parrot/rurban/pmc2c_orig: ResizablePMCArray.pop_integer
22:02 dalek parrot/rurban/pmc2c_orig: ResizablePMCArray.pop_pmc
22:02 dalek parrot/rurban/pmc2c_orig: ResizablePMCArray.pop_string
22:02 dalek parrot/rurban/pmc2c_orig: ResizablePMCArray.shift_float
22:02 dalek parrot/rurban/pmc2c_orig: ResizablePMCArray.shift_integer
22:02 dalek parrot/rurban/pmc2c_orig: ResizablePMCArray.shift_pmc
22:02 dalek parrot/rurban/pmc2c_orig: ResizablePMCArray.shift_string
22:02 dalek parrot/rurban/pmc2c_orig: Object.pop_float
22:02 dalek parrot/rurban/pmc2c_orig: Object.pop_integer
22:02 dalek parrot/rurban/pmc2c_orig: Object.pop_pmc
22:03 dalek parrot/rurban/pmc2c_orig: Object.pop_string
22:03 dalek parrot/rurban/pmc2c_orig: Object.shift_float
22:03 dalek parrot/rurban/pmc2c_orig: Object.shift_integer
22:03 dalek parrot/rurban/pmc2c_orig: Object.shift_pmc
22:03 dalek parrot/rurban/pmc2c_orig: Object.shift_string
22:03 dalek parrot/rurban/pmc2c_orig: OrderedHashIterator.pop_pmc
22:03 dalek parrot/rurban/pmc2c_orig: OrderedHashIterator.shift_pmc
22:03 dalek parrot/rurban/pmc2c_orig: OrderedHashIterator.shift_string
22:03 dalek parrot/rurban/pmc2c_orig: PMCList.pop_pmc
22:03 dalek parrot/rurban/pmc2c_orig: PMCList.shift_pmc
22:04 dalek joined #parrot
22:09 rurban1 joined #parrot
22:10 rurban2 joined #parrot
22:17 travis-ci joined #parrot
22:17 travis-ci [travis-ci] parrot/parrot#1025 (master - 532d915 : Reini Urban): The build passed.
22:17 travis-ci [travis-ci] Change view : https://github.com/parrot/parrot/compare/4a661a364d3f...532d915c6992
22:17 travis-ci [travis-ci] Build details : http://travis-ci.org/parrot/parrot/builds/23630093
22:17 travis-ci left #parrot
23:04 rurban1 joined #parrot
23:05 benabik joined #parrot
23:09 davidfetter joined #parrot
23:15 rurban1 joined #parrot
23:19 janus joined #parrot
23:41 benabik joined #parrot
23:56 benabik joined #parrot

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

Parrot | source cross referenced