»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend! | Rakudo Star Released!
Set by diakopter on 6 September 2010.
dalek rixel: 75596d3 | diakopter++ | sprixel (8 files):
more porting of sprixel code generation
00:02
00:05 meppl left 00:08 ash_ joined
gottreu re: blackjack golf, s/shift/pop/ s/unshift/push/ 00:08
00:09 ash_ left
thundergnat gottreau: Doh! Of course. sometimes the obvious just flys right by me. 00:11
gottreu and can't all the "my %x" parts be "my%x" ? 00:12
thundergnat gottreu: yep, apparently they can. 00:14
I thought that was significant whitespace for some reason. 00:15
smosher tighter deck construction: my@d=((<♦ ♠ ♥ ♣>X~(2..10,<A J Q K>))>>=>>>[2..10,1|11,10 xx 3]).pick(*); 00:21
gottreu my@d=((<♦ ♠ ♥ ♣>X~(2..10,<J Q K A>))>>=>>>[2..9,10 xx 4,1|11]).pick(*); is 1 char shorter? 00:24
smosher 3 shorter, isn't it? 00:25
00:25 leprevost left
thundergnat smosher: %v is used later so you can't just get rid of it. 00:25
smosher thundergnat, ah I was afraid of that
thundergnat without other structural changes, at least 00:26
gottreu so where did this problem come from?
smosher I was going quite blindly at the deck construction from the get-go
thundergnat gottreu: I don't know really, nymacro brought it up earlier irclog.perlgeek.de/perl6/2010-09-28#i_2871385 and he and tadzik worked on it for a while 00:28
It just look interesting. 00:29
s/look/looked/
I like golfing... butI'm not very good at it.
gottreu but I need to know exactly what the problem statement or rules are, so that I can abuse them
00:32 nymacro joined
gottreu speak of the devil. 00:33
thundergnat gottreu: quick! there's nymacro! ask him!
gottreu nymacro: whence comes the blackjack golfing problem?
nymacro I just did it for fun
gottreu Okie doke. 00:34
nymacro It has no real origin; although we could possibly turn it into a mini-competition if people are interested :)
00:34 risou left 00:35 risou joined
nymacro gottreu, would you and/or others be interested in a similar Perl 6 related golf? 00:36
thundergnat nymacro: sure. 00:37
gottreu eh
nymacro I might have to get something set up then :)
gottreu does stackoverflow still do weekly code golfs? 00:38
nymacro I really have no idea
00:39 risou left 00:42 kjeldahl left 00:44 ruoso joined 00:48 alester left 00:55 QinGW joined 01:05 thundergnat left 01:15 lue left 01:16 nymacro left 01:24 alester joined
smosher 317, but prints the winning hand funny: gist.github.com/602143 01:25
01:27 Entonian left 01:32 envi left 01:34 meppl joined 01:35 PhatEddy joined
alester nslookup uniqua.petdance.com 01:35
01:40 redicaps joined, molaf_ joined 01:43 smosher is now known as s_mosher, molaf left 01:46 Generol joined 01:47 ggoebel left 01:53 masak joined
masak couldn't sleep 01:54
01:55 jaldhar joined 01:58 redicaps left 02:01 LaVolta joined
masak "Perl 6 promises more than what Perl 5 has delivered" -- a catchy phrase made by thickas++ in a comment over at the old post perlbuzz.com/2007/12/why-perl-6-nee...named.html 02:06
I wonder if that phrase is something that people of both Perls could agree on. maybe, maybe not. 02:07
02:08 gottreu_ joined 02:20 PhatEddy left 02:25 Generol left
s_mosher masak, s/than/of/ changes the meaning slightly 02:32
masak ...and I like. 02:33
s_mosher: if I include this in a presentation, I might show the original sentence first, then switch in your change, and say "...but we like this better" :)
s_mosher er 02:34
that is the original
masak oh. :)
masak re-checks
s_mosher 'of' makes for a bad description IMO
masak '...more of what Perl 5...', indeed. 02:35
why does it make for a bad description?
02:35 justatheory joined
s_mosher it's still a Perl, and that's very accurate, but there are a lot 'of' important things which haven't promoted to 6 02:36
or have changed very greatly in the process
"changed very greatly" should maybe read "to the effect of greatness" 02:37
I think there's just too much good revision and refactoring present to say anything that could be interpreted as "more of the same" 02:38
masak hm, "Perl 6 promises more *of* what Perl 5 has delivered" somehow assumes that Perl 6 is already at the point where Perl 5 is... which it isn't.
I actually think I prefer my misreading, which is both slightly provocative and hard to get angry at at the same time. 02:39
s_mosher haha
masak sure, Perl 6 *promises* more than what Perl 5 delivers. of course. otherwise we wouldn't bother to make it. 02:40
s_mosher yesterday I proved to myself I could still write very unreadable code in 6
masak :)
s_mosher it seems that for "(for(for(turtles) {} ) {}) {}" is what I do in Perl 6 when I want a | b | c ... from the shell 02:42
masak huh.
or just ==> maps
s_mosher yeah that's what I should be doing for readability 02:43
I think my tendency has something to do with adjacency; the fors are adjacent, but the feeds would end up leap-frogging data and code 02:46
masak :)
02:47 agentzh joined 02:52 LaVolta left 02:56 LaVolta joined 03:01 bbkr left 03:02 bbkr joined 03:06 leprevost joined 03:12 meppel joined 03:17 meppl left 03:20 meppel is now known as meppl 03:22 gottreu_ left
masak lol, I blogged. strangelyconsistent.org/blog/its-ju...tree-silly :) 03:27
03:31 sftp left 03:51 masak left 03:54 maayansv joined 04:01 maayansv left 04:04 gfldex joined
patch rakudo: my @x{10,20} = 1,2; say @x{20}; 04:07
p6eval rakudo 624188: ( no output )
TimToady rakudo: my @x[10,20] = 1,2; say @a[20]; 04:09
p6eval rakudo 624188: OUTPUT«===SORRY!===␤Symbol '@a' not predeclared in <anonymous> (/tmp/OiTSvpp3tL:22)␤»
TimToady rakudo: my @x[10,20] = 1,2; say @x[20];
p6eval rakudo 624188: OUTPUT«Any()␤»
TimToady rakudo: (my @x)[10,20] = 1,2; say @x[20]; 04:10
p6eval rakudo 624188: OUTPUT«2␤»
TimToady or...
rakudo: my @x.[10,20] = 1,2; say @x[20];
p6eval rakudo 624188: OUTPUT«===SORRY!===␤Confused at line 22, near "my @x.[10,"␤»
TimToady std: my @x.[10,20] = 1,2; say @x[20];
p6eval std : OUTPUT«ok 00:01 120m␤»
TimToady the parens more clearly reject the subscript as part of the declaration 04:11
see S09:193 for why it's amibiguous 04:12
diakopter rakudo: sub a(Int;Str) { }
p6eval rakudo 624188: ( no output )
diakopter rakudo: sub a(Int,Int;Str) { }
p6eval rakudo 624188: ( no output ) 04:13
diakopter hm, that was timing out earlier. 04:14
rakudo: sub a(Int, Str; Int) { };
p6eval rakudo 624188: ( no output )
diakopter the vps must've been really busy
04:15 QinGW left 04:16 QinGW joined
TimToady std: say lol 04:22
p6eval std : OUTPUT«===SORRY!===␤Undeclared routine:␤ 'lol' used at line 1␤Check failed␤FAILED 00:01 115m␤»
TimToady seems STD isn't recompiling anymore 04:24
(for p6eval)
diakopter std: infix<)> while 1 04:25
p6eval std : OUTPUT«ok 00:01 115m␤»
TimToady o_O
std: infix while 1 04:26
p6eval std : OUTPUT«ok 00:01 115m␤»
TimToady std: statement_prefix while 1
p6eval std : OUTPUT«===SORRY!===␤Undeclared routine:␤ 'statement_prefix' used at line 1␤Check failed␤FAILED 00:01 115m␤»
TimToady std: prefix while 1 04:27
p6eval std : OUTPUT«ok 00:01 115m␤»
TimToady std: postfix
p6eval std : OUTPUT«ok 00:01 114m␤»
TimToady std: EXPR
p6eval std : OUTPUT«===SORRY!===␤Undeclared name:␤ 'EXPR' used at line 1␤Check failed␤FAILED 00:01 114m␤»
TimToady std: category 04:28
p6eval std : OUTPUT«===SORRY!===␤Undeclared routine:␤ 'category' used at line 1␤Check failed␤FAILED 00:01 114m␤»
diakopter std: infix: :()
p6eval std : OUTPUT«===SORRY!===␤Illegal redeclaration of 'infix' at /tmp/bD569p_PTT line 1:␤------> infix: ⏏:()␤Check failed␤FAILED 00:01 116m␤»
04:30 satyavvd joined
TimToady std: infix: goto infix; 04:32
p6eval std : OUTPUT«===SORRY!===␤Illegal redeclaration of 'infix' at /tmp/NfvPG3xc90 line 1:␤------> infix: ⏏goto infix;␤Check failed␤FAILED 00:01 115m␤»
TimToady crud 04:33
truename: OUTER::OUTER::<infix:<.>>
diakopter ? 04:34
oh 04:35
diakopter hasn't before seen truename
TimToady it's what it was bound to in an outer scope (CORE in this case)
obviously losing the :<.> at some point 04:36
04:36 mfollett joined
diakopter finds a bug for the first time in a while 04:36
TimToady diakopter++ # grrr
diakopter returns to writing a special-purpose compiler+runtime for a strongly-typed STD/Cursor. I'll finish it one of these years. 04:38
the 22MB .csv of STD's parse of itself takes 10 seconds to thaw into the CLR on my machine... slow. once the constructors for its setting-as-loaded are 'hard-coded' into C#, it should be much faster. :) 04:40
(for the CLR to load/run from CIL) 04:41
patch rakudo: my @x{10,20}; @x{20} = 2; say @x{20}; 04:43
p6eval rakudo 624188: OUTPUT«Cannot modify readonly value␤ in '&infix:<=>' at line 1␤ in main program body at line 22:/tmp/5LnoIAmyzu␤»
patch TimToady: i was checking if user-defined array indexing was implemented, S09:461 04:45
diakopter pugs: my @x{10,20}; @x{20} = 2; say @x{20} 04:46
p6eval pugs: OUTPUT«*** Cannot cast into Hash: VRef <Array:0x2b993dc991a1>␤ at /tmp/DVuqxmR_YS line 1, column 1-13␤»
TimToady patch: ah, no, rakudo does almost none of S09 yet 04:47
dalek ar: 17159f3 | pmichaud++ | skel/docs/announce/2010.09:
Add a 2010.09 release announcement draft.
04:50
ar: 81b9fbc | pmichaud++ | Makefile:
Update the Makefile for the 2010.09 release.
05:00 buu_ joined 05:03 buu_ left 05:04 ash_ joined 05:05 buu_ joined 05:09 masak joined, buu left 05:10 buu_ is now known as buu
masak std: my @x.[10,20] = 1,2; say @x[20]; 05:10
p6eval std : OUTPUT«ok 00:01 120m␤»
masak explain again why this is *not* an error, despite what S09:193 says. 05:11
aloha positive: nothing; negative: nothing; overall: 0.
05:11 buubot left 05:12 dju joined
masak aloha: shut. up. 05:12
plobsing aloha - all the stupidity of purl minus most of the utility 05:14
masak it's simple, really. bots shouldn't have commands that trigger on things less specific than their nick. 05:15
in this case, the trigger appears to be /^explain /
that's just reckless.
ash_ explain stuff # just curious 05:18
aloha positive: nothing; negative: nothing; overall: 0.
ash_ aloha: forget stuff
err
aloha: forget explain
maybe?
explain stuff
masak you'd wish.
ash_ o.0
aloha positive: nothing; negative: nothing; overall: 0.
ash_ aww
stupid slow bot
plobsing I think they should be able to absorb without their nick. msg should also be nickless. 05:19
mfollett dang
masak kill it with fire.
ash_ aloha: help you need more brainz
aloha ash_: I don't know anything about 'you need more brainz'.
ash_ stupid zombie bots
05:19 envi joined
mfollett It'd be cool to have a big "Get Rakudo *" button on rakudo.org 05:19
masak #perl6 -- low tolerance of bots, because we love smart bots.
ash_ has anyone made a dmg for Rakudo * yet? 05:20
for OS X?
mfollett if they have it isn't in the downloads
masak haven't heard of any. 05:31
OS X is sufficiently Unix-y for there to be ways already to install Rakudo. so I guess the demand isn't as great as for helpless crippled OSes.
05:32 alester left
masak std: my @values.[10]; 05:34
p6eval std : OUTPUT«ok 00:01 116m␤»
masak error, 'cording to S09.
05:36 buubot joined 05:39 buubot left
dalek ar: 9bd5544 | pmichaud++ | skel/build/Makefile.in:
Add 'make rakudo-spectest' target.
05:42
ar: 210014f | pmichaud++ | skel/build/gen_parrot.pl:
Update gen_parrot for 2.8.0.
ar: 46b57c9 | pmichaud++ | / (2 files):
Update build and announcement.
mfollett Spec tests are now included? That's nice, they are really helpful. 05:44
masak this is lovely -- I can put <aside> in my blog, add a bit of CSS, and it just shows up! strangelyconsistent.org/blog/its-ju...tree-silly
I'm free from the shackles of use.perl.org :)
pmichaud freedom++ 05:45
phenny pmichaud: 28 Sep 22:44Z <[Coke]> tell pmichaud planetsix points to your use.perl URL. Do you have a different one you'd like plugged in?
TimToady well, S09 is kinda wrong to call it an error--it's just a normal subscript with the dot 05:46
the declartor should terminate when it sees a .
*a
masak I can change S09 to be clearer.
TimToady that'd be fine by me 05:47
masak makes it so
TimToady you can fix everything else while you're at it, too :)
masak hah :)
S09:204 actually *is* an error, so it's extra confusing that way.
sorear Good * #perl6 05:48
mfollett Anyone have any advice on things to include in a Perl 6 talk at a developer conference? 05:49
masak greetings, sorear.
pmichaud sorear: o/
mfollett: "Perl 6 is teh awesome!" :-P
masak mfollett: "Perl 6 will replace you with a very small Unicode script!" :P 05:50
pmichaud "Perl 6: Vaporware so strong it induces dizzy spells."
mfollett pmichaud: I'll see if I can't slip that in there
masak: I think that part should be kept a secret for now. 05:51
masak ok. good, good.
mfollett If I have the time I'm thinking of trying to do it in a "choose your own adventure" style, let the audience pick between some sections that would be most interesting. 05:52
LaVolta title: "use »ö«" subtitle: "adventure with a butterfly" # I am throw this out anyway... 05:55
sorear TimToady: I wonder what changed.
masak mfollett: have a look at "A Perl 6 trek for Perl 5 pilgrims" at feather.perl6.nl/~masak/ if you're looking for something that tries to cover the basics of Perl 6 in one session. 05:56
mfollett masak: Why isn't YAPSI listed on perl6.org/compilers/ ?
dalek ecs: e8527c2 | masak++ | S09-data.pod:
[S09] be more clear about what's an error

Two of the three examples marked with "Error" turned out to actually be logical maybe-not-what-I-meant errors. Marked them as such.
mfollett masak: thanks!
masak mfollett: it isn't? must be a conspiracy on the part of the non-official implementations... 05:57
& 05:59
pmichaud Rakudo Star 2010.09 tarball now at github.com/downloads/rakudo/star/ra....09.tar.gz 06:00
I'll send out the announcement messages in a few hours -- a little too tired to do it "right now"
afk for a few hours 06:03
06:03 aloha left 06:04 aloha joined 06:08 wtw joined
sorear TimToady: How does S02:2710 work? Foo::<::Bar><::Baz> # same as Foo::Bar::Baz 06:11
It seems to me like that would be equivalent to Foo::Bar<::Baz>, which is a WHENCE setter 06:12
06:15 kjeldahl joined 06:19 Mahesh_ joined
mfollett t/01-sanity/99-test-basic.t does not pass in the new Rakudo * on my laptop 06:23
06:23 Mahesh_ left
mfollett I get "Invalid typename in parameter declaration at line 47, near " $cond, $d"" 06:24
06:28 hugme left, hatseflats left, dukeleto left 06:29 leprevost left 06:30 kjeldahl left
mantovani guys Perl 6 will have exchange ? 06:41
mfollett nm, looks like pebkac 06:42
mantovani m <-> n ? (t < m;m <- n;n <- m)
06:43 kjeldahl joined, dalek joined, ChanServ sets mode: +v dalek
mantovani 1 + m <-> n ? (t <- m + 1;m <-n;n <- t) 06:44
good to calc fibonacci :P 06:45
masak rakudo: my $a = 1; my $b = 2; ($a, $b) = $b, $a; say $a; say $b
p6eval rakudo 624188: OUTPUT«2␤1␤»
masak mantovani: good enough?
06:45 Util joined 06:46 PerlJam joined
mantovani masak: very nice \o/ 06:46
06:46 dukeleto joined, pmichaud joined, hatseflats joined
masak mantovani: as a bonus, it also works in Perl 5, with an extra set of parens around the rhs :) 06:46
mantovani I know, I'm just kidding.
:)
masak I see. in that case, I'm just kidding too. 06:47
:)
LaVolta i'd rather have an infix:<swap> :-P
mantovani masak: in perl 5 you can't do without the () :( 06:48
my ($b,$a) = foo,bar
perl6++
masak rakudo: sub infix:<swap>($a is rw, $b is rw) { ($a, $b) = $b, $a }; my ($x, $y) = 5, 42; $x swap $y; say $x; say $y 06:49
p6eval rakudo 624188: OUTPUT«42␤5␤»
masak LaVolta: good enough?
mberends :)
mantovani swap ownz
LaVolta masak: in that case, I am just kidding three, btw it's wonderful to have that 06:50
swap as if it's provided by Perl 6
masak soon I have to make a list over who's kidding.
mantovani hahahaha
swap it not so bad to provide by perl 5.xx 06:51
work &
06:54 hatseflats left 06:55 pythonian4000 is now known as pythonian4000afk 06:56 PerlJam left, dukeleto left 06:57 Util left, dalek left, pmichaud left
sorear rakudo: my ($x, $y) = 5, 42; ($x, $y).=reverse; say $x; say $y 06:59
p6eval rakudo 624188: OUTPUT«42␤5␤» 07:00
sorear How's that?
07:00 Guest23195 joined 07:01 mfollett left
masak sorear: wow! 07:03
rakudo: my ($x, $y, $z) = 1, 2, 3; ($x, $y, $z).=rotate; .say for $x, $y, $z
p6eval rakudo 624188: OUTPUT«2␤3␤1␤» 07:04
masak \o/
masak is pleased
LaVolta WHAT! 07:05
masak now do you think Perl 6 is cool? :) 07:08
LaVolta masak: I am not kidding this time...
masak crosses out LaVolta from his list
mantovani karma masak ? 07:09
aloha masak ? has karma of 0.
mantovani karma masak
aloha masak has karma of 10.
masak aloha--
aloha masak: Pbbbbtt!
mantovani masak++
karma masak
aloha masak has karma of 11.
mantovani karma aloha
aloha aloha has karma of -2.
masak aloha--
aloha masak: Pbbbbtt!
masak aloha: and stop doing that.
LaVolta masak++++ 07:10
mantovani karma TimToady
aloha TimToady has karma of 4.
moritz_ good morning
phenny moritz_: 28 Sep 22:45Z <[Coke]> tell moritz_ that robert disabled your 5-to-6 feed as it was borking planetsix.
masak rakudo: my $a; $a++++; say $a
p6eval rakudo 624188: OUTPUT«Cannot modify readonly value␤ in '&infix:<=>' at line 1␤ in main program body at line 7129:CORE.setting␤»
07:10 mberends left
masak rakudo: my $a; ++++$a; say $a 07:10
p6eval rakudo 624188: OUTPUT«2␤»
moritz_ phenny: ask [Coke] in what way did the 5-to-6 feed bork planetsix?
phenny moritz_: I'll pass that on when [Coke] is around.
LaVolta ah... ++++masak works
sorear rakudo: my ($a,$b,$c) = 1,2,3; ($a,$b,$c).=[0,2,1]; say $a,$b,$c; # hey we have a general permutation operator too! 07:11
p6eval rakudo 624188: OUTPUT«===SORRY!===␤Can not use .= on a non-identifier method call at line 22, near "; say $a,$"␤»
sorear bah.
rakudo: my ($a,$b,$c) = 1,2,3; ($a,$b,$c) = ($a,$b,$c).[0,2,1]; say $a,$b,$c;
p6eval rakudo 624188: OUTPUT«132␤»
masak [Coke]: sorry... I borked planetsix a little, I think. the website looks fine, but all my last 10 posts ended up in my feed reader. I'm reasonably sure it was a one-time occurrence.
sorear hello masak, btw 07:12
masak sorear: I agree with the 'bah'. that's a silly restriction.
it will have to go.
07:13 am0c^ joined, LaVolta left, LaVolta joined
mantovani masak: the aloha was write in Perl 6 ? 07:14
was wrote*
masak mantovani: github.com/bacek/aloha
seems there is a Perl 6 version, yes.
oh wait. 07:15
no, that -perl6 suffix must mean 'for #perl6'.
because it's still very much p5.
understandable. p5 still has the lead in bot technology.
07:16 synth left
masak picks up aloha, puts her in a tiny box, and closes the lid 07:16
sorear mantovani: aloha isn't even a #perl6 bot; it was developed for another channel, but I liked what I saw and asked for him to run another connection
masak: nice blog post on yapsi, btw. 07:17
masak the "just a tree" one?
sorear yes
masak thanks.
sorear look for "compilation by transformation:
s/:/"/
mantovani I like purl. 07:18
sorear that's the buzzword GHC uses for their "Optimizing haskell compiler = 6 ILs and dumb-as-a-brick converters between them, nothing to it"
07:18 ruoso left
mantovani purl on irc.perl.org if very pretty 07:18
07:18 buubot joined
masak sorear: I think pmurias has been nosing around those areas. 07:18
07:18 am0c^2 joined
sorear wonders how hard it would be to integerate niecza with ASP.NET 07:19
mantovani aloha: is more beaultiful
:P
masak mantovani: I find purl to be very noisy, insolent, and not always very informative.
mantovani masak: do you know one woman in the world that isn't noisy ? 07:20
:P
mantovani run
s/one/any/
masak mantovani: yes. I know several women that aren't noisy.
mantovani I don't :(
sorear I think gender stereotyping is a banning offense, but I'd like a second opinion.
mantovani is just kidding 07:21
masak I'm trying to give mantovani a few second chances. he might settle down :)
masak hugs mantovani
mantovani is sad now
07:21 am0c^ left
masak mantovani: you're from .ru, right? 07:22
07:22 am0c^2 is now known as am0c
sorear masak: What do you think the right way to do 'GLOBAL::Foo::Bar' using simple runtime lookups is? 07:22
07:22 am0c is now known as am0c^
mantovani masak: what is .ru ? 07:23
sorear .rf?
mantovani I don't know what is it
masak mantovani: .ru is a TLD representing a country.
sorear oh, .ru is right
mantovani russian ?
masak aye.
mantovani no, I'm from north korea
masak oh!
mantovani j/k 07:24
I'm from brazil
masak you had me there for a while, sir.
sorear: I don't know. not sure I see what the issue is.
07:24 Util joined 07:25 dukeleto joined, PerlJam joined
sorear masak: semantic clarification in my mind 07:25
07:25 dalek joined, ChanServ sets mode: +v dalek
sorear S02 says GLOBAL::Foo::Bar = ::GLOBAL::<::Foo><::BAR>, but this is obviously wrong 07:25
07:25 pmichaud joined
masak because...? 07:25
sorear because it simplifies to Foo<::Bar>, which is WHENCE syntax 07:26
masak oh.
I can tell already that you've thought about this more than I have.
I usually come in at the point where people have a prototype implementation. and I break it. 07:27
sorear Didn't you commit Tags.pm?
masak no, Tene did. 07:28
mantovani: I can see you on Twitter.
mantovani masak: how ? there a lot of mantovani's on twitter. 07:29
masak mantovani: twitter.com/mantovanidaniel/status/25861714691
mantovani lol
masak: is dark magician
07:30 Juerd joined
sorear currently, I lean towards GLOBAL.WHO<::Foo>.WHO<::Bar> 07:30
but those WHO itch
masak sorear: doesn't look the height of elegance, no.
mantovani masak: twitter.com/masak is you ?
masak mantovani: no. keep looking. 07:31
mantovani: I'm not Japanese.
sorear Really?
LaVolta cmask or some id else...
masak surprises for everyone today!
sorear masak: This is just a compiler issue; the user will be using Foo::Bar or $::("Foo::Bar")
well, not $::
masak sorear: yes, I understand. 07:32
mantovani masak: you didn't put your irc name... by this away is hardly.
07:32 ruoso joined
LaVolta mantovani: well not cmasak, carlmasak 07:32
i figured that out for ya 07:33
mantovani twitter.com/carlmasak
LaVolta++
masak I suppose we're even now.
mantovani :P 07:34
LaVolta LaVolta-- # not appliable here
07:34 hatseflats joined
LaVolta still fighting with p5's FCGI.pm :( 07:35
07:37 am0c^ left 07:38 justatheory left
sorear waits for TimToady to show up ... 07:40
07:44 tadzik joined 07:58 qwebirc34285 joined
mantovani masak: I can use this bot to give +o in the channels ? 07:59
canI use*
masak mantovani: to a first approximation, no. 08:00
mantovani :(
sorear giving +o with bots is to a first approximation against freenode policy 08:02
mathw Since they provide decent services, it's not at all necessary either. Hurrah for decent services! 08:03
(good morning, #perl6)
08:04 am0c^ joined
moritz_ indeed; chanserv is there for providing +o bits 08:04
masak freenode++
sorear chanserv also has good support for stealth mode 08:05
08:12 am0c^2 joined 08:24 timbunce joined
masak maybe sleeping will work better now. see you in a while, #perl6. 08:26
08:26 masak left 08:28 dakkar joined 08:41 Trashlord left 08:42 wamba joined, wamba left, wamba joined 08:45 wamba left, wamba joined, wamba left 08:46 wamba joined, mavrc joined 08:49 qwebirc39902 joined, qwebirc34285 left 08:53 pythonian4000afk is now known as pythonian4000 08:58 am0c^2 left, am0c^ left 09:22 ruoso left 09:34 fod left 09:35 Sarten-X left 09:36 ruoso joined 09:38 jest joined 09:40 Intensity left 09:42 Sarten-X joined 09:44 Intensity joined 09:53 Mowah joined 09:56 daxim joined 09:58 mavrc left 10:04 Trashlord joined 10:06 ruoso left 10:09 QinGW left 10:10 ggoebel joined 10:12 Intensity left 10:15 Intensity joined 10:19 mavrc joined 10:21 LaVolta left 10:28 Intensity left 10:30 Intensity joined 10:32 zby joined 10:41 Siddy joined 10:42 tadzik left 10:43 Trashlord left 10:47 Trashlord joined 10:49 Siddy left 10:54 Mowah left 11:01 ggoebel left 11:03 ggoebel joined 11:04 ggoebel left 11:15 mavrc left 11:29 am0c^ joined 11:36 satyavvd left 11:43 sftp joined 11:50 agentzh left 11:55 masonkramer left, masonkramer joined 11:56 sftp_ joined 11:57 sftp left 12:04 sftp joined, sftp_ left
bbkr std: :: # what this code is supposed to do? 12:05
p6eval std : OUTPUT«ok 00:01 114m␤»
moritz_ bbkr: how does it parse?
bbkr: pipe it through viv, maybe it gives you some idea
bbkr rakudo: :: # curious 12:06
p6eval rakudo 624188: OUTPUT«===SORRY!===␤ResizablePMCArray: Can't pop from an empty array!␤»
bbkr hmm, PMC arrays should not be visible in Rakudo error messages, right? 12:07
moritz_ right
bbkr i'll report to RT and and check viv later (don't have it installed right now) 12:09
12:09 PhatEddy joined
moritz_ I think there's a similar error in RT already; not sure though 12:10
bbkr i reported similiar $?::, but that was other way - parsed in Rakudo and fails in STD 12:11
will there be september Star release? 12:13
12:15 mj41 joined
moritz_ yes 12:17
PhatEddy I see a 2010.09 named file in github.com/rakudo/star/downloads as of now ... 12:18
bbkr \o/ added yesterday
12:20 bluescreen joined 12:27 vdrab joined 12:29 masak joined 12:32 ggoebel joined 12:33 plainhao joined 12:38 p6eval joined, ChanServ sets mode: +v p6eval
moritz_ star: say "I'm new" 12:38
p6eval star 2010.09: OUTPUT«I'm new␤»
masak \o/ 12:39
moritz_++
dalek albot: dba2a5f | moritz++ | evalbot.pl:
use star 2010.09
12:40
jnthn moritz_++ # you're a star!
moritz_ pmichaud++ is the star 12:42
masak ☆☆☆pmichaud☆☆☆ 12:44
Grimnir_ star: ....WHAT.say 12:52
p6eval star 2010.09: ( no output )
Grimnir_ star: sub crap () { ... }; crap().WHAT.say 12:53
p6eval star 2010.09: OUTPUT«Failure()␤»
Grimnir_ star: sub crap () { ... } crap().WHAT.say
p6eval star 2010.09: OUTPUT«===SORRY!===␤Confused at line 22, near "sub crap ("␤»
moritz_ need a semicolon after } 12:54
Grimnir_ because there is no newline in between?
moritz_ right
Grimnir_ ok
moritz_ p6 is a bit more whitespace sensitive than p5
Grimnir_ nice
masak p6 is a bit more sensitive with everything than p5. :) 12:56
12:58 wamba left 12:59 synth joined
PhatEddy make spectest_smolder currently relies on both perl and UNIXish shell to send the smolder report. One can cut out the dependency on shell with p6. Any interest? 13:00
causes trouble on win32 13:01
moritz_ PhatEddy: yes, please cut out the shell dependency
we need perl5 for configuring Rakudo anyway
PhatEddy I could use perl6 ... 13:02
perl6 -e "my $commit = qqx!git log -1 --pretty=format:%H!; run qq!curl -F architecture=i386 -F platform=MSWin32 -F revision=$commit -F report_file=@rakudo_test_run.tar.gz -F username=parrot-autobot -F password=qa_rocks smolder.parrot.org/app/projects/pro...report/5!"
13:03 jest left
moritz_ PhatEddy: wfm... would you write a patch? 13:03
PhatEddy: I fear that double quotes and $ don't go well together on linux
better add another filer
*file
flussence er... wouldn't the @ in there break? 13:04
PhatEddy It worked when I tested it ... 13:05
flussence oh well... if it works, it works.
PhatEddy I'll keep working on it and maybe use Configure.pl, which detects Win32, to handle the linux/win issue. Maybe a patch soon ...
flussence I've rewrote the line to avoid using ! and $, might be useful: 13:11
qqx[git log -1 --pretty=format:%H].fmt(qq[curl -F architecture=i386 -F platform=MSWin32 -F revision=%s -F report_file=@rakudo_test_run.tar.gz -F username=parrot-autobot -F password=qa_rocks smolder.parrot.org/app/projects/pro...report/5])
(but then I don't know if cmd.exe plays nice with ([]) inside double quotes...)
PhatEddy my p6 is not avail right now but I just tested with cmd.exe and p5 and guessing should be ok. 13:15
13:18 Patterner left
masak Perl has a chance to "redevenir sexy avec le noveau Perl 6": twitter.com/CoupsDePouce/status/25870437003 13:29
13:29 Psyche^ joined 13:30 Psyche^ is now known as Patterner
jnthn redevenir = redefine? 13:31
masak "re-become"
jnthn aha
:-)
masak I wonder if outsiders who think that Perl 6 will "save Perl" in that particular way will eventually reject Perl 6 because it is "still Perl"... or if they will do like I did, and start discovering Perl 5 for real. 13:33
13:36 icwiener joined, satyavvd joined, Italian_Plumber joined 13:37 sftp left, sftp joined 13:39 timbunce left 13:41 tadzik joined
tadzik good afternoon #perl6 13:42
slavik afternoon?! it's morning 13:43
:P
13:44 mfollett joined
tadzik :) 13:44
lies! pmichaud will probably come in a few hours and say „good morning”
13:45 vdrab_ joined 13:47 sftp left, vdrab left, vdrab_ is now known as vdrab, sftp joined
Grimnir_ star: sub f ($a, $b, $c) { my $d = $b*3-$a; return $d if $b > $c; return $d, f($b, $d, $c) }; for f(1,1,200) Z f(0,1,200) -> $one, $two { print "$one $two " } 13:49
p6eval star 2010.09: OUTPUT«2 3 5 8 13 21 34 55 89 144 233 377 610 987 »
13:50 mfollett left
[Coke] masak: eh, that's not broken, that's just repetitive. 13:52
phenny [Coke]: 07:10Z <moritz_> ask [Coke] in what way did the 5-to-6 feed bork planetsix?
masak [Coke]: oh phew. anyway, it probably won't happen again. 13:53
[Coke] msg moritz_ : no clue. here's the message in backscroll for ya. 13:54
# Disabled by robert 8/21/2010 because our software is complaining
# because this blog shares many components with his perl-6 blog above.
# It probably needs a new <title> or <link>
masak star: .say for 2, 3, * + * ... * 13:55
p6eval star 2010.09:
..OUTPUT«(timeout)3␤21␤34␤55␤89␤144␤233␤377␤610␤987␤1597␤2584␤4181␤6765␤10946␤17711␤28657␤46368␤75025␤121393␤196418␤317811␤514229␤832040␤1346269␤2178309␤3524578␤5702887␤9227465␤14930352␤24157817␤39088169␤63245986␤102334155␤165580141␤267914296␤433494437␤701408733␤1134903170␤1836311903␤297121…
Grimnir_ aaah, that's what I was looking for
masak suspected that :)
Grimnir_ very nice
13:56 zby_ joined, zby left 13:57 zby_ left
Grimnir_ star: .say for 1,2, * + * ... *> 200 13:57
p6eval star 2010.09: OUTPUT«1␤2␤3␤5␤8␤13␤21␤34␤55␤89␤144␤233␤»
Grimnir_ I suspected that I could use something with * + *, but I didn't quite succeed
that's so cool
omg, I can't even imagine what cool stuff could be made with that 13:58
14:00 walfisch joined 14:01 walfisch left 14:02 walfisch joined, walfisch left
Grimnir_ star: .fmt("%d").say for 0,1, * + * ... *>10**10 14:04
p6eval star 2010.09:
..OUTPUT«0␤1␤1␤2␤3␤5␤8␤13␤21␤34␤55␤89␤144␤233␤377␤610␤987␤1597␤2584␤4181␤6765␤10946␤17711␤28657␤46368␤75025␤121393␤196418␤317811␤514229␤832040␤1346269␤2178309␤3524578␤5702887␤9227465␤14930352␤24157817␤39088169␤63245986␤102334155␤165580141␤267914296␤433494437␤701408733␤1134903170␤1836311903␤…
Grimnir_ star: .fmt("%d").say for 2,3, * + * ... *>10**10
p6eval star 2010.09:
..OUTPUT«2␤3␤5␤8␤13␤21␤34␤55␤89␤144␤233␤377␤610␤987␤1597␤2584␤4181␤6765␤10946␤17711␤28657␤46368␤75025␤121393␤196418␤317811␤514229␤832040␤1346269␤2178309␤3524578␤5702887␤9227465␤14930352␤24157817␤39088169␤63245986␤102334155␤165580141␤267914296␤433494437␤701408733␤1134903170␤1836311903␤297121…
Grimnir_ ooh, nice 14:05
14:10 Guest23195 left
Grimnir_ star: my @fib = 0,1, * + * ... *; @fib.WHAT.say 14:12
14:12 qwebirc39902 left
p6eval star 2010.09: OUTPUT«(timeout)» 14:12
colomon Grimnir_: that won't work because it will try to assign the entire infinite sequence item by item to @fib
star: my @fib := 0,1, * + * ... *; @fib.WHAT.say
p6eval star 2010.09: OUTPUT«List()␤»
colomon star: my @fib := 0,1, * + * ... *; @fib{^4}
Grimnir_ ah, right
p6eval star 2010.09: ( no output ) 14:13
colomon star: my @fib := 0,1, * + * ... *; @fib[^4]
p6eval star 2010.09: ( no output )
tadzik ENOSAY
colomon star: my @fib := 0,1, * + * ... *; say @fib[^4]
p6eval star 2010.09: OUTPUT«0112␤»
Grimnir_ star: 0,1, * + * ... *.WHAT.say 14:14
p6eval star 2010.09: OUTPUT«Whatever()␤»
colomon precedence
Grimnir_ star: 0,1, * + * ... *[^10].fmt("%d", " ").print
colomon that's the same as
p6eval star 2010.09: OUTPUT«Method 'fmt' not found for invocant of class 'Whatever'␤ in <anon> at line 2613:CORE.setting␤ in 'Any::join' at line 1␤ in 'List::fmt' at line 2613:CORE.setting␤ in 'Iterable::fmt' at line 3677:CORE.setting␤ in main program body at line 22:/tmp/lwMF7pirZT␤»
colomon star: 0,1, * + * ... (*.WHAT.say)
Grimnir_ star: (0,1, * + * ... *[^10]).fmt("%d", " ").print
p6eval star 2010.09: OUTPUT«Whatever()␤»
star 2010.09: OUTPUT«(timeout)» 14:15
Grimnir_ star: (0,1, * + * ... *)[^10].fmt("%d", " ").print
p6eval star 2010.09: OUTPUT«0 1 1 2 3 5 8 13 21 34»
colomon star: (0,1, * + * ... *)[^10].join.say
p6eval star 2010.09: OUTPUT«0112358132134␤»
colomon star: (0,1, * + * ... *)[^10].join(' ').say
p6eval star 2010.09: OUTPUT«0 1 1 2 3 5 8 13 21 34␤»
14:16 aloha left
Grimnir_ is a fan 14:16
14:16 timbunce joined 14:19 aloha joined 14:21 am0c^ left, orafu joined 14:27 tadzik left 14:29 pnu joined 14:31 zby joined 14:34 zulon joined 14:38 lucs joined
PerlJam is reading through yesterday's #phasers. 14:47
very interesting stuff.
14:51 ash_ left 14:52 mfollett joined 14:53 wtw left, mod_cure joined 14:54 justatheory joined, vdrab left 14:56 vdrab joined
PerlJam jnthn, pmichaud: has anyone talked with the parrot folks about what you intend to do wrt NQP and the object model? Just in a heads-up sort of way. 14:57
15:02 satyavvd left
TimToady the general direction has been discussed on the phone calls 15:04
jnthn PerlJam: I think the roadmap pmichaud++ mentioned writing is probably helpful to have first, so there's something concrete to talk about.
TimToady: That's good to know.
PerlJam jnthn: just checking because I have sensed some frustration in the past about rakudo implementing rounder wheels than parrot could provide and it sounded like most a communication issue (i.e., they weren't in on the conversation enough) 15:05
TimToady well, fact is, parrot would like rounder wheels in the long run too 15:06
so the view from the parrot side of the fence is that p6 is prototyping some of the new core down the road 15:07
to go with lorito, say
masak the message I sense from Parrot is "just tell us what you need from us". and prototyping things on the Rakudo level is one way of doing that. 15:11
15:12 mavrc joined
slavik as far as the spec is currently implemented by Rakudo*, is any of that expected to change? 15:13
TimToady well, we hope they implement more of it in the future :)
masak slavik: if history is any guide, then yes, some things that Rakudo already implements will change. 15:14
colomon that certainly has happened just in the last month...
slavik TimToady: I mean if it's expected for the spec that is already implemented to change ...
and to be more specific, if it's expected to change drastically. 15:15
TimToady depends on what you think is "drastic". most of what we're doing is really just tweaking
slavik TimToady: the =$*IN change to what it is now I consider to be drastic 15:16
I have no idea what it is now
pmichaud good morning, #perl6
colomon \o
masak $*IN.get
TimToady o/
slavik needs to start messing with Perl6 again
oh, that's not drastic then
I though it changed completely ... >.>
my bad :P
masak it's fairly drastic, considering for how long it had been = 15:17
TimToady we rename operators and functions from time to time
masak lots of blogs posts and docs invalidated in one swell foop...
slavik ok
masak: yeah, I am afraid of that :P
masak s/gs/g/
pmichaud oops, I forgot to mention the .pick/.roll changes in the release announcement :-|
TimToady for instance, "slice" is now "lol" (list of lists), but since nobody implemented them yet, it's no big deal
masak slavik: but I was there when the change happened, and I see why it did. 15:18
slavik I also found my grammar example not working, but that was written way back with parrol 0.8.4 and whatever version of rakudo was around at the time.
colomon masak: to be fair, the = change was over a year ago.
masak colomon: some of us had lots of code that needed updating a year ago as well :P
slavik colomon: that was the last time I was actually messing with perl6
TimToady indeed, it was obvious as soon as szabgab++ tried to teach it that prefix:<=> had to die, and that was in Oslo 15:19
masak nod
TimToady slavik: you will now find that it is relatively pleasant to develop in Perl 6
masak add to that that prefix:<=> had other problems related to item/scalar context.
er, item/list context.
slavik TimToady: nice 15:20
15:20 am0c^ joined
slavik I like Perl6 mostly because of Parrot 15:20
write a library in one language, compile it to pbc and then any language can use it :D
star: say 2 ** 64
p6eval star 2010.09: OUTPUT«1.84467440737096e+19␤»
slavik but that annoys me :(
TimToady yes, well, parrot provides a nice set of lego bricks, and if you problem happens to match them, it works pretty well 15:21
but Perl wants to be a glue language, not just a lego language 15:22
slavik TimToady: problem is: sometimes they don't align how I want them to :(
pmichaud if the legos get hot enough, they can act like glue :-)
slavik pmichaud++
15:23 ruoso joined
masak .oO( IR legos? ) 15:23
TimToady people don't generally like it when you blowtorch their legos though...
slavik TimToady: depends ... 15:24
gfldex
.oO( how fast would a parrot fly when set on fire? )
slavik TimToady: kids like it if you build a house and let them pretend they are a meteor ;)
masak gfldex: African or European?
pmichaud that's a good name for a parrot release: "Flaming Parrot" :-P
slavik but how could it carry a coconut?
pmichaud and if it's on fire, does it become a phoenix? ;-)
masak maybe two parrots carry it on a string between them. 15:25
slavik pmichaud: and in that case, will a new parrot be born from the ashes?
TimToady depends on how many fjords it pines for
masak I think I will call it... Phenito!
gfldex flaming parrot is quite pretty: www.vogelvry.com.au/index.php?main_...ucts_id=33 15:26
pmichaud oh, too late
0.1.2 2005-Mar-06 "Phoenix"
masak call it "Firebird", then :P
and then something like "Ice Marmot".
gfldex you can trust the renaming part to debianists :-> 15:27
masak and then "LibreParrot"
wow, social commentary through paraphrasing code names. :P 15:28
15:29 zulon left
masak what'd happen if someone attempted the eskimo operator in a Perl 6 equipped with a functioning YOU_ARE_HERE? 15:30
perl6 -ne '}{print $*IN.ins'
perl6 -ne '}{say $*IN.ins'
TimToady hopefully won't work. The setting is supposed to be pre-compiled, and the OUTER is abstract, not done with text munging 15:32
masak ok. 15:33
15:35 patspam joined, patspam left
pmichaud TimToady: what's your leaning on...? my $x = *; say $x.elems; 15:35
15:35 vdrab left
masak Perl 5 -a autosplits into @F. S19 says -a combs and puts the resulting fields in @_. why @_? feels like a step backwards. 15:36
15:36 Guest23195 joined
TimToady pmichaud: Inf seems the most likely to turn out useful someday 15:37
but I don't really see much of a use case one way or another 15:38
pmichaud oh, I was thinking of it in reference to ,*
and having that act like an infinite sequence of whatevers 15:39
(and yes, I agree Inf seems natural somehow.)
TimToady well, ** is supposed to be an infinite sequence of *
pmichaud oh, is that new? did I miss something?
TimToady ** has been there from the start
pmichaud oh, yes, hyperwhatever 15:40
masak ** is an infinite sequence of *, separated by semicolons, right? 15:41
TimToady ** has a type of LoL, in more recent terms
pmichaud if .elems returns Inf, then would .[$n] always return a Whatever?
or, more directly .... 15:43
say (5,6,7).[2]; # 7 15:44
say (5,6,7).[4]; # Any
say (5,6,7,*).[4]; # ???
TimToady we used to say that 7,* would be the same as 7 xx *
[Coke] TimToady> the general direction has been discussed on the phone calls - note that there appears to be little communication between the people on the phone calls and people on the board/in parrotsketch. 15:45
masak I thought * was only magical that way on the rhs of a smartmatch.
pmichaud in the dwimmy hypers -- yes, 7,* was the same as 7 xx *
I'm not sure it was more general than that.
masak I'm not sure I would like it to be.
[Coke] but jnthn is in #parrot usually, so I'm not terribly worried. 15:46
masak rampant magic considered harmful...
TimToady we should perhaps leave * as a scalar value, and use ** to mark an infinite list 15:49
since it already implicitly means * xx *
pmichaud well, I see a difference between a list of * and a LoL of * 15:50
TimToady ** is probably not really LoL
more like (*),(*),(*)... 15:51
pmichaud I'd be fine with having ** mean infinite list of *
TimToady but maybe not, if it has to imply semicolons
pmichaud but yes, we might still need the infinite lol of *
fwiw, I still like the notion that @a[@list,*] implies a "clip" on @list to the indexes of @a. 15:53
TimToady oh, but subscripts are slicey, and ** binds a list of args argly, not flatly, so (*),(*),(*) would do the right thing
15:53 am0c^ left
pmichaud I could accept that @a[@list,**] does the same thing.... but then ** doesn't feel like the slicey form somehow. maybe it is. 15:54
TimToady it feels wrong there to me
if subscripts will interpret ** as slicey
pmichaud yes
I agree
and, fwiw, it doesn't seem at all necessary for ,* to act like * xx * in order to get the infinities to work out.... I was just musing that it might. 15:55
my preliminary implementation of ,* as the infinite list marker didn't seem to pose any real difficulties, other than I wasn't sure how subscripting the parcel would work 15:56
TimToady don't see much of a use case though, unless 1,2,3,*,*,* Zop <a b c d e f> does something with * op f
15:56 am0c^ joined
TimToady which it doesn't, since we made *-currying compile time 15:56
[Coke] wonders if he has worst $dayjob language. 15:57
TimToady I also don't like making final star mean "repeat the whole list", since that would imply remembering it
those semantics are fine for dwimmed hyperops, but there you generally have the whole structure to repeat anyway 15:58
for general lists, that's potentially a space leak
15:58 risou joined
TimToady repeat the final element forever is the first semantics we came up with for 1,2,3,* 15:58
PerlJam what precipitated ,* anyway? 15:59
pmichaud PerlJam: I want to have a way to indicate that the result of a gather/take is infinite
TimToady @foo[mumble()] # does this trim the list when it runs off the end
pmichaud so that mostly eager operations can pause reification instead of proceeding to the heat death of the universe 16:00
TimToady the nice thing about repeat-last is that it gives us a way to write @foo,* and repeat the final element of @foo
without having to pop it and xx it
PerlJam pmichaud: Inf says "infinite" a lot better than * does :)
TimToady and arguably that is just as useful as * xx *
Inf is numeric
and isn't supposed to be dwimmy, except insofar as infinity has to be always... 16:01
PerlJam Sure, but what about something like *Inf* ?
16:01 baux joined 16:02 mod_cure left
PerlJam or something else that combines the * and Inf 16:02
masak *really* infinity? :)
TimToady * already implies Inf in lots of places, or at least "arbitrarily large"
pmichaud for the infinite gather case, having ,* retain its "repeat last" or "repeat list" meaning doesn't seem to pose a problem for me
PerlJam perhaps I focus too much on "infinity"
16:03 bbkr left
pmichaud for the clipping subscripts case... that's not quite so obvious. 16:03
TimToady I think I prefer "repeat last" just because it gives us functionality that is not easily reproducible with other constructs 16:04
pmichaud I hadn't realized that ,* meant "repeat last/list" outside of the dwimmy hyper
TimToady and I druther have xx * to explicitly say "yes, keep the whole stinkin' list around so you can repeat it"
pmichaud does ,* still mean "repeat list" in the dwimmy hyper, then?
PerlJam TimToady: then how do I repeat the last N items? :)
TimToady hypers aren't primarily for lists 16:05
16:05 Ross joined
TimToady PerlJam: parentheses are your friend 16:05
16:07 jferrero joined
pmichaud hmmmm 16:08
TimToady S03:4284
repeat-final is already specced
pmichaud yes, but there's a contradiction
TimToady repeat all is only for when you run out of list 16:09
on the dwimmy side of »
and ,* never runs out of list
pmichaud oh, I'm misreading. you're correct.
TimToady++
so, are we saying that S03:4284 would generalize to parcels treated as lists? 16:10
i.e., (1,2,3,*) would act like (1,2,(3 xx *)) ?
(in list context)
TimToady yes, that was the original intent of ,*
pmichaud okay
TimToady these days we might write it as @array, -> $prev { $prev } ... * 16:11
pmichaud we should rephrase that "For any kind of zip or dwimmy hyper operator..." part, then
TimToady yes, that's probably over-specified 16:12
pmichaud I was reading it as an over-specification
16:12 thundergnat joined
TimToady I think ,* is probably recognized syntactically 16:12
pmichaud oh, I wasn't planning to do it syntactically, but I suppose that can work.
TimToady it seems useful to factor it out so the run-time doesn't have to keep checking for it, and we can just label the parcel 16:13
pmichaud it's not something that gets checked frequently
it's only when the parcel is used in list context -- i.e., when we iterate the parcel
TimToady but the optimizer might like to know it too 16:14
pmichaud agreed
16:14 orafu left
pmichaud and I suspect we don't want my $x = *; (1,2,3,$x) to imply "repeat the 3" 16:14
thundergnat Are hashes no longer guaranteed to not be in any particular order?
TimToady yes, it feels syntactic/linguistic to me
when were they ever? 16:15
pmichaud I may do it semantically to begin with (easier) while I figure out how to do it syntactically
TimToady oh, extra not
thundergnat star: my %h = 'a'..'e' >>=>>> (1..5).roll;%h>>.say;
p6eval star 2010.09: OUTPUT«a 5␤b 5␤c 5␤d 5␤e 5␤»
PerlJam TimToady: double negative
thundergnat my %h = 'a'..'e' >>=>>> (1..5).roll;%h>>.say;
16:15 avuserow joined
thundergnat comes up the same every time on R*09 16:15
TimToady code that relies on hash ordering is erroneous, unless you are using a known hash type that guarantees it
and the built-in hash type doesn't
pmichaud hashes are never guaranteed to be random, no. 16:16
thundergnat Look at my example. it ALWAYS returns the same order.
PerlJam thundergnat: don't rely on implementation details.
pmichaud thundergnat: that's just coincidence then
thundergnat I don't WANT it to be in order, it IS>
pmichaud thundergnat: if you don't want it in order, you have to randomize it 16:17
thundergnat 20 times in a row?
pmichaud Perl doesn't say *anything* about ordering of hashes other than they aren't guaranteed to be ordered
PerlJam thundergnat: so ... is this a bug report? :)
thundergnat R*07 reliably returned random orders.
pmichaud Perl doesn't say that they cannot be ordered
PerlJam thundergnat: again, don't rely on implementation details.
thundergnat PerlJam: my feeling is yes.
pmichaud and Perl definitely doesn't say that each run should produce a different ordering
masak it's not a bug. 16:18
TimToady the fact that it's reproducable *might* indicate that a denial-of-service attack is possible, but that depends on the implementation
masak as pmichaud+PerlJam say, don't rely on implementation non-specifiedness.
TimToady if it's implemented as a balanced tree, then no
if it's implemented with hash buckets, then probably yes, it's suboptimal 16:19
thundergnat I just thought it was wierd that I was building fairly large hashes and they would aways return items in the order it was built. 16:20
pmichaud star: my %h = 'a'..'z' >>=>>> 5; %h>>.say;
p6eval star 2010.09: OUTPUT«a 5␤b 5␤c 5␤d 5␤e 5␤f 5␤g 5␤h 5␤i 5␤j 5␤k 5␤l 5␤m 5␤n 5␤o 5␤p 5␤q 5␤r 5␤s 5␤t 5␤u 5␤v 5␤w 5␤x 5␤y 5␤z 5␤»
pmichaud that is weird.
I wonder if something changed in Parrot's hash algorithms that is causing it to preserve order
TimToady maybe it's hashing everything to one bucket to pre-pessimize :)
pmichaud I know there were a lot of parrot hash changes recently
thundergnat not necessarily a problem since I know no to rely on it, just... wierd. 16:21
colomon star: my %h = ('a'..'z').reverse >>=>>> 5; %h>>.sa
p6eval star 2010.09: OUTPUT«Method 'sa' not found for invocant of class 'Pair'␤ in main program body at line 22:/tmp/qe_eOqieci␤»
colomon star: my %h = ('a'..'z').reverse >>=>>> 5; %h>>.say
p6eval star 2010.09: OUTPUT«z 5␤y 5␤x 5␤w 5␤v 5␤u 5␤t 5␤s 5␤r 5␤q 5␤p 5␤o 5␤n 5␤m 5␤l 5␤k 5␤j 5␤i 5␤h 5␤g 5␤f 5␤e 5␤d 5␤c 5␤b 5␤a 5␤»
rokoteko Ah. there it is. www.cs.rice.edu/~scrosby/hash/Crosb...ixSec2003/ .. including a real-life perl5 example.
TimToady maybe parrot has the DoS built-in now 16:22
colomon thundergnat++
pmichaud I'll file a report about it with Parrot, so they can look. 16:24
(after confirming that Parrot is indeed preserving hash ordering) 16:25
star: my %h = (<a b c d> X <1 2 3 4>) >>=>>> 5; %h>>.say; 16:26
p6eval star 2010.09: OUTPUT«a 5␤1 5␤2 5␤3 5␤4 5␤b 5␤c 5␤d 5␤»
pmichaud star: my %h = (<a b c d> X~ <1 2 3 4>) >>=>>> 5; %h>>.say;
p6eval star 2010.09: OUTPUT«a1 5␤a2 5␤a3 5␤a4 5␤b1 5␤b2 5␤b3 5␤b4 5␤c1 5␤c2 5␤c3 5␤c4 5␤d1 5␤d2 5␤d3 5␤d4 5␤» 16:27
16:27 masak left
pmichaud star: my %h = (<a b c d> X~ <1 20 3 400>) >>=>>> 5; %h>>.say; 16:27
p6eval star 2010.09: OUTPUT«a1 5␤a20 5␤a3 5␤a400 5␤b1 5␤b20 5␤b3 5␤b400 5␤c1 5␤c20 5␤c3 5␤c400 5␤d1 5␤d20 5␤d3 5␤d400 5␤»
pmichaud star: my %h = (<aaa bb c d> X~ <1 20 3 400>) >>=>>> 5; %h>>.say;
p6eval star 2010.09: OUTPUT«aaa1 5␤aaa20 5␤aaa3 5␤aaa400 5␤bb1 5␤bb20 5␤bb3 5␤bb400 5␤c1 5␤c20 5␤c3 5␤c400 5␤d1 5␤d20 5␤d3 5␤d400 5␤»
16:27 pyrimidine joined
pmichaud definitely looks ordered. 16:27
16:28 thepler left
thundergnat Heh. maybe that should be added as a new type: ordered hash (joking) 16:29
pmichaud Parrot does have an OrderedHash type already. 16:30
thundergnat Oh... Thought I was being clever. sigh. 16:31
Juerd Ordered hashes are great for bug-by-bug compatibility with some other languages
e.g. PHP-code can be untranslatable without it.
PerlJam maybe someone mistakenly crossed wires between normal hashes and ordered hashes. (or maybe the new hash stuff orders as an implementation detail)
pmichaud yes, I've often relied on PHP's ordered hash semantics.... they can be useful.
thundergnat I don't know much (anything) about the Parrot internals.
Juerd thundergnat: Heh. Eat some magic cookies and you'll know. 16:32
thundergnat woohoo!
cookies!
Juerd Parrot magic cookies.
I still don't really understand what PMC's are about but I love the name. 16:33
pmichaud somewhere I think they were re-christened into "PolyMorphic Containers".... but I think that's just a hallucination :-P
probably from consuming too many magic cookies
or getting a cookie with not enough magic in it
Juerd That seems oddly specific to a single religion ;)
PerlJam heh 16:34
you know, I've never thought about it much, but it seems parrot has two object systems (at least). PMCs and then the "real" object system built on top of PMCs 16:35
TimToady
.oO(Legos, and things built out of Legos)
pmichaud PerlJam: you're correct. And that's been a frequent pain point for Rakudo.
especially since the "real" object system adds a lot of overhead in bringing the "native types" into it. 16:36
TimToady
.oO(You can build *anything* out of Legos if you try hard enough...)
.oO(except for more Legos)
16:38
PerlJam I think a kiln would need some highly specialized legos to be realizable.
jnthn pmichaud: Part of the frustration is that they *are* different, but rather than persuing the "yes they're different, let's make the division clear and have an implementation of the same API done by both", the path has more been to try and pretend they're the same thing.
16:39 baux left
PerlJam jnthn: is pretending on the way to actually making them the same thing? 16:39
jnthn Either they have to *really* be the same, or they have to be treated as two implementations of a MOP of some kind, which communicate over some API.
PerlJam hasn't really kept up with parrot
jnthn PerlJam: I suspect being half way between the two options is about the worst position. 16:40
16:40 pythonian4000 is now known as pythonian4000afk
pmichaud to me, the Proxy PMC is a source of frustration -- especially for the memory/speed costs it imposes 16:41
PerlJam in this light, I've suddenly become really pessimistic about the chances of parrot learning from 6model
pmichaud PerlJam: actually, I'm fairly optimistic about it
basically, 6model says "here's what a good object system would look like.... why don't you adopt it?"
PerlJam pmichaud: you think parrot will grow a good API ?
pmichaud given the regularity of 6model's API, it might. 16:42
iiuc, 6model doesn't require a bunch of specialized opcodes (i.e., other APIs) in order to work.
16:42 cdarroch joined, cdarroch left, cdarroch joined
TimToady I think maybe the future is unevenly distributed to the parrot team ;) 16:42
pmichaud it's pretty self-consistent on a single API
PerlJam I'm thinking the momentum of PMCs and pretending (and deprecation policy) might be enough that parrot doesn't change course easily and we end up with a wreck in the medium term with a chance of something good in the long term. 16:44
But ... I can't see too far ahead.
jnthn I'm happy for 6model to be adopted by the Parrot team, but I'm in no hurry at all for it to be integrated into core.
16:45 standz joined
TimToady sorear: yes, the Foo/Bar example is fubar 16:45
jnthn (Because then it becomes subject to deprecation policy, plus I can't as easily exert architectural authority on it.)
pmichaud my guess is that the primary mechanism one gets to 6model is via nqp (and vice-versa... if you're using nqp you're using 6-model)
jnthn pmichaud: I'm more comfortable with that being the long term. 16:46
pmichaud well, it's more short-term if we note that a 6model-based nqp doesn't integrate with existing PMCs quite so nicely. 16:47
(as it does now)
in some sense it depends on how we manage the operators
16:48 PhatEddy left
jnthn The longer Parrot's nqp-rx stays away from making them Perl 6 multi-subs, the longer it'll be divergent from 6model implementations pretty much everywhere else. 16:48
pmichaud well, I'd prefer that the operators never be multisubs 16:49
jnthn ...is there (more)? :)
pmichaud somehow nqp has traditionally been lower level than that -- i.e., the operators translate to opcodes at the vm level 16:50
thundergnat back to work, later #perl6
jnthn Do we emit add $P0, $P1, $P2 style things?
pmichaud no
16:50 thundergnat left
pmichaud not presently. we could, yes. 16:51
jnthn OK, so we essentially unbox, add, box.
pmichaud right.
jnthn That's much more the right approach, imo.
pmichaud wfm, then.
jnthn In 6model on .Net, that's what the multi-candidates do. 16:52
pmichaud if we do add $P0, $P1, $P2 it relies upon $P1 having a addition vtable
jnthn Right.
pmichaud and a lot of pmcs don't have that.
so yes, I want nqp's addition operator to enforce numeric context on its operands and do the addition, not to multidispatch among a set of addition subs 16:53
jnthn I'm not going to push operators being multis in nqp-rx on Parrot too hard at the moment, anyway. (more)
I think we may want to do that for performance reasons later though. 16:54
16:54 dakkar left
pmichaud I think that that level of performance perhaps belongs to the higher-level language. 16:54
and not to NQP itself.
or that if you want a multi-dispatched +, you do an actual sub call and not rely on the operator 16:55
i.e., &infix:<+>($a, $b) # multidispatch
$a + $b # unbox, add
16:56 thepler joined
jnthn Here's the real issue. 16:56
pmichaud put another way.... the operator tends to want to limit itself to the native types
jnthn $a + $b is not just unbox and add in the general case.
It's coerce, unbox and add.
I've kept coercion and unboxing very deliberately separated out in the 6model design. 16:57
pmichaud that doesn't look too nasty to me, though.
jnthn When we have something of a type that already can unbox straight to the right kind of native type, we can save ourselves doing the coercion.
Deciding that with multi-dispatch feels rather convenient. 16:58
Note that I'm foreseeing a world where such multi candidates can be determined at compile time and inlined.
pmichaud if it remains a compile-time/inlining sort of multi dispatch, I'd be okay with that. 16:59
jnthn We *could* build another mechanism that gets us the saving, but my inclination is to build the one that we have to anyway for other stuff, and just use it.
pmichaud well, that gets to the question of how much we want NQP to be able to provide an interface to other objects on the underlying vms
if we say that nqp limits itself to playing with its own objects... that's a bit of a restriction
17:00 daxim left, am0c^ left
jnthn Yes, that is an issue. 17:00
17:01 am0c^ joined
jnthn Interop is generally going to be "fun". 17:01
pmichaud and I guarantee that being able to work with other Parrot and/or .Net objects is going to be highly desirable
(that exist outside of 6model)
jnthn Oh, I totally agree. 17:02
It's just a question of how we're going to fit them into the Perl 6 type system.
It's do-able, I'm happy enough the model gives plenty of flexibility on that front. It's just slightly tricky. :-) 17:03
pmichaud I'll think about it a bit more.
I have to decide where I want multidispatch to live.... and I'm slowly coming around to your perspective on it. :-) 17:04
jnthn These days, I tend to view multi-dispatch as one of the Perl 6 primitives. 17:05
pmichaud right... I'm wondering if it therefore needs to be an nqp primitive
17:06 masonkramer left
jnthn We already *have* some support for multi in nqp-rx today. 17:06
I think for the target user group we have, multi-dispatch is a valuable feature.
pmichaud that's not really true (more)
jnthn Imagine re-doing PAST::Compiler without multiple dispatch. It's do-able, but less nice. 17:07
pmichaud nqp-rx exposes Parrot's multi dispatch, it doesn't implement one.
jnthn Yes, it does. However, no other VM we're currently looking at targetting provides multi dispatch out the box.
pmichaud true. 17:08
jnthn Even if they did, I don't know that we'd want to have it have different semantics in different places.
I guess we can go either way on whether to have multi-dispatch in nqp or not.
pmichaud ...does PAST::Compiler rely on multi dispatch? I don't think it does.
jnthn My feeling is that for people doing compiler-y stuff, it's really handy. 17:09
pmichaud I put multi declarations there for future extensibility, but I don't think it currently relies on multi dispatch.
jnthn pmichaud: Oh.
pmichaud I think it does standard method dispatch.
jnthn no, I'm almost certain it's all as_post methods.
.sub 'as_post' :method :multi(_, ['PAST';'Control']) 17:10
pmichaud yes, on different type objects.
jnthn .sub 'as_post' :method :multi(_, ['PAST';'Block'])
pmichaud oh, you're right
the earlier versions of PAST::Compiler had the compile code in the individual PAST::* nodes
instead of a separate PAST::Compiler object
17:11 lamstyle left
pmichaud so yes, it wants multidispatch in the current design 17:11
jnthn I think I prefer the current factoring.
pmichaud anyway, as I said, I'll think about it, and I'm leaning towards your interpretation :)
jnthn :-)
17:13 stkowski joined 17:16 lamstyle joined
[Coke] "perl cabal" Did you mean perl camel? 17:19
moritz_ good localtime meta6ers
pmichaud [Coke]: in response to your earlier message -- no, I don't have a use.perl replacement blog set up yet. I'll likely do that this week.
17:19 wamba joined
pmichaud (and will forward you or appropriate person the url) 17:19
moritz_ pmichaud: I haven't seen any R* announcements by email -- intentional? 17:20
pmichaud moritz_: just sent. 17:21
colomon \o/
17:21 kjeldahl left
pmichaud hugme: tweet rakudoperl Rakudo Star 2010.09 released bit.ly/b8AqAw #perl6 #rakudo 17:22
ENOHUGME :-(
frettled I spy with my little eye something beginning with an 'a': announcement of Rakudo Star!
pmichaud++
[Coke] huh. google for "perl cabal". the "perlcabal.org" link is showing as a viagra ad. 17:23
colomon perlcabal.com is the viagra ad 17:24
at least, that's what I get here.
flussence that's .com for me
jnthn [Coke]: huh, for me too...
oh yeah, .com
moritz_ pmichaud: hugme doesn't like twitters's switch to OAuth only anyway 17:25
[Coke] AHHH.
pmichaud moritz_: okay, I'll do it directly through twitter.
17:26 hugme joined, ChanServ sets mode: +v hugme
pmichaud tweeted. 17:26
jnthn So long as they don't get it up in the results so it's higher than perlcabal.org.
pmichaud (and I had to reset the password on the rakudoperl account, so hugme can no longer tweet anyway)
moritz_ got the announcement now, pmichaud++ 17:31
pmichaud should I see about setting up the rakudoperl twitter account under cotweet, then?
or perhaps some other "let a bunch of people share a twitter account" mechanism? 17:33
17:34 Chillance joined
pmichaud or will hugme start using oauth? ;-) 17:34
17:34 ruoso left
pmichaud (not urgent, just curious) 17:34
moritz_ it's on my long term agenda 17:35
pmichaud moritz_++ 17:36
sjohnson hi dudes 17:37
TimToady hopes that is not gender-specific 17:39
sorear good * #perl6 17:40
17:40 envi left
diakopter wheels down in my cube 17:40
17:41 risou left 17:42 risou joined
sjohnson
.oO(dudes .= asexual ?)
17:42
slavik wtf? lol?
[Coke] yes, dudes is not typically meant to be gender specific.
neither is guys, IME. 17:43
17:43 risou_ joined, risou left
sorear (backlog) What is prefix:<=> ? 17:44
pmichaud that used to be the "iterator operator"
i.e., it returned something that could iterate a filehandle or the like. 17:45
[Coke] like =head ? <duck>
pmichaud tosses something at Coke, and aims low. 17:46
[Coke] you =cut me to the quick. 17:47
17:48 risou_ left, masonkramer joined
masonkramer excitedly downloads the new * 17:48
pmichaud afk, lunch 17:50
17:51 orafu joined 17:58 jferrero left
masonkramer contemplates keeping * dists under revision control 17:58
moritz_ installing them into separate folders is probably much easier 17:59
sorear TimToady: What's the correct low-level form of GLOBAL::Foo::Bar then? 18:00
TimToady more like GLOBAL::<Foo::><Bar::> in STD-think 18:01
18:01 orafu left
TimToady or GLOBAL::<Foo::><Bar>, if you want the type object Bar 18:02
diakopter std: .oO( "o hai" ) 18:04
p6eval std : OUTPUT«ok 00:01 115m␤»
diakopter std: lol
18:04 Entonian joined
p6eval std : OUTPUT«===SORRY!===␤Undeclared routine:␤ 'lol' used at line 1␤Check failed␤FAILED 00:01 114m␤» 18:04
diakopter moritz_: TimToady thinks std isn't building 18:05
TimToady std: lol
p6eval std : OUTPUT«===SORRY!===␤Undeclared routine:␤ 'lol' used at line 1␤Check failed␤FAILED 00:01 114m␤»
TimToady oh, you just said that :)
diakopter precog: summon yourself 18:06
hm, I must've changed the future too much. 18:08
sjohnson should implement lol in p6
lots of logic()
18:09 orafu joined
diakopter Any needs a oO() , short for note() :) 18:10
kidding, ish.
colomon is suffering SAN loss from trying to untangle the chain of UI calls in his $work code. 18:12
sorear TimToady: That troubles me a bit. since Foo and Foo:: always travel together I kindof want to only have one reference between them 18:13
TimToady: also since Foo:: === Foo.WHO
[Coke] colomon: you see a dark and ominous shape, twisting in the shadows. 18:17
colomon [Coke]: Luckily I have this grue-proof lantern. 18:18
18:18 Robinux joined 18:20 molaf_ left
colomon compile and link! now just ten or so more of these things to track down.... 18:23
18:23 orafu left 18:26 timbunce left 18:32 timbunce joined 18:35 justatheory left
sjohnson perl6 is able to do a backtick operator similar to a system( LIST ) call, correct? 18:37
colomon not sure 18:38
but qx/ / is more or less the same thing
18:40 jferrero joined
colomon > my @a = (qx/ls/).lines; say @a[1] 18:42
0002-Can-t-type-my-own-email.patch
diakopter rakudo: say qx/ls/
p6eval rakudo 624188: OUTPUT«Operation not permitted in safe mode␤ in 'Safe::forbidden' at line 2:/tmp/mZAq9BfIai␤ in main program body at line 22:/tmp/mZAq9BfIai␤»
colomon diakopter: and that's why I tried it locally. ;)
diakopter yeah but that's bypassable here too
colomon `ls` didn't work for me locally
in the REPL. 18:43
jnthn std: `ls`
p6eval std : ( no output )
diakopter just don't do it here or I kickban you :)
jnthn o.O
diakopter pugs: `ls`
p6eval pugs: OUTPUT«*** Unsafe function 'Pugs::Internals::runShellCommand' called under safe mode␤ at /tmp/Er2jkexI9A line 1, column 1 - line 2, column 1␤»
colomon are backticks just NYI in rakudo?
jnthn std: alive
p6eval std : ( no output )
diakopter urp
jnthn Aw.
PerlJam I thought backticks weren't used in Perl 6 (for the qx// purpose) 18:44
they're too hard to distinguish from ' in many fonts and just not quite visible enough in general
sjohnson colomon: qx// is nice, but if you want to use LIST like in system 18:48
it's useless
for example, args to ls that are files needing heavy escaping
... unless you know another trick
system('ls', $ugly_file); # p5 beautiful syntax
18:48 kjeldahl joined
sjohnson unless all this time, qx can do the same thing, and i'm just a fool. 18:49
sorear rakudo: pir::spawn__vs("ls")
p6eval rakudo 624188: OUTPUT«error:imcc:syntax error, unexpected SREG, expecting '(' ('$S125')␤ in file 'EVAL_10' line 89␤===SORRY!===␤syntax error ... somewhere␤»
sorear rakudo: pir::spawnw__vs("ls")
p6eval rakudo 624188: OUTPUT«===SORRY!===␤The opcode 'spawnw_s' (spawnw<1>) was not found. Check the type and number of the arguments␤»
sorear rakudo: pir::spawnw__is("ls")
p6eval rakudo 624188: OUTPUT«build␤Configure.pl␤CREDITS␤docs␤dynext␤LICENSE␤Makefile␤parrot␤perl6␤perl6.c␤perl6_group.c␤perl6_group.h␤perl6_group.o␤perl6.o␤perl6.pbc␤README␤src␤t␤Test.pir␤Test.pm␤tools␤VERSION␤»
colomon sjohnson: not really sure what you're getting at there, but maybe you want qqx/ / instead? 18:50
sjohnson i want a function that passes arguments as a LIST
PerlJam sjohnson: I haven't checked the spec yet, but I'm pretty sure Perl 6 doesn't have the same problems with qx// that Perl 5 does. 18:51
sjohnson not as a string with spaces in it
(LIST wasn't caps cause i was yelling, just cause thats what perldoc looks like ;-)
colomon why were you asking about ` `, then?
18:51 Mowah joined
sorear Don't use `` then 18:51
18:52 alester joined
moritz_ well, it would be nice to have a form that capture STDOUT, and can be used with a list, not a string 18:53
sjohnson sorear: that is preciely why i'm asking here. i dont want to use ``
colomon qx/ /.lines works
moritz_ kinda like open my $handle, '-|', 'program', @arglist; in Perl 5
sjohnson im asking if there is a function based one that does it.
moritz_ not yet 18:54
flussence S29 mentions "our Proc multi run ( ; Str $path, Bool :$bg!, *@args, :%env = %*ENV )"
moritz_ that's the new system()
flussence hm
colomon I can verify that qqx does NOT do it, if I say $a = "a b" and do qqx/ls $a/, it complains about not being able to find files "a" or "b". 18:55
flussence a way to attach arbitrary filehandle numbers in a subprocess to IO objects would be really nice... 18:56
TimToady S29:559 speculates about a rungather() 18:59
sjohnson rakudo: my $text = "d0f(((43]\n23d'd3"; say qx/echo $text/; 19:00
p6eval rakudo 624188: OUTPUT«Operation not permitted in safe mode␤ in 'Safe::forbidden' at line 2:/tmp/4fN5W3q1jH␤ in main program body at line 22:/tmp/4fN5W3q1jH␤»
sjohnson well, can't get my reasoning across, but im sure you guys understand what im getting at.
that would work in p5 system('echo', $text); to the best of my knowledge
TimToady run is the new system 19:01
but it won't gather the output for you
sjohnson yeah... kind wondering if there is a p6 func that will grab it for me. but maybe moritz answered that question
.oO(maybe.. i don't understand it all)
19:02
TimToady see also IO::Pipe.from in S32/IO 19:05
PerlJam TimToady: you don't think the exec or pipe features should be adverbs on run?
TimToady though that may be re-engineered
PerlJam: probably not; that would be kind of a type violation on the return value 19:06
19:06 ggoebel left
TimToady you'll drive the optimizer nuts if it can't really know the return type of something 19:07
PerlJam hmm, I was thinking MMD could take care of that, but I suppose we'd have too much information to communicate or we'd have to bundle it up into some sort RunResult object 19:08
sjohnson well at least i can get some revenge towards computers for them making me angry over the years.
PerlJam all I know is that "runinstead" and "rungather" seem like perfectly horrid names to me, but I'm not sure if that's a good thing or a bad thing ;-) 19:10
BinGOs sjohnson: capturing stdout/stderr is hard. see www.dagolden.com/wp-content/uploads...n-perl.pdf
sjohnson yeah, this has pretty much exactly what i'm getting at. 19:11
PerlJam BinGOs: take the shell out of the equation and life is slightly simpler
sjohnson at least i'm not alone!
BinGOs I know you have been recommended IPC::Run 19:12
19:12 ggoebel joined
sjohnson im kind of looking for a way without using CPAN to be honest. i know, people will hate me (if they don't already). kind of my argument that if PHP can do it with shell_exec() and it has a system(), I don't see why it couldn't be available alongside perl's system() func as well without relying on a 3rd party lib.com 19:13
BinGOs I've had varying experiences with it on Windows ( you asked first on #win32 )
sjohnson i asked there first to lessen the "why not use CPAN?! are you mad?" blow
19:15 mberends joined
hudnix I am using %(@array Z *).keys.sort to get sorted, unique values out of my array. Is there a better idiom for this (or a data structure that enforces sorted & unique semantics)? 19:16
sjohnson .uniq 19:17
hudnix oh :)
sjohnson enforces unique and "unique values out of my array" are opposits, no?
TimToady doesn't sort
sjohnson uniq.sort
( `ー´)
colomon mind you, .uniq is pretty stupid at the moment -- basically just doing what you were already doing.
sjohnson rakudo: my @list = < c a b b c b a c d a e f a b c c>.sort.uniq; say @a 19:18
p6eval rakudo 624188: OUTPUT«===SORRY!===␤Symbol '@a' not predeclared in <anonymous> (/tmp/ic3KYiZ9Qr:22)␤»
19:18 M_o_C joined
sjohnson rakudo: my @list = < c a b b c b a c d a e f a b c c>.sort.uniq; say @list 19:18
p6eval rakudo 624188: OUTPUT«abcdef␤»
hudnix nicer looking anyway 19:19
sjohnson "oh perl6, is there anything you can't* do?"
colomon rakudo: my @list = (1, 1/1, 1e0).sort.uniq; say @list.perl
p6eval rakudo 624188: OUTPUT«[1]␤»
flussence I guess .uniq.sort would be faster there, since the sort will have less work to do
sjohnson flussence: must it not try to sort it anyway? 19:20
maybe a few operations less
flussence if it's uniq-ing by using hash keys, no
sjohnson but probably has to find out of it's sorted or not
colomon which it is (using hash keys)
which is why my last rakudo: example didn't work
[Coke] why .uniq and not .unique? 19:21
too unix-y?
sjohnson cause of perl's similarity with unix userlands
would be my guess
[Coke] -1 for that.
hudnix perl wants to be uniq. 19:22
sjohnson haha
<--- likes uniq and uniq *nix command similarn ames
much like i like grep
the greps of wrath 19:24
19:24 pmurias joined
PerlJam ruby uses .uniq 19:25
colomon PerlJam: that's it, we'd better switch to .unique 19:27
sjohnson colomon: ;)
flussence but... php has array_unique
sjohnson it also uses "uniq!" to emphasize cuteness
if i see another array_* method i'm going to cry
ie, array_push. really? was it to not confuse with string_push? 19:28
working with PHP on a daily basis hurts my soul.
flussence rakudo: say 'abcd'.uniq.perl
p6eval rakudo 624188: OUTPUT«("abcd")␤»
flussence rakudo: say 'abcda'.comb.uniq.perl 19:29
p6eval rakudo 624188: OUTPUT«("a", "b", "c", "d")␤»
flussence
.oO( php's slogan should be "There's a builtin for that" )
19:30
sjohnson thats one of the only reasons i sometimes like php 19:31
just their choice of func names irritates me
flussence to be fair, I like their online docs a lot. I just don't like that it's the part of the language I need most often by an order of magnitude.
sjohnson i do as well 19:32
one thing i don't like about them though, is their habit of trying to be cutge
cute*
and using dumb func definition terms like "needle" and "haystack"
for things that search arrays
in_array is an example
flussence ooh, I think I remember this one! 19:33
in_array($needle, $haystack)?
sjohnson yep
come to think of it, i wish that syntax was in perl too.
not a huge fan of using regexes for ugly vars all the time 19:34
i suppose grep { $_ eq $ugly } @things; works though.
flussence rakudo: say <a b c d e>.grep('d')
p6eval rakudo 624188: OUTPUT«d␤»
flussence
.oO( now what's the equivalent indexOf function? )
sjohnson rakudo: say ('\s+', '\s').grep('\s') 19:35
p6eval rakudo 624188: OUTPUT«\s␤»
sjohnson ok, not bad
not sure
flussence rakudo: <a b c d e>.index('d') 19:36
p6eval rakudo 624188: ( no output )
flussence rakudo: <a b c d e>.index('d').say #oops
p6eval rakudo 624188: OUTPUT«6␤»
flussence wha?
19:36 wamba left
hudnix wow 19:36
colomon that's right
rakudo: say ~<a b c d e>
TimToady rakudo: <a b c d e>.pairs.grep(*.value eq 'd').key
19:36 timbunce left
p6eval rakudo 624188: OUTPUT«a b c d e␤» 19:36
rakudo 624188: OUTPUT«Method 'key' not found for invocant of class 'List'␤ in main program body at line 22:/tmp/B6WDnUbXgI␤»
TimToady rakudo: <a b c d e>.pairs.grep(*.value eq 'd')».key.say 19:37
p6eval rakudo 624188: OUTPUT«3␤»
colomon rakudo: say "abcdefg".index('d')
p6eval rakudo 624188: OUTPUT«3␤»
flussence oh!
colomon rakudo: say "a b c d e f g".index('d') 19:38
flussence Array.index is Array.Str.index...
p6eval rakudo 624188: OUTPUT«6␤»
colomon flussence: right
19:39 am0c^ left
pmichaud TimToady: my @a; (5,6,@a,*).[2].say # '6' or '' ? 19:40
sjohnson he means finding a string charactor
not array
hmm, maybe not. 19:41
TimToady I'd hope for 6
pmichaud TimToady: okay.
sjohnson indexof on PHP site goes to strrpos
why 2 r's, no clue.
TimToady reverse?
flussence str(right-end)pos
sjohnson i thought you said you never used PHP before!
you have a mind for PHP
:)
TimToady that doesn't stop me from guessing
sjohnson have to think like that a lot with that language 19:42
it's always a puzzle with PHP
pmichaud C does similar things -- e.g., strchr and strrchr
sjohnson always have to guess whether a func has underscores in it or not too.
pmichaud it's not just PHP :-)
19:43 timbunce joined
sorear TimToady: Would it be reasonable to avoid Foo::<Bar::> in favor of Foo::<Bar>.WHO? 19:44
19:44 espadrine` joined
moritz_ TimToady: btw have you backlogged the attribute introspection discussion last weeks? any comments on it? 19:44
ie Attribute.get_value
19:45 plainhao left
TimToady sorear: not sure; I think of .WHO as the original module with all :ver and :auth attrs, while Bar:: could be just a local alias of the package hash 19:49
moritz_: I saw the discussion go by, but I'm rather agnostic; it seems like it would depend on the knowhow 19:50
also .get_value is not going to be well-typed from the compiler's point of view
moritz_ what does that mean?
jnthn TimToady: Yeah, .Net does an approach like GetValue and you gotta cast what you get back. 19:51
moritz_ that you don't know the return type at compile time?
jnthn moritz_: Yeah 19:52
Well, it's unanalysable to the compiler basically
Not a huge deal, maybe.
moritz_ that's fine... it'll always return a subtype of Mu :-)
jnthn ;-)
19:53 orafu joined, orafu left
moritz_ I think I'll spec it, with a conjectural note that maybe not all default meta classes are required to implement it 19:54
19:54 orafu joined
TimToady +1 19:55
moritz_ also +1 to a conjectural set_value?
TimToady or am I only allowed to vote +Inf?
moritz_ anyything ~~ Real is fine :-)
if you voted +2i, I'd be confused :-) 19:56
TimToady imagine that...
we can conjecture set_value
+0.3 maybe :)
19:56 thepler left, justatheory joined 19:57 thepler joined, dwilliamii joined
TimToady I'm really not gonna quibble with people much about anything that goes behind .HOW, which is /me's abstraction layer of choice :) 19:57
though I guess I did just quibble about the default scope of .^methods :) 19:58
19:58 Italian_Plumber left
moritz_ so far it seems that the 6ers have mostly been able to agree on a HOW API behind the scences 19:58
TimToady I try to have strong opinions about whether I should have strong opinions or not, and sometimes I succeed... 19:59
sorear TimToady: can you explain more what you mean by "original module"?
TimToady more like a library handle
library object handle
WHO as in "What's your aristocratic pedigree?" 20:00
as in Who's Who.
phone &
jnthn moritz_: +1 to spec it. I'm going to have to work out how it'll look though. 20:01
Oh, maybe it's easy 20:02
20:05 jaldhar left
pmichaud phone 20:06
dalek ecs: 58fe2d8 | moritz++ | S12-objects.pod:
[S12] spec setting and getting values of attributes by means of introspection

After lengthy IRC discussion, we concluded that it's a good idea to provide some form of introspection that doesn't bother about perceived privacy borders, provided that the implementation makes it feasible.
Also clean up some wording.
20:10
20:11 bluescreen left 20:25 mfollett left 20:28 standz left 20:30 standz joined 20:37 kjeldahl left
masonkramer if an Iterator is mutable, how can it be a "Perl list" - isn't a perl list an more like immutable, ordered set of values? 20:38
maybe a better question is: what's the Perl6 difference between an Iterator and an Array
moritz_ masonkramer: a List is not immutable in the sense that the memory representaiton stays the same 20:39
masonkramer: but it's immutalbe in the sense that you can't push to it, or assign to slots
masonkramer Wait...I don't see a List type in S02 20:41
I see a List role, an Iterator type, and an Array type
moritz_ masonkramer: pmichaud++ is supposed to change that some point :-)
pmichaud the synopses are all wrong
Iterators are immutable
Lists are mutable
moritz_ method set_value(Mu $obj, Mu $new_val) {
pir::setattribute__vpsp($obj, self.name, $new_value);
}
produdes
too few positional arguments: 2 passed, 3 (or more) expected
at compile time 20:42
what am I doing wrong? seems like someting obvious
pmichaud lower-case 'p' is always wrong
(but not likely the source of error here)
moritz_ right; changing it doesn't fix it
pmichaud $new_val versus $new_value ?
moritz_ indeed
I would have expected a better error message :/ 20:43
pmichaud is there a $new_value in scope?
moritz_ like you usually get from not-declared variables
no
pmichaud that's odd.
anyway, the "too few positional arguments..." message has to be coming from the invocation of set_value itself, not from the pir::setattribute
jnthn rakudo: class A { method m($beer) { $bee } }
p6eval rakudo 624188: OUTPUT«===SORRY!===␤Symbol '$bee' not predeclared in m (/tmp/_TxteNDX23:22)␤»
moritz_ rakudo: pir::setattribute__vPSP([], '$!fill', $foo) 20:44
pmichaud and 3 arguments are indeed expected.
p6eval rakudo 624188: OUTPUT«===SORRY!===␤Symbol '$foo' not predeclared in <anonymous> (/tmp/nQhUPFChql:22)␤»
masonkramer Ok. No Array type anymore? An immutable Iterator and a mutable Array?
*heh
20:44 bobkare left
masonkramer discard that last sentence 20:44
pmichaud yes, we still have Array
moritz_ pmichaud: I'm sure it was a pre-runtime error here
masonkramer Ok, so there are Array, List, and Iterator types now 20:45
moritz_ so, at BEGIN or CHECK or INIT time
pmichaud masonkramer: and Parcel
moritz_ and Capture
masonkramer Oh yes, I've been working through Parcel and Capture
20:46 bobkare joined
masonkramer Something in the Perl book explaining the differences between all the ways to store an ordered set of values in Perl6 would be really useful to me 20:48
pmichaud we're still working out a few of the details
but the basic mechanism for storing an ordered set of values continues to be Array 20:49
20:49 aloha left
moritz_ masonkramer: if you come around to contributing such a chapter, that would be great 20:49
pmichaud if the elements of the list are immutable, then a Seq works
masonkramer moritz_: I would be happy to contribute in that way, if I'm able to understand it 20:50
pmichaud TimToady: for verification: (4,5,(6,7),*).[100] would be 7? 20:52
mberends jnthn: to help you replace more var usages, the shallow workaround on 6model/java/compiler/JST2Java.pm:115 etc lists almost all the remaining cases. 20:55
jnthn mberends: OK...many?
The nqpop one is the evil one :-)
mberends looks like 21 there 20:56
jnthn *nod* 20:57
wow man, I was thinking of some hash... :-)
I guess epic if works for now :-)
20:57 ehks joined
jnthn oh, you put it in JST2Java.pm? 20:58
It should probably live in PAST2JNST.pm and just add a type attr
mberends jnthn: yup. ^^ "shallow" ;)
20:58 icwiener left
jnthn mberends: So, you eliminated them pretty much all on the Java side now? :-) 20:59
mberends jnthn: there is a more difficult battle ahead: replacing Func<> :) 21:00
jnthn: it's all replaced in java/runtime/*, so it's probably a kinda SMOP 21:01
jnthn: It's noteceable that the code your code writes is very similar to the code that you write. Coincidence, or proof of autheticity? ;- 21:02
21:02 aloha joined
jnthn :P 21:02
TimToady pmichaud: I suppose, though that would imply a .flat somewhere
jnthn Well, the code is mostly interacting with a runtime I wrote, so it's not *that* surprising. ;-) 21:03
pmichaud TimToady: well, if (4,5,@foo,*) implies that we repeat @foo[*-1].... I'd presume the same is true for any flattening element in that position
s/flattening/interpolating/ # maybe 21:04
and the .[100] already implies flattening of a parcel, iirc.
TimToady I think I'm okay with it, in the sense that some of our currently agnostic listops should probably default to flattening anyway, and require lol or tree to get other behaviors 21:05
parcels aren't supposed to be all that user-visible
jnthn mberends: I guess lambdas are all Greek to Java. ;-)
mberends jnthn: istr that Greek coffee is stronger too ;) 21:06
jnthn Greece is one country I never made it to yet.
TimToady rakudo: (1,(0,2),3).sort.say 21:07
p6eval rakudo 624188: OUTPUT«0213␤»
pmichaud sort isn't flattening yet
TimToady I think sort should be one of those that flattens by defualt
pmichaud rakudo: (1,(0,2),3).reverse.say
p6eval rakudo 624188: OUTPUT«3201␤»
jnthn I'd probably find it confusing. "WTF, there's lambda expressions everywhere!"
pmichaud right -- I just hadn't switched it.
I think we decided that most list operations flatten by default
i.e., the ones that come from Any 21:08
(which this one does)
TimToady basically, anything you get to via Any should probabl...yes
sorear TimToady: Foo.pm: module Foo { our sub foo { GLOBAL } }; Bar.pm: use Foo; BEGIN { Foo::foo }
pmichaud I'll update shortly.
sorear TimToady: while compiling Bar, what GLOBAL does Foo::foo see?
TimToady presumably the one from the Bar's compunit, which may already have Foo's GLOBAL merged by then (by the use, I'd think) 21:11
we make have to make sure to leave aliases to the merged GLOBAL sitting around for a unit like Foo though 21:12
moritz_ rakudo: sub f($x) { pir::getattribute__PSP($x, '$!name') }; f($a) 21:13
p6eval rakudo 624188: OUTPUT«===SORRY!===␤Symbol '$a' not predeclared in <anonymous> (/tmp/eTVkwELsZl:22)␤»
21:13 M_o_C left
sorear TimToady: can you elaborate on those aliases? 21:13
21:13 Guest23195 left
TimToady when we look up GLOBAL in a lexical scope, the lexical might be different in different compunits, but they point to the same actual package after unification 21:15
jnthn moritz_: error fail!
TimToady much like normal 'our' aliasing makes a lexial alias to an external object 21:16
*ical
21:16 ggoebel left
pmichaud seems to me like the '$a' message is correct. 21:16
$a wasn't predeclared there.
dalek ast: 0e3783c | moritz++ | S12-introspection/attributes.t:
[attributes.t] test .get_value and .set_value
kudo: 100b868 | moritz++ | src/core/Attribute.pm:
implement Attribute.{get,set}_value
21:18
sorear TimToady: I am imagining, A uses B & C, B & C use D, I want to compile B and C in parrallel, both call into D, what does D see for GLOBAL? 21:20
21:21 ggoebel joined
colomon moritz_++ 21:24
TimToady I think the unifications into B and C have to be via alias as well, so that when A unifies them both it can tell that two D items via B and C are really the same thing. 21:26
nap & 21:27
sjohnson ( ° ー°) 21:29
sorear Maybe GLOBAL is secretly a contextual. 21:33
21:33 fod joined 21:36 Mowah left
sorear GLOBAL is definitely secretly a contextual. It all works now. 21:37
21:37 Ross left 21:50 lichtkind joined 21:56 pythonian4000afk is now known as pythonian4000
diakopter sorear: explain your thinking on that? 22:07
diakopter curious
Grimnir_ (1.chr ... (2**16).chr).say is somewhat cool 22:08
utf-8 is standard in perl6, right?
and each utf-8 character is 1-2 bytes long, right?
sorear diakopter: when the compiler calls BEGIN blocks, it might need to pass arbitrary weird GLOBALs to them 22:09
jnthn Grimnir_: Safter to say unicode is standard than any particular encoding.
sorear Grimnir_: utf-8 characters are up to 4 bytes, but Perl 6 doesn't mandate utf-8 specifically
Grimnir_ ok
jnthn Grimnir_: utf-8 may use between 1 and 4 bytes to encode a given codepoint.
22:09 leprevost joined
sorear "七" is always 0x4E03.chr, but that might be any weird bytes 22:09
jnthn It might be some perfectly normal bytes too. :-) 22:10
sorear (Niecza currently uses native CLR strings, which store that as 03 4E in bytes)
Grimnir_ oh, so that's the unicode value, but it could be encoded differently?
so when I do (1.chr ... (2**16).chr).say, it's the unicode values, which always are the same? 22:11
lichtkind jnthn: ahoj 22:12
phenny lichtkind: 28 Sep 22:47Z <masak> tell lichtkind planetsix points to your use.perl URL. Do you have a different one you'd like plugged in?
jnthn lichtkind: Ahoj...ako sa mas? :-)
sorear Grimnir_: yes
jnthn Grimnir_: Yes, for some definition of "unicode values" :-)
lichtkind phenny: /help
jnthn But it's not encoding dependent.
Grimnir_ jnthn: that's close enough :) 22:13
lichtkind jnthn: dobre ja mam tady kamardi :)
Grimnir_ ah well, I should probably read up on unicode then
jnthn lichtkind: :-) 22:14
22:14 cplayer joined 22:15 cplayer left
lichtkind phenny: tell Masak of course i just ramble here since weeks to finde someone who redirects the blogs.perl.org/users/lichtkind/ posts with the tag perl6 to planet6 22:15
phenny lichtkind: I'll pass that on when Masak is around.
lichtkind thanks phenny
phenny: thanks 22:16
22:19 pmurias left
lichtkind phenny: tell Masak its blogs.perl.org/users/lichtkind/perl-6/ 22:22
phenny lichtkind: I'll pass that on when Masak is around.
22:23 meraxes joined
lichtkind jnthn: conrats to the release 22:23
diakopter sorear: can you give me an example of an arbitrarily weird GLOBAL that might need passed to a BEGIN block?
22:23 ruoso joined
jnthn lichtkind: Actually, I didn't contribute much to this one...but I'm happy to see it. :-) 22:23
lichtkind jnthn: you do mainly model6? 22:24
jnthn 6model :-)
Yeah, that's my main focus at the moment.
So far the meta-model core is implemented on both .Net CLR and atop of Parrot. 22:25
diakopter jnthn: have you tried it on mono (either windows or otherwise)? 22:27
jnthn diakopter: I haven't. mberends++ I believe has and last I recall reported it working. 22:28
sorear diakopter: {A.pm} BEGIN { ... }; our sub foo { ... }; {B.pm} use A; BEGIN A::foo; {C.pm} use A; BEGIN A::foo; {D.pm} use B; use C;
jnthn diakopter: It needs build system twiddles. 22:29
diakopter: That is, it doesn't work out the box there yet.
diakopter oh
jnthn But it's build tweaks rather than code tweaks. :-)
22:29 [Coke] left
diakopter mberends: did you use mono trunk? (lots of xbuild improvements) 22:29
jnthn So mostly infrastructure, not any "oh no mono can't handle it" style blockers.
diakopter: It's not that mono build infrastructure is lacking, it's just that the current makefile is hard-coded and assumes VS. 22:30
diakopter oh; it's an actual Makefile and not all in the .sln
jnthn Well, yay and nay. :-) 22:31
diakopter oh :)
jnthn Currently the compilation process is batch file / make file driven.
diakopter sorear did lots of work to figure out custom .sln actions
afaict
jnthn The actual runtime library is just a plain ole solution.
sorear I'm currently running Perl 5 code from Niecza.proj 22:32
(is .proj == .sln?)
diakopter no
22:32 stkowski_ joined, stkowski left, stkowski_ is now known as stkowski
diakopter a .sln is a collection of .csproj 22:32
or others
22:33 timbunce left
diakopter but yeah, my statement applies to your work in the .proj instead of .sln :) 22:33
your figuring-it-out work I mean.
22:36 leprevost left
mberends diakopter: only mono 2.4.4 here, Ubuntu 10.04 LTS 32 bit stable 22:36
jnthn mberends: What did you actually have to twiddle to make it work? Just the stuff in the dotnet/compiler/ ? 22:37
mberends will re-verify 6model/dotnet again, so far it's always worked :)
jnthn Oh, OK. :-) 22:38
mberends jnthn: let me clean and re-try to find out what the steps need to be
jnthn I thought you'd mentioned having to tweak some bits.
OK.
Sleep time, night all 22:43
sorear diakopter: I can report it working on mono too
22:47 mavrc left
dalek ecs: 02bd8f2 | TimToady++ | S03-operators.pod:
[S03] cross is a metaop, not a hyperop
22:49
ecs: 4d77c0b | TimToady++ | S (2 files):
Merge branch 'master' of github.com:perl6/specs
22:51 lichtkind left 22:59 alester left 23:21 stepnem left 23:28 meppl left 23:38 molaf joined
dalek ecza/master: 0bfce15 | sorear++ | / (9 files):
Rewrite the ANF converter

This new presentation makes the representation shift much more explicit, and brings us closer to portability off the CLR.
23:38
23:45 stkowski left 23:58 Kodi joined