»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend! Set by sorear on 25 June 2013. |
|||
00:05
virtualsue left
00:12
Mouq joined
|
|||
Mouq | r: 「works already?」 | 00:12 | |
camelia | rakudo-parrot 41cd5e, rakudo-jvm 41cd5e, rakudo-moar 41cd5e: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfileBogus statementat /tmp/tmpfile:1------> <BOL>⏏「works already?」 expecting any of: statement list …» | ||
Mouq | Oh, I understand that roast commit, ok | 00:13 | |
++lue :) | |||
lue | Not a very hard fix, just need to update everything, and then spectest the before and after :) | 00:16 | |
dalek | p/moar-conc: b918e81 | jnthn++ | src/vm/jvm/ (5 files): Add ReentrantMutex REPR and lock/unlock ops on JVM |
00:19 | |
TimToady | I presume we still have to be careful about putting big codepoints into CORE directly | ||
jnthn | TimToady: Probably, but (in theory) Moar and JVM aren't vulnerable... | 00:20 | |
TimToady | Moar deals with it by slowing down all strings instead? :P | ||
jnthn | TimToady: Well, Moar used to have a simple immutable string model, then diakopter++ added ropes, which didn't actually work properly and so are flattened away immediately after creation as a hack, which is SLOW. :/ | 00:21 | |
TimToady: At this point, I dunno what's going to happen there. The code is macro'd to the point of being a bloody nuisance to debug. :( | 00:22 | ||
Not one of the bits of the codebase I'm happy with. | 00:23 | ||
lue | jnthn: I suppose there isn't an easy way to switch back to simple immutable in the meantime, is there? | 00:24 | |
jnthn | lue: Not easily. | ||
I just need to throw some time at understanding what's there and working out a way forward with it. | 00:25 | ||
dalek | kudo/moar-conc: 9afc8c3 | jnthn++ | src/vm/jvm/core/Lock.pm: Use ReentrantMutex REPR and new ops for Lock. Means it is no longer tied to the JVM. |
00:30 | |
kudo/moar-conc: 89ff343 | jnthn++ | / (3 files): Move Lock.pm out of src/vm, now it's VM-generic. |
|||
ast: ef25233 | coke++ | S12-class/augment-supersede.t: add test for RT #117165 |
00:36 | ||
synopsebot | Link: rt.perl.org/rt3//Public/Bug/Displa...?id=117165 | ||
pippo | jnthn: does Configure.pl for MoarVM check for presence of libreadline? | 00:41 | |
jnthn | pippo: Doesn't look like it | 00:42 | |
00:43
colomon left
|
|||
pippo | on my box it does not seem detecting it. Is it trying to compile a test program to detect libredline? Does it include linking to libncurses? | 00:44 | |
00:44
colomon joined
|
|||
jnthn | pippo: It simply isn't looking for it right now and always using the bundled linenoise instead. | 00:45 | |
pippo: So I guess the problem on Linux is with that... | |||
pippo | I have used --use-libreadline and added linking to include libncurses and it works! | 00:47 | |
jnthn | Oh... | ||
pippo | I have used perl Configure.pl --use-libreadline and added linking to include libncurses and it works! | ||
jnthn | Nice :) | ||
yeah, I see it is in there... | 00:48 | ||
OK, so it doesn't probe for it, but you can configure it. | |||
pippo | yes! but you have to add linking to libncurses afterwards manuallly. At least on my box. | 00:49 | |
jnthn | Oh. Wouldn't it be libreadline, though? | 00:50 | |
pippo | both. On my box libreadline requires also libncurses dont know why. | ||
geekosaur | because libncurses includes the low level terminal routines | 00:51 | |
jnthn | geekosaur: Is that typical/normal? So if you link against one you should always link against the other? | ||
geekosaur | they dropped the separate libtinfo years ago | ||
jnthn | geekosaur: Uh, to phrase it better, if you like to libreadline you should always link to libncurses too? | 00:52 | |
geekosaur | typical for ncurses systems, yes. if using bsd or original sysv curses (which probably only means commercial unixes) then it'd be libtermcap, libtermlib, or libtinfo | ||
but on a syste, with ncurses, ncurses subsumes the old low level libraries | 00:53 | ||
[Coke] | huh. where is rakudo's STD.pm ? | ||
geekosaur | (and on at least some System Vs, libcurses is preferred with libtinfo only there for backward compat and a symlink to libcurses) | 00:54 | |
lue | [Coke]: src/Perl6/Grammar.nqp ? | ||
pippo | jnthn: sorry the configure param is --use-readline and not --use-libreadline. Good night! | 00:56 | |
00:56
pippo left
|
|||
geekosaur | so, upshot: except on some (mostly older) commercial unixes, readline uses curses/ncurses for the low level terminal stuff. you may well not even care about supporting those older ones | 00:56 | |
jnthn | geekosaur: OK, thanks. | 00:57 | |
geekosaur | since they're at least 10 years behind current standards (I think both POSIX and the last X/Open standard specced curses as holding the former terminfo library) | ||
[Coke] | lue++ | 00:58 | |
geekosaur | heck, I think SVR2 was the last release where terminfo was separate from curses, it was merged by SVR3.1 with only a compat symlink left. does anyone really care about anything pre-SVR4? | 00:59 | |
timotimo | jnthn: do you think i could do the same jvm-interop-to-REPR-plus-op for "the next thing" if i looked at your code? | 01:05 | |
jnthn | timotimo: Hmm, depends which one we make the next thing I guess :) | 01:06 | |
hoelzro | I found some oddness with the compiled URI on MoarVM | 01:07 | |
'need URI::DefaultPort; URI::DefaultPort::scheme_port("https")' works fine | |||
*unless* you 'use URI' in that script | 01:08 | ||
jnthn | hoelzro: Urgh. | 01:10 | |
hoelzro | if I remove the 'need URI::DefaultPort' in URI.pm, it works | ||
I'll try to create a minimal example | 01:11 | ||
there's no RT ticket for this, is there? | |||
timotimo | jnthn: i'd leave that up to you. or you tell me which one would be the easiest ;) | ||
hoelzro | I'm guessing that it's something with the %default_port hash being loaded twice? | 01:12 | |
timotimo | jnthn: on the other hand, i'm going to go full-on sleep-deprivation mode this weekend :P | ||
jnthn | timotimo: Does that mean you're going to sleep a lot, or a little? | 01:15 | |
timotimo: Semaphore is easiest one I think | |||
timotimo: You can follow same pattern as for lock | |||
timotimo | little, probably ;) | ||
01:19
dmol left
|
|||
timotimo | jnthn: how do i best get the initial number of slots into the semaphore? | 01:20 | |
01:20
grondilu left
|
|||
timotimo | i don't think i can give allocate more parameters, aye? | 01:20 | |
hoelzro | jnthn, timotimo: here's a minimal example for the URI module | ||
timotimo | oh, you're hunting a crash | 01:21 | |
hoelzro | rt.perl.org/Ticket/Display.html?id=121298 | ||
timotimo | ? | ||
hoelzro | it's that "cannot invoke null object" issue that I saw with URI | ||
I reduced it to a simple example and attached it to the ticket | |||
timotimo | oh, ok | ||
thank you. i don't have the smarts to look into it right now | 01:22 | ||
hoelzro | it looks like two loads messes up a module-level data structure | ||
no rush =) | |||
timotimo | jnthn: since set_int is used to preallocate lists to a given size, should allocate set null for the semaphore and set_int should create the actual semaphore with the given number? | 01:23 | |
set_elems, actually | 01:24 | ||
01:24
daniel-s_ left
|
|||
hoelzro | family time & | 01:25 | |
01:25
tgt joined,
daniel-s_ joined
|
|||
jnthn | timotimo: No, overloading those feels odd | 01:26 | |
timotimo: Well, set_int could work in which case you nqp::box_i(1, SemaphoreType) :) | |||
timotimo: I've just been looking at the libuv semaphore API and how we use them in Promise and...hmm. | 01:28 | ||
timotimo | jnthn: not even set_elems? | 01:29 | |
jnthn | timotimo: set_elems is worse than set_int... :) | ||
I think I can live with set_int being used for it | |||
01:30
daniel-s__ joined
|
|||
jnthn | The problem is that Promise relies on being able to post a big value to the semaphore | 01:30 | |
Whihc libuv's API doesn't let you do. | |||
01:30
daniel-s_ left
|
|||
jnthn | pthreads defines a post_sem_multiple | 01:33 | |
timotimo | why would it post a big value to the semaphore? | 01:35 | |
01:36
berekuk joined
|
|||
jnthn | timotimo: When you .result on a Promise that ain't done yet, it tries to acquire the semaphore | 01:36 | |
timotimo: It posts a big value 'cus it doesn't know how many times that has been done. | |||
timotimo | d'oh %) | 01:37 | |
jnthn | Anyway, seems on OSX the semaphore API doesn't have an equivalent of that. | 01:38 | |
timotimo | so really we want an event instead | ||
jnthn | "event"? :) | ||
timotimo | er | ||
"condition variable"? | |||
the one where any amount of things wait and one signals | |||
jnthn | Yeah. That may be the best way. | ||
timotimo | so why am i trying to implement a semaphore right now? :) | ||
jnthn | Right. | ||
Semaphores are used elsewhere, iirc | 01:39 | ||
Yeah, thread pool uses them too | |||
timotimo | OK | ||
it won't get us further to promises, though, just to 100% ;) | |||
ah well. | |||
jnthn | Well, we need the scheduler before we can have promises | 01:42 | |
timotimo | the ops for the semaphore go into rakudo, rather than nqp? | ||
jnthn | No, NQP | 01:43 | |
Use moar-conc branch | 01:44 | ||
timotimo | OK | ||
ah yes indeed | |||
i didn't look correctly | |||
dalek | p/moar-conc: bd253e0 | jnthn++ | src/vm/moar/QAST/QASTOperationsMAST.nqp: Map lock and unlock ops on MoarVM. |
01:45 | |
kudo/moar-conc: c8d8475 | jnthn++ | tools/build/Makefile-Moar.in: Add Lock.pm to Rakudo Moar build. With this we pass S17-concurrency/lock.t under Moar. |
|||
TimToady | \o/ here too :) | 01:46 | |
01:46
berekuk left
|
|||
timotimo | should i use lock and unlock for semaphores or rather have ops "verhogen" and "proberen"? | 01:47 | |
jnthn | uh...neither? :) | 01:48 | |
timotimo | semacquire and semrelease? | ||
jnthn | I like those more. | ||
They're not the traditional terms. | |||
timotimo | ok | ||
java has "acquire" and "release" | |||
jnthn | Yeah. | ||
timotimo | i think the ones that are traditional are post and something else | ||
jnthn | wait | 01:49 | |
timotimo | maybe sempost and semwait | ||
but not post and wait | |||
skids | Every time I read a pthread manual page I despair at how much gets sacrificed for portability to platforms that don't implement it. | ||
jnthn | Could do those. I think acquire and release are better names though. | ||
timotimo | without "sem"? | 01:50 | |
jnthn | with :) | ||
semacquire and semrelease | |||
timotimo | thanks | 01:51 | |
jnthn | The scheduler is a pretty fearsome porting job... | ||
Well, ThreadPoolScheduler | |||
timotimo | :( | 01:52 | |
TimToady | found a workaround for the overeager for bug: gather for @primes xx * -> $factor { ... } | 01:53 | |
jnthn | o.O | ||
Wow | |||
timotimo: Well, scheduler takes care of a lot of hard things so other places don't have to. | 01:54 | ||
dalek | kudo/moar-conc: 5b0b70d | jnthn++ | tools/build/Makefile-Moar.in: Add Scheduler role to the build. Doesn't contain anything JVM-specific already. |
01:55 | |
jnthn | timotimo: We'll need semtryacquire also | 01:57 | |
timotimo | where do i get ExceptionHandling from? o_O | ||
i thought for every symbol there is there should be an import line | 01:58 | ||
jnthn | org.perl6.nqp.runtime.ExceptionHandling | ||
01:58
berekuk joined
|
|||
timotimo | weird, i didn't see that :| | 01:58 | |
is it legitimate to call it SemaphoreRepr? | 01:59 | ||
because java seems to complain about importing Semaphore and then declaring a class called Semaphore :) | |||
jnthn | Yeah, it will... :S | ||
I think you'll just have to fully qualify its one | 02:00 | ||
Oh | |||
timotimo | hm, ok | ||
jnthn | Actually, on JVM the REPR's string name isn't actually the class name | ||
See REPRRegistry.java | |||
02:00
klapperl_ joined
|
|||
jnthn | So yeah, you can get away with that. | 02:00 | |
timotimo | right | ||
i saw that | |||
that's why i asked :) | |||
oh, i think i made it work | 02:01 | ||
jnthn | Timers are going to be kinda fun... | 02:02 | |
timotimo | how should i best handle the InterruptedException? use acquireUninterruptable instead or just dieInternal when i get interrupted? | ||
jnthn | The latter is probably more sociable | 02:03 | |
timotimo | good | ||
oh, i need to box a bool for that | 02:04 | ||
probably an int instead | |||
02:04
klapperl left
|
|||
timotimo | then i'd have to pass in an Int SMO, right? | 02:04 | |
02:07
Mouq left
|
|||
timotimo | or just use BOOTint from the tc? | 02:07 | |
02:08
berekuk left
02:09
tgt left,
berekuk joined
|
|||
timotimo | jnthn: can you wait another night for the semaphore code? | 02:10 | |
jnthn | timotimo: Box a bool for what? | 02:11 | |
timotimo: Sure; gonna go sleep in a moment | |||
timotimo | the return value of tryacquire | ||
02:13
FROGGS_ joined
|
|||
timotimo | gnite! | 02:13 | |
dalek | p/moar-conc: 9264434 | (Timo Paulssen)++ | src/vm/jvm/runtime/org/perl6/nqp/ (4 files): beginning of a semaphore instantce |
||
jnthn | Oh, just have the op return a long, and mark it as $RT_INT in the ops file | ||
(Compiler.nqp I mean) | |||
02:15
Sqirrel joined
|
|||
jnthn | 'night, #perl6 | 02:16 | |
TimToady | o/ | ||
02:17
FROGGS left,
Sqirrel_ left
02:20
berekuk left
02:25
rurban left
02:31
colomon left
02:32
colomon joined
02:38
berekuk joined
02:48
berekuk left
02:59
klapperl joined
03:01
colomon left
03:03
klapperl_ left
03:09
kurahaupo_mobile left
03:11
berekuk joined
03:13
mtj_ left
03:18
mtj_ joined
03:22
berekuk left
03:38
kurahaupo_mobile joined
03:43
colomon joined
|
|||
dalek | kudo/nom: 7b43e38 | Mouq++ | src/Perl6/ (2 files): Abbreviated Pod blocks can't have configurations |
03:50 | |
03:50
Mouq joined
04:05
fridim_ joined
04:15
xenoterracide joined
04:30
kurahaupo_mobile left
|
|||
lue | Running make -j3 spectest, the wallclock seconds in order of parrot, jvm, moar: 13505, 11311, 3723 :) | 04:58 | |
05:13
Mouq left
05:34
BenGoldberg left
05:36
hoverboard left
05:46
hoverboard joined
05:51
rurban joined
06:05
Mouq joined
06:08
rhr left,
rhr joined
06:09
Mouq left
06:10
raiph left
06:18
darutoko joined
|
|||
dalek | ast: 0265e51 | lue++ | S26-documentation/09-configuration.t: [S26-documentation] Change abbreviated to paragraph Abbreviated can't take config options, which is what's being tested here, so change it to paragraph. |
06:32 | |
ast: d97551f | lue++ | S12-class/augment-supersede.t: Merge branch 'master' of github.com/perl6/roast |
|||
06:34
SamuraiJack joined
06:37
daniel-s__ left
06:38
daniel-s__ joined
|
|||
dalek | kudo/nom: 8b435d3 | lue++ | src/Perl6/ (2 files): Add support for short-form Q strings. You should now be able to type out your Q-based strings as 「...」, similar to '...' and "...". |
06:44 | |
kudo/nom: 44f3569 | lue++ | .gitignore: Add missing perl6-debug-p to .gitignore |
|||
rakudo/nom: bfe22c4 | lue++ | / (2 files): | |||
rakudo/nom: Fix localtest targets | |||
rakudo/nom: | |||
lue | ? I think dalek got caught on something. | 06:46 | |
dalek | ast: 4f3dfd4 | lue++ | S02-literals/quoting-unicode.t: Unfudge test for 「...」 |
06:51 | |
07:19
rurban left
07:22
daniel-s__ left
07:26
daniel-s__ joined
07:31
daniel-s__ is now known as daniel-s_
07:34
hoverboard left
07:48
kst joined
07:53
Mouq joined
07:54
slavik left
07:56
berekuk joined
07:57
Mouq left
08:08
virtualsue joined
08:17
kivutar joined
08:28
sqirrel_ joined
08:31
bjz_ left
08:32
telex left
|
|||
raydiak | colomon++ # your idea that my mysterious test failure might be a precompilation bug was absolutely correct | 08:34 | |
08:35
telex joined
|
|||
raydiak | FROGGS_: ^ found the cause of my test failure :P | 08:36 | |
FROGGS_ | raydiak: that was my guess too... we'd just need to golf it down so we know what breaks when precomp'd | 08:39 | |
p: say 「...」 | |||
camelia | rakudo-parrot bfe22c: OUTPUT«...» | ||
FROGGS_ | that is interesting | 08:40 | |
08:41
rindolf joined
|
|||
raydiak | forgot I was running panda install with jvm, and ran panda-test with moar, thus my "why doesn't it break with panda-test" confusion | 08:42 | |
FROGGS_ | raydiak: that is what my S11 implementation is supposed to solve | 08:43 | |
raydiak | ? | ||
FROGGS_ | you will automatically get the -m/-j/-p suffix when installing a binary/script | ||
so there would be a panda-test-j, that will always delegate to perl6-j | |||
raydiak | that sounds handy | 08:44 | |
08:50
molaf_ left
08:54
kurahaupo_mobile joined
08:57
kivutar left
|
|||
FROGGS_ | hoelzro / colomon: there? | 08:58 | |
raydiak: this might even be your issue: rt.perl.org/Ticket/Display.html?id=121298 | 08:59 | ||
09:00
kurahaupo_mobile left,
kurahaupo_mobile joined
|
|||
raydiak | FROGGS_: looking | 09:02 | |
09:09
bjz joined
|
|||
raydiak | hmmm...I can check to see if the things being passed as params are defined then, so I know if it's the same problem | 09:09 | |
or better yet, I'll try precompiling this test as a jar and running it again...if this works under jvm, it must not be my problem | |||
09:10
bjz_ joined,
bjz left
|
|||
raydiak | also broken under jvm, so it could be my issue...still investigating | 09:14 | |
eh? when not logged in I can view the ticket but when logged in I get "No permission to display that ticket"? | 09:19 | ||
FROGGS_ | O.o | 09:21 | |
raydiak | haha I get the weirdest obstacles lately...was just gonna add "also broken under jvm" | 09:23 | |
my problem looks different, though...like it's not seeing the overloaded infix:<+> | 09:26 | ||
09:30
berekuk left
|
|||
raydiak | will finish pinning this down when I can think better...tis late; g'night FROGGS++ and #perl6 o/ | 09:36 | |
09:36
berekuk joined
|
|||
masak | antenoon, #perl6 | 09:37 | |
yoleaux | 21 Feb 2014 21:24Z <raiph> masak: I filed #121296; plz lemme know if I could have done better | ||
synopsebot | Link: rt.perl.org/rt3//Public/Bug/Displa...?id=121296 | ||
masak | raiph: looks very good to me. | 09:38 | |
timotimo | i'll fix the return type of the tryalloc right away | 09:45 | |
dalek | p/moar-conc: 326d6dc | (Timo Paulssen)++ | src/vm/jvm/ (2 files): have semtryacquire return an INT, map sem{{try,}acquire,release} |
09:47 | |
10:04
klapperl_ joined
10:07
klapperl left
10:24
cognominal left
10:29
espadrine joined
10:30
espadrine left
|
|||
timotimo | and now the rakudo part | 10:32 | |
10:34
sqirrel_ left
10:36
dmol joined
|
|||
timotimo | jnthn: is it really box_i or box_I? | 10:39 | |
timotimo would try, but has to build nqp first | |||
jnthn | timotimo: box_i; box_I = bigint. | 10:40 | |
timotimo | good | 10:41 | |
i'll leave the Promise.pm to have the jvm interop for semaphore for now, aye? | |||
jnthn | Yeah | ||
We may want to spec and make semaphores available too. | 10:42 | ||
Not because I want people to use them day to day, just because I want folks to be able to build new concurrency abstractions as the whole industry learns better ways to do things. | 10:43 | ||
timotimo | sure. this is work in a branch so far, so i'll get it to work and then worry about making it perfect | ||
jnthn | Sure :) | ||
10:45
_thou left
10:52
virtualsue left
10:55
berekuk left
|
|||
timotimo | we need some adjustments so that we can somehow run the individual spectests with just make without being required for the parrot build to work | 10:57 | |
because right now parrot won't touch the Semaphore due to an unknown repr :P | |||
jnthn | timotimo: They are marked # jvm right now | 10:58 | |
timotimo: I suggest we add # conc | |||
timotimo: And pass --conc to the harness for JVM/Moar. | |||
timotimo | that's not what i mean :) | 10:59 | |
the **/*.t ruel in the makefile depends on P_HARNESS_WITH_FUDGE or something | 11:00 | ||
that P_ is what i meant | |||
jnthn: how do you feel about AtomicInteger getting its own REPR? | |||
11:01
berekuk joined
|
|||
jnthn | timotimo: It shouldn't. | 11:02 | |
timotimo | that's right :) | ||
but how do e differentiate if "make t/spec/foo/bar.t" means "do it with parrot" or whatever? | |||
jnthn | Oh, no idea | ||
I never use that :) | |||
timotimo | should the method for tryAcquire have that same capitalization in perl6 as it does in java? | 11:03 | |
jnthn | No | ||
nqp::semtryacquire | |||
timotimo | i've given Semaphore a method to do that | ||
jnthn | ? | 11:07 | |
Oh, you mean at Perl 6 level? | 11:08 | ||
Should be try_acquire there most probably... | |||
timotimo | good | ||
jnthn | Though really it doesn't matter what we call it; TimToady++ will spring up with a better name anyway. :D | ||
timotimo | This representation can not unbox to a native int - that's what i get for my tryacquire ... huh | ||
oh, i may need to recompile nqp perhaps? | 11:09 | ||
nope :| | |||
jnthn | Unbox? Hm | ||
Don't know we should be trying to do that. | 11:10 | ||
timotimo | yeah, i'm not sure what's causing the error | ||
i'll try to golf it and see if that gives me any insight | |||
./perl6-j -e 'Semaphore.new(1).tryAcquire()' | 11:11 | ||
that triggers it already | |||
jnthn | .tell hoelzro I think rt.perl.org//Public/Bug/Display.html?id=119877 is fixed - please can you check? | 11:14 | |
yoleaux | jnthn: I'll pass your message to hoelzro. | ||
timotimo | should i just push it to see what you think? | ||
11:16
Rotwang joined
|
|||
jnthn | timotimo: Yeah, that may be the easiest way. | 11:16 | |
dalek | kudo/moar-conc: 51fb614 | (Timo Paulssen)++ | / (3 files): first (nonworking) draft of Semaphore class |
11:18 | |
timotimo | there we go. good luck :) | ||
oh, is that from "int $permits"? | 11:19 | ||
jnthn | timotimo: Hmm, I'm thinking the problem may not be in that code | 11:20 | |
Moment | |||
QAST::OperationsJAST.map_classlib_core_op('semtryacquire', $TYPE_OPS, 'semtryacquire', [$RT_INT], $RT_OBJ, :tc); | 11:21 | ||
There you are. | |||
The thing in the square brackets are the op argument types | |||
And the one to the right is the result type. | |||
timotimo | oooooh | ||
haha :) | |||
jnthn | So your tryacquire is an i -> o op, not an o -> i one like you wanted :) | 11:22 | |
timotimo | thanks | ||
jnthn | np :) | ||
timotimo | i'm kinda groggy >_ | ||
>_< | |||
jnthn | Maybe it's the low-sleep thing ;) | 11:29 | |
timotimo | the amount fo sleep was sufficient, i think | ||
but it was a mattress that was much softer than i'm used to and a pillow that was much smaller than i'm used to | |||
well, it was a bit bigger, but it compressed much moar | 11:30 | ||
jnthn | ah | ||
timotimo | i should have seen that the stuff in the [ ] is the arguments, because that's a list and a list can also hold multiple things | 11:33 | |
unlike a retur nvalue, which is usually one thing | |||
even if it's a list | |||
dalek | p/moar-conc: 00e4d36 | (Timo Paulssen)++ | src/vm/jvm/QAST/Compiler.nqp: confused returnval and argument types |
11:35 | |
timotimo | jnthn: the test file scheduler.t doesn't seem to terminate after the 55th test | 11:36 | |
jnthn | timotimo: On JVM? | 11:37 | |
timotimo: Did you fudge it? | |||
timotimo | i didn't :( | ||
jnthn | oh, it's no fudge marks. | ||
timotimo | that would be it. | ||
right, no fudge marks | 11:38 | ||
jnthn | timotimo: Did it terminate before your changes? | ||
It does here... | |||
timotimo | didn't test :P | ||
11:38
beastd joined
|
|||
timotimo | takes so long :( | 11:40 | |
i really liked the quick turnaround times on moarvm during development | |||
i should probably support acquiring and try-acquiring more than 1 permit, right? | 11:41 | ||
even though that's not needed yet | |||
11:41
Zaydon joined
|
|||
jnthn | timotimo: No, don't add those | 11:42 | |
timotimo: They're not portably available. | |||
timotimo | oh, ok | ||
that's good then | |||
jnthn | Well, it's not good, but it's how it is... | ||
timotimo | it does not terminate without my changes | 11:45 | |
jnthn | Um. | 11:47 | |
jnthn tries it | 11:48 | ||
uh, once I have a JVM build... | 11:49 | ||
timotimo | that could take a while, aye :) | 11:51 | |
jnthn | nah, 'tis done | 11:52 | |
timotimo | the next thing we're going to see are mappings for the semaphore ops in nqp? | 11:55 | |
11:55
berekuk left
11:56
virtualsue joined
|
|||
Ven | next thing to do is build a jvm in perl6, I guess :) | 11:58 | |
11:58
SamuraiJack left
|
|||
jnthn | timotimo: Feel free to add those, I don't have them here yet. | 11:58 | |
Ven | you'd get the best perfs ever | 11:59 | |
(that really seems like an interesting research project though) | 12:00 | ||
jnthn | timotimo: Hmm. I get the exit hang too when running the test solo, but not under the eval server. Huh... | 12:01 | |
12:11
pdcawley joined,
pdcawley_ left
|
|||
timotimo | jnthn: huh. | 12:17 | |
because the thread the test starts lives past the single program and reaches the 10000 seconds timeout? perhaps? | 12:18 | ||
jnthn: i'll map them | |||
12:19
kshannon joined
|
|||
jnthn | timotimo: Yeah, but they should be background/daemon threads, meaning they don't block termination. | 12:19 | |
timotimo | ah, huh | 12:20 | |
jnthn | timotimo: I'll have to dig a bit deeper on it. | 12:21 | |
timotimo: Currently researching/planning for the concurrent blocking queue thing we need for channels and the scheduler. | |||
timotimo | aye, that does sound good :) | 12:22 | |
12:23
berekuk joined
|
|||
Timbus | hm. i just stumbled into this today: rosettacode.org/wiki/Luhn_test_of_c...ers#Perl_6 | 12:27 | |
and surely this is wrong: my $s1 = [+] @digits[0,2...@digits.end]; | 12:28 | ||
the sequence, that is | |||
jnthn | timotimo: Yeah. I think I'll go for a 2-lock approach (separate head/tail locks) for now. That's what the JVM one is doing (turns out JVM one's source is public domain :)) | 12:30 | |
Timbus | m: my @a = <0 9 8 7>; say @a[0,2...@a.end]; | 12:31 | |
camelia | rakudo-moar bfe22c: OUTPUT«(timeout)» | ||
Timbus | m: my @a = <0 9 8 7>; say @a[0,2...*]; | 12:33 | |
camelia | rakudo-moar bfe22c: OUTPUT«0 8» | ||
Timbus | oh. | ||
jnthn | m: my @a = <0 9 8 7>; say @a[0,2...+@a]; | 12:35 | |
camelia | rakudo-moar bfe22c: OUTPUT«0 8 (Any)» | ||
jnthn | m: my @a = <0 9 8 7>; say @a[0,2...^+@a]; | ||
camelia | rakudo-moar bfe22c: OUTPUT«0 8» | ||
jnthn | That may be better. | ||
12:38
berekuk_ joined,
berekuk left,
tgt joined
|
|||
timotimo | i might need to write a test file for semaphores to ensure that the moarvm implementation is even right | 12:40 | |
jnthn | We need one anyway. | 12:41 | |
Timbus | m: my @a = <0 9 8 7>; say @a[1,3...^+@a]; | ||
camelia | rakudo-moar bfe22c: OUTPUT«(timeout)» | ||
jnthn | Timbus: The ending condition has to be met exactly | 12:42 | |
Can put a code block there with a comparison op | |||
timotimo | i'm surprised ...* doesn't actually infiniloop; ... should interpret * manually, should it not? | 12:43 | |
m: say (0,2...*)[^50] | |||
camelia | rakudo-moar bfe22c: OUTPUT«0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60 62 64 66 68 70 72 74 76 78 80 82 84 86 88 90 92 94 96 98» | ||
timotimo | m: say (0,1...20)[(0,2...*)[^10]] | ||
camelia | rakudo-moar bfe22c: OUTPUT«0 2 4 6 8 10 12 14 16 18» | ||
timotimo | interesting | ||
i'm not sure i understand. | 12:44 | ||
JimmyZ | libuv has a good queue.h file but it's without lock | 12:45 | |
Timbus | at a guess its a whatevercode block inside the [], not a whatever being passed to the seq | ||
timotimo | Timbus: i know how the whatevercode generation code looks like :) | 12:46 | |
in my mental model, it shouldn't know about that there's a [ ] around it at the point where it encounters the ... operater | 12:47 | ||
Timbus | i think i follow you. after it's been given the size it.. huh. why doesnt it infiniloop | 12:48 | |
m: my @a = <0 9 8 7>; say @a[1,3...*]; | 12:49 | ||
camelia | rakudo-moar bfe22c: OUTPUT«9 7» | ||
Timbus | well im going to use that then. because: @a[1,3...^*>=@a] this is bad and i feel bad | 12:50 | |
jnthn | JimmyZ: I don't see anything showing that's threadsafe, though. Plus it's not, afaict, public API. | 12:58 | |
JimmyZ | oh, yeah, I didn't realize it's not public API | 13:01 | |
btw, will we need rwlock? | 13:02 | ||
jnthn | Don't think so. | ||
13:10
kaare_ left
13:25
rindolf left
13:30
hugme left,
virtualsue left
13:31
hugme joined,
ChanServ sets mode: +v hugme
|
|||
dalek | p/moar-conc: cd2f5c7 | (Timo Paulssen)++ | src/vm/moar/QAST/QASTOperationsMAST.nqp: map semacquire, semtryacquire and semrelease on moar |
13:34 | |
hoelzro | good * #perl6 | 13:38 | |
yoleaux | 11:14Z <jnthn> hoelzro: I think rt.perl.org//Public/Bug/Display.html?id=119877 is fixed - please can you check? | ||
hoelzro | jnthn: thanks, I'll check | 13:39 | |
timotimo | jnthn: would a test file for semaphores help you/us? should it be a spectest or an nqp test? | 13:42 | |
jnthn | timotimo: Since we're adding a user-visible Semaphore class, should be spectest. | 13:45 | |
timotimo: It warrants an S17 addition to. | 13:46 | ||
*too | |||
hoelzro | timotimo, jnthn: did either of you get a chance to look at that multiple import moar bug I reported last night? | 13:47 | |
rt.perl.org/Ticket/Display.html?id=121298 | |||
jnthn | hoelzro: No, but got it open in a browser tab here. It's on my "to do soon" list | 13:50 | |
hoelzro | ok, cool | 13:51 | |
it was late when I reported it, so I wanted to make sure one of you had seen it =) | |||
timotimo | hoelzro: i did not get to it :( | 13:53 | |
but thank you kindly for golfing it | |||
hoelzro | np, it was interesting | ||
timotimo | i'll write a bit for the semaphore | 13:55 | |
the same kind of "use higher level instead if you can, but if you really, really, really need it, take this" | |||
actually, time to attend a presentation | 13:56 | ||
jnthn | "Typically you should acquire a higher level solution; this is just a release valve." :P | ||
timotimo | :) | 14:02 | |
14:06
hoverboard joined
|
|||
timotimo puts lock and semaphore under a common section | 14:06 | ||
jnthn | wfm | 14:07 | |
14:11
xinming joined
|
|||
timotimo | do i need a code example to spice up the text or will an explanation of the operations suffice? | 14:11 | |
i'll also write that acquiring and releasing multiple permits at once is not supported on all backends, so will not be offered | 14:12 | ||
JimmyZ | Do we need AtomicInteger repr too? | 14:14 | |
dalek | ecs: 7f3f23c | (Timo Paulssen)++ | S17-concurrency.pod: semaphore spec draft |
||
timotimo | JimmyZ: i asked it already and got no answer :P | 14:15 | |
JimmyZ | :/ | ||
timotimo | jnthn: there seems to be public interest in this :P | ||
jnthn | 10:59 <timotimo> jnthn: how do you feel about AtomicInteger getting its own REPR? | 14:16 | |
11:00 <jnthn> timotimo: It shouldn't. | 14:17 | ||
:P | |||
14:17
tgt left
|
|||
timotimo | oh | 14:17 | |
thank you! i didn't see that | |||
jnthn | ;) | ||
We'll get rid of it for now by doing a lock, and later we'll add CAS primitives. | |||
JimmyZ | I didn't see the Q&A :P | ||
jnthn | np :) | 14:18 | |
14:19
beastd|2 joined
|
|||
JimmyZ | I'm just thinking how to do CAS ... | 14:19 | |
14:19
[Sno]_ joined
|
|||
jnthn | JimmyZ: Needs rather careful design, as it needs to co-opt REPRs too... | 14:20 | |
14:20
beastd|3 joined
|
|||
timotimo | we'll be able to atomically CAS any P6opaque? | 14:21 | |
hoelzro | jnthn: thanks, it's fixed | ||
jnthn | timotimo: Not sure at present. I need to look at where the boundaries lie on JVM. | 14:22 | |
14:23
kst` joined,
FROGGS__ joined
14:24
takesako___ joined
14:30
Psyche^_ left
15:12
ilogger2 joined
15:13
xfix left,
Ulti_ left,
bjz left,
nwc10 left,
cooper left,
sftp left,
mattp__ left,
Ven left,
Zaydon_ left,
Alina-malina left,
Exodist left,
bonsaikitten left,
PerlPilot left,
Sqirrel_ left,
avuserow3 left,
flussenc1 left,
darutoko- left,
kst` left,
kshannon left,
pdcawley left,
dmol left,
klapperl_ left,
dagurval left,
Timbus left,
dalek left,
tadzik left,
risou_awy left,
integral left,
daniel-s__ left,
skids1 left,
rhr left,
LordVorp left,
takesako___ left,
FROGGS__ left,
xenoterracide left,
fridim_ left,
pecastro left,
Pleiades` left,
Gothmog_ left,
nebuchadnezzar left,
felipe left,
clsn left,
grep0r left,
timotimo left,
tokuhirom left,
hoelzro left
15:17
Vlavv joined,
mtk joined
15:19
jnthn joined
15:20
bakedb joined,
lizmat joined,
ilbot3 joined,
Nei joined
15:24
cxreg joined
15:26
silug__ joined,
hugme joined
15:28
ilbot3 left
15:29
cosimo joined,
robinsmidsrod joined,
pochi joined
15:33
[Coke] joined
15:34
[particle] joined
15:47
flussence joined,
cxreg left
15:51
Nei left,
jnthn left,
sunnavy joined
15:52
flussence left,
cosimo left,
perigrin joined,
silug__ left
15:53
itz joined
16:13
ilogger2 joined,
ChanServ sets mode: +v ilogger2,
colomon joined,
gfldex joined
|
|||
tadzik | fwiw, the Threads module has some example programs written with Semaphores | 16:13 | |
16:13
Tene joined,
Tene left,
Tene joined
16:14
Rotwang1 joined
16:18
cxreg joined,
amkrankruleuen joined
16:19
japhb_ left,
rurban_ left
16:20
silug__ joined,
Nei_ joined,
ruoso left,
lestrrat left,
japhb_ joined
16:21
simcop2387 left,
pnu_ left,
hoelzro left,
bakedb_ joined,
Nei_ is now known as Nei
16:22
rurban_ joined,
hoelzro joined,
lestrrat joined,
cxreg left
16:23
raydiak__ joined
16:24
ashleydev left,
ribasushi left,
Grrrr left,
vendethiel joined,
hugme joined
16:25
gfldex_ joined,
retupmoc1 joined
16:26
apejens joined
16:27
kurahaupo_mobile joined,
berekuk joined
16:28
clkao joined
16:29
cooper- joined
16:30
lestrrat left,
gfldex_ left
16:31
Zaydon joined,
timotimo left,
cooper- left,
Grrrr joined
16:32
apejens left,
Nei_ joined,
ashleydev joined,
lestrrat joined,
Nei left,
Nei_ is now known as Nei,
rurban1 joined,
itz_ joined
16:33
itz__ joined,
sunnavy joined
16:34
amkrankruleuen left,
amkrankruleuen joined
23:41
ilogger2 joined,
ChanServ sets mode: +v ilogger2
|
|||
Mouq | lue: What I mean is that <?{}> can put the AST of its contents into the tree. Quantifiers work by creating a partial AST node with how many repetitions it allows as named params, and then whatever it's quantifying injects itself into that node | 23:43 | |
lue: So the way things are now, AFAIK you'd have to get **{}'s compile time value | 23:44 | ||
or something | |||
:/ | |||
lue | Hrm, compile time won't cut it, 'cos you could always use bare ** for those :) | 23:45 | |
Mouq | r: =for pod :test(1+12)contentsay $=pod.perl | ||
camelia | rakudo-parrot b2b333, rakudo-jvm b2b333, rakudo-moar b2b333: OUTPUT«Array.new(Pod::Block::Named.new(name => "pod", config => ("test" => "1+12").hash, content => Array.new(Pod::Block::Para.new(config => ().hash, content => Array.new("content")))))» | ||
Mouq | lue: Yeah, I didn't think so | 23:46 | |
lue: So something would have to be restructured | |||
23:46
erkan joined,
bjz joined,
timotimo joined,
pnu_ joined,
ruoso_ joined,
sftp_ joined,
Celelibi joined,
__sri joined,
zamolxes joined
|
|||
lue | I wonder if **{} would require a retooling of how quantifiers work, or a separate node type | 23:46 | |
Mouq | also see | 23:47 | |
r: say "a b c" ~~ /:s(True) \w +/ | |||
camelia | rakudo-parrot b2b333, rakudo-jvm b2b333, rakudo-moar b2b333: OUTPUT«Nil» | ||
Mouq | r: say "a b c" ~~ /:s \w +/ | 23:48 | |
camelia | rakudo-parrot b2b333, rakudo-jvm b2b333, rakudo-moar b2b333: OUTPUT«「a b c」» | ||
Mouq | (although that's partially an issue with the way the grammar handles :s) | 23:49 | |
n: say "a b c" ~~ /:s(True) \w +/ | 23:51 | ||
camelia | niecza v24-109-g48a8de3: OUTPUT«===SORRY!===Action method mod_arg not yet implemented at /tmp/Lpz5NyMx2P line 1:------> say "a b c" ~~ /:s(True)⏏ \w +/Unhandled exception: Cannot parse number: (True) at /home/p6eval/niecza/bo…» | ||
Mouq | std: say "a b c" ~~ /:s(True) \w +/ | ||
camelia | std 09dda5b: OUTPUT«ok 00:01 126m» | ||
23:56
bnebheni joined
23:58
bnebheni left,
erkan left,
bjz left,
timotimo left,
pnu_ left,
ruoso_ left,
sftp_ left,
Celelibi left,
__sri left,
zamolxes left
|