The topic for #perl6 is: pugscode.org/ planetsix.perl.org/ | nopaste: sial.org/pbot/perl6 | pugs: [~] <m oo se> (or rakudo:, kp6:, elf: etc.) (or perl6: for all) | irclog: irc.pugscode.org/
Set by TimToady on 25 November 2008.
mncharity "bootstraps on gimme5". "self-compiles using STD.pm". "one step left". not really. "synced with STD.pm". "next, running STD.pm". 00:02
masak: fun question, conversation. thanks :)
masak perhaps the fact that I can't think of a big feature I'd really like to have right now is a sign that I've internalized the current limitations of Rakudo. :)
mncharity: thank you.
mncharity :) I'm off (running late). g'night all. & 00:03
ab5tract masak, do you have any plans for November that extend it past the level of present day wikis? 00:56
masak ab5tract: depends on what you mean.
first, I'd like it to _reach_ the level of present day wikis. :)
ab5tract not that i know what these features might be 00:57
ah, yes, i can understand that :)
masak, consider yourself forked. 01:02
masak ab5tract: cool. 01:03
ab5tract It's past time I got my hands dirty on some Rakudo.
masak ab5tract: right now, what I aim for is a broad coverage of common markups, starting with MediaWiki. 01:04
ab5tract: are you on the November mailing list?
ab5tract No. Is it google group'ble?
masak aye. groups.google.com/group/november-wiki 01:05
lambdabot Title: november-wiki | Google Groups
cathyal hi 01:23
anyone up for some haskell? 01:24
meppl good night 01:24
slavik masak: check out my site, been hacking wordpress and dtabds :) 01:27
masak slavik: url? 01:30
slavik masak: bcacm.org/~slavik 01:37
slavik first I had to hack the tabs to look like that, then had to hack the plugin that did it so that the pop up menu displayed correctly 01:38
masak slavik: it's a bit of a slow load. 01:39
slavik masak: my college's network is crap :( 01:40
masak slavik: I'll get back to you when it's loaded. :)
slavik heh 01:43
masak slavik: ...which it still hasn't. 01:44
slavik :(
masak indeed. maybe you should consider hosting it somewhere else. 01:46
slavik masak: but where?
masak slavik: depends on your needs, I guess. 01:47
slavik masak: I will prolly host it at home, 40KB upload and ports not blocked, but haven't set the system up
masak mm
slavik btw, I have full access to that server
masak I don't have any, it seems. it still hasn't loaded. 01:57
slavik hmm 02:04
:(
masak: has it loaded now?
masak nope. 02:05
slavik you use OSX? 02:06
130.238.45.242 - - [29/Nov/2008:20:30:45 -0500] "GET /~slavik/ HTTP/1.1" 200 19207 "-" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_4; en-us) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.20.1" 02:07
masak aye. that's me.
slavik :(
masak note to self: trying to rebuild Rakudo and do `make test` on November simultaneously -- doesn't really work. 02:23
slavik lol 02:24
masak slavik: where are you based? 02:25
slavik =nyc 02:26
masak still Saturday over there? 02:27
slavik yes
rakudo: {say $^a, $^bb} for je, jne, jg, jge, jl, jle Z =, !=, >, >=, <, <= 02:28
p6eval rakudo 33359: OUTPUT[Statement not terminated properly at line 1, near "=, !=, >, "␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤]
masak it's quite late here in Europe, bordering on early.
slavik rakudo: {say $^a, $^bb} for qw(je, jne, jg, jge, jl, jle) Z qw(=, !=, >, >=, <, <=)
p6eval rakudo 33359: OUTPUT[je,=,␤jne,!=,␤jg,>,␤jge,>=,␤jl,<,␤jle<=␤]
masak slavik: the commas become part of the words, do you really want that?
slavik rakudo: {say $^a~" is "~$^b} for qw(je jne jg jge jl jle) Z qw(= != > >= < <=)
p6eval rakudo 33359: OUTPUT[je is =␤jne is !=␤jg is >␤jge is >=␤jl is <␤jle is <=␤]
slavik hehe 02:29
masak nice.
I didn't know we had qw()
slavik err, q, qw is ' and "" I think 02:30
or w/e
masak nono, I know what they are.
slavik qw() has been there since at least Perl5 :P
masak I just didn't know Rakudo had them.
slavik why wouldn't it be in Perl6?
masak slavik: I know what they are.
slavik I am messing with you ;)
masak right. 02:31
masak needs sleep
slavik wait, so what did you do everytime you needed to qw() ???
masak I just used <> like normal Perl 6 programmers :)
slavik >.< 02:32
masak I did!
slavik does Perl6 allow defining operators?
masak sure.
slavik NICE!
we should define !
masak see the part in the spec about defining operators :)
slavik masak: you expect me to read it? 02:33
masak slavik: oh please, that's been done to death :)
slavik I expect you to feed it to me :P
masak slavik: yes. many times.
slavik rakudo: say 5!;
p6eval rakudo 33359: OUTPUT[Statement not terminated properly at line 1, near "!;"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤]
slavik :(
masak slavik: you need to define it first.
slavik I know, making sure it isn't defined
rakudo: sub fac($x) {return 1 if $x == 0; return $x*fac($x-1);}; say fac(5); 02:34
p6eval rakudo 33359: OUTPUT[120␤]
slavik awesome
now, let's define ! ... 02:35
masak you can't really do that in Rakudo yet. (I think.) 02:37
you can in Pugs, though.
or used to be able to, at least.
now -- sleep 02:40
g'night.
avar rakudo: sub fac($x) { [*] 1 .. $x }; say fac(5); 03:55
p6eval rakudo 33359: OUTPUT[Statement not terminated properly at line 1, near "1 .. $x };"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤]
avar rakudo: sub fac($x) { [*] 1..$x }; say fac(5);
p6eval rakudo 33359: OUTPUT[Statement not terminated properly at line 1, near "1..$x }; s"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤]
avar rakudo: sub fac($x) { [*] (1..$x) }; say fac(5);
p6eval rakudo 33359: OUTPUT[Statement not terminated properly at line 1, near "(1..$x) };"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤]
avar rakudo: say [1..5].perl
p6eval rakudo 33359: OUTPUT[[1, 2, 3, 4, 5]␤]
avar rakudo: say [*] 1,2 03:56
p6eval rakudo 33359: OUTPUT[Statement not terminated properly at line 1, near "1,2"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤]
avar rakudo: say eval "1*2"; 03:57
p6eval rakudo 33359: OUTPUT[2␤]
avar sub fac($x) { eval(join("*", 1..$x)) }; say fac(5);
rakudo: sub fac($x) { eval(join("*", 1..$x)) }; say fac(5);
p6eval rakudo 33359: OUTPUT[120␤]
avar poor man's hyperop:)
buu Uh oh, it's an avar. 05:20
slavik ? 05:35
avar: nice one
meppl good morning 06:52
literal morning 07:03
pugs_svn r24113 | hinrik++ | [util/perl6.vim] highlight contextualizers, operators, plus various small improvements
jimmy__ rakudo: <Hello>.say 07:33
p6eval rakudo 33360: OUTPUT[Hello␤]
mncharity /me knows it's late when meppl says good morning... 08:00
mncharity masak: re things for a third person to work on... an important but quite hard one might be helping TimToady with STD/gimme5. 08:01
g'night all & 08:07
pugs_svn r24114 | putter++ | [STD_green] Flesh out Makefile infrastructure for parsing STD.pm.
r24114 | putter++ | [STD_blue] Adapt to STD.pm: warn of untagged nodes, instead of dying; and clip cycles more quickly. Doesn't dump yet.
ruoso Hello! 14:13
ruoso speaking directly from his new laptop... still has a lot of work to do to get it in shape for development 14:14
ruoso .oO ( (unbranded laptops)++ ) 14:16
ruoso hi pmurias 14:21
pmurias ruoso: hi
ruoso pmurias, any progress on the PCLCoro thingy? 14:23
pmurias i'm planning to code it now 14:25
ruoso cool
I should be a little bit unproductive in the next week or two 14:26
pmurias configuring your new laptop? ;)
ruoso yeah... and also taking care of my newborn ;) 14:27
pmurias is it ok to make PCL a required dependency?
ruoso for now, sure... 14:28
we then can figure out how to make that dependencies external later
that will probably happen when we have proper module loading 14:30
pmurias ruoso: is there a tool we could easily use to determin which revision introduced the leak? 14:52
ruoso pmurias, well... one could checkout an arbitrary revision in the past and run make tets 14:53
ruoso and then going forward until the leak appears 14:53
masak ooh, I know of a module I will write to change the grammar of Perl 6: one that does pattern matching. so then I can write `my ($a => $b, $c) = (1 => 2, 3);` when assigning names to things in data structures with known shape. 14:56
pmurias ruoso: choosing an arbitary revision means using binary search ;) 14:57
ruoso heh... yeah... kindof
pugs_svn r24115 | pmurias++ | [smop] added a stub of the PCL coroutine interpreter 15:05
rakudo_svn r33370 | pmichaud++ | [rakudo]: spectest-progress.csv update: 227 files, 4653 passing, 48 failing 16:00
pugs_svn r24116 | hinrik++ | [util/perl6.vim] fix problem with contextualizers 18:51
r24117 | hinrik++ | [util/perl6.vim] a better fix 18:54
literal what does the KitchenSink role do? 19:14
moritz_ re 19:15
pugs_svn r24118 | moritz++ | [util/smartlinks.pl] account for new synopsis filenames, and delete code to 19:24
r24118 | moritz++ | update them from svn.perl.org
pugs_svn r24119 | hinrik++ | [util/perl6.vim] improved highlighting of variables and builtin types, and some more comments 19:30
r24120 | moritz++ | [t] some test and smartlink fixes 19:47
pugs_svn r24121 | moritz++ | [t/spec] remove rakudo fudge markers because no test passes anyway (comment.t) 19:49
pugs_svn r24122 | moritz++ | [t/spec] regression tests for RT #60898 (ranges + infix:<Z>) 20:26
slavik rakudo: say "hello nvteighen" 20:35
p6eval rakudo 33376: OUTPUT[hello nvteighen␤]
nvteighen Another perl-bot? 20:36
slavik perl6 bot :)
nvteighen was playing with some at #perl
so, I guess I'll have to download Perl6 from perl.org
slavik pugs: sub fac ($x) { return 1 if $x == 0; return $x * fac($x-1); } say fac(100); 20:37
p6eval pugs: OUTPUT[93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000␤]
slavik nvteighen: :)
nvteighen tail-recursive factorial à la SICP? 20:38
slavik pugs is Perl6 on haskell, rakudo is perl6 on parrot, elf is minimal perl6 (to make perl6 compile perl6
yes
that is completely functional style :P
nvteighen yup
slavik nice, eh? 20:39
nvteighen really nice
slavik rakudo: say "hello" + 1
p6eval rakudo 33376: OUTPUT[1␤]
slavik rakudo: say "2" + 1
p6eval rakudo 33376: OUTPUT[3␤]
slavik ooh, how about this ...
nvteighen hmm... that's the sort of stuff pmasiar hates
slavik rakudo: my @list1 = 1..5; my @list2 = 6..10; my @list3 = 11..15; for @list1 Z @list2 Z @list3 -> $a, $b, $c { say "{$a} {$b} {$c} =="; } 20:41
p6eval rakudo 33376: OUTPUT[1 6 11 ==␤2 7 12 ==␤3 8 13 ==␤4 9 14 ==␤5 10 15 ==␤]
slavik boom baby
Z is infix zip operator
or how about the following
rakudo: my @list1 = 1..5; my @list2 = 6..10; my %hash = @list1 Z @list2; say %hash.perl; 20:42
p6eval rakudo 33376: OUTPUT[{"1" => 6, "2" => 7, "3" => 8, "4" => 9, "5" => 10}␤]
slavik nice, init?
take a list of keys and a list of values and BAM! you get a hash 20:43
nvteighen wow
slavik also ... .perl is awesome, it is like data dumper or printr() but native
nvteighen printr()?
slavik nvteighen: I did show you my overused grammar example, right?
nvteighen: from PHP 20:44
nvteighen not that one... at least I don't remember it
slavik rakudo: my $var = 1,[2, {"a"=>"b"}]; say $var.perl;
p6eval rakudo 33376: OUTPUT[[1, [2, {"a" => "b"}]]␤]
nvteighen well, that's near to a Lisp macro... 20:45
slavik rakudo: my @var{a}[2]{b}[10] = 1; say @var.perl;
p6eval rakudo 33376: OUTPUT[Statement not terminated properly at line 1, near "{a}[2]{b}["␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤]
slavik rakudo: my %var{a}[2]{b}[10] = 1; say @var.perl;
p6eval rakudo 33376: OUTPUT[Statement not terminated properly at line 1, near "{a}[2]{b}["␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤]
slavik rakudo: my %var{a}[2]{b}[10] = 1; say %var.perl;
p6eval rakudo 33376: OUTPUT[Statement not terminated properly at line 1, near "{a}[2]{b}["␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤]
slavik rakudo: my %var<a>[2]<b>[10] = 1; say %var.perl;
p6eval rakudo 33376: OUTPUT[Could not find non-existent sub a␤current instr.: '_block11' pc 16 (EVAL_12:15)␤]
moritz_ slavik: I think that autovivification doesn't work properly yet
slavik oh, ok 20:46
moritz_: bcacm.org/~slavik/
moritz_: my perl6 guide will compete with yours :P
aww
nvteighen :D
moritz_ slavik: YaY, competition is always good ;)
slavik moritz_: I already have a big working grammar that you've seen 20:47
I need to write up a chapter on operators
and hack wordpress some more, then eventually replace it with something written in perl6
nvteighen: there is also november, a wiki written in perl6 and it works now 20:48
although slow and crashes sometimes, but it is there already
nvteighen so, Perl6 is slowly getting suitable for production?
slavik yes 20:49
nvteighen (looking at Py3.0...)
slavik nvteighen: I'd say a year, maybe two until it is like ready ready (when rakudo passes the spec)
nvteighen ok... I'll download it and look at it 20:50
slavik ooh, nvteighen, here's a cool twist on the thing above
nvteighen anyway, I'm currently trying to get Perl5
slavik rakudo: my @list1 = 1..5; my @list2 = 6..10; my @list3 = 11..15; { say "{$^a} {$^c} {$^b}=="; } for @list1 Z @list2 Z @list3; 20:51
p6eval rakudo 33376: OUTPUT[too few arguments passed (0) - 1 params expected␤current instr.: '_block45' pc 433 (EVAL_14:134)␤]
slavik rakudo: my @list1 = 1..5; my @list2 = 6..10; my @list3 = 11..15; { say "{$^a} {$^c} {$^b}=="; } for @list1 Z @list2 Z @list3;
p6eval rakudo 33376: OUTPUT[too few arguments passed (0) - 1 params expected␤current instr.: '_block45' pc 433 (EVAL_14:134)␤]
slavik hmm
rakudo: my @list1 = 1..5; my @list2 = 6..10; my @list3 = 11..15; { say "{$^a} {$^c} {$^b}=="; } for (@list1 Z @list2 Z @list3);
p6eval rakudo 33376: OUTPUT[too few arguments passed (0) - 1 params expected␤current instr.: '_block45' pc 433 (EVAL_14:134)␤]
slavik rakudo: my @list1 = 1..5; my @list2 = 6..10; my @list3 = 11..15; { say "{$^c} {$^b}=="; } for @list1 Z @list2; 20:52
p6eval rakudo 33376: OUTPUT[too few arguments passed (0) - 1 params expected␤current instr.: '_block44' pc 386 (EVAL_14:122)␤]
slavik hmm, guess that doesn't work yet
rakudo: my @list1 = 1..10;for @list1 -> $a, $b { say "{$b} {$a}=="; }
p6eval rakudo 33376: OUTPUT[2 1==␤4 3==␤6 5==␤8 7==␤10 9==␤]
slavik nvteighen: makes sense? 20:53
rakudo: my @list1 = 1..10; { say "{$^b} {$^a}=="; } for @list1;
p6eval rakudo 33376: OUTPUT[too few arguments passed (0) - 1 params expected␤current instr.: '_block34' pc 289 (EVAL_14:101)␤]
slavik rakudo broke
that used to work
nvteighen slavik: no
slavik rakudo: my @list1 = 1..10; { say $^b, $^a, "=="; } for @list1;
p6eval rakudo 33376: OUTPUT[21==␤43==␤65==␤87==␤109==␤]
slavik oh, ok
anyway
for @list -> var list 20:54
that is a pointy block
so @list -> $a, $b will iterate two items at a time and stick them into $a and $b
nvteighen oh, that's what you told me some days ago 20:55
slavik but if you place the for loop block before the keywork for, the variables have to become $^a and $^b meaning that they are placeholders, then those variables are ordered according to alphabetical order and the proper number of stuff is grabbed from the list to fill them
yes
nvteighen yuck! 20:56
slavik Python cannot do that, in fact, no other language besides Perl6 can do that ... even for ($i, $j) (@list) will not work, I think
in Perl6
nvteighen unless maybe some heavily-macrofied Lisp... I guess not 20:57
slavik anyway, time to go home 21:00
dr_df0 hi, i'm not able to checkout the latest revision of pugs from svn.pugscode.org/pugs 21:20
dr_df0 the error is on file pugs/v6/smop/m0ld 21:20
is that known bug/
?
moritz_ what error? 21:21
dr_df0 svn: In directory 'pugs/v6/smop/m0ld'
svn: Can't copy 'pugs/v6/smop/m0ld/.svn/tmp/text-base/m0ld.hs.svn-base' to 'pugs/v6/smop/m0ld/.svn/tmp/m0ld.hs.tmp.tmp': No such file or directory
moritz_ dr_df0: try rm -rf pugs/v6/smop/m0ld/ and then a new checkout
masak dr_df0: I've seen other people be hit by that before. 21:22
moritz_ dr_df0: sounds like a local svn fuckup on your machine, that happens from time to time
dr_df0 I tried to checkout to a fresh directory
masak don't know if they solved it, though.
rakudo: say 4 ~~ [1,2,3,4,5]
p6eval rakudo 33376: OUTPUT[Method 'ACCEPTS' not found for invocant of class 'Perl6Array'␤current instr.: 'infix:~~' pc 14261 (src/gen_builtins.pir:8657)␤]
masak files TODO rakudobug 21:23
moritz_ masak: what should it do?
masak check elementness, methinks
I'm checking now
it shouldn't die, at least.
moritz_ that would be 4 ~~ any(...)
masak hm. yes.
masak tries that 21:24
moritz_ Various proposed-but-deprecated smartmatch behaviors may be easily (and we hope, more readably) emulated as follows:
Num Array array contains number X.any
masak mm
seems I don't have any support for my expectation about itemness
my brain must be running an old version of Perl 6. 21:25
moritz_ perl-5.10.0 runs the same old versin of Perl 6.
masak there are worse things than being as outdated as Perl 5.10 :) 21:27
moritz_ aye
moritz_ man, people on perlmonks.org sometimes still report that they can only use perl-5.6.something 21:27
masak poor souls. 21:29
moritz_ perl 5.6 is from March 2000, that's nealrly 9 years by now 21:30
masak rakudo: my @a = 1,2,3,4,5; say 4 ~~ any(@a) 21:31
p6eval rakudo 33376: OUTPUT[1␤]
masak \o/
rakudo: say [1,2,3,4] ~~ [1,2,3,4] # this should work, though 21:33
p6eval rakudo 33376: OUTPUT[Method 'ACCEPTS' not found for invocant of class 'Perl6Array'␤current instr.: 'infix:~~' pc 14261 (src/gen_builtins.pir:8657)␤]
masak reports that TODO instaed
s/ae/ea/
moritz_ curses whoever made the Sdd.html pages load so slow in FF 2 21:35
masak moritz_: that'd be azawawi. 21:37
meppl good night 22:23