Parrot 5.6.0 "Psittacosaurus" | parrot.org/ | Log: irclog.perlgeek.de/parrot | #parrotsketch meeting Tuesday 19:30 UTC
Set by moderator on 17 July 2013.
00:18 benabik joined 01:31 rurban1 joined 01:42 kid51 joined 02:51 davidfetter joined 03:25 preflex_ joined 03:47 rurban1 joined 04:33 Khisanth joined 04:52 rurban1 joined 05:31 denis_boyun joined 05:52 rurban1 joined 06:29 Mike-PerlRecruiter_ joined 06:52 rurban1 joined
dalek kudo/nom: b159716 | (Elizabeth Mattijsen)++ | src/core/HashIter.pm:
Start of work to give HashIter its own file
07:44
kudo/nom: 847fb55 | (Elizabeth Mattijsen)++ | src/core/HashIter.pm:
I don't want to be the git blame of this file :-)
07:47
07:53 rurban1 joined
dalek kudo/nom: 5d66563 | (Elizabeth Mattijsen)++ | src/core/HashIter.pm:
Second try, if this doesn't work, I guess I *will* be its git blame
07:57
kudo/nom: 32e055e | (Elizabeth Mattijsen)++ | src/core/HashIter.pm:
There we go again
08:06
kudo/nom: b52153a | (Elizabeth Mattijsen)++ | src/core/HashIter.pm:
Copy of EnumMap, to give HashIter its own file, as per jnthn++ request
08:32
kudo/nom: 92a2b85 | (Elizabeth Mattijsen)++ | / (4 files):
Give the HashIter class its own file
08:53 rurban1 joined
dalek kudo/nom: 4a608a7 | (Elizabeth Mattijsen)++ | src/core/ (3 files):
Remove Hash.(classify|categorize), as it is no longer specced
09:16
09:53 rurban1 joined 10:54 rurban1 joined 11:23 denisboyun joined 11:27 denis_boyun_ joined 11:49 kid51 joined 11:54 rurban1 joined 12:06 benabik joined 12:54 rurban1 joined 13:15 FROGGS joined, PacoAir joined
FROGGS Hi there 13:22
I played with threads right now, and I wonder about the output of a modified example: gist.github.com/FROGGS/c5b9fd6a72d98cdfdb5f
I have an core i3, so I have two cores + HT, so 4 threads 13:23
I had expected to get the output of the forth task too, am I doing something wrong?
it really looks like I can't have four running tasks, because when I don't schedule the first one, the output consists of <[bc.]> 13:26
Coke FROGGS: building a copy to tes.t.. 13:29
13:29 rurban1 joined
FROGGS fwiw, my parrot is This is Parrot version 5.5.0-devel built for amd64-linux 13:30
13:31 darbelo joined 13:33 bluescreen joined
Coke arglebargle. still can't run a just-built parrot. 13:35
13:35 denisboyun joined
FROGGS Coke: you have no nqp/parrot? 13:38
Coke I'm doing this with a straight parrot. 13:39
so I get:
gist.github.com/coke/6122064 13:40
note that I get the same errors using "./parrot -h" 13:43
be nice if parrot adopted the default install path of ./install so I didn't have to reconfigure and rebuild to get a working installed-locally parrot.
FROGGS: same output here - no "."s 13:47
at a guess, you're forgetting to count the main thread. 13:48
FROGGS k, if you comment out "schedule $P0", it shows up
Coke: yeah, I was thinking that this might be the case 13:49
Coke I think you might need to yield or something so any starved threads have a chance to work
if there's no reference to the Task available in .sub task, though, I'm not sure how you'd do the yield. 13:50
FROGGS but tbh, I would expect that if I schedule thousands of tasks, that they start simultaneously, or better: I have to figure out how to limit the iteration per task
yeah
Coke interp.'current_task'() 13:51
FROGGS k, without the loops it shows all, and then waits the given 3 seconds 13:52
I think that is alright
Coke oh! 13:53
you put it into an infinite loop.
FROGGS: .sub task never terminates with that loop. it finishes the loop and then starts again. 13:54
if you made it return from the sub, then you'd not deadlock yourself.
FROGGS Coke: I know that are the tasks infinite in the example... 13:55
Coke ok. yah, then you need a way to yield. 13:56
but I don't see any yield examples for threads.
FROGGS when I add 'return(0)' right before .end of the task, I only get 'a' as output 13:57
FROGGS needs to learn more about pir
Coke the task is the sub that runs for the life of the Task - if you want to have an infinitely looping task, but do more tasks than you have CPUs for, something is going to get starved, I think. 13:58
FROGGS sure 13:59
:o)
now I want to have more (finite) tasks than cpus 14:00
Coke ah. here's one that works:
gist.github.com/coke/6122236 14:01
note that you get very different results if you sleep for 0 or 0.000000001 14:02
vs. the 0.1 in teh example.
FROGGS okay, that shows that the implementation is sort of sane, yes
Coke seems like we'd want a real yield here.
FROGGS and I want it to finish a task ('return(0)' ?) without stopping the app 14:03
Coke as long as there are tasks running, it won't finish. if you .return out of .sub task, the task is done. 14:04
AIUI.
FROGGS Coke: try it 14:05
I only get 'a'
Coke FROGGS: sample code.
(here, I get ab.c)
FROGGS gist.github.com/FROGGS/c5b9fd6a72d98cdfdb5f 14:06
Coke it's not return, it's .return, no? 14:07
FROGGS ohh
Coke++ 14:08
14:08 bluescreen joined 14:23 denisboyun joined 14:37 Psyche^ joined 14:55 denisboyun joined 15:38 mmoser63_ joined
mmoser63_ seen atrodo 15:55
benabik ENOSEENBOT 15:56
16:06 denis_boyun joined 16:43 FROGGS joined
FROGGS so after playing with tasks, how do I get the result of a task? I can schedule and wait, but there is no yield or join AFAICS 16:45
16:50 denis_boyun joined 17:06 darbelo joined
Coke FROGGS: Guessing that you need to share data or send a message. 17:27
FROGGS If I could share an RPMCA across all tasks... that would be sweet 17:39
rurban diakopter wants to add this threads leak test: main thread enters a sub. then creates pmcarray A, then puts Integer pmc B in A[0]. Passes A to a task C, then sleeps 2 seconds then forces a GC by allocating a ton of objects. Task C creates pmcarray D, then takes A[0] (which is B) and puts it in D[0], and sets A[0] to null/undef.. then sleeps 5 seconds and then tries to access B 17:52
darbelo That's… unlikely to end well. 17:54
rurban See github.com/parrot/parrot/issues/975 17:56
I'm pretty busy with php horde stuff right now. 17:57
18:21 FROGGS joined 18:26 Mike-PerlRecruiter_ joined 19:10 drift joined 19:39 rurban1 joined
FROGGS getting something back from a Task is not made easy ó.ò 20:17
20:20 FROGGS joined 20:42 benabik joined 20:48 benabik joined
FROGGS uhh, I think I got it 21:00
21:09 darbelo joined 22:11 benabik joined 23:12 benabik joined
FROGGS github.com/parrot/parrot/issues/889 # comments welcome 23:27