»ö« 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:00 berekuk left 00:04 sftp left 00:12 sftp joined, Psyche^_ joined
jnthn evening, #perl6 00:13
preflex jnthn: you have 2 new messages. '/msg preflex messages' to read them.
00:14 berekuk joined 00:16 Psyche^ left
jnthn lizmat: Thanks for working on that 00:16
lizmat: I'll update the slides for my NPW talk
lizmat ok
jnthn lizmat: It's probably good for me to do that to make sure I know what to say when I give the talk ;)
lizmat there is one pb with .cue 00:17
that I don't undersnad
(hehe)
jnthn Oh?
Maybe I can .cure it :P
lizmat I hope
jnthn drank the most coffee-tasting stout in his life this evening...
It was actually like expresso.
lizmat $*SCHEDULER.cue gives:
Ambiguous call to 'cue'; these signatures all match:
:(ThreadPoolScheduler : &code, Mu *%_)
but I don't see anything wrong with the candidates 00:18
in src/vm/jvm/core/ThreadPoolScheduler.pm
dalek kudo-star-daily: e80a7f1 | coke++ | log/ (4 files):
today (automated commit)
lue probably just yak-shaved himself into writing a couple of Pod6 modules in the interests of P6-ifying the perl6/book repo :)
dalek rl6-roast-data: e139d7d | coke++ | / (5 files):
today (automated commit)
00:19
rl6-roast-data: 11112ec | coke++ | / (5 files):
today (automated commit)
jnthn lizmat: Wait, just a plain, empty, $*SCHEDULER.cue?
lizmat jnthn: line 54 and following
no, cue({...})
no named params
jnthn oh...
I don't think you can do stuff like 00:20
multi method cue(&code) { ... }multi method cue(&code) { ... }
oops
multi method cue(&code) { ... }
in the role
I mean, the "requirement" thing works at the level of top-level routines and doesn't look into multi candidate lists.
tbh I'd leave a method cue(|) { ... } in the role 00:21
And then move the proto into the implementing things
lizmat so it needs to be a single .cue that handles all permuattions?
jnthn Not saying that
You can implement it as a multi
lizmat ok, so take it out of Schediuler
jnthn Just saying that the in the role, you want a single stub method
lizmat and put it in ThreadPoolScheduler and CurrentThreadSchdeuler ? 00:22
jnthn Right
lizmat ok
jnthn This does raise a spec issue. :)
But that's the fix, anyways.
lizmat building 00:23
00:24 berekuk left 00:26 dmol left 00:33 sftp left, johnny5_ left 00:34 sftp joined 00:35 johnny5_ joined 00:37 johnny5_ left 00:39 johnny5_ joined
dalek kudo/nom: e4d07a1 | (Elizabeth Mattijsen)++ | src/vm/jvm/core/ (3 files):
Further Scheduler tweaks
00:52
lizmat getting further but still failing scheduler.t 00:53
jnthn: too tired now, will look at tomorrow
gnight #perl6!
jnthn lizmat: OK :) 00:58
jnthn is too tired too :)
00:58 wbill joined
jnthn 'night o/ 00:59
01:07 xenoterracide left 01:14 daniel-s joined 01:19 Rotwang left 01:26 ingy^ joined 01:36 johnny5_ left 01:37 johnny5_ joined 01:41 ingy^ left, benabik joined 01:43 eternaleye left 01:45 johnny5_ left, eternaleye joined 01:46 johnny5_ joined 01:50 benabik left 01:52 johnny5_ left 01:53 johnny5_ joined 01:57 johnny5_ left 01:58 johnny5_ joined 02:02 Shellcat left 02:07 araujo left 02:08 araujo joined 02:17 FROGGS left 02:19 jnap left 02:21 FieldsaBB joined 02:31 davecc joined 02:35 LordVorp left, LordVorp joined 02:37 pdurbin joined 02:38 dwarring left 02:39 FROGGS joined 02:54 FROGGS left 02:56 FROGGS joined, wbill left 03:01 wbill joined 03:34 FROGGS left 03:52 FROGGS joined
[Coke] yawns. 03:54
diakopter . 04:04
04:06 rurban joined
timotimo has some trouble sleeping 04:07
tadzik watch some classic, but boring film 04:09
last time I checked, the space odyssey was 3 hours long
they say it's a blasphemy to fast-forward the boring parts 04:10
04:18 Shellcat joined 04:19 ggoebel15 left 04:23 preflex_ joined, ChanServ sets mode: +v preflex_ 04:24 preflex left, preflex_ is now known as preflex 04:32 telex left
tadzik (look, I put timotimo to sleep just by talking about it) 04:32
04:36 FROGGS left, telex joined 04:44 BenGoldberg left
timotimo no you did not :( 04:51
04:53 FROGGS joined
tadzik :( 04:55
04:55 cognominal joined
tadzik sweet kitty soft kitty little ball of fur 04:55
something something something something purr purr purr 04:56
lue r: sub song($a, $b, :$ndverse = 1) { print "$a kitty, $b kitty, "; say ($ndverse - 1) ?? "purr purr purr." !! "little ball of fur;" }; song("soft", "warm"); song("happy", "sleepy", :2ndverse); 04:59
camelia rakudo-jvm 882e33: OUTPUT«===SORRY!=== Error while compiling /tmp/Q0k91_iNhN␤Malformed radix number␤at /tmp/Q0k91_iNhN:1␤------> ft", "warm"); song("happy", "sleepy", :2⏏ndverse);␤ expecting any of:␤ number in radix notation␤»
..rakudo-parrot e4d07a: OUTPUT«===SORRY!=== Error while compiling /tmp/au54O86JmH␤Malformed radix number␤at /tmp/au54O86JmH:1␤------> ft", "warm"); song("happy", "sleepy", :2⏏ndverse);␤ expecting any of:␤ number in radix notat…»
lue std: sub song($a, $b, :$ndverse = 1) { print "$a kitty, $b kitty, "; say ($ndverse - 1) ?? "purr purr purr." !! "little ball of fur;" }; song("soft", "warm"); song("happy", "sleepy", :2ndverse); 05:00
camelia std 8adbc60: OUTPUT«ok 00:01 133m␤»
lue n: sub song($a, $b, :$ndverse = 1) { print "$a kitty, $b kitty, "; say ($ndverse - 1) ?? "purr purr purr." !! "little ball of fur;" }; song("soft", "warm"); song("happy", "sleepy", :2ndverse);
camelia niecza v24-98-g473bd20: OUTPUT«Use of uninitialized value in string context␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 1355 (warn @ 5) ␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 266 (Mu.Str @ 15) ␤ at <unknown> line 0 (ExitRunloop @ 0) ␤ at /home/p6eval/…»
lue (Apparently it's not ok for *me* to dare use the :2nd adverb trick...)
05:04 benabik joined 05:06 rurban left 05:08 rurban joined, krunen joined 05:10 broquain1 joined, smash__ joined, mtj_- joined, telex left, telex joined 05:11 johnny5_ left, krunen_ left, mtj_ left, broquaint left, jtpalmer left, jtpalmer joined, johnny5_ joined 05:12 rurban1 joined, tokuhirom joined 05:13 rurban left 05:17 rurban1 left 05:53 nnunley left 05:54 davecc left 06:12 darutoko joined 06:39 kaare_ joined 06:43 rurban joined 06:47 rurban left
moritz \o 06:53
timotimo o/ 06:54
timotimo investigates what the performance implication of using native ints for DateTime is 07:01
bleh. stage post for the core setting takes 77 seconds on my laptop 07:03
that's a target for optimizations some day, too
07:07 nnunley joined
timotimo i'm glad the intermediate text stage has been left out for moar 07:07
stringifying all the stuff can only lead to sadness
Woodi hi everyone :) 07:09
timotimo good day woodi
well, to be fair, the optimizer takes 33 seconds, too ... i wonder if i've gone a bit over board with the optimizations lately? :P 07:11
07:11 nnunley left
timotimo no improvement with native ints? huh. 07:14
Woodi there is ARMA / Operation Flashpoint (games, military theme) scripting language and it seems quite user friendly :) it run on VM. it have 'call' for functions but also 'spawn' for running functions in background. it also have 'execVM' for firing FSM's (Finite State Machines) files eg. guard is patrolling walking 'Paths', having 'Sensors' buildin, guard can report 'All OK' or can start to shoot... 07:17
or zombie is (still) patrolling and 'follow' when see a 'target' :) 07:18
syntax for calling is via lists: ["param1", _listOfLists, "more", "params"] call funcName; 07:20
and in func: _param1 = _this select 0; _param2 = _this select 1; 07:21
what quite reminds old, good Perl syntax :) and looks quite CPU-friendly, or VM-stack friendly... 07:22
07:23 cognominal left
timotimo hmm 07:23
Woodi makes me thing Perl designer have in mind eventual sub calls optimization via rewriting it in asm :)
FSM have syntax like scripts with a kind of 'preprocesor' directives for defining nodes and arcs 07:25
and game servers are CPU heavy :) no idea is Arma VM spawns real threads but that 'spawn' into background functionality is perfect for scripter 07:26
thinked about sharing this for some time and #moarvm discussion triggerered something probably :) 07:27
on the other topic: CSP was designed with Transputers in mind - many CPUs comunicating via common bus. multicores are more similiar to plain cpu and using sharing memory insted of communications looks much more efficient and natural for amateur eye... 07:31
also: amateur comes from French amateur "lover of" (some thing) - love is good thing ! in contrast 'proffesional' comes from what ? ;) 07:35
timotimo hm. my int $x = 1000; my int $y = $x + 500; in PIR does 2 unboxings and 2 boxings ... why? :|
i suppose it's for typechecking the return value from the inlined operator 07:36
gist.github.com/timo/ba460c27719f23f6fa51 - like this 07:37
perhaps it's using the Int, Int --> Int variant instead of the/a int, int --> int variant? 07:38
or is perl6_box_int actually for int and the same thing for Int looks different? 07:39
ah, with Int it doesn't seem to inline, it gets the two Int objects from the world and does a full call to &infix:<+> 07:40
i wonder if it'd be worthwhile to do a pass on the PIR to see things like "create a Resizable*Array, push $CONST_N values in, use the Array" could be found and have a "pre-allocate exactly $CONST_N slots" call after creation? 07:47
masak Woodi: "CSP"? 07:56
(oh hai, #perl6)
07:56 cognominal joined
moritz good morning, masak 07:57
masak Woodi: re 'professional', it seems to come from Medieval Latin's "professiō", "[I] take a vow [of a religious order]" 07:59
08:04 FROGGS left 08:07 p5eval joined
masak as it happens, I have a bit of disposable time today for p6ery. 08:17
modulo external influences, I will probably spend it on t4 reviews.
08:18 FROGGS joined
timotimo sounds good to me :) 08:19
i think perf may be a too low-level tool to get good measurements out of parrot and friends
"ah, so mov 0x10(%rax),%rsi is the culprit!" 08:21
masak :) 08:22
08:27 berekuk joined 08:45 rurban joined 08:47 FieldsaBB left 08:51 rurban left
masak hehe. seen on Hacker News: "Poe's law is strong with this one" :) 08:57
09:04 [Sno] left 09:06 [Sno] joined 09:09 cognominal left 09:17 berekuk left 09:34 berekuk joined 09:37 Shellcat left
dalek ast: da2ccdc | (Tobias Leich)++ | S02-types/hash.t:
test for RT #73230
09:38
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=73230
09:43 cognominal joined
dalek ast: 535f150 | (Tobias Leich)++ | S02-types/hash.t:
fixed test for RT #73230
09:44
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=73230
09:46 cognominal left
FROGGS p: use Test; class Bar { } 09:48
camelia ( no output )
FROGGS n: use Test; class Bar { }
camelia ( no output )
FROGGS pugs: use Test; class Bar { }
camelia pugs: OUTPUT«pugs: *** Unsafe function 'use' called under safe mode␤ at /tmp/BcCsKaU4eg line 1, column 1␤»
dalek ast: dd282b8 | (Tobias Leich)++ | S10-packages/use-with-class.t:
test for RT #73910
09:49
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=73910
masak FROGGS++ # RT spectests 09:52
Woodi about scripting games: language is called 'sqf'; github.com/vbawol/DayZ-Epoch/blob/...onitor.sqf 09:56
csp: en.wikipedia.org/wiki/Communicatin...processes; but it later evolved and is probably quite usefull 09:58
masak .oO( So Quite... Forth? ) 10:02
Woodi: I hope the future will contain lots of scriptable virtual worlds. it feels like a fairly safe bet that it will. 10:03
CSP looks a bit like a precursor to pi calculus. 10:04
lunch & 10:05
10:05 sqirrel joined, cognominal joined
Woodi if some perl6 implementation can listen to telnet connections then MUDs can be done right now :) 10:22
timotimo yeah, parrot and jvm already can 10:25
Woodi I always wanted to parse DIKU-style area files in automatic way ;) 10:31
10:32 Jeffrey joined 10:35 Jeffrey left 10:40 JeffreyKegler joined 10:43 denisboyun joined
dalek kudo/nom: be3eea7 | (Elizabeth Mattijsen)++ | src/vm/jvm/core/ThreadPoolScheduler.pm:
Fix copy-n-pasto thinko with JVM interop
10:44
10:46 JeffreyKegler left 10:48 rurban joined 10:49 berekuk left, ssutch left 10:51 kaare_ left 10:52 berekuk joined 10:53 rurban left, Rotwang joined
dalek ast: d67e271 | (Elizabeth Mattijsen)++ | S17-concurrency/ (6 files):
Make S17-concurrency fudgeable for rakudo.parrot
10:58
kudo/nom: 631c5e2 | (Elizabeth Mattijsen)++ | t/spectest.data:
Add S17-concurrency tests to roast
10:59
moritz 19 files changed, 1193 insertions(+), 6 deletions(-) 11:00
from my last pull
uhm, is the concurrency stuff twice in there now?
lizmat is this for nom? then yes, looks like a lot 11:01
However, no
I added 14 files
splitting Threading.pm into logical components
so maybe it *is* correct
moritz splitting a file shouldn't cause 1k more lines 11:02
timotimo yeah, it should have an equal amount of deletions
but didn't you keep the old threading.pm around, lizmat?
lizmat yes, I did, for now
actually *am* about to remove it now
at least in the repo :-)
11:03 Rotwang left
moritz ok, that explains a lot 11:03
dalek kudo/nom: 450519b | (Elizabeth Mattijsen)++ | src/vm/jvm/core/Threading.pm:
Threading.pm has served its purpose
11:04
timotimo here's a funny for you: sprintf("%s%s%s%s", "foo", "bar", "baz", "quux") is about 10% faster than join("", ["foo", "bar", "baz", "quux"]) 11:05
moritz but it doesn't do that same thing, no? 11:06
join with a [] stringifies the array
p: say ~["foo","bar", "baz", "quux"]
camelia rakudo-parrot e4d07a: OUTPUT«foo bar baz quux␤»
moritz still shouldn't be that slow
timotimo oh?
moritz p: say join '', ["foo","bar", "baz", "quux"] 11:07
camelia rakudo-parrot e4d07a: OUTPUT«foo bar baz quux␤»
timotimo you're right, i'm dumb :)
OK, that's quite a bit faster 11:08
dalek ast: 123ce1e | (Elizabeth Mattijsen)++ | S17-concurrency/lock.t:
Make "pass" visible to the rakudo.parrot fudger
timotimo i was probably thinking of nqp::join
i wonder why nqp::join is soooooo much faster than perl6's join 11:14
lizmat boxing/unboxing ?
timotimo rakudo does 10000 in 17 seconds, nqp does 10000000 in 22 seconds 11:15
that's 10_000 and 10_000_000 11:16
masak liked curiousprogrammer.wordpress.com/201...ent-skins/
11:17 sqirrel left 11:21 Rotwang joined 11:24 berekuk left 11:30 dmol joined 11:39 berekuk joined
jnthn afternoon, #perl6 11:40
timotimo good day jnthn :) 11:41
jnthn Finally. A decent amount of sleep. 11:43
masak you're writing in your sleep? :P
jnthn maybe... :P
timotimo jnthn: do you have an idea for me what i could try to optimize? :| 11:44
i'm in a "rakudo is too slow" mood
i plugged eqat into the implementation of "literal" QRegex nodes on parrot btw. at first i measured a 10% speed improvement, but it turned out to be just noise :( 11:45
masak .oO( after waking up, jnthn could not decide whether he was a programmer dreaming of compilers, or a compiler dreaming of programmers )
11:45 cognominal left
timotimo jnthn: could there be something wrong with the inliner, btw? i looked at the PIR rakudo generates for "my int $foo = 1000; my int $bar = $foo + 500" and it had 2x perl6_box_int and 2x repr_unbox_int (OSLT) 11:49
masak TIL: "factoring" is AmE, and in other varieties of English it's called "factorising". I wonder if (but doubt that) this goes for the programming term as well as the math concept.
jnthn timotimo: That sounds rather wrong... 11:50
timotimo gist.github.com/timo/ba460c27719f23f6fa51
also, i'm wondering if it'll be super hard to get rid of the perl6_type_check_return_value, because the last statement of the function is known, at nqp level, to return an int and should thus be fine 11:51
jnthn perl6_type_check_return_value
ah...
Right.
timotimo yes, that's how i figured out it was doing the inlining
well, that and _inline_arg_1 :)
i got there by wondering why the hell get-local-timezone-offset contributes 0.1s to each startup of rakudo (an empty program takes 1.1s on my machine, so it's almost 10%) 11:54
then i put "int" in front of all the variables in the calculations that seemed to contribute the biggest portion of the time and saw no change whatsoever
dalek ast: 1057aed | (Elizabeth Mattijsen)++ | S17-concurrency/thread.t:
Added thread ID test before .join
12:10
12:11 dmol left
dalek ast: 650fd6e | (Elizabeth Mattijsen)++ | S17-concurrency/thread.t:
Added todo test for lockable variables
12:11
lizmat jnthn: todo test to show the problem mostly, no solution yet, I know :-) 12:12
at least it doesn't segfault :-)
jnthn lizmat: Well, it's extremely questionable to me if that's a bug. 12:16
lizmat for *you*, yes
jnthn lizmat: The entire point of the primitives I've been pushing is that you do *explicit* inter-task communication.
"Doesn't segfault" - yes, we should not segfault on such things, on any backend. That much I can agree with. :) 12:17
lizmat in any case, it is an easy mistake to make 12:18
especially when using threads/promises/channels with modules that don't know about these things
jnthn *nod*
lizmat so we should at least test that it doesn't segfault 12:19
:-)
jnthn Yeah, but then the test should be passing already :P 12:20
lizmat well.. eh,. can we catch segfaults?
ah, ok
timotimo i don't think we can, actually
lizmat hmmm...
jnthn No, but dies_ok... :)
Means no excetion
And if there's an explicit test plan and you segfaut the VM, you never emit the ok
And that means the harness considers it a fail. 12:21
timotimo yeah
jnthn Thing is that it's easy to look at this case and say "oh, let's do X to make it work". But in general you can't do this by static analysis. 12:22
Which means you have to pessimize almost every variable access. Which we really, really do not want to do. 12:23
dalek ast: b2a26fc | (Elizabeth Mattijsen)++ | S17-concurrency/thread.t:
Make test always pass, as discussed on #perl6
lizmat I was more thinking about pessimising it only for variables with a certain trait 12:24
jnthn ah 12:25
Maybe. But trouble is that even that's not the real problem here
lizmat ah?
jnthn Reading a scalar or binding a value to it is an attribute access, and that already is all-or-nothing 12:26
lizmat problem that ++ in rakudo is not atomic ?
jnthn It's the ++ operator
s/in rakudo/in every mainstream language I knwo of/ ;)
But yeah, it's about the ++
lizmat maybe it would be a thing to introduce an atomic +++ op ? 12:27
jnthn hmm :) 12:28
$a += 5 # immediately the same problem
lizmat conversely, an atomic --- as well
jnthn All these things are ameanable to cas-like things as retrying them is harmless 12:29
12:29 tobyink joined
lizmat indeed 12:29
std: my $a; $a+^+
camelia std 8adbc60: OUTPUT«===SORRY!===␤Prefix requires an argument at /tmp/zhcR_qB4gb line 1 (EOF):␤------> my $a; $a+^+⏏<EOL>␤Other potential difficulties:␤ +^+ is not an infix operator (to suppress warning put space between infix +^ and pr…»
lizmat std: my $a; $a^-
camelia std 8adbc60: OUTPUT«===SORRY!===␤Prefix requires an argument at /tmp/x9nyi5eqFK line 1 (EOF):␤------> my $a; $a^-⏏<EOL>␤Other potential difficulties:␤ ^- is not an infix operator (to suppress warning put space between infix ^ and prefi…»
lizmat std: my $a; $a-^-
camelia std 8adbc60: OUTPUT«===SORRY!===␤Prefix requires an argument at /tmp/urVazIM57b line 1 (EOF):␤------> my $a; $a-^-⏏<EOL>␤Parse failed␤FAILED 00:01 124m␤»
masak "Prefix requires a term", more like. 12:32
"argument" plays on the wrong end of the operator-function analogy.
lizmat I'm just worried that porting modules from p5 "verbatim" would introduce problems in concurrent code 12:33
more worringly, introduce heisenbugs
masak suggests 'atomic { $x++ }' instead 12:35
with or without the braces.
keyword name negotiable.
anyway, I'd rather see that than introducing atomic flavors of existing operators. 12:36
jnthn atomic { ... } is heading to scary STM land :)
lizmat masak: that's all nice and dandy, but that would force knowledge of concurrency onto module developers
worse: it would need rethinking standard modules
masak lizmat: I should hope so!
lizmat perhaps that's also a good thing :-) 12:37
masak lizmat: "force knowledge onto", that is.
jnthn lizmat: Standard modules that are essentially "pure" in their operation are untroubled.
masak lizmat: I don't believe it's realistic to be threadsafe and also be unaware of thread safety.
jnthn lizmat: Perhaps most importantly, though, there are ways to build tools that detect data races. 12:38
lizmat: We'd do well to learn about those and steal the best ideas. :)
lizmat atomic {} has its uses without STM
jnthn On $a++, what's spec'd today is cas $a, { $_ + 1 } 12:39
(Though not implemented)
12:39 Rotwang left
lizmat feels we need sugar for that 12:39
but yes
jnthn lizmat: You need to have an implementation strategy for it, though. I thought STM was that?
lizmat atomic is really just about not being interrupted 12:40
so, I guess the opposite of yield
jnthn A code-level mutex?
lizmat but I'm not sure VM's support that?
jnthn Well, depends what you're asking for... :) 12:41
lizmat hehe, just looking at the old S17, which was morphed from my original vision :-) 12:42
timotimo jnthn: doesn't that lack a loop? or is the loop inside the cas itself?
jnthn timotimo: Yes, that's the point o fthe code-block-taking cas. To factor the loop out. :)
lizmat timotimo: in the cas itself
jnthn It's quite cute.
timotimo oh! 12:43
is that so :)
jnthn has written/taught writing that kinda loop enough times to figure it should just be factored out :)
timotimo it's nice we can just do that sort of thing 12:44
jnthn Heck, there was one in the C# class I was doing yesterday :)
timotimo r: Q:PIR { new $P5004, 'ResizableStringArray'; push $P5004, "hello world"; push $P5004, "hello world"; push $P5004, "hello world"; push $P5004, "hello world"; push $P5004, "hello world"; push $P5004, "hello world"; push $P5004, "hello world"; push $P5004, "hello world"; push $P5004, "hello world"; } 12:46
camelia rakudo-parrot 450519: OUTPUT«===SORRY!===␤error:imcc:syntax error, unexpected ';', expecting '\n' (';')␤ in file '(file unknown)' line 65␤␤»
..rakudo-jvm 882e33: OUTPUT«===SORRY!===␤Error while compiling op call: To compile on the JVM backend, QAST::VM must have an alternative 'jvm'␤»
timotimo ah
lizmat jnthn: I'll think about it some more
timotimo r: Q:PIR { new $P5004, 'ResizableStringArray'␤ push $P5004, "hello world"␤ push $P5004, "hello world"␤ push $P5004, "hello world"␤ push $P5004, "hello world"␤ push $P5004, "hello world"␤ push $P5004, "hello world"␤ push $P5004, "hello world"␤ push $P5004, "hello world"␤ push $P5004, "hello world"␤ } 12:47
camelia ( no output )
..rakudo-jvm 882e33: OUTPUT«===SORRY!===␤Error while compiling op call: To compile on the JVM backend, QAST::VM must have an alternative 'jvm'␤»
timotimo jnthn: do you think it would be worth anything at all to find this kind of code in PIR-compiled output and put a "setelems $N; setelems 0" after the "new"?
because we know the exact amount of things we want to push?
jnthn timotimo: Belongs in nqp::list, nqp::list_s etc implementaiton, just don't do it for the 0 case :) 12:51
timotimo oh
well, that's nice :) 12:52
oh hey, it seems super simple to do even! 12:53
12:56 Rotwang joined, xenoterracide joined
timotimo how do i find out what pirop i need to push to set the element count of the RPMCA? 12:56
also, how come we still use RPMCA instead of QRPA? 12:57
wasn't that supposed to be way faster? i think it was :)
maybe i should investigate that again
nqp-p: my $t := nqp::time_n(); my $l := nqp::qlist(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); nqp::pop($l); nqp::pop($l); nqp::shift($l); nqp::shift($l); nqp::push($l, 99); nqp::unshift($l, -1); nqp::say(nqp::time_n() - $t); 12:59
camelia nqp-parrot: OUTPUT«2.21729278564453e-05␤»
timotimo wow, that was fast
nqp-p: my $t := nqp::time_n(); my $l := nqp::list(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); nqp::pop($l); nqp::pop($l); nqp::shift($l); nqp::shift($l); nqp::push($l, 99); nqp::unshift($l, -1); nqp::say(nqp::time_n() - $t); 13:00
camelia nqp-parrot: OUTPUT«6.19888305664062e-06␤»
timotimo well, that was ... faster
but it's probably very noisy at that level of speed
timotimo tries for a better benchmark
the benchmark is probably not better, but qrpa is a tiny bit faster in it ... 13:02
13:03 denisboyun left 13:04 nnunley joined 13:06 denis_boyun joined 13:08 sqirrel joined 13:10 cognominal joined
dalek kudo/nom: abdccca | (Elizabeth Mattijsen)++ | src/vm/jvm/core/ (3 files):
Still more S17 up-to-specness

Scheduler.outstanding -> Scheduler.loads
13:10
13:11 denis_boyun left
dalek ast: 0c3d669 | (Elizabeth Mattijsen)++ | S17-concurrency/scheduler.t:
S17: Scheduler.outstanding -> Scheduler.loads
13:12
lizmat hmmm.... .cue with every *and* :at or :in seem broken :-( 13:15
jnthn oh noes you busted it :P 13:16
Probably "just" mis-using the API or something... 13:17
(The Java Timer one, that is)
lizmat yeah, probably 13:18
although there was no test for it before, so how can we tell ?
jnthn Point ;)
lizmat I just realize: with these cued tests and the evalserver, they will just continue running 13:19
jnthn How about 11:50 on the Friday? 13:20
lizmat I guess I need to add a flag to make them stop
jnthn uh, oops
lizmat hmm.... how do I stop something that is restarted every .1 second ? 13:21
jnthn Not sure ;) 13:22
We don't have a way yet I think. Just didn't get to that yet :)
lizmat not even specced :-) 13:24
masak what's .cue meant to return?
maybe this is one of those "return a convenient handler object" situations?
jnthn masak: Probably 13:25
Ties into the more general issue of cancellation
Which is one of the under-worried-about areas so far :)
masak I can read through S17 with an eye towards cancellation. 13:26
jnthn
.oO( Cancellable eye for the async guy )
13:27
masak "cancellable eye" sounds kinda gross :) 13:31
13:32 berekuk left 13:34 berekuk joined
masak $*SCHEDULER.cue in all its varieties should definitely return such an object. (how about calling the class Cue, too?) 13:35
lizmat how is .cue then different from a thread ? 13:36
masak sorry, what? it's still the same, except it can now be canceled.
lizmat because it can be scheduled on an existing thread
masak no direct relation to threads at all. 13:37
lizmat yup, got that :-)
masak this is the nice thing about schedulers. they allow us to control things from above :)
scheduling as well as canceling.
cancellation*, whatever
it's an open question whether it should be an error condition to .uncue something that has already happened (and isn't an :every) 13:38
(re $*SCHEDULER.loads) "[Conjecture: perhaps these should be separate methods.]" -- rather than an array of arbitrary positional things? why, yes, please. :) 13:39
lizmat yes, we internally, with/without in/at/every are two different things
*well 13:40
masak right. all of those variants *can* be uncued before they happen.
13:40 pippo joined
masak but :every is different in that it happens more than once. 13:40
pippo o/ #perl6 13:41
jnthn That's like, "before it happens *again*" :)
masak jnthn: right.
FROGGS hi pippo 13:42
hi all
masak anyway, the only open question so far is whether it's a no-op or an error to .uncue schedulings that were *not* :every, and already triggered.
hi FROGGS++
FROGGS ?
masak ! 13:43
FROGGS .
masak Promises seem to be totally exempt from needing Cue objects and the like.
lizmat I would say trying to stop a Cue object that didn't have an "every" or an "at/in" 13:44
would be an error
masak though I notice when skimming through that section, that there's an .in method and an .at method, but no .every method. that feels like an omission.
lizmat: interesting -- why?
lizmat because you cannot know whether sometihng ran already or not 13:45
unless you're going to wrap the Callable somehhow
masak the scheduler knows whether it started or not. 13:46
so maybe an error if it already started?
lizmat no, in Perl6 land, the scheduler does *not* know whether it started
in JVM land maybe
masak maybe I am using the wrong term. the scheduler knows whether it already scheduled something. :) 13:47
if not, how could it avoid scheduling the same thing twice?
13:47 pippo left
lizmat the .cue method hands it off to JVM to do the scheduling 13:47
masak ok. then I agree. 13:48
then it's the conservative thing to have it be an error condition.
lizmat perhaps we can interrogate the JVM
masak perhaps.
jnthn lizmat: The scheduler does know... :)
rjbs- Is "cue" an existing term of art, here? 13:49
jnthn In fact that's basically its jub :)
13:49 rjbs- is now known as rjbs, rjbs left, rjbs joined
masak rjbs: it's TimToady's spelling of .schedule 13:49
rjbs I think that's going to lead to real confusion. 13:50
masak jnthn: yes, that was my point
rjbs "Oh, I should queue this task?" "Yes." "It didn't work." "Oh, it's cue, not queue."
lizmat fwiw, Perl6 doesn't have queues
13:50 pochi left
rjbs lizmat: Sure, but jargon cross-pollenates. 13:50
It's a cue-t name, but…
lizmat well, Perl6 doesn't have async either 13:51
masak rjbs: see github.com/perl6/specs/commit/f597...2cc284827a
jnthn otoh, you're not really going to interact with the scheduler directly that often 13:52
masak rjbs: homonyms in CS are not unheard of. cf "tree" and "trie", for example.
jnthn So it's not like most people will .cue that much
rjbs masak: I totally agree, but that doesn't mean we shouldn't consider the confusion they can create before adding more!
jnthn Most will start { the_party }, not $*SCHEDULER.cue({ the_party }) 13:53
13:55 sqirrel left
FROGGS jnthn: what signature do I need if I want to slurp n (three in this case) lists? gist.github.com/FROGGS/a6c7ba8f673eb2818dd1 13:55
lizmat $*SCHEDULER.cue( &cycling ) 13:56
jnthn FROGGS: Are you after **@lol? 13:57
FROGGS maybe 13:58
lol sounds about right :o)
ohh yes 13:59
jnthn++
14:02 tobyink left
Woodi ad. atomic: we have experimental '__transaction_*' primitive in gcc now. also it is proposed as new feature to C++/C by ppls from Intel, IBM, HP, Oracle and Red Hat :) - so nearly 100% of cpu manufacturers. gcc implements it as library and via global lock. generated assembler code calls that library so probably we have new market for transactional libraries :) but all that is probably a preparation for HTM in processors. 14:08
but that __transaction_* constructs works on native types and we want something like: 14:10
class Account does Atomic { has NumericType balance; ...} # where NumericType isn't native for eg. financial purposes... 14:11
so high level transaction construct would be nice for Perl6 used by all banks around the globe :) 14:12
here is nice link: www-users.cs.umn.edu/~boutcher/stm/ 14:14
14:17 tobyink joined 14:33 M_o_C joined
FROGGS nr: n: .say for 1, 2, 3 ... 10, 20 ... 100, 125 ... 200 # will push a fix after spectest 14:35
camelia niecza v24-98-g473bd20: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤20␤30␤40␤50␤60␤70␤80␤90␤100␤125␤150␤175␤200␤»
..rakudo-jvm 882e33: OUTPUT«Cannot call 'infix:<...>'; none of these signatures match:␤:($a, Mu $b)␤ in any at gen/jvm/BOOTSTRAP.nqp:1201␤ in block at /tmp/VGEXl1nxL3:1␤ in any eval at gen/jvm/stage2/NQPHLL.nqp:1086␤ in any evalfiles at gen/jvm/stage2/NQPHLL.nqp:1292…»
..rakudo-parrot abdccc: OUTPUT«Cannot call 'infix:<...>'; none of these signatures match:␤:($a, Mu $b)␤ in any at gen/parrot/BOOTSTRAP.nqp:1218␤ in any at gen/parrot/BOOTSTRAP.nqp:1209␤ in sub infix:<...> at gen/parrot/CORE.setting:16316␤ in block at /tmp/ZmwImpXFbk:1…»
FROGGS ahh, labels++
masak rjbs: agree about not adding undue confusion. I hadn't thought about the risks of cue/queue before you mentioned them. 14:44
rjbs masak: I am glad to have raised the issue. Also, if the method is rarely called (as someone said abovee) then it need not be short. 14:46
masak also true.
moritz
.oO( a true cue )
masak .oO( too Huffmanized ) 14:47
moritz well, huffmanization isn't just about making often-used things short, but also about making fewer-used things long
water bed theory of huffmanization: you can't make everything short
14:56 raiph joined
masak well, you *can*, but if everything's short, nothing's easily accessible. 14:57
or, put differently, Huffman only makes sense when the alphabet is small. 15:00
15:07 broquain1 left 15:08 broquaint joined 15:18 M_o_C left 15:31 ggoebel15 joined 15:42 denisboyun joined, berekuk left
dalek kudo/nom: cab7404 | (Tobias Leich)++ | src/core/operators.pm:
make infix:<...> a proper list infix

Now it can appear several times in the same statement.
15:49
16:00 benabik left, berekuk joined
masak \o/ 16:01
FROGGS++
16:04 denisboyun left 16:10 thelorax123 joined 16:17 zakharyas joined 16:18 thelorax123 left 16:19 thelorax123 joined
FROGGS nr: .say for 1, 2, 3 ... 10, 20 ... 100, 125 ... 200 16:19
camelia niecza v24-98-g473bd20: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤20␤30␤40␤50␤60␤70␤80␤90␤100␤125␤150␤175␤200␤»
..rakudo-jvm 882e33: OUTPUT«Cannot call 'infix:<...>'; none of these signatures match:␤:($a, Mu $b)␤ in any at gen/jvm/BOOTSTRAP.nqp:1201␤ in block at /tmp/LrYxsBRCgM:1␤ in any eval at gen/jvm/stage2/NQPHLL.nqp:1086␤ in any evalfiles at gen/jvm/stage2/NQPHLL.nqp:1292…»
..rakudo-parrot abdccc: OUTPUT«Cannot call 'infix:<...>'; none of these signatures match:␤:($a, Mu $b)␤ in any at gen/parrot/BOOTSTRAP.nqp:1218␤ in any at gen/parrot/BOOTSTRAP.nqp:1209␤ in sub infix:<...> at gen/parrot/CORE.setting:16316␤ in block at /tmp/dhs9QknbUn:1…»
FROGGS aww 16:20
masak too soon, prob'ly.
FROGGS yeah... though I thought rp rebuilds at 8 * * * *
16:21 thelorax123 left
jnthn std: .say for 1, 2, 3 ... 10, 20 ... 100, 125 ... 200 16:21
camelia std 8adbc60: OUTPUT«ok 00:01 123m␤»
dalek kudo/nom: c205efa | (Elizabeth Mattijsen)++ | src/vm/jvm/core/ (3 files):
Fix .cue, damn you MMD!

Turns out I got bitten by unexpected MMD behaviour with multiple named parameters. I can't help but wonder how many people will be bitten by this unexpected MMD behaviour in the future :-(
masak many people, no doubt. 16:22
dalek ast: c9337f0 | (Elizabeth Mattijsen)++ | S17-concurrency/scheduler.t:
Extra .cue tests
16:22 thelorax123 joined 16:24 thelorax123 left
masak p: multi x(:$foo) { say 1 }; multi x(:$bar) { say 2 }; multi x(:$foo, :$bar) { say 3 }; x(:foo, :bar) 16:24
camelia rakudo-parrot abdccc: OUTPUT«3␤»
masak p: multi x(:$foo, :$bar) { say 3 }; multi x(:$foo) { say 1 }; multi x(:$bar) { say 2 }; x(:foo, :bar) 16:25
camelia rakudo-parrot abdccc: OUTPUT«3␤»
masak p: multi x(:$foo, :$bar) { say 1 }; multi x(:$foo, :$bar!) { say 2 }; x(:foo, :bar) 16:26
camelia rakudo-parrot abdccc: OUTPUT«1␤»
masak lizmat: something like that last one?
FROGGS p: multi x(:$foo!) { say 1 }; multi x(:$bar) { say 2 }; multi x(:$foo!, :$bar) { say 3 }; x(:foo, :bar)
camelia rakudo-parrot abdccc: OUTPUT«3␤»
FROGGS p: multi x(:$foo!) { say 1 }; multi x(:$bar!) { say 2 }; multi x(:$foo!, :$bar) { say 3 }; x(:foo, :bar)
camelia rakudo-parrot abdccc: OUTPUT«3␤»
jnthn If you pass :foo and :bar then only a candidate taking a foo and a bar will pass the bind-check 16:27
masak *nod*
jnthn It's textual first one but you didn't create any ambiguity in these examples yet :)
p: multi x(:$foo, :$bar) { say 1 }; multi x(:$foo!, :$bar!) { say 2 }; x(:foo, :bar) 16:28
camelia rakudo-parrot cab740: OUTPUT«1␤»
FROGGS nr: .say for 1, 2, 3 ... 10, 20 ... 100, 125 ... 200 # \o/
camelia rakudo-parrot cab740, rakudo-jvm 882e33, niecza v24-98-g473bd20: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤20␤30␤40␤50␤60␤70␤80␤90␤100␤125␤150␤175␤200␤»
jnthn That example is one where you might get surprised if you think nameds factor into the sorting in some way.
I think the majority of confusion with methods and nameds and multi-dispatch probably comes from the *%_ 16:29
(which is implicit and easily forgotten)
masak aye. 16:30
16:30 raiph left
FROGGS yay, I can unskip tests! 16:30
masak usually during discussions about this behavior there is a point where methods and *%_ are mentioned, and everything becomes clear. 16:31
lizmat scenario: (:$a!, :$b!) and (:$a!) as signatures, call with ( :a, :b ) will take the (:$a) candidate 16:34
to me, that's a bug
16:35 tobyink left
masak oh, right, that's the one. 16:37
just to be sure: are we talking about subs here, or methods? 16:38
r: multi sub x(:$a!, :$b!) { say "a-b" }; multi sub x(:$a!) { say "a" }; x(:a, :b)
camelia rakudo-parrot cab740, rakudo-jvm 882e33: OUTPUT«a-b␤»
lizmat methods 16:39
masak r: multi x(:$foo, :$bar) { say 3 }multi sub x(:$a!, :$b!) { say "a-b" }; x(:a, :b)
camelia rakudo-jvm 882e33: OUTPUT«===SORRY!=== Error while compiling /tmp/DneSdxuLXz␤Two terms in a row␤at /tmp/DneSdxuLXz:1␤------> multi x(:$foo, :$bar) { say 3 }⏏multi sub x(:$a!, :$b!) { say "a-b" }; x␤ expecting any of:␤ postfi…»
..rakudo-parrot cab740: OUTPUT«===SORRY!=== Error while compiling /tmp/jIgb1OsbzI␤Two terms in a row␤at /tmp/jIgb1OsbzI:1␤------> multi x(:$foo, :$bar) { say 3 }⏏multi sub x(:$a!, :$b!) { say "a-b" }; x␤ expecting any of:␤ pos…»
masak p: multi x(:$foo, :$bar) { say 3 }; multi sub x(:$a!, :$b!) { say "a-b" }; x(:a, :b)
camelia rakudo-parrot cab740: OUTPUT«a-b␤»
masak lizmat: right. because with subs, it works.
as you intend.
lizmat: with methods, *%_ slurps up the :$b named, even in a multi method which does not declare a :b named. 16:40
lizmat: so the methods actually tie, and so textually-first-one wins.
16:40 kaare_ joined
lizmat well, that's a nice technical explanation, but from a developers point of view, it's just confusing 16:41
masak lizmat: which I guess is a way of saying, if you have a problem with that semantics, you have a problem with S12/Interface Consistency.
lizmat hehe, indeed
lizmat makes not to go over S12 again
*note 16:42
masak and every criticism against the current semantics should start from the assumptions made in that section.
or at least take them into account somehow.
actually, I believe this is a case where A12 explains it in a bit more detail.
(though possibly with very old syntax)
16:48 xenoterracide left 16:51 dmol joined
timotimo yawn 16:56
i'm not sure catching up on sleep with a kinda long nap was a very good idea
16:56 djanatyn left
FROGGS :/ 16:57
16:57 Tene left
masak at least you're still in your own time zone. *grumble* 16:59
timotimo apparently all i have to do to implement setelems is to use the "assign" pir op
dalek kudo-debugger: 78d3547 | (Steve Mynott)++ | lib/Debugger/UI/CommandLine.pm:
typo fix
17:02
kudo-debugger: 68db53f | jonathan++ | lib/Debugger/UI/CommandLine.pm:
Merge pull request #17 from stmuk/master

typo fix
17:04 cognominal left
lizmat r: loop { CATCH { default { say "hi" } } } 17:04
camelia rakudo-parrot cab740: OUTPUT«===SORRY!===␤Error while compiling op handle: StopIteration␤»
..rakudo-jvm 882e33: OUTPUT«===SORRY!===␤No such method 'jast' for invocant of type 'NQPMu'␤»
lizmat these both seems LTA error messages
should there be an error ?
jnthn Looks like bug to me 17:05
Shouldn't be an error at all
lizmat that's what I thought
r: loop { { CATCH { default { say "hi" } } } ; last}
camelia ( no output ) 17:06
lizmat an extra block is a workaround, but shouldn't be needed, right ?
masak shouldn't be needed.
please submit.
timotimo could it be the for @children -> $name, $handler_code loop in the handle compiling code?
17:07 benabik joined
lizmat submitted rakudobug 17:07
#120498 for the interested 17:09
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=120498
benabik synopsebot++ 17:10
17:11 dmol left 17:14 cognominal joined
FROGGS cries: Cannot .push an infinite list 17:20
colomon push onto an infinite list, or push an infinite list onto something? 17:22
FROGGS the latter
in:
colomon Hmmm, I would hope that would work.
lizmat I guess it could be done 17:23
FROGGS nr: say 1 ... 5, 10 ... *
lizmat but with some deep reification magic ?
camelia niecza v24-98-g473bd20: OUTPUT«(timeout)»
..rakudo-jvm 882e33: OUTPUT«Cannot .push an infinite list␤ in sub infix:<...> at gen/jvm/CORE.setting:16045␤ in block at /tmp/Ncy1kVajQd:1␤ in any eval at gen/jvm/stage2/NQPHLL.nqp:1086␤ in any evalfiles at gen/jvm/stage2/NQPHLL.nqp:1292␤ in any command_eval at gen/jvm…»
..rakudo-parrot cab740: OUTPUT«Cannot .push an infinite list␤ in method sink at gen/parrot/CORE.setting:11990␤ in sub infix:<...> at gen/parrot/CORE.setting:16323␤ in sub infix:<...> at gen/parrot/CORE.setting:16316␤ in block at /tmp/8irnLczrtP:1␤ in any at /tmp/8irnL…»
colomon I think that sort of thing is still on pmichaud++'s plate?
FROGGS n: .say for 1, 2, 3 ... 10, 20 ... 100, 125 ... *
camelia niecza v24-98-g473bd20: OUTPUT«(timeout)1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤20␤30␤40␤50␤60␤70␤80␤90␤100␤125␤150␤175␤200␤225␤250␤275␤300␤325␤350␤375␤400␤425␤450␤475␤500␤525␤550␤575␤600␤625␤650␤675␤700␤725␤750␤…»
FROGGS nr: say (1 ... 5, 10 ... *)[20] 17:24
camelia niecza v24-98-g473bd20: OUTPUT«85␤»
..rakudo-jvm 882e33: OUTPUT«Cannot .push an infinite list␤ in sub infix:<...> at gen/jvm/CORE.setting:16045␤ in block at /tmp/fDiotqAq_e:1␤ in any eval at gen/jvm/stage2/NQPHLL.nqp:1086␤ in any evalfiles at gen/jvm/stage2/NQPHLL.nqp:1292␤ in any command_eval at gen/jvm…»
..rakudo-parrot cab740: OUTPUT«Cannot .push an infinite list␤ in method sink at gen/parrot/CORE.setting:11990␤ in sub infix:<...> at gen/parrot/CORE.setting:16323␤ in sub infix:<...> at gen/parrot/CORE.setting:16316␤ in block at /tmp/oBk7VVWhnt:1␤ in any at /tmp/oBk7V…»
colomon seems like it should be reasonable to join two lists even if one or both are infinite. and push is just a join...
FROGGS nr: say (1 ... 5, 10 ... *)[^20] 17:25
camelia rakudo-parrot cab740: OUTPUT«Cannot .push an infinite list␤ in method sink at gen/parrot/CORE.setting:11990␤ in sub infix:<...> at gen/parrot/CORE.setting:16323␤ in sub infix:<...> at gen/parrot/CORE.setting:16316␤ in block at /tmp/eQ7MotE3Lx:1␤ in any at /tmp/eQ7Mo…»
colomon FROGGS: based on what you were saying yesterday, niecza's probably not even doing a push at all in that case.
camelia ..niecza v24-98-g473bd20: OUTPUT«1 2 3 4 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80␤»
..rakudo-jvm 882e33: OUTPUT«Cannot .push an infinite list␤ in sub infix:<...> at gen/jvm/CORE.setting:16045␤ in block at /tmp/qZYqYEfloH:1␤ in any eval at gen/jvm/stage2/NQPHLL.nqp:1086␤ in any evalfiles at gen/jvm/stage2/NQPHLL.nqp:1292␤ in any command_eval at gen/jvm…»
jnthn rj: say "I seem more reliable nowadays..." 17:26
camelia rakudo-jvm 882e33: OUTPUT«I seem more reliable nowadays...␤»
moritz \o/
lizmat I guess src/core/List, line 189 needs some further study
moritz but, uhm, 882e33 is like, really old
from Oct 23 17:27
FROGGS rp: my @a := ( ^4, 10 ... * ).flat # that is what niecza does
camelia ( no output )
FROGGS rp: my @a := ( ^4, 10 ... * ).flat; say @a[^10]
camelia rakudo-parrot cab740: OUTPUT«Unable to deduce sequence␤ in method sink at gen/parrot/CORE.setting:11990␤ in block at gen/parrot/CORE.setting:16238␤ in any coro at gen/parrot/CORE.setting:7398␤ in method reify at gen/parrot/CORE.setting:7380␤ in method reify at gen/pa…»
moritz but I kinda guess it's actually newer than that
FROGGS colomon: I think I can fix it 17:28
moritz j: my $p = start { say 42 }; $p.wait
camelia rakudo-jvm 882e33: OUTPUT«No such method 'schedule_with_catch' for invocant of type 'Scalar'␤ in method start at gen/jvm/CORE.setting:17172␤ in block at /tmp/m0wRqnMw77:1␤ in any eval at gen/jvm/stage2/NQPHLL.nqp:1086␤ in any evalfiles at gen/jvm/stage2/NQPHLL.nqp:1292…»
moritz erm, what?
17:28 spider-mario joined
lizmat hmmm... did I break that ? 17:29
guess I did
dalek p: 99d42a4 | (Timo Paulssen)++ | src/vm/parrot/QAST/Operations.nqp:
pre-size lists if we know the size at compile-time.
17:30
kudo/nom: 8e2ee89 | (Elizabeth Mattijsen)++ | src/vm/jvm/core/P (2 files):
Fix start {} and friends
17:31
lizmat moritz: missed that in the migration to new spec 17:32
(and there are apparently no tests for it)
dinner&
moritz aka we have no tests for start yet?
jnthn There must be tests for it, unless they didn't get updated yet 17:33
lizmat will look after dinner&
jnthn 'cus I wrote various tests for async { ... } a week and a half ago, I'm sure...
17:35 kivutar joined
timotimo FROGGS: do you remember the work we've done on QRPA and stuff? 17:37
do you think we should bring it up to date again?
i don't really recall why we didn't finish it 17:38
moritz something about serialization?
timotimo oh, there was something, indeed!
and i stole quicksort from parrot 17:41
i wonder if it'd be good for rakudo to implement timsort at some point 17:42
moritz timotimosort
timotimo haha, no, definitely not :)
i just used qlist in the qast compiler for parrot and it didn't seem to break during the build 17:43
so maybe the serialisation issue was fixed in master at some point?
FROGGS timotimo: I though we're using QRPA's, no? 17:44
timotimo we're not 17:45
at the moment we're still using ResizablePMCArray
and i don't know if we have a QRPA equivalent for ResizableStringArray and ResizableIntegerArray
timotimo gets super ballsy and turns default_for('@') from list to qlist 17:48
jnthn No, though on non-Parrot, list_[sin] are implemented that way.
All lits on JVM and Moar are using the QRPA algorithm 17:49
timotimo good choice
jnthn: how do you feel about a commit or multiple that turn lots of .pop etc into nqp::pop etc?
becaue qrpa doesn't have those methods. i have a commit stashed away in the far past that adds the methods, but pm said it has a very strongly negative performance impact 17:50
17:51 cognominal left
jnthn I cna't see it being worse than .pop today on RPA. 17:52
And .pop works on @foo in NQP code.
On non-Parrot it's just a normal method that does nqp::pop(self)
17:52 ssutch joined
timotimo OK, i'll pull in the commit that adds the methods in that case 17:53
jnthn: would you still accept patches to turn the methods into ops, if they are that much faster? 17:55
only for hot paths, i suppose
and finding those is ... sometimes challenging :(
jnthn timotimo: I'd rather keep the code cleaner 17:56
timotimo: JVM may already be inlining them, and Moar will learn to.
dalek kudo/nom: 0cfe87b | (Tobias Leich)++ | src/core/operators.pm:
optimize infix:<...> for lols
17:57
timotimo that's all right
dalek ast: 755cd56 | (Tobias Leich)++ | S03-sequence/misc.t:
unfudge now passing tests
17:58
timotimo FROGGS: good work! :)
FROGGS thanks :o)
moritz www.pyret.org/ looks interesting 17:59
they have whatever-currying, thought with _ instead of *
18:01 colomon left
timotimo jnthn: should i change nqp::list to create a QRPA instead of a RPMCA, or should i change default_for('@') to qlist? i'd tend to do the former 18:01
jnthn timotimo: I think we could just try switching nqp::list over and seeing what happens 18:02
timotimo yes, i'll try that next 18:03
i wish i didn't have to implement bitmaps+skiplists for cclasses to figure out how much time that would shave off the parse time >_> 18:09
jnthn Well, the scarier bit of implementing it is that it'll need NFA support too... 18:10
timotimo oh
jnthn Since cclasses are declarative
timotimo how many backends do i have to touch?
jnthn All of 'em
timotimo is that all shared stuff?
oh my >_<
jnthn Well
NFA construction is shared
NFA evaluation is per-backend 'cus it's rather performance sensitive.
timotimo yes 18:11
oof
jnthn Anyway, not trying to put you off, just saying it's a non-trivial undertaking :)
Or rather, letting you have a reasonably correct guesstimate of the magnitude of the task so you know before you start :) 18:12
timotimo yeah. moritz was hoping he could do it, so i already feared it would be something hard :)
dalek Heuristic branch merge: pushed 33 commits to rakudo/moar-support by jnthn 18:13
timotimo well, first i'll look at what a skip list looks like and see if i can figure out how to implement something like that for cclasses 18:14
on the other hand, it may already be a performance boost for bigger cclasses to ensure that the codes are sorted and then do a binary search instead of a linear scan
jnthn Well, the "cheap" solution may be to introduce an alternative to enumcharlist that is enumcharrange :) 18:15
But don't know that'd give as much benefit. 18:16
timotimo it would certainly do so for pathological cases like \x[0]..\x[FFFFFFFF] or whatever j) 18:17
;)
but the last time i saw that, it threw an error for "invalid character FOO", which the range version wouldn't do on its own 18:18
jnthn Not sure that's a feature ;) 18:19
timotimo can't find the mention in the irclog any more 18:20
i'm not sure a skiplist is the data structure that moritz had in mind; at least it doesn't have anything about ranges "in it" 18:23
jnthn I thought it was an inversion list... 18:24
moritz skip list, inversion list, all the same
at least for some definitions :-)
jnthn oh :)
moritz and yes, it's basically just an implementation of a set of ranges
timotimo OK 18:25
18:26 tobyink joined
timotimo i can't find any mention of inversion lists on the wikepedia :| 18:26
and just changing RPMCA to QRPA causes some test failures 18:27
moritz I think I've written something about inversion lists on perlmonks, let me dig it up for you 18:28
18:29 dmol joined
timotimo cool, thanks 18:29
moritz timotimo: www.perlmonks.org/?node_id=908453 18:30
timotimo seems like punching holes into cclasses like that would be a pretty simple operation using the demorgan trick 18:34
moritz yes 18:36
18:36 ajr joined 18:37 ajr is now known as Guest11767, Guest11767 is now known as ajr_
TimToady FROGGS: .push is defined to be eager, you want .plan for a lazy push (though afaik it's NYI) 18:40
TimToady still thinks two-level lazy bitmaps like P5 uses are the right way to do cclasses, since the set bits tend to clump 18:45
18:46 raiph joined
timotimo i don't know what that means :| 18:46
TimToady that's why I said it :P
timotimo two-level, does that mean you have one top-level bitmap to state where sub-bitmaps are?
TimToady well top level can be an array or a hash of bitmaps, divvied up by the high bits of value you're looking up 18:48
iirc the first swatch is 256 bits, and subsequent swatches are 128 bits in p5 18:49
I think p5 uses a hash at the top level, call a 'swash', short for swatch hash
unless it's changed recently 18:50
masak Zefram's bug reports are awesome.
TimToady anyway, it's pretty fast, and basically constant lookup unless you get a "miss"
masak I wonder what causes #120484.
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=120484
timotimo i don't understand, why does a miss give you bad performance? 18:51
TimToady it just has to generate the new swatch from the "heavy" version that knows all the bits 18:52
but as with most things in p5, if you've done something once, it assumes you're going to do it again, so it never throws away swatches once they're generated
timotimo oh, is that for insertion of new bits? 18:53
TimToady let's say it digests a chunk of the low-speed complete data into high-speed incomplete data
timotimo ah, that's why it's lazy? 18:54
TimToady you generally only need to keep the bits that you use, and most strings use a very small subset of Unicode
but the swatches have good locality for script blocks, if you're in Swahili or some such
well, Devangari would be a better exmaple
whereas skip lists for, say, digits, are going to pick a few characters out of each block, and be badly fragmented 18:55
and a binary search has got to be slower than a two-level lookup for anything vaguely complicated 18:56
timotimo ah, sure
i still don't know where a miss comes into the picture, though. my current understanding is we can create the whole two-level datastructure from parsing a character class definition and then query it later while running the regex 18:57
TimToady there's no point in creating the parts of the bitmap that will never be used 18:58
at least, not in memory 18:59
timotimo ah, OK
TimToady p5 basically generates the bitmaps from skiplists that are on disk
but only a swatch at a time
timotimo the skiplists on disk are like a skiplist for :alpha:, a skiplist for :digit:, ...? 19:00
TimToady yes
those are all pregenerated from the unicode data
p5's bitmaps are optimized for utf8 though 19:01
timotimo is there a smart way to handle intersections/subtractions of cclasses there?
TimToady so the first N-1 bytes of utf8 find the swatch, and the final byte looks up the bit
19:01 darutoko left
TimToady don't remember what p5 does there, but it's certainly possible to merge skip lists 19:02
timotimo sounds like a lot of work in any case :P
i guess i can write up a detailed quest description for questhub for this whole thing 19:03
TimToady well, if you want it to start up fast, and run fast...
there is prior art in p5, at least
timotimo it would include pregenerating the skip lists during nqp compilation, then implementations for that stuff in the NFA for all three backends and probably also for all three QAST Compilers for the QRegex nodes?
TimToady one could view the skip lists as the basic implementation, and the lazy bitmaps as a mere optimization 19:06
timotimo that sounds like a good milestone, actually
i suppose those also don't have to be pre-generated at nqp-compiler-compile-time from the statr 19:07
TimToady also "two-level bitmap" is a little misleading, if the top level is really a hash
so there's some overhead in hashing the non-bitmap index
timotimo that shouldn't be terribly bad
TimToady well, once could throw memory at it and make it an array instead; if your bitmaps were 256 bits, then you'd have 0x10ff entries in the top level array, so one could go with three levels instead 19:09
*one
lots of ways to do it, most of them faster than skip lists 19:10
well, maybe not most, but some :)
well, I'm paying good money for this conference, so I'd better attend some of it... 19:11
afk &
timotimo have fun! :) 19:12
and thanks for your time
GlitchMr github.com/rakudo/rakudo/commit/c3...c0fd1cbae4 19:15
Huh? Methods with empty prototype are constants?
jnthn GlitchMr: No, doing them as a sub just to have a place to hang DEPRECATED calls 19:17
GlitchMr: Which you can't on a constant.
jnthn bbiab 19:19
timotimo questhub.io/realm/perl/quest/527e8b...d27a000054 - writeup 19:21
19:23 raiph left, q1999 joined, kurahaupo joined 19:25 q1999 left
benabik ++timotimo 19:25
timotimo doesn't mean i'll actually tackle it
benabik Oh, well then. --timotimo ;-)
timotimo haha.
benabik timotimo++ # Good writeup
timotimo moritz isn't on questhub, otherwise i would have invited him :)
GlitchMr github.com/perl6/specs/commit/d8cd...ac2ba65e0a 19:27
I liked it :-(.
FROGGS TimToady: hmmm, we could implement @a.plan(@b) like: @a := (@a, @b).list, right?
timotimo oh!
19:29 raiph joined
timotimo nqp-p: my $t := nqp::time_n(); "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" ~~ /<[a..zA..Z]>+/; say nqp::time_n() - $t; 19:29
camelia nqp-parrot: OUTPUT«Confused at line 2, near "say nqp::t"␤current instr.: 'panic' pc 16305 (gen/parrot/stage2/NQPHLL.pir:6018) (gen/parrot/stage2/NQPHLL.nqp:426)␤»
timotimo nqp-p: my $t := nqp::time_n(); "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" ~~ /<[a..zA..Z]>+/; say(nqp::time_n() - $t); 19:30
camelia nqp-parrot: OUTPUT«0.000205039978027344␤»
timotimo too fast to give a meaningful benchmark %)
nqp-p: my $data := nqp::x("a", 10000); my $t := nqp::time_n(); $data ~~ /<[a..zA..Z]>+/; say(nqp::time_n() - $t);
camelia nqp-parrot: OUTPUT«0.00267195701599121␤»
timotimo nqp-p: my $data := nqp::x("a", 100000); my $t := nqp::time_n(); $data ~~ /<[a..zA..Z]>+/; say(nqp::time_n() - $t);
camelia nqp-parrot: OUTPUT«0.0246500968933105␤»
timotimo nqp-p: my $data := nqp::x("Z", 100000); my $t := nqp::time_n(); $data ~~ /<[a..zA..Z]>+/; say(nqp::time_n() - $t);
camelia nqp-parrot: OUTPUT«0.0549299716949463␤»
timotimo hehe 19:31
binary search should equalise those times to something in between
nqp-p: my $data := nqp::x("a", 10000000); my $t := nqp::time_n(); $data ~~ /<[a..zA..Z]>+/; say(nqp::time_n() - $t); 19:36
camelia nqp-parrot: OUTPUT«2.14942002296448␤»
timotimo nqp-p: my $data := nqp::x("Z", 10000000); my $t := nqp::time_n(); $data ~~ /<[a..zA..Z]>+/; say(nqp::time_n() - $t);
camelia nqp-parrot: OUTPUT«5.0132429599762␤»
timotimo (less noise, hopefully)
moritz timotimo: I'm pretty sure I am
(on questhub, that is)
timotimo oh, yes!
invited :)
feel free to delegate sub-tasks to me if you think i can do something for you in this quest 19:37
moritz my plan is to first prototype it in pretty high-level NQP 19:39
and then figure out the rest from there
timotimo well, first i'll plop a binary search onto the cclass matching and see if that helps any :) 19:40
moritz timotimo: only do that when there are more than 10 or 20 chars in the char class,
otherwise a linear search is likely faster 19:41
timotimo i should be able to do that
hm, how about doing a two-layer approach, where i only look into the middle and then do a linear search from either the middle or the beginning? 19:42
FROGGS my @odd = 1,3,5 ... 8; say @odd[^4] # this will correctly hang, because the RHS is not known to be infinite, right?
timotimo 8 is not known to be infinite? :) 19:43
oh, *THAT* RHS :)
FROGGS *g*
timotimo yes, but we had a discussion recently that rakudo should, for simple series like these, warn if the end point is not part of the series
because in that case the developer could just as well have written * instead of 8 19:44
i wonder at what point one would have to insert code to detect that a regex without captures and with only declarative elements is being used 19:46
because in that case, there's no need to do more than run the NFA on it, right?
the NFA knows how to do non-anchored matches, right? 19:47
masak Publish... is a class?
moritz timotimo: NFA matches are always implicitly anchored 19:49
timotimo: at the QAST level, everything except :rxtype<scan> is anchored
(at the start)
timotimo ah 19:50
IIUC it's very easy to teach a NFA to scan
19:51 kivutar left
moritz I'm not so sure 19:52
you have to add a .*? at the start 19:53
and I don't think frugal quantifiers are in REG
19:53 zakharyas left
benabik [^first letter] 19:53
[^first letter]*
Oh, no that doesn't work does it, because the prefix might have it. Darn. 19:54
moritz stuff ain't easy :-)
timotimo well, all i think i'll need to add is a loop from the start state back to the start state that eats any character 19:55
and then it would be enough to run until the first fate is encountered 19:56
(if the search isn't exhaustive etc etc)
moritz and then how do you know where the actual regex has started matching?
timotimo *oh* 19:57
hehe :)
benabik NFA? Then you just match not first letter and on first letter transition to both starting the literal matching and not. ;-) Non-determinism is fun that way.
moritz benabik: note that in computer science, NFAs are just used for boolean questions, "does that match?" 19:59
benabik: and in that spirit, you can just prepend .* to the regex, and it scans 20:00
benabik: but for our purposes, we are searching for the longest match of the regex after the .*, but .* is greedy
benabik: *and* we need to know where the stuff that comes after the .* started matching 20:01
masak 'night, #perl6 20:02
timotimo 'night masak :)
i hope t4 reviews were good to you today :) 20:03
benabik moritz: Well, if we could actually run non-deterministically it wouldn't be too hard. Shame quantum computers are still pie-in-the sky. The difficulty is really in doing it deterministically.
timotimo Perl6/Grammar.nqp has 7 enumcharlist nodes that have more than 20 characters
moritz do you know how big they are? 20:05
timotimo yes
2x 192, 1x 26, 4x 62 20:06
6 more are compiled during setting compilation: 5x 52, 1x26 20:07
lue how do I find out the number of parameters that need to be passed to WhateverCode?
benabik How many there are is somewhat less important than how often they get used.
r: (* + *).arity.say 20:08
camelia ( no output )
benabik Got caught by the whatever code expanding... 20:09
r: my &a = *+*; say &a.arity
camelia rakudo-parrot 0cfe87, rakudo-jvm 882e33: OUTPUT«2␤»
moritz overcurried!
FROGGS rp: my $a := (* + *); say $a.signature.count
camelia rakudo-parrot 0cfe87: OUTPUT«2␤»
20:09 raiph left
lue benabik: I'm just accepting as input P6 *-5..*-1 notation for ranges, so I just need to know how many times to give it the array size. 20:10
timotimo tbh, more interesting would be to know how often they are matched against 20:11
20:11 berekuk left
dalek ast: 72e40a8 | (Tobias Leich)++ | S32-exceptions/misc.t:
test for RT #73938
20:12
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=73938
moritz r: say nqp::div_i(5, 2) 20:16
camelia rakudo-parrot 0cfe87, rakudo-jvm 882e33: OUTPUT«2␤»
FROGGS nqp: say(nqp::div_i(5, 2)) 20:17
camelia nqp-moarvm, nqp-jvm, nqp-parrot: OUTPUT«2␤»
FROGGS good. 20:18
20:19 colomon joined 20:22 ssutch left 20:24 kivutar joined, dmol left
FROGGS timotimo: maybe this can be enhanced like cclasses too? github.com/perl6/nqp/blob/master/s...mar.nqp#L4 20:26
timotimo wow, what a long-ass line :| 20:27
benabik Except that's not a set of characters, it's a long list of pairs of characters. 20:28
FROGGS true
timotimo yeah, but still 20:29
"# if it's a closing bracket, that's an error also"
20:29 raiph joined
timotimo it's not a problem, the list could be split in two just as well. 20:29
that seems sensible. have a list of openers, a list of closers, sort the openers by index, have the closers have corresponding indices 20:30
benabik You need to preserve the mapping between the pairs.
timotimo yes, that's what i meant with "corresponding indices" 20:31
maybe a hash would be better though?
FROGGS dunno 20:33
20:42 berekuk joined 20:52 berekuk left
timotimo though a hash of integers would probably be better than a string. 20:53
er, a hash of single-character strings 20:54
dalek p: dd3fde1 | (Tobias Leich)++ | src/QRegex/P6Regex/Grammar.nqp:
**0..1 to ? in token quantifier:sym<**>
20:59
20:59 kivutar left
dalek kudo/moar-support: ce8cc4c | jnthn++ | src/ (2 files):
Start on sig binder for MoarVM.

Doesn't bind anything beyond the empty signature so far.
20:59
timotimo \o/ 21:00
FROGGS \o/ # indeed! 21:01
timotimo FROGGS: fwiw, i don't think the bracket searching code will hit any high numbers often at all 21:02
so it may be superfluous or even detrimental to put a binary search there
most brackets are (), [], <> or {}, perhaps «».
FROGGS timotimo: ahh, yes, true
moritz uhm, is the order of arguments of nqp::splice different from Perl 5 splice? 21:04
timotimo yes
oh
it is different from perl6 splice, that muc hi know
maybe it would be a good first step to make a "charrange" qregex node instead of making the whole skip list thing directly 21:06
dalek kudo/moar-support: 4a0502f | jnthn++ | src/Perl6/Metamodel/BOOTSTRAP.nqp:
Handle anonymous capture params.
timotimo and that could only be used if the characters are in one contiguous range
moritz nqp-p syntax errors consistently point to one line below the line with the error 21:11
21:11 logie left
timotimo i've experienced that, too 21:11
21:13 Tene joined, Tene left, Tene joined
moritz github.com/perl6/nqp-inversion-list 21:16
so far it's an untested NQP port of Set::IntSpan::Fast::PP 21:17
timotimo maybe later i'll write some tests for you 21:21
moritz \o/ 21:22
sleep&
FROGGS gnight moritz
timotimo gnite moritz
jnthn 'night, moritz++
21:23 tobyink left 21:24 logie joined, davecc joined 21:27 zakharyas joined 21:29 logie_ joined 21:30 logie left
dalek p: 40d723f | dwarring++ | examples/rubyish/ (2 files):
minor rubyish fixes to variables, signatures and precedence
21:32
21:39 pochi joined 21:40 kaare_ left 21:43 ggoebel joined
itz is [email@hidden.address] correct for rt bug reports? 21:47
FROGGS I only know [email@hidden.address] 21:48
itz are rt email bug reports usually lagged? 21:49
FROGGS itz: though, I've heard you can create them in the web interface nowadays 21:50
itz: not sure
21:51 ingy^ joined, lue left
itz [email@hidden.address] as displayed on the rt webpage clearly doesn't work 21:54
FROGGS write a bug report then *g* 21:55
itz I did :P 21:57
FROGGS itz: btw, that is exactly what I feared... the last star release bumped the submodule versions, but somehow the submodules are still old
21:57 ajr_ left
itz I don't think the git checkouts are on master 21:57
FROGGS I am talking about that: github.com/rakudo/star/commit/528f...65d5a23ed1 21:58
jnthn: it fails to build m-Metamodel on linux because it can't find 'ModuleLoader.moarvm' which is in nqp/ 22:00
just wanna let you know... I'm going to debug that now
itz FROGGS: ah I see
jnthn FROGGS: That...makes no sense :S
FROGGS: As in, I don't know of anything platform specific in that area...
FROGGS: Anyways, debugging very welcome :) 22:01
FROGGS :o)
timotimo hmm. so how do i do the test stuff ... 22:04
22:04 lue joined
timotimo can i just "use InversionList" in t/ and have -Ilib? 22:04
FROGGS nqp: use lib 't' 22:05
camelia nqp-jvm: OUTPUT«java.nio.file.NoSuchFileException: lib␤ in (src/vm/jvm/ModuleLoader.nqp:62)␤ in load_module (src/vm/jvm/ModuleLoader.nqp:52)␤ in load_module (gen/jvm/stage2/NQP.nqp:284)␤ in statement_control:sym<use> (gen/jvm/stage2/NQP.nqp:2041)␤ in !reduce (gen/jvm…» 22:06
..nqp-parrot: OUTPUT«"load_bytecode" couldn't find file 'lib.pbc'␤current instr.: '' pc 1946 (gen/parrot/stage2/module_loader.pir:895) (src/vm/parrot/ModuleLoader.nqp:55)␤»
..nqp-moarvm: OUTPUT«(signal ABRT)While looking for 'lib.moarvm': no such file or directory␤frame_name_33␤»
FROGGS try it, I can't tell
timotimo will do
is there something i can use to compare two integer lists for equality in nqp or should i write my own sub?
japhb___ Oh jnthn, I keep forgetting to mention something while you're still online: I managed to blow the jvm stack a couple days agao by doing an async_qx that had to read a lot of lines. At the time I didn't have a chance to golf the problem, but does it ring a bell? 22:07
jnthn japhb___: If you were unlucky enough to hit a gather/take it could be that 22:08
japhb___ hmmm
Is the gather/take problem in jvm likely to be a simple bug or a deeper issue? 22:10
22:11 dmol joined
jnthn japhb___: It's a bit nasty; I was hoping sorear++ might find tuits to do it as he undertands the gather/take on JVM best, but didn't see him in a long while :( 22:11
japhb___: afaiu, each take accidentally makes the stack a level deeper 22:12
22:12 xinming_ joined 22:13 zakharyas left
timotimo nqp doesn't take -I 22:14
that's probably why things for nqp are always catted together :P
jnthn timotimo: It also requires things to have been compiled already, too
timotimo ah, all i have to do is put it into . ?
jnthn I guesss that works 22:15
22:15 xinming left
timotimo how do i even Makefile 22:21
make: *** No rule to make target `lib/InversionList.nqp', needed by `InversionList.pir'. Stop. 22:22
but the file already exists :o
oh, it's called .pm not .nqp
itz "The submodule repositories added by “git submodule update” are “headless”. This means that they aren’t on a current branch.To fix this, we simply need to switch to a branch" 22:23
22:26 emma joined, Zoffix joined
timotimo splice() not implemented in class 'ResizableIntegerArray' - huh! 22:26
22:40 colomon left
timotimo japhb___: since you're already looking at the inversion list, can you figure out if my test or the code is wrong? 22:41
also, good catch on the infinity typo
22:44 berekuk joined 22:45 Zoffix left, colomon joined 22:56 berekuk left
itz hmmm git submodules are *really* complex 23:02
timotimo sleep & 23:04
lizmat gnight timotimo 23:07
lue itz: integrating a project into your own frequently is :)
lizmat just found an inconsistency: 23:09
r: my &foo; say &foo.WHAT
camelia rakudo-parrot 0cfe87, rakudo-jvm 882e33: OUTPUT«(Any)␤»
lizmat r: sub a(:&b) { say &b.WHAT }; a() 23:10
camelia rakudo-parrot 0cfe87, rakudo-jvm 882e33: OUTPUT«(Callable)␤»
lizmat a &foo variable is different from a &foo parameter?
lue r: my &foo; sub a(:&b) { say &b.WHAT }; a(:b(&foo)); 23:11
camelia rakudo-parrot 0cfe87: OUTPUT«Nominal type check failed for parameter '&b'; expected Callable but got Any instead␤ in sub a at /tmp/BEpd93gJkp:1␤ in block at /tmp/BEpd93gJkp:1␤ in any at /tmp/BEpd93gJkp:1␤ in any at gen/parrot/stage2/NQPHLL.nqp:1146␤ in any eval at …»
..rakudo-jvm 882e33: OUTPUT«Nominal type check failed for parameter '&b'␤ in block at /tmp/uZuye0JnXG:1␤ in any eval at gen/jvm/stage2/NQPHLL.nqp:1086␤ in any evalfiles at gen/jvm/stage2/NQPHLL.nqp:1292␤ in any command_eval at gen/jvm/stage2/NQPHLL.nqp:1196␤ in any com…»
23:11 PacoAir left
lizmat lue: indeed 23:11
lue my $igil; my @rray; my %ash; my &ode; say $igil.WHAT; say @rray.WHAT; say %ash.WHAT; say &ode.WHAT;
lizmat r: sub a(&b?) { say &b.WHAT }; a() # doesn't have to be a named parameter
camelia rakudo-parrot 0cfe87, rakudo-jvm 882e33: OUTPUT«(Callable)␤»
lue r: my $igil; my @rray; my %ash; my &ode; say $igil.WHAT; say @rray.WHAT; say %ash.WHAT; say &ode.WHAT; 23:12
camelia rakudo-parrot 0cfe87, rakudo-jvm 882e33: OUTPUT«(Any)␤(Array)␤(Hash)␤(Any)␤»
lue $ and & have something in common :)
lizmat but why would that be diffferent for parameters ?
lue $ -> Any makes sense to me, & -> Any less so. (It should be & -> Callable IMO, like @ -> Array or % -> Hash)
r: sub a($ig, @rr, %as, &od) { say $ig.WHAT; say @rr.WHAT; say %as.WHAT; say &od.WHAT } 23:13
camelia ( no output )
lue r: sub a($ig, @rr, %as, &od) { say $ig.WHAT; say @rr.WHAT; say %as.WHAT; say &od.WHAT }; a()
camelia rakudo-parrot 0cfe87, rakudo-jvm 882e33: OUTPUT«===SORRY!===␤CHECK FAILED:␤Calling 'a' requires arguments (lines 1, 1)␤ Expected: :($ig, @rr, %as, &od)␤»
lue r: sub a($ig?, @rr?, %as?, &od?) { say $ig.WHAT; say @rr.WHAT; say %as.WHAT; say &od.WHAT }; a()
camelia rakudo-parrot 0cfe87, rakudo-jvm 882e33: OUTPUT«(Any)␤(Array)␤(Hash)␤(Callable)␤»
lue & is the only inconsistent one it seems. 23:14
lizmat yup
lizmat submits rakudobug
lue r: my ¢apture; say ¢apture.WHAT; # :P 23:15
camelia rakudo-parrot 0cfe87: OUTPUT«===SORRY!=== Error while compiling /tmp/qQr9Im1L7B␤Malformed my␤at /tmp/qQr9Im1L7B:1␤------> my ⏏¢apture; say ¢apture.WHAT; # :P␤ expecting any of:␤ scoped declarator␤»
..rakudo-jvm 882e33: OUTPUT«===SORRY!=== Error while compiling /tmp/0hCwgqXpZ4␤Malformed my␤at /tmp/0hCwgqXpZ4:1␤------> my ⏏¢apture; say ¢apture.WHAT; # :P␤ expecting any of:␤ scoped declarator␤»
lizmat #120501 for those interested 23:17
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=120501
23:21 berekuk joined 23:22 berekuk left, bbkr_ joined 23:23 spider-mario left
bbkr_ how to write :exists adverb on whatever star? assuming i have array of hashes and I want to grep only those with given key, old code: @hashes.grep: *.exists('key') 23:24
23:25 panchiniak_ joined
lizmat @hashes.grep: $_<key>:exists 23:26
@hashes.grep: *<key>:exists # perhaps?
23:27 cognominal joined
bbkr_ r: my @t = { a=>1}, {a=>2}, {b=>3}; say @t.grep: *<a>:exists' 23:27
camelia rakudo-jvm 882e33: OUTPUT«===SORRY!=== Error while compiling /tmp/eSTso9opUB␤You can't adverb that␤at /tmp/eSTso9opUB:1␤------> {a=>2}, {b=>3}; say @t.grep: *<a>:exists⏏'␤ expecting any of:␤ pair value␤»
..rakudo-parrot 0cfe87: OUTPUT«===SORRY!=== Error while compiling /tmp/s12B7Y8Awc␤You can't adverb that␤at /tmp/s12B7Y8Awc:1␤------> {a=>2}, {b=>3}; say @t.grep: *<a>:exists⏏'␤ expecting any of:␤ pair value␤»
lizmat r: my @t = { a=>1}, {a=>2}, {b=>3}; say @t.grep: $_<a>:exists 23:28
camelia rakudo-parrot 0cfe87, rakudo-jvm 882e33: OUTPUT«␤»
23:29 berekuk joined
lizmat r: my @t = { a=>1}, {a=>2}, {b=>3}; say @t.grep: {$_<a>:exists} 23:29
camelia rakudo-parrot 0cfe87, rakudo-jvm 882e33: OUTPUT«("a" => 1).hash ("a" => 2).hash␤»
FROGGS r: my @t = { a=>1}, {a=>2}, {b=>3}; say @t.grep: {$_<a>:v}
camelia rakudo-parrot 0cfe87, rakudo-jvm 882e33: OUTPUT«("a" => 1).hash ("a" => 2).hash␤»
bbkr_ thanks
lizmat FROGGS: if any of the keys had 0 or Any as value, they wouldn't be included
with :v I mean 23:30
FROGGS yeah
bbkr_ why exists method was removed? it was much easier to use
FROGGS I just wonder why the key is included when I ask for values... but maybe my expectations are off :o)
lizmat FROGGS: it was a grep, not a map 23:31
bbkr_: because .exists only works on one key, whereas you can use :exists and other adverbs on slices 23:32
r: my @t = { a=>1}, {a=>2}, {b=>3}; say @t.grep: {any($_<a b>:exists)}
camelia rakudo-parrot 0cfe87, rakudo-jvm 882e33: OUTPUT«("a" => 1).hash ("a" => 2).hash ("b" => 3).hash␤» 23:33
lizmat r: my @t = { a=>1}, {a=>2}, {b=>3}; say @t.grep: {all($_<a b>:exists)}
camelia rakudo-parrot 0cfe87, rakudo-jvm 882e33: OUTPUT«("a" => 1).hash ("a" => 2).hash ("b" => 3).hash␤»
bbkr_ oh!
lizmat hnnn... that last one seems incorrect :-( 23:34
ah, no, it is correct
:exists also acts as a filter
r: my @t = { a=>1}, {a=>2}, {b=>3}; say @t.grep: {all($_<a b>:!k)} 23:35
camelia rakudo-parrot 0cfe87, rakudo-jvm 882e33: OUTPUT«("a" => 1).hash ("a" => 2).hash ("b" => 3).hash␤»
bbkr_ what does :exists(value) do? I see test cases but cannot figure this out
lizmat any adverb can be given a valu
:foo is just foo => True
:foo<bar> is foo => 'bar'
:exists(True) is long for :exists, :exists(False) is long for :!exists 23:36
any value given to :exists will be taken as a boolean
same for :delete 23:37
:delete($really) # depend on boolean value of $really to really delete given keys
bbkr_ I'm surprised how consisted it is, making adverbs using colon-pair constructor􏿽x85 nice design 23:38
lizmat r: my %a=(a=>1); say %a<a>:exists; say %a<b>:!exists
camelia rakudo-parrot 0cfe87, rakudo-jvm 882e33: OUTPUT«True␤True␤»
bbkr_ thanks for explanation. I'm off to fixing warnings in my modules now :) 23:39
lizmat yw!
23:42 cognominal left, xenoterracide joined
dalek kudo/nom: f485315 | (Elizabeth Mattijsen)++ | src/vm/jvm/core/ (5 files):
Migrate cue_with_catch to cue(:&catch)

Also some left-behind schedule_* fixes. Unfortunately, specifying a :catch() currently blows up:
Unhandled exception: Method 'postcircumfix:<( )>' not found for invocant of class 'Scalar'
   in (gen/jvm/BOOTSTRAP.nqp:1675)
Will look at this tomorrow, unless someone else beats me to this
23:43
jnthn lizmat++ # increasing bus number of the threading stuff :) 23:44
lizmat and with this I bid you all a good night!
jnthn 'night, lizmat
23:52 berekuk left
woolfy Reini Urban played by Daniel Metz in movie Computer Chess ( www.imdb.com/title/tt2007360/ ) 23:52