»ö« 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.
raiph github.com/raiph/rakudo-debugger/c...nt-6177323 would appreciate response by someone who knows how to use github to do updates of pull requests 00:06
dwarring raiph: I'm no github expert by any stretch 00:56
github automatically creates a branch for each PR 00:57
that PR is on branch patch-4 00:58
I'd try: git checkout patch-4 00:59
raiph dwarring: thanks for help
dwarring++ # for advent fixing too 01:00
dwarring: I don't currently use git but I guess it's time to change that :)
dwarring it's fun 01:02
have picked up lots of tips and techniques along the way
still most of 2010 & 2011 open 01:04
if anyone else wants to do some
raiph i've used git over the last couple years for a couple things but not with github repos nor with my current rakudo dev environment (feather) 01:05
dwarring github adds another layer of magic 01:07
afk 01:08
japhb When a particular method of a common class in the setting does not make sense on some backends, what's the usual way to handle this? Hide the method entirely on those backends? Do an X::NYI.new(feature => 'The::Class.the-method').fail? 02:06
dalek kudo/nom: 6023d81 | (Geoffrey Broadwell)++ | src/core/IO.pm:
Add an IO::Path.watch convenience method
02:12
japhb just picked one
colomon hmmm, is there a way to do something in a loop every time but the first? 02:44
BenGoldberg while ( blah blah blah ) { state $first; doit() if $first++ } 02:50
colomon BenGoldberg++
BenGoldberg :) 02:51
Although you might want to declare $first as a 'my' variable, before the loop 02:52
... if this is in a subroutine, and if you *don't* want it to be influenced by previous calls to the subroutine.
zacts is perl6 usable for production projects? 04:10
TimToady .tell BenGoldberg using 'my' instead of 'state' is not necessary, since the loop's closure is recloned at the same time the 'my' would have been, so the state resets on re-entry to the outer scope 04:48
yoleaux TimToady: I'll pass your message to BenGoldberg.
adu hi 05:16
vendethiel o/, #perl6 05:43
nwc10 jnthn: only ASAN fail is t/spec/S17-lowlevel/lock.rakudo.moar 05:50
jnthn: read by thread T3 of somethign freed by T1, allocated by T0
grondilu std: $_ (-)= set () 06:55
camelia std ec3d853: OUTPUT«===SORRY!===␤Confused at /tmp/RGWoGkVZS_ line 1:␤------> $_ ⏏(-)= set ()␤ expecting any of:␤ feed_separator␤ infix or meta-infix␤ infixed function␤ statement modifier loop␤Parse failed␤FAILED 00:01 125m␤»
grondilu std: $_ = $_ (-) set () 06:56
camelia std ec3d853: OUTPUT«===SORRY!===␤Confused at /tmp/iwM4f_285M line 1:␤------> $_ = $_ ⏏(-) set ()␤ expecting any of:␤ feed_separator␤ infix or meta-infix␤ infixed function␤ statement modifier loop␤Parse failed␤FAILED 00:01 1…»
nwc10 jnthn: paste.scsys.co.uk/362401 -- ctx->callsite->has_flattening -- 0x6008003fab6c is located 28 bytes inside of 40-byte 06:58
no, 28 doesn't make sense to me in terms of structure offset, but it's adamant 07:00
lizmat jnthn: didn't get around to testing async IO yet, got stuck with finding out why Supply.delay|stable tests don't work 07:36
dalek ecs: 02e59c9 | (Elizabeth Mattijsen)++ | S17-concurrency.pod:
Formally spec Supply.(Channel|Promise)
08:07
Woodi hi today :) 08:08
FROGGS hi Woodi 08:09
lizmat hi Woodi FROGGS !
FROGGS hi lizmat :o)
dalek ast: 219a020 | (Elizabeth Mattijsen)++ | S17-supply/Channel.t:
Added basic Supply.Channel tests
08:16
FROGGS jnthn: I think I need your help after you had your coffee :/ 08:18
FROGGS usually a HanderScope is made when I compile my script, which has a (labeled) loop 08:23
and this is differntly for MapIter, the HandlerScope is already made in the setting
so I cannot attach the label to the handler at that time
I think I need a way to attach/detach a label to a HandlerScope when it runs the MapIter.reify
jnthn: does that seem sane? and how do I get my hands on that HandlerScope? 08:24
Woodi someone could help me how to get items from match object in order they was parsed ? I have files with colums definitions on top then data, then ocassionally columns redefinition. I trying to take this info from match object so working post-parse, no actions. 08:25
FROGGS Woodi: can you put that in a gist? a runnable script including sample data?
Woodi k
Su-Shee good morning everyone. 08:29
lizmat Su-Shee o/
dalek ast: 4ee319e | (Elizabeth Mattijsen)++ | S17-supply/Promise.t:
Add basic Supply.Promise tests
08:33
kudo/nom: 936fb75 | (Elizabeth Mattijsen)++ | t/spectest.data:
Make sure we test Supply.(Channel|Promise)
08:35
ast: c0fc454 | (Elizabeth Mattijsen)++ | S17-supply/ (2 files):
We don't need Test::Tap here
08:36
lizmat afk&
Woodi hi Su-Shee 08:37
Woodi FROGGS: script and data: pastebin.com/qv7QnSUB 08:38
Woodi probably I trying to mimic Perl5 way, badly etc. but I wonder can grammar be used in DOM/SAX/StAX ways ? :) pl.wikipedia.org/wiki/Streaming_API_for_XML 08:40
Woodi um, en.wikipedia.org/wiki/StAX :) 08:44
FROGGS Woodi: so you want to be able to loop over the headers, and then have the dlines in its header?
Woodi probably. I need to sums data in columns
for start how to get something like $r.list... 08:46
maybe "token lines" including all kinds could help... 08:47
FROGGS token TOP { [ <header> | <.comment> ]+ };
token header { '=data ' <cs>+ % [\h+] \n [ <dline> | <.comment> ]* };
I would use these tokens instead 08:48
this way you would have the dlines nestid in their headers
and you discard the comments
Woodi hmm
right, let's build some grammar ;)
FROGGS then you can do: for @($r<header>) -> $h { for @($r<dline>) -> $dl { ... } } 08:49
masak antenoon, #perl6 08:50
Woodi hallo masak
FROGGS Woodi: here is the gist: gist.github.com/FROGGS/3b7cebc3301e050a9b9a
I commented some stuff so it better fits on my screen :o) 08:51
hi masak
Woodi FROGGS: checking
FROGGS: work ! thanx :) 08:55
FROGGS Woodi: you're welcome :o)
Woodi but still I have problem with understanding something: for @($r<header>) -> $h { for @($r<dline>)... $r<header> is level-one item in hash and $r<dline> is also level-one so normally they are unrelated. looks automagically works but I didn't try this approach becouse I expected <dlines> should be "inside" headers... 08:58
FROGGS ohh 08:59
should be for @($h<dline>)
masak m: $h = { dline => 42 }; say @($h<dline>); say @$h<dline> 09:00
camelia rakudo-moar 6023d8: OUTPUT«===SORRY!=== Error while compiling /tmp/O8M1HLVfJo␤Variable '$h' is not declared␤at /tmp/O8M1HLVfJo:1␤------> $h⏏ = { dline => 42 }; say @($h<dline>); sa␤ expecting any of:␤ postfix␤»
masak m: my $h = { dline => 42 }; say @($h<dline>); say @$h<dline>
camelia rakudo-moar 6023d8: OUTPUT«42␤===SORRY!===␤postcircumfix:<{ }> not defined for type List␤»
FROGGS m: my $h = { dline => 42 }; say @h<dline> 09:01
camelia rakudo-moar 6023d8: OUTPUT«===SORRY!=== Error while compiling /tmp/pe3EmJv7PL␤Variable '@h' is not declared. Did you mean '$h'?␤at /tmp/pe3EmJv7PL:1␤------> my $h = { dline => 42 }; say @h<dline>⏏<EOL>␤ expecting any of:␤ po…»
FROGGS ahh, wait, only @<foo> was sugar for @($<foo>) of course
Woodi ook, so probably my grammar was messing with me. thanx 09:02
btw. tips for grammars in Perl6: a) forget "rules"; b) use \h, not \s :) 09:03
jnthn FROGGS: No, 'cus that handler scope is static and so shared between all maps 09:05
FROGGS and c) if the rules/token look overly complex, one is missing the obvious simple solution :o)
jnthn FROGGS: So will need to see what label is being thrown, if any, and check it in the handler, I think.
FROGGS jnthn: but how can I check it in the handler if I cannot attach it to the handler? 09:06
Woodi no, no, no... for line-after-line format lines are obvious way !
FROGGS I get the thrown payload, but I have nothing to compare it to 09:07
jnthn FROGGS: huh? You pass the label into MapIter, no?
FROGGS Woodi: I wasn't talking about the current piece of code :o)
jnthn: I have it in the MapIter, aye
FROGGS hmmm 09:08
jnthn And the label is conveyed through the exception object, surely?
FROGGS the thrown label is in the payload of the exception, yes
jnthn So you get it and compare it? 09:09
'REDO', $state = 2, 09:10
FROGGS jnthn: are you saying that I should try to get my hands on the thrown exception in MapIter.reify? using nqp::exception()?
jnthn Like there.
Right.
FROGGS aha
jnthn I hope at some point we'll compile sink-context for loops into something that doesn't need to go through MapIter. 09:11
FROGGS I am all 'for' it :o)
jnthn :P 09:12
nwc10 good appropriate-time-of-day, real-jnthn
jnthn o/ nwc10
FROGGS ohh, it seems to work now... damn, that was tricky 09:52
jnthn Welcome to Perl 6 impl :P 09:55
FROGGS :P 10:00
jnthn righty...admin things done, now I can hack :)
nwc10 good afternoon, jnthn 10:01
jnthn ;) 10:02
I think the VMNull-introducing branch seems to not be busting things. 10:05
So I think I'll go ahead and merge.
jnthn Hm, well, it was a ff in Moar :) 10:06
haha
jnthn github.com/Netflix/RxJava/wiki/Obs...s#parallel # that's a cute supply method idea :) 10:09
dalek p: 2b8ad37 | jnthn++ | tools/build/MOAR_REVISION:
Bump to a Moar with VMNull changes.
10:15
masak this month still wants for a release manager. 10:17
dalek kudo/nom: 7a8d595 | (Timo Paulssen)++ | src/vm/moar/ops/perl6_ops.c:
this gets us through CORE.setting. but it's probably wrong.

at the very least p6captureouters is not correct this way.
10:32
colomon …. errr, that's a scary looking commit message. 10:33
jnthn colomon: It was the first commit in a branch 10:34
colomon: Which I just merged
colomon ah
dalek rlito: 4242a67 | (Flavio S. Glock)++ | / (4 files):
Perlito5 - string parser flags \E \L \U \Q
11:00
p/async_ops: 7ca649e | (Donald Hunter)++ | src/vm/jvm/runtime/org/perl6/nqp/ (2 files):
Implement asyncwritebytes on JVM.
11:05
dalek rlito: 971dcd9 | (Flavio S. Glock)++ | / (3 files):
Perlito5 - AST dumper tweak
11:08
tadzik did anyone look into a deserialization bug from p6u? 11:11
FROGGS tadzik: not yet 11:16
pippo o/ #perl6! 11:24
lizmat pippo o/ 11:25
pippo o/ lizmat :-) 11:26
I have tried this jnthn example here gist.github.com/anonymous/260ffb652a390fa9bb45 11:27
but does not reliably work: gist.github.com/anonymous/4850e487711d1d97dca7
Is it a know bug?
lizmat tries 11:29
pippo Results differ and I also have unhandled exceptions …
jnthn If we're unlucky enough that .words uses gather/take, then it's probably the known issue around that. 11:30
Only on Moar, not JVM.
pippo jnthn: I confirm JVM works fine.
lizmat confirmed the problem on moar 11:31
.words uses .comb, which uses .map
oops
lizmat words for defined objects uses com, which uses match, which uses gather 11:32
although I'm really at a los to understand why gather would be needed here
lizmat *loss 11:33
dalek kudo/nom: 7c80abb | jnthn++ | src/vm/moar/ops/perl6_ops.c:
Fix a warning.
11:35
kudo/nom: 2f5809b | jnthn++ | src/vm/moar/ops/perl6_ops.c:
Move some reads after lexical lookups.

This is in preparation for making allocation of scalars etc. lazier.
pippo lizmat: so at the moment gather/take is somehow causing glitches with concurrency on Moar. Thank you lizmat and jnthn. 11:36
I'll use JVM for that kind of tasks for now. 11:37
lizmat pippo: that seems like a good temporary workaround 11:39
jnthn Yeah. I looked a bit at the gather/take bug. It's hard.
The fix may not be hard
But working out what's going on is. 11:40
pippo jnthn: I am not a pro. Well the contrary of that is more realistic. But if I can help I can have some hours this week-end. 11:44
afk & 11:48
masak tip for when you know you only need one grammar/actions pair: put the grammar inside the actions class. 12:18
and then do G.parse(..., :actions(self.new)) 12:19
or even $?CLASS.new 12:20
lizmat senses an opportunity for a blog post :-) 12:26
masak that's what I felt when I discovered this, yes. 12:29
I also re-used the same actions *object* for several parses, something I hadn't done before. 12:30
this tends to be something one wants when parsing a line-based format.
dalek kudo-star-daily: 0da4854 | coke++ | log/ (5 files):
today (automated commit)
12:35
Ven github.com/coke/rakudo-star-daily/...0da4854209 -- changes over ~60 days 12:37
Ven github.com/coke/rakudo-star-daily/...0da4854209 -- over one month 12:38
dalek ecs: b806d66 | (Elizabeth Mattijsen)++ | S17-concurrency.pod:
Spec Supply.act
12:39
lizmat m: Supply.new.tap.WHAT.say 12:48
camelia rakudo-moar 72f5b9: OUTPUT«(Tap)␤»
lizmat m: Tap.WHAT.say 12:49
camelia rakudo-moar 72f5b9: OUTPUT«===SORRY!=== Error while compiling /tmp/Rc9_uyKrhR␤Undeclared name:␤ Tap used at line 1␤␤»
lizmat hmmm.. seems we cannot check if something is a Tap ?
jnthn Not easily
I think it's a lexical class at the moment within Supply
masak m: my @fruits = { :apple }, { :orange }, { :orange }; for @fruits { when :(:$apple) { say "apple" }; when :(:$orange) { say "orange" } } 12:50
camelia rakudo-moar 72f5b9: OUTPUT«apple␤orange␤orange␤»
lizmat jnthn: it is
masak syntax is a bit quirky, but can definitely use signatures to partially match hash pseudo-objects.
lizmat is there a reason for having it only inside the Supply role ? 12:51
jnthn Mostly because it's only meaningful for Supply to create them.
And I tend to default to encapsulating things I consider implementation details :) 12:52
lizmat indeed, it;s now just hard to test whether .tap actually returns a Tap :-)
jnthn Aye.
I've no particular feelings on how to fix that :)
lizmat the odd thing of course, is that .WHAT *does* expose the inner Tap class 12:53
as (Tap), not as e.g. (Supply::Tap) 12:54
masak lizmat: well, there's your way to check whether something is a Tap, then :P
m: say Supply.new.tap ~~ Supply.new.tap.WHAT 12:55
camelia rakudo-moar 72f5b9: OUTPUT«True␤»
lizmat eh... that feels like checking that 42 ~~ 42
masak more like 42 ~~ Int
where someone gave you a type and told you it's an Int.
lizmat would be more like 42 ~~ 42.WHAT 12:56
I can't specify the Int, *that* is the problem
masak could declare a Supply.Tap method that returns the Tap type. 12:57
but I'm not sure that's preferable to just putting Tap outside Supply.
lizmat well, that's what
brb
masak if the reason for keeping it inside was to control who gets to create objects. 12:58
m: my $t1 = Supply.new.tap; my $t2 = $t1.new; say $t2.^name; say $t1 === $t2
camelia rakudo-moar 2f5809: OUTPUT«Tap␤False␤» 12:59
masak seems you can already.
jnthn Yeah, it's not any real protection. 13:00
lizmat so ok if I take it out of the role ? 13:01
jnthn yeah, I guess it won't cause any problems... 13:02
lizmat ok, will check if it regresses anything
dalek kudo/nom: 071ee1a | (Elizabeth Mattijsen)++ | src/core/Supply.pm:
Move Tap class out of Supply role

Mainly so that we can easily check for Tappiness of a tap
13:12
lizmat no regresssions
jnthn: is there any reason why you didn't implement act as: 13:15
self.tap(&actor,|%_) 13:16
?
why the do, when the "more" on the tap would work just as well ?
and we wouldn't need a moreless tap anymore then 13:17
jnthn lizmat: act promises actor semantics 13:20
lizmat: That is, you can be sure that you are only running the tap callback one at a time.
lizmat ah, and more doesn't
[Coke] still 2 segfaults in rakudo.moar spectests today (haven't pushed today's results yet) 13:21
jnthn lizmat: The things you pass in .tap can run on many threads potentially
[Coke] still 1 rakudo.parrot failure.
lizmat gotcha 13:23
lizmat jnthn: the only reason for the "moreless" tap, was act, right? 13:27
jnthn lizmat: Yeah, though we may want a .wait() too 13:28
lizmat as in Supply.wait ? 13:29
jnthn Right
lizmat what would that do?
jnthn When you want to wait until a supply is done
lizmat ah, ok
jnthn Block until done or quit happens.
It's sometimes useful, when you primarily want to tap a supply for its side-effects
lizmat ack, will spec and implement and test :-)
jnthn though tbh I've used it mostly in demonstrations more than real code 13:30
lizmat well, I guess the same goes for await() :-) 13:30
jnthn No, await is nice in real things :) 13:32
timotimo aye
jnthn Though we probably want to teach it to return the thread to the scheduler.
ala C#'s await
I almost made that happen once, but our continuations on JVM still hit too many barriers 13:33
Probably can do it on Moar
dalek kudo/nom: 0a4dad0 | (Elizabeth Mattijsen)++ | src/core/Supply.pm:
Leave some comments for future optimizers
13:35
dalek ast: 9c839e2 | (Elizabeth Mattijsen)++ | S17-supply/act.t:
Add basic tests for Supply.tap
13:49
lizmat afk for a bit 13:51
dalek rlito: 1bf5467 | (Flavio S. Glock)++ | / (3 files):
Perlito5 - string parser flags \E \L \U \Q (more)
14:03
masak notices, not for the first time, how often he fails to follow his own advice in strangelyconsistent.org/blog/theres...-wrongness 14:07
it's not even spelled out in that post. no wonder. :)
"When testing that something fails, be sure to test for the *type* of failure."
moritz that's why implemented typed exceptions :-) 14:16
masak :) 14:17
masak moritz++ 14:17
moritz: did you know that Python 2 went through a similar improvement? 14:18
from strings to types.
moritz masak: no, I didn't
masak Python 3.x finally gets rid of the last vestiges of the string ways to throw exceptions.
moritz $ git grep throws_like|wc -l 14:19
226
$ git grep 'class X::'|wc -l
193
moritz the first one was in roast, the second in rakudo 14:20
seems like we're still a bit away from decent coverage here
masak the second insight, which jnthn++ taught me and which I haven't written a blog post about, is that exception objects are *objects*, representing the interesting state at the time of error, along with the interesting follow-up actions you can take from there (e.g. to fix it). 14:22
slogan: "good exceptions tell you what to do next"
moritz that's fine for high-level exceptions
masak right, my head is in application space ;) 14:23
moritz for low-level exceptions like permissin denied", there simply is no good, universal perspective of what to do next
masak no, those perspectives tend to emerge within a program, not inside the compiler or runtime. 14:24
dalek rlito: 96ad233 | (Flavio S. Glock)++ | / (3 files):
Perlito5 - string parser flags \E \L \U \Q (more)
14:36
moritz masak: do you happen to remember that article on (weighted) dice rolling whose URL was floating around here a few times? 14:40
PerlJam moritz: Are you talking about www.keithschwarz.com/darts-dice-coins/ ? 14:46
masak that's the one. PerlJam++ 14:48
vendethiel shouldn't that improvement make perl6 really faster ?
moritz PerlJam++ 14:49
masak vendethiel: Perl 6 is a specification, without any inherent speed.
vendethiel -.-
rakudo.
masak vendethiel: by "that improvement", do you mean the above-linked article?
I don't believe weighted dice rolling is something that tends to be on hot paths... :)
jnthn Only in .roll :P 14:50
masak oh, does .roll still do weighted?
jnthn No idea :)
vendethiel masak: ah, that's right, there's no mention of that MoarVM commit here
masak oh, that explains it.
vendethiel no, I meant lazily allocate $/ and $!
masak ah, yes.
timotimo i wonder if there's a similarly clever thing to make .pick more efficient when it has n > 1 14:56
moritz timotimo: there are lots of things :-) 14:57
timotimo: assume you have M elements in the list
timotimo: if M >> n, it makes sense to do n separate pics, with a blacklist of already picked elements, and retry if you hit the blacklist
timotimo oh 14:58
moritz timotimo: if n is close to n, you can do a fisher-yates shuffle, and pick the first n elements
timotimo ah, i was actually also thinking of bag semantics, but that can be done with a mapping from n to Bag.kxxv
jnthn r: sub l () { 1, 2 }; my %a; my @z = (%a{'x'} = l, l); say @z.perl 14:59
camelia rakudo-jvm 0a4dad: OUTPUT«(timeout)»
..rakudo-{parrot,moar} 0a4dad: OUTPUT«Array.new($((1, 2), (1, 2)))␤»
moritz and inbetween, you can make a copy of the array; pick one, delete it, move the last element its place, repeat
lizmat masak: fwiw, only scanning the article, I think that's how I implemented Baggy.roll and Baggy.pick 15:00
timotimo that does sound pretty nice and should probably be done at some point :)
#LHF 15:01
jnthn m: sub l () { 1, 2 }; my %a; say l.perl 15:02
camelia rakudo-moar 0a4dad: OUTPUT«(1, 2)␤»
jnthn m: sub l () { 1, 2 }; my %a; say (l, l).perl 15:02
camelia rakudo-moar 0a4dad: OUTPUT«((1, 2), (1, 2))␤»
jnthn m: sub l () { 1, 2 }; my %a; say (%a{'x'} = l, l).perl
camelia rakudo-moar 0a4dad: OUTPUT«$((1, 2), (1, 2))␤»
moritz timotimo: actually, List.pick already uses Fisher-Yates 15:04
timotimo: and a lazy one at that :-)
timotimo oh, very good
moritz timotimo: so the only optimization might be to not clone the array if there's a small number of elements picked
timotimo like a single one :) 15:05
moritz timotimo: not sure if that's work it
maybe for really large lists
timotimo already does that
timotimo return self.at_pos($elems.rand.floor) if $n == 1; - for list at least 15:06
PerlJam Just read a brief discussion on #perl regarding threads and the usual mantra of "don't use threads" was, of course, uttered. It is so nice to never have to say that for Perl 6. :-)
timotimo okay, all that stuff seems to have already seen a slight optimization pass some time in the past 15:06
Ulti if I get "Error while compiling op call: Iteration past end of iterator" whilst working with a Grammar.parse() any protips on golfing? 15:07
moritz Ulti: run with --ll-exception, and nopaste the backtrace somewhere 15:08
timotimo that usually happens inside the QAST/Operations.nqp of nqp
moritz detects lighting and thunder, and disconnects his laptop from the power cord 15:10
Battery 0: Discharging, 99%, 03:41:34 remaining
that should suffice :-) 15:11
Ulti pastebin.com/6f7eeCZq 15:11
code: gist.github.com/MattOates/0a0dac1fd96377da2c35 15:12
Ulti though a much simpler version with just the grammar and .parse had the same problem 15:12
Ulti slurp is all ok 15:12
also perl6 version 2014.04-117-gc9f2239 built on MoarVM version 2014.04-29-ga109e8d 15:13
dalek rlito: 8dda686 | (Flavio S. Glock)++ | / (4 files):
Perlito5 - string parser flags \E \L \U \Q (more)
15:15
PerlJam Ulti: What are all of those other letters for in dna/rna? 15:16
Ulti various confusion sets
timotimo bon marcher
er.
Ulti where you aren't sure which of two nucleotides it is
Ulti or they have some modification 15:17
masak lizmat: oh -- didn't know that, but very happy to hear it. lizmat++
Ulti like you are talking about weird functionalised short bits of RNA or DNA
PerlJam: if you are super interested en.wikipedia.org/wiki/FASTA_format#...esentation 15:18
masak Ulti: so, basically, any() semantics. :)
Ulti yeah
masak or one(), I guess.
moritz Ulti: now that I'm looking at the backtrace, I have no clue. Sorry :( 15:20
Ulti heh yeah
I'll try something insanely simple like a trivial grammar 15:21
masak pro tip: develop grammars using TDD. you'll thank yourself.
vendethiel is on an unity project and did not find the "tests" button 15:22
timotimo m: for <1 2 3> Z <a b c> -> $a Z $b { say "$a $b" }; # this could do with a better error message, IMO.
camelia rakudo-moar 0a4dad: OUTPUT«===SORRY!=== Error while compiling /tmp/lDELijvTtk␤Missing block␤at /tmp/lDELijvTtk:1␤------> for <1 2 3> Z <a b c> -> $a ⏏Z $b { say "$a $b" }; # this could do wi␤ expecting any of:␤ postfix␤ …»
timotimo m: for <1 2> Z <a b> -> $a Z $b { $a ~ $b } 15:23
camelia rakudo-moar 0a4dad: OUTPUT«===SORRY!=== Error while compiling /tmp/lgqoxfTObL␤Missing block␤at /tmp/lgqoxfTObL:1␤------> for <1 2> Z <a b> -> $a ⏏Z $b { $a ~ $b }␤ expecting any of:␤ postfix␤ infix stopper␤ …»
TimToady why are you putting an operator into a signature?
PerlJam TimToady: that would be the better error message ;) 15:24
TimToady well, unrecognized capitalized words in a sig are much likelier to be types
if it's a rare enough failure mode, it's not worth the dwim, and it does, in fact, point at exactly where the problem was 15:26
perhaps it could see that a { is nearby, and say "Unrecognized stuff before the {" or some such
or maybe "Missing block or malformed signarue" 15:27
s/ru/tur/
we also don't know that they didn't intend => $a 15:28
TimToady or suppose they said $a X $b, and really meant $a, X $b 15:28
TimToady sometimes better messages aren't better 15:29
PerlJam "malformed signature" seems like it would have provided a little more cognitive push in a useful direction.
dalek ast: c9dced7 | (Elizabeth Mattijsen)++ | S02-names/is_cached.t:
Add test for "is cached" on proto

with --optimize=0, all is ok. With any other setting, the proto is taken out and two tests fail.
15:31
PerlJam Ulti: I did a couple of quick tests and the iterator error only seems to appear when I have <-[ ]>+ as the pattern for id. change that to \S+ and it doesn't generate that error anymore. 15:36
Ulti I have a flip between working and not working when I move from "grammar TRIVIAL { rule TOP {<[A..Z]>+} }" to "grammar TRIVIAL { rule TOP { <line>* } token line {<[A..Z]>+} }" 15:38
this is with something super simple 15:39
lines of random capital letters
and just the code for that grammar and a slurp and TRIVIAL.parse
so unless what I've done with that rule/token is super weird there is some bug outside of my code 15:40
TimToady where do you eat the \n?
Ulti I don't, but I get the same thing if I tell "line" to eat the \n
as in put it inside the character class
<[A..Z\n]>
is that wrong? 15:41
TimToady well, the * on <line> is a difference
TimToady if you put \n in the cclass it will eat the whole file 15:41
Ulti yeah
at the moment I dont really care what is matched... I just dont want a failed to compile OP 15:42
TimToady what's the error message?
Ulti Error while compiling op call: Iteration past end of iterator
TimToady cool!
Ulti yeah I thought the point of iterators is they dont iterate past the end of where you can iterate :3 15:43
TimToady maybe someone here remmebers working in the neighborhood of that error message lately 15:43
Ulti yeah I did `rakudobrew build moar` about half an hour ago 15:44
lizmat FROGGS has been working in that area, no? trying to get labels in?
PerlJam yeah, but aren't his changes on a branch?
TimToady or maybe lack-of-progress checking in regex?
PerlJam Ulti: have you tried it on rakudo-jvm? 15:45
(or parrot?)
TimToady .parse is supposed to enforce a complete match; maybe there's an extra \n at the end?
Ulti PerlJam: it might not generate the error with the \S+ but it also goes utterly crazy 15:46
also \S+ isn't what I want the format specifically is a ' ' not any white space :S
PerlJam: nope
TimToady you can't match not-space with <-[ ]> because ws is insigificant inside cclasses 15:47
Ulti :(
PerlJam Ulti: I think you can use <-space> 15:48
TimToady m: $_ = "foo"; say ~/\X20/
PerlJam <space> matches a literal space char, no/
camelia rakudo-moar 0a4dad: OUTPUT«␤»
PerlJam ?
TimToady n: $_ = "foo"; say ~/\X20/
camelia niecza v24-109-g48a8de3: OUTPUT«Regex()<instance>␤»
moritz <-[\ ]>
TimToady <-[\x20]> 15:49
PerlJam tmtowtdi! :)
TimToady m: $_ = "foo"; say ~/<-[\ ]>/
camelia rakudo-moar 0a4dad: OUTPUT«␤»
TimToady m: $_ = "foo"; say ~m/<-[\ ]>/
camelia rakudo-moar 0a4dad: OUTPUT«f␤»
TimToady m: $_ = "foo"; say ~m/\X20/ 15:50
camelia rakudo-moar 0a4dad: OUTPUT«f␤»
dalek kudo/nom: aa19f5c | (Elizabeth Mattijsen)++ | t/spectest.data:
Make sure we test Supply.act
15:51
jnthn "Iteration past end" things are normally due to something in NQP expecting an array to have a certain multiplicity of elements, and it failing to do so. 15:52
PerlJam so ... what does <-[ ]> mean exactly? Match any character that's not in the empty set? 15:53
Seems like that would be an easy target for an appropriately helpful error message. 15:54
FROGGS PerlJam: my stuff is in a branch, aye 15:58
japhb I just wandered around the search results for 'use NativeCall' in Perl code on GitHub. There's some cool stuff in there. :-) 16:07
avuserow: Do you mind if I use a snippet of your perl6-compress-snappy code as a NativeCall example in my talk-in-progress? 16:10
BTW, one thing I'm noticing in all this NativeCall-using code I'm looking through is that people have reinvented a sub to figure out the correct lib name to use in the 'is native()' trait on multiple platforms over and over and over. This seems to be something NativeCall could just provide, at least for the relatively common cases. 16:14
FROGGS it should at least provide a proper hook 16:15
or patterns or so
japhb Is { ... } or {*} the current idiom for native routines? 16:19
FROGGS the Whatever I think
jnthn The whatever.
FROGGS because that is like what the default proto is, ... is stub code 16:20
FROGGS and it is more like "yeah, dispath as you want" rather than "ohh dang, stub code /o\" 16:20
dalek ecs: c2543da | (Elizabeth Mattijsen)++ | S17-concurrency.pod:
Spec Supply.wait
16:21
kudo/nom: ac169ca | (Elizabeth Mattijsen)++ | src/core/Supply.pm:
Naive implementation of Supply.wait
16:23
japhb FROGGS, jnthn: I was hoping that was the right answer. :-) 16:26
FROGGS good :o)
jnthn just taught the inliner to generate simpler code when it can see the args to the thing being inlined are used just once in inline target. 16:36
FROGGS coool! 16:38
jnthn Still spectesting, but gist.github.com/jnthn/7d2421d4e3e77b7570b5 is nice.
FROGGS ohh
:o)
nwc10 interesting.
vendethiel oh wow :-) 16:39
jnthn It's just one benchmark. :)
loop_empty_native from perl6-bench, of note
nwc10 sure, but it's the first one I've seen where interpreted Perl 6 has out-done interpreted Perl 5 16:40
jnthn Same.
Also, the code still ain't that great.
nwc10 also, I stress, "interpreted" 16:41
in that, likely someone will say "but $other is faster, but their $other involves a JIT"
er,
in that, likely someone will say "but $other is faster", but their $other involves a JIT. Which isn't a fair race.
but, of course, the way to beat the JIT is to do less work, so that the relative JIT startup cost hurts 16:42
nwc10 (ie, the antithesis of PyPy benchmarks) 16:42
nwc10 jnthn: your new thing is cross-backend, or Moar only? 16:42
jnthn cross-backend 16:43
timotimo the benchmark is already done, huh.
dalek p: 80e52eb | jnthn++ | src/QAST/ (11 files):
Add a way to count arg placeholder usages.
jnthn timotimo: I guess you were just running a Moar one? 16:44
FROGGS I stil have the dream that stage parse drops to like 20s... I wonder if we get there this year 16:46
jnthn There's a good chance, what with spesh coming along, JIT, etc. 16:49
dalek ast: 2b2646a | (Elizabeth Mattijsen)++ | S17-supply/wait.t:
Add simple tests for Supply.wait
nwc10 we can have a pony? Er, racehorse? Er, racing camel?
is that a standard benchmark in the suite? Would be interesting to see it across all 3 backends, and for different iterations on the JVM 16:52
dalek p: a232e9a | jnthn++ | tools/build/MOAR_REVISION:
Get a MoarVM with lazy lexical alloc opt.
16:53
jnthn nwc10: The one I just did, or what FROGGS is asking about? 16:55
dalek kudo/nom: 270aec7 | jnthn++ | / (2 files):
Generate better code in some cases if inlining.

If the argument is only ever used once, no need to assign it to a temporary. Also bumps NQP_REVISION to get needed QAST improvement.
16:56
nwc10 your loop where MoarVM beats your Perl 5
jnthn nwc10: oh, yeah, that's in there
dalek kudo/nom: 8ddb1e7 | (Elizabeth Mattijsen)++ | t/spectest.data:
Make sure we test Supply.wait
17:09
[Coke] jnthn++ 17:15
[Coke] wonders if we should go through --optimize levels and run the spec test suite and see what breaks.
(for each level/backend combo)
(ratcheting up the default level as they test clean?) 17:16
lizmat before these last changes: 17:19
Files=834, Tests=31809, 225 wallclock secs ( 8.88 usr 4.12 sys + 1430.82 cusr 150.27 csys = 1594.09 CPU)
after these changes:
Files=834, Tests=31812, 212 wallclock secs ( 8.37 usr 3.94 sys + 1350.15 cusr 145.75 csys = 1508.21 CPU)
moritz m: say (225 - 212) / 225
camelia rakudo-moar aa19f5: OUTPUT«0.057778␤»
lizmat m: say (1594 - 1508) / 1594 17:20
camelia rakudo-moar aa19f5: OUTPUT«0.053952␤»
lizmat pretty consistent wallclock / CPU savings
too bad we've gone from ~180 wallclock a few weeks ago to 210 17:21
although there were quite some tests added
I don't think they account for the difference
lizmat fwiw, I'm not seeing such a good test on OSX: 17:24
$ time perl6 --optimize=3 -e 'loop (my int $i = 1; $i <= 100000000; $i = $i + 1) { }'
real0m11.508s
user0m11.459s
$ time perl -e 'use integer; for (my $i = 1; $i <= 100000000; $i = $i + 1) { }'
real0m5.788s
user0m5.784s
so on my machine, Perl 5 is still twice as fast :-( 17:25
nwc10 lizmat: figure out how to do dead code elimination in NQP. At which point, Rakudo will be faster :-) 17:26
can NQP constant fold yet? 17:27
FROGGS jnthn: doing the label checks in nqp::handle does not work too well... 17:29
FROGGS jnthn: because it means that I'd need to throw/rethrow in case we try to run the handler of the wrong label 17:30
FROGGS jnthn: and rethrowing somedoes not work... it rethrows to itself 17:30
FROGGS and its stops after eight times 17:30
jnthn lizmat: Well, probably compiler differences. 17:31
lizmat perhaps :-( 17:32
jnthn lizmat: Things in my Linux VMs are always a LOT slower than my native Windows builds.
I wonder what optimization level we're using today.
'cus at one point (maybe still true) we didn't build with -O3 or even -O2 17:35
While MSVC has all the opts turned on.
lizmat clang -fno-omit-frame-pointer -fno-optimize-sibling-calls -O1 -DNDEBUG -D_DARWIN_USE_64_BIT_INODE=1 17:37
jnthn -DNDEBUG won't be helping any either. 17:37
jnthn wonders what happens if that is bumped to -O2 17:38
lizmat tries 17:38
nwc10 no, -DNDEBUG helps. That disables assertions. 17:46
jnthn: HEAD/HEAD/HEAD works on "my" machine, still. 17:47
nwc10 and if -O2 breaks, try -O2 -fno-strict-aliasing 17:48
jnthn oh...duh :)
nwc10 and be unhapy that we are still using something not entirely unlike C
I can't remember if there was an actual usable tool, or just a paper about hacking clang to figure out what code is "dead" due to optimisations, but changes behaviour 17:49
ie, undefined behaviour you should fix
jnthn nqp: say(9 +> 3) 17:52
camelia nqp-parrot: OUTPUT«Confused at line 2, near "say(9 +> 3"␤current instr.: 'panic' pc 15634 (gen/parrot/stage2/NQPHLL.pir:5739) (gen/parrot/stage2/NQPHLL.nqp:425)␤»
..nqp-moarvm: OUTPUT«Confused at line 2, near "say(9 +> 3"␤ at gen/moar/stage2/NQPHLL.nqp:369 (/home/p6eval/rakudo-inst-1/languages/nqp/lib/NQPHLL.moarvm:panic:105)␤ from gen/moar/stage2/NQP.nqp:917 (/home/p6eval/rakudo-inst-1/languages/nqp/lib/nqp.moarvm:comp_unit:346)␤ fro…»
..nqp-jvm: OUTPUT«(timeout)#␤# There is insufficient memory for the Java Runtime Environment to continue.␤# pthread_getattr_np␤# An error report file with more information is saved as:␤# /home/p6eval/hs_err_pid4249.log␤[thread 140456514119424 also had an error]␤»
jnthn nqp: say(nqp::bitshiftl_i(9, 3))
camelia nqp-jvm: OUTPUT«#␤# There is insufficient memory for the Java Runtime Environment to continue.␤# pthread_getattr_np␤# An error report file with more information is saved as:␤# /home/p6eval/hs_err_pid4304.log␤»
..nqp-{moarvm,parrot}: OUTPUT«72␤»
nwc10 jnthn: on "my" machine, perl 5 is 12.5s, perl6-m is 17 17:55
vendethiel (I guess a leftshift *is* a memory-intensive operation, after all)
nwc10 thats /usr/local/bin/perl
nwc10 builds blead with the same compiler as MoarVM used 17:56
nwc10 blead is twice as fast as perl6-m 18:02
this week.
nwc10 (Better compiler, and likely better runtime, as /usr/local/bin/perl is 5.12.something) 18:03
no, not my machine.
itz goes to rakudo.org/downloads/star/ 18:05
:(
nwc10 well volunteered! :-)
masak m: grammar G { regex TOP { $<thing>=a? } }; say ?G.parse("")<thing> 18:19
camelia rakudo-moar 270aec: OUTPUT«True␤»
masak this just suprised me a lil' bit :) 18:20
m: grammar G { regex TOP { $<thing>=a? } }; say ?G.parse("")<thing>.chars
camelia rakudo-moar 270aec: OUTPUT«False␤»
masak guess I can check it like that instead...
FROGGS a match is a match, even when it successfully matched an empty string 18:21
masak I'm not saying it's not *reasonable*, by the way. the quantifier did match.
right.
so I'm not clamoring for change here.
just saying it's a possible gotcha.
FROGGS but yeah, it is a little WAT
timotimo t.h8.lv/p6bench/2014-05-01-vmnull.html - interesting. 18:22
lizmat nwc10 jnthn: so I hacked the Makefile s/O1/O2 18:25
build and ran spectest: ok, and at 205/1455 (so less than before, but close to noiselevels)
now I'm looking at a more reliable way of changing -O1 to -O2 18:26
is there a parameter for that anywhere in Configure.pl?
or is it some template file I need to change?
^^ moritz ?
retupmoca lizmat: I'm passing '--optimize=3' to moar's Configure.pl for -O3
gcc -O3 is looking clean as well so far, but I don't have any benchmark data points 18:27
lizmat Unknown option: optimize 18:28
guess I'm looking at the wrong Configure.pl
FROGGS moar's configure.pl is that
retupmoca I build moar/nqp/rakudo from separate checkouts, FWIW
FROGGS me too
moritz lizmat: are you talking about rakudo's optimize level? or that of the C compiler? 18:29
timotimo seems like i need to get an even newer rakudo and test that
lizmat C compiler
I thought was the idea ?
lizmat is a noob developer who only uses --gen :-) 18:30
moritz lizmat: I think [Coke] was talking about rakudo's --optimize= levels
lizmat ah, then we're miscommunicating :-)
masak I might've just discovered a new pattern. it's not earth-shattering, but it's nice. 18:31
`if %h<prop> :delete { ... }`
(only use when %h<prop> is guaranteed to only hold truthy values, I guess)
oh wait. 18:32
lizmat anything that booleanifies will do I guess
moritz masak: you could say if %h<prop> :delete :exists { ... } otherwise
masak moritz: yeah, just realized.
this is verra nice.
lizmat S02:2559 18:33
synopsebot Link: perlcabal.org/syn/S02.html#line_2559
lizmat I knew it would come in handy someday :-)
masak :)
moritz lizmat++ # implementing it
masak lizmat: yes, I remember it. it came in handy just now :)
masak lizmat: I remember discussing the semantics with you, too. but I forget which bit exactly. 18:34
lizmat well, when I started looking at slice adverbs
nobody had thougt (afaik) that you might want to do more than 1 18:35
and nobody had thought about really using them as full blown adverbs
e.g. :delete($really)
would only delete if $really was true
dalek kudo/nom: fd5f8eb | (Elizabeth Mattijsen)++ | src/core/Supply.pm:
We don't need a vow as we don't expose the Promise
18:46
timotimo t.h8.lv/p6bench/2014-05-01-vmnull.html - update 19:06
lizmat what happend in while/push/join? 19:07
and rc-forest-fire? 19:08
vendethiel rakudo moar faster than nqp moar ?! 19:08
timotimo probably noise? 19:09
lizmat ah, of course... nqp vs moar
*phew*
timotimo whoa.
lizmat ?
vendethiel lizmat: you can go back to doing non-production-ready stuff with perl6 now :P
lizmat eh, why would I want to ? 19:10
vendethiel that was a joke. doesn't matter, anyway
lizmat must be too autistic 19:11
moritz auto[sic] 19:13
timotimo vendethiel: were you referring to "it came in handy just now"?
vendethiel timotimo: no, I thought lizmat read those benchmarks as nqp vs perl5 vs rakudo 19:15
m: augment class Int { supersede method Bool { !!! } } 19:19
camelia rakudo-moar 8ddb1e: OUTPUT«===SORRY!=== Error while compiling /tmp/YT1QI8AzdA␤augment not allowed without 'use MONKEY_TYPING'␤at /tmp/YT1QI8AzdA:1␤------> augment class Int ⏏{ supersede method Bool { !!! } }␤ expecting any of:␤ …»
vendethiel m: use MONKEY_TYPING; augment class Int { supersede method Bool { !!! } }
camelia rakudo-moar 8ddb1e: OUTPUT«===SORRY!=== Error while compiling /tmp/TXKRzShZIs␤"supersede" not yet implemented. Sorry. ␤at /tmp/TXKRzShZIs:1␤------> ass Int { supersede method Bool { !!! } ⏏}␤ expecting any of:␤ argument list…»
masak lizmat: oh, right. I suggested the :delete($really) use case. now I remember :) 19:21
lizmat: I think multiple adverbs had been thought about before, but not really used in practice. nor thought through to the end, like you did. 19:22
lizmat hence the "afaik" in my remark :-)
masak I distinctly remember discussing combintations of :exists and :delete in a certain room at Bishops here in Malmö, with jnthn, while drinking a nice beer or other... 19:23
combinations*
jnthn Bishops. What would we do without it... 19:25
lizmat either I had too much Bishops, or I wasn't there :-) 19:26
jnthn lizmat: Yes, it was the place with the huge selection of whisky. 19:28
vendethiel `let $a;` is basically `temp $a; UNDO undefine $a;` ?
timotimo t.h8.lv/p6bench/2014-05-01-vmnull.html - now with more perl5 19:29
vendethiel what is happening with while_bind's nqp version ? 19:31
timotimo bad accuracy + noise? 19:32
vendethiel I suppose.
postwhile_nil_native goes crazy too
timotimo yes 19:33
masak vendethiel: not sure about 'undefine' (which doesn't exist in Perl 6, by the way). doesn't it set $a back to its previous value if any? 19:34
timotimo jnthn: make it even faster, please :)
jnthn :P
vendethiel masak: S04 "causes $x to start with its current value. Use `undefine temp $x;` to get Perl5 ..." 19:35
timotimo i'm going to build 2014.04 benchmarks for the nqps now, too 19:35
vendethiel S04:200 19:36
synopsebot Link: perlcabal.org/syn/S04.html#line_200
vendethiel looked through github's interface, and it was painful
masak m: my $x = 42; undefine $x; say $x 19:40
camelia rakudo-moar fd5f8e: OUTPUT«(Any)␤»
masak vendethiel: I stand corrected.
lizmat m: my $x is default(42) = 17; undefine $x; say $x 19:41
camelia rakudo-moar fd5f8e: OUTPUT«42␤»
lizmat sub undefine(Mu \x) { x = Nil } 19:42
undefine foo is the same as assigning Nil to foo
I seem to remember a discussion on whether to deprecate undefine
S32/Basics:74 19:43
"In all cases, calling C<undefine> on a variable should place the object in the same state as if it was just declared." 19:44
timotimo tadzik: you're being sloppy with your docs! 19:46
lizmat should unlink return True on attempting to unlink a non-existing file ? 19:59
Perl 5 returns 0 in that case, rather than 1
dlem \o/ 20:00
dalek rl6-roast-data: 97375a0 | coke++ | / (6 files):
today (automated commit)
dlem I just read jnthn's "Reactive Programming in Perl 6". Exciting times :-) 20:01
timotimo yes 20:02
quite
dlem One detail which seems a bit non-intuitive to me is the use of "more" to feed a supply. 20:03
How about "feed"? Or even "sink", to go with "tap" ;-) 20:04
lizmat feed and sink already have distinct (other) meanings in Perl 6
feels to me that could cause confusion
dlem OK. But "more"? I had to think about that one more than once before undertanding the meaning. 20:05
*understanding
vendethiel ^agreed. same with "winner"
lizmat as far as I'm concerned, the last word about "winner" hasn't been said yet 20:06
dlem I also read "tap" as a verb, so "more" doesn't quite do it for me.
lizmat as in the current spec, it is really of very limited use
lizmat .provide instead of .more ? 20:07
lee_ .push? 20:08
dlem .put, which is *almost* .tap backwards ;-)
lizmat: What are the current meanings of feed and sink which would cause confusion? 20:09
btyler sink context, and ==> feeds
which someone else will have to explain, I only know the words :) 20:10
lizmat S06:1390
synopsebot Link: perlcabal.org/syn/S06.html#line_1390
dlem AFAIK "sink context" ~ "void context". Using .sink to feed a supply wouldn't confuse me, at least. 20:11
vendethiel
.oO( pat a supply ? )
dlem vendethiel: He he, I thought about that one, too :-)
lizmat vendethiel: I was actually thinking the same thing
dlem If the current meaning of feed is ==>, then .feed to feed the supply wouldn't confuse me either. 20:12
Similar concepts, IIUC. 20:13
But .more? Come on! ;-)
lizmat it is a bit much, :-)
dlem :-) 20:14
lizmat well, I for one am starting to like .pat for 2 reasons
jnthn I'm not attached to "more", but coming up with a short name for it that doesn't clash with something else is...tricky. I had it as "next" at first, I think.
lizmat it's the inverse of .tap
and you're patting the Supply to be good, giving it something along the way :-)
and it's short 20:15
jnthn If we end up calling it pat, I'm going to give a talk with a supply named $cow :P
dlem jnthn: Nice! :-)
lizmat the only danger I see is for dyslexics who would type .tap instead of .pat
jnthn Well, the thing that makes it not-quite-inverse is that .tap lets you tap all 3 of the events (more/done/quit), not just more... 20:16
lizmat but generally you would only be intersted in the "more" value
masak I don't have a horse in this race, but let me just say that .pat seems a bit cute-today, and .more seems about a hundred times more explanatory.
lizmat I mean, the done/quit are optional
dlem jnthn: I understand it can't be easy. I just felt compelled to point out the one thing in your nice talk which stood out as counter-intuitive to me.
btyler this is a pure peanut gallery comment, but some of these sound a bit cute to my taste
dlem btyler: Yes, pat is too cute IMHO. But that's just me. 20:17
From the peanut gallery: How can it be that .feed would cause confusion? Or even .sink= 20:18
jnthn lizmat: Yes, which is the one you don't have to explicitly mention most of the time... 20:18
dlem s/=/?/
jnthn dlem: There isn't a .feed anywhere at the moment, so it's a possible in my view, though it does feel a tad awkward in that ==> is known as the feed operator and it does something a bit different... 20:20
dlem: Thing is that they're event names more than they're method names... 20:21
lizmat OTH, maybe .push would be good as well ?
Supply.push
Channel.push?
dalek rlito: 269a157 | (Flavio S. Glock)++ | / (4 files):
Perlito5 - js - delete() fix
lizmat I mean, Channel.send is internally a nqp::push already :-) 20:22
jnthn push works in a way, it just feels odd at the other end
lizmat well, that is what Channels / Supplies different 20:23
the receiving end is different, one could argue
the other end is basically always pushing a value
dlem jnthn: Hmm.. I just thought that you can "feed" the supply in one end and "tap" it on the other end.
lizmat I mean, we already can coerce a Supply to a Channel 20:24
dlem jnthn: Surely there is something I don't quite get, since that seems so obvious to me. I mentioned "sink" half jokingly, since I also associate that with a kitchen sink and tap :-) 20:25
lizmat not yet the other way around (well, I guess you can't without the running the risk of losing stuff if there is another thread receiving)
lee_ it also seems a bit like pub/sub redis functions
dalek rlito: c350706 | (Flavio S. Glock)++ | / (3 files):
Perlito5 - parser - use delete()
20:26
lizmat I seem to recall Subscribable is what jnthn originally had
which was not really fine with TimToady
dlem In any case, great work jnthn++, lizmat++, others++ 20:30
dlem It really is exciting to see how Perl 6 is developing. 20:32
lizmat I agree :-)
jnthn I didn't expect Subscribable to survive. In fact, I didn't want it to. :)
masak jnthn: oh? what do you expect to take its place? 20:33
jnthn masak: Supply already did take its place. :) 20:34
masak: To be clear, I didn't expect my initial name to stick. :)
jnthn masak: Which is fine; I was more interested in the semantics sticking ;) 20:34
dalek kudo/nom: 1775172 | jnthn++ | src/Perl6/Optimizer.nqp:
Various return typecheck/decont optimizations.
masak *nod* 20:35
masak .oO( no big supplies when it changed its name... ) 20:35
lizmat pulls and runs a spectest 20:36
timotimo t.h8.lv/p6bench/2014-05-01-vmnull.html - updated again
timotimo oh, now it's lacking a rakudo-moarvm to compare to 20:37
lizmat Files=834, Tests=31812, 208 wallclock secs ( 8.06 usr 3.88 sys + 1294.51 cusr 143.09 csys = 1449.54 CPU) 20:41
seems like a good improvement again :-) 20:42
timotimo oh, where'd that come from :) 20:43
jnthn digs them out between his couch cushions
jnthn Just picking off some easy ones. I'm too tired/stupid today to work on tricky ones. 20:45
jnthn Pondered what I want to do next with spesh while taking a walk earlier, though. 20:45
dlem bids goodnight 20:46
grondilu failed to load library 'dynext/libperl6_ops_moar.so': 20:50
paste.siduction.org/20140501204858
jnthn grondilu: Without looking: did you update your moar, but not do a clean Rakudo build? 20:52
grondilu I did update rakudo and I thought that would update moar automatically. I'll do it manually and I'll make clean 20:57
timotimo no, we only pull new revisions of moar and nqp in if you explicitly perl Configure.pl 21:00
grondilu ok 21:00
dalek kudo/nom: c07c5e3 | jnthn++ | src/Perl6/Optimizer.nqp:
Eliminate unrequired p6bool usages.

If we are putting it in a boolean context, but the thing it is going to boolify is simply some native int already (for example, coming from a comparison instruction), then just skip the whole p6bool thing.
21:10
timotimo t.h8.lv/p6bench/2014-05-01-vmnull.html - updated with a rakudo-moar/2014.04 21:13
dalek kudo/nom: a8e4df9 | (Elizabeth Mattijsen)++ | src/core/Supply.pm:
Make tap die $_, rather than .die

Str.die dies on method not found. If we want to allow .die, we need Any.die as well I guess.
21:14
masak lexical subs totally rule.
just wrote this line:
lizmat TimToady: would there be a reason not to have an Any.die that just { die self } ?
masak my $marker = %branch_markers{$value} // try_to_find_it_the_hard_way; 21:15
lizmat s/_/-/ ?
vendethiel lizmat: "an object shouldn't be responsible of its own death !" :o) 21:15
masak lizmat: for various reasons, in my own projects, I tend to go all-underscore.
lizmat TimToady: having to write "die $_" seems so twentieth century :-) 21:16
masak lizmat: what you're describing is already spec'd and implemented. it's spelled Exception.throw 21:18
jnthn masak: But doesn't exist on a string...
masak well, don't throw strings!
even Python already learned this! :P 21:19
lizmat jnthn: writing tests for IO::Notification.watch_path
are there really only 2 types of events? Renamed and Changed ?
FWIW, the Rename also seems to occur when a file is created 21:20
jnthn lizmat: Welcome to the world of IO notifications, where nothing can be relied upon at all ever. :/
timotimo :( 21:21
jnthn lizmat: I can imagine rename happening if you watch a file that didn't exist...
No idea if that's portably reliable though.
grondilu eventually compiled rakudo after Configure
lizmat well, I'm watching the dir, when I create a file in there, I get a rename event on the filename I create
jnthn wonders if exposing the kind of event libuv thinks it is is even a good idea... 21:23
lizmat: I'd write the tests to assume rather little. 21:24
lizmat trying to :-)
jnthn lizmat: Like, "if we create/change the file, we get at least one notification of some kind"
On windows it's certainly not safe to assume you'll get one notification per change.
lizmat I see a Rename on opening and closing the file 21:26
jnthn oh my... 21:28
timotimo we should use something like stable for that 21:29
lizmat opening an existing file, writing and then closing, gives a Changed event
timotimo: stable was designed for just that :-) 21:30
fwiw, on OSX I don't see any events more than once
timotimo just a "more special" stable to handle the crazyness that is file change notifications
jnthn timotimo: That's .uniq with :expires ;)
timotimo oh
of course! 21:31
lizmat that's what I meant, duh :-) 21:31
ok, I have a basic framework for doing the watch_path test... 21:32
will do that tomorrow after some shuteye& 21:33
timotimo \o/
gnite lizmat
good work these past few weeks!
dalek kudo/nom: 0ed6d8f | jnthn++ | src/Perl6/Optimizer.nqp:
Don't preserve $_ if we just killed it.
21:34
jnthn OK, now the code-gen for at least one benchmark is much nicer. :)
average about IO::Notifications , it can be implemented with the inotify API
jnthn Here:
timecmd perl -e "use integer; for (my $i = 1; $i <= 100000000; $i = $i + 1) { }"
command took 0:0:7.00 (7.00s total)
timecmd perl6-m --optimize=3 -e "loop (my int $i = 1; $i <= 100000000; $i = $i + 1) { }" 21:35
timotimo seems like i should get one more benchmark done
jnthn command took 0:0:2.95 (2.95s total)
timotimo wait 21:35
it's faster?
perl6 is actually faster than perl5 at something?
jnthn On my box, at least :P
timotimo i'm warming up my benchmarks :) 21:36
jnthn All these opts should work out on JVM too, fwiw.
masak 'night, #perl6
jnthn average: On one particular platform, yes...
cognominal jnthn, you optimized out the loop? :) 21:37
jnthn cognominal: No, just improved code-gen for loops - and many other things along the way.
average jnthn: and FindFirstChangeNotification / FileSystemWatcher on Windows stackoverflow.com/a/3517475/827519
timotimo jnthn: i don't need to --gen-nqp=master --gen-moar=master, right?
average jnthn: and fsevents on OSX developer.apple.com/library/mac/do...rence.html 21:38
jnthn average: Yeah, the issue is that we'll need to build our own abstraction layer if we want to use these. At the moment we're just using what libuv provides us portably, which is...rather limited :(
jnthn average: Building said abstraction layer, configure probes, etc. is some work. I'd be happy to see it done by anyone who fancies working on it; it's probably not going to get to the top of my list anytime soon. 21:40
timotimo jnthn: would parrot also be benchmarked?
er, benefit from the things?
jnthn timotimo: perhaps, yeah. 21:41
timotimo: JVM certainly will
I get its JIT likes the improvements I just did.
*bet
average jnthn: ah ok 21:42
timotimo :)
i don't have benchmark results for rakudo from recently :\
btyler just did some super casual repeats of those one-liners, p6 comes out slower here (2010 macbook pro, osx10.9): 7.5 seconds-ish for p5, 11.5 for p6 (both over 5 runs). 21:43
timotimo especially since i've gone to jvm 8
oh, also i can't build any more on my computer because of the -Xmx800
i have to set it up to 1000 again
btyler but holy cow does --optimize=3 make a huge difference, without it p6 takes ~30 seconds
timotimo wow, it just worked with only 800mx 21:50
no, it really didn't :( 21:53
(use of '_' as an identifier might not be supported in releases after Java SE 8)
all over the place
segomos _ 21:58
Timbus make -j3 22:29
aa 22:30
been a while since ive done that
timotimo aye, it makes me pretty happy that we can just -j3 for the three backends 22:32
Timbus lol, what i meant was i typed that into the chat by accident :> 22:33
timotimo oh
:D
Timbus yes it's cool how that works though
timotimo we have moritz++ to thank for that 22:34
does somebody run a sobby instance i could use with a friend? 22:35
jnthn m: say 18.14 / 19.67 22:47
camelia rakudo-moar fd5f8e: OUTPUT«0.922217␤»
dalek kudo/nom: 9991bb3 | jnthn++ | src/Perl6/Actions.nqp:
Can resolve Nil at compile-time, so do so.
22:56
kudo/nom: 18b7e2e | jnthn++ | src/Perl6/Optimizer.nqp:
After inlining block, don't lex-capture the stub.
jnthn I'll get R* release worked out tomorrow 23:12
timotimo \o/ 23:14
timotimo i wish i'd have thought of the nil opt :) 23:26
jnthn Time for some rest...'night o/ 23:32
timotimo gnite jnthn! 23:36