»ö« | perl6.org/ | nopaste: paste.lisp.org/new/perl6 | evalbot usage: 'perl6: say 3;' or rakudo: / pugs: / std: , or /msg p6eval perl6: ... | irclog: irc.pugscode.org/ | UTF-8 is our friend!
Set by moderator on 20 October 2009.
dukeleto moritz_: are you doing what i think you are doing? 00:04
moritz_: where is the source for hugme? 00:05
moritz_: and does it work with identi.ca?
00:09 pointme joined
carlin pointme: hugme 00:09
pointme Hugme hugs people! And gives commit access to various repos. It's source is at github.com/moritz/hugme/
moritz_ dukeleto: doesn't work with identi.ca unless Net::Twitter::Simple handles that too
oh, should work too 00:10
s/Simple/Lite/ 00:11
just needs an identica => 1 in the call to ->new() 00:12
diakopter pointme: pointme 00:14
pointme I have no idea what pointme does
diakopter how pointed of your
you
moritz_ carlin: see above :-)
00:20 bluescreen joined 00:31 pointme joined
carlin pointme: pointme 00:31
pointme Pointme is a suave, good-looking bot that links to proto projects, provides information about other bots and refers to itself in the third person
carlin
.oO( Self-aware bot )
00:32
Infinoid pointme: dalek 00:36
pointme Dalek announces commits to various repos. It's source is at github.com/Infinoid/dalek-plugins
Infinoid It is fantastic that our array of bots has grown to the point of needing a guide bot to sort them all out. 00:37
diakopter well, its plugin source is there. its framework source is at www.botnix.org
Infinoid ... for now. One day, I would like to replace the bot out from under the plugins.
carlin pointme: diakopter 00:38
pointme Sorry, I don't know anything about that project
carlin Aww
pointme: masak
pointme masak submits rakudo bugs ;-)
00:43 idemal joined
dukeleto moritz_: thanks! 00:47
00:51 Exodist joined
cognominal_ ng: say split / /, 'a b' 00:59
p6eval ng 3bdb4c: Null regex not allowed at line 1, near ", 'a b'"␤current instr.: 'perl6;HLL;Grammar;panic' pc 519 (src/stage0/HLL-s0.pir:336)␤
01:04 FarOut joined
KyleHa ng: say split / \\s /, 'a b'; 01:19
p6eval ng 3bdb4c: Could not find non-existent sub &split␤current instr.: '_block14' pc 29 (EVAL_1:0)␤
dukeleto pointme: dukeleto 01:26
pointme Sorry, I don't know anything about that project
01:36 agentzh joined 01:48 xinming joined 01:52 zostay joined 01:57 hcchien joined
diakopter pointme: TimToady 02:16
pointme Sorry, I don't know anything about that project
diakopter pointme: Perl 6
pointme Sorry, I don't know anything about that project
carlin pointme: Alan Parsons 02:18
pointme Sorry, I don't know anything about that project
02:19 orafu joined 02:23 agentzh joined
colomon rakudo: say (1, 2, 3) X (4, 5, 6); 02:32
p6eval rakudo 7347ec: 141516242526343536␤
colomon rakudo: say ((1, 2, 3) X (4, 5, 6)).perl
p6eval rakudo 7347ec: [1, 4, 1, 5, 1, 6, 2, 4, 2, 5, 2, 6, 3, 4, 3, 5, 3, 6]␤
02:35 jaldhar joined
facsimile rakudo: say perl.perl 02:39
p6eval rakudo 7347ec: Could not find non-existent sub perl␤in Main (file src/gen_setting.pm, line 324)␤
facsimile lol 02:40
02:41 zaphar_ps joined 02:44 pmichaud_ joined 02:45 gfldex_ joined 02:46 alester joined
carlin Is there an easy way to turn $/ into a hash of strings? 02:48
02:49 petdance joined 02:52 alester joined 02:53 alester joined
carlin just discovered that Match objects have a .Hash and .hash which do different things 03:14
facsimile rakudo: say Hash.hash 03:22
p6eval rakudo 7347ec: Hash()␤
diakopter token comment:sym<#> { '#' {} \\N* } # what does {} mean in a token rule? 03:28
Wolfman2000 back from dinner and company 03:30
03:30 eternaleye joined
Wolfman2000 don't know how much I'll be able to get done tonight 03:30
diakopter std: my $a-- = 3; say $a; 03:32
p6eval std 29173: ok 00:01 105m␤
diakopter rakudo: my $a-- = 3; say $a;
p6eval rakudo 7347ec: -1␤
diakopter ng: my $a-- = 3; say $a; 03:33
p6eval ng 3bdb4c: Cannot assign to readonly value␤current instr.: '&infix:<=>' pc 7550 (src/builtins/assign.pir:12)␤
diakopter golf claps
03:34 envi^office joined 03:43 petdance joined
eternaleye diakopter: nqp doesn't have =, just := iirc 03:49
oh wait, that's ng not nqp
eternaleye is not at full functionality
03:53 JimmyZ joined 04:00 LionMade1fLions joined
diakopter nqp: my $a := 3; say(--$a); say($a); 04:06
p6eval nqp: ␤2␤
diakopter nqp: my $a := 3; say($a--); say($a); 04:07
p6eval nqp: 3␤2␤
04:07 BinGOs_ joined
diakopter pmichaud_: ^^ 04:07
pmichaud_: same for preincrement 04:08
Wolfman2000 Hmm...unfortunately, I'm unsure about being able to pull off an MD5 or SHA demo for my cryptography project using Perl 6. Oh well: I've already got plenty.
...as a reminder, what are the Perl shifting operations? 04:10
diakopter ng: say (my $a=4)--.WHAT; # pmichaud_ I don't think this is correct - dotty following postdecrement? 04:19
p6eval ng 3bdb4c: Int()␤
04:19 eternaleye joined
quietfanatic I don't think anything's wrong with it. 04:20
Is there any specific reason to disallow dotty after postfix? 04:21
TimToady nope
dotty *is* a postfix
04:21 stepnem joined
TimToady so if we disallowed that, we've have to disallow $x.foo.bar as well :) 04:21
04:21 eternaleye joined
quietfanatic In general, I'm in favor of more allowing syntax rather than more restricting syntax. 04:23
04:24 LionMadeOfLions joined
diakopter rakudo: my $a = 5; say ++($a++); say $a; my $b = 5; say ++$b++; say $b; 04:24
p6eval rakudo 7347ec: 6␤6␤6␤7␤
diakopter ng: my $a = 5; say ++($a++); say $a; my $b = 5; say ++$b++; say $b;
p6eval ng 3bdb4c: Cannot assign to readonly value␤current instr.: '&infix:<=>' pc 7550 (src/builtins/assign.pir:12)␤
Wolfman2000 rakudo: my $a = 1; say $a << 1; # Does this even work? 04:25
p6eval rakudo 7347ec: Confused at line 2, near "<< 1; # Do"␤in Main (file <unknown>, line <unknown>)␤
Wolfman2000 better check the synopsis
quietfanatic Well, Rakudo does get that first wrong, $a should end up 7
diakopter std: my $a = 1; say $a << 1; # Does this even work?
p6eval std 29173: [31m===[0mSORRY![31m===[0m␤Obsolete use of << to do left shift; in Perl 6 please use +< or ~< instead at /tmp/6HNHyTV6eu line 1:␤------> [32mmy $a = 1; say $a << [33m⏏[31m1; # Does this even work?[0m␤FAILED 00:01 105m␤
quietfanatic Wolfman2000: I don't think there's a << operator 04:26
Wolfman2000 if nothing else, thanks for that
quietfanatic Ah
diakopter (see the error message above)
very much !LTA error message
Wolfman2000 diakopter++ / quietfanatic: I was debating adding a MD5/SHA program to my cryptography project, but...honestly, I'm out of time right now.
Still, learning how to shift bits should be good.
Just...not when I'm pressured. 04:27
...I do wonder. Does Perl 6 have any official cryptography modules yet, or should they just be remade from the Digest::* series? 04:28
carlin November has Digest implementation in mostly PIR but other than that I don't think there is anything yet 04:30
Wolfman2000 ...perhaps that will be a good project for me to look at this Thanksgiving.
You guys want more implementations with Perl 6 I assume...I can just add it to my Feather directories.
diakopter std: sub x3() {}; sub x55() {}; my $a = 55; say $a-x3-x55; # TimToady hilite 04:31
p6eval std 29173: Potential difficulties:␤ Variable $a-x3-x55 is not predeclared at /tmp/dUbnCbTHLS line 1:␤------> [32m sub x55() {}; my $a = 55; say $a-x3-x55[33m⏏[31m; # TimToady hilite[0m␤ok 00:01 106m␤
Wolfman2000 std: sub x3() {}; sub x55() {}; my $a = 55; say $a - x3() - x55(); # Wonder if this works. 04:32
p6eval std 29173: ok 00:01 106m␤
Wolfman2000 rakudo: sub x3() {}; sub x55() {}; my $a = 55; say $a - x3() - x55(); # Wonder if this works.
p6eval rakudo 7347ec: 55␤
Wolfman2000 diakopter: How do we run std on the command line anyway? It seems to give better error messages than rakudo does
diakopter yeah, I knew that would work; I guess it's an issue of error messages. if it finds a non-predeclared variable name and it contains a hyphen, warn about minus symbol being taken as a hypen in a variable name 04:34
quietfanatic If the left part is a predeclared variable? 04:35
diakopter Wolfman2000: in the pugs/src/perl6 dir (after blanking the PERL5LIB as discussed previously), run ./viv -e 'code to syntax check/compile' 04:36
TimToady or if you don't want the tree, >filename and then ./tryfile filename
or >/dev/null your viv 04:37
Wolfman2000 ...sounds like I should just make pugs/src/perl6 part of my path
TimToady and just let stderr out
probably won't work
diakopter Wolfman2000: no, you need to be in that dir
TimToady it's not really productized or installable yet
and assumes its cache and lib are in .
what you can do is make a symlink from elsewhere into that dir; I do that with the t/ directory 04:38
then tryfile t/spec/foo.t
Wolfman2000 I'll look into that...tomorrow night. I think I need sleep now...big day tomorrow. 04:39
I get to show my class my project with Perl 6 in action.
TimToady: I gave you extra credit on my sources too.
TimToady :D
Wolfman2000 Hopefully Feather won't be down...otherwise, it will be slightly embarassing 04:40
Just have to survive until 8 PM EST
04:45 envi^home joined
TimToady rakudo: say 1,2,3 X 4,5,6 05:01
p6eval rakudo 7347ec: 141516242526343536␤
TimToady colomon: note lack of parens works ^^ 05:02
rakudo: say ('㊀'..'㊉').pick 05:06
that's an infinite loop, seemingly
p6eval rakudo 7347ec: ( no output )
TimToady didn't used to be
05:07 hicx174 joined
diakopter rakudo: '㊀'..'㊉'.pick 05:17
p6eval rakudo 7347ec: maximum recursion depth exceeded␤in Main (file <unknown>, line <unknown>)␤
facsimile rakudo: '㊀'..'㊉'. 05:18
rakudo: '㊀'..'㊉'
p6eval rakudo 7347ec: Confused at line 2, near "."␤in Main (file <unknown>, line <unknown>)␤
rakudo 7347ec: ( no output )
diakopter ok...
facsimile rakudo: say '㊀'..'㊉'
p6eval rakudo 7347ec: ( no output )
facsimile rakudo: say 'a'..'z'
p6eval rakudo 7347ec: abcdefghijklmnopqrstuvwxyz␤ 05:19
05:21 meteorjay joined, luqui joined 05:22 jaldhar joined 05:42 pure1111 joined 06:02 ashizawa joined 06:17 pnate2 joined 06:39 snearch joined 06:50 ihrd joined, ihrd left
colomon TimToady: thanks! 06:53
hmmm....
rakudo: (1..3 X 4..6).say 06:54
p6eval rakudo 7347ec: 141516242526343536␤
colomon :)
07:04 Jeffreykegler joined 07:06 TiMBuS joined 07:11 kaare joined 07:23 meppl joined 07:27 envi^home joined 07:33 eternaleye joined 08:00 szabgab joined 08:03 barney joined
mathw Morning 08:15
moritz_ good morning
diakopter mhu
08:16 jaldhar joined
moritz_ rho 08:16
(Raphael Descamps)++ # "In that sense, Perl 6 stay a postmodern ironic programming language ;)" 08:22
08:32 Su-Shee joined
Su-Shee good morning. 08:32
moritz_ hi Su-Shee 08:34
sjohnson hello 08:35
mathw moritz_: a postmodern ironic programming language?? 08:39
08:42 rfordinal joined 08:47 iblechbot joined 08:51 rgrau joined
moritz_ mathw: read the last comment on perlgeek.de/blog-en/perl-6/is-perl-....writeback 08:53
mathw aaah 08:55
yes that seems accurate
moritz_ just liked the term 08:56
Su-Shee postmodernism already contains irony as a concept. 08:58
moritz_ so it's doubly ironic :-) 08:59
09:00 kaare joined
Su-Shee you should add one or two references to foucault at some point. ;) 09:00
moritz_ only knows the foucault pendulum 09:01
such is the ignorance of the natural scientists 09:03
(at least of one of them :-)
Su-Shee michel foucault -> en.wikipedia.org/wiki/Michel_Foucault - no postmodernism without the french fellows.. ;) 09:04
moritz_ yeah, found the wiki already :-)
Su-Shee well, it's easy. start with nietzsche and read from marx over freud to the french brainfuckers and there you have it. ;) 09:05
09:06 wollmers joined
moritz_ as long as you don't suggest to "just" read Kant... :-) 09:07
wollmers std: say 1;
p6eval std 29173: ok 00:01 105m␤
wollmers moritz: Kant is boring because of the complex German language
moritz_ I don't think he's boring; just hard to read 09:08
09:09 flip214 joined
wollmers Yea, I read 'Kritik der reinen Vernunft' ~35 years ago. 09:09
flip214 Hello everybody ....
it's me again with a few questions.
As usual.
wollmers std: "a" ~~ m/<isL>/ 09:10
p6eval std 29173: ok 00:01 105m␤
mathw flip214: ask away
moritz_ wasn't even born ~35 years ago
wollmers std: "a" ~~ m/<isBidiClass:L>/
p6eval std 29173: ok 00:01 104m␤
wollmers rakudo: "a" ~~ m/<isBidiClass:L>/ 09:11
p6eval rakudo 7347ec: Confused at line 2, near "/"␤in Main (file <unknown>, line <unknown>)␤
Su-Shee moritz_: you "just" read Kant, I "just" learn Math. ;)
flip214 Is there a way to give perl6 some additional directories where to look for libraries? A "-Ilib:~/lib" or something like that.
I think that PERL5LIB won't work ;-)
mathw there's PERL6LIB
moritz_ flip214: nope, it's PERl6LIB
:-)
mathw I'm not sure Rakudo accepts a command line option for search path 09:12
moritz_ there's also BEGIN { @*INC.push: 'lib' } in the code
Su-Shee doesn't pushing on @*INC work?
flip214 Is there a -I switch? I didn't find one.
Su-Shee ah well. :)
mathw Su-Shee: you have to do it in the BEGIN block, but yes, it does :)
Su-Shee I thought so, I already used it somewhere. ;)
mathw (obviously if you do it outside BEGIN, it doesn't happen until after the module search has happened)
moritz_ which is fine if you only use use in an eval block at run time :-) 09:13
wollmers perl6: "a" ~~ m/<isBidiClass:L>/
p6eval pugs: Error eval perl5: "if (!$INC{'Pugs/Runtime/Match/HsBridge.pm'}) {␤ unshift @INC, '/home/p6eval/.cabal/share/Pugs-6.2.13.14/blib6/pugs/perl5/lib';␤ eval q[require 'Pugs/Runtime/Match/HsBridge.pm'] or die $@;␤}␤'Pugs::Runtime::Match::HsBridge'␤"␤*** '<HANDLE>' trapped by operation mas…
..elf 29173: ( no output )
..rakudo 7347ec: Confused at line 2, near "/"␤in Main (file <unknown>, line <unknown>)␤
moritz_ s/block /
flip214 Ok, I'll use PERL6LIB, until -I has arrived
moritz_ rakudo: /<a :b>/
mathw moritz_: let's not go there
p6eval rakudo 7347ec: Confused at line 2, near "/"␤in Main (file <unknown>, line <unknown>)␤
moritz_ mathw: ok :-)
flip214 and another question: I have problems exporting a constant
rakudo: say $C; module T; constant $C='aaaa' is export; 09:14
p6eval rakudo 7347ec: Confused at line 2, near "is export;"␤in Main (file <unknown>, line <unknown>)␤
flip214 there's no "is export" on constants, is there?
wollmers moritz: The syntax for non-boolean unicode properties seems unspecced. In Perl 5 it is \\p{BidiClass:L}. 09:15
moritz_ flip214: not yet
std: /<isBidiClass(:L)>/ 09:17
p6eval std 29173: ok 00:01 104m␤
moritz_ wollmers: that would be my preference
wollmers moritz: OK, looks nice. 09:18
moritz_ if you write <before foo>, the foo is a regex
so I think that <isBidiClass:L> or with space <isBidiClass :L> looks misleading 09:19
but I could be wrong here
and in the end it's TimToady's calls
dev.perl.org now links to perl6.org 09:30
wollmers std: /<isBidiClass(:L)+isBidiClass(:R)>/ 09:37
p6eval std 29173: [31m===[0mSORRY![31m===[0m␤Unable to parse metachar__S_477Lt_Gt; couldn't find final '>' at /tmp/6oMJAVAV6y line 1:␤------> [32m/<isBidiClass(:L)[33m⏏[31m+isBidiClass(:R)>/[0m␤FAILED 00:01 104m␤
wollmers std: /<isBidiClass(:L) +isBidiClass(:R)>/ 09:38
p6eval std 29173: [31m===[0mSORRY![31m===[0m␤Unable to parse metachar__S_477Lt_Gt; couldn't find final '>' at /tmp/n2r3YD8DAv line 1:␤------> [32m/<isBidiClass(:L)[33m⏏[31m +isBidiClass(:R)>/[0m␤FAILED 00:01 103m␤
wollmers std: /<isLetter +isNumber>/ 09:43
p6eval std 29173: [31m===[0mSORRY![31m===[0m␤quantifier quantifies nothing at /tmp/Hknb14RHFJ line 1:␤------> [32m/<isLetter +[33m⏏[31misNumber>/[0m␤ expecting quantmod␤FAILED 00:01 103m␤
moritz_ std: / <+isLetter +isNumber>/ 09:44
p6eval std 29173: ok 00:01 104m␤
moritz_ std: / <+isLetter(:foo) +isNumber>/
p6eval std 29173: [31m===[0mSORRY![31m===[0m␤Unable to parse metachar__S_477Lt_Gt; couldn't find final '>' at /tmp/fTXy70FRB3 line 1:␤------> [32m/ <+isLetter[33m⏏[31m(:foo) +isNumber>/[0m␤ expecting any of:␤ character class element␤ normspace␤ sign␤FAILED 00:01 103m␤
09:45 ejs joined
wollmers std: m/ <[aeiou]+[tlc]> / 09:46
p6eval std 29173: ok 00:01 104m␤
wollmers std: m/ <isL+[isN]> / 09:50
p6eval std 29173: [31m===[0mSORRY![31m===[0m␤quantifier quantifies nothing at /tmp/jFAf3V6Dfr line 1:␤------> [32mm/ <isL+[33m⏏[31m[isN]> /[0m␤ expecting quantmod␤FAILED 00:01 106m␤
wollmers std: m/ <isL+isN> / 09:51
p6eval std 29173: [31m===[0mSORRY![31m===[0m␤quantifier quantifies nothing at /tmp/2VF0zXPnR7 line 1:␤------> [32mm/ <isL+[33m⏏[31misN> /[0m␤ expecting quantmod␤FAILED 00:01 103m␤
wollmers std: m/ <[abc]+[cde]> /
p6eval std 29173: ok 00:01 104m␤
wollmers std: m/ <[abc] +[cde]> / 09:52
p6eval std 29173: ok 00:01 104m␤
wollmers std: m/ <isL +[cde]> /
p6eval std 29173: [31m===[0mSORRY![31m===[0m␤quantifier quantifies nothing at /tmp/zUFvMa0R1M line 1:␤------> [32mm/ <isL +[33m⏏[31m[cde]> /[0m␤ expecting quantmod␤FAILED 00:01 103m␤
mathw moritz_: one of the earlier comments on that article questions the explicitness of TMTOWTDI. I always felt that it was very explicit, and very deliberate. Agree? 09:54
moritz_ agreed.
09:54 ejs1 joined
moritz_ for example map and for are synonymous, and that's about as explicit as you can get :-) 09:55
mathw yes
also $obj.method(arg, arg, arg);
$obj.method: arg, arg, arg;
and the is export on most of the builtin methods
it's highly explicit in Perl 6 09:56
oh and with the new S metaoperator, I believe you can use hyperoperators as various exact synonyms for looping
10:06 clintongormley joined 10:08 Guest56850 joined
wollmers std: m/ <+isL+isN> / 10:18
p6eval std 29173: ok 00:01 104m␤
10:18 beggars joined
moritz_ std: <a b c>S>>.uc 10:19
p6eval std 29173: [31m===[0mSORRY![31m===[0m␤Preceding context expects a term, but found infix > instead at /tmp/t2aeMg8lB6 line 1:␤------> [32m<a b c>S>>[33m⏏[31m.uc[0m␤ expecting any of:␤ infix or meta-infix␤ infix stopper␤ standard stopper␤ terminator␤FAILED 00:01 104m␤
moritz_ mathw: at least STD.pm doesn't like it as postfixish 10:20
mathw moritz_: something in larry's spec update mentioned you could use it with certain forms, but it may be that it only works with infixish hypers 10:22
moritz_: a S»op« b single-threaded hyperop 10:24
but apparently not with postfix forms 10:25
which would be nice, but I guess could cause all sorts of mess with the parsing
spinclad_ diakopter: re # what does {} do: aiui, {} is an empty closure that ends the fixed part of the token for LTM purposes. 10:29
mathw how often are the HTML synopses generated? 10:34
10:40 jferrero joined 10:43 rfordinal left
diakopter spinclad_: thanks 10:50
urgh; 'tis late 10:51
mathw: I think at the top of every hour 10:57
11:00 sRc joined, sRc left 11:06 hanekomu joined
diakopter asked code.google.com/p/v8/issues/detail?id=523 11:07
flip214 I just read about the "S" metaoperator ... 11:21
But I don't understand how there can be a "short-circuited XOR junction" 11:22
moritz_ flip214: an xor with more than two arguments is true if exactly one of the arguments is true 11:23
flip214: so as soon as two True values are found, it can short-circuit
flip214 is that so? 11:24
rakudo: say 1 ^ 1 ^ 1 ^ 0;
p6eval rakudo 7347ec: one(1, 1, 1, 0)␤
flip214 rakudo: say 1 ^^ 1 ^^ 1 ^^ 0;
p6eval rakudo 7347ec: 1␤
moritz_ rakudo is wrong here 11:25
flip214 I understand XOR as "parity" generation, ie. if an odd number is set
moritz_ that's the other possible interpretation
flip214 Hmm, I didn't even *know* that the computer-XOR has more than the one interpretation 11:26
are we sure that this won't break some assumptions?
I can see use cases for "exclusive-OR", too ... 11:27
How would one get _my_ XOR? parity generation over bit/binary/boolean values? 11:28
moritz_ @list.reduce: &[^^] 11:29
lambdabot Unknown command, try @list
moritz_ or [^^] @values 11:30
flip214 rakudo: my @list=1,1,1,1,0; say [^^] @values;
p6eval rakudo 7347ec: say requires an argument at line 2, near " [^^] @val"␤in Main (file src/gen_setting.pm, line 2593)␤
flip214 rakudo: my @list=1,1,1,1,0; say [^^] @list;; 11:31
p6eval rakudo 7347ec: say requires an argument at line 2, near " [^^] @lis"␤in Main (file src/gen_setting.pm, line 2593)␤
moritz_ rakudo: say [^^] 1,1,1,1,0
Gothmog_ moritz_: I don't understand what you said, either. Could you define your interpretation of XOR?
p6eval rakudo 7347ec: say requires an argument at line 2, near " [^^] 1,1,"␤in Main (file src/gen_setting.pm, line 2593)␤
flip214 rakudo: my @list=1,1,1,1,0; say @list.».infix:<^^>;
p6eval rakudo 7347ec: Confused at line 2, near ":<^^>;"␤in Main (file <unknown>, line <unknown>)␤
moritz_ Gothmog_: XOR = exactly one of the inputs is True
Gothmog_ Ah. 11:32
So you're just talking about two different things.
flip214 I'd like to get some way to get parity generation; either for Booleans, or over some Int values
rakudo: say 3 ^^ 4;
p6eval rakudo 7347ec: ␤
flip214 rakudo: say 3 ^ 4;
p6eval rakudo 7347ec: one(3, 4)␤
flip214 rakudo: say 3 xor 4; 11:33
p6eval rakudo 7347ec: 3␤
Gothmog_ flip214: moritz talks about xor(a1, a2, a3, ..., an) while you talk about xor(a1, xor(a2, xor(, ..., xor(a(n-1), an))...)
moritz_ flip214: [?^] for booleans, [+^] for ints
flip214 rakudo: say 3 +^ 4;
p6eval rakudo 7347ec: 7␤
flip214 ah yes, thank you
that's it
moritz_ rakudo: say [?^] 1, 1, 1, 1, 0
p6eval rakudo 7347ec: 0␤
moritz_ rakudo: say [?^] 1, 1, 1, 1, 0, 1
flip214 rakudo: say [+^] 1,1,1,0;
p6eval rakudo 7347ec: 1␤
rakudo 7347ec: 1␤ 11:34
flip214 rakudo: say [+^] 1,1,1,0,3;
p6eval rakudo 7347ec: 2␤
moritz_ Gothmog_++ # thata's exactly it, but I was too stupid to explain it
flip214 fine
rakudo: say [~] 1,1,1,0,3;
p6eval rakudo 7347ec: 11103␤
flip214 rakudo: say [?^] 1,1,1,0,3; 11:35
p6eval rakudo 7347ec: 1␤
flip214 so that's wrong?
11:35 SmokeMachine joined
flip214 rakudo should return false here? 11:35
rakudo: say [?^] 1,1;
p6eval rakudo 7347ec: 0␤
flip214 rakudo: say [?^] 1,0;
p6eval rakudo 7347ec: 1␤
flip214 rakudo: say [?^] 1,0,1,0,1; 11:36
p6eval rakudo 7347ec: 1␤
flip214 rakudo: say [?^] 1,False,1,0,3;
p6eval rakudo 7347ec: 1␤
moritz_ [?^] 1,1,1,0,3 is ((((1 xor 1) xor 1) xor 0) xor 3) 11:37
if you want number of true values
grep True, @values
rakudo: say +(grep True, 1,0,1,0,1)
p6eval rakudo 7347ec: 5␤ 11:38
moritz_ nope, wrong
rakudo: say +(grep {$_}, 1,0,1,0,1)
p6eval rakudo 7347ec: 3␤
moritz_ rakudo: say +(grep {$_}, 1,0,1,0,1) % 2
p6eval rakudo 7347ec: 1␤
moritz_ better
Su-Shee does rakudo have a -T? (or is getting one?) 11:43
moritz_ not yet 11:44
mathw diakopter: well, SO3 doesn't seem to have been done for a few days, unless there's a cache somewhere in my way 11:45
moritz_ This page was generated at 2009-11-07 16:01:24 GMT. 11:47
mathw quite 11:48
it doesn't have the S metaop in it
moritz_ the issue is a missing CPAN module on feather 11:52
flip214 sorry, 've been away ... 11:55
moritz: but that sounds a bit awful, performance-wise ... all I want to know is the even/odd information, and for that a complete list is built again, just to check it's length? 11:56
I think the [?^] and [+^] will work for me ... 11:57
If they don't (or I don't think they do, because I'm mistaken again), I'll be back
Thank you all the same
mathw moritz_: Ah good, at least it's relatively solvable 11:58
12:01 envi^home joined
moritz_ except that I tried to build .deb packages for it, and failed epically 12:05
it requires Test::Harness::Straps
dh-make-perl --cpan Test::Harness::Straps tells me it's a core module
mathw hmm
that's odd
moritz_ but dh-make-perl --cpan Test::TAP::Model writes a dependency for libtest-harness-straps-perl 12:06
12:10 snearch joined
moritz_ info: 956 smartlinks found and 54 broken in 730 test files (177 test files had no links). 12:10
that's... bad
I had it down to 3 broken links or so a few months ago 12:11
S\\d\\d are now regenerated. 12:17
mathw moritz_++
rjh I just noticed, nobody here ever uses the negative karma option. My company's IRC is a bit different :) 12:21
moritz_ rjh: that's because destructive contributions are really rare here
I can't remember a single case of vanadlism in the pugs repo, for instance 12:22
mathw the only time I've ever seen it is someone demoting themself 12:23
we use it in my own server's IRC a lot though, usually complaining about various companies and products and politicians :) 12:24
moritz_ and we lambdabot-- occasionally 12:25
@karma lambdabot
lambdabot lambdabot has a karma of -2
mathw yes well 12:26
that's necessary
moritz_ and I --'ed somebody for introducing an arbitrary code execution hole in p6eval, as absurd as it sounds :-) 12:27
colomon ok sign(undef) ~~ undef, 'sign(undef) is undef'; 12:29
does that make any sense as a test?
none of the other numeric functions are tested against undef 12:30
moritz_ wasn't sure, just took what the spec said
colomon ah yes, you are to blame. :)
moritz_ of course I am, that's my job :-) 12:31
colomon dear heavens, that is what the spec says 12:32
freaky
moritz_ mentally links to his recent blog post "why I commit crud to the Perl 6 test suite" :-)
colomon on the other hand, I don't see anything there about sign(Complex) == undef, and you added that, too. 12:33
moritz_ that was based on a discussion in RT and a comment from TimToady 12:38
12:38 zamolxes joined
moritz_ Complex.Num fail()s for $.im != 0, and sign() notionally just propagates that failure 12:39
colomon why not a 1+0i test too, then?
colomon is busy adding tests to sign... 12:40
moritz_ rakudo: say sign(1+0i).perl
p6eval rakudo 7347ec: undef␤
moritz_ hm
colomon: I probably didn't do it because it's not really spec yet
colomon okay, make break spectest for a few minutes here.... 12:43
pugs_svn r29174 | colomon++ | [t/spec] Add tests for method form, Rats, and Num. 12:44
12:46 Helios joined
colomon actually, could someone grab that and test it against master? 12:46
colomon didn't realize getting the latest master would be so involved... 12:47
sign.t 12:48
colomon did indeed break spectest 12:57
pmichaud_ good morning, #perl6 12:58
colomon \\o/
pmichaud_ ng: 'abc' ~~ / b { say "matched it, we did!" } / 12:59
p6eval ng 3bdb4c: Symbol '$¢' not predeclared in <anonymous>␤current instr.: 'perl6;PCT;HLLCompiler;panic' pc 137 (src/PCT/HLLCompiler.pir:101)␤
pmichaud_ hmmmm 13:00
moritz_ does it work locally for you? 13:01
and good morning pmichaud_ :-)
pmichaud_ oh, it probably breaks locally for me as well. I think I just fail to declare $¢ in regex blocks. 13:02
13:03 bluescreen joined 13:08 takadonet joined
takadonet hey all 13:08
colomon is getting into twisty loops of testing logic.... master spectest passes again locally on his machine, but he knows his implementation is incorrect, therefore the tests must be also incomplete... 13:09
13:10 pnate2 joined 13:13 payload joined
dalek kudo: 1445ba3 | (Solomon Foster)++ | src/setting/ (2 files):
Rough but working versions of Int.sign and Rat.sign.
13:13
colomon rakudo: say 1 eq 4/4 13:14
p6eval rakudo 7347ec: 1␤
moritz_ surprised 13:15
colomon that's why the incorrect tests pass
it's a quasi-sensible result, but means we're not correctly testing the type returned by sign. 13:16
moritz_ well, numeric tests should generally not rely on is()
they should use is_approx, or ok $a == $b
and then isa_ok for checking the return type
colomon I guess I don't see what's wrong with using is for results which should be Ints.... 13:17
and I will add isa_ok checks in a sec.
13:25 ejs1 joined
pmichaud_ ...why shouldn't numeric tests be using is() ? 13:26
oh, nm. 13:27
pugs_svn r29175 | colomon++ | [t/spec] Add tests that sign returns Int.
pmichaud_ things that are floats probably shouldn't be using is()
but other tests that contain exact values should use is(), I think.
cognominal_ pmichaud, what is the meaning of the pasttype 'alt'? 13:29
zaslon lolmasakhazblogged! masak++ 'November 23 2009 -- of China(s) and cheese': use.perl.org/~masak/journal/39933?from=rss
13:30 ashizawa joined
dalek kudo: a55d864 | (Solomon Foster)++ | src/setting/ (2 files):
Fix Int.sign and Rat.sign so they correctly return Ints.
13:30
colomon Okay, now back to my original goal of getting sign working in ng. 13:32
moritz_ :-)
colomon pmichaud_: any chance of quickly sneaking undef into ng? We're not going to pass all of the sign.t tests without it.... :)
13:33 ruoso joined
moritz_ phenny: tell masak see ali.as/top100/index.html for ideas how to score projects 13:34
phenny moritz_: I'll pass that on when masak is around.
13:35 ejs2 joined
cognominal_ masak, in your article you forgot to say that our great (and benevolent) helmsman left for Taiwan's equivalent 13:36
colomon oh wow, master's Num.sign is beautiful.
13:36 camenix joined
colomon ng: say NaN ~~ NaN 13:43
p6eval ng 3bdb4c: Method 'ACCEPTS' not found for invocant of class 'Float'␤current instr.: '&infix:<~~>' pc 157427 (src/gen/perl6-actions.pir:0)␤
colomon ng: say 2 <=> 4
p6eval ng 3bdb4c: Confused at line 1, near "say 2 <=> "␤current instr.: 'perl6;HLL;Grammar;panic' pc 519 (src/stage0/HLL-s0.pir:336)␤
colomon Well, that's going to make self ~~ NaN ?? NaN !! self <=> 0 a bit tricky now, isn't it? 13:44
moritz_ well, you can implement it :-)
colomon ng: say 2 < 4
p6eval ng 3bdb4c: sh: ./perl6: No such file or directory␤
colomon all right, now that's just getting silly. 13:45
moritz_ or use <, == and > separately
colomon ;)
Seems like the incremental difficulty of implementing <=> over sign is pretty minor... let's give it a go. 13:46
see how much I can get done before I take the boy to the library for storytime. 13:47
ng: say 2 cmp 4 13:48
p6eval ng 3bdb4c: Confused at line 1, near "say 2 cmp "␤current instr.: 'perl6;HLL;Grammar;panic' pc 519 (src/stage0/HLL-s0.pir:336)␤
colomon Oh, wait. I suppose ng doesn't have order, either? 13:49
Order, I mean.
ng: Order
p6eval ng 3bdb4c: Could not find non-existent sub &Order␤current instr.: '_block14' pc 29 (EVAL_1:0)␤
moritz_ I think you suppose correctly :-)
rakudo: Order
p6eval rakudo 7347ec: ( no output )
colomon Okay, maybe I'll just whip together an inelegant sign instead. 13:50
13:52 ejs2 joined
pmichaud_ moritz_: (undef) Sure, we can haz undef. It would really help if I could nail down what it returns exactly. 13:54
moritz_ pmichaud_: that was colomon... I think by default undef returns the Object type object 13:55
pmichaud_ oh, you're right, that was colomon 13:58
if undef just returns Object, then it's just 13:59
colomon and considering my luck so far implementing sign, may have been premature. ;)
pmichaud_ our sub undef() is export { Object };
colomon not Object.net?
Object.new?
pmichaud_ that wouldn't be the type object
and in some sense, Object.new should be defined.
(whereas we obviously want an undefined object :-)
colomon okay. 14:00
moritz_ pmichaud_: uhm, undef should be parsed as a term, not listop
pmichaud_ moritz_: sure, but I suspect there's still an &undef function somewhere. 14:01
moritz_ pmichaud_: the function is called undefined()
pmichaud_ that's a different function
moritz_ std: undef ~~ 1
p6eval std 29175: ok 00:01 105m␤
pmichaud_ undefined() will undef a variable
moritz_ std: sub a(); a ~~ 1 14:02
p6eval std 29175: [31m===[0mSORRY![31m===[0m␤Missing block at /tmp/b0JqcBS8CV line 1:␤------> [32msub a()[33m⏏[31m; a ~~ 1[0m␤ expecting any of:␤ block␤ routine_def␤ terminator␤ trait␤ whitespace␤FAILED 00:01 104m␤
moritz_ std: sub a() { }; a ~~ 1
p6eval std 29175: [31m===[0mSORRY![31m===[0m␤Preceding context expects a term, but found infix ~~ instead at /tmp/BPEWNQqh4r line 1:␤------> [32msub a() { }; a ~~[33m⏏[31m 1[0m␤FAILED 00:01 106m␤
moritz_ pmichaud_: STD.pm doesn't know about an undef() function
you can see it doesn't parse as a listup
pmichaud_ std: undef()
colomon Do named arguments work in ng yet?
p6eval std 29175: Undeclared routine:␤ 'undef' used at line 1␤ok 00:01 103m␤
moritz_ s/up/op/
pmichaud_ colomon: they should, yes. 14:03
colomon huh.
pmichaud_ moritz_: I agree that undef is a term, yes.
I'm wondering if there's also an &undef function. I'm fine if there isn't.
you're correct that std doesn't recognize one. 14:04
colomon ng: say sign(1.0e0) 14:07
p6eval ng 3bdb4c: Method 'sign' not found for invocant of class 'Num'␤current instr.: '&sign' pc 178053 (src/gen/core.pir:5033)␤
colomon ieeeeeeee 14:08
ng: say 1.0e0.WHAT
p6eval ng 3bdb4c: Int()␤
colomon ng: say 1.1e0.WHAT
p6eval ng 3bdb4c: Num()␤
moritz_ uhm.
moritz_ calls that a bug
14:15 szabgab joined
colomon even spookier: 14:16
ng: say 1.5e1.WHAT
p6eval ng 3bdb4c: Int()␤
colomon it's disturbingly smart about it....
moritz_ ETOOSMART
pmichaud_ did someone adjust the floating point code? 14:18
ohhhh, I see. 14:19
colomon Not me.
ng: say NaN == NaN
p6eval ng 3bdb4c: 0␤
pmichaud_ internally the code gets converted to a Parrot float
so 1.5e1 ends up in the PIR source as "15"
which Parrot treats as an Int
mathw umm 14:20
that's not good
moritz_ so you'd have to go through a $N register?
pmichaud_ no, we can tell the PAST::Val the exact type of object to be created 14:21
moritz_ that sounds better
pmichaud_ tries that.
pmichaud > say 1.5e1.WHAT 14:23
Num()
lambdabot Not in scope: `say'Not in scope: data constructor `WHAT'
14:23 _jaldhar joined
moritz_ lambdabot: learn some context, you fool 14:23
pmichaud if anyone has a suggestion for a won't-clash-with-lambdabot prompt, we can change that too. :)
moritz_ suggests to kick lambdabot instead
zaslon: karma 14:24
zaslon Sorry, I don't understand that command
moritz_ zaslon: karma moritz_
zaslon Sorry, I don't understand that command
moritz_ hm, that was mubot
pmichaud I was thinking about »ö« as a prompt, but it doesn't quite look right to me in practice.
moritz_ I'd rather add some karma tracking facilities to hugme and kick lambdabot for good 14:25
pmichaud I also tried »ö«: as a prompt... that's a little better but still didn't quite look right.
moritz_ it's too symmetric
a prompt is something asymmetric
mathw just kill lambdabot 14:26
it responds to too many different leading characters
bad command set
colomon ng: say NaN eq NaN 14:29
p6eval ng 3bdb4c: 1␤
colomon ng: say 19 eq NaN
p6eval ng 3bdb4c: 0␤
colomon ng: say NaN.WHAT
p6eval ng 3bdb4c: Num()␤
colomon btw, in ng plan * seems to generate 14:31
"1..!whatever_dispatch_helper" for the number of tests....
moritz_ rakudo: say * ~~ Whatever
p6eval rakudo 7347ec: 1␤ 14:32
moritz_ rakudo: say 1 ~~ Whatever
p6eval rakudo 7347ec: 0␤
moritz_ I guess we can fix plan()
ng_feed rakudo-ng: pmichaud++ 14:33
rakudo-ng: Force 1e0 to build a Num.
14:34 perlygatekeeper joined
pugs_svn r29176 | colomon++ | [t/spec] Change 1.5e1 to 1.5e0 to test around current ng bug which makes 1.5e1 an Int. 14:34
colomon Ironic juxtaposition of those last two commits, eh? :) 14:35
14:35 am0c joined
pmichaud we fix bugs *and* work around them :) 14:40
14:43 ejs joined
ng_feed rakudo-ng: colomon++ 14:45
rakudo-ng: Merge branch 'ng' of git@github.com:rakudo/rakudo into ng
rakudo-ng: colomon++
rakudo-ng: Provide basic implementations of Int.sign, Rat.sign, and Num.sign.
14:45 FullMetalHarlot joined
colomon okay, I just pushed what I've got of sign. The first 33 tests pass, and then the named argument tests blow up. 14:45
14:45 iblechbot joined
moritz_ is this the multi/proto/named args thing? 14:46
colomon I've got to take the boy to storytime, and should probably do $work after that, so if someone else could take a look at the named argument thing, that would be cool....
moritz_: yes, though I think we thought that worked in ng.
moritz_ maybe I'll look into it later 14:47
14:50 kolibrie joined 15:07 PacoLinux joined 15:11 Psyche^ joined 15:21 hudnix joined 15:24 Bzek joined
[particle]1 rakudo: use v6; say 'hi'; 15:27
p6eval rakudo 7347ec: hi␤
moritz_ rakudo: #=======␤#=======␤use v6; 15:29
p6eval rakudo 7347ec: Could not find non-existent sub v6␤in Main (file src/gen_setting.pm, line 324)␤ 15:30
moritz_ there you go
std: #=======␤#=======␤use v6; 15:31
p6eval std 29176: ok 00:01 104m␤
15:31 payload joined 15:38 alester joined 15:39 rfordinal joined 15:43 ejs joined
moritz_ (for the record: bug reported) 15:44
I've found a computationally *very* expensive way to calculate a sine function
Gothmog_ Picking a double by random and checking for correctness? 15:45
moritz_ do a quantum mechanical tight-binding simulation of a wire with spin-orbit coupling
and then look at the spin conductance as a function of the spin-orbit coupling strength
Gothmog_ bzzt 15:46
pmichaud hmmm. I don't think term:<undef> can simply return the Object type object 15:50
because then $x ~~ undef doesn't dtrt
so whatever undef returns, it's likely not a type object. 15:51
(or not only a type object)
moritz_ unless Object.ACCEPTS is special-cased 15:52
pmichaud special-cased how?
moritz_ if !$.defined && $?CLASS === Object { !.defined } else { normal type check logic } 15:53
but I really don't think that's a good answer
pmichaud surely not $?CLASS
moritz_ right
self.WHAT
pmichaud S02:1077 15:57
(The C<undef> function merely returns the most
generic C<Failure> object.)
afk for a bit 16:00
16:10 cognominal_ joined, Woody2143 joined 16:15 jnthn joined, Gothmog_ joined
jnthn oh hai 16:18
jnthn is back from Latvia
moritz_ oh it's jnthn 16:19
16:22 wanradt joined
pmichaud jnthn: wb! 16:24
jnthn pmichaud: Thanks. 16:25
jnthn spent his plane ride reading a paper on metamodels. :-)
pmichaud as opposed to a meta description of paper models?
or perhaps it was a ride on paper plane metamodels? 16:26
jnthn: you mentioned (I think) about reworking some of the role stuff? 16:27
16:29 Wolfman2000 joined
jnthn pmichaud: I already did start on that, but I ain't done yet. 16:30
pmichaud: Well, it's onto the nth evolution since the original. :-)
Wolfman2000 Morning. There is a slim chance I can pull off MD5/SHA. The big question is...can I write a program within 75 minutes?
pmichaud jnthn: is it a significant change in terms of how roles are created/used internally?
moritz_ Wolfman2000: you might want to look in the November source code
Wolfman2000: I think the use parrot's md5/sha1 libraries somewhere in there 16:31
s/the/thez/
Wolfman2000 moritz_: Where is that source code located?
moritz_ *they*
jnthn pmichaud: Most of the big changes are already in place.
moritz_ pointme: november
pointme viklund's november is at github.com/viklund/november/
pmichaud jnthn: okay
jnthn pmichaud: That is to say, we construct it through the metamodelish stuff.
moritz_ Wolfman2000: tehre you go
pmichaud jnthn: in the current ng branch?
jnthn pmichaud: Right.
Wolfman2000 Is everything located at github?
pmichaud jnthn: okay, excellent.
moritz_ Wolfman2000: nope
pmichaud I'm going to take a crack a the Failure role today, I think.
jnthn pmichaud: There may be more to come.
moritz_ Wolfman2000: we have on or two gitorious projects, and some are in the pugs repo...
jnthn pmichaud: Well, there will be because I'm not finished making them work again yet. 16:32
pmichaud: I meant more, in the future we may need to tweak it further.
Wolfman2000 ...and why am I not surprised to see PIR in here?
moritz_ because that's the oldest way to interact with parrot? 16:33
jnthn pmichaud: I'm happy I'm close enough to working out what's needed for now, so I just need to write a bunch of code. :-)
Wolfman2000 moritz_: Soon as I locate the init and update functions, I can possibly use it. Otherwise, I get to relearn bit operations. 16:34
16:34 facsimile joined
PerlJam good morning all 16:37
16:42 rfordinal joined
Wolfman2000 ...okay, I think my connection is back. 16:43
...I need a reminder. How big our Perl 6 ints normally? 32 bit or 64 bit?
How big are* 16:44
pmichaud do you mean "int" or "Int"?
moritz_ it's the wrong question :-)
Wolfman2000 pmichaud: Int
moritz_ Int is meant to be arbitrary precision
pmichaud ...what moritz++ said
moritz_ s/precision/size/
16:44 KyleHa joined
moritz_ but isn't yet in Rakudo 16:44
the actual size is platform dependent 16:45
Wolfman2000 ...what is it on Feather?
moritz_ again a wrong question :/
Wolfman2000 I compiled rakudo via normal means. I don't recall passing any command line switches.
moritz_ doesn't know 16:46
pmichaud Wolfman2000: "Int" doesn't have a "size"
Wolfman2000 pmichaud: I'm asking about rakudo at this point.
pmichaud Wolfman2000: in rakudo, at this point, Int's larger than 32 bits spill over to become Num
moritz_ Wolfman2000: does t/spec/S03-operators/overflow.t pass on feather?
Wolfman2000 moritz_: let me find that directory and then run perl...5 or 6 on it? 16:48
moritz_ Wolfman2000: rakudo
make testable 16:49
16:49 perigrin joined
moritz_ then just ./perl6 t/spec/S03-operators/overflow.t 16:49
Wolfman2000 test 18 is not ok, then it chokes due to floating point exception
moritz_ then it's probably a 32bit parrot 16:50
Wolfman2000 ...guess I'll have to bide my time as I originally thought
Oh well: I've got plenty for my project anyway. At least you guys will get some credit. 16:51
pmichaud I don't think it matters what sort of parrot one has
16:51 rfordinal left
moritz_ hm, overflow.t passes for me 16:51
pmichaud: what else could it depend on? availability of gmp? 16:52
pmichaud moritz_: possibly, yes.
moritz_: but rakudo actually explicitly checks for values outside of 32-bit
moritz_ and then.. does what? 16:53
jnthn Aye, I remember seeing those recently.
pmichaud if outside of 32-bit, makes it a num
KyleHa I think overflow.t passes due to bogosity.
pmichaud github.com/rakudo/rakudo/blob/maste...op.pir#L19
KyleHa Its tests are designed for a 32-bit arch. It always passes for me on amd64. 16:54
pmichaud many of the overflow.t tests came from the p5 test suite, iiuc
(which also tended to look at things at the 32-bit boundary)
moritz_ KyleHa: they should pass on all platforms
KyleHa: so they're not bogus
KyleHa: just maybe not good enough, in some sense 16:55
KyleHa Yes, that's a much better way to say it.
mathw afternoon
Wolfman2000 as a heads up, I don't think rakudo likes my @r[64]; yet. Must be the [64] part. 16:56
jnthn hi mathw :_)
Wolfman2000: Aye, sized arrays are nyi.
PerlJam reads about the S meta-op which he appears to have missed the arrival of
mathw PerlJam: That was only the other day 16:57
pmichaud PerlJam: yes, I missed it also. 16:58
PerlJam mathw: forever ago in internet time :)
16:58 felipe joined
moritz_ std: 1 S& 3 16:58
p6eval std 29176: ok 00:01 105m␤
moritz_ std: 1 S+ 3
p6eval std 29176: ok 00:01 103m␤
PerlJam apparently I missed "anon" as well. 17:00
mathw I'm not quite sure what 'anon' is for yet
I haven't read the full thing 17:01
KyleHa I think it's for declaring a sub that returns a particular type without having to use 'my' or 'our'. 17:02
Something like $x = anon Str sub { 'ha ha' };
pmichaud interesting. so one could do $x = anon Str sub xyz { 'ha ha' } to get a sub named 'xyz' that isn't entered in a symbol table as 'xyz' 17:03
I like it.
moritz_ pmichaud: it isn't entered into the lexpad either, is it?
PerlJam std: $x = anon Str sub xyz { 'ha ha' } 17:04
p6eval std 29176: [31m===[0mSORRY![31m===[0m␤Two terms in a row at /tmp/9u6vn39hU8 line 1:␤------> [32m$x = anon Str [33m⏏[31msub xyz { 'ha ha' }[0m␤ expecting any of:␤ infix or meta-infix␤ infix stopper␤ standard stopper␤ statement modifier loop␤ terminator␤Other potential
..difficulties:␤ Varia…
pmichaud moritz_: right
I consider lexpads to be symbol tables also :-)
TimToady still need to check in 'anon'
PerlJam at
er, ah
moritz_ std: sink 1
p6eval std 29176: Undeclared routine:␤ 'sink' used at line 1␤ok 00:01 103m␤
jnthn didn't get chance to review all of the changes yet; S looked odd at first glance.
moritz_ TimToady: sink also :-)
PerlJam anon still feels like one-too-many scope declarators to me (in the all of 5 minutes that I've known of its existence :) 17:05
17:05 Linuturk joined
Wolfman2000 ...I think I'm biting off more than I can chew right now. Str "The test" in hex is 5468652074657374. If I understand MD5 right, I should append a 1 bit, then 0 bits until my hex length is 28. Then, I append the length of the unpadded message...8, little endian style. Is it possible to append bit strings to Str? 17:05
17:05 Linuturk left
moritz_ Buf()s would be better for that, but mostly NYI 17:06
pmichaud bit strings should probably be buf, not str
Wolfman2000 moritz_: Buf types aren't in yet?
PerlJam Wolfman2000: patches welcome! :) 17:07
moritz_ Wolfman2000: only very basic stuff is implemented in Buf
like encode/decode
Wolfman2000 ...alright, I'm out of my league then. PerlJam: can't even try to do this now.
Back to my original plan then: worry about bit shifting and buffing AFTER my presentation. 17:08
moritz_ TimToady: in the backlog, did you see my idea about a Base role or so which builtin types (or things that act like builtins) implement?
Wolfman2000 To think, Perl 6 is in use before it's out for everyone to use.
If this doesn't get you guys publicity, I don't know what will. 17:09
moritz_ as long as it's good publicity... :-)
Wolfman2000 moritz_: I plan on it.
PerlJam I think I have a pessimist hat on today
Wolfman2000 PerlJam: take it off. 17:10
mathw anybody know what parrot means when it says 'unexpected end'?
pmichaud mathw: usually that there's a missing '.end' I think
PerlJam The first thing I thought when I saw "get you guys publicity" was ``what does he mean "you guys"?'' and that worried me some.
mathw pmichaud: interesting
pmichaud: this seems to be caused by a bit of inline PIR
17:11 synth joined
mathw experiments 17:12
moritz_ runaway quote maybe? 17:13
moritz_ guesses
mathw aaaaaaaaaargh
jnthn Pain. He experiences it.
mathw yup 17:14
the cat's come to cheer me up
jnthn cat++
mathw fortunately he's not trying to help
jnthn
.oO( Unexpected cheezburger )
17:15 simcop2387 joined
moritz_ at file <unknown>, line <unknown> 17:15
17:15 cdarroch joined
pmichaud S02:565 says that C<Failure> is a non-instantiable role.... is that meant in the same sense that other roles don't have instances except via punning, or is there something deeper there? 17:16
17:16 wtgee joined
mathw right 17:17
jnthn All roles are non-instantiable without punning.
mathw it seems that you can't have anything that's not a Q:PIR block inside a function body that has a Q:PIR block in it. Is this expected?
jnthn mathw: May need a ; after the } but that may be a bug if so. 17:18
pmichaud jnthn: right... I'm just wondering if the statement meant something further
jnthn pmichaud: I srsly hope not.
pmichaud mathw: that's not expected, no.
PerlJam pmichaud: as in, you can't even pun Failure?
mathw jnthn: I build test case
pmichaud mathw: one should be able to put Q:PIR anywhere that a value is expected
ng: say 3 + Q:PIR { %r = box 4 }; 17:19
p6eval ng e4113c: 7␤
jnthn pmichaud: Though if you want to make totally sure it can't be punned, then give the role a method new that throws an exception.
(I assume it's got no other constructors...)
mathw pmichaud: right
jnthn pmichaud: I really can't imagine anything deeper than that though.
mathw and my test case passed
so it's something else
pmichaud mathw: can you nopaste what you have?
mathw pmichaud: it's in a huge mess at the moment, I'm trying to rationalise it
I will do if I get something meaningful
pmichaud mathw: okay. 17:20
17:20 wtgee left, desertm4x joined
pmichaud so, given that we now have Numeric and Stringy roles... what do we expect prefix:<+> to look like? (more) 17:20
for example, I know that sub prefix:<+>(Numeric $x) { $x } is likely correct 17:21
TimToady not without a 'multi' :P
pmichaud but what if $x doesn't Numeric? what's our api for converting non-Numerics to numeric?
is it still .Num, or ... ?
(yes, need the multi)
17:22 ejs joined
TimToady moritz_: yes, I saw Base, and am also wondering whether it actually works, or will prevent users from, say, doing numeric coercion via +$myobj, and whether or not that's good 17:22
17:23 payload joined
TimToady the dwimmy thing the user expects of + is to call the coercer for the narrowest non-native type that handles it, or something like that 17:24
maybe the next thing to do is to call the actual type of the original object to see if it has a Numeric sub defined
so sweep the problem under the carpet of Str 17:25
pmichaud okay, I'm afraid I didn't follow much of any of that
mathw whee
infinite loop! 17:26
TimToady I meant a method
pmichaud so, multi sub prefix:<+>($x) { $x.Numeric } ? 17:27
TimToady if there's a Str.Numeric method... yeah
17:27 zamolxes joined
pmichaud same with Stringy and prefix:<~>, then ? 17:27
TimToady presuming symmetry there 17:28
mathw is there ever going to be a time when Rakudo can compile the core/*.pm without having to concat them all together first?
pmichaud how about prefix:<?> and Boolean ?
still symmetry there, also ? (that would be nice)
TimToady to the extend it makes sense
*extent
not everything extends to boolean
17:29 KyleHa joined
pmichaud well, we still have the outstanding issues regarding the relationship of .true, .Bool, etc 17:29
so I'm wondering if .Boolean might help to clean that up
TimToady maybe
need to be careful with junctions
pmichaud hmmm.... yes. 17:30
mathw heh 17:31
calling @list.perl.say in ng seems to be causing an infinite loop
or at least, taking a veeery long time
pmichaud I also wonder if @($x) should be doing $x.Positional and %($x) should be $x.Associative, then. 17:33
although that's not quite right, because if $x is a Capture then @($x) should be getting the positional elements out 17:34
moritz_ TimToady: the idea behind Base is that class authors decide themselves if they want to support +$object 17:35
pmichaud moritz_: wouldn't that normally be handled by .Numeric, though? 17:36
moritz_ pmichaud: yes
pmichaud: my idea was to but methods like Numeric, sin, abs, etc. into a Base role and out of Any 17:37
mathw woo! I wrote Array.push
moritz_ pmichaud: so that user defined classes don't have 200 methods inherited from Any
mathw ...although it pushes into the middle, apparently
dukeleto moritz_: that sounds like it could be a good idea
moritz_: and a performance enhancement as well
moritz_ pmichaud: unless they explicitly want them, in which case they just 'do Base'
and if they don't, +$obj will fail because $obj doesn't have a Numeric method, unless defined explicitly 17:38
pmichaud moritz_: and so then Int/Num/Str/List/Mapping all "does Base" by default ?
moritz_ pmichaud: yes
all built-in types except Any, Object, junction and maybe Whatever (not sure about Whatever) 17:39
17:39 iblechbot joined
TimToady
.oO(all your Any are belong to us...)
17:40
moritz_ I was just about to call for Base puns
pmichaud moritz_: I like that idea, don't see many downsides. the name is a little "off"
TimToady does BASIC
moritz_ pmichaud: yeah, I'm not fixed on the name 17:41
KyleHa does FORTRAN
dukeleto TimToady: does Math
moritz_ there are more than Math builtins
TimToady does Polymath
dukeleto is Polyglot 17:42
pmichaud moritz_: what common methods wouldn't end up in Base?
TimToady speaks P6ese
pmichaud seems like .grep, .join, etc still go into Any
TimToady P6ease
moritz_ pmichaud: maybe the List ones... not sure though
one could make a case for putting them into Base too 17:43
TimToady ohoh, the abstraction is leaking --> sink :)
does KitchenSink
pmichaud moritz_: well, .join probably doesn't go in Any
because it wants to be able to stringify
.grep still goes into Any, because we want to treat objects as lists of 1 elem 17:44
moritz_ pmichaud: for builtin types, yes
pmichaud moritz_: oh, I would think for non-builtin types also
TimToady does DWIM
pmichaud er, does WIM 17:45
TimToady but it does do it! :)
moritz_ pmichaud: not sure... <foo> returns a string, but a quote should alwys return something which does DWIM
pmichaud: so I see why <foo>.grep should work
pmichaud moritz_: I think of it more along the lines of $x versus @x
moritz_ pmichaud: but not why $arbitrary_object.grep shoudl work
pmichaud i.e., $x and @x do different things in list context, even if they are the same object 17:46
mathw so I ran make spectest in ng and everything passed
moritz_ and by the same token $x.grep and @x.grep should do the same, even if $x !~~ Positional?
mathw something's fudging, isn't it
pmichaud moritz_: that's not my point 17:47
my point is whether we think of .grep as being "treat the invocant as a list, even if it's not already one"
and if that's true for all objects by default, as opposed to just those that "does Base" 17:48
17:48 dalek joined
pmichaud if we think "for all objects by default", then .grep belongs in Any 17:48
moritz_ right
pmichaud if we think "this behavior only for builtin types", then .grep belongs in Base
17:49 SmokeMachine joined
moritz_ anyway, that's a point I'm happy to negotiate, and maybe to just try out in real-world code 17:49
pmichaud all of these issues fundamentally affect Rakudo-ng, though, so it would be good to nail them down a bit more now 17:50
especially the casting into Numeric, Stringy, Boolean, etc.
it's those sorts of issues that are posing questions about how to do Failure
and undef 17:51
moritz_ right
dukeleto does Failure
17:51 Nex6 joined
pugs_svn r29177 | lwall++ | [CORE,Stash] catch up with recent name changes 17:55
r29177 | [STD] add anon, sink
ng_feed rakudo-ng: (jnthn)++ 17:56
rakudo-ng: Start to get some junctional bits back in. Not yet working (but want to continue hacking on my desktop, not on my laptop :-)).
pmichaud does lunch, errands
bbiaw
mathw gist.github.com/241235 highly oversimplified implementation of Array.push. I think it should be flattening the arguments maybe? 17:57
17:58 payload joined
jnthn mathw: I think the slurpy param should enforce list context, and thus do that. 17:58
mathw that would be nice
I need to figure out how to get it to do push-related spectests 17:59
but it works for simple things
jnthn mathw: BTW, you can also do all of this with pir::opname form too :-)
mathw I saw that elsewhere
but I didn't really understand it
jnthn Also I wonder if pmichaud was thinking more of doing it in term of a .splice method call on self... 18:00
mathw that's possible
in fact, that's quite likely
PerlJam the less Q:PIR the better
mathw that pir::opname thing requires you to know the name that has the argument type annotations doesn't it
PerlJam: agreed 18:01
pmichaud + my $elems = self.elems;
probably don't want to do that if we can avoid it
mathw pmichaud: I know
Parrot's splice needs a count of where to stick it though
moritz_ wonders how push, unshift etc. relate to laziness
mathw I know this isn't a good implementation, but it's been educational :)
jnthn mathw: If you're doing e.g. $P0 = parrotop $S0, $I0 then you'd turn it into pir::parrotop__PSI($x, $y) or so. 18:02
pmichaud it's also the case that you need to not push the original elements of @args, but copies
jnthn "copies" :-)
pmichaud otherwise if the original elements change, the values in the array change also
mathw hmm
point
very good point
jnthn It's copies in the assignment sense of the word though.
pmichaud right
mathw is that why the one in master does all the wrapping in Perl6Scalar? 18:03
or was tha tjust because it was pure PIR
pmichaud it's not wrapping, exactly
but yes, that's why
mathw right
pmichaud it needs to act like an array of scalars
so my plan was more along the lines of 18:04
my @array = @args;
# splice @array into self
mathw so really your plan for implementing push is
1) write splice
pmichaud where "splice @array into self" does it based on the internals 18:05
mathw so you're okay using Parrot's splice
pmichaud i.e., without actually flattening @!values
yes, I'm fine with Parrot's splice
mathw well maybe I can do something more like that
pmichaud I just don't want to be forcing flattening of the Array itself
mathw this is all very interesting
excuse me
I need to have some dinner
pmichaud I think if you can write Array.splice first, the rest become much easier :) 18:06
mathw that's because Array.splice is the hard one :P
although we could then have push entirely in Perl 6, I suppose
jnthn Having more stuff in Perl 6 itself is nice. :)
pmichaud right.
jnthn gets latest Parrot and ng branch built so he can do some stuff. 18:07
mathw heh okay
I'll look at splice later then
pmichaud otoh, it might not be so easy to do with push with splice because splice wants an offset also
so... I dunno. 18:08
mathw laziness mucks it all up a bit
pmichaud unshift and shift are easy with splice; push/pop not so easy
mathw if one does splice, unshift and shift
jnthn masak and I were pondering this yesterday. Does push onto an infinite list followed by a pop give you the thing you just pushed?
mathw one can leave push for later
pmichaud jnthn: that would be nice. I don't see a barrier to someday implementing it that way.
(nor has the stuff I've written thus far preclude it) 18:09
jnthn I don't expect pop of 1..Inf is going to do much helpful though. :-)
Well, unless your task was "fill up memory"
pmichaud why is that?
I could imagine that pop of an infinite generator can work
jnthn Wouldn't we have to generate the entire lot to know what it's last element is, in the general case? 18:10
OK, for a range it's a poor example - we know.
pmichaud in the general case, like I/O, perhaps
but just because a generator is infinite doesn't mean we can't pop :)
Tene a generator could feasibly generate at both ends.
jnthn
.oO( if you call .pop on 1..Inf an infinite number of times...oh wait... )
18:11
pmichaud maybe something like -Inf .. 1 :-)
mathw depends on the generator
jnthn Yeah, true. :-)
Depends how clever we want to be. :-)
pmichaud okay, lunch for real now
bbl
mathw can we not be too clever please
I don't think we really need to spend too much time letting people do foolish things with infinity
jnthn mathw: Yes, I have a fear of excessive cleverness too :-)
18:12 pnate joined
pmichaud mathw: you forget the Perl motto: "Perl exists to torment the implementors." 18:12
That would be you.
:-)
mathw bah
jnthn Yeah, but unfathomable semantics torment users too. :-)
mathw I'll write the version that doesn't work with infinite lists
and let you fix it :P
jnthn Shared tormentation.
mathw Perl 6 isn't supposed to have unfathomable semantics 18:13
PerlJam mathw: depends on who you are as to how "fathomable" the semantics are.
mathw PerlJam: they should at least be written down somewhere
18:14 stephenlb joined
PerlJam mathw: yes, but most of them are written in Perl 6! :) 18:14
mathw PerlJam: recursion is... recursive :) 18:15
18:15 lithos joined
lithos ng: say(0b22); 18:16
p6eval ng e4113c: sh: ./perl6: No such file or directory␤
lithos nqp: say(0b22);
p6eval nqp: 6␤
18:17 eternaleye joined
lithos nqp: say(0b33); 18:17
p6eval nqp: Method 'panic' not found for invocant of class 'Regex;Match'␤current instr.: 'parrot;HLL;Actions;string_to_int' pc 13934 (gen/hllgrammar-grammar.pir:3334)␤
moritz_ in rakudo that's a known bug
lithos hi! for nqp, one cause is a pasto in HLL/Grammar.pm, I think 18:18
mathw lithos: are you the person who posted the summary on perl6-language?
lithos yes
mathw lithos: excellent work
lithos noticed this bug preparing the summary
mathw thank you very much :)
lithos thanks
moritz_ lithos: ah, you mean token binint { [<[ 0..7 ]>+] ** '_' } 18:19
lithos yes
moritz_ fixes and tests
lithos second thing is in HLL/Actions.pm:24 I think there should be >= in "if digitval > base goto err_base" 18:20
18:21 desertm4x_ joined
lithos unless one wants to support redundant digits 18:22
dalek p-rx: f9d5159 | moritz++ | src/HLL/Grammar.pm:
fix binint pasto as noticed by lithos++
moritz_ there's no reason to support 8 in base 8, right :-) 18:23
TimToady lithos++
mathw moritz_: I hope not
if there is, my understanding of how to write numbers down is much poorer than it should be
moritz_ lithos++ 18:24
PerlJam lithos++ (indeed, that's where I first found out about the S meta-op)
moritz_ @karma lithos
lambdabot lithos has a karma of 4
lithos ok, one more nqp nit: t/nqp/42-cond-loop.t:36 and following claim they are testing "unless" but they actually are not 18:25
PerlJam what happened to PERL6EXE in build/Makefile.in ? 18:26
dalek p-rx: 1ec10cc | moritz++ | src/HLL/Actions.pm:
fix an off-by-one error in number conversion error checking
18:27
p-rx: a89723d | moritz++ | t/nqp/42-cond-loop.t:
fix some test descriptions, as reported by lithos++
18:28 mdxi joined
PerlJam oh, I see. In some places we have PERL6EXE and in others we have PERL6_EXE 18:28
colomon lithos++ indeed! 18:29
jnthn lithos++ # some nice fixes there! :-)
lithos hm, moritz_, maybe the descriptions where as intended but the tests themselves weren't?
lithos blushes
18:29 mdxi joined
ng_feed rakudo-ng: (Jonathan Scott Duff)++ 18:33
rakudo-ng: [makefile] s/PERL6EXE/PERL6_EXE/
18:33 zloyrusskiy joined, rgrau joined
IllvilJa Is this channel a place where I can find Russ Allbery (who maintains Term::ANSIColor for Perl5). I asked in #perl but got no answer... (and yes, I have tried to mail Russ using his CPAN mail address) 18:36
18:37 Su-Shee joined 18:38 pure1111 joined
ng_feed rakudo-ng: jnthn++ 18:38
rakudo-ng: Give Junction a decent custom .new, meaning we can now nicely write all of any/all/one/none in the setting, as well as the various operators.
jnthn std: anon Int $x; 18:41
p6eval std 29177: ok 00:01 106m␤
jnthn std: anon Int $x; say $x;
p6eval std 29177: Potential difficulties:␤ Variable $x is not predeclared at /tmp/4CzilF5Wfi line 1:␤------> [32manon Int $x; say $x[33m⏏[31m;[0m␤ok 00:01 104m␤
jnthn std++
mathw jnthn: oooh
mathw looks at the spec for Array.splice and goes a bit pale 18:43
jnthn Not quite sure of a use for an anonymous variable yet. ;-)
mathw no 18:44
so this junction thing you just committed
that looks fun
jnthn mathw: Well, it just bugged me that the internal what-kinda-junction-is-it ID was gonna leak out if I wanted to write any/all/etc in the setting. 18:45
So gave it a nicer interface.
mathw yeah
mathw reads thePIR and tries to figure out what that is
jnthn If we can work out how you introspection a junction's type in some sane way, we can port most of the rest to the setting. 18:46
Certainly .perl for a start.
mathw .param pmc any :named('any') :optional
.param pmc all :named('any') :optional
.param pmc one :named('any') :optional
.param pmc none :named('any') :optional
umm
what?
jnthn oh wtf
Yeah, bug.
mathw pastefail?
jnthn yeah
I didn't test this beyond that it doesn't break the build. 18:47
:-)
mathw lol
jnthn Junctions are kinda useless until I put back auto-threading.
mathw so it works out as Junction.new(:any, @states)
jnthn (Which is what I'm doing now)
mathw \\o/
jnthn I'd blame jet lag but I only did one timezone. :-/ 18:48
mathw that's okay 18:49
ng_feed rakudo-ng: jnthn++
rakudo-ng: Fix pasto spotted by mathw++.
colomon is disappointed he didn't follow his first thought and report that issue. He just decided it must be two different anys.... 18:50
mathw so, jnthn, is it really as simple as sub all(*@states) { Junction.new(:all, @states); } 18:51
have you really created such a level of awesome?
jnthn mathw: Yeah. 18:52
mathw woo
jnthn mathw: I thought I'd already checked that in to the setting?
Maybe I messed that up too though :-)
jnthn checks!
mathw hmm you did
operators.pm
excellent
jnthn yay
:-)
They work too.
mathw notes... look first
I was just looking for something less scary than splice :) 18:54
jnthn I'm a bad person to come to for less scary tasks. 18:55
18:55 slavik joined
mathw :) 18:55
at least I learned things
jnthn I suggest open to masak++ and it turned out non-trivial due to lots of other missing stuff :-) 18:56
mathw yes
jnthn Happily, he did lots of them though, so it was a win. :-)
mathw one of which was push
jnthn Yeah!
mathw which is why I was looking at it
but push turns out to be significantly more complicated
jnthn Well
18:56 zloyrusskiy joined
mathw unless we ignore laziness for now... 18:56
jnthn Only if you want to do it in terms of a Perl 6 .splice..
mathw in which case I think the only thing I did badly was not copying
18:57 quietfanatic joined
mathw Perl 6 .splice is terrifying 18:57
mostly because of the bit that says it returns a Parcel of deleted elements
PerlJam mathw: why is that terrifying?
quietfanatic It's more or less the same as Perl 5's
except list instead of parcel
jnthn mathw: My impression was that what you'd got + the copy would work as a first cut.
mathw Because I think it makes it difficult to implement it in terms of Parrot's splice
jnthn: I'll try that 18:58
18:59 ejs joined
jnthn mathw: OTOH, I guess you can work out what elements you'll delete and just take a slice. 19:00
And then use Parrot's splice.
And then return the @deleted you got.
mathw maybe 19:01
I guess that could work
jnthn It's the first thing that comes to mind. :-)
mathw :)
worth a try 19:02
jnthn The tricky on splice is that you probably need to worry about evaluating any unevaluated parts of the list that your splice touches. 19:03
I'm not sure how that looks.
mathw yes that is potentially very very messy
jnthn It may be handled for you...I didn't look at how the lazy works yet.
mathw but again, how clever do we want to be right now?
colomon I dunno, it seems to me the problem with a little bit lazy is that once you've got it, it propagates everywhere. 19:09
Though I suppose I could write Range.Iterator (for example) to create an entire List unlazily and then just return that List's .Iterator.... hmm. 19:10
TimToady makes it kinda hard to iterate 0..* :) 19:11
colomon TimToady: sure enough, but right now we can't even iterate 1..2 in ng. :) 19:12
jnthn Should Range.Iterator return a RangeIter
jnthn may be behind on the spec...
TimToady can certain eagerify the short ones; it's even specced that laziness can be batchy
colomon RangeIterator according to the spec, I think?
TimToady *certainly 19:13
colomon It does now in ng.
jnthn std: RangeIterator
p6eval std 29177: Undeclared name:␤ 'RangeIterator' used at line 1␤ok 00:01 105m␤
jnthn std: RangeIter
p6eval std 29177: Undeclared name:␤ 'RangeIter' used at line 1␤ok 00:01 103m␤
jnthn meh
colomon But there's no defined Iterator Role or interface in ng, so poor little RangeIterator doesn't know how to talk to the rest of the ng universe.
jnthn Oh. :-/ 19:14
That's...a problem.
colomon all it can do is RangeIteartor.get.
pugs_svn r29178 | lwall++ | [CORE] add RangeIterator
colomon which unfortunately isn't what whatever wants iterators wants to get.
jnthn Sheesh, that was fast. :-)
colomon ng: my $a = (1..4).Iterator; say $a.get; say $a.get; say $a.get; say $a.get; say $a.get 19:15
p6eval ng 6a652f: sh: ./perl6: No such file or directory␤
colomon well, that was supposed to be a brilliant demonstration. :)
mathw just wait a bit then :)
colomon ng: say 'hai' 19:16
p6eval ng d3f9a8: hai␤
colomon ng: my $a = (1..4).Iterator; say $a.get; say $a.get; say $a.get; say $a.get; say $a.get 19:17
p6eval ng d3f9a8: making RangeIterator on 1..4␤in get␤1␤in get␤2␤in get␤3␤in get␤4␤in get␤␤
pmichaud back
colomon still some debugging output left in there, I see. :)
mathw stares at simple splice implementation and wonders if it might work 19:19
jnthn Why on earth does Parrot only ever return the top of the function's line number in an error?
mathw one way to find out...
pmichaud jnthn: I don't know -- that started happening recently.
jnthn *sigh*
parrot--
pmichaud well, "recently" ~~ "within the past couple of months"
jnthn: do we have a ready example in ng of attaching a role to a class? 19:20
(in PIR, and a builtin class)
jnthn pmichaud: No, because that bit isn't done yet.
pmichaud: That's the bit I've been spending the last while working out how should be structured. :-) 19:21
Or at least, one bit...
pmichaud hmmmm
jnthn pmichaud: I've spent more time on getting classes straightened out so far... 19:22
Hadn't really got to sorting roles out fully yet.
pmichaud okay. So perhaps I should just cheat on Failure for a while, then?
jnthn Got pieces, but not a completed jigsaw.
Yeah.
pmichaud I was also hoping to start doing Int does Numeric does Integral and Str does Stringy :)
jnthn I may do a Rakudo Day tomorrow and focus on the roles stuff.
I've dealt with enough of the conceptual problems I had now. 19:23
So am at the "write code" point. :-)
mathw :)
pmichaud okay.
I'll cheat on things a while longer.
jnthn k
Not quite sure I've got the branes to hack on that bit tonight.
pmichaud np
jnthn So just doing easy bits.
pmichaud there's plenty of those yet. 19:24
jnthn oh damm
I mis-read a stack trace and went off trying to find a bug in the junction threader...that actually is in the code it runs. 19:25
...which also needs push!
:-)
Oh well
We seem to have junction auto-threading back.
mathw jnthn++
ng_feed rakudo-ng: jnthn++ 19:27
rakudo-ng: Few fixes that seem to have us doing junction auto-threading properly again.
rakudo-ng: jnthn++
rakudo-ng: Routines should have Any as default parameter type.
jnthn Just can't run any of the tests on it yet :-(
mathw aww
null pmc access in get_string
pmichaud gist.github.com/241310 # version of Array.push, for comment/review by mathw
mathw sighs
pmichaud: neater 19:28
doing the elements call in PIR saves a lot of mucking about with find_lex
I like that
pmichaud also handles any necessary "assign to array" flattening.
jnthn pmichaud: eval fail, I think... 19:29
pmichaud: Does it pass namespace along / set namespace?
oh gah
wait
pmichaud jnthn: where does Actions.pm look for namespace?
jnthn pmichaud: It's a runtime issue, not a compile time one.
pmichaud: But the test is:
class A61354_1 { eval q/method x { "OH HAI" }/ } 19:30
is (A61354_1.x), 'OH HAI', 'define method with eval in class';
Please. No.
pmichaud: On eval and namespace though, consider... 19:31
oh, actually 19:32
I think eval is fine.
pmichaud :)
mathw pmichaud: I think that push looks good
jnthn I still vote to forbid being able to add methods like that.
mathw it's definitely better than mine
pmichaud jnthn: I agree -- that looks too monkey patched. 19:33
jnthn There's so many better ways to do it.
pmichaud besides, we already have the "augment" verb.
er, declarator.
jnthn Not to mention $?CLASS.^add_method('x', method { "OH HAI" })
If you *really* must patch it in during running the class body. 19:34
pmichaud anyway, I wouldn't worry about that particular test for a while. It's not needed for Rakudo *, at any rate.
mathw yeah
doing it via eval just seems silly
pmichaud and I'm fine with a note that says "Rakudo doesn't like this, perhaps never will :)"
jnthn pmichaud: Heh, I'm more inclined to change is to dies_ok ;-)
pmichaud that's fine with me also :) 19:35
jnthn It kinda worked by accident before anyhow...
Granted, we've not had a good way to do this before the metamodel got straightened out.
Great. We're one test off passing S12-class/basic.t 19:37
(checking for re-declaration)
19:37 tarbo2 joined
mathw yay 19:38
pugs_svn r29179 | jnthn++ | [t/spec] Change a test - monkey-patching in extra methods at runtime using eval is Not Good, especially when there's so many better ways to do it. 19:39
jnthn OK, I need to pop to the store. :-) 19:44
jnthn is getting peckish
19:48 KyleHa joined 19:51 hsb left
ng_feed rakudo-ng: pmichaud++ 19:54
rakudo-ng: Add Array.push and Array.unshift .
pmichaud ...although, come to think of it, Array.push could really just be self = (self, @values) 19:56
except that self needs to flatten 19:57
mathw yay pmichaud
pmichaud and Array.unshift is really just self = (@values, self)
anyway, this mechanism is slightly more efficient :-)
mathw yes
19:59 slavik joined 20:13 Exodist joined
ng_feed rakudo-ng: KyleHa++ 20:16
rakudo-ng: Two more test files pass
jnthn back 20:21
pmichaud: (flatten) When it's supported again in ng, I guess those things can be done as method foo(@self: @values) { ... } 20:22
pmichaud jnthn: yes, that would work nicely. 20:23
we still might want to use the PIR form as being more efficient, though.
jnthn Oh, I think we want to not change push, yes.
Was just noting it in case it's useful elsewhere. :-)
pmichaud it undoubtedly will be, yes. I had not thought of it, so I'm glad you mention it -- that'll be a useful pattern. 20:25
colomon can you do the reverse of that? for pop, my (self, $popped) = self or something like that? (shift seems more reasonable, I guess) 20:38
jnthn You'd at least need to make @self is rw in the sig... 20:41
oh, wait 20:42
That probably doesn't work, as @self could swallow up all of the elements...
ng: my (@x, $y) = 1,2,3; say $y;
p6eval ng 8c6663: Cannot assign to readonly value␤current instr.: '&infix:<=>' pc 8513 (src/builtins/assign.pir:12)␤
jnthn ...huh?
rakudo: my (@x, $y) = 1,2,3; say $y; 20:45
p6eval rakudo 7347ec: ␤␤
jnthn ng: my @x; my $y; (@x, $y) = 1,2,3; say $y;
p6eval ng 8c6663: sh: ./perl6: No such file or directory␤
jnthn oh wait, maybe just missing list assignment. 20:46
20:49 bluescreen joined 20:52 FCO joined 20:53 run4flat joined 20:55 payload joined 20:58 pmurias joined
colomon sorry for disappearing on that one, yes, I expect swallowing up all the elements could be an issue. But could shift work that way? ($shifted, @self) = @self ? 21:00
(assuming list assignment, of course!)
21:00 cognominal joined
moritz_ re 21:03
21:10 cognominal joined
pmurias rakudo: my $a,@b;@b=1,2,3,4;($a,@b) = @b;say @b 21:12
p6eval rakudo 7347ec: Symbol '@b' not predeclared in <anonymous> (/tmp/DK4secnPEW:2)␤in Main (file <unknown>, line <unknown>)␤
pmurias rakudo: my $a,my @b;@b=1,2,3,4;($a,@b) = @b;say @b;
p6eval rakudo 7347ec: 234␤
pmurias rakudo: my $a,my @b;@b=1,2,3,4;($a,@b) = @b;say $a;
p6eval rakudo 7347ec: 1␤
pmurias cognominal: seems to work
cognominal: i'm not sure it would be the most efficient way of doing it 21:13
cognominal pmurias, I am very happy for you even if I have no clue of what you are ralking about :) 21:16
jnthn Think pmurias meant colomon :-) 21:19
colomon :) 21:26
run4flat Hello, I have a question that's not specifically related to Perl6 per-se, but my idea might make it into Perl6 some day... maybe... 21:27
Does anybody know where I can find some Regexp-engine hackers? 21:28
I have an idea that really works best in PDL, but nobody else who hangs out there is interested in numerical regular expressions 21:29
moritz_ run4flat: pmichaud is one, others have implemented some regex engines here too 21:31
run4flat moritz_: thanks
colomon numerical regular expressions?
diakopter run4flat: feel free to voice your idea here
run4flat diakopter: yeah 21:32
The name says most of it. Numerical regular expressions would be a specification for a state machine that would analyze an array of floating point numbers instead of an array of UTF-8 characters
moritz_ sounds interesting 21:33
run4flat moritz_: That's what I think
:)
diakopter for pattern matching?
run4flat but whenever I suggest this idea, people say, "What would you use it for?"
diakopter: yeah
signal processing protoyping
for example 21:34
moritz_ run4flat: is there some theoretical foundation for it?
run4flat no
moritz_: I mean, not anything more than string regexp's
it was just an idea that occurred to me last summer
moritz_: I'm not sure what theoretical foundation you could get for numerical regexp's that goes beyond character regexp's 21:35
cognominal well, as you express it, you have a solution in quest of a problem. May be if you tell why you came with we could understand... 21:36
moritz_ run4flat: i'm mostly intersted in what kind of features you could find in a stream of numeric data
run4flat let me give a simple example of how I would use this
moritz_ run4flat: like, can you find a maximum/minimum? what about a maximum in the derivation of the function?
diakopter run4flat: what would the primitives be? you would need logical expressions and comparison expressions
run4flat right, I don't want to get into details of the spec 21:37
because it's pretty complicated
but. basically, you would have numerical 'classes' like character classes
moritz_ have you written it down somewhere?
run4flat Yeah, but I've not published it
it's still pretty rough
example: -5 <=x < 10 would become [-5, 10) 21:38
so then, $my_data =~ n/ [5%, 10%) M /
would match a local maximum that is preceded by a data pont that is between 5% and 10% of the data's width 21:39
For my uses, I would take a bunch of data sets with on measurement 21:40
separated by a really obvious signal between data sets
and then use a regexp to separate them
diakopter run4flat: search.cpan.org/~tbone/Array-Patter...Matcher.pm
run4flat diakopter: thanks!
that's the first useful feedback I've gotten on this!
diakopter I don't know whether it can handle moving averages & regression-type lookbacks 21:41
time series stuff... but certainly static expressions.
ng_feed rakudo-ng: moritz++
rakudo-ng: enable basic regex tests
pmichaud iiuc, perl 6's regular expression pattern matching is supposed to be able to more than just character strings
and, of course, one can likely do a lot with nested signatures
run4flat diakopter: Thanks, I'll look into this 21:42
pmichaud: yeah, I have not looked into Perl 6's regular expressions too closely yet... know of any good primer for a non-traditional use? 21:43
pmichaud run4flat: there's not much written yet. Just a small section at the bottom of Synopsis 5
run4flat pmichaud: I think I read through that once a while back 21:44
I'll take another look
Well, thanks for your feedback. I'll take another look at Synopsis 5 and I'll look over Array::PatternMatcher 21:48
If you get any other ideas, you can usually find me on the #pdl channel at irc.perl.org
diakopter squints sideways at check_doteq 21:55
22:02 ashizawa joined 22:10 IllvilJa joined
colomon Is anyone working on split in ng yet? 22:11
jnthn nqp: my $*X = 42; say("lol answer is $*X")
p6eval nqp: Assignment ("=") not supported in NQP, use ":=" instead at line 1, near " 42; say(\\""␤current instr.: 'parrot;HLL;Grammar;panic' pc 519 (src/cheats/hll-grammar.pir:197)␤
moritz_ not that I know of
jnthn nqp: my $*X := 42; say("lol answer is $*X")
p6eval nqp: lol answer is 42␤
jnthn colomon: I ain't.
moritz_ ng: say 'abcab'.match(/a/, :c(1) 22:12
p6eval ng 7912ba: Confused at line 1, near "say 'abcab"␤current instr.: 'perl6;HLL;Grammar;panic' pc 519 (src/stage0/HLL-s0.pir:336)␤
moritz_ ng: say 'abcab'.match(/a./, :c(1))
p6eval ng 7912ba: ab␤
moritz_ ng: say 'abcaX'.match(/a./, :c(1))
p6eval ng 7912ba: aX␤
moritz_ colomon: :c($pos) will be very handy for Str.split(Regex) 22:13
colomon moritz_: ?
moritz_ colomon: it allows you to start a regex match not at the beginning of the string, but somwhere later on
colomon ah, yes, that sounds useful. :) 22:14
moritz_ so you don't have to deconstruct the source string
(which also confuses $match.from and .to if the :all flag is passed to split)
jnthn Whee. If the rest of the tests pass, looks like I've got us S12-class/basic.t back. :-) 22:15
Tene jnthn: any recommendations on where you'd like me to work, if I start working on ng? 22:16
22:16 tylerni7 joined
colomon oh bother. we've actually got p6 implementations of split, but they require gather/take. 22:17
Tene Ooo, gather/take. I wrote the original version of that.
moritz_ Tene: if you could bring that back to ng that would be great
Tene Needs to work with generators or whatever in ng, though, right?
pmichaud I don't mind if gather/take is eager still.
colomon right
pmichaud we can lazify it later 22:18
moritz_ colomon: gather/take can easily be emulated with an array and push
colomon afk dinner
Tene Oh, if eager is okay, then it's easy. Yeah, I'll do that tonight.
jnthn Yay
moritz_ I just wrote it with gather/take in the expectation that at some point it would magically become lazy if I only used gather/take
22:18 tylerni8 joined
moritz_ silly me 22:18
pmichaud moritz_: and it would have/will do that :)
moritz_ anyway, since we didn't have :c back then it's a less-than-awesome way to do it now 22:19
ng_feed rakudo-ng: jnthn++
rakudo-ng: S12-class/basic.t passes again.
rakudo-ng: jnthn++
rakudo-ng: Start to get name handling filled out a bit more STDishly, meaning we can now have a chance of detecting redeclarations.
jnthn rakudo: eval('class C { method x { say 42 } }'); eval('C.x'); 22:26
p6eval rakudo 7347ec: ( no output ) 22:27
jnthn rakudo: eval('die "oh noes"'); 22:28
ng: eval('die "oh noes"');
p6eval rakudo 7347ec: ( no output )
ng 7912ba: oh noes␤current instr.: '&die' pc 8620 (src/builtins/control.pir:18)␤
jnthn eval doesn't catch exceptions? :-)
22:30 snearch_ joined 22:31 jferrero joined 22:34 vamped joined
jnthn eww! 22:43
ng: { my $a = 0; sub test() { $a++; } }
p6eval ng 7912ba: ( no output )
jnthn ng: class Foo { }; { my $a = 0; sub test() { $a++; } }
p6eval ng 7912ba: Symbol '$a' not predeclared in &test␤current instr.: 'perl6;PCT;HLLCompiler;panic' pc 137 (src/PCT/HLLCompiler.pir:101)␤
22:54 zamolxes joined 23:15 mberends joined
diakopter mberends: hi 23:15
mberends hihi, hotel wifi a bit flaky this week 23:16
ng_feed rakudo-ng: jnthn++ 23:19
rakudo-ng: Start to eliminate is ref in favor of the \\ quantifier. Stub in parsing and various bits for the | quantifier too.
23:22 kidd joined
ng_feed rakudo-ng: jnthn++ 23:27
rakudo-ng: Remove ref from signature introspection, in favor of parcel. Also add .capture, so we can introspect for |$foo.
rakudo-ng: jnthn++
rakudo-ng: Rename ref to parcel in the binder.
rakudo-ng: jnthn++ 23:41
rakudo-ng: ..., ??? and !!!.
Tene okay, just need to set up this classroom for an exam, and then I can go home. 23:42
23:42 explorer__ joined
Tene I'll try to remember to do gather/take tonight... I'm feeling kinda sleepy... 23:44
KyleHa ng: sub foo($x) { say 'x' } 23:50
p6eval ng 92410f: ( no output )
KyleHa ng: sub foo'($x) { say $x }; say 'alive' 23:51
p6eval ng 92410f: Confused at line 1, near "sub foo'($"␤current instr.: 'perl6;HLL;Grammar;panic' pc 519 (src/stage0/HLL-s0.pir:336)␤
jnthn std: sub foo'($x) { say $x }; say 'alive' 23:52
p6eval std 29179: [31m===[0mSORRY![31m===[0m␤Malformed block at /tmp/Q6FFGIjoZs line 1:␤------> [32msub foo[33m⏏[31m'($x) { say $x }; say 'alive'[0m␤ expecting any of:␤ block␤ new name to be defined␤ routine_def␤ terminator␤ trait␤ whitespace␤FAILED 00:01 105m␤
jnthn pmichaud: Any thoughts on this one: 23:57
my @x; for @x { say "once" }
erm
ng: my @x; for @x { say "once" }
p6eval ng 92410f: once␤
KyleHa S02-names/identifier.t passes now, but some 'eval_dies_ok' tests (like "sub foo'4($x)") are 'ok' with an error I'm not sure is ok. It complains that $x is an undeclared identifier. 23:59
ng_feed rakudo-ng: jnthn++
rakudo-ng: Various tweaks to .params and .arity to try and be a bit more correct with list handling. Seems another bug blocks things though.
KyleHa Oh, I have an idea...
23:59 s1n joined
jnthn pmichaud: If that can be worked out, we may have a decent chance of passing arity.t. 23:59