»ö« | perl6.org/ | nopaste: paste.lisp.org/new/perl6 | evalbot usage: 'perl6: say 3;' or rakudo:, alpha:, pugs:, std:, or /msg p6eval perl6: ... | irclog: irc.pugscode.org/ | UTF-8 is our friend!
Set by lichtkind on 5 March 2010.
lichtkind Juerd: hej 00:12
00:13 literal left 00:25 slavik1 joined 00:26 slavik left 00:27 nihiliad joined 00:34 ash_ joined 00:44 johnjohn101 joined 00:48 plobsing joined
Juerd lichtkind: Hi 00:55
lichtkind ah :)
Juerd: cant find excape sequence in synopses , can you help? 00:57
Juerd I'm about to go to bed
What do you want to know, exactly? 00:58
lichtkind Juerd: cant find where i once copied that from synopses www.perlfoundation.org/perl6/index...._sequences 01:00
Juerd Can't find it 01:08
Must have been S05 though.
lue ohi 01:09
phenny lue: 04 May 09:28Z <masak> tell lue that I don't know if it corresponds exactly to what you're working on, but this might interest you: use.perl.org/~masak/journal/39238
01:09 ruoso joined
Juerd lichtkind: diveintoperl6.blogspot.com/2007/06/...und-4.html and trac.parrot.org/parrot/browser/bran...?rev=39377 01:10
lichtkind: I googled for one of the lines. 01:11
Good night
lichtkind good night 01:12
sleep well
lue phenny: tell masak ooh! That could come in handy ( esp. considering one of my theories involves codons :) )
phenny lue: I'll pass that on when masak is around.
sorear ok, I have successfully relayed closure problem information to pmichaud, my work here is done 01:16
phenny sorear: 04 May 14:54Z <masak> tell sorear that `macro postfix:<san> { q[~ "san"] }; say "sorear"san` just prints "san\n"
lue Although I was shooting for binary (A&T as one digit, C&G as the other), I considered quaternary before, *and* it maintains special ties with binary & hex :)
snarkyboojum sorear++
hellue 01:17
how about the REPL thing sorear? :) 01:18
lue rakudo: subset DNA of Str where { all(.uc.comb) eq any <A C G T> }; my DNA $dna = "gattaca"; say $dna; 01:19
p6eval rakudo 1eef08: OUTPUT«gattaca␤»
lue weird, failure on my end /me updates 01:21
snarkyboojum rakudo: subset DNA of Str where { all(.uc.comb) eq any <A C G T> }; my DNA $dna = "zxbbbyy"; say $dna; 01:23
p6eval rakudo 1eef08: OUTPUT«Type check failed for assignment␤current instr.: '&die' pc 17868 (src/builtins/Junction.pir:393)␤»
snarkyboojum w00t
lue rakudo: say :4<10>.fmt('%x') #predict 4 01:28
p6eval rakudo 1eef08: OUTPUT«4␤»
01:28 mantovan1 joined, mantovan1 left, mantovan1 joined 01:36 johnjohn101 left
lue there's no way to use .fmt() to convert ->to-> arbitrary bases is there? 01:37
ash_ you mean like take 15 in decimal and print it's binary representation in a string? 01:40
lue print its quaternary representation, for example 01:43
I know binary, octal, and hex are supported, but not arbitrary
ash_ how arbitrary do you need? 01:45
lue right now, only to base 4 01:46
ash_ you could write a module to do it, thats an odd number base...
01:48 k23z__ left 01:52 mantovan1 left, log joined
colomon rakudo: say e.log 01:54
p6eval rakudo 1eef08: OUTPUT«1␤»
01:59 Psyche^ joined 02:01 elmex left, agentzh joined 02:03 Patterner left, Psyche^ is now known as Patterner 02:04 wknight8111 left
lue rakudo: my $hi='oii'; say $hi[1] 02:04
p6eval rakudo 1eef08: OUTPUT«i␤»
lue why does it die for me? :(
snarkyboojum what error? :) 02:05
colomon that shouldn't be legal, should it? 02:07
snarkyboojum alpha: my $hi='oii'; say $hi[1]
p6eval alpha 30e0ed: OUTPUT«Method 'postcircumfix:[ ]' not found for invocant of class 'Str'␤in Main (file src/gen_setting.pm, line 324)␤»
lue Malformed my at line 1, near "='oii'; sa"
I typed: ./perl6 -e "my $hi='oii'; say $hi[1]" 02:08
ash_ pugs: my $a = 'hello'; say $a[2];
p6eval pugs: OUTPUT«␤»
ash_ lue: in my terminal, i have to escape the $'s
works locally... 02:09
snarkyboojum same here :)
ash_ colomon: should that be illegal?
colomon as far as I know, yes.
lue I've never had to escape them before. That's weird. 02:10
02:10 elmex joined
snarkyboojum rakudo: my $hi='oii'; say $hi<xyz> 02:13
p6eval rakudo 1eef08: OUTPUT«o␤» 02:14
snarkyboojum how does that one work?
lue what would the legal way be then? 02:16
snarkyboojum rakudo: my $hi='oii'; say $hi<abc>
p6eval rakudo 1eef08: OUTPUT«o␤»
colomon xyz == 0
but ick.
snarkyboojum oic
rakudo: say +<abc> 02:17
colomon rakudo: my $hi = "hello"; say $hi.substr(4, 1);
p6eval rakudo 1eef08: OUTPUT«0␤»
rakudo 1eef08: OUTPUT«o␤»
colomon rakudo: my $hi = "hello"; say $hi.substr(2, 1);
p6eval rakudo 1eef08: OUTPUT«l␤»
lue so there isn't MTOWTDI is there? (I like the [] slicing. It should be kept) 02:18
snarkyboojum rakudo: say 'hello'.split('')[4] 02:19
p6eval rakudo 1eef08: OUTPUT«o␤»
lue :) 02:20
AFAIK, It's like snowman/comet. the [] is not supposed to work, but it has no forseeable danger. 02:21
02:23 yinyin joined
lue wonders if you can take a regex as input and put it inside / / 02:24
snarkyboojum rakudo: my $a = "hello"; say $a[].WHAT 02:26
p6eval rakudo 1eef08: OUTPUT«Parcel()␤»
02:29 synth left
lue would something like my $a="[a-z]?"; my Regex $b = /$a/; be legal? 02:29
02:35 snarkyboojum left, abbe left 02:38 cotto left 02:40 lichtkind left 02:43 log left
ash_ lue sure thats legal, but that might not mean what you think it means 02:43
do you want the string to eval to its regex literal? 02:44
02:46 snarkyboojum joined 02:47 cotto joined
lue Yes, I want what's in the string to be put in // and be treated as if I hard-coded the contents of the string into the regex. 02:48
ash_ you could eval it 02:49
lue basically, my ultimate goal is to create an 'alias' circumfix for regexes.
such as, say, ø[a-zA-z]?ø being another way of writing regexes. 02:50
colomon rakudo: my $a ="f.*"; my $b = eval "rx/$a/"; say "hello friend" ~~ $b; 02:51
p6eval rakudo 1eef08: OUTPUT«friend␤» 02:52
colomon rakudo: my $a ="f.*"; my $b = eval "rx/$a/"; say "hello friend" ~~ /$b/;
p6eval rakudo 1eef08: OUTPUT«␤»
colomon rakudo: my $a ="f.*"; my $b = rx/f.*/; say "hello friend" ~~ /$b/;
p6eval rakudo 1eef08: OUTPUT«␤»
ash_ you could extend the grammar
the regex grammar
02:53 cotto left
colomon I think the eval method is probably the easiest way to go. though looks like variable interpolation still doesn't work in regexes? 02:53
lue I'm only trying to reimplement snowm— *cough**cough**haak* sorry.
colomon has completely destroyed his local implementation of log. :( 02:54
lue :( 02:55
I think extending the grammar (as long as it doesn't give me a heart attack trying) is the best way to go. 02:56
sorear lue: you can do that right now with macros 03:02
and now I'm backlogged. only took 9h 03:03
ash_ sorear: how far along are macros? i haven't checked recently
sorear I have syntactic category macros 03:04
you can extend any protoregex
for instance, proto token term { ... } 03:05
lue i.e. proto circumflex:<ø ø> { yada }
?
03:07 mtve left
sorear close 03:07
03:08 cotto joined
lue oh! darn :) 03:08
03:09 mtve joined
sorear macro quote:<ø ø> is parsed(/'ø'<p6regex=.LANG('Regex', 'nibbler')>'ø'/) { self.quote:sym</ />($/) } ought to do it 03:09
ash_ rakudo: macro quote:<ø ø> is parsed(/'ø'<p6regex=.LANG('Regex', 'nibbler')>'ø'/) { self.quote:sym</ />($/) }; say 'foo' ~~ øfooø; 03:10
p6eval rakudo 1eef08: OUTPUT«Confused at line 11, near "macro quot"␤current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)␤»
lue hmm.. 03:13
03:14 BrowserUk left, envi^home joined
sorear ash_: the patch review board hasn't gotten back to me yet. also I've got a bugrep from masak to deal with. 03:15
ash_ ah, got ya
lue has never heard of the PRB 03:16
03:22 cognominal left 03:26 cognominal joined
diakopter also I think p6eval rakudo is frozen on an older build still 03:28
lue I get that same confusion, so I don't think it's an old build issue. 03:30
03:35 meppl joined 03:36 [Coke] joined
[Coke] hio. Anyone here with privs on feather that could install kcachegrind? 03:36
03:37 stephenlb left
diakopter [Coke]: sure 03:43
[Coke] diakopter: I am trying the macport on OS X, but I have low hopes. =-) 03:44
diakopter hrm 03:45
it seems debian experimental insanity has once again overtaken feather
sorear feather is running experimental? 03:46
sorear quickly checks if kcachegrind is installable today (libc upgrades fff)
diakopter er, maybe not 03:47
it was at some point a couple years ago
lue feather runs debian-based linux? Wow!
diakopter running experimental, I mean.
03:47 nihiliad left
diakopter sid and experimental 03:48
sid has priority
sorear lue: how wow? 03:49
diakopter [Coke]: done
03:49 snarkyboojum left
[Coke] diakopter: fast! 03:51
lue I just don't care for debian's binary blobs :) 03:53
[Coke] also: holy crap it works.
lue That's why I choose Fedora!
.oO(The Distro Holy Wars hath begun)
03:54
03:56 justatheory left
sorear drat, I seem to have pinged out since the last time someone opped me 03:57
03:57 kfo_ joined
lue *gulp* 03:58
03:58 JimmyZ joined 04:00 kfo left, kfo_ is now known as kfo 04:01 snarkyboojum joined
lue IIUC, I just created a P6 blog: rdstar.wordpress.com/ 04:03
The first post is just to have a first post. Any questions as to why I posted that, look at the tagline in the top-right first :)
JimmyZ lue++ 04:06
nice blog
sorear maybe I should resurrect the Perl 6 rewrite of Angband I started two Aprils ago 04:07
lue I get the feeling that's a text game :)
sorear mostly. 04:08
ot
it's from the roguelike heritage - ASCII art video game
lue ASCII art win \o/
afk
sorear not to be confused with aadoom
which is an entirely different sort of win 04:09
04:16 jonrafkind joined 04:20 molaf joined
snarkyboojum lue: cool! another blog to subscribe to :) 04:20
lue: the about page is still a default I think rdstar.wordpress.com/about/ 04:24
ash_ neat, one of the GSoC project for GCC is to make a python frontend for AOT compiles python 04:28
04:29 plobsing left 04:36 jonasbn joined 04:42 kst left 04:45 kst joined 04:53 gfx joined 04:57 molaf left
sorear has achieved POST-enlightenment 05:04
05:05 rv2733 left 05:07 chitragupt left, chitragupt joined, rv2733 joined 05:08 simcop2387 left 05:12 simcop2387 joined, tri1 joined 05:13 tri1 left 05:22 justatheory joined 05:28 [mark] joined 05:29 jonrafkind left 05:32 steinberg joined 05:37 lue left 05:38 kaare joined, kaare is now known as Guest66879 05:41 kst left 05:43 kst joined 05:48 REPLeffect left 06:02 REPLeffect joined 06:03 justatheory left 06:04 uniejo joined
sorear Does Perl 6 have a mechanism for implicit coercions? 06:12
i.e. if a sub foo(Int $x) {}; foo(MyClass.new) # Can I define anythin in MyClass to make this work? 06:13
"is Int" doesn't count :p
moritz_ sorear: nothing; it would make multi dispatch too complex 06:27
sorear: you can define sub foo($x as Int) { ... } though
sorear: and then class MyClass { method Int { ... } }
sorear 'as' Int? 06:30
sorear points at t/spec/S06-macros/postfix.t and asks how to implement it 06:31
it's using macro postfix:<!> (Int $n) {... and expecting to coerce the AST
1. Coercions for only dispatch? 06:32
2. Macro calling introspects signatures?
3. The spectest is wrong?
moritz_ 3. 06:33
sorear ok then.
moritz_ it was back from pugs days, and pugs didn't do type checks
sorear Should there be an easy way for macros to expect an argument to be a compile time constant and get the value?
06:34 Guest66879 is now known as kaare_
sorear pugs didn't do macros either. 06:34
moritz_ so many tests from that area are sloppy/wrong with type annotations
pugs: macro foo { say "hi" }; foo
p6eval pugs: OUTPUT«hi␤*** ␤ Unexpected end of input␤ expecting bare or pointy block construct, ":" or identifier␤ Macro did not return an AST, a Str or a Code!␤ at /tmp/JuQc5YOMQl line 2, column 1␤»
moritz_ you're right :-)
sorear oh, looks like pugs *did* do macros :( 06:36
JimmyZ rakudo: sub foo( $x as Int is copy) { say ++$x }; class bar { method Int() { '10' }}; foo(bar.new());
p6eval rakudo 1eef08: OUTPUT«11␤»
sorear I feel so not-pioneering
moritz_ if it had macro support, it was very basic 06:37
JimmyZ rakudo: multi sub foo(bar $x as Int is rw) { say ++$x }; class bar { method Int() { '10' }}; foo(bar.new()); 06:40
p6eval rakudo 1eef08: OUTPUT«Invalid typename in parameter declaration at line 11, near " $x as Int"␤current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)␤»
moritz_ the 'bar $x' is actually the problem
JimmyZ why? 06:41
moritz_ because there's no type name bar
it's declare later on
JimmyZ rakudo: class bar { ... } multi sub foo(bar $x as Int is rw) { say ++$x }; class bar { method Int() { '10' }}; foo(bar.new());
p6eval rakudo 1eef08: OUTPUT«Confused at line 11, near "class bar "␤current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)␤»
JimmyZ rakudo: class bar { ... }; multi sub foo(bar $x as Int is rw) { say ++$x }; class bar { method Int() { '10' }}; foo(bar.new());
p6eval rakudo 1eef08: OUTPUT«Cannot assign to readonly value␤current instr.: '&die' pc 17868 (src/builtins/Junction.pir:393)␤»
JimmyZ rakudo: class bar { ... }; multi sub foo(bar $x as Int is copy) { say ++$x }; class bar { method Int() { '10' }}; foo(bar.new());
p6eval rakudo 1eef08: OUTPUT«11␤» 06:42
JimmyZ oh, it likes C, must pre-declare it
06:44 thowe left
JimmyZ rakudo: class bar { }; multi sub foo(bar $x as Int is copy) { say ++$x }; class bar { method Int() { '10' }}; foo(bar.new()); 06:45
p6eval rakudo 1eef08: OUTPUT«Illegal redeclaration of symbol 'bar'␤current instr.: 'perl6;Perl6;Grammar;_block257' pc 42659 (src/gen/perl6-grammar.pir:274)␤»
06:46 steinberg left 06:51 iblechbot joined 06:52 kst left 06:53 steinberg joined 06:54 kst joined 06:55 thowe joined
JimmyZ how to define non-global classes? 06:59
moritz_ my class ... 07:01
JimmyZ rakudo: my class bar { method Str() { '11'; }; }; multi sub foo(bar $x as Int is copy) { say ++$x }; augment class bar { method Int() { '10' }}; foo(bar.new()); 07:02
p6eval rakudo 1eef08: OUTPUT«Can't augment class bar without 'use MONKEY_TYPING'␤current instr.: 'perl6;Perl6;Grammar;add_name' pc 42888 (src/gen/perl6-grammar.pir:353)␤»
JimmyZ non-global classes shouldn't use MONKEY_TYPING for augment class 07:05
rakudo: my class bar { method Str() { '11'; }; }; multi sub foo(bar $x as Int is copy) { say ++$x }; my augment class bar { method Int() { '10' }}; foo(bar.new()); 07:07
p6eval rakudo 1eef08: OUTPUT«Malformed my at line 11, near "augment cl"␤current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)␤»
moritz_ does the spec say that?
JimmyZ In order to discourage casual misuse of these declarators, they are not allowed on global classes unless you put a special declaration at the top:
sorear just figured out that reusing declarations in the REPL === separate compilation of the setting 07:08
so, topic/lexical-persistence will do both.
JimmyZ So, they are allowed on non-global classes. 07:09
S12:2032
moritz_ sorear: is that good or bad news 07:11
JimmyZ Am I right? 07:12
moritz_ I think so, yes 07:13
feel free to ticket it
JimmyZ OK, thanks, will do 07:14
07:14 rv2733 left
JimmyZ rakudo: my class bar { method Str() { '11'; }; }; multi sub foo(bar $x as Int is copy) { say ++$x }; augment my class bar { method Int() { '10' }}; foo(bar.new()); 07:18
p6eval rakudo 1eef08: OUTPUT«Malformed augment at line 11, near "my class b"␤current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)␤»
07:20 Intensity left 07:29 gfx left
sorear moritz_: good, since PCT's memory usage is O(size of translation unit) 07:33
compile each setting module, then cat pir will use much less memory
although looking at !UNIT_START it may not work quite so well 07:34
!UNIT_START does lots of stuff that should really only be done once; I wonder why e.g. setting up %*ENV is not done in a setting INIT block
moritz_ you may well patch it to do so 07:54
sorear I've already determined that it's impossible 07:56
I'll just patch it to add an explanatory comment, instead
moritz_ rakudo: sub foo($) { say "hi" }; foo(3) 08:19
p6eval rakudo 1eef08: OUTPUT«hi␤»
moritz_ rakudo: sub foo(@) { say "hi" }; foo(3) #should barf 08:20
p6eval rakudo 1eef08: OUTPUT«Nominal type check failed for parameter ''; expected Positional but got Int instead␤current instr.: 'foo' pc 179 (EVAL_1:22219452)␤»
moritz_ rakudo: sub foo(@) { say "hi" }; foo([]) #should barf
p6eval rakudo 1eef08: OUTPUT«hi␤»
moritz_ that should not barf :-)
08:23 dakkar joined
sorear > my $x = 4; 08:23
> say $x;
4
moritz_ \o/ 08:24
does it involve evil sorcery?
black magic?
sorear far less than Devel::REPL does
and what's more, it's *existing* evil sorcery 08:25
I effectively put a YOU_ARE_HERE; at the end of every repl line
(there are a few complications and nicities involved)
moritz_ so you push all lexical symbols onto the setting, effectively? 08:26
sorear yes 08:27
but I keep the old setting around so modules aren't affected 08:28
sorear goes off to implement P 08:31
08:35 TiMBuS joined 08:43 kst left 08:45 kst joined 08:46 uniejo left, meppl left, Tene left, opx^away left, tomaw left, pugssvn left, Gothmog_ left, felipe left, kolibrie left 08:47 uniejo joined, meppl joined, Tene joined, opx^away joined, tomaw joined, pugssvn joined, Gothmog_ joined, PZt joined, Maddingue joined, f00li5h joined, estrabd joined, mathw joined, kolibrie joined, card.freenode.net sets mode: +v pugssvn
sorear What's the difference between <foo> and <.foo> ? 08:48
moritz_ <.foo> doesn't capture 08:50
08:51 xabbu42 joined 08:53 zag joined
sorear ah 08:53
moritz_ I can recommend S05 -- it's a good read :-) 08:54
sorear the synopses can be read ten times and they're still good reads. 08:55
I think I'm at #7 or so for S05
moritz_ :-) 08:56
sounds like my number of passes, too
the first few times I didn't know what to make of that weird "longest token matching" 08:57
sorear I've hung around lex(1) long enough to know exactly what that means, but I still haven't quite figured out how Perl implements it 09:00
(which did not help when I had to hack protoregexes in NQP-rx for syntactic category macros) 09:01
moritz_ nqp-rx doesn't really implement it
which is the culprit
it only implements longest constant prefix
I've tried to explain my understanding of LTM here: perlgeek.de/en/article/longest-token-matching 09:02
(I guess I've given you that link before, sorry for spamming...)
09:02 clintongormley joined
JimmyZ rakudo: sub postfix:<++++>($a is copy) { ++++$a}; my $a = 2; $a++++.say; 09:03
p6eval rakudo 1eef08: OUTPUT«4␤»
JimmyZ rakudo: my $a = 2; $a++++.say;
p6eval rakudo 1eef08: OUTPUT«Cannot assign to readonly value␤current instr.: '&die' pc 17868 (src/builtins/Junction.pir:393)␤»
moritz_ it should die like this in the first place 09:04
because ++$a returns should return an immutable integer
s/returns//
JimmyZ that may be a bug 09:05
rakudo: my $a = 2; $a++.++.say; 09:06
p6eval rakudo 1eef08: OUTPUT«Could not find sub &postfix:<.>␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
moritz_ rakudo: my $x =3; say ++++$x
p6eval rakudo 1eef08: OUTPUT«5␤»
moritz_ that is the bug, yes
JimmyZ I will submmit it. 09:07
moritz_ JimmyZ++ # putting on masak's hat 09:10
JimmyZ :) 09:12
++++ is LTM, I think
moritz_ i't parsed as to prefix:<++> 09:13
otherwise you wouldn't get 5 in the example above
JimmyZ rakudo: sub postfix:<++++>($a is copy) { $a+=2 }; my $a = 2; $a++++.say; # I meant this one. 09:14
p6eval rakudo 1eef08: OUTPUT«4␤»
JimmyZ rakudo: sub prefix:<++++>($a is copy) { $a+=2 }; my $a = 2; ++++$a.say;
p6eval rakudo 1eef08: OUTPUT«2␤»
kaare_ The new proto.perl6.org/ ++
JimmyZ rakudo: sub prefix:<++++>($a is copy) { $a+=2 }; my $a = 2; (++++$a).say;
p6eval rakudo 1eef08: OUTPUT«4␤»
moritz_ patrickas++
JimmyZ rakudo: sub prefix:<++++>($a is copy) { $a+=2 }; my $a = 2; ++++$a.say; # Is it output rightly? 09:15
p6eval rakudo 1eef08: OUTPUT«2␤»
09:15 quester_ joined
JimmyZ rakudo: my $a = 2;++$a.say; 09:16
moritz_ yes
p6eval rakudo 1eef08: OUTPUT«2␤Cannot assign to readonly value␤current instr.: '&die' pc 17868 (src/builtins/Junction.pir:393)␤»
moritz_ that's correct too
JimmyZ rakudo: my $a = 2; (++$a).say;
p6eval rakudo 1eef08: OUTPUT«3␤»
moritz_ and that too :-)
JimmyZ rakudo: my $a = 2; ++($a.say); 09:17
p6eval rakudo 1eef08: OUTPUT«2␤Cannot assign to readonly value␤current instr.: '&die' pc 17868 (src/builtins/Junction.pir:393)␤»
JimmyZ rakudo: sub prefix:<++++>($a is copy) { $a+=2 }; my $a = 2; (++++($a.say)).say;
p6eval rakudo 1eef08: OUTPUT«2␤3␤»
JimmyZ rakudo: sub prefix:<++++>($a is copy) { $a+=2 }; my $a = 2; (($a.say)).say;
p6eval rakudo 1eef08: OUTPUT«2␤1␤»
JimmyZ I know , it should be 'is rw' 09:18
09:21 felipe joined
JimmyZ rakudo: sub prefix:<++++>($a is rw) { $a+=2 }; my $a = 2; (++++$a).say; 09:23
p6eval rakudo 1eef08: OUTPUT«4␤»
09:23 Intensity joined 09:24 kst left 09:27 kst joined 09:44 zag left 09:48 proller_ left 09:51 quester_ left
sorear > my $x = 12; 09:58
12
> $x += 5
17
moritz_ what does it print? .perl? 10:00
or .Str?
sorear &say()
moritz_ ok, that converts to Str 10:01
10:01 agentzh left
moritz_ rakudo: class A {}; say A.new 10:01
p6eval rakudo 1eef08: OUTPUT«A()<0x4183bd8>␤»
moritz_ you'd get a similar output for that, right?
sorear lexical persistence and the P in REPL are on topic/lexical-persistence
10:01 agentzh joined
sorear > class A {} 10:01
!class_init_10
> A.new
A()<0xbbae568>
I wonder what !class_init_10 is 10:02
10:04 agentzh left
JimmyZ rakudo: class A { method Str() { 'Hi'}; }; say A.new 10:04
p6eval rakudo 1eef08: OUTPUT«Hi␤»
sorear upgrades Parrot, rebases branches, then moves on to the next unclaimed **** item on ROADMAP
moritz_ sorear: should I add your name to "Perl 5 interop"? 10:06
sorear oh, and I'm also going to implement masak's macro feature and look at his bug
moritz_: yes
moritz_ sorear: while you are at it... 10:08
2 ** custom operators for circumfix:, postcircumfix: (B, pmichaud)
seems pretty close to me to what you do, no?
sorear moritz_: I can take a request 10:09
moritz_ issues a request
sorear right now I'm just going for "hard fun ROADMAP items" 10:10
taken.
moritz_ sorear++
sorear are we checking stuff off the roadmap? 10:11
moritz_ yes 10:12
sorear hmm, I can comment on a few of these
moritz_ it's usually moved down to 'Completed ROADMAP items'
sorear: did you already submit a perl foundation CLA?
sorear not yet. 10:13
moritz_ sorear: please do, if you want a commit bit at some point
dalek kudo: 124895a | moritz++ | src/pmc/ (2 files):
switch two PMCs to auto_attrs. Patch courtesy of Vasily Chekalkin
10:15
kudo: 60c23d9 | moritz++ | docs/ROADMAP:
[docs] update ROADMAP

comment on progress of some items
moritz_ oh, I thought I had pushed bacek's patch yesterday
sorear also makes a note to work on operator overloading / scoping / precomp 10:20
making *that* work will involve adding slangs to our parser
which seems like the next big step towards STD 10:21
sorear spectests topic/lexical-persistence 10:23
sorear &
10:24 iblechbot left, viklund joined 10:37 kst left 10:39 kst joined 10:40 mikehh left 10:46 JimmyZ left 10:55 muixirt joined
muixirt proto did complain about missing 'projects.state' file in the first run 10:56
ping moritz_ 10:57
proto did report that the json module build failed but installed it anyways. 10:59
error message in log was: Illegal redeclaration of symbol 'JSON::Tiny' 11:00
moritz_ muixirt: pong 11:11
muixirt: JSON::Tiny is known not to work with current rakudo
muixirt: because it regeressed on much that's related to match objects
so the data extraction from the parse tree fails horribly 11:12
muixirt moritz_: ok, i thought this was fixed
moritz_ I'm working on it, but it's not easy
11:16 yinyin left
moritz_ (and I'm doing way too many projects in parallel) 11:17
11:18 _jaldhar joined
muixirt why is 'zavolaj' not mentioned on the shiny new proto page? 11:19
moritz_ because nobody put it in projects.list 11:20
adn that's where the proto page is generated from
11:21 literal joined
muixirt afk 11:21
11:27 masak joined
masak oh hai, #perl6 11:27
phenny masak: 01:12Z <lue> tell masak ooh! That could come in handy ( esp. considering one of my theories involves codons :) )
masak whose doesn't? :P
11:28 ruoso left 11:30 TiMBuS left
snarkyboojum hai masak 11:31
masak snarkyboojum: \o 11:32
snarkyboojum o/
masak snarkyboojum: this month for Yapsi, there are quite a few possible roads to take. they all involve blocks of different kinds. if statements, while loops, subroutines, BEGIN blocks, other phasers... 11:40
11:41 kst left
snarkyboojum masak: are you thinking control flow next? 11:41
moritz_ sings "the first phaser's the hardest" (with apologies to Cat Stevens
masak :)
snarkyboojum: yeah. control flow is probably the least involved of those. 11:42
we need a few more opcodes, and a plan for how to do jumps.
snarkyboojum masak: in that case let's go for the hardest :P
masak nothing prevents us from investigating things in many branches :)
moritz_ I guess BEGIN is the hardest
masak actually, BEGIN could be pretty easy. now that we have detachable environments. 11:43
but I can't claim to understand the surrounding model quite yet.
11:43 iblechbot joined
masak for example, I found this in S04 on the train today: 11:44
'Some closures produce C<Block> objects at compile time that cannot be cloned, because they're not attached to any runtime code that can actually clone them. C<BEGIN>, C<CHECK>, C<INIT>, and C<END> blocks fall into this category. Therefore you can't reliably refer to run-time variables from these closures even if they appear to be in the scope.'
11:44 kst joined
masak I have no idea what it means, but it sounds bad. :( 11:44
moritz_ and it kinda sounds wrong-ish
masak I'm glad you say that. 11:45
moritz_ I agree with the first part: you can't clone them in runtime code
because they have been evaluated at that time already, and you don't have a reference to them
masak *nod*
moritz_ but why does that mean you can't reliably refer to variables from them? 11:46
I mean they don't present themselves as closures to the runtime code
masak things like `my &b := BEGIN { say "LOL" }` are pretty meaningless.
moritz_ ok, I agree with that
maybe even with `my $c = BEGIN { my $x =3; -> $y { $x * $y } }` 11:47
since BEGIN isn't visisble as a closure, that will likely fail 11:48
but
my $x; BEGIN { $x = 3 } should work IMHO
masak aye.
moritz_ maybe that's what the paragraph actually means to say
masak let's hope so.
rakudo: say Nil.defined 11:49
p6eval rakudo 1eef08: OUTPUT«0␤»
masak submits rakudobug
rakudo: say ().defined
p6eval rakudo 1eef08: OUTPUT«0␤»
moritz_ "You can't transfer BEGIN closures to runtime"
takadonet morning all 11:50
moritz_ muixirt: what's wrong with that?
erm, I meant masak
masak moritz_: S02 states that Nil.defined is true. 11:51
moritz_ now that's weird
my $x = { }.()
then $x is defined? wtf?
masak S02:2142 11:52
moritz_: well, when you assign Nil to a scalar, you get that scalar's undefined type object, no?
S02 says so too.
moritz_ ouch
masak S02:2144 :) 11:53
moritz_ so assignment special-cases Nil
masak aye.
has been doing so for quite a while.
moritz_ rakudo: my $x = (); say $x.defined
p6eval rakudo 1eef08: OUTPUT«1␤»
moritz_ rakudo: my $x = (); say $x.perl
p6eval rakudo 1eef08: OUTPUT«()␤»
moritz_ rakudo: my $x = (); say $x.WHAT 11:54
p6eval rakudo 1eef08: OUTPUT«Seq()␤»
masak all those are wrong, I think.
moritz_ so how would you place an empty parcel into a scalar?
11:54 Su-Shee joined
Su-Shee heyho. 11:54
moritz_ holla Su-Shee, que tal? 11:55
Su-Shee in principle (besides nyi) - how difficult is it going to be to make DSLs in rakudo?
moritz_ easy 11:56
11:56 felipe left
Su-Shee nice. 11:56
moritz_ for example quotes are basically a DSL
defined in STD.pm in terms of delimiters, and which parts of the "normal" Perl 6 take part 11:57
likewise regexes
Su-Shee I was just reading through my blogs and all and realized that DSLs seriously take off (or I'm as usal the last one getting it ;) and that that's a serious limit of p5. (afaik at least..) 11:58
moritz_ well, p5 is a fairly mallable if you are clever
but I'm not, I fear 11:59
Su-Shee oh that level of clever? missed that already before birth. ;)
moritz_ I mean you can do things like
sub foo { ... }; foo sub bar { ... }
and then foo can do things with &bar 12:00
masak that's not a DSL. that's just a sub. :)
moritz_ masak: well, providing an appropriate sub is already a DSL in some way
it's a fairly crude one, but it's a start
masak I belong to a staunch set of people who disagree with that it is a DSL.
call a shovel a shovel, and a sub a sub. 12:01
moritz_ and perl 5.12 supports custom hooks for new keywords
masak no need to bring out the fancy vocab for mundane things.
moritz_ masak: I remember that when quitefantastic++ used that trick, you were quiet amazed
masak I was.
I remember it too.
that doesn't mean I think it was a DSL. :)
12:01 bluescreen joined
Su-Shee well it _seems_ like creating DSLs is much easier in Ruby and I'm trying to get to the bottom of it. 12:01
masak many Ruby proponents seem to think that subs are DSLs. 12:02
moritz_ Su-Shee: please report what you find, when you do
12:02 bluescreen is now known as Guest3356
Su-Shee well I probably see it somewhat loosely - I would consider a DSL if you take PerlPythoNRubyJavaScriptRakudoFoobar and create a tiny language with its own syntax. which not necessarily looks like the language it is written in. 12:03
pmichaud good morning #perl6 12:06
masak pmichaud: \o 12:07
Su-Shee: define 'take PerlPythoNRubyJavaScriptRakudoFoobar'. somehow I'm not satisfied when people are so exceedingly proud of the naming of their subroutines, and the fact that they are using very few parentheses, that they choose to call what they created 'a DSL' instead of (say) 'an API'. 12:08
I remember Aristotle and chromatic writing about this in 2007: use.perl.org/~Aristotle/journal/34004 use.perl.org/~chromatic/journal/33898 12:09
takadonet pmichaud: morning
masak posts well worth reading.
moritz_ indeed :-) 12:11
12:13 proller joined
masak in short, I think the term 'DSL' should be reserved for things that actually are other languages, and just a restricted way of using your host language. this may be an uphill battle, but if it were lost, 'DSL' would be the proudest buzzword in town. and that would be too bad, because it can be a very useful concept. 12:13
moritz_ +1
sorry for using the rubyish terminology in the first place 12:14
masak sorry for ranting :)
moritz_ the rants on the blogs were actually quite amusing :-)
masak yes :)
12:15 lrnperl6 joined
lrnperl6 morning all 12:15
moritz_ reads trac.parrot.org/parrot/wiki/ParrotQuotes again and chuckles
masak I have always loved the phrase "If I had to maintain his code I’d refactor that part out of existence I<with a quickness>!"
moritz_ lrnperl6: good morning
masak lrnperl6: morning!
moritz_ lrnperl6: I hope you're not too disappointed to learn that somebody else was quicker with the script for proto 12:16
lrnperl6 I am :)
pmichaud rants? blogs? what did I miss?
moritz_ lrnperl6: then be comforted by 1) the fact that we now have proto.perl6.org/ and 2) that there will be another challenge next week 12:17
pmichaud: that last 10 minutes, it seems
lrnperl6 that looks good 12:18
moritz_ aye; I'm quite amazed by the good collaboration that emerged
patrickas contributed the script, I set up the sub domain, masak urged us to use dl/dd/dt, isBEKaml and patricks did the rest 12:19
or somthing like that :-) 12:20
masak it was astounding!
lrnperl6 you guys are too fast
_sri masak: make sure to check out ruby cucumber, i don't like it but it shows how far ruby DSLs can go
masak there'll be a new task next week :)
_sri: I know about it.
_sri: chromatic had this to say about it the other day: twitter.com/chromatic_x/status/13320560727 12:21
_sri: don't know how accurate that criticism actually is; haven't actually tried cucumber. 12:22
lrnperl6 I have a question 12:23
masak fire away.
12:24 rv2733 joined
lrnperl6 for all (novel) features which perl6 will support, do we have applications/examples of those 12:26
or perlcabal.org/syn/ is all we have got
masak it's funny you ask.
because yesterday we made a page... :)
proto.perl6.org/
moritz_ the projects actually use most of the implemented features 12:27
masak there you'll find plenty of applications and examples.
some of which even work!
:)
moritz_ but there's no structured list of example for all features, sorted by synopsis or so
masak there's the Advent Calendar. 12:28
it probably best approximates such a list of features.
u4x contains ample examples for all features, but has the drawback that it doesn't exist yet.
12:29 proller left
lrnperl6 just an idea: can we have a attributes to each project(listed on proto) where it tells novice like me how it is benefited by perl6 12:29
masak challenge for some intrepid Perl 6 module developer: an XML module that makes editing XML fun. :)
lrnperl6 maybe a separate page for each project 12:30
masak lrnperl6: could you be more specific? an example, perhaps? 12:31
_sri masak: call it declarative api instead of DSL if you like, but ruby can make complicated things look amazingly clean thanks to implicit invocants, optional braces and the magical block argument all methods accept
moritz_ lrnperl6: the page can certainly be extended; for example indicators whether a particular project has tests, a README, date of last activity...
lrnperl6: I'd certainly consider such an extension as another successful submission :-) 12:32
lrnperl6 say a csv parser. page saying how easy it was to use perl6 for this. I am not saying that perl6 is best for all the application
_sri masak: and here's a perfect example teachingkids.railsbridge.org/2009/0...girls.html 12:34
masak _sri: yes. 'declarative API' is a good name. 12:35
_sri (or moritz)
masak and Shoes is very nice.
_sri nods
12:36 SmokeMachine joined
lrnperl6 moritz_: but we have link to github where we have information regarding README, last activity etc 12:36
moritz_ lrnperl6: true 12:37
12:39 kst left 12:41 kst joined 12:49 jonasbn left
masak lrnperl6: I can tell you a bit about the CSV parser. I wrote most of that. 12:50
lrnperl6: it was developed using TDD, first without a priori knowledge about other CSV parsers or standards, and later with some of that.
I remember it as being a fun weekend of coding.
Perl 6 is a good fit because it has grammars. 12:51
it would have been a pain to do multiline parsing without that.
moritz_ has to attend a boring safety instruction 12:54
pmichaud the thrilling safety instructions are sometimes less desirable. :-) 12:55
12:58 ruoso joined
masak is reminded of picturesforsadchildren.com/index.php?comicID=72 12:58
pmichaud I'm told the Internet is beneficial to society... sometimes I'm not so sure about that. :) 13:01
obra pmichaud: sure it is. it keeps us crazy people away from society 13:04
PerlJam obra: society is us. 13:05
obra :) 13:06
13:11 pmurias joined
lrnperl6 masak: exact description i was talking about :) 13:13
masak lrnperl6: usually I put that in blog posts :) 13:15
for this particular project, that wasn't meant to be, though.
lrnperl6 masak: then we can have link to blog posts on project page :)
masak lrnperl6: that's an interesting idea. 13:17
lrnperl6: I'd like to see a solution based on the repo, though. so the build script would pull some given file from the repo, expecting links to blog posts.
I'll put together such a list for November, as an example. 13:20
13:31 mikehh joined 13:36 tylerni7 left, BrowserUk joined 13:37 kst left 13:39 kst joined, kaare_ left 13:40 tylerni7 joined, tylerni7 left, tylerni7 joined, plobsing joined
lrnperl6 wild(&bad) idea: a script to parse perl6 code to deduce what features it uses :) 13:44
masak definitely possible. 13:45
should probably base itself on viv.
lrnperl6 masak: now the trouble: what is viv. already searching for it :)
masak I'll be doing some similar things in the next few weeks: code analysis, etc.
lrnperl6: I'll get the URL for you.
lrnperl6: svn.pugscode.org/pugs/src/perl6/ 13:46
in this directory, you will find STD.pm6, the standard Perl 6 grammar.
using it, we can check whether our Perl 6 syntax is ok.
std: "this is OK, OK?"
p6eval std 30549: OUTPUT«ok 00:01 109m␤»
masak std: NotOk.WHAT 13:47
p6eval std 30549: OUTPUT«===SORRY!===␤Undeclared name:␤ 'NotOk' used at line 1␤Check failed␤FAILED 00:01 107m␤»
masak now, whereas the std target in p6eval only says 'ok' or 'not ok', the viv script in that directory will give you a whole parse tree.
containing loads of lex and structure information. 13:48
lrnperl6 masak: so it's matter of querying viv for required information, right?
masak yes.
it's output in YAML, so you'll need something to read the YAML. 13:49
that's still sorely lacking in Perl 6, so Perl 5 is probably the best option for now.
then you can traverse the data structure, looking for features somehow.
lrnperl6 masak: so viv has information before eval? 13:50
PerlJam one of my coworkers just asked how I feel about installing Rakudo on one of our servers :)
masak lrnperl6: please restat your question :) 13:51
s/restat/restate/
PerlJam: cool!
lrnperl6 masak: just found this "Unfortunately, 'viv' is not equipped to execute the code" at www.perlfoundation.org/perl6/index.cgi?viv
masak lrnperl6: neither STD.pm6 nor viv executes code. 13:52
13:52 proller joined 13:54 PacoLinux joined
PerlJam (whoever is packaging Rakudo in Fedora releases)++ 13:55
lrnperl6 PerlJam: what is with "++"?
PerlJam lrnperl6: karma 13:56
moritz_ incrementing karma
buu: karma moritz_
buubot: karma moritz_
buubot moritz_: moritz_ has karma of 377
moritz_ buu: sorry :-)
buubot: karma moritz
buubot moritz_: moritz has karma of 1208
moritz_ buubot: karma lrnperl6
buubot moritz_: lrnperl6 has karma of
moritz_ lrnperl6++
PerlJam The reason my coworker asked about rakudo was because he noticed there's a Fedora package for it.
moritz_ buubot: karma lrnperl6
buubot moritz_: lrnperl6 has karma of
lrnperl6 buubot: karma lrnperl6
buubot lrnperl6: lrnperl6 has karma of
PerlJam (and I've been talking about using it "for real" for a while now :)
lrnperl6 does that meanI Infinity :) 13:57
s/meanI/mean/
moritz_ lrnperl6: 2x infinity, actually :-)
masak buubot: karma TimToady 13:58
buubot masak: TimToady has karma of
moritz_ lrnperl6: I think not all karma is currently tracked, due to some bug... but I have log files, and will a script that extracts the karma at some point
lrnperl6 infinity of infinity
PerlJam aleph infinity
moritz_ "what's a cardinal higher than the pope? 2 to the pope" 13:59
13:59 tedv joined
lrnperl6 wow. TimToady is L Wall 14:00
tedv Welcome to 1997!
lrnperl6 (again) wow, tedv is tedv :)
tedv indeed! 14:01
masak how would you turn a file upside down with a Perl 6 one-liner?
arnsholt masak: Turn it upside down? 14:02
moritz_ say for open('filename').lines.reverse
tedv .say for open($file, :r).lines.reverse
omg I'm beaten
masak arrived at this: .say for reverse lines("the.file")
tedv was SO close
moritz_ tedv++ # using .say correctly
tedv: well, your answer was correct, mine wasn't :-)
masak arnsholt: print the last line first and vice versa.
lrnperl6 tedv++
tedv Anyway, so I've been thinking (again) about getting into perl6 stuff more 14:03
masak good for you!
tedv as I understand it, the general procedure for helping out looks like...
PerlJam lines("file").reverse.say doesn't work?
arnsholt masak: Yeah, that's what I guessed, but I wasn't quite sure
tedv write simple perl 6 stuff -> find bugs -> add unit tests -> fix source code
masak PerlJam: you wouldn't get newlines.
moritz_ tedv: that's one way, yes
PerlJam masak: they're automatically removed in the call to lines() ? 14:04
tedv well I'm still learning syntax
masak PerlJam: yes.
tedv the more I use perl 6, the more it feels very much like perl, just not like perl 5
PerlJam clearly didn't remember that
masak PerlJam: most input autochomps.
tedv I think that's a good thing though
14:04 leedo joined
moritz_ tedv: that's very much how I feel about Perl 6 too 14:04
pmurias diakopter: hi 14:05
phenny pmurias: 04 May 23:09Z <diakopter> tell pmurias hi
14:05 leedo left
pmurias :) 14:05
tedv So would a reasonable short term goal be to add more unit tests to the pugs svn repository?
moritz_ yes
tedv: do you have a commit bit already? 14:06
tedv No, I don't
nor have I been briefed on general etiquit
etiquite?
moritz_ tedv: then tell (or /msg) me your email address, and I'll give you one
masak 'be polite.'
tedv anyway, how not to burn down the house
moritz_ tedv: it's a version control system; if you screw anything up, the worth thing that can happen is that we have to revert it 14:07
tedv yeah but that costs people time
PerlJam lines("filename" :!chomp).reverse.say # just because I was forced to look at the docs ;)
tedv and if I'm costing other people time, I'm not really helping
TMTOWTDI!
moritz_ tedv: that's ok. Just don't make it on purpose
masak PerlJam: :)
moritz_ tedv: in general we say forgiveness is better than permisson
tedv Truth
moritz_ PerlJam: but then use .print, otherwise you get one extra newline 14:08
masak PerlJam: I didn't know we had a flag there that defaults to true. that's usually a design smell.
PerlJam moritz_: ah, you're right!
tedv Does Rakudo's make spectest run the full suite (minus rakudo skip flagged tests)?
masak no.
moritz_ tedv: not all, but quite many
PerlJam moritz_: say is just so seductive :)
tedv So what is the best way to make sure I'm adding legitimate test cases?
masak lrnperl6: I made a list of the blog posts related to November: github.com/viklund/november/blob/ma...g-posts.md
moritz_ tedv: and if you add new tests to files that rakudo passes, it's polite to check them with rakudo 14:09
masak lrnperl6: perhaps other projects can also use that format, and we could link to the list from proto.perl6.org
moritz_ tedv: if rakudo doesn't pass them, but you think the test case is right, fudge them out
tedv: in case of doubt, just ask
PerlJam tedv: #perl6 does a good job of shepherding when needed.
tedv alright. I've seen past examples in the test files
14:09 mberends joined
tedv Is there a list of "unit tests that need to be written"? 14:09
moritz_ tedv: we're also very forgiving to newcomers; if you do something wrong, we'll tell you without yelling :-) 14:10
tedv That Is The Perl Way
moritz_ tedv: t/spec/ contains a TODO file, let me check how up-to-date it is
lrnperl6 moritz_: we have information for each project listed on proto; like the one masak has for november 14:11
dalek vember: 6d57c89 | masak++ | docs/blog-posts.md:
[docs/blog-posts.md] links to all known posts

Definitely missed some from other people. Feel free to supplement.
vember: 4e56a14 | masak++ | docs/blog-posts.md:
[docs/blog-posts.md] fixed copy-paste-o
masak huh. :)
mberends \o from a vacation street-wifi! (may disconnect at any time)
masak mberends! \o/
tedv The last thing I noticed when playing around with rakudo was that some scripts seemed really slow. Slower than could be pinned on the VM alone. 14:12
mberends masak: I'm working offline on tools/test-summary.pl per-test benchmarking :)
moritz_ tedv: I'll need to go through the TODO file soon; but for example the one listed for S06 seems up-to-date, as well as S11
masak mberends: sounds nice.
tedv My best guess is that Rakudo has some serious inefficiencies in how it throws around lists
PerlJam tedv: almost nothing is optimized. 14:13
tedv I've seen a lot of comments saying Rakudo doesn't support lazy list evaluation
moritz_ it does now, to some extend
tedv I wrote a block of code that was like...
moritz_ rakudo: (1..10).map({say "here"})
p6eval rakudo 1eef08: ( no output )
masak mberends: lately, I've been toying with the idea of making a script to count the spectests.
moritz_ rakudo: (1..10).map({say "here"}).eager
tedv for $input_file.lines { ... }
p6eval rakudo 1eef08: OUTPUT«here␤here␤here␤here␤here␤here␤here␤here␤here␤here␤»
masak mberends: on a per-file basis.
tedv where the file was several megabytes long
and it never even got inside the block
moritz_ tedv: yes, 'for' isn't lazy yet 14:14
tedv: it needs to be, but there's a problem with it...
tedv what's the problem?
pugssvn r30550 | pmurias++ | [mildew] added some deps to dist.ini and the mildew executable is
r30550 | noticed by Dist::Zilla
moritz_ we don't recognize "void" context (called "sink" context in Perl 6)
mberends masak: do you mean a sort of anti-A-cunning-no_plan?
moritz_ so for 1..3 { .say } wouldn't print anything
if for was mady lazy right now
which would break just about all existing programs :-)
tedv sink is something you put on the tail of a loop that evalutes code but still returns false, right? 14:15
When exactly does the sink execute? If the last statement in the loop block is false?
masak mberends: depends on the value of 'anti', I guess. but yeah, something to counteract the 'no plan' things.
moritz_ tedv: all expressions that aren't assigned or bound to something else are considered to be in "sink" context
masak mberends: mostly because I'm interested in the actual exact number :)
moritz_ sub foo { a; b; c}
tedv ah so it's not just a loop thing
masak mberends: but also because I'd like to graph the spectests, and show implementations coverage. 14:16
moritz_ a and b are in sink context
c isn't
mberends masak: have you read the existing work on that problem in tools/test_summary.pl?
masak no.
masak does that now
mberends it outputs what the totals *should* be
tedv so for loops are always in sink context. What does this have to do with "sink { ... }"
moritz_ std: my @x = for 1..2 { } 14:17
p6eval std 30549: OUTPUT«===SORRY!===␤Word 'for' interpreted as a listop; please use 'do for' to introduce the statement control word at /tmp/ZpaeE4Dire line 1:␤------> my @x = ⏏for 1..2 { }␤Unexpected block in infix position (two terms in a row) at /tmp/ZpaeE4Dire
..line…
masak mberends: what does that mean?
moritz_ std: my @x = do for 1..2 { }
p6eval std 30549: OUTPUT«ok 00:01 108m␤»
moritz_ tedv: not always sink context
tedv: sink { ... } just puts the block in sink context
tedv ahhh I got it
masak mberends: it says 'Implementing 'no_plan' or 'plan *' in test scripts makes this total (sic) # inaccurate.' 14:18
tedv std: @x = do for 1..2 { 5; 3; }; @x.say;
p6eval std 30549: OUTPUT«===SORRY!===␤Variable @x is not predeclared at /tmp/xj6BZ71QYb line 1:␤------> @x⏏ = do for 1..2 { 5; 3; }; @x.say;␤Variable @x is not predeclared at /tmp/xj6BZ71QYb line 1:␤------> @x = do for 1..2 { 5; 3; }; @x⏏.say;␤Check
..f…
tedv std: my @x = do for 1..2 { 5; 3; }; @x.say;
p6eval std 30549: OUTPUT«ok 00:01 108m␤»
moritz_ tedv: std only checks syntax, doesn't execute code
tedv curse you std! :[
moritz_ but it's smart about the syntax, to be sure :-) 14:19
tedv but I assume @x should be bound to (3,3)?
masak mberends: I'm thinking semi-ambitiously; something which went looking for 'is' and 'ok' things, and perhaps even knew a bit about for loops.
moritz_ tedv: yes
mberends masak: tools/test_summary.pl counts the actual tests run, and if a test script begins with 'plan *;' it outputs a report saying what the actual number should be, in case someone feels like editing the test script.
lrnperl6 got to go
tedv if I write: @x = for @foo { ... } sink { }
Then when does the sink execute? 14:20
masak mberends: aha. but that requires the test file to be runnable by Rakudo, no?
moritz_ assuming you put a : after the first } ...
after the loop
mberends masak: yes, true
moritz_ but it doesn't do anything
because the block is empty
tedv I forgot the second ...
@x = for @foo { ... }: sink { ... }
moritz_ std: sink <foo bar>.map: { say "hi" }
masak mberends: I was hoping to be Rakudo-independent. I could imagine leaning on viv.
p6eval std 30549: OUTPUT«ok 00:01 108m␤»
tedv so the sink would execute after the loop but before the @x assignment?
14:20 kst left
mberends masak: things like fudging and loops play havoc with static test counting 14:21
moritz_ tedv: no, it would be totally unrelated to the loop
tedv: you have to say 'sink' *before* the thing you want to put in sink context
masak mberends: fudging won't affect the number of actual tests.
14:21 kst joined
masak mberends: loops are a problem. I'd like to see how far I get :) 14:21
tedv oh so the problem with for loops not understand sink context is if you want to write sink { for @x { ... } } 14:22
moritz_ no
mberends masak: I agree with your sentiment though. 'plan *;' does not help our reporting...
tedv heh okay I'm trying here
moritz_ the problem is that sink context mostly should be *automatic*
tedv can you give me a block of code that shows how rakudo loops have trouble with sink context?
moritz_ rakudo: for <a b> { .say }
p6eval rakudo 1eef08: OUTPUT«a␤b␤»
masak mberends: I never said that. :) but I guess you're right. 14:23
moritz_ tedv: imagine that 'for' was being executed lazily
tedv: then what would happen?>
masak nothing.
moritz_ right
so
tedv Still thinking through this 14:24
moritz_ we need a mechanism to make sure that 'for' is in sink context *unless put into another context*
14:24 plobsing left
moritz_ so that a bare 'for ...' is in sink context 14:24
but a '@x = do for ...' is not
PerlJam moritz_: you didn't get a lot of feedback on your proposal on p6c did you? :)
tedv by "nothing" you mean nothing would get printed?
moritz_ tedv: right 14:25
masak lue++ # rdstar.wordpress.com/
14:25 viklund left
tedv I think I don't understand lazy evaluation then 14:25
lazy means "don't get the value until you need them"
moritz_ PerlJam: I got feedback from most of the "important" people on IRC
tedv oh I get it
because the sink context doesn't need any values out of the for loop
moritz_ right - you never need them
tedv it doesn't evaluate the block
moritz_ well, sink context enforces eager evaluation
but we don't have sink context yet 14:26
tedv So for loops are supposed to default to sink context so that they work the way people think they should intuitively
?
mberends masak: I do intend to edit 'plan *;' back to 'plan \d+;' where appropriate, meaning where the number is tests in the script shows little likelihood of changing.
moritz_ tedv: *all* statements are supposed to default to sink context, unless the value is captured somehow 14:27
by an assignment, or by being the return value of a block
and 'for' is one of them
tedv and lazy evaluation will only trigger when the value is captured
masak mberends: it's not always \d+, though.
tedv which, I suppose is the whole point of lazy eval
masak mberends: sometimes it's +@tests
or +@tests * 3
mberends masak: I'd better leave those alone then ;-) 14:28
moritz_ *sigh* not quite
tedv maybe I should hold off on writing unit tests for a while and get more familiar with the language
masak mberends: I mean, sometimes it makes more sense to change from * to such an expression that to \d+
moritz_ tedv: it's a complicated piece of the language
my $x = <foo bar>.map({ ... })
tedv thats fine, I'm not giving up
moritz_ does not execute the block of the map 14:29
but it stored the lazy list in $x
so
if you iterate over $x, the block gets executed
mberends masak: would such a change help you in your endeavours too?
moritz_ that's the "normal" laziness you might know from haskell
but if you write
<foo bar>.map({ ... })
there's no reason for that statement at all 14:30
because nothing happens
tedv even if the ... has side effects?
moritz_ if the return value is lazy
so we assume that the ... has side effects, and the author really wand the ... to be executed
*wanted
and that's what sink context is for 14:31
it causes throw-away values to behave like eager lists
tedv lets say you write: my $x = <a b c d e>.map({ ... }); my $y = $x[4]
Will that evaluate the whole list or just the map at the last value? 14:32
masak mberends: assuming the plans are correct, sure. it's easier to count elements of an array than to parse a whole file for an open set of sub calls. :)
tedv ack, I have a meeting; back later
moritz_ tedv: it will evaluate the block until there are 5 items in the return list
tedv: a block can return more than one item, or none at all
[particle] or one. 14:33
PerlJam moritz_: a minor thing, but it will evaluate until there are *at least* 5 items in the list
moritz_ yes; but that's boring :-)
masak mberends: here's the zoology of the non-digit plans in t/spec: gist.github.com/390842
[particle] :)
mberends masak: oh wow! It will be interesting to see what develops. I hope to complete the test_summary.pl in the next 2-3 days. Give the current one a try in the meantime. 14:34
masak mberends: so, for the formulaic variants, all the cases seem to be covered by A + @array * B + @otherarray * C :) 14:35
PerlJam moritz_: I mean, the first evaluation may generate 20 things and I don't think perl is going to "look deeper" into the execution path to make sure it only gets 5.
masak mberends: I will. thanks.
moritz_ PerlJam: yes, you're right
I just try to hide some details in the first explanation :-)
Su-Shee (I was talking - before I was sucked into the meeting vortex - exactly about the cleansiness _sri mentioned..) 14:37
mberends disconnects with browser tabs full of lovely irclogs :)
14:37 mberends left
moritz_ mberends: want an sql dump? :-) oh too late... 14:38
14:38 rgrau_ joined
moritz_ masak: I find it funny that you use 'grep -v' once, and perl 'ne 'print unless /$regex/' in the same one-liner :-) 14:39
masak moritz_: trial and error. :) I couldn't make grep -v do what I wanted the second time. 14:40
moritz_ masak: you probably need -E for \d+
14:40 lrnperl6 left
moritz_ for "extended" regexes 14:41
masak ah.
makes sense.
moritz_ more or less :-)
and I like the output if you add a -c to the final uniq call
14:41 clintongormley left, elmex left, jotr left, japhb left 14:42 SmokeMachine left
[Coke] (grep -E) : see also "ack" 14:42
14:42 elmex joined
[Coke] ... especially if you're using avoiding .svn dirs. 14:42
moritz_ aye, ack++ 14:43
alester masak: ack will change your life.
14:45 molaf joined, uniejo left
masak alester: ack figured in my trial-and-error :) 14:46
moritz_ alester: any chance getting some perlbuzz coverage for perlgeek.de/blog-en/perl-6/contribu...ounce.html when the second challenge comes out next week?
masak it could probably have done what I wanted, but I reached for the more familiar tool when I got a lot of color-coded lines I didn't want.
alester moritz_: What's the angle? 14:48
moritz_ angle?
[Coke] ack -h '^plan\s' t/spec | ack -v '^plan \d+;' | sort -u
moritz_ something like "start contributiong with low startup costs" or so 14:49
PerlJam moritz_: I think alester is asking where's the "buzz" that makes it perlbuzz-worthy
alester Why is it interesting to readers? What would I say about it?
[Coke] ... and you could probably combine those 2 regular expressions since it's just perl.
tedv what's the quickest perl6 way to convert an array of values into a hash table mapping those values to true?
14:49 clintongormley joined, jotr joined, japhb joined
moritz_ alester: it allows people to contribute without learning "scary" things 14:50
alester perlbuzz.com/how-to-contribute.html
tedv %x = @a.map({ ($_ => 1) }); # Best I could come up with?
alester I don't understand what it is that the article is saying.
moritz_ %x{@a} = True xx @a
PerlJam tedv: my %hash = @array Z>> 1; # not sure about that
moritz_ that's bad :( 14:51
tedv why wouldn't it be "@a xx True"?
moritz_ I want people to help who think that Perl 6 development is scary, because you have to write complex compilers
I want them to help us, that is
PerlJam tedv: because it's "True 5 times" not "5 True times" (for instance) 14:52
moritz_ and I want to show them that you don't need to know the dragon book to get involved
and I want to offer guidance, and incentive
tedv well I'd like to help, including writing complex compiler stuff, but I have to start at the beginning
alester moritz_: I'd be glad to help you get that point across.
But it's not clear at all from the article.
masak [Coke]: ah, -h was what I was missing. when I found it in grep, I had already switched away from ack. :/
alester It sounds like you're having a contest, but then it sounds like you're asking for something to put in Rakudo. 14:53
masak [Coke]: also, I'll try to remember 'sort -u' till next time :)
moritz_ I want to make it like a contest, too
diakopter pmurias: hi
moritz_ well, I might need to work on the announcement a bit
alester: thanks for your input so far
PerlJam tedv: oh, I was suffering perl5think a second ago ... my %hash = @array Z 1..*;
tedv There is a bit of a catch 22 problem. People need to learn new syntax to help out, but they need to help out to implement things that parse new syntax. 14:54
PerlJam (I suffer perl5 think alot because I'm often writing perl 5 code :)
moritz_ PerlJam: Z True xx * maybe
tedv So 1..* is an infinitely long list of 1s
Juerd I don't write much code at all anymore, but whenever I try, I mix up Perl 5, Perl 6 and Javascript.
moritz_ no
it's one to infinity
alester moritz_: I did put it in the @perlbuzz Twitter feed yesterday.
PerlJam tedv: it's an ever-increasing sequence. 1,2,3... 14:55
tedv then won't that code map @array[0] to 1, @array[1] to 2, and so on?
alester but if this is a big ongoing thing, I'd be glad to put up an article, if there was a clear call to action for people.
Juerd Fortunately Javascript's okay with $ as the first character of a variable name. But eventually I type @ and things break.
tedv the Z operator does a 1-to-1 match between those two arrays, right?
PerlJam tedv: those are all "true values" :-)
moritz_ alester: I plan to keep a weekly schedule, for at least 6 weeks or so, likely a bit longer
tedv meh okay point taken
moritz_ alester: so I'd like a bigger announcement to coincide with the second week 14:56
tedv how would you write an array that's an infinitely long list of trues?
masak PerlJam: no, it's the *interval* 1 to whatever.
PerlJam: you're thinking of 1...*
moritz_ tedv: True xx *
Juerd tedv: True xx Inf
*? Oh.
moritz_ xx Inf works too
alester moritz_: Let me know how I can help.
tedv so: my %hash = @array Z (True xx *)
is the most explicitly correct way of writing it
PerlJam tedv: assuming that works 14:57
tedv well it's defined as correct in the language specs, is what I'm asserting. Whether it's currently implemented is a different question
PerlJam aye
Juerd @array »=> True 14:58
moritz_ std: <a b c> >>=><< True
p6eval std 30550: OUTPUT«ok 00:01 110m␤»
PerlJam rakudo: my @array = "a".."z"; my %hash = @array >>=><< True; %hash.say 14:59
tedv So the result of ($item xx $int) is an array consisting of $int copies of $item.
p6eval rakudo 1eef08: OUTPUT«Sorry, right side is too short and not dwimmy.␤current instr.: '&die' pc 17868 (src/builtins/Junction.pir:393)␤»
tedv (Still learning syntax)
PerlJam Hmm
moritz_ oh, needs <<=>>>
masak >>=>>>
PerlJam right ... watch the direction of the pointy ends 15:00
Juerd OMG :)
tedv I have some vague memory that >>operator<< does weird operations on arrays on either side
Juerd >>=>>> is ugly and beautiful at the same time.
tedv yeah
PerlJam It looks kind of like a fish
tedv are you allowed to space it out a bit: >> => >>
for readability? 15:01
moritz_ tedv: @a >>+<< @b just adds the elements piece-wise, and they have to have same length
PerlJam tedv: that would make it mean something different
moritz_ tedv: no, but you're allowed to use unicode form of >>
»=>»
tedv yeah
moritz_ whitespace in operators are generally forbidden
PerlJam It's too bad you can't stick and unspace in the middle of your operators. that would allow for some nice obfuscation ;) 15:02
s/and/an/
moritz_ has to leave now, bbl
tedv so >>oper<< operates on two arrays and applies the operation to both sides. That sounds related to the Z operator. Like Z is >>,<<
what about >>oper>>
snarkyboojum is the code responsible for generating proto.perl6.org/ updated periodically from the github repo? 15:03
15:04 kst left, kst joined
[Coke] tedv; FYI, SYN03 has all the operators. 15:04
PerlJam rakudo: my @a = 5 xx 10; my @b = @a >>,>> 3; @b.say 15:05
p6eval rakudo 1eef08: OUTPUT«53535353535353535353␤»
tedv Ah so >>oper>> iterates through the left side and applies the operator with the single value on the right side 15:06
15:06 isBEKaml joined
tedv rakudo: say 5 <<+>>3 15:06
p6eval rakudo 1eef08: OUTPUT«8␤»
tedv rakudo: say( (1,2) <<+>> (3,4) ) 15:07
p6eval rakudo 1eef08: OUTPUT«46␤»
15:07 nihiliad joined
tedv rakudo: say( (1,2) >>+<< (3,4) ) 15:07
p6eval rakudo 1eef08: OUTPUT«46␤»
tedv mmm but those are different
15:07 felipe joined
tedv I think that >>+<< is iterating through the values, then creating a new list 15:07
while <<+>> is just doing + on the two lists?
say( (1,2) + (3,4) ) 15:08
rakudo: say( (1,2) + (3,4) )
p6eval rakudo 1eef08: OUTPUT«4␤»
tedv hmmm I'll figure it out
PerlJam tedv: the pointy end allows for a scalar that is replicated as many times as the fat end needs. 15:09
tedv so what makes >>+<< different from +?
since both seem to say "we only need one copy of ourselves"?
PerlJam tedv: the former is vector-y, the latter is scalar-y 15:10
tedv ah I see 15:11
so it just casts the lists into scalar context and does 2+2
masak could this be the first ever Perl 6 job ad? www.carriere-info.fr/offre-emploi-p....html?_c51
is it serious? it looks serious.
15:11 SmokeMachine joined
PerlJam tedv: see S03:3964 (Hyper operators) 15:12
isBEKaml yo masak!
masak isBEKaml: y0
PerlJam masak: I'm going to go with "serious but they really don't know what they're asking for"
[Coke] what are the odds it's a manager who doesn't understand the diff between 5 & 6? 15:13
.. what PJ said.
diakopter www.editions-eni.fr/Livres/Perl-5-/...c950f.html
isBEKaml masak: uhh, I know no french, but they want perl6 guys to update some reference book?
going by what google translate threw at me...
masak same here.
diakopter since that's the only editions-eni publication having to do with Perl, I'm guessing that's what they want updated.
PerlJam Perhaps they really do want a section on "what's new in Perl 6" or something 15:14
PerlJam doubts though
[Coke] someone who's an author on the p6book should give 'em a ring.
masak sends them an email 15:15
diakopter I don't know. their book is 311 pages
snarkyboojum that's a yes to my question above it seems :)
masak snarkyboojum: yesterday it wasn't. 15:16
snarkyboojum masak: oh ok - seems automated now
masak snarkyboojum: moritz_ might have written that cron job in the meantime.
snarkyboojum sweet 15:17
arnsholt The ad is a bit short on info
All it says is that they want an IT professional, who is a Perl 6 expert to update a reference book 15:18
diakopter arnsholt: see the link I pasted above
arnsholt Yeah, it looks relevant
[Coke] .wub 9 15:19
arnsholt If you download the TOC, there's an appendix entitled "The future: Perl 6" 15:20
masak oh, so maybe they do need help.
I'm halfway through writing my email to them.
arnsholt May very well be
isBEKaml wow, they want guys to *write* the future! bbbut, the future is here! :)
arnsholt Do we have any French or Francophone people?
(Apart from me =) 15:21
masak cognominal.
arnsholt Ah yes. Going by his name he's even proper French =) 15:22
pmurias diakopter: you you check out what it takes to build mildew on your box? 15:23
dzil build in p6/v6/Mildew should create the tar ball
masak this is the email I ended up with. gist.github.com/390917 15:24
if I hear no suggestions for changes within the next minute or so, I'll send it off. :)
diakopter moritz_: I noticed in parrotsketch yesterday nobody addressed your mention of rakudo's issues with current parrot: irclog.perlgeek.de/parrotsketch/201...#i_2292538 15:25
pmurias: no I haven't tried.
pmurias: I have no idea whether dzil is supposed to work on windows.
masak pushes 'send' 15:26
pmurias dzil is installed by Dist::Zilla
cpanm Dist::Zilla should install it 15:27
arnsholt masak: The email looks good to me 15:28
masak phew.
errands & 15:29
isBEKaml masak: The email looks fine to me too, even as I am unsure whether they were really looking for perl6.. :)
pmurias has never seen some mention "PERL 6" before
isBEKaml pmurias: that's what got me.. :) 15:30
15:31 SmokeMachine left
diakopter pmurias: the last one that seems to work on windows is Dist-Zilla 1.100711 15:31
pmurias diakopter: did you get a failure installing the current one? 15:32
diakopter I haven't tried. I don't even have a perl installed on this machine.
pmurias oh
diakopter "this machine" being the one I'm sitting at
pmurias it's a $work one? 15:33
diakopter I could try it on the p6eval box.
pmurias we could have a mildew-perlesque evalbot target
diakopter oh; I didn't know it was ready for that
:)
pmurias runs hello world seems to be enough for evalbot readiness 15:34
15:35 justatheory joined
pmurias food& 15:37
diakopter pmurias: I really want to get perlesque running persistently
pmurias mildew should also run persistently 15:38
15:38 ruoso left
pmurias diakopter: i could try to make perlesque run persistently but i need to eat something first 15:40
diakopter I'm certain perlesque is no less than 98% threadsafe, by lines of code
moritz_ that's an interesting way to count :-)
alester hey moritz_ ! Success! 15:41
diakopter the only things that use static fields for anything meaningful are the compiler classes, and those would be easy to change. Also, there are some caching objects that should be converted from fields to static
moritz_ alester: with what?
isBEKaml moritz_: hi!
alester see mail to perl6-compiler. You got a contribution. 15:42
moritz_ alester: aye; it arrived via IRC yesterday night (in my timezone)
isBEKaml: hi
diakopter really though, being threadsafe isn't an issue since p6eval queues the requests anyway (I think) 15:43
moritz_ should MyGrammar.parse($str) set $/? 15:44
diakopter: that's correct
15:44 jonrafkind joined
moritz_ it is in fact partially using blocking IO 15:44
diakopter jonrafkind: hi 15:46
jonrafkind sup
isBEKaml looking at this month's posts on p6c mailing list, masak's got the greatest number of bugs submitted. Prolific bug hunter! 15:48
15:49 ruoso joined
moritz_ profilic coder too :-) 15:49
isBEKaml masak++
:)
15:51 kst left
arnsholt Not to mention prolific blogger =) 15:53
15:53 SmokeMachine joined 15:56 kst joined, thowe left 15:58 SmokeMachine left 16:05 pmurias left 16:09 clintongormley left 16:12 ruoso left 16:14 cdarroch joined, cdarroch left, cdarroch joined 16:19 ruoso joined 16:20 molaf left, ntaylor joined 16:29 dual_ left 16:33 [mark] left
m6locks hmm whats going on, I've been able to use LWP before: Can't locate object method "show_progress" via package "LWP::UserAgent" at ./proto line 115. 16:34
moritz_ m6locks: with master or with alpha? 16:35
m6locks thats master yes
16:35 dual joined
moritz_ might be a protobug - not sure 16:35
m6locks i was actually aiming for proto to build me a new copy of rakudo 16:36
16:38 patspam joined
m6locks thought i'd give it a shot, it seems to have taken quantum leaps in development 16:38
masak isBEKaml, moritz_, arnsholt: thanks :) 16:39
something about the beginning of the Google Translate translation of the job ad pleases me :) 16:41
"Hello\n\nYou are the Professional computer expert on Perl 6."
16:41 kst left
masak it reads like something from spamusement.com :) 16:41
16:42 kst joined 16:43 iblechbot left 16:45 meppl left
isBEKaml masak: I haven't seen too many ppl writing PERL even for p5, but this amuses me to see PERL 6 and computer expert terms thrown in.. 16:46
not even in job ads..
masak well, PERL 6 ought to be the subset of Perl 6 involving only the identifiers with all-caps letters. 16:48
takes some real ingenuity to do stuff in PERL 6.
BEGIN { .WHAT } 16:49
Su-Shee so, essentially COBOL?
isBEKaml END { .WHERE }
??
=)
pugssvn r30551 | lwall++ | [S05] give overview of Perl patterns in terms of PEGs, and spec tiebreaking explicitly
r30551 | [Basics.pod] remove fossil 'proto object'
16:49 patspam left
masak TimToady: typo? 'packing order' 16:50
pugssvn r30552 | lwall++ | [S05] typo from masak++ 16:51
masak TimToady: also, I don't grok 5) 16:52
TimToady * STD does not yet implement either 3 or 5
you can have two rules from different files that land in the same grammar/class
but only with monkey patching
masak what's a 'use'? 16:53
TimToady they might tie under all the earlier rules
use/need declaration
masak ah.
TimToady use Other::Grammar;
masak so a mere count of number of 'use' declarations in the compilation unit? 16:54
TimToady how many uses it took to get there, usually 1
masak oh!
something like 'degrees apart'
TimToady so if Other::Grammar uses Other::Other::Grammar, that's 2 away
masak I understand now, but I maintain that this was not evident from the current wording. 16:55
TimToady we'll take OG's foo in preference to OOG's foo
well, the fact that there's a message is most of the message
:)
I'll have to figure out in STD how to calculate 3 and 5 16:56
easy enough to track derivation levels in grammars numerically, I suppose 16:57
masak TimToady: did you see my question about S02:4013?
TimToady but #5 requires a link from each rule back to its file descriptor, I guess
well, probably already has that somewhere 16:58
16:58 snarkyboojum left
TimToady haven't finished backlogging, actually 16:58
masak ok.
no hurry/worry/scurry :)
just seems to be a stray 1 on that line. 16:59
17:00 envi^home left
pugssvn r30553 | lwall++ | [S02] add missing 1 found (er) by masak++ 17:00
masak :)
TimToady++ 17:01
TimToady so basically, STD currently does #1, #2 and #4, but rakudo really only does #2 17:03
and maybe #4, dunno 17:05
17:07 stephenlb joined
tedv So just broad strokes here... What major features are missing from rakudo that prevents it from passing the whole test suite? 17:08
17:08 patspam joined
moritz_ tedv: hundreds of corner cases, proper lazy lists, macros, some built-ins, regex features, parsing limitations (for example adverbs on quotes and modifiers), proper longest-token matching 17:09
proper named enums 17:10
binary data support
masak tedv: I just ran tools/test_summary.pl -- if you're interested in specifics, you can run it too and see which tests are fudged and for what reasons.
moritz_ array and hash autovivification
bigints
native types
masak S09. 17:11
moritz_ compact structures, ... right, S09
masak Perl 5.
pugssvn r30554 | lwall++ | [S06] fossil, my/our anonymous subs were superseded by 'anon' some time ago
moritz_ Perl 6 :-)
*SCNR*
masak rakudo: say "Perl 5"++
p6eval rakudo 1eef08: OUTPUT«Cannot assign to readonly value␤current instr.: '&die' pc 17868 (src/builtins/Junction.pir:393)␤»
tedv Hmmm
moritz_ proper stack traces 17:12
tedv Yeah that does explain perl 5!
masak rakudo: my $perl = 'Perl 5'; $perl++; say $perl
p6eval rakudo 1eef08: OUTPUT«Perl 6␤»
masak \o/
moritz_ rakudo: say 'Perl 5'.succ # even clearer :-)
p6eval rakudo 1eef08: OUTPUT«Perl 6␤»
isBEKaml moritz_: SCNR?
tedv I should read up on autovivification
since I keep hearing the term, learning it, and then forgetting it again 17:13
moritz_ isBEKaml: "sorry, could not resist"
tedv my mental note says "this is a technical term for something you already understand"
moritz_ my mental note says "this is a technical term for something you already understand, but can't spell"
:-)
[Coke] moritz_: are you saying that Perl 5 succs? 17:14
tedv I think I spelt it right
ash_ which phasers are implemented?
moritz_ ash_: BEGIN and END I think
[Coke]: now that's your interpretation :-)
masak rakudo: CHECK {}
p6eval rakudo 1eef08: ( no output )
isBEKaml moritz_++
masak rakudo: INIT {}
p6eval rakudo 1eef08: ( no output )
isBEKaml =)
moritz_ rakudo: CHECK { say "oh hai" } 17:15
p6eval rakudo 1eef08: OUTPUT«Could not find sub &say␤current instr.: '_block45' pc 166 (EVAL_1:80)␤»
moritz_ rakudo: CHECK { "oh hai".say }
p6eval rakudo 1eef08: OUTPUT«oh hai␤»
isBEKaml moritz_: what does CHECK do? fail loudly if they don't pass?
we have fail(), right? uhh? 17:16
masak isBEKaml: CHECK runs ALAP at compile time.
moritz_ isBEKaml: CHECK is just a phaser like BEGIN
masak no other semantics, AFAIK.
moritz_ it just runs later than BEGIN
masak now, PRE and POST... :)
[particle] and before MAIN()
ash_ hmm 17:17
moritz_ [particle]: everything that runs at compile time runs before run time :-)
isBEKaml let me get this straight, PRE, BEGIN, CHECK, <BODY HERE>, END, POST ?
ash_ so, which ones run at runtime?
PerlJam wonders if CHECK is still a good name
ash_ is there an ENTER?
masak isBEKaml: you should really look up S04.
isBEKaml moritz_: awk's back for jamming..! :)
masak isBEKaml: it has the whole list.
moritz_ INIT, PRE, POST, START, ENTER, LEAVE all run at compile time
masak ash_: yes.
moritz_ and a few more, probably :-)
like FIRST
PerlJam BEGIN? :)
masak moritz_: ENTER and LEAVE run at compile time? o.O 17:18
ash_ reading S04
moritz_ erm
all at run time
sorry
isBEKaml looking up S04
PerlJam maximal confusion!
[particle] BEGIN { sub MAIN { 'main'.say; CHECK { 'check'.say } }; }
masak moritz_: you should read S04 too! :P
[particle] forgot 'begin'.say there...
moritz_ should really be going to his table tennis training, and stop writing nonsense here
masak should really acquire nom 17:19
moritz_ [particle]: iirc master doesn't do MAIN yet
ash_ but moritz_ then who would write nonsense? :P
[particle] nope, that's why i didn't run in through the bot
isBEKaml ash_: who would write nonsense to correct the nonsense?
:P
ash_ lol, i don't know the spec well enough to correct moritz_ 17:20
moritz_ ash_: I'm sure you'll find somebody to do that
(writing nonsense, that is)
gone&
17:20 dakkar left
diakopter std: say $#array 17:21
p6eval std 30552: OUTPUT«===SORRY!===␤Unsupported use of $#array variable; in Perl 6 please use @array.end at /tmp/aF6RfF6Ziy line 1:␤------> say $#array⏏<EOL>␤Parse failed␤FAILED 00:01 107m␤»
diakopter nice
isBEKaml diakopter: this was autovivified earlier. oO 17:22
??
masak which runs first, the PRE block of a method or the PRE block of a class? does the answer change with the declaration order of the two? 17:23
17:23 meppl joined
ash_ masak: you suggested seeing if I could make a module to try to achieve the phasers I am looking for (for roles), but I don't think the current phasers activate at the right times, i could still look into oter ways of doing it though 17:25
PerlJam ash_: what are you trying to do? 17:26
masak ash_: seems to me one could maybe convince the metaclass to fire off user-defined phasers.
ash_: maybe even with parts already in Rakudo. 17:27
ash_ PerlJam: looking at phasers for COMPOSED and INHERITED actions in OO
PerlJam ash_: ah, excellent! I've wondered about those myself. 17:28
ash_ i didn't think of looking at the meta class
hmmm
with the metaclass wouldn't they need to be submethods? 17:29
no, nevermind, thats silly, i think you can do it without making them submethods
PerlJam particularly COMPOSED. Seems like you'd want to do some automatic conflict resolution through method creation at composition time (yes, it may be a smell, but Perl has never stopped that before :) 17:30
masak the default is pretty sweet already. 17:31
but I can see the nice thing about being able to override it, I guess.
nom & 17:32
PerlJam in a way it's all hypothetical because no one has enough experience with roles to really say
17:32 masak left
ash_ PerlJam: thats not strictly true, some other languages have what are effectively roles 17:33
PerlJam ash_: the devil is always in the details. :) 17:34
Su-Shee started desperately reading smalltalk-traits papers to understand roles
ash_ ruby's modules are nearly identical
PerlJam ash_: I think you and I have different definitions for the word "identical" :) 17:35
ash_ probably
:P
17:35 MILKMILK joined, lucs joined
PerlJam there are lots of techniques the occupy similiar design space as roles. Each have their own caveats. 17:35
MILKMILK how do i compial perl6 with a perl5 interpreter?
17:36 akl left, MILKMILK left
PerlJam MILKMILK: you mean blizkost? 17:37
[particle] TROLLTROLL has left the room
PerlJam ah. that's what I get for only paying spurious attention
ash_ so... anyone here made a custom metaclass? 17:39
17:40 rv2733 left
ash_ that means writing a slang right? 17:40
github.com/rakudo/rakudo/blob/maste...amodel.pod is probably the only reference I know of for making a custom metaclass 17:42
you should be able to augment the Perl6 grammar right? 17:45
rakudo: use MONKEY_TYPING; augment grammar Perl6::Grammar { }
p6eval rakudo 1eef08: OUTPUT«Method 'compose' not found for invocant of class ''␤current instr.: 'perl6;Perl6;Grammar;!class_init_11' pc 352 (EVAL_1:159)␤»
ash_ checks bugs tracker
nope, i don't see it 17:48
is there any reason you wouldn't be able to augment the grammar?
17:50 meteorjay left, meteorjay joined
pugssvn r30555 | lwall++ | [S06] long-threatened revamp of proto to keep routine and method semantics similar 17:52
17:53 Guest3356 left 17:54 Guest3356 joined
pugssvn r30556 | lwall++ | [S06] More rationale for the proto simplification 18:10
TimToady whew! 18:13
18:13 ash_ left
PerlJam If anyone ever wants to see Perl 6 "from the outside", go hang out in #p5p on irc.perl.org for a little while. 18:14
18:15 SmokeMachine joined
TimToady as opposed to #perl :) 18:16
the dysfunctionality of the old p5p list is one of the reasons p6 happened, so we should be celebrating it :) 18:17
18:28 rhr left
TimToady Anyway, as the tiger said, "I don't mind you viewing me from the outside as long as you also don't mind viewing me from the inside." 18:28
PerlJam TimToady: is that to imply that Perl 6 is actually a tiger rather than a butterfly and that it will eat you? ;) 18:31
ntaylor Newbie question: anyone else observing a segfault while running perl6 outside the pwd of the perl6 executable? 18:32
(latest checkout) 18:33
Su-Shee PerlJam: no, it's a hobbes-tiger. ;)
ntaylor gdb says it's dying within Parrot internals; I'll bug #parrot :) 18:35
PerlJam ntaylor: perhaps it's grabbing the wrong libparrot?
ntaylor PerlJam: ah, interesting, let me dig into that... 18:37
colomon rakudo: my @a = 'a' ... 'g'; my %h = @a »=>» True; say %h.perl
p6eval rakudo 1eef08: OUTPUT«{"a" => Bool::True, "b" => Bool::True, "c" => Bool::True, "d" => Bool::True, "e" => Bool::True, "f" => Bool::True, "g" => Bool::True}␤»
colomon rakudo: my @a = 'a' ... 'g'; my %h = @a Z=> True, True ... *; say %h.perl 18:39
p6eval rakudo 1eef08: OUTPUT«{"a" => Bool::True, "b" => Bool::True, "c" => 1, "d" => 1, "e" => 1, "f" => 1, "g" => 1}␤»
colomon rakudo: my @a = 'a' ... 'g'; my %h = @a Z=> (True, True ... *); say %h.perl 18:40
p6eval rakudo 1eef08: OUTPUT«{"e" => 1, "f" => 1, "g" => 1, "a" => Bool::True, "b" => Bool::True, "c" => 1, "d" => 1}␤»
PerlJam I don't see how you're going to get True, True ... * to work since the series op is about numbers :)
ntaylor PerlJam: There's only one libparrot in /blib/lib/ and otool is able to devine its path, so it might not be a library issue. The error given back is "Null PMC access in find_method('get_parrotclass')\n current instr.: 'perl6;ClassHOW;onload' pc -1 ((unknown file):-1)"
PerlJam you could use the version that has a closure though
ntaylor and then the segfault occurs in Parrot_Context_get_info 18:41
any thoughts?
colomon PerlJam: series op is NOT about numbers. 18:42
18:42 ash_ joined
colomon and anyway, True is technically speaking a number. :) 18:42
series op still has bugs in it, however.
rakudo: say (True ... *).perl 18:43
p6eval rakudo 1eef08: OUTPUT«(Bool::True, Bool::True, Bool::True, Bool::True, Bool::True, Bool::True, Bool::True, Bool::True, Bool::True, Bool::True, Bool::True, Bool::True, Bool::True, Bool::True, Bool::True, Bool::True, Bool::True, Bool::True, Bool::True, Bool::True, Bool::True, Bool::True, Bool::True,
..Bool:…
colomon not what I expected, but would have worked for me above.
rakudo: my @a = 'a' ... 'g'; my %h = @a Z=> (True ... *); say %h.perl
p6eval rakudo 1eef08: OUTPUT«{"e" => Bool::True, "f" => Bool::True, "g" => Bool::True, "a" => Bool::True, "b" => Bool::True, "c" => Bool::True, "d" => Bool::True}␤»
colomon has started wondering about lazy hashes....
PerlJam ntaylor: Hmm. I have recompiled the latest rakudo a few times just now and I occassionally get a segfault compiling src/gen/core.pm 18:45
TimToady PerlJam: Camelia is just the spokesbug; she doesn't claim to be the same species as Perl 6. :)
ash_ TimToady: is there any reason you shouldn't be able to augment grammar Perl6::Grammar ?
TimToady other than that there is no such grammar in STD? :) 18:46
and that you forgot the 'use MONKEY_TYPING;'? :)
ntaylor PerlJam: interesting, I had no issues compiling, and, indeed, it's happy running the test suite or executing perl6 so long as the pwd is the root rakudo directory
ash_ rakudo: use MONKEY_TYPING; augment grammar Perl6::Grammar { } # Just wanted to make sure this is a bug
p6eval rakudo 1eef08: OUTPUT«Method 'compose' not found for invocant of class ''␤current instr.: 'perl6;Perl6;Grammar;!class_init_11' pc 352 (EVAL_1:163)␤»
colomon ntaylor: did you "make install"
?
TimToady well, if rakudo has a Perl6::Grammar class, then it oughta work 18:47
PerlJam colomon: I'll grant the series op is not *just* about numbers, but the spec sure is written as if it were.
ntaylor colomon: no, I've not installed it, merely appended my envvars to point into the appropriate rakudo paths
ash_ i think the Perl6::Grammar is made in NQP-rx so that might be why its not working
colomon PerlJam: actually, the spec does cover non-numbers as well. but many of the cool features of series do require numbers, which is why the spec focuses on them. 18:48
TimToady there should probably be something in there that says that enums mean their numbers to a series, and that * means the max enum
colomon ntaylor: you have to do make install to be able to run the executable outside the rakudo directory.
ntaylor aha.
Well, serves me right for trying to outsmart the build script.
colomon TimToady: I've been wondering how series or range is supposed to make * mean the max enum.
ntaylor oh, well, I'll be damned 18:49
colomon ntaylor: it doesn't install it anywhere outside of there, mind you, just sets things up so it can be run outside of there.
ntaylor indeed, I just noticed :)
colomon TimToady: I mean, how it is supposed to know what the max is?
ntaylor hey, there we go. :-) Thanks.
PerlJam colomon++ good thinking 18:50
TimToady an enum is a hash, so it ought to respond to .values.max
I realize that rakudo still thinks of enums primarily as packages though
colomon so we can say something like "if $lhs ~~ Enum && $rhs ~~ Whatever { $rhs = $lhs.WHAT.values.max }"?
TimToady the new view is that an enum is simply a constant hash that happens to also introduce some second-class constants if they don't collide 18:51
sorear considering the performance implications of real slangs in rakudo, I just figured out what the lex/ directory in STD is for 18:53
TimToady yeah...fortunately there's still lots of room for optimization even there 18:54
colomon TimToady: how does the constant hash imply an ordering? .values won't actually work for that, will it?
TimToady we'd have to assume that the values are well-behaved 18:55
otherwise it's probably just erroneous
the series itself is probably just doing 0,1,2,3...42 18:56
colomon TimToady: one other series question from the other day: "it depends on whether the two values look like numbers whether we use *+0 or *.succ/*.pred." Is there a technical definition for
"look like numbers"?
TimToady I mean it in the pattern matching sense 18:57
PerlJam $value.are-you-or-are-you-not-a-number
ash_ PerlJam: +$value?
TimToady history: looks_like_number() is a routine inside of P5 that sees if a string seems to be a representation of a number
PerlJam ash_: that's more like $value.turn-into-your-best-idea-of-a-number 18:58
ash_ well, then shouldn't the person writing it be more explicit if thats not what they want? 18:59
colomon rakudo: say +"hell" 19:03
p6eval rakudo 1eef08: OUTPUT«0␤»
sorear TimToady: Do I stand much chance of understanding gimme5?
TimToady it's not terrible, but it's not wonderful either. :)
ash_ rakudo: role Foo { our sub bar { say 'Foo::bar called' } }; Foo::bar; # thats should work right?
p6eval rakudo 1eef08: OUTPUT«Can not find sub Foo::bar␤current instr.: 'perl6;Perl6Exception;throw' pc 15354 (src/builtins/Associative.pir:46)␤»
colomon TimToady: so, at the most naive level, just something like $a ~~ /^\d/
?
(obviously need to support +/- first as well.) 19:04
TimToady sorear: gimme5 is pretty understandable in the regex translation bits, which are hierarchical
sorear phenny: tell masak - postfix: macros not working is not a bug, it turns out that operator-like macros need a completely different implementation and I haven't implemented it yet. The ][ thing is troubling, though.
phenny sorear: I'll pass that on when masak is around.
sorear Su-Shee: Can you give examples of stuff you want to work in rakudo?
TimToady most of the rest of the translation is done bit-by-bit in un6
viv -5 is partway there to replacing gimme5; but it only really translates some of the un6() stuff so far 19:05
I've only just started the regex translation
the only other hairy stuff in gimme5 is parsing the sigs and emitting the corresponding p5 code 19:06
that's mostly just done with strange lookahead patterns in the main loop
the main limitation of gimme5 is that it is not able to do any tree transformations on non-regex code. 19:07
so in normal p6 expressions STD has to be written in a subset that can translate close to word-for-word to p5 19:08
when we switch to viv -5 that restriction will presumably go away, but we'd probably better freeze a bootstrap stage of STD.pm6 there in case we need to rebootstrap 19:09
19:11 Ross joined, justatheory left
sorear or maybe someday rakudo/mildew/etc could become good enough to run STD and viv6 directly? 19:14
TimToady yes, kudos to the first implementation that actually runs STD :) 19:16
Su-Shee sorear: what I personally want to or what I think what's important to have? or more in the meaning "how to place/position rakudo as a language"?
TimToady the code emitted by gimme5/viv is also special, insofar as it's trading off semantic correctness
for instance, using locals for dynamic variables
and basically assuming a single-threaded parser 19:17
19:17 meppl left
TimToady I do think the new proto semantics will map more nicely to p5 though 19:19
sorear is STD completely Perl6 or does it rely on gimme5 extensions?
19:20 ShaneC1 joined
sorear notes that STD_syntax_hilight crashes when fed STD.pm6 19:20
19:20 ash_ left
TimToady its base class Cursor is in P5 19:20
(so far)
sorear Su-Shee: What you, personally, want.
19:20 ShaneC1 left
TimToady was waiting on viv to translate Cursor 19:20
19:20 ash_ joined
TimToady since one of the reasons for having Cursor in P5 was to express things that gimme5 can't translate... 19:20
sorear topic/lexical-persistence has passed spectest
Su-Shee sorear: future web, gui bindings for everything, mashups, mobile devices of all kinds, poor man's data mining, DSLs 19:21
sorear: all in a tidy, tiny, pretty zen-like fashion. no workhorses. 19:22
19:23 ntaylor left
tedv Is the rakudo repository actually in git, or is it really subversion and the documentation told me to use git because git is awesome? 19:25
colomon tedv: it's in git on github
tedv I know the pugs unit tests are still subversion 19:26
19:27 rhr joined
tedv sweet, tedv wasn't taken on github. 4 letter user name FTW! 19:27
TimToady tedv: svn for several reasons: 1) pugs history, 2) very low barrier to entry, and 3) not much branching needed for the test suite 19:28
tedv and 4) if it's not broken don't fix it
yeah
TimToady :)
sorear Su-Shee: I meant in regards to DSLs.
TimToady doubtless we'll move it all over to git someday, but I'm in denial :) 19:29
Su-Shee sorear: I'm wracking my brain about making graphics, shapes and widgets easier.
wrecking? 19:30
well I'm thinking hard. :)
tedv Hmmm, if I'm just starting out by adding unit tests though, I shouldn't need to change anything in rakudo, so I shouldn't need any access to the github repository
Su-Shee sorear: I'd like to be able to say "draw this here, make it green and oh yeah, a shadow please and oh, yes, if you click, action x will happen". in short and straightforward and easy. 19:31
19:32 ruoso left 19:40 ruoso joined 19:47 rv2733 joined
pugssvn r30557 | colomon++ | [t/spec] Add a test for Num.log(Complex), which needs to be skipped now, alas. 19:51
19:56 cotto_work left 19:57 cotto_work joined, _jaldhar left, _jaldhar joined
TimToady phone 20:00
sorear Su-Shee: your task, if you choose to accept it, is to design this language. 20:02
20:03 kst left
tedv can methods and submethods have parameter lists? 20:03
20:03 kst joined
sorear yes 20:03
tedv I mean other than their invocant 20:04
Su-Shee sorear: and when I'm done desiging it, I get flowers? :)
tedv but I assume the answer is still yes
sorear indeed, they are mandatory in rakudo
we don't implement method foo { } yet
Su-Shee: No, you get Phase II.
Su-Shee "aha" ;) I have no idea what you're getting at :) 20:05
pugssvn r30558 | colomon++ | [t/spec] Add some log tests, most of which need to be skipped for now. 20:06
20:09 iblechbot joined 20:15 justatheory joined 20:22 Su-Shee left 20:23 pmurias joined 20:24 molaf joined
diakopter pmurias: hi 20:27
pmurias diakopter: hi 20:28
diakopter typo in TimToady The first versoin of Rakudo 20:29
colomon rakudo: say ('z' ... 'a').perl 20:31
p6eval rakudo 1eef08: OUTPUT«("z", "y", "x", "w", "v", "u", "t", "s", "r", "q", "p", "o", "n", "m", "l", "k", "j", "i", "h", "g", "f", "e", "d", "c", "b", "a")␤»
tedv rakudo say('z' .. 'a').perl 20:32
colomon rakudo: say ('z', 'y' ... 'a').perl
p6eval rakudo 1eef08: OUTPUT«("z", "y")␤»
tedv rakudo: say('z' .. 'a').perl
p6eval rakudo 1eef08: OUTPUT«␤»
colomon tedv: Range's (..) cannot go backwards
tedv rakudo: say('a' ... 'f').perl
p6eval rakudo 1eef08: OUTPUT«abcdef␤»
20:32 pmurias left
colomon but series (...) can 20:32
tedv yeah I thought that's how it would work
examining output seemed like the best way to find out though 20:33
colomon I think according to the current spec 'z' ... 'a' is supposed to work, but 'z', 'y' ... 'a' is not. 20:37
unless someone gives me a good reason, I'm probably going to fix that in code and in spec today. :)
tedv rakudo: say('a', 'b' ... 'e').perl 20:39
p6eval rakudo 1eef08: ( no output )
tedv rakudo: say('a', 'b' .. 'e').perl
p6eval rakudo 1eef08: OUTPUT«abcde␤»
moritz_ this takes .perl of the return value of say(), and ignores it
colomon rakudo: say ('a', 'b' ... *).perl 20:41
p6eval rakudo 1eef08: OUTPUT«("a", "b", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {???} ... ???)␤»
20:41 molaf left
colomon rakudo: say 'z'.prev 20:42
p6eval rakudo 1eef08: OUTPUT«Method 'prev' not found for invocant of class 'Perl6Str'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
colomon rakudo: say 'z'.prec
p6eval rakudo 1eef08: OUTPUT«Method 'prec' not found for invocant of class 'Perl6Str'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
colomon rakudo: my $a = 'z'; say --$a 20:43
p6eval rakudo 1eef08: OUTPUT«y␤»
colomon rakudo: my $a = 'z'; say $a.prec
moritz_ rakudo: say 'z'.pred
p6eval rakudo 1eef08: OUTPUT«Method 'prec' not found for invocant of class 'Perl6Str'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
rakudo 1eef08: OUTPUT«y␤»
colomon doh! 20:44
I think I just found a block of code in the series operator which has never actually been run, then.
colomon wishes for am embarrassed smiley yet again....
tedv which section of the spec explains twigils in detail?
moritz_ S02, S06 and S12 probablz 20:45
tedv (-_-);
moritz_ s/z/y/
depending on the twigil
ash_ does parrot have a trace yet? like gcov?
that would be useful for finding places that aren't correct, if you could run a gcov like program with the parrot code generated and be able to see which parts of your script executed and which parts didnt 20:46
S02 has a list, it has the biggest overview of the twigils
tedv yeah I have it open now 20:47
20:48 pmurias joined
pmurias diakopter: by internet connection failed and i had to reset the router a few times 20:48
tedv hmm, where can one download the perl 6 color markup instructions for vim? white text is fail text. :[ 20:54
20:55 kst left
moritz_ tedv: github.com/petdance/vim-perl has a perl6.vim file 20:56
tedv thanks 20:57
21:00 kst joined
ash_ oh man he updated, i need to re-checkout my vim-perl stuff 21:00
21:00 orafu left
tedv ahhh that looks much better 21:00
21:00 orafu joined
alester tedv: at some point I'll have an installer for it. 21:01
tedv cp is fine for me
it gets the files in the right places; ergo it works
Hmmm I notice that some unit tests have parallel .t and .rakudo files. I assume that rakudo uses a .rakudo file over a .t if it exists, and it contains special logic that handles some kind of current rakudo inadequacy? 21:03
21:03 alester left
tedv it sounds like the rule of thumb is "don't write a test that breaks; instead write a test that passes and document when it should pass the inverse logic" 21:03
ash_ there is a makefile, git clone the repo and do make install 21:05
21:06 BrowserUk left
ash_ tedv: you mean the fudging? rakudo fudges tests it knows it doesn't pass, but the .rakudo files are auto-generated 21:06
tedv ah okay
so just putting a #?rakudo todo should handle that?
ash_ do you want to fudge the whole file? or part of a file? 21:07
tedv I don't have any particular wants except understanding 21:08
I'm more trying to understand the context 21:09
ash_ you can do #?rakudo # skip 'comment why' to skip multiples, or #?rakudo skip 'comment' to skip 1, or call it a todo, if you want to fudge an entire file change the spectest.data in the rakudo/t/ folder
that first one would be more like #?rakudo 3 skip 'Bug ticket #b123' for instance to skip 3
tedv alright 21:10
and the skip will skip the next N tests executed?
for example, if I have something like...
sub foo { is $a, $b, "my test"; }
#?rakudo 2 skip
21:10 ruoso left
tedv then two calls to foo() after that 21:11
those would get skipped. but if foo() had two "is" checks, then the skip effectively only skips the first function call?
ugh sorry, kind of a pedantic question
21:13 pmurias left
ash_ um 21:16
i am not sure, i'd have to check the fudge script
svn.pugscode.org/pugs/t/spec/fudge is the fudge script that does the fudging 21:18
21:19 lichtkind joined
lichtkind nqp: say 4 21:19
p6eval nqp: OUTPUT«Confused at line 1, near "say 4"␤current instr.: 'parrot;HLL;Grammar;panic' pc 500 (src/cheats/hll-grammar.pir:197)␤»
ash_ nqp: say(4); # nqp is strict about ( ) 21:20
p6eval nqp: OUTPUT«4␤»
lichtkind thanks ash
jnthn: can i egt an +o ? 21:22
mas 21:23
err
s1n holy moly, my perl[56] feed backlog was a mile long 21:24
6 months backs of not doing anything perl6 backed up 21:25
lichtkind :)
err op is gone? 21:26
21:26 Ross left
colomon lichtkind: seems like it has been for a long time? 21:27
but I don't remember the details.
rakudo: say 3 err 45
p6eval rakudo 1eef08: OUTPUT«3␤»
colomon or not. :)
rakudo: say Mu err 45
p6eval rakudo 1eef08: OUTPUT«Mu()␤»
lichtkind rakudo: say 0 // 4 21:28
p6eval rakudo 1eef08: OUTPUT«0␤»
s1n colomon: how's your work on perl6 numerical methods (that is what you were working, right)?
lichtkind rakudo: say '' // 4
colomon s1n: right.
p6eval rakudo 1eef08: OUTPUT«␤»
colomon s1n: sort of slow but sure. :)
lichtkind rakudo: say undef // 4
p6eval rakudo 1eef08: OUTPUT«Unsupported use of undef as a value; in Perl 6 please use something more specific:␤ Mu (the "most undefined" type object),␤ an undefined type object such as Int,␤ Nil as an empty list,␤ *.notdef as a matcher or method,␤ Any:U as a type constraint␤ or
..fail() as a failure return␤ …
s1n colomon: keep it up, it's god's work indeed :) 21:30
colomon s1n: I do a few bits, and all is going well, and then I run into a role bug and have to wait a bit on jnthn++
21:33 wknight8111 joined
colomon hmmm.... 21:34
s1n colomon: i'd like to help, but i really shouldn't until i finish my thesis :/
colomon rakudo: my StrNum does Real { has Str $.num; method Bridge() { +$.num; }; }; my $a = Real.new(:num("34")); 21:35
p6eval rakudo 1eef08: OUTPUT«In "my" declaration, typename StrNum must be predeclared (or marked as declarative with :: prefix) at line 11, near " does Real"␤current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)␤»
colomon s1n: no worries. 21:36
rakudo: class StrNum does Real { has Str $.num; method Bridge() { +$.num; }; }; my $a = Real.new(:num("34"));
p6eval rakudo 1eef08: ( no output )
colomon rakudo: class StrNum does Real { has Str $.num; method Bridge() { +$.num; }; }; my $a = Real.new(:num("34")); say $a.WHAT; say $a + 3; say $a.exp
p6eval rakudo 1eef08: OUTPUT«Real()␤Method 'Bridge' not found for invocant of class 'Failure'␤current instr.: 'infix:<+>' pc 297223 (src/gen/core.pir:1004)␤»
21:36 BrowserUk joined
colomon rakudo: class StrNum does Real { has Str $.num; method Bridge() { +$.num; }; }; my $a = StrNum.new(:num("34")); say $a.WHAT; say $a + 3; say $a.exp 21:37
p6eval rakudo 1eef08: OUTPUT«StrNum()␤37␤583461742527454␤»
colomon hmmm.... exp seems very wrong there. :\
anyway, that's one of my goals -- making it very easy to add a new Numeric class that plays nicely with the existing ones. 21:38
afk # toddler just woke up cranky
21:42 Guest3356 left 21:49 arthur-_ joined
colomon rakudo: say e ** 34 21:51
p6eval rakudo 1eef08: OUTPUT«583461742527454␤»
21:51 christine left
colomon or, my intuition for what exp should return is very bad. 21:51
rakudo: class StrNum does Real { has Str $.num; method Bridge() { +$.num; }; }; my $a = StrNum.new(:num("3.4")); say $a.WHAT; say $a + 3; say $a.exp 21:52
p6eval rakudo 1eef08: OUTPUT«StrNum()␤6.4␤29.964100047397␤»
colomon rakudo: class StrNum does Real { has Str $.num; method Bridge() { +$.num; }; }; my $a = StrNum.new(:num("3.4")); say $a.WHAT; say $a + 3; say $a.exp.log
p6eval rakudo 1eef08: OUTPUT«StrNum()␤6.4␤3.4␤»
22:00 iblechbot left 22:04 christine joined 22:07 ethel joined 22:10 ash_ left
TimToady rakudo: say e*e*e*e*e*e*e*e*e*e*e*e*e*e*e*e*e*e*e*e*e*e*e*e*e*e*e*e*e*e*e*e*e*e 22:12
p6eval rakudo 1eef08: OUTPUT«583461742527454␤»
TimToady rakudo: say pi**34 22:13
p6eval rakudo 1eef08: OUTPUT«8.00010471504562e+16␤»
TimToady rakudo: say e**pi - pi 22:16
p6eval rakudo 1eef08: OUTPUT«19.9990999791895␤»
TimToady darn it :)
colomon guess I don't have it accurate enough yet. ;) 22:20
TimToady rakudo: say e.WHAT 22:21
p6eval rakudo 1eef08: OUTPUT«Num()␤»
TimToady rakudo: say pi.WHAT
p6eval rakudo 1eef08: OUTPUT«Num()␤»
TimToady there's your problem :) 22:22
rakudo: say pi**33 22:24
p6eval rakudo 1eef08: OUTPUT«2.54651242130458e+16␤»
TimToady rakudo: say pi**32
p6eval rakudo 1eef08: OUTPUT«8.1058007899107e+15␤»
TimToady rakudo: say pi**31
p6eval rakudo 1eef08: OUTPUT«2.58015652686496e+15␤»
TimToady rakudo: say pi**30
p6eval rakudo 1eef08: OUTPUT«821289330402749␤»
TimToady there yo ugo
Yo, Ugo!!
22:26 lue joined
lue hello! 22:27
TimToady pugs: say pi ** 30 22:28
p6eval pugs: OUTPUT«821289330402747.711387089095441878807212836874715389772␤»
TimToady ooh, shiney
lue ooooooooh Oo
TimToady rakudo: say pi ** 30
p6eval rakudo 1eef08: OUTPUT«821289330402749␤»
TimToady wow, doesn't even get the right integer :) 22:29
lue I'd understand ...748. But ...749?
EOFFBYTWO
TimToady lack of floating precision 22:30
hmm
rakudo: say e**34
p6eval rakudo 1eef08: OUTPUT«583461742527454␤»
TimToady pugs: say e**34
p6eval pugs: OUTPUT«*** No such subroutine: "&e"␤ at /tmp/OzXmvVOwue line 1, column 5 - line 2, column 1␤»
TimToady O.o
lue
.oO( that's what I call an inactive project! :) )
22:31
TimToady eeee!
lue | backlog --channel="#perl6" --when="today" 22:33
TimToady is tempted to return a junction 22:34
22:36 ethel_ joined
lue back 22:36
22:37 ethel_ left, ethel left
lue is there any way to convert to arbitrary bases? 22:37
22:38 ethel joined, ethel left 22:39 ethel joined
sorear lichtkind: jnthn is *gone* 22:39
lue
.oO(*gone* ? D:)
lichtkind sorear: ah
sorear lue: No internet access for 3 days! 22:40
lue Stupid volcano .oO(I Hate Iceland!) 22:41
colomon TimToady: can 'z', 'y', ... 'a' be the same as 'z' ... 'a' ?
TimToady seems likely 22:43
22:43 nihiliad left
colomon it's actually not spec'd to work that way at the moment, but I figured that was what you'd say. :) 22:44
(I've got it working locally at the moment.)
TimToady might be harder to make 'zz', 'zy' ... 'aa' to work
rakudo: 'z', 'y', ... 'a' # wonder what rakudo does with the extra comma 22:45
colomon the rule I've got in there is that if it is non-numeric, you treat it as 'z', ('y' ... 'a')
p6eval rakudo 1eef08: OUTPUT«No exception handler and no message␤current instr.: '&fail' pc 18025 (src/builtins/Junction.pir:481)␤»
sorear reads S05 some more
colomon actually, I've just been wondering if 'z', 'y' ... * should use pred instead of succ
(that's not implemented yet.)
lue that's very quantum. 22:46
rakudo: 'z','y', ... 'a'
p6eval rakudo 1eef08: OUTPUT«No exception handler and no message␤current instr.: '&fail' pc 18025 (src/builtins/Junction.pir:481)␤»
lue rakudo: 'z','y' ... 'a'
p6eval rakudo 1eef08: ( no output )
lue rakudo: say 'z','y' ... 'a'
p6eval rakudo 1eef08: OUTPUT«zy␤»
colomon > ('z', 'y' ... 'a').perl.say 22:47
("z", "y", "x", "w", "v", "u", "t", "s", "r", "q", "p", "o", "n", "m", "l", "k", "j", "i", "h", "g", "f", "e", "d", "c", "b", "a")
TimToady wonders if single characters should always just be treated as codepoint numbers 22:48
sorear you mean like C?
'a'.say => 97
TimToady no, in terms of succ/pred
so that "\0" ... "\x7f" would get all ASCII, for instance 22:49
currently it would turn 'Z' into 'AA' and never get there 22:50
lue rakudo: say ("\0" ... "\x7f") # curious
p6eval rakudo 1eef08: ( no output ) 22:51
TimToady so 'A' ... 'z' would terminate, but 'A' ... 'zz' wouldn't
...as long as we're special casing it for all kinds of dwimmery :)
22:52 kst left 22:53 kst joined
sorear TimToady: What does PEG Rule 5 mean? 22:53
TimToady that is, if the characters involved were all single codepoints, you'd do ('A'.ord ... 'z'.ord).map: *.chr
sorear "5) Declaration with least number of 'uses' wins" 22:54
lue
.oO(stop this tom-dwimmery!)
PEG?
TimToady as in the 'use' statement
I explained this earlier to today
22:55 jjore left, ruoso joined
sorear Ah, I see 22:56
22:56 ruoso left
sorear moritz++ 22:56
TimToady was masak++ that asked 22:57
sorear moritz provided the log though
TimToady which is why I didn't take away his ++ :)
sorear what's the difference between 3 and 5? 22:58
TimToady 3 is derivation independent of file
could be in the same file
more derived still wins
regardless of #4
22:59 snarkyboojum joined
sorear How does s[pattern] = doit() parse? 22:59
lue What's is PEG? Perl Ettiquette Guidelines...?
TimToady see S05
or the patch in question
22:59 ruoso joined
TimToady wikipedia also has an article on Parsing Expression Grammars (oops) 23:00
23:00 eternaleye left
TimToady sorear: the sibble rule does it 23:00
23:00 jjore joined
lue rakudo: say "1ffffff".fmt('%b') 23:01
p6eval rakudo 1eef08: OUTPUT«1␤»
lue ō.o
23:01 stephenlb left
TimToady rakudo: say "1fffff" + "1fffff" 23:03
p6eval rakudo 1eef08: OUTPUT«2␤»
TimToady looks right to me :)
apart from the missing "Weird junk after number" warnings :) 23:04
sorear I thought that was a fatal error in perl 6
lue *sigh*
rakudo: say :16<1ffffff>.fmt('%b')
p6eval rakudo 1eef08: OUTPUT«1111111111111111111111111␤»
TimToady well, errors that are too fatal are just as likely to crash a spacecraft as errors that are not fatal enough 23:05
and I'm not nearly as exception-happy now that we're trying to do hyperops and such 23:06
lue that looks better, but the script shouldn't have said all 1's (grr)
TimToady why not?
each f is 1111 23:07
lue my script output the wrong number, that's what I meant.
TimToady ah, don't try to confuse me--that would be redundant 23:08
lue would this line do what I want it to do? :
if $filein.split('')[$i].uc == "A" or "T" 23:09
(the equality part)
TimToady I was gonna say, don't you need some kind of mumblease to split DNA?
no, you need a junction for that 23:10
'A' | 'T'
lue thought so. No wonder I got all ones. "T" is true.
TimToady or any('A','T')
lue rakudo: say "hi" if "T" is True; 23:11
p6eval rakudo 1eef08: OUTPUT«Confused at line 11, near "say \"hi\" i"␤current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)␤»
TimToady you'll not it doesn't say *who* is confused there :P
*note
lue (methinks I got caught up in natural language)
rakudo: say "hi" if "T";
p6eval rakudo 1eef08: OUTPUT«hi␤»
sjohnson rakudo: say "hi" if 'F'; 23:13
sbp rakudo: say "1a" + "1a"
sjohnson rakudo, hailing from africa
p6eval rakudo 1eef08: OUTPUT«hi␤»
rakudo 1eef08: OUTPUT«2␤»
sbp rakudo: say "1a" + "a1a"
p6eval rakudo 1eef08: OUTPUT«1␤»
sbp rakudo: say "1a" + " 1a" 23:14
p6eval rakudo 1eef08: OUTPUT«2␤»
sbp rakudo: say "1a" + ".1a"
p6eval rakudo 1eef08: OUTPUT«1.1␤»
sbp rakudo: say "1a" + ":1a"
p6eval rakudo 1eef08: OUTPUT«1␤»
sbp rakudo: say "1a" + "..1a"
p6eval rakudo 1eef08: OUTPUT«1␤»
sbp rakudo: say "1a" + " .1a"
p6eval rakudo 1eef08: OUTPUT«1.1␤»
sbp thus endeth the test suite
TimToady basically doing p5 semantics there...
sjohnson perl 6 april fools joke should have rakudo behave oddly next year 23:15
lue while we're at Odd Math...
rakudo: my $a=3; my $b=2; say $a$b # implicit multiplication
p6eval rakudo 1eef08: OUTPUT«Confused at line 11, near "say $a$b #"␤current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)␤»
23:15 xabbu42 left
lue sjohnson: how would anyone notice the joke then? ;) 23:16
TimToady more precisely... 23:17
sjohnson heh
TimToady std: my $a=3; my $b=2; say $a$b # implicit multiplication
p6eval std 30558: OUTPUT«===SORRY!===␤Two terms in a row at /tmp/eIX2NYpmCc line 1:␤------> my $a=3; my $b=2; say $a⏏$b # implicit multiplication␤ expecting any of:␤ POST␤ bracketed infix␤ infix or meta-infix␤ postfix␤
..postfix_prefix_meta_operator␤ statement modifier…
23:18 justatheory left
slavik1 does the parrot library for postgres work? 23:19
lue so it recognizes the $ as a start of a new term, interesting. 23:20
(or rather, makes the distinction)
TimToady fundamentally, Perl is extremely opposed to juxtaposition operators, and has been since version 1, or maybe 0 23:21
the foibles of mathematicians notwithstanding
slavik1 what kind of threading model does Perl6 use? Whatever parrot provides?
TimToady Perl 6 is not defined in terms of parrot 23:22
23:22 eternaleye joined
sorear TimToady: Do you consider Rakudo's use of an "actions class" a fossil? 23:22
TimToady no
{*} is the fossil
lichtkind is err gone?
TimToady has been gone for ages 23:23
lichtkind but it was in rakudo :)
lue that (does & does not) put a damper on my proposed Math with Perl6 book :)
TimToady should put all his oracular sayings into hexameter
lichtkind TimToady: has it been replaced except of // ?
sorear TimToady: Asking because STD.pm6 seems to use exclusively inline actions
TimToady it was replaced with "orelse" 23:24
lue
.oO(talking in DNA bases is interesting)
23:24 felipe left
TimToady sorear: no, it's just you don't see the actions argument in viv 23:24
and pure STD doesn't care about actions yet
lichtkind TimToady: so i just use orels instead of where I former used err? 23:25
TimToady the point of making the actions plugglable is to put the same grammar to different uses
s/ggl/gg/
slavik1 should've studied linguistics ...
TimToady lichtkind: kinda, it is no longer exactly the same semantics as //
lichtkind TimToady: because you cannt connect blocks with // as orelse does i suggest 23:26
TimToady the point of orelse is to do logic programming, not provide defaults like // does
so they are merely similar 23:27
but andthen and orelse try to set up $_ or $! for testing sub-hypotheses
no one implements them yet, btw 23:28
sorear TimToady: OH!
That makes things *much* easier
TimToady slavik1: as for shared vs unshared data, p6's model is that everything outside the lexical scope of the async {} is shared, and everything inside isn't
which is why we try to make everything as lexical as possible, including dynamic vars
sorear TimToady++ uncanny ability to anticipate all my problems and pre-solve them 23:29
TimToady: Is that basically the same as "everything is shared, but the async {} is re-cloned in the new task"?
lichtkind TimToady: yadday orelse yadde comes much more fluent from my lips then yadda err yadda
TimToady yes, well, 35 years head start will do that... :) 23:30
23:30 kst left
TimToady it was err back when we thought it was just a low precedence // 23:30
then p5p got all hot and bothered that err should be dor
"defined or"
then I got all hot and bothered and said "Phooey, defined-or isn't what we wanted anyway" 23:31
23:31 kst joined
sorear I wonder if I could make a case for 'make' cloberring $/'s submatches 23:32
so, you either have an AST or a parse tree, but not both
TimToady except that the parser often wants to peek into submatches to decide things 23:33
sorear it does that before make, no?
TimToady in any case, with viv, unless you use the -m switch, it doesn't keep match pointers in the AST, and you can just throw away the whole match tree at the end, and keep the AST 23:34
sorear I'm more thinking about rakudo at this instant
23:35 lestrrat is now known as lest_away
sorear during the parse phase, rakudo generates a Match tree and a PAST tree 23:35
which are deeply intertwined
TimToady yes, well, rakudo's memory problems are not caused by keeping matches around, in my estimation
sorear what do you estimate they are caused by?
TimToady parrot silliness
lue can you blame them? 23:36
sorear well, yes
lue they're named after Monty Python, after all. :)
sorear it's a joint effort
TimToady I was named after Abraham Lincoln
sorear our match trees wouldn't hurt so much if Parrot didn't have such a ludicrous object representation
TimToady yes, well, I think in the long run it will turn out that PMCs were a bad idea 23:37
I muttered about this at the beginning, but they told me to stay out of parrot internals... 23:38
"we already know how you implement Perl, and we can do better" 23:39
lue why not just define the types people want, and use classes for your own?
I see your point, TimToady.
sorear PMCs disgust me
I can't put a finger on the totality of why, though
but many little cuts 23:40
TimToady confusion of containers with values, for one
sorear yes
lichtkind TimToady: thank you
sorear absolutely
diakopter you can never have too many object system layers; the taller the cake...
sorear that has caused me no end of headaches
TimToady the vtables stuff kinda turned out to be a premature optimization, I think
like a CPU with heavy microcode
sorear Parrot-land likes to think of Parrot as like a computer architecture
it has far too little policy 23:41
every HLL is expected to define its own ABI
cross-language calling is... tricky
TimToady yes, that too, the inability to capture abstractions at a useful level
lue further reason why Rakudo moving away from Parrot is a good long-term goal. 23:42
1. PMC's suck
2. Virtual Machines are slow
TimToady well, 2 is arguable, depending 23:43
lue On my computer, it's a bit faster than Java :/
TimToady however, parrot isn't a very good counterargument to 2 yet :)
diakopter depending whether it's bytecode JITted to machine code that calls into a runtime, or bytecode interpreted, and lots of other factors.
sorear every machine you can usefully program is virtual, lue 23:44
even FPGAs are emulators
diakopter lue: Java is near the top of most of the computer language shootout game benchmarks.. languages have their sweet spots, performance-wise.
TimToady but VMs are usually optimized heavily for a particular environment, and tend to be lousy at off-brand performance 23:46
lue On my old laptop though, virtual machine based languages have a huuge difference over ones that don't. (python, C, etc.)
TimToady a fabulous JIT that targets *86 is pretty useless on a Power PC 23:47
diakopter which python? and which C?
lue so rakudo being off parrot would, for me, be very cool.
Python 3. gcc
TimToady gcc is pretty slow by modern standards 23:48
lue TimToady: I ought to replace my G3 chip with a G4. I got this computer for free, so I'm keeping it.
diakopter is desperately trying to solve many problems I don't know exist, and some that I wrongly think exist, and some that I correctly know exist.
(incl some of the above) 23:49
lue I actually have a G4 chip, but that'd require desoldering on a two-sided circuit board :(
diakopter lue: it's a pismo?
lue Powerbook G3 Pismo, currently in use 23:50
TimToady at least, according to clang.llvm.org/features.html#performance
which is probably not an unbiased site :)
lue I can buy a G4 chip for the pismo, all it requires is a simple out-and-in of the cpu "module".
Tene lue: why do you say "abandon parrot" instead of "help fix parrot"? 23:51
lue it's a virtual machine. I prefer to emulate as little as possible on my poor computer. 23:52
I have to ssh to work on rakudo (when I do)
23:52 SmokeMachine left
diakopter lue: the fact that rakudo/parrot are slow is not due to parrot being a virtual machine 23:53
lue
.oO(once they get Mactel linux working, I really ought to invest in a shiny new mac laptop with Intel)
sorear when you use a modern microprocessor, you're already sitting on a layer cake a mile high
lue but I'm not, so there :P
diakopter lue: ^^
sorear "virtual machines are slow" is hopelessly naive
lue they are! (on my computer)
sorear there are some very interesting tradeoffs
your computer IS a virtual machine 23:54
why? because PPC instructions take up less space than horizontal microcode
the cache win outweighs the emulation loss
lue I don't care! A virtual machine at the user level is slow for me! 23:56
Tene lue: *everything* is slow on your computer. ;) 23:58
lue yes, but rakudo is slower than perl5, python, or anything else not virtually run :) 23:59
TimToady now you're changing your argument
Tene It's also slower than anything I haven't contributed code to.
pugssvn r30559 | diakopter++ | [S06] fix Freudian slap toyp