»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.pugscode.org/ | UTF-8 is our friend! | Rakudo Star Released!
Set by moritz_ on 1 September 2010.
00:00 Italian_Plumber left
lue is nqp-rx/src/Regex/P6Regex/Grammar.pm:156 what allows (regexes&tokens&rules) to be assertions, e.g. token xyzzy being later used as <xyzzy> ? 00:01
afk # will ask again later 00:08
jimi_hendrix Tene, well is it at the point where i can stop using perl5 for most things? 00:10
PerlJam jimi_hendrix: not yet.
Tene jimi_hendrix: Not yet. I still use Perl 5 for some things. The ratio is changing, but there are still significant limitations with Perl 6. 00:11
00:11 kcwu left
jimi_hendrix Tene, such as? 00:11
Tene Network access, threading, anything where I want to interoperate with existing Perl 5 libraries.
Perl 5 interop isn't there yet.
00:12 azert0x left
Tene There are some other big limitations listed in that announcement I linked. 00:12
jimi_hendrix ah
ok, thanks
jimi_hendrix now idles
00:19 kcwu joined
cognominal what is the difference between cheats and builtins in rakudo? 00:19
Tene cognominal: I expect that builtins are specced, and intended to be used by language users directly, while cheats are internal helper stuff. 00:21
That's been my understanding, at least. 00:22
pmichaud cheats are places where we think we're cheating :)
builtins are primitives that probably need to remain primitives
cheats are palces where we kthink it ought to be written in p6, or where we're doing Evil Things (esp w/Parrot) 00:23
cognominal thx
00:24 Quadrescence left 00:25 Quadrescence joined 00:30 Packetknife joined, Packetknife left, Packetknife joined 00:34 florz left, schpey joined 00:35 florz joined, whiteknight left 00:36 risou_ left 00:39 alksentrs joined, draxil left 00:41 draxil joined 00:46 schpey left 00:48 Italian_Plumber joined 00:52 draxil left, Packetk54 joined 00:54 kcwu left, kcwu joined 00:55 Packetknife left
lichtkind i cant see in syn how a role express its need for an attribute to be present 00:56
00:57 Psyche^ joined, Psyche^ is now known as Patterner
dalek ok: 15f4a28 | chromatic++ | src/builtins.pod:
Minor edits to builtins section.
00:58
ok: 96aca52 | chromatic++ | src/regexes.pod:
Edited regex chapter; much better than last time.
00:59 jferrero left 01:00 draxil joined 01:01 Packetk54 left 01:02 Packetknife joined, Packetknife left, Packetknife joined 01:03 masak joined 01:05 Packetknife left
svetlins hi guys 01:10
i have a question about grammars
masak ok
svetlins when you have two matching proto regexes with the same length
how do i know which one wins
?
masak I'd guess the textually first one wins.
svetlins nope 01:11
:\
masak 4) Within a given compilation unit, earlier declaration wins
that's from S05.
svetlins i'll test it again
but i'm pretty sure it is not working that way
masak if you can show us a short example where that isn't so, it would be very helpful to us.
svetlins ok, i 01:12
i'll try to extract that part of the code
01:14 justatheory left 01:15 cls_bsd_ is now known as cls_bsd 01:17 mfollett joined 01:19 Chillance left
svetlins masak: how do I show you the code? 01:25
masak gist.github.com/ 01:26
svetlins ah ok :)
masak: gist.github.com/563259#file_grammar...riority.pl 01:30
masak looks
svetlins i you remove the letter regex 01:31
the digit starts to match
masak nod
svetlins but the digit regex should be matchin according to S05, as you said
pmichaud according to the spec, digit should be preferred, yes.
Rakudo doesn't implement that yet. 01:32
As it exists now, it uses the protoregex that has the longer name
(it's a cheating heuristic until we have some way of keeping track of the order of declarations, which we don't have at the moment.)
svetlins i understand, there has to be SOME rule
it can't be just random :) 01:33
thank you for the quick answer
pmichaud if you'd like it to prefer digits over letters, either make the first name longer or the second one shorter :)
svetlins yeah, i got that :) 01:34
pmichaud or if you really want the second one to only match letters, use regex char:sym<letter> { <alpha> }
er, <.alpha>
svetlins unfortunately, in my real code i don't need to match letters 01:35
it was too messed up to show it though
pmichaud np, I understand :) 01:36
svetlins just to mention 01:37
today was my first day doing perl and i really liked it :) 01:38
keep up the good work
masak perlvogue.com/ -- if they mention Perl 6 on the cover, maybe someone should send in some articles? :) 01:39
florz hmm ... I'm somewhat lost as to under what conditions auto-flattening of lists happens 01:42
masak florz: short story: not very often. 01:43
florz my impression is that it's impossible to avoid =:-)
well, let's say I want to have a list of the pairs of a cartesian product ...
masak rakudo: my @a = 1, 2, 3; my @b = <a b c >; say (@a X @b).perl 01:44
01:44 justatheory joined
p6eval rakudo 33e94e: OUTPUT«((1, "a"), (1, "b"), (1, "c"), (2, "a"), (2, "b"), (2, "c"), (3, "a"), (3, "b"), (3, "c"))␤» 01:44
florz yeah, right
masak see the lists being preserved?
florz but if I assign that to some @x, @x.perl looks rather flat 01:45
pmichaud yes, because array assignment flattens
florz at least not a bug this time ... ;-) 01:46
pmichaud what you'll eventually want is (@a X @b).slice, I think
that will turn the list of lists into a list of arrays
and then they won't flatten
01:46 Guest10103 left
pmichaud (.slice NYI, alas) 01:46
but you migth be able to do: 01:47
my @a = 1,2,3; my @b = <a b c>; say (@a X @b).map( *.item ).perl;
rakudo: my @a = 1,2,3; my @b = <a b c>; say (@a X @b).map( *.item ).perl;
p6eval rakudo 33e94e: OUTPUT«(((1, "a")), ((1, "b")), ((1, "c")), ((2, "a")), ((2, "b")), ((2, "c")), ((3, "a")), ((3, "b")), ((3, "c")))␤»
masak how hard would it be to implement .slice? 01:48
pmichaud rakudo: my @a = 1,2,3; my @b = <a b c>; my @c = (@a X @b).map( *.item ); say @c.perl;
p6eval rakudo 33e94e: OUTPUT«[1, "a", 1, "b", 1, "c", 2, "a", 2, "b", 2, "c", 3, "a", 3, "b", 3, "c"]␤»
pmichaud hmm, that didn't work.
anyway, .slice shouldn't be that hard.
masak doesn't feel that hard.
pmichaud I'm trying to decide if .slice returns a Slicel or just a specialized List 01:49
masak instinctively, I'd expect the former. 01:50
pmichaud I'm not sure that Slicels are lazy, though.
i.e., Slicel somewhat corresponds to a Parcel
masak no idea. 01:51
pmichaud (and by "lazy" I mean the top-level parts are known, but the internals might not be)
it could also be a Seq or Array
the interesting case would be something like (($a, $b), ($c, $d)).slice 01:52
so, obviously whatever comes back has two elements
but what are those elements? 01:53
masak by the way, by the time Rakudo starts doing parallelism, the "three-way unshuffle problem" from GLS's talk is a beautiful algorithmic example to show off. 01:54
pmichaud: could they still be List?
pmichaud masak: well, they aren't List to begin with, in that case 01:55
masak what are they to begin with?
pmichaud ($a, $b) is a Parcel
masak oh, right.
then maybe the elements should be Parcels as well.
pmichaud yes, but .slice needs to return items
and a Parcel in item context becomes a Seq 01:56
(currently)
masak well, then it'd have to return a Seq :)
I think I prefer that to Array, at least.
pmichaud and in Rakudo at least, Seq de-containerizes its elements 01:57
(currently, speculatively)
masak when is de-containerization an issue?
pmichaud when you plan to assign to something
so, for example:
masak right.
pmichaud well, I don't have a good example 01:58
but decontainerization is what handles rw-value-ness versus r-value-ness in many cases
masak nod.
no container, no mutability.
pmichaud I could certainly (as a first cut) have .slice return a Seq of Seqs
masak might be we need to have the implementation to determine what it actually need return. 02:00
02:00 alksentrs left 02:04 lucs left 02:05 lucs joined 02:12 schpey joined
lichtkind good night 02:17
02:17 lichtkind left 02:18 tylercurtis joined
masak ooh, SPJ is in GLS's talk! :D 02:20
02:21 mfollett left 02:31 crythias joined 02:32 crythias left
masak mfollett++ # mfollett.com/perl-6-whatever 02:33
02:34 Italian_Plumber left 02:39 masonkramer joined 02:42 schpey left
masak std: has enum $.meth <foo bar> 02:46
p6eval std 32123: OUTPUT«ok 00:01 116m␤»
masak what will foo.WHAT.perl give back? is the enumeration object accessible in some other way than foo.WHAT? 02:47
02:48 agentzh joined 02:49 agentzh left, agentzh joined
s_mosher is it bad form to cause p6eval to consume obscene amounts of memory (in the name of science... ostensibly)? 02:58
masak just use your good judgment. 02:59
we trust you.
if you misuse that trust, we'll kick you out. but we'd prefer not to have to do that. :)
s_mosher oh wait... this isn't the OOM problem I thought it was 03:00
rakduo: for ^10**10 {}
masak recall that p6eval doesn't print anything if you don't print anything.
s_mosher rakudo: for ^10**10 {} 03:01
masak also recall that it's spelled 'rakudo' :)
s_mosher yeah :)
I'm only going to do that the once
p6eval rakudo 33e94e: OUTPUT«(timeout)»
s_mosher that's the result I'm getting locally... on account of a segfault 03:02
masak rakudo: for ^10*10 { .say }
p6eval rakudo 33e94e: OUTPUT«100␤»
masak er.
rakudo: for ^(10**10) { .say }
p6eval rakudo 33e94e:
..OUTPUT«(timeout)␤5␤6␤7␤8␤9␤10␤11␤12␤13␤14␤15␤16␤17␤18␤19␤20␤21␤22␤23␤24␤25␤26␤27␤28␤29␤30␤31␤32␤33␤34␤35␤36␤37␤38␤39␤40␤41␤42␤43␤44␤45␤46␤47␤48␤49␤50␤51␤52␤53␤54␤55␤56␤57␤58␤59␤60␤61␤62␤63␤64␤65␤66␤67␤68␤69␤70␤71␤72␤73␤74␤75␤76␤77␤78␤79␤80␤81␤82␤83␤84␤85␤86␤8
masak the segfault is known, I think. 03:03
it was discussed earlier today.
s_mosher ah
TiMBuS segfaults because of the gc 03:04
s_mosher btw, for with empty block is allocating quite a lot of memory
although not as much as I'd thought at first 03:05
03:05 jimi_hendrix left
lue /ohai o/ 03:05
masak hi 03:06
tylercurtis s_mosher: are you sure it's not the 10,000,000,000 element list that's allocating a lot? 03:08
s_mosher oh right
sometimes I assume that things will optimize away more than I should
masak it should be lazy, I think. 03:10
s_mosher I'm still used to thinking that for should behave like a counted loop unless otherwise absolutely necessary 03:11
tylercurtis masak: The resulting list isn't.
Or, rather, I don't see how it could possibly be.
s_mosher masak: I think that's why you are seeing output before the segfault
masak tylercurtis: ranges are lazy because they're implemented internally as iterators. 03:12
s_mosher if it was eager, wouldn't the segfault occur sooner? or is the gc problem actually part of the loop body?
masak s_mosher: indeed.
tylercurtis masak: The resulting list of the for statement.
masak tylercurtis: the for statement is in sink context. 03:13
tylercurtis masak: which works by eagerly evaluating the statement, no?
masak aye. 03:14
tylercurtis So, the result list would still have to be allocated, wouldn't it? 03:16
masak not sure.
since it's in sink context, not necessarily.
lue I think I can get <A::B> assertion working if I could find where assertions are handled. The only problem is, I can't find it. [either that or I can't tell when I see it :)] 03:21
tylercurtis Ah, I see how it could be done without the entire list being stored at the same time.
masak lue: it's not an assertion, it's a subrule call. 03:22
03:23 Schwern joined, mfollett joined
tylercurtis Though it seems like that way would require .sink. 03:24
lue Oh. .oO(Knowing what it's really called would help in finding what I need.) 03:25
03:26 masonkramer left
masak lue: I see now from the source why you call it an assertion. 03:26
lue: seems 'token assertion:sym<name>' is what you'd want to modify. 03:27
03:27 masonkramer joined 03:29 bacek left, REPLeffect left, _ilbot2 left, meinwald left, pugssvn left
masak lue: <longname=.identifier> 03:29
lue I wonder, if the parser encounters '::', is it a simple matter of matching B to a certain token, or would it have to take a step back and do a bunch of stuff?
03:30 pugssvn joined, ChanServ sets mode: +v pugssvn, _ilbot2 joined, ChanServ sets mode: +v _ilbot2
masak lue: you could look at how Rakudo's grammar handles similar cases. 03:30
lue looking
Util TimToady: Yes, my rosettacode.org/wiki/Anagrams#Perl_6 entry uses uri(), 03:35
which AFAIK is not yet implemented in Rakudo.
When testing, I changed uri($url) to slurp($file) on a pre-downloaded file.
Since the Perl5 solution used LWP, and S32/IO specifies uri(),
I submitted the uri() version of the entry,
and omitted any "works with" template.
Now that I see that most solutions use the file directly,
I will change to slurp(), and add "works with Rakudo". 03:36
masak 'S32/IO considered slushy'
03:37 bacek joined 03:39 REPLeffect joined, meinwald joined, mtve joined
lue wow, there's almost the exact same `token assertion:sym<name>' token in both nqp-rx/src/Regex/P6Regex/Grammar.pm and rakudo/src/Perl6/Grammar.pm 03:41
masak not too surprising. nqp, after all, is a subset of Perl 6 :) 03:42
03:43 meppel joined
lue I want to find how rakudo's grammar handles similar situations, I just can't think of a similar situation. I'm almost certain some scope-changing would be involved, however. 03:45
masak std: class A::B::C {} 03:47
p6eval std 32123: OUTPUT«ok 00:01 114m␤»
03:47 meppl left
masak lue: there's one similar situation. 03:47
Util rakudo: my @a = 1, 2, 3; @a X*= 5; say @a.perl; @a = @a X* 5; say @a.perl; 03:48
p6eval rakudo 33e94e: OUTPUT«[1, 2, 3]␤[5, 10, 15]␤» 03:49
Util Should X*= have worked? If not, how to best scale a vector without repeating the vector's array name?
masak @b = @a X* 5
:P
and yes, I think X*= should have worked. 03:50
masak submits rakudobug
tylercurtis rakudo: my @a = 1, 2, 3; @a [X*]= 5; say @a.perl; @a = @a X* 5; say @a.perl; 03:51
p6eval rakudo 33e94e: OUTPUT«===SORRY!===␤Confused at line 22, near "@a [X*]= 5"␤»
lue class A would create a class A, but if you add ::B, then it would be class A::B and would create a class B of A, right? [If I got this right, I'll be happy]
masak lue: 'class A::B' creates a class B in the package A.
Util S03 discusses X[+=] vs [X+]= in "Nesting of metaoperators", but X[*=] does the same as X*= , and [X*]= fails. 03:52
masak lue: don't really know what you mean by 'class B of A'.
Util Oh, as tylercurtis just showed.
lue alright. [I wasn't sure what A was in this case, so I just went with 'of A'] 03:53
masak lue: speaking with clarity helps in these cases. :) 03:54
bbl & 03:56
03:56 masak left
Util masak++ for RT#77660 03:57
04:04 cibs left
lue ooh, so close to finding out how the grammar handles class A and class A::B [maybe Actions.pm?] 04:05
04:12 lamstyle left, lamstyle joined 04:14 Sanitoeter left 04:17 Sanitoeter joined
lue aah, I feel out of my depth here. I honestly have no idea how to go about this problem. 04:18
04:20 cibs joined 04:27 mfollett left 04:28 molaf joined 04:33 schpey joined 04:35 alester joined
dalek kudo: 1e56d20 | pmichaud++ | build/PARROT_REVISION:
Bump PARROT_REVISION to get pir::join opcode fix (TT #1767).
04:40
04:43 molaf left 04:51 hercynium left 04:59 Zapelius joined 05:38 jhuni joined
sorear hello #perl6 05:42
05:45 gfx joined
sorear pmichaud: Why does Seq exist at all? 05:46
05:49 Quadrescence left 05:51 kaare joined, kaare is now known as Guest4584 05:54 amkrankruleuen left 05:55 amkrankruleuen joined
sorear wait, nevermind, I already asked you. 05:56
06:00 wtw joined, gfx left 06:03 amkrankruleuen left 06:04 amkrankruleuen joined 06:05 Guest4584 is now known as kaare_ 06:07 Quadrescence joined 06:10 am0c joined 06:16 alester left, amkrankruleuen left 06:17 amkrankruleuen joined 06:20 Zapelius left 06:24 Schwern left 06:25 uniejo joined, am0c left, HarryS left 06:27 azert0x joined 06:30 amkrankruleuen left 06:36 amkrankruleuen joined 06:37 masak joined 06:38 justatheory left 06:41 amkrankruleuen left, HarryS joined
masak I wonder what Gilad Bracha is referring to: twitter.com/Gilad_Bracha/status/22857717803 06:43
sorear How do you know he's even referring to Perl 6? 06:51
06:54 amkrankr1leuen joined
masak I have no grounds for believing he is. from what I know of Bracha, he's more likely referring to most programming languages out there, except maybe Newspeak, which gets things right. 06:56
06:57 shade\ left
masak (not implying anything about the justness of that opinion, by the way. I haven't tried Newspeak, nor read the spec) 06:57
07:00 amkrankr1leuen left 07:01 amkrankruleuen joined 07:03 buubot left 07:07 buubot joined
moritz_ wonders if newspeak should be parsed as news peak :-) 07:13
07:13 buubot left
masak GLS complained in his talk that his MapScanZip parsed as MapsCanZip in his brain when he wrote it in all-lowercase. :) 07:14
moritz_ at least that's what my LTM parser gives me
GLS?
masak Guy L Steele
moritz_ ah
masak as in Java and Fortress.
moritz_ I've seen his awesome "how to grow a language" talk
masak aye. 07:15
he's an old Lisp veteran, too.
moritz_ it's just that GLS = Gleichungssystem (equation system) is deeply etched into my brain :-)
masak nothing that a bit of context-sensitivity won't solve. 07:16
moritz_ thows his IR Clogs over and hides from sight 07:17
masak the 'IR Clogs' pun goes against LTM, fwiw.
maybe that's why it doesn't feel really obvious.
moritz_ STM then :-)
masak another overloaded term. :)
moritz_ at least from now on :-) 07:18
07:18 buubot joined
moritz_ std: my @a X*= 1, 2, 3 07:18
p6eval std 32123: OUTPUT«ok 00:01 119m␤»
masak as a Swede, I don't like to see anyone going to extremes. that's why I will always recommend MTM.
moritz_ where M = Median? 07:19
masak or 'medium', or 'moderate'...
I'd prefer it to have been 'lagom', but L is already taken...
tylercurtis Well, the relevant rules are named token phrase:sym<hot shoes> and token phrase:sym<irclogs>, so it's probably just due to nqp-rx not doing LTM right.
masak tylercurtis: 'the hottest footwear!' ;) 07:20
moritz_ tylercurtis: ironically nqp-rx does get the LTM right in case of proto tokens with leading <sym> 07:21
tylercurtis moritz_: ooh. Good to know.
07:24 buubot left
masak pmichaud: did you submit gist.github.com/563082 ? I don't see it in trac.parrot.org 07:25
07:30 buubot joined
sorear tylercurtis: I have not really looked for LHF in niecza. Maybe if you looked you would find some, by trying to port some program? 07:36
tylercurtis sorear: I may try that sometime this weekend. 07:38
masak having large parts of the setting readily available, even if it's only a fraction of what Rakudo does, would help implementations like niecza a lot in terms of popularity. 07:39
when I wrote use.perl.org/~masak/journal/40141 , I hoped we'd see one of the then implementations suddenly bloom out into something with at least a modest setting. that hasn't happened yet. 07:40
actually, it's not the setting that matters, so much as those everyday features. it's just that many of those are defined in the setting. 07:41
07:42 pnu left 07:43 pnu joined, buubot left 07:46 buubot joined 07:54 buubot left
masak pmichaud: never mind -- found it in the backlog. didn't see it because bacek++ resolved it already :) 07:57
07:57 buubot joined 07:59 Schwern joined 08:07 buubot left
moritz_ ponders an additional channel where dalek reports changes from all known Perl 6 projects 08:10
08:13 buubot joined
sorear moritz_: it's called #commits 08:16
masak , after skimming dyla2007.unibe.ch/?download=dyla07-Gilad.pdf , now considers the non-mixing of subs and methods in Perl 6 to have been a wise move
sorear masak: if you came here from #moose like I did, you'd know that Perl 5's method/sub conflation is a daily living hell 08:17
masak I didn't. though I saw Moose come from #perl6 back in 2005 :)
sorear masak: niecza has a setting already 08:18
masak sorear: in that paper, it is explained how apart from being a daily living hell, method/sub conflation leads to further problems down the road.
sorear it's less complete than rakudo's, sure
masak sorear: good. fill it up with nice stuffs.
I think niecza looks very promising. 08:19
moritz_ at least in Perl 5 the lookup is obvious
sorear the main issue is that development turnaround time is dominated by the time to parse the setting
right now it takes about 1.5 minutes to see the effect of any change to setting code
moritz_ ->meth does method lookup, sub() looks in the namespace
sorear niecza's setting is 1000 lines (and contains a good chunk of Q:CgOp, because I can't put that stuff in separate files like Rakudo does yet) 08:20
08:20 wtw left
moritz_ sorear: you know that in rakudo it's also slow. Which is why I usually prototype setting code outside the setting 08:20
sorear moritz_: yeah, I do that too
08:20 Mowah joined
moritz_ which mostly works pretty well... unless it doesn't :-) 08:20
sorear: #commits has too much activity, for my taste 08:21
which is why I'd prefer something p6-only
masak moritz_: Perl 5 doesn't have nested classes, I think. 08:22
moritz_ right
masak I was looking at the first two code samples in that PDF and thinking "hm, if this is a sub lookup, then the shadowing they spend the rest of the paper avoiding just won't occur in Perl 6". 08:24
08:32 wtw joined 08:33 dakkar joined
masak alpha: my @a = 1, 2, 2, 3, 4, 4, 5; my @unique = grep { state %h; !%h{$_}++ }, @a; say @unique.perl 08:35
p6eval alpha 30e0ed: OUTPUT«[1, 2, 3, 4, 5]␤»
08:35 jacob_applebaum left
masak alpha: my @a = 1, 2, 2, 3, 4, 4, 5; my @unique = grep { !(state %h){$_}++ }, @a; say @unique.perl 08:35
p6eval alpha 30e0ed: OUTPUT«[1, 2, 3, 4, 5]␤»
masak \o/
08:36 jacob_applebaum joined
moritz_ alpha: my @a = 1, 2, 2, 3, 4, 4, 5; my @unique = grep { !(state %){$_}++ }, @a; say @unique.perl 08:36
p6eval alpha 30e0ed: OUTPUT«Malformed declaration at line 10, near "%){$_}++ }"␤in Main (file <unknown>, line <unknown>)␤»
08:37 lucs left
masak anonymous state variables, what a concept. 08:38
moritz_ if you use it only once, why give it a name?
masak fsvo 'once' :)
08:38 aloha left
moritz_ where once = at one place in the source file 08:39
masak right.
I'm suddenly curious how one'd implement anonymous variables.
moritz_ currently reads "Real World Haskell", and is of two minds of the 'where thing = def' post definitions
masak Yapsi is pretty keen on variables having a unique name.
moritz_ maybe add positional slots to your pads 08:40
and simply give the anonymous vars numbers
masak my pads have positional slots. that's their primary access mechanism.
moritz_ oh, great
then you can just reserve one for anon vars
masak yes... 08:41
08:41 bacek left
masak I just don't see how. 08:41
moritz_ since they only appear in declarations, they never look at the parent lexpad
just ++$slot_count
:-)
masak you make it sound so easy :) 08:42
moritz_ and emit an access to $pad[$slot_count] at the place of the variable
that's because you haven't told me what makes it hard
masak I'm not sure.
the codegen step does variable lookup by getting the name of the variable, doing a fetch or a store, and assigning a register. 08:43
but that won't work if there's no name. so anon vars need special treatment somehow.
08:44 BaggioKwok joined
moritz_ you have to omit the "getting the name" part 08:44
but since all anon variables in the source code are different, that shouldn't be a problem
masak hm. 08:45
clearly something quite different is needed, yes.
moritz_ I'd imagine you'll have a gimme_new_variable_in_current_pad($type = Any, $name?) function 08:46
which is called upon declaration
and which returns an object that knows how to code-gen a lookup to the new variable
and for named variables, you cache that object by name 08:47
so every subsequent variable lookup gets the same access code
and for anon vars, you just call it anew for each occurrence
and when you leave a scope, you expire the current cache, or something 08:49
does this sound overly simplistic/optimistic? 08:50
masak no, it sounds about right.
it basically introduces a whole new layer of indirection that I hadn't thought about before. 08:51
08:51 stepnem left
moritz_ just because it's a compiler doesn't mean it can't use nice OO features :-) 08:54
masak it's quite OO already. you should check it out. :) 08:55
I'm really happy about how it traverses the parse tree, too.
moritz_ really should 08:56
08:56 stepnem joined
masak right now there's action methods to check lexical use and build lexpads, and then custom traversal methods with action callbacks do the per-block codegen. 08:57
08:57 amkrankruleuen left
masak ss/traversal methods/traversal subs/ 08:57
08:58 amkrankruleuen joined
tylercurtis Good night #perl6! Tomorrow I attempt to analyze the backtraces from my running the spectests under valgrind! 09:00
09:01 AndreasX joined
masak tylercurtis: good night! dream of simple, non-confusing backtraces. :) 09:01
moritz_ :-)
09:03 redicaps joined
tylercurtis :) I don't think the complexity of individual backtraces matters much when dealing with 18k lines of them. 09:08
09:09 tylercurtis left 09:22 timbunce joined 09:26 mberends joined 09:27 AndreasX left
colomon hello out there. have people been getting failures on pid.t on OS X? 09:32
moritz_ good DateTime.new, colomon 09:34
colomon it's definitely not good DateTime here.... should still be in bed.
masak colomon: yes. for about a week or so.
09:34 Siddy joined, redicaps left
colomon o/ 09:35
masak++
09:35 Trashlord left
sorear masak: just use a gensym 09:36
masak I recognize that term from the Lisp world, I think. 09:37
right, a unique made-up name.
moritz_ wonders how that interacts with introspection 09:38
masak that's the first thing I thought of, too. I'm just afraid some time in the future people are going to introspect my lexp... what moritz_ said.
moritz_ rakudo: say ~callframe().MY.keys
p6eval rakudo 1e56d2: OUTPUT«Method 'MY' not found for invocant of class 'CallFrame'␤ in main program body at line 22:/tmp/bBiAtAPrfZ␤»
sorear if you introspect a frame in niecza you'll see a couple variables with names like !23
moritz_ rakudo: say ~callframe().my.keys
p6eval rakudo 1e56d2: OUTPUT«$MAIN $/ $_ __CANDIDATE_LIST__ $!␤»
masak wow.
sorear I could just filter them out, it's impossible to declare a real variable matching that
moritz_ rakudo: say ~callframe().my.keys; my $foobar
masak didn't know we had that. 09:39
p6eval rakudo 1e56d2: OUTPUT«$/ $_ __CANDIDATE_LIST__ $foobar $! $MAIN␤»
moritz_ masak: it's a bit hacky, but it seems to mostly work
masak rakudo: say ~callframe().my.keys; my $
p6eval rakudo 1e56d2: OUTPUT«$MAIN $/ $_ $ __CANDIDATE_LIST__ $!␤»
moritz_ rakudo: my $; my $
masak rakudo: say ~callframe().my.keys; my ($, $, $)
p6eval rakudo 1e56d2: OUTPUT«===SORRY!===␤Unsupported use of $; variable; in Perl 6 please use real multidimensional hashes at line 22, near " my $"␤»
rakudo 1e56d2: OUTPUT«$MAIN $/ $_ __CANDIDATE_LIST__ $!␤»
sorear anyways, TimToady says that callframe shows you the world as it *is* 09:40
moritz_ std: my $;
p6eval std 32123: OUTPUT«===SORRY!===␤Unsupported use of $; variable; in Perl 6 please use real multidimensional hashes at /tmp/VpMRdZ6bCT line 1:␤------> my $;⏏<EOL>␤Parse failed␤FAILED 00:01 115m␤»
moritz_ rakudo: say ~callframe().my.keys; my $ = 1; my $ = 2
sorear if inlining is not hidden, no reason for genysms to be
p6eval rakudo 1e56d2: OUTPUT«===SORRY!===␤Redeclaration of symbol $ at line 22, near " = 2"␤»
masak nod.
I'll use gensyms. 09:41
moritz_ std: my $ = 1; my $ = 2
p6eval std 32123: OUTPUT«ok 00:01 118m␤»
sorear out.
moritz_ rakudobug!
but it might be reported already
09:42 frettled left
masak looks familiar. 09:44
masak searches RT
rt.perl.org/rt3/Ticket/Display.html?id=76986
bbkr++ 09:45
09:46 masonkramer left 09:50 schpey left 09:52 BaggioKwok left 09:53 cotto left
pugssvn r32127 | colomon++ | [t/spec] Add tricky tests (which pass after latest Rakudo patch), unfudge old simple tests which have worked for a while, and switch "plan *" to "plan 42". 09:56
dalek kudo: 5ae715c | colomon++ | t/spectest.data:
Turn on S03-operators/comparison.t.
09:58
kudo: c9eac47 | colomon++ | src/core/operators.pm:
Fix the Any versions of the numeric comparison operators to forward to the Numeric versions.

If you are doing a numeric comparison of non-Numeric types, this will be slightly slower but handle edge cases correctly.
10:01 Italian_Plumber joined, foodoo joined 10:06 masak left 10:07 frettled joined 10:08 cotto joined 10:09 mberends left 10:10 svetlins left 10:11 jferrero joined 10:13 svetlins joined 10:16 agentzh left 10:21 proller joined 10:33 kjeldahl joined 10:37 drbean joined 10:42 meppel is now known as meppl 10:45 Italian_Plumber left 10:56 amkrankruleuen left 10:57 amkrankruleuen joined
arnsholt In nqp-rx, doing "PAST::Val.new(:value(1.0))" becomes "$P13."new"(1 :named("value"))" in PIR (with $P13 the PAST::Val object). That's a bug right? 10:59
cognominal in book/subtypes.pod: wouldn't @cards.sort: *.rank be more elegant than @cards.sort({ .rank }) ? 11:04
11:05 Italian_Plumber1 joined
moritz_ arnsholt: does value => 1.0 work? 11:17
I could imagine that it's parsed as :value, (1.0)
arnsholt Nope. Same PIR
moritz_ then I'd think it's a bug
arnsholt 1.0 as a literal does generate a Float object though 11:18
I'll see if I can find the bug 11:21
11:27 ilogger2 joined
arnsholt Oh, joy. Wanna guess how the value is created in NQP? =) 11:28
make PAST::Val.new( :value($value) );
Yaaaaaaay.
takadonet morning all 11:44
11:44 masonkramer joined 11:58 snearch joined 12:08 envi^home joined
colomon anyone know what the pir::join patch last night did? (just curious) 12:10
moritz_ the diff is pretty telling 12:11
seems the chunks that split builds up were garbage-collected
12:12 tadzik joined, ruoso joined
colomon s/split/join/, right? 12:14
moritz_ erm, yes
now it just stops the GC before, and resumes it afterwards 12:15
moritz_ hopes that no exception can be thrown inbetween :-)
colomon what could go wrong? ;)
actually, that seems like it might be a very real problem. I wonder how to test? 12:16
moritz_ the next commit adds a test case :-)
(parrot commit, that is)
12:17 amkrankruleuen joined
bbkr std: grammar A { multi token TOP { .* }; multi token TOP {.* } }; 12:20
p6eval std 32123: OUTPUT«ok 00:01 117m␤»
bbkr hmm, how token can be multi if it has no signature ?
moritz_ why not? 12:22
you can still call it as
A.*token() 12:23
erm
A.*TOP()
doesn't make much sense in this case, but it does work
bbkr wow, nice trick. thanks 12:25
12:30 amkrankruleuen left 12:31 amkrankruleuen joined 12:34 tadzik left 12:37 Sec joined, bluescreen joined 12:38 bluescreen is now known as Guest49581
Sec Is there any support for perl6 based GUI apps, yet? 12:38
moritz_ Sec: you can use Perl 5 UI libs like TK or GTK through blizkost
though I admit it's kinda painful
phenny: tell masak that netzhansa.blogspot.com/2010/09/quic...ommon.html might interest him 12:39
phenny moritz_: I'll pass that on when masak is around.
Sec I have an old perl5/TK thing here, and I need to rewrite it (because its buggy, and perlTK is outdated an unmaintained) and thought I could use this to learn my way around perl6. 12:40
moritz_: but what you say sounds like I better stay with perl5 for that project. 12:41
bbkr rakudo: grammar G { token TOP { ... } }; class A { method TOP ($/) {make $/ } }; G.parse("abc", actions=>A.new).ast.perl.say # bang! a bug? make on $/ object IMO should be perfectly legal
p6eval rakudo 5ae715: OUTPUT«maximum recursion depth exceeded␤ in 'Mu::item' at line 1174:CORE.setting␤ in 'Mu::item' at line 1176:CORE.setting␤ in '&infix:<=>' at line 1␤ in 'infix:<~>' at line 597:CORE.setting␤ in 'reducewith' at line 325:CORE.setting␤ in 'Match::!_perl' at line 1␤ in 12:42
..'Match::perl' at…
moritz_ Sec: in my opinion that's not a good way to learn Perl 6, because it's something not many people have done yet, so it'll be hard to get help when you're stuck
bbkr: the problem is not make(), but .perl
bbkr: since you create a circular structure, and we can't serialize that yet
(known bug) 12:43
bbkr moritz++
Sec moritz_: i see. Thanks for your advice.
moritz_ Sec: you're welcome. I can only encourage you to learn perl 6 nonetheless - it's a great language 12:44
12:44 smash joined
smash hello eveyrone 12:45
Sec moritz_: it sounds like, but without a reason to write code, its probably not going to happen anytime soon.
moritz_ Sec: I can understand that very well
all of my attempts to learn programming languages without actually coding in them have failed so far :-)
hi smash 12:46
12:47 stepnem joined 12:51 tadzik joined
bbkr rakudo: q\ \ # parsed as quoting 12:53
p6eval rakudo 5ae715: ( no output )
bbkr std: q\ \ # parsed as routine
p6eval std 32123: OUTPUT«===SORRY!===␤Undeclared routine:␤ 'q' used at line 1␤Check failed␤FAILED 00:01 114m␤»
bbkr STD or Rakudo bug?
rakudo: (q\ \).WHAT.say
p6eval rakudo 5ae715: OUTPUT«Str()␤»
moritz_ not sure 12:55
bbkr reports 12:56
smash updated gil.di.uminho.pt/users/smash/rakudo-bench.html, you can now see % faster/slower for new versions 13:01
13:03 sftp joined
tadzik oh hai 13:07
phenny tadzik: 02 Sep 01:50Z <colomon> tell tadzik If you switch ABC to git://github.com/colomon/ABC.git, it should pass all tests. :)
tadzik anybody got a thinkpad?
colomon smash: I don't see % ?
smash colomon: hover over the table for 2010.08 13:08
mathw tadzik: yes
colomon oh, crazy
smash++
moritz_ hopes he can think without a pad :-)
colomon now I need to get you more benchmarks... 13:09
moritz_ and please use more iterations in the iteration benchmark
13:09 rgrau joined
tadzik mathw: have you ever removed a key from a keyboard? 13:10
mathw tadzik: not on the thinkpad, no
13:10 orafu joined
tadzik I've just got mine from a warranty, and not only it whistles which pisses me of, they also broke my shift 13:10
and now I'm afraid to give it back to them
smash colomon: just add them in github
mathw hmmm
that's not good
tadzik and I'm afraid they broke clitmouse too, goddamnit 13:11
Sec tadzik: get the "hardware maintenance manual" from the web, it describes how to to such things correctly. 13:12
mathw mmm
the trackpoint might just have something stuck in it. I have to pull the tip off mine and poke it from time to time 13:13
tadzik Sec: I have a paper one, in the section about cleaning the keyboard they don't say anything about removing keys
Sec ibm/lenovo documentation on this is usually very good.
colomon smash: I know, the tricky bit is writing them. ;)
Sec tadzik: i once re-fixed a key which came loose on a t61, it was a bit to fiddle but it went well. 13:14
colomon smash: do you have a harness to automatically run them?
13:16 tadzik left
smash colomon: a stupid script yes that runs all the tests and stores the required data in a databse 13:17
colomon smash++
smash then i have another one to get the data from the database and create the HTML page
PerlJam smash: you should add all of that to the repo. 13:19
moritz_ agrees
PerlJam smash: heck, the benchmark scripts and such should be added to the rakudo repo IMHO
moritz_ not so sure 13:20
we shouldn't clutter the rakudo repo
and we likely want more liberal access policy to the benchmark repo
smash PerlJam, moritz_: i can add it to the bench repo as soon as i have a cleaner version of the code
(or any other repo)
PerlJam moritz_: reproducible benchmarking is clutter?
moritz_ PerlJam: not clutter, but I see no reason why it can't be in a separate repo 13:21
PerlJam okay. I don't have a strong reason why it should be in the rakudo repo either :) 13:23
smash as soon as i have a saner version i'll create a new repo, then you can fork it anywhere if you wish
moritz_ rakudo: say 'ab' ~~ /a <commit> b/ 13:27
p6eval rakudo 5ae715: OUTPUT«Method 'commit' not found for invocant of class 'Cursor'␤ in <anon> at line 22:/tmp/X_2A5CjcCl␤ in 'Cool::match' at line 2421:CORE.setting␤ in 'Regex::ACCEPTS' at line 5841:CORE.setting␤ in main program body at line 22:/tmp/X_2A5CjcCl␤»
13:28 mfollett joined 13:29 macroron joined 13:30 mfollett left 13:31 Holy_Cow joined 13:32 nexusone joined, schpey joined 13:40 rgrau_ joined, jaldhar joined
pmichaud good morning, #perl6 13:42
moritz_ good morning pmichaud
13:43 a3r0_ joined
a3r0_ / 13:43
13:44 a3r0_ left
smash pmichaud: mornin' 13:46
pmichaud rakudo: say ~(for 1..200 { $_ }) 13:47
p6eval rakudo 5ae715: OUTPUT«1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
..96 97 …
pmichaud \o/
[Coke] phenny: tell masask he's the #1 google hit for yaakov. 13:48
phenny [Coke]: I'll pass that on when masask is around.
13:48 molaf joined
colomon pmichaud++ 13:54
14:01 tobi_ joined, tobi_ left 14:02 toebu joined 14:09 schpey left, javs joined 14:13 bluescreen joined, bluescreen is now known as Guest78701
pmichaud
.oO( masask? )
14:15
frettled «ask masak», in a different form? 14:16
14:18 constant joined, constant left, constant joined
moritz_ it's a mass interrogation, shortend to mass-ask or masask :-) 14:18
14:22 risou joined 14:23 daemon joined, bacek joined 14:26 aloha joined, _jaldhar joined 14:28 tylercurtis joined, jaldhar_ joined 14:30 risou_ joined, jaldhar left 14:31 sahadev joined 14:32 _jaldhar_ joined, mfollett joined 14:33 _jaldhar left, risou left 14:34 risou_ left 14:35 jaldhar_ left 14:41 risou joined 14:43 macroron left 14:45 amkrankruleuen left, amkrankruleuen joined 14:46 Guest49581 left
TimToady Util: when I run rosettacode.org/wiki/Anagrams#Perl_6 with the latest rakudo, I get a segfault. 14:53
14:56 Siddy joined, snearch left
[Coke] TimToady: how long did it take to segfault? 14:59
15:01 Guest49581 joined 15:03 kst` joined 15:04 daxim_ joined, dual_ joined 15:05 krunen joined, orafu left, orafu joined, orafu left, orafu joined, constant left, constant joined, constant left, constant joined 15:06 alester joined
TimToady a long time 15:06
many minutes
15:13 isBEKaml joined
bbkr hmm, { +@($_) } may be replaced by { .elems } to make code more readable without increasing length 15:13
15:13 schpey joined 15:14 schpey left
colomon Util: that anagram code is yours? 15:15
bbkr or even "my $max = %anagram.values>>.elems.max"
15:17 molaf left
isBEKaml colomon: that last blog post of yours received good responses on reddit. 15:17
colomon really?
isBEKaml series operator.
colomon cool! 15:18
I had no idea...
isBEKaml www.reddit.com/r/perl/comments/d6jk...moization/
15:19 Ajju joined
[Coke] I am the only one that finds reddit useless? ;) 15:19
huf yeah but where's HIB0U? is he sick? maybe he needs a hug
moritz_ huf: hug HIBOU
[Coke]: sometimes it's useful for marketing
[Coke]: I've got 10k visitors from reddit for a blog post that was partly over Perl 6 15:20
TimToady [Coke]: 10 minutes, 45 seconds, to be slightly more precise
moritz_ even if only 1% of them noticed the Perl 6 part, hey, that's still 100 :-)
colomon isBEKaml++ 15:21
isBEKaml yeah, the reddit crowd, you know what they are like. Click, (ha, ha, that's funny), click (no, that's not it) and more clicks... ;)
[Coke] moritz_: it's probably the sort of site that if I subscribed to it and said "show me everything perl6 related", I might find it vaguely useful. 15:22
but I only ever see it when someone sends me a deep link to something that is unfindable from the main page.
moritz_ [Coke]: well, if you read planetsix, there's not much more that reddit will tell you about p6
15:23 _jaldhar_ left, Ajju left
[Coke] is there an rss feed for all the comments? 15:23
15:24 justatheory joined
moritz_ no idea 15:25
isBEKaml [Coke]: I think this is what you're looking at. I don't know if you can subscribe to specific subreddits. www.reddit.com/.rss 15:26
15:26 mfollett left
isBEKaml s/at/for/ 15:26
it says so down at the bottom of the reddit page.
toebu hi, I am going to present a half day perl6/rakudo turorial at LISA'10 (the USENIX Sysadmin Conference) 15:27
pmichaud toebu: cool!
moritz_ toebu++
15:27 jaldhar joined
[Coke] yah, that's the global rss feed. too much firehose. ah well. 15:28
shortcircuit Is there a full description of PIR anywhere? (Apart from Parrot's source, that is.)
[Coke] guess I'll rely on RSS Via IRC.
rgrau_ what about HackerNews or HseTheSource? probably there will be less trolling than reddit
[Coke] shortcircuit: #parrot on irc.perl.org is probably a better place to ask, but yes:
toebu The target audience is people with perl5 experience ... (like myself) 15:29
rgrau_ s/HseTheSource/UseTheSource/
moritz_ shortcircuit: there's doc.parrot.org
[Coke] docs.parrot.org/parrot/latest/html/
moritz_ toebu: be sure to talk about the MAIN sub; people love it :-)
[Coke] docs.parrot.org/parrot/latest/html/...r.pod.html
(main link has "PIR BOOK") which is probably most useful. 15:30
shortcircuit [Coke]: Thank you. 15:31
shortcircuit keeps pondering implementations of Forth written with various languages as a backend.
huf [Coke]: maybe you want this? www.reddit.com/search.rss?q=perl+6 15:33
fsvo "want"
15:33 toebu left
[Coke] huf;looks promising, but greader chokes on it. I'll investigate later. danke. 15:34
huf [Coke]: or maybe reddit search is broken
happens ;)
15:35 toebu joined 15:36 mfollett joined
tylercurtis Parsing my valgrind spectest backtraces segfaults. =( 15:36
colomon shortcircuit: Forth++ 15:37
afk
15:39 zulon joined 15:40 azert0x joined
TimToady just revised rosettacode.org/wiki/Luhn_test_of_c...ers#Perl_6 15:40
it would be nicer if subscripts autotrimmed infinite serieses
or if ...^ were implemented 15:41
rakudo: say 0,2 ...^ 10
p6eval rakudo 5ae715: OUTPUT«0123456789␤»
TimToady hmm, maybe it is?
[Coke] TimToady: OH NOES 15:42
TimToady rakudo: say 0,2 [...^] 10
p6eval rakudo 5ae715: OUTPUT«===SORRY!===␤Unable to parse infixish, couldn't find final ']' at line 22␤»
15:42 Ross joined
[Coke] whew. 15:42
TimToady rakudo: say 0,2 [...] 9 15:43
p6eval rakudo 5ae715: OUTPUT«02468␤»
TimToady er, wait a minnit
...^ can't be working right, should have made on evens
*only 15:44
15:44 rgrau_ left
toebu I am about to start preparing my slides, my goal is to focus on doing 'simple' things with p6 ... most of the p6 material I see these days seems rather far from what I would be using in every day life ... 15:44
TimToady anyway, I'd prefer to use 0,2...* in any case
well, the Luhn test is rather practical :) 15:45
toebu Since my audience is sysadmins and not programmers, I am planning to get them interested and not scared ...
any pointers you can give me in this direction ? 15:46
TimToady I'd glance through rosettacode.org/wiki/Category:Perl_6 to see if anything sounds practical
tylercurtis MAIN subs, perhaps.
moritz_ toebu: you probably know it already, but perlgeek.de/en/article/5-to-6 might be a source of inspiration 15:47
15:47 rgrau_ joined
moritz_ tylercurtis: he, I also mentioned that :-) 15:47
TimToady hmm, rosettacode.org/wiki/Command-line_a...nts#Perl_6 doesn't actually give an example which would be nice
shortcircuit wonders if it might not benefit the P6 folks to go through the tasks implemented in P5, and reimplement for P6. 15:49
TimToady rosettacode.org/wiki/Take_notes_on_...ine#Perl_6 has an example of MAIN
tylercurtis moritz_: indeed. But it's worth repeating to make sure it gets mentioned. :)
TimToady shortcircuit: sure, but some of them depend on functionality that is not yet available in p6 15:50
especially CPAN modules
moritz_ added example to rosettacode.org/wiki/Command-line_a...nts#Perl_6 15:52
TimToady rosettacode.org/wiki/Find_Common_Di...ath#Perl_6 is rather practical
15:53 dual_ left
shortcircuit rosettacode.org/wiki/User:Short_Cir...but_not_P6 15:54
The way the query is written, there may be pages in that list that aren't programming tasks. I'm not sure how to correct that. :-|
moritz_ shortcircuit++
toebu thank you for the links ... 15:55
shortcircuit moritz_: Question. Does P6 make a copy of the to-be-incremented object before incrementing?
toebu will come back when I have an outline ...
Juerd What's a comp?
moritz_ shortcircuit: ++$a desugars to $a = $a.succ 15:56
shortcircuit: so I guess that's "no"
TimToady you mean comb?
shortcircuit moritz_: Ok, then. I was worried you were killing off my clone. 15:57
Juerd TimToady: No. I'm referring to the array @comps
moritz_ shortcircuit: :-)
TimToady in which example?
oh, common path
leading components
Juerd Ah, components?
Or COMmon Path?
Hm, no, components makes more sense with that .comb 15:58
TimToady path components? what else would you call the bits between /.../
Juerd I'd probably call them parts :)
TimToady chunks :)
tasty-bits
Juerd But my English isn't very good and that limits my choice of identifiers :) 15:59
16:00 dual joined
TimToady moritz_: but $a++ is different from ++$a 16:00
moritz_ TimToady: yes, but in general it still doesn't copy the obect, does it? 16:01
TimToady most things that ++ would work on are value types
so it doesn't matter if it copies it
16:01 tadzik joined
tadzik oh hai again 16:02
16:02 draxil joined
TimToady but it sounded like shortcircuit++ was worrying about a non-value type 16:02
daxim_ status update - pugs repo git conversion: nuffin's automated tools don't work, and I don't see why, so I either have to debug them or write my own filters
I'm taking a copy home to tinker over the weekend
moritz_ daxim_: maybe because it doesn't follow the standard layout (e.g. doesn't have branches)? 16:03
shortcircuit I suppose that depends on whether or not I have a value. Hm.
daxim_ that could be a possible explanation for fix-refs not working, but the thing that removes the svn/svk cruft should always work because it's just a complicated commit message filter
but the commit messages are unchanged, that's what I meant when I said it won't work 16:04
moritz_ shortcircuit: not has-a value, but is-a value is important :-)
shortcircuit I don't know (nor am I likely to remember) who the Rakudo developers in here are, but I might also suggest using the P6 examples on RC as a post-commit step for testing. 16:05
moritz_ shortcircuit: we should just add them to the "integration test" part of the official test suite 16:06
shortcircuit moritz_: That would make sense, too, I suppose. :) 16:07
Util colomon: Yes, the anagram code is mine. 16:12
colomon Util: do you mind if we add it (possibly in slightly modified form) to the p6 benchmark suite?
TimToady I have a snazzy version of anagram that does a double classify, but it also segvs on the whole dict
Util colomon: Feel free to use it in any way you like. Fold, spindle, mutilate; consider it submitted under my Perl CLA. 16:14
TimToady see wall.org/~larry/anagram
16:14 zulon left
TimToady the second classify classifies the first classifications into number of results 16:15
Util TimToady: nice!
TimToady works if I feed it the first 1000 words
Util must meditate to better grok Whatever. 16:16
When testing my version, I made subsets of the dictionary file by word length, and sometimes just by line count (`head -1000`, etc). 16:17
TimToady I have yet to run any variant of anagram on the whole dictionary successfully 16:19
Util I found that its runtime scaled linearly for subsets. 1000 words == 1 minute. 5000 words == 5 minutes. The whole file is 25,000 words, and I confess that I never ran the whole thing.
TimToady figgered
16:20 _jaldhar joined, molaf joined 16:22 Mowah joined
shortcircuit You might notice that a few of the languages on RC have links to Codepad. (such as: codepad.org/?lang=Perl ) ... Is there any similar way visitors to RC could try running P6 code without having a local implementation? (Ideally, I could just link over to the relevant page where they could test P6 code.) 16:23
moritz_ shortcircuit: we're working on try.rakudo.org
Util shortcircuit: ash_ is working on try.rakudo.org
shortcircuit Cool. :)
16:23 cdarroch joined, cdarroch left, cdarroch joined, jaldhar left
tadzik oh yes it is :) 16:24
tylercurtis rakudo: say 'They can also come to #perl6 and use p6eval, shortcircuit.'
p6eval rakudo 5ae715: OUTPUT«They can also come to #perl6 and use p6eval, shortcircuit.␤»
shortcircuit I could make a variation of rosettacode.org/wiki/Special:WebChat drop them in here, but I don't know that you want all that traffic. 16:25
p6eval: BTW, mind hanging out in #rosettacode ? :) 16:26
TimToady tylercurtis: that only works for one-liners, really
moritz_ shortcircuit: is that also on freenode?
tylercurtis True.
shortcircuit moritz_: Yes
moritz_ can send it there 16:27
16:27 p6eval joined, ChanServ sets mode: +v p6eval
moritz_ done 16:27
shortcircuit Cool. :) 16:28
16:31 risou_ joined 16:32 Chillance joined
moritz_ shortcircuit: what does RC use for highlighting Perl 6 syntax? 16:34
shortcircuit moritz_: RC uses GeSHi for all syntax highlighting. Let me get you a link real quick.
16:34 risou left
moritz_ wow, it claims to hilight perl 6 16:35
shortcircuit moritz_: Possibly of interest: rosettacode.org/wiki/Rosetta_Code:V...elf-report 16:36
moritz_: Also: rosettacode.org/wiki/Help:Syntax_Highlighting
16:36 zulon joined
TimToady Util: the one liner version 16:40
rakudo: 'foo ofo foo bar abr rab'.words.classify( *.comb.sort.join ).classify( +*.value ).sort( -*.key )[0].value.values».value».say
p6eval rakudo 5ae715: OUTPUT«foo ofo foo␤bar abr rab␤»
lue ohai o/ 16:41
TimToady er 16:43
rakudo: 'foo ofo oof zoo bar abr rab'.words.classify( *.comb.sort.join ).classify( +*.value ).sort( -*.key )[0].value.values».value».say
p6eval rakudo 5ae715: OUTPUT«foo ofo oof␤bar abr rab␤»
TimToady ohaio/ 16:44
shower &
16:44 daxim_ left, EvanCarroll joined
isBEKaml .OO(ohaio/ was take-off from japanese? Ohayo gozaimasta.... ) 16:46
TimToady はい。 16:47
lue 16:48
EvanCarroll Why do people use Module::Build 16:51
jesus.
moritz_ wrong channel to complain 16:52
EvanCarroll true, I was looking chromatic -- and I'm banned from irc.perl.org 16:53
smash lue: now, how would i translate that ? :-) 16:54
isBEKaml the way I see it, it's some form of a smiley. 16:55
(:
16:56 masonkramer left
moritz_ EvanCarroll: that doesn't make it more on-topic here... maybe /msg him on perlmonks, or send an email 16:57
moritz_ shuts up again
lue
.oO(I feel like I'm soo close to making /<A::B>/ work, if only I knew how to go about it)
17:00
17:06 Alias_ joined
lue just out of curiosity, why is package the only one that can't end in a semicolon, e.g. package Foo ; ? 17:10
moritz_ lue: easy distinction from p5 code 17:11
TimToady pretty much every module on CPAN starts with package MyName; 17:13
'course, if p5 borrows the "module" declarator, we're hosed... 17:14
tadzik . o O ( or they are ) 17:15
TimToady or "class"
moritz_ then you can invoke rule no. 1 :-) 17:16
wow, the Haskell R/B tree code is dense
TimToady it's no. 2 that they didn't like, when we came up with Perl 6 :)
ain't it though 17:17
but at least it doesn't look like it will run into the bind-lazy-bits problem
17:18 shillo joined
TimToady commuting & 17:18
17:20 shillo left 17:22 envi^home left
lue what part of nqp-rx/src/Regex/P6Regex/Actions.pm:400-432 actually makes <xyzzy> look for the appropriate rule|token|regex ? 17:32
17:32 hercynium joined 17:33 risou joined 17:34 risou_ left 17:39 Mowah left 17:41 justatheory left
lue Either that or can anyone tell me where the handbook that explains all this is? 17:41
pmichaud lue: it's just a method call 17:42
the part that creates the node representing the subrule call is lines 603-608 17:44
but essentially, <xyzzy> ends up translating into self.xyzzy(), where self is the current Cursor. 17:45
lue so, wouldn't <A::B> end up translating to A.B() ? 17:48
pmichaud no
and that will need to be handled specially
[particle] self.A::B() ?
pmichaud in the case of A::B, we have to create a new cursor of type A, and then invoke .B() on that cursor
17:49 Siddy left
pmichaud in nqp, that'd be self!cursor_start(A).B() 17:51
17:51 Siddy joined
lue and that line of code would magically know what to do with A and B ? [please say yes please say yes] 17:52
pmichaud of course, looking up the symbol 'A' ends up being a bit tricky at that point.
personally, I'm not too eager to try to get <A::B> to work until we also have some idea how we're going to handle lexically-scoped names as well. 17:56
(because I think the syntax and or semantics are likely to change)
lue I'd really like to get it working [because it makes my project easier], I just don't know what I need to know to make it work! :) 17:59
dukeleto 'ello 18:00
pmichaud lue: yes, I understand that. All I can say is that it's not really a trivial patch at the moment. :-)
I might be able to cheat something for now. 18:01
but it'll likely be a very leaky cheat.
18:03 sinusoid234 joined
lue
.oO(If there's any PIR involved in this patch, I think my time would be better spent building a TARDIS so I can go into the future and get the step-by-step handbook that explains all the code)
18:04
18:04 sinusoid234 left, sinusoid234 joined 18:06 sinusoid234 left
pmichaud oh, it will certainly involve PIR. 18:07
It likely involves updating the PAST::Regex nodes to create a cursor from a different grammar 18:08
afk for a bit 18:09
18:09 hercynium left
lue I was wondering about that, the fact that <A::B> doesn't work probably means there's no consideration for anything beyond the current Cursor. 18:12
pmichaud let me think about it a day; I might be able to come up with something. 18:13
I hadn't really looked at A::B because I haven't needed it for anything yet :-)
18:14 stepnem left
pmichaud oh, I suppose A::B could transform into some sort of specialized cursor_start rule. 18:16
or we could hijack nqp's .LANG subrule 18:17
hmmmm
lue [ mberends used it in his [alpha code] Pod parser, and I thought it was better than mucking about with the .parse method of Grammars and having the grammar parse every single line of the document ]
18:18 stepnem joined
pmichaud I think I can do it with a cheat. 18:20
but it'll be a day before I can really look at it.
dukeleto what is the best way to compile rakudo with --gen-parrot but with an unoptimized build? 18:23
Util TimToady++ # for anagram one-liner
18:24 zulon left
Util perl6: class O {}; my $o = O.new; print $o.WHAT.perl; 18:25
p6eval rakudo 5ae715: OUTPUT«O»
..pugs: OUTPUT«::O»
Util perl6: class HO is Hash {}; my $ho = HO.new; print $ho.WHAT.perl;
p6eval pugs: OUTPUT«::HO»
..rakudo 5ae715: OUTPUT«HO»
18:25 patspam joined
Util perl6: class AO is Array {}; my $ao = AO.new; print $ao.WHAT.perl; 18:25
p6eval rakudo 5ae715: OUTPUT«Array»
..pugs: OUTPUT«::AO»
Util Shouldn't Rakudo have said 'AO' instead of 'Array'? Is this a known bug in Rakudo?
moritz_ hugme: tweet hugme_test test 18:26
hugme moritz_: Ooops, there was an error: No such file or directory
18:26 pjcj joined
moritz_ Util: bug, I'd say 18:26
pmichaud perl6: class MyArray is Array { }; say MyArray.new.WHAT.perl;
p6eval pugs: OUTPUT«::MyArray␤»
..rakudo 5ae715: OUTPUT«Array␤»
pmichaud perl6: class MyArray is Array { }; say MyArray.new.WHAT;
p6eval rakudo 5ae715: OUTPUT«Array()␤»
..pugs: OUTPUT«MyArray␤»
pmichaud weird.
rakudo: class MyInt is Int {}; say MyInt.new.WHAT; 18:27
p6eval rakudo 5ae715: OUTPUT«MyInt()␤»
pmichaud rakudo: class MyList is List {}; say MyList.new.WHAT;
p6eval rakudo 5ae715: OUTPUT«MyList()␤»
pmichaud rakudo: class MySeq is Seq {}; say MySeq.new.WHAT; 18:28
p6eval rakudo 5ae715: OUTPUT«MySeq()␤»
pmichaud rakudo: class MyArray is Array {}; say MyArray;
p6eval rakudo 5ae715: OUTPUT«MyArray()␤»
pmichaud o_O
rakudo: class MyArray is Array {}; say MyArray.WHAT;
p6eval rakudo 5ae715: OUTPUT«MyArray()␤»
pmichaud rakudo: class MyArray is Array {}; say MyArray.new.WHAT;
p6eval rakudo 5ae715: OUTPUT«Array()␤»
pmichaud a-ha
yes, bug
in Array.new 18:29
lue afk for noms
colomon loliblogged: justrakudoit.wordpress.com/2010/09/...nd-limits/
Util Also, I cannot invoke methods that I define within the class, when the class "is Array".
pmichaud right, because all of the instances are Array instead of OA 18:30
(or AO, or whatever)
moritz_ is it a custom constructor, I guess
pmichaud Array.new is incorrectly delegating to &circumfix:<[ ]>
needs to be the other way around 18:31
moritz_ rakudo: class AO is Array { method new() { self.bless(*) } }; say AO.new.HWAT
Util moritz_: No, I just populate via push()
p6eval rakudo 5ae715: OUTPUT«Method 'HWAT' not found for invocant of class 'AO'␤ in main program body at line 22:/tmp/1pWzoJ5jQs␤»
moritz_ rakudo: class AO is Array { method new() { self.bless(*) } }; say AO.new.WHAT
18:31 mfollett left
p6eval rakudo 5ae715: OUTPUT«AO()␤» 18:31
pmichaud I can fix it pretty easily 18:32
moritz_ Util: seems you need to write a custom constructor, since Array.new() isn't polymorphic yet
Util moritz_: Thanks! I will try that as a work-around.
18:32 risou left 18:33 risou joined
moritz_ sees the problem now too 18:33
18:34 mfollett joined
pmichaud builds + tests a patch 18:35
moritz_ colomon++ # blog post
pmichaud blog post?
moritz_ justrakudoit.wordpress.com/2010/09/...nd-limits/ 18:36
Util Can someone add me to the list of people who can own a Perl6 RT ticket, and grant rights to change a ticket? My perl.org account is "util" (lowercase)
pmichaud "But it also lacks the memoization property of the infinite version from the previous post; ..."
I don't agree with this.
18:37 javs_ joined
colomon Well, I guess it memoizes, but it only on that finite portion of the series. 18:38
pmichaud right
the difference is simply that the series is no longer infinit
*infinite
colomon tweaked 18:40
pmichaud my @F-low := @Fibonacci.grep( { last if $_ > 900 } ) # should work 18:41
18:41 javs left
pmichaud rakudo: my @Fibonacci := (0, 1, *+* ... *); my @F-low := @Fibonacci.grep( { last if $_ > 900 } ); say @F-low[10]; 18:41
p6eval rakudo 5ae715: OUTPUT«Any()␤» 18:42
pmichaud rakudo: my @Fibonacci := (0, 1, *+* ... *); my @F-low := @Fibonacci.grep( { last if $_ > 900; $_ } ); say @F-low[10];
p6eval rakudo 5ae715: OUTPUT«89␤»
pmichaud rakudo: my @Fibonacci := (0, 1, *+* ... *); my @F-low := @Fibonacci.grep( { last if $_ > 900; $_ } ); say @F-low[12];
p6eval rakudo 5ae715: OUTPUT«233␤»
pmichaud rakudo: my @Fibonacci := (0, 1, *+* ... *); my @F-low := @Fibonacci.grep( { last if $_ > 900; $_ } ); say @F-low[20];
p6eval rakudo 5ae715: OUTPUT«Any()␤»
pmichaud and it can just be .map in that case 18:43
rakudo: my @Fibonacci := (0, 1, *+* ... *); my @F-low := @Fibonacci.map( { last if $_ > 900; $_ } ); say @F-low[20];
p6eval rakudo 5ae715: OUTPUT«Any()␤»
pmichaud rakudo: my @Fibonacci := (0, 1, *+* ... *); my @F-low := @Fibonacci.map( { last if $_ > 900; $_ } ); say @F-low[10]; 18:44
p6eval rakudo 5ae715: OUTPUT«55␤»
pmichaud rakudo: my @Fibonacci := (0, 1, *+* ... *); my @F-low := @Fibonacci.map( { $_ > 900 ?? last !! $_ } ); say @F-low[10]; 18:45
p6eval rakudo 5ae715: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 22␤»
pmichaud hmm.
probably a problem with 'last' parsing there.
anyway, 'last' can stop the series. 18:46
maybe take-while is really .grep( * < 900, :while) 18:48
18:50 stepnem left
pmichaud pmichaud@orange:~/rakudo$ ./perl6 18:53
> class AO is Array {}; say AO.new.WHAT.perl;
AO
spectesting. 18:54
18:55 stepnem joined 18:57 mfollett left 18:59 Holy_Cow left
moritz_ games.slashdot.org/story/10/09/03/1...t?from=rss # OH NOEZ, I was used to replying to those DNF jokes with "but contrary to DNF, Perl 6 is still being developed" 19:00
19:01 mfollett joined, patrickas joined
tylercurtis "There have been a few dozen releases of Perl 6 implementations, unlike DNF." 19:02
19:03 Holy_Cow joined
patrickas o/ 19:05
isBEKaml people still follow ./ ? I thought they were simply trolled over? ;) 19:08
moritz_ isBEKaml: the troll ratio isn't much higher than on reddit 19:09
tadzik it's /. :)
isBEKaml tadzik: on linux it's ./ :P
patrickas besides if you set your threshold to comments rated 5 you can just glance at the comments and "sometimes" get somethign usefull. 19:10
19:10 xinming_ joined
isBEKaml moritz_: that's true. :) # troll forums 19:10
tadzik isBEKaml: /. always seemed wrong to me :)
it's our chance to buy dotslash.org 19:11
isBEKaml :) # go ahead and push a redirect to /. if you want. 19:12
patrickas domain typo squatting 13 years later :-)
TimToady
.oO(dashslot)
19:13
isBEKaml that'd nuke everything! 19:14
TimToady what a 100 meter race is run in
19:15 draxil left
isBEKaml Oh, I parsed it as "dash lot with the hissing s" 19:15
19:15 draxil joined
isBEKaml ;) 19:15
isBEKaml will just shut up and go back to reading. 19:17
patrickas TimToady: about implementing ...^ , I got two different implementations locally I could push for one of them to land if it makes the rosettacode thingy easier
TimToady it isn't critical; I'd really like to see ...* work in subscript slices more than that 19:19
'course, ...^ wants to get implemented eventually
pmichaud ...* or ..* ? 19:20
TimToady any range or series that croses the end of the subscript range is supposed to autotruncate the sequence 19:21
pmichaud any list, too?
or do we have to distinguish series from list?
TimToady well...I guess the question is whether [0,1] on a single entry is an error or just throws away the 1 19:22
pmichaud people will be annoyed if @a[0,1] = ... doesn't give two elements 19:23
er, doesn't assign two elements
I was prepared to truncate ranges. Truncating any list is ... not clear to me.
TimToady just possibly we might just tag subscripts then end with * as special, would be another way 19:24
pmichaud you mean, syntactically?
TimToady nod
just an idea
but can you ask a list "do you know if you're infinite?"? 19:25
pmichaud some lists, yes.
others, no.
series lists and things that use gather/take (which is a lot) have problems knowing about infinity
and it's even possible for an infinite list to always remain inside the range of available subscripts :-) 19:26
(not that I'm proposing we make that work :-)
I've been thinking we might want to add a modifier or adverb to gather/take to say "act like you're infinite". Or some method that can be placed on any List to say "act infinite" . 19:27
e.g., when the programmer knows something about the list that can't be easily detected by the compiler. 19:28
TimToady or ,*
pmichaud that doesn't feel quite right, since ,* really creates a Parcel. 19:29
Unless we want to make that syntactically special, too.
TimToady currently defined as repeat the last element, but could be hijacked for "I know the prior is infinite"
ingy star: say 'Perl 6 sucks rocks' - 'sucks '
p6eval star 2010.07: OUTPUT«0␤»
TimToady and it doesn't matter because you never get to the *
ingy :(
pmichaud it might matter if we're returning a list to a caller 19:30
TimToady 1,2,3,func(),*
pmichaud (and with binding)
19:30 tadzik left
TimToady would say func returns an infinite list 19:30
ingy well I guess TimToady would never use '-' for strings if he doesn't use '+"
pmichaud but in a return statement, that would need/want to be return 1,2,3,(func(), *)
which I suppose is okay
but it still changes the return value a bit.
TimToady or marks the parcel 19:32
pmichaud still feels weird, unless it's syntactic. I can see someone saying "but I wanted to return a Whatever there". 19:33
TimToady well, suppose it actually returns a whatever
if you actually evaluate it
the only think is it might actually return * xx * 19:34
it would make the short size of a zip not look short
otoh, we don't define * op 42 at run time anymore 19:35
so who knows what it'd do
19:35 molaf left
pmichaud have to run (kid pickup) 19:35
truncation of subscripts needs some clarity 19:36
19:36 dalek joined, ChanServ sets mode: +v dalek
pmichaud currently the spec says "any range" and perhaps implies "any range or series" 19:36
but this sounds like we're looking more at infinity more than range-ness
which would mean that [3..5] wouldn't truncate
and I do think we want to distinguish in a way such that [3,4,5] doesn't truncate 19:37
afk for a bit
moritz_ if subscripts truncate, does my @a = 1, 2; @a[1, 2, 3] = <b c d>; still work? 19:38
19:38 M_o_C joined
TimToady that's what we want 19:38
should end up with three values
er, four
what pm says about inf vs range semantics 19:39
sorear good * #perl6 19:40
TimToady we need a way to mark things that are known to the programmer as infinite but would involve halting problems for the computer to figure out
afk & 19:41
sorear TimToady: Did you see that package Foo { } is legal Perl5 now?
19:46 timbunce joined 19:47 risou left 19:51 justatheory joined 19:55 nexusone left 19:58 pjcj left 19:59 dual left
pmichaud after walking a bit, I'm less opposed to having ,* indicate "infinite whatever". 20:01
i.e., I think that could be made to work relatively cleanly.
We'd still want/need to figure out subscript truncation, if any. 20:02
20:04 Italian_Plumber joined, Italian_Plumber left 20:05 alex_____ joined
dalek kudo: 52f9ea8 | pmichaud++ | src/builtins/Array.pir:
Refactor Array.new and circumfix:<[ ]> so that subclasses of Array properly instantiate the correct type. Reported by Util++ on #perl6.
20:05
20:06 dual joined 20:09 alex_____ left 20:10 silug joined
patrickas colomon ping 20:13
colomon pong
patrickas got a minute for series ? 20:14
[Coke] hey, any lurkers here who are interested in being able to call perl6 from tcl or vice versa (so I can grab tuits for partcl. =-) 20:15
patrickas colomono: Do you think it is better if i submit separate small patches fixing various stuff in series code instead of the one big "fix almost everythig" refactor that has lesser chances of landing? 20:17
colomon patrickas: I don't have time at the moment, actually. I'm off to noms in about 40 minutes, and lots of $work that needs doing in the meantime.
20:18 Italian_Plumber joined
pmichaud patrickas: it depends on the patch, really. 20:18
if a fix-almost-everything patch is easier to read and review, that's better.
if it's hard to read and review, then a series of patches is easier
patrickas no prob colomon I might still be here later
Tene [Coke]: I've already implemented that twice, not feeling up to working on it again yet. 20:19
patrickas pmichaud: it's the refactor I showed you but i kept adding stuff to it fixing various things and passing more and more tests ... so it kind of grew and got a bit harder to review.
pmichaud I still think that series needs an overall rethink, too. 20:20
:-)
patrickas actually might be a good idea to submit a pull request and test the new github goodies?
pmichaud (and by "rethink", I mean the spec)
moritz_ rakudo: enum A <B C>; my B $x = A::B; say $x 20:21
p6eval rakudo 5ae715: OUTPUT«Cannot modify readonly value␤ in '&infix:<=>' at line 1␤ in main program body at line 22:/tmp/pCQtkEtMdF␤»
M_o_C IIRC you abandoned the development releases in favor of Rakduo Star?
moritz_ rakudo: enum A <B C>; my B $x := A::B; say $x
p6eval rakudo 5ae715: OUTPUT«0␤»
patrickas pmichaud: That's part of what delayed the whole thing ... last tim eI got issues with it we could not come up with a satisfying spec solution (with TimToady)
pmichaud I think the complexity of the code means we haven't really thought the spec through clearly yet.
moritz_ M_o_C: which development releases are you talking about?
rakudo: enum A <B C>; my C $x := A::B; say $x
p6eval rakudo 5ae715: OUTPUT«You cannot bind a variable of type Int() to a variable of type Int().␤ in 'infix:<:=>' at line 685:CORE.setting␤ in main program body at line 22:/tmp/nXNbyHsav7␤»
M_o_C These: "Rakudo Perl 6 compiler development release #*" 20:22
patrickas so would it be better for me to drop the whole thing pending a spec rethinking ?
pmichaud M_o_C: we just call them compiler releases now.
We still have them.
moritz_ M_o_C: no, they continue, and we use them in the Star releases
Tene [Coke]: Good luck, though!
moritz_ M_o_C: we just don't announce them as publicly as before, because people confuse compiler and Star releases 20:23
tylercurtis alester: are you around? 20:24
sorear seen pmichaud
aloha pmichaud was last seen in #perl6 2 mins 1 seconds ago saying "We still have them.".
alester Yes.
sorear erm
seen pmurias
aloha Sorry, I haven't seen pmurias.
M_o_C moritz_: Ok, thanks.
alester tylercurtis: Did you need something or are you just keeping track of me for my mom? 20:26
tylercurtis alester: (this is slightly the wrong channel) you're be listed on www.pm.org/groups/19.html as the contact for Chicago.pm, I think. Am I correct in that? And is it correct in listing you as such?
alester Sure. 20:27
Even though we haven't had any meetings in months.
years?
tylercurtis That's what I was going to ask about. Thanks. 20:28
Tene I hear there's perlmongers in sfbay, but I ran into a few dead ends when looking, iirc. 20:29
[particle] um, yeah, didn't they apply to tpf for a grant?
alester sf.pm.org 20:30
Fred Moyer
shouldn't be too hard to find.
20:30 Guest49581 left
\xF0 you'd think those cities would be big enough to have successful meetings 20:30
alester \xF0: Gosh, they must be some kinds of dolts, huh. 20:31
PerlJam I thought the gist of the grant app. was that they're growing too big and needed some funds to keep it up.
\xF0 alester: Chicago is huge!
alester You know what makes PM groups work? It's not city size. It's having people who are willing to drive things to make them happen and who don't get burnt out on bitching and moaning from everyone.
And comments like "Gee, Chicago should have meetings ALL THE TIME!" 20:32
\xF0 don't I know it
Tene ALL MEETINGS ALL THE TIME
\xF0 alester: you sound a little bitter lol
alester Not sure what's "lol" worthy. 20:33
20:33 rgrau_ left
alester Chicago's huge size also means that it's really a number of different geographic areas. Sometimes, people who live in Chicago proper twist their panties because people outside the city limits call it Chicago.pm. 20:33
sahadev hai #perl6 20:34
\xF0 oh, there's also WindyCity.pm
sahadev gist.github.com/564473 # my attempt at rosettacode.org/wiki/24_game
also my first (and not quite successful) attempt to use grammars. 20:35
the grammar matches (1+2+3+4) but not the likes of (1+2)+(3+4). what needs changing there? 20:36
[Coke] tene - I was more meaning in the getting tcl to a point where it is worth interopping with.
pmichaud in DFW we've decided to hold a variety of meetings throughout the metroplex 20:37
[Coke] in albany no one cares.
we all hate perl up in here.
pmichaud basically, any group that wants to have meetings and call it "DFW.pm" can do so, and we just share a common mailing list 20:38
[Coke] hey! HTML5 gets builtin RUBY support! someone call the w3!
[particle] we're targetting HTML6, of course.
alester pmichaud: I wish that we all could have had that attitude in Chicago a few years ago. :-(
\xF0 pmichaud: you get multiple groups that do so? 20:39
pmichaud well, that's a recent change -- and it came about because there weren't any regular DFW.pm meetings, but there was one group that ended up meeting regularly anyway 20:40
\xF0: it still remains to be seen how it will work out
\xF0 www.pm.org/groups/north_america.html weird how Lansing is put under USA, and not Michigan
pmichaud basically, someone just has to speak up and say "I'd like to meet at XYZ place" on the list, and whoever shows up can go :-)
alester It's all completely random. Some places you get someone who will drive stuff, and otehrs you don't.
Some times you just wnat beer, some places want actual presentations and people who will put them on. 20:41
pmichaud yeah, we decided that "DFW.pm" should be an umbrella that allows all of those to happen, rather than trying to create "one official group" 20:42
at least, I think that's what we decided :)
[Coke] one of the reasons I try to get to one con if possible, as we have no local meetings to fill the gap, really.
plus you jokers online.
hugme: hüg Albany.pm
see, nothing. ;)
pmichaud sahadev: I'm still looking at your grammar 20:43
sahadev pmichaud: thanks.
pmichaud sahadev: (1+2)+(3+4) doesn't match because of
^ [ <parexp> | <parexp> [ <op> <parexp> ]? ] $
rakudo ends up matching the initial <parexp>, then looks for end of string, doesn't find end-of-string, so fails. 20:44
rakudo doesn't have a full implementation of longest-token-matching yet, so the above ends up acting like
^ [ <parexp> || <parexp> [ <op> <parexp> ]? ] $
sahadev pmichaud: will switching the order help? 20:45
[Coke] isn't that better written as <parexp> ** <op> ??
pmichaud sahadev: switching the order would help, as would simply writing it as <parexp> [ <op> <parexp> ] ?
sahadev [Coke]: it might very well be. i am just dipping my toes into grammars.
pmichaud i.e., you've already indicated that <op> <parexp> is optional, so there's no need for the additional alternation 20:46
sahadev pmichaud: yes of course!
pmichaud and what Coke++ suggests might be even better
as it would then allow things like (1+2)+(3+4)+5+6
[Coke] ah, ** implies repeats, yours is a single optional.
20:46 Guest49581 joined
[Coke] looks forward to this weekend when he gets to code in nqp for fun instead of getting paid for cf & js. 20:47
20:47 rbuels joined
sahadev [Coke]: actually, i am trying to match nested expressions like 2+(1+(6*3)) too. neither <parexp> [ <op> <parexp> ] * nor <parexp> ** <op> seem to do it. 20:52
sahadev needs to read the synopsis again.
20:53 isBEKaml left
[particle] sahadev: so, parexp can contain itself? 20:53
sahadev [particle]: yes.
[Coke] sahadev: is it the match failing, or your action? 20:55
tylercurtis sahadev: does parexpr correctly match "2" or "(2)"?
sahadev tylercurtis: yes to both
[Coke]: .parse returns false for 2+(1+(6*3)) 20:56
tylercurtis Looking at your gist, it looks like parexps can only contain exps. 20:57
sahadev tylercurtis: the gist is slightly out-of-date. let me update with my latest copy.
pmichaud traditional recdescent would be something more like 20:58
token expr { <term> <op> <term> }
token term { '(' <expr> ')' | \d }
token op { '+' | '-' }
which will handle nested expressions just fine
or if you need more 20:59
token expr { <term> ** <op> }
note this doesn't handle precedence, but that can be achieved with more rules
20:59 Italian_Plumber left, patspam left
pmichaud i.e., the trick is to treat a parenthesized expression like a term 21:00
sahadev pmichaud: that makes sense. let me try that. 21:01
arnsholt pmichaud: There seems to be a bug in nqp-rx where floating point literals with zero decimal part sometimes become integers 21:05
sahadev pmichaud: thanks. it actually seems simpler now. gist.github.com/564473 updated.
arnsholt But I can't quite find the root of it
21:05 whiteknight joined 21:06 timbunce left
shortcircuit TimToady, moritz_: For the purpose of testing P6 implementations and syntax, you might also want to run through Project Euler. 21:07
21:09 Guest49581 left 21:13 timbunce joined
pmichaud arnsholt: yes, it has to do with the way that PAST::Compiler converts floats into PIR constants. The .0 gets lost 21:13
sahadev thanks all. I added my solution to rosettacode.org/wiki/24_game#Perl_6. Feel free to improve it. 21:14
21:16 masak joined
masak ahoy, #perl6! 21:16
phenny masak: 12:39Z <moritz_> tell masak that netzhansa.blogspot.com/2010/09/quic...ommon.html might interest him
pmichaud arnsholt: if you can file a bug ticket for it, I can likely get it fixed. A test in nqp-rx would be even better. :-) 21:17
masak moritz_: saw it earlier today and put it in my tab queue. I'll read it now that you recommended it.
interestingly, I was in #perl on irc.perl.org when chip posted that URL. 21:22
judging from the article text and the comments, #perl managed to effect a slight redaction of the article text :)
21:23 sahadev left 21:27 jimi_hendrix joined 21:35 Mowah joined 21:36 Holy_Cow left 21:42 hercynium joined
masak [Coke]: no idea what Google you're using to get me as the first hit 'for yaakov'. in my Google, yaakov is the first hit for yaakov. :) 21:46
Google++ # making more sense than [Coke] :P 21:47
21:47 rgrau_ joined 21:49 timbunce left
arnsholt pmichaud: Right, I've got a test. Which test file do you think it should go in? I'm a bit unsure which one is a good fit 21:51
21:52 M_o_C left 21:53 M_o_C joined 21:54 mikehh joined
masak replies to the question at www.reddit.com/r/perl/comments/d7ve...%C3%A4sak/ 21:55
21:57 ruoso left 22:01 cdarroch left
masak www.reddit.com/r/perl/comments/d8gn...rl/c0ygi30 -- offhand, I can't think of a way to do this kind of option handling with a MAIN signature. 22:02
someone might want to answer this, as well: www.reddit.com/r/perl/comments/d8gn...rl/c0ygiif 22:06
22:11 alester left 22:15 Axeman joined
arnsholt pmichaud: github.com/perl6/nqp-rx/issues/issue/7 includes a test case that works on latest nqp-rx locally 22:17
22:17 mfollett left 22:20 jhuni joined
masak "Perl 6: succeeding despite having giants standing on its shoulders" 22:21
one of the unfair things about Second Systems is that people expect all the things they expect from the First System, and they have relatively little tolerance/understanding for the "in progress" view of things. 22:22
it's like, hurry up, ok? 22:23
First System is so much better... you should have based your stuff on it instead. :)
masak stops trolling #perl6
TimToady keep doing it, you need the practice 22:24
masak oh, I was holding back a bit.
22:25 masonkramer joined
masak "Why did you remove sigil variance? I liked that part. It was brain damaged, but it was *my* brain damage, darn it!" 22:26
"I think Perl 6 is slow because the community designed it. Yeah. That's it. Some individual should have made it instead, like with good programming languages."
"I think 'Perl 6' should really be called 'Ruby' and be done with it. Mostly because I like Ruby very much, and I don't know much about Perl 6." 22:28
masonkramer really? I don't believe you
:p
Tene masak: you forgot "LOL PUNCTUATION IS HARD AND SCARY"
22:28 pjcj joined
TimToady if he said that he would hurt my feelings 22:29
masak "You can write Pascals triangle in Perl 6 in like two lines of code. I don't like that. Perl 6 shouldn't be such an academic language."
22:29 javs_ left
Tene Oh, we could fix that by requiring a mandatory linebreak after every comma. 22:30
masak "Hey guys! I saw that Periodic Table of Perl 6 Operators. Now I know Perl 6 is teh suckz. Nobody needs that many operators."
Tene back to "PUNCTUATION IS HARD AND SCARY" 22:31
masak that was the closest I could manage.
M_o_C "<masak> "You can write Pascals triangle in Perl 6 in like two lines of code. I don't like that. Perl 6 shouldn't be such an academic language."" <--- Did someone actually say something along these lines? I mean the connecting-"only two lines"-with-"academic" part. 22:32
Tene M_o_C: Yes.
22:32 daemon is now known as prism
masak oh, and "I read this scientific article the source of which I cannot find that said that you shouldn't use so many operators in your language, because it's like, bad and stuff. Therefore I think Perl 6 will never succeed." 22:32
M_o_C That's rather interesting.
22:32 prism is now known as daemon
masak M_o_C: yes, more or less. 22:32
M_o_C: twitter.com/shadowcat_mst/status/22112066276 22:33
M_o_C Hrm, ok. I associated "academic" with "used in a research environment" not "developed as research". 22:34
Thanks for digging that up, anyway^^
masak you're welcome. 22:35
I think I'm done trolling-in-quotes for the day.
patrickas masak: what does the {} mean in command line args ? THinking about the MAIN args to ffmpeg example 22:40
masak [backlog] ooh, double classify! haven't seen that before.
patrickas: I think it might mean 'grouping' here. and [] might mean 'optional'. but I'm not sure. 22:41
patrickas ok .. I know about [] but first time I see {} 22:42
masonkramer I think the pascal's triangle is snippet is pretty readable
masak I think it's good that we're finding all these cases of segfault for long-running loops. maybe we should start making a list of scripts that segfault? or an RT ticket of them, or something.
masonkramer the code looks exactly like its product 22:43
to me, that's intuitive
masak masonkramer: It's a math problem. the solution looks a lot like math.
22:43 svetlins joined
masonkramer it's more a declaration of an infinite pascal's triangle than a recipe for generating a pascal's triangle 22:44
shrug...I'm personally excited to use perl6 in a production environment
masak I like when the series operator is used for non-numbers. the balanced-parens example at the bottom of use.perl.org/~masak/journal/40459 is another favourite of mine.
22:45 M_o_C left
masonkramer I love your examples! 22:46
If I ever learn perl 6, I can truthfully say I learned it from masak
anyway...I'm off to dinner...ttyl 22:47
masak beams 22:48
22:48 Mowah left 22:49 Italian_Plumber joined
Axeman I'm wondering if somebody can help me with proto. Can I change where @*INC looks? (Sorry if this is terribly newbie of me.) 22:50
masak Axeman: you can. 22:51
patrickas maska: i kind of find it a pity that you should know $end in that example
masak Axeman: export PERL6LIB=...
patrickas sorry name fail :-(
masak Axeman: the paths you put on there will end up in @*INC
Axeman Like Perl 5.
masak patrickas: there might be ways around that. I haven't thought about it. 22:52
patrickas the easiest that I can think of is to use code for the terminating condition which only works on my fork ATM 22:53
22:54 Ross left
masak patrickas: I guess the &ext-balanced-paren-string could detect $end and return Nil. 22:55
but to me that's equally complex.
22:56 rgrau_ left
masak even if we didn't know $end, we would know to stop after a($n) steps, where a is defined at www.research.att.com/~njas/sequences/A052701 22:58
patrickas or I guess after the series would start producing longer than N chars results 23:01
masak I'm not sure that's what would happen. 23:02
but I haven't checked.
rakudo: my @a = 1, 2, 3; my @b = 1, 3, 5; my @c = @a (&) @b; say @c.perl 23:05
p6eval rakudo 52f9ea: OUTPUT«[Set.new(1, 3)]␤»
masak I'm guessing the Set should evaporate into a list here.
when we have that working, we have a real use case for Set.
what is it that gets called when flattening something for list assignment? .flat? 23:06
patrickas I think so but I am no reference :-) 23:09
I'm like the yellow rubber ducky you debug with :-) 23:10
masak :) 23:11
.eager, it seems from source. 23:13
patrickas Rubber ducky nods 23:14
masak :)
patrickas when does the match result have a negative .to ? 23:15
masak when the Match failed.
usually -2, but sometimes -1 and -3 too, IIRC.
Axeman another proto question: where's projects.list supposed to be? It doesn't seem to be saved to my system.
masak that's PGE though, so things might have changed.
Axeman: it's right there in the proto/ dir. 23:16
patrickas I did see -3 but S05 I could not find the meaning in S05 23:17
Axeman masak: I have a projects.state but no projects.list
and projects.state is 0-length 23:18
masak patrickas: here are the meanings: github.com/masak/gge/blob/master/li...Exp.pm#L35
23:18 getpwnam joined, getpwnam left
masak Axeman: I just updated my proto repository to be sure. projects.list is in there. are you sure you have a clean checkout? 23:18
Axeman A clean checkout of proto? No. I'm running perl proto.pl install proto 23:19
masak right. but you're doing that in a directory that you downloaded... how? 23:20
patrickas masak: Thanks. Actually it's for the condition when next-balanced-paren-string should stop producing items... you can just check when it stops matching
masak Axeman: through Rakudo Star?
patrickas rakudo: say ( '()()()' ~~ /^ ( '('+ ) ( ')'+ ) '(' /; ) 23:21
p6eval rakudo 52f9ea: OUTPUT«()(␤»
patrickas rakudo: say ( '((()))' ~~ /^ ( '('+ ) ( ')'+ ) '(' /; )
p6eval rakudo 52f9ea: OUTPUT«␤»
Axeman No I downloaded it off of the perl6 modules site.
masak rakudo: say ( '((()))' ~~ /^ ( '('+ ) ( ')'+ ) '(' /; ); say $/.to; say ?$/
p6eval rakudo 52f9ea: OUTPUT«␤-3␤0␤»
masak patrickas: better to check the boolean value, if you ask me.
patrickas Yes sure
masak Axeman: modules.perl6.org/ ? 23:22
23:22 am0c joined
Axeman masak: yeah that's the one. 23:22
masak that means you went through github, I guess.
Axeman: do you see 'projects.list' being listed at github.com/masak/proto/ ?
patrickas You are using .to and .from without checking anything ... I just wanted to understand what -3 meant ... if it means the match failed you can just start the sub with : return unless $s ~~ /^ ( '('+ ) ( ')'+ ) '(' /; 23:25
masak according to the URL I linked above, it means CUT_MATCH 23:26
Axeman I just saved the raw copy down to my machine.
patrickas I say that but I did not understand what CUT_MATCH means :-(
lue ohai o/ 23:27
masak Axeman: of proto.pl?
23:27 am0c left
Axeman Sorry that was in the buffer from before. 23:27
masak what was in the buffer from before? I don't follow. 23:28
patrickas s/say/saw/
masak patrickas: CUT_MATCH means 'abort the match, either because the user told us, or because the match failed'
patrickas: think of it as a 'fail of the third order'. 23:29
patrickas OK :-)
Axeman That message that I sent was old. I had typed it into the buffer but did not send it--then when I came back I fat fingered the enter key and sent it.
patrickas masak: I wonder should the series operator automatically stop producing items when the next sub returns Nil ? 23:30
it kind of makes sense to me but I am not sure if there are arguments against
masak Axeman: ok, so back to the question I asked. did you download the whole repo, or just proto.pl?
Axeman Just proto.pl 23:31
masak Axeman: then that's you first clue right there for why you don't have projects.list
actually, it's all your clues. 23:32
I don't wish to sound indignant, but if you see a file in the repository, then download just one of them, and then ask why you don't have one of the other files... then you proabbly want to take a step back and think a bit.
:)
Axeman I don't see a link to download the whole project on the page--and I thought I was following the instructions in the README. Is that out of date? 23:33
23:33 PacoLinux joined
masak probably, but probably not in that way. 23:33
I don't recall it ever saying "download only proto.pl"
23:33 jhuni left
masak in fact, I'd guess it kinda assumes you should download the whole repo. 23:33
23:34 mikehh left, PacoLinux left
masak Axeman: at github.com/masak/proto , there's a "Download Source" button at the top right. 23:34
that's if you don't have git.
23:34 PacoLinux joined 23:35 svetlins_ joined
Axeman Oh, I see it, now. 23:35
masak Axeman++ # seeing it 23:36
I think you'll find things working a bit better with all the files, not just the .pl script.
Axeman Here's what I read from the project reame: To install Proto, get the main script with this command (or a browser) (all on one line without the \ if not in a Unix compatible shell): perl -MLWP::UserAgent -e"LWP::UserAgent->new->mirror( \ 'github.com/masak/proto/raw/master/proto', 'proto.pl')"
masak huh. 23:37
patrickas rakudo: say (Nil,1).pick() for ^10
p6eval rakudo 52f9ea: OUTPUT«1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤»
patrickas is that a bug ? ^^
masak Axeman: my apologies. that's new to me.
patrickas: no, that's list flattening in action.
patrickas Oh Nils always disapear? even from the middle ? 23:38
rakudo: say (2,Nil,1).pick() for ^10
23:38 svetlins left
p6eval rakudo 52f9ea: OUTPUT«2␤1␤1␤2␤2␤2␤1␤1␤2␤2␤» 23:38
patrickas rakudo: say [2,Nil,1].pick() for ^10
masak Axeman: this might be case of proto suffering from the Too Many Cooks syndrome.
p6eval rakudo 52f9ea: OUTPUT«2␤2␤2␤1␤2␤2␤2␤2␤2␤1␤»
Axeman I appreciate what you guys are doing.
masak Axeman: I have no idea if those instructions ever worked. I'd recommend downloading the whole repository.
Axeman: also, I feel a little bad now for almost yelling at you, when I should have RTFM myself :) 23:39
Axeman No biggie. Like I said you guys are making the dream come alive. 23:40
masak :)
just so you know: proto is being phased out, slowly but surely. it's still supposed to work, but some remaining bugs might never get fixed.
you might have better luck with tadzik++'s 'neutro'.
Axeman What's taking its place?
masak github.com/tadzik/neutro 23:41
23:41 [particle] joined
masak neutro is, as far as I understand, a simplification of proto. 23:41
taking proto's place in the long run, is 'pls' -- you can see it in a branch of the proto repository: github.com/masak/proto/tree/pls 23:42
23:42 cotto joined
[Coke] mst is an excellent example of why I consider him a troll. 23:42
masak that sentence almost coheres. 23:43
patrickas rakudo: sub step($s) {return unless ($s ~~ /^ ( '('+ ) ( ')'+ ) '(' /); [~] $s.substr(0, $/.from),"()" x ($1.chars - 1),"(" x ($0.chars - $1.chars + 2),")",$s.substr($/.to);}; my $start = "()" x 3;for $start, &step ... * -> $string {say $string;}
p6eval rakudo 52f9ea: OUTPUT«()()()␤(())()␤()(())␤(()())␤((()))␤»
patrickas ^^ No need for $end 23:44
masak patrickas++
23:44 masonkramer left
patrickas rubber ducky can sleep now :-) 23:44
23:44 masonkramer joined
masak night, patrickas. dream of big tubs filled to the brim. 23:44
patrickas hehehe I will, 'night 23:45
23:45 patrickas left
masak rakudo: class AO is Array {}; my $ao = AO.new; print $ao.WHAT.perl; 23:54
p6eval rakudo 52f9ea: OUTPUT«AO»
masak pmichaud++