»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by sorear on 25 June 2013.
vendethiel jnthn: are the lists in rakudo/nqp stuff repositories still up-to-date ? 00:00
(the "todo" ones, I mean)
psch 99-problems-11-to-20.t and 99-problems-51-to-60.t both have a to high plan according to m-spectest; i updated the gist 00:04
both with a "Non-zero wait status: 11"
...probably also not related to my patch :)
jnthn Probably not.... 00:05
jnthn needs sleep 00:05
'night o/
psch night jnthn; i'll just attach the spectest result gist to the PR 00:06
feel free to look at it whenever
vendethiel: wrt todos i think you're best served with rt.perl.org 00:07
vendethiel probably :).
on that note, g'n
psch night 00:08
raiph perl6: (^Inf).uniq.say 03:51
camelia rakudo-{parrot,jvm} 1f05e1, niecza v24-109-g48a8de3: OUTPUT«(timeout)» 03:52
..rakudo-moar 1f05e1: OUTPUT«(signal )»
labster r: say "ß".lc eq "ß".uc 05:21
camelia rakudo-jvm 1f05e1: OUTPUT«(timeout)»
..rakudo-{parrot,moar} 1f05e1: OUTPUT«True␤»
atroxaper Can i use #?rakudo.parrot skip or todo in my own tests? Or is it only for roast? 05:45
Morning, #perl6 ! 05:46
moritz atroxaper: it's only for roast 06:30
atroxaper moritz: it's sad...
atroxaper I found than I uses .rw on an Attribute object, but in doesn't have the .rw. I rewrite to '.has_accessor && ! .readonly'. How I have not stable SIGSEGV instead of stable :) 06:32
atroxaper .tell lizmat Hello. Recently you add nice warn message if we use @array[-1] instead of [*-1]. Today I found that 07:33
yoleaux atroxaper: I'll pass your message to lizmat. 07:33
atroxaper .tell lizmat r: my @a = <1>; @a[*-1] = 2; say @a ~ ' ==> '; my @b = (); @b[*-1] = 2;
yoleaux atroxaper: I'll pass your message to lizmat.
timotimo m: say "Foobar".?this_method_does_not_exist; 07:35
camelia rakudo-moar 1f05e1: OUTPUT«Nil␤»
timotimo m: say "Foobar".this_method_does_not_exist;
camelia rakudo-moar 1f05e1: OUTPUT«No such method 'this_method_does_not_exist' for invocant of type 'Str'␤ in block at /tmp/l3BsJHxXpw:1␤␤»
woolfy vendethiel: fpw2014 videos by elbeho: he knows he has to do them, was too busy (move from temp house to his renovated house and of course other stuff) 08:08
vendethiel: he was planning to work on it end of this month... so maybe next month? ;-)
atroxaper Pod::SAX::Goes::HTML has table of contents now! :-) 09:33
masak antenoon, #perl6 09:40
timotimo heyo masak :) 09:41
dalek kudo/nom: 023a907 | (Pepe Schwarz)++ | / (6 files):
Implement tr/// and class StrDistance.

StrDistance takes the untransliterated and transliterated Strings as constructor arguments and implements .Bool, .Int and .Numeric. Numeric defers to .Int, which calculates the replaced characters on invocation. Bool returns True if any transliteration has occured, False otherwise.
11:02
kudo/nom: cbce4fe | jnthn++ | / (6 files):
Merge branch 'implement_tr' of github.com:peschwa/rakudo into nom
sergot o/ 11:31
atroxaper sergot: o/ 11:33
sergot atroxaper: \o 11:34
lizmat m: my @a; @a[*-1]; 1 # simpiified case that atroxaper found 11:37
yoleaux 07:33Z <atroxaper> lizmat: Hello. Recently you add nice warn message if we use @array[-1] instead of [*-1]. Today I found that
camelia rakudo-moar cbce4f: OUTPUT«Unsupported use of [-1] subscript to access from end of Array; in Perl 6 please use [*-1]␤ in block at /tmp/rOhRcucm95:1␤␤»
yoleaux 07:33Z <atroxaper> lizmat: r: my @a = <1>; @a[*-1] = 2; say @a ~ ' ==> '; my @b = (); @b[*-1] = 2;
jnthn std: my @a; @a[-1] 11:39
camelia std 0f2049c: OUTPUT«===SORRY!===␤Unsupported use of [-1] subscript to access from end of array; in Perl 6 please use [*-1] at /tmp/3koSe6J_Y0 line 1:␤------> my @a; @a[-1]⏏<EOL>␤Parse failed␤FAILED 00:01 125m␤»
jnthn std: my @a; @a[-2]
camelia std 0f2049c: OUTPUT«===SORRY!===␤Unsupported use of [-2] subscript to access from end of array; in Perl 6 please use [*-2] at /tmp/noOsyUYJ9F line 1:␤------> my @a; @a[-2]⏏<EOL>␤Parse failed␤FAILED 00:00 125m␤»
jnthn lizmat: Note that STD actually does this check syntactically 11:40
jnthn lizmat: I'd really love to get the checking logic out of postcircumfix:<[ ]> 11:40
lizmat std: my @a; @a[*-1]; 1
camelia std 0f2049c: OUTPUT«ok 00:01 127m␤»
lizmat std: my @a; @a[-1]; 1
camelia std 0f2049c: OUTPUT«===SORRY!===␤Unsupported use of [-1] subscript to access from end of array; in Perl 6 please use [*-1] at /tmp/l223hmb04y line 1:␤------> my @a; @a[-1]⏏; 1␤Parse failed␤FAILED 00:01 125m␤»
jnthn lizmat: Because it's making it too big to inline.
lizmat gotcha... ok, will look into that
lizmat jnthn: but we will need the runtime check anyway :-( 11:41
m: my @a; my $i = -1; @a[$i]
camelia rakudo-moar cbce4f: OUTPUT«Unhandled exception: Unsupported use of [-1] subscript to access from end of Array; in Perl 6 please use [*-1]␤ at <unknown>:1 (/home/p6eval/rakudo-inst-1/languages/perl6/runtime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:128…»
jnthn I wonder if we couldn't do it in at_pos... 11:42
lizmat but I guess that's a non int candidate
jnthn That already is doing too much for us to inline on a normal Array anyway.
jnthn Plus we have typed candidates there... 11:43
So the check can be cheaper too.
lizmat m: my @a; say @a.at_pos(-1)
camelia rakudo-moar cbce4f: OUTPUT«(Any)␤»
lizmat no checking in at_pos apparently
jnthn: sorry, I lost you know 11:44
jnthn lizmat: Where? :)
lizmat so should I look into doing it at compile time? that would only work for literal "-1" 11:45
jnthn lizmat: Oh, I just meant I think at_pos has int and Int variants, though I guess postcircumfix does too...
lizmat yes
it does
jnthn lizmat: Well, STD did it for -2 too...
lizmat: But I think there's 2 things here really...
lizmat well, ye, any <0 int I would think
jnthn 1) Move the checks into at_pos/assign_pos/bind_pos
eiro hello #perl6 11:46
jnthn 2) Implement the compile-time check, for STD convergence and better user experience
lizmat but at the at_pos level, we don't see the difference between -1 and *-1 on an empty array
eiro o/
jnthn lizmat: Oh...and what're we menat to do on *-1 on empty? 11:47
jnthn tries to find the applicable spec
ugh, yeah... 11:50
lizmat found it ? left up to the implementation ?
eiro is there a way to improve the verbosity of the regex debuger ? 11:51
jnthn Well, it seems it really don't want @a[$i_that_happens_to_be_minus_1]
to work
But @a[*-1] on empty shouldn't complain
jnthn So yeah, you're right. It's not so easy to move the check. Grrr. 11:52
lizmat indeed... :-(
jnthn eiro: In what way is it not verbose enough?
lizmat well, we can haz multiple checks
jnthn I'm trying to reduce the number of places we have to check stuff... 11:53
jnthn eiro: iirc, you can also use $/ to try and get the current state of the match object 11:54
sergot Could somebody tell me if one is able to panda install OpenSSL without any problems? :)
lizmat but throwing a compile time error for [-1] would be better than a runtime error, no? 11:55
jnthn lizmat: Oh, yes... I was more worrying about runtime in terms of checks :) 11:57
eiro jnthn, i guess the debugger is verbose enough in most cases. What i want to do there is understand why the grammar subparse fall into an infinite loop 12:00
$/ neverr happens in my case 12:01
jnthn eiro: Which debugger are we talking about here? 12:01
eiro perl6-debug-m: whe one you show me at fosdem 12:02
jnthn OK. It should be single-stepping through the grammar...
Does that not actually happen? 12:03
eiro gist.github.com/eiro/dd405efe9b3edc4b663f 12:06
this is the output
eiro ^: match a position forever 12:08
jnthn Yes. :) 12:09
jnthn ^ means start of string, : means don't backtrack. 12:09
Did you want a char class?
<-[:]>
eiro oooohhh
eiro this is a very good trap comming from perl5 :) 12:09
jnthn Funny thing is, you got a perfectly correct charclass on the line below ;-) 12:10
jnthn std: /[^:]/ 12:10
camelia std 0f2049c: OUTPUT«===SORRY!===␤Unrecognized regex metacharacter : (must be quoted to match literally) at /tmp/VfJXdhoj9L line 1:␤------> /[^:⏏]/␤Potential difficulties:␤ [^:] appears to be an old-school character class; please use <-…»
jnthn std: /[^:]*/
camelia std 0f2049c: OUTPUT«===SORRY!===␤Unrecognized regex metacharacter : (must be quoted to match literally) at /tmp/JxwvCOCCHm line 1:␤------> /[^:⏏]*/␤Potential difficulties:␤ [^:] appears to be an old-school character class; please use <…»
jnthn Hm, seems we should also have told you that. 12:11
m: /[^:]*/
camelia ( no output )
jnthn m: /[^abc]*/
camelia ( no output )
jnthn std: /[^abc]*/ 12:11
camelia std 0f2049c: OUTPUT«Potential difficulties:␤ [^abc] appears to be an old-school character class; please use <-[abc]> if you mean a character class at /tmp/c6PaS7ruPU line 1:␤------> /[^abc]⏏*/␤ok 00:01 123m␤»
jnthn We should really steal that warning. :)
eiro \o/ 12:12
jnthn The debugger did manage to identify the place that was hanging, though :) 12:12
lizmat errands& 12:14
eiro couldn't it be a behavior of the engine? i mean: what's the point of matching the same position twice in a row ? 12:15
zengargoyle sergot: OpenSSL panda intall seemed OK # maybe duplicate, weird net thing going on here 12:15
jnthn eiro: Perhaps, though we need to be careful about putting sanity checks on hot paths... 12:16
cognominal eiro: some subrules deliberately matches a null string, see <?> in many places of Perl6/Grammar.nqp, but that's indeed different from being stuck inside a rule matching nothing over and over. 12:18
jnthn Well, it's be the quantifier that wants it 12:19
*it'd
cognominal yes 12:20
eiro ok then. i can go one 12:21
s/e$
sergot zengargoyle++: thanks! :) 12:23
timotimo why so few commits today? :P 12:59
raiph m: (^Inf).uniq.say # masak: are you ready to play "number this bug"? 13:22
camelia rakudo-moar cbce4f: OUTPUT«===SORRY!===␤Cannot assign to an immutable value␤»
raiph m: (^Inf).uniq.say # masak: are you ready to play "number this bug"?
camelia rakudo-moar cbce4f: OUTPUT«(signal )» 13:23
jnthn hah 13:24
That probably should say out of memory :P
lucas_ Hello, developers. Can I make a suggestion for addition of an operator called "many()" to listop forms of junctions? Please, tell me if it doesn't make sense or if it is too much. Here is my reasoning: 14:26
one() #=> "matches" one thing
any() #=> "matches" one or two or more things
many() #=> "matches" two or more things (but not just one)
timotimo and also: "none" 14:41
retupmoca sergot: panda install OpenSSL works here (linux 64bit, rakudo-moar) 14:51
ChoHag better: method any (JunctionTypeThingy @junction, :$minimum = 1) { ... } 14:56
Or words to that effect.
carlin I noticed sergot++'s method of making NativeCall find the dynamic path and changed Crypt::Bcrypt to use that instead of the trait_mod:<is> trick 15:11
but when panda/javakudo compiles the JAR it compiles the hard-coded string 15:12
so it installs, passes all tests but when used fails with: java.lang.UnsatisfiedLinkError: Unable to load library '/home/carlin/.panda-work/1405177512_1/blib/lib/crypt_blowfish.so'
deleting the compiled .jar from install/languages/perl6/site/lib makes it work 15:13
sergot retupmoca++: thank you! :-) 16:10
sergot carlin: oh, I didnt know that, thank you again !! 16:11
carlin++
carlin oh it happens on moarvm too... 16:54
carlin is this a bug or is it expected behaviour? 17:02
carlin gist.github.com/carbin/d2a10ffebf9a3825e10f 17:02
vendethiel method postcircumfix ? 17:03
timotimo d'aaw so few commits today 17:16
carlin postcirumfix adds an exclosing operator to the end of the thingy 17:17
m: class Foo { method postcircumfix:<( )>($inside) { say $inside ~ '!!!'; } }; my $x = Foo.new; $x('hello world');
camelia rakudo-moar cbce4f: OUTPUT«hello world!!!␤»
cognominal vendethiel, it is interesting how expression are parsed. I was surprised when I discovered that composite stuff like function arguments are treated almost like a vulgar ++ postfix except that their syntactical category is postcircumfix instead of postfix
github.com/perl6/nqp/blob/master/s...ar.nqp#L22
vendethiel yeah, I know.
I just mean, I don't think it should be a method. 17:18
atroxaper timotimo: today I have about 36 C all day...
My brain melts... 17:19
dalek kudo-star-daily: 29e0313 | coke++ | log/ (14 files):
today (automated commit)
17:20
rl6-roast-data: 3b54531 | coke++ | bin/cull:
don't add pugs to the daily list of runs
17:23
rl6-roast-data: 728e098 | coke++ | / (5 files):
today (automated commit)
timotimo atroxaper: ugh! poor you 17:24
it's cold and occasionally it drizzles around here
atroxaper timotimo: There is Hot Siberia all month! 17:25
carlin vendethiel: why not? 17:27
vendethiel: it is in S13 - perlcabal.org/syn/S13.html#Type_Casting
vendethiel 'though those were supposed to be subs. 17:28
[Coke] needs a term he can use on ticket todos that says "this has something to do with lists, lols, flattening, or some other bit that pmichaud was going to respec" 17:29
like for S32-hash/invert.t's Hash.invert flattens list values
carlin m: class Foo { sub postcircumfix:<( )>($inside) { say $inside ~ '!!!'; } }; my $x = Foo.new; $x('hello world'); 17:32
camelia rakudo-moar cbce4f: OUTPUT«Cannot find method 'postcircumfix:<( )>'␤ in block at /tmp/PYpUJcM8RF:1␤␤»
carlin I'm guessing not
vendethiel github.com/manastech/crystal/issue...t-48818326 <- crystal is grate 17:37
carlin: the $self needs to be passed too. 17:38
carlin shrugs 17:46
declaring it as a method works
that's not the issue
[Coke] m: my $x = sprintf('%p', 1234); 17:55
camelia rakudo-moar cbce4f: OUTPUT«'p' is not valid in sprintf format sequence '%p'␤␤»
BenGoldberg class Foo { sub postcircumfix:<( )>($inside) { say $inside ~ '!!!'; }; method bar { say $self('hi') } }; Foo.new.bar 18:04
m: class Foo { sub postcircumfix:<( )>($inside) { say $inside ~ '!!!'; }; method bar { say self('hi') } }; Foo.new.bar
camelia rakudo-moar cbce4f: OUTPUT«===SORRY!=== Error while compiling /tmp/6lt5jPvb_l␤Variable '&self' is not declared␤at /tmp/6lt5jPvb_l:1␤------> ay $inside ~ '!!!'; }; method bar { say ⏏self('hi') } }; Foo.new.bar␤»
BenGoldberg m: class Foo { sub postcircumfix:<( )>($inside) { say $inside ~ '!!!'; }; method bar { say $self('hi') } }; Foo.new.bar
camelia rakudo-moar cbce4f: OUTPUT«===SORRY!=== Error while compiling /tmp/slC1l6Bj8f␤Variable '$self' is not declared␤at /tmp/slC1l6Bj8f:1␤------> ~ '!!!'; }; method bar { say $self('hi')⏏ } }; Foo.new.bar␤ expecting any of:␤ postf…»
dalek ast: fc8f4a2 | coke++ | S32-basics/warn.t:
use standard "NYI" text
18:31
ast: fa539f2 | coke++ | S32-str/sprintf.t:
Unfudge slightly for rakudo
psch hi #perl6 19:14
timotimo hey pepe 19:32
psch hey timo 19:33
jnthn o/ psch 19:33
I your PR
uh
merged
psch jnthn: yes, i saw, thanks. :)
jnthn Thanks for the PR :)
psch unfortunately it's broken in one spot
the tokens for backslash escapes don't match their actions. i messed that up somewhen when rebasing i think 19:34
soo those don't work, which i didn't see in the spectest because i also forgot unskipping the tr/// tests... :)
jnthn ah
OK, well, follow-up patch and unfudging very welcome, when you've chance :)
psch github.com/rakudo/rakudo/pull/289 19:35
dalek kudo/nom: 18ce2e1 | (Pepe Schwarz)++ | src/Perl6/Grammar.nqp:
Rename tokens to match Actions methods to actually run the right action.
19:36
kudo/nom: c19ae71 | jonathan++ | src/Perl6/Grammar.nqp:
Merge pull request #289 from peschwa/tr_backslash_esc

Rename tokens to match Actions methods to actually run the right action.
ast: be941e0 | (Pepe Schwarz)++ | S05-transliteration/trans.t:
Unskip tests for tr///.
FROGGS jnthn: I call $*W.symbol_lookup() in v5 (Perl6->NQP), the first arg is meant to be a nqp array, how do I pass it? 19:51
FROGGS my Mu $list := nqp::list(nqp::decont($name)); does not work, it complains that method .pop is not found :/ 19:52
jnthn: do you know offhand what I could try instead?
timotimo could it be, that the $list ends up container'd inside nqp code? 19:53
jnthn urgh...it'll probably be using BOOTArray intead of NQPArray 'cus you're in Perl 6 code.
timotimo urgh
FROGGS hmmmm 19:54
m: use NQPMu:from<NQP; say NQPArray 19:56
camelia rakudo-moar cbce4f: OUTPUT«===SORRY!=== Error while compiling /tmp/IorG5dZzZl␤Unable to parse expression in quote words; couldn't find final '>'␤ ␤at /tmp/IorG5dZzZl:1␤------> use NQPMu:from<NQP; say NQPArray⏏<EOL>␤ expectin…»
FROGGS m: use NQPMu:from<NQP>; say NQPArray
camelia rakudo-moar cbce4f: OUTPUT«===SORRY!===␤While looking for 'NQPMu.moarvm': no such file or directory␤»
FROGGS m: use NQPCORE:from<NQP>; say NQPArray 19:57
camelia rakudo-moar cbce4f: OUTPUT«===SORRY!===␤While looking for 'NQPCORE.moarvm': no such file or directory␤»
FROGGS ahh, it is in nqp's setting :/
vendethiel m: 20:33
m: sub foo(--> Array of Str) { my Str @a = <foo bar baz>; @a }; foo.perl.say 20:34
camelia rakudo-moar c19ae7: OUTPUT«Type check failed for return value; expected 'Array[Str]' but got 'Array[Str]'␤ in any return_error at src/vm/moar/Perl6/Ops.nqp:608␤ in sub foo at /tmp/U2O3LM7fdM:1␤ in block at /tmp/U2O3LM7fdM:1␤␤»
vendethiel uh yeah, I'm so dumb.
Mouq vendethiel: known bug :(
yoleaux 11 Jul 2014 04:13Z <atroxaper> Mouq: Actually I hope my solution would be better than current Pod::To::HTML. I would like you to look at my Pod::SAX and current Pod::SAX::Goes::HTML at github.com/atroxaper/Pod-SAX
vendethiel Mouq: RT#66892, I know
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=66892
vendethiel is preaching Perl 6 to some guy that asked him which PHP framework to use 20:36
(bailador it is, duh)
Mouq lol 20:39
Mouq can't figure out how to make the * in * => ... be Whatever instead of making a WhateverCode... 20:40
vendethiel (* in * => ?) 20:41
Mouq m: say * => 42 20:42
camelia rakudo-moar c19ae7: OUTPUT«WhateverCode.new()␤»
Mouq m: say (*) => 42
camelia rakudo-moar c19ae7: OUTPUT«WhateverCode.new()␤»
Mouq But I'll just use True instead :P 20:43
FROGGS m: say Whatever => 42
camelia rakudo-moar c19ae7: OUTPUT«␤»
FROGGS m: say (Whatever => 42).perl 20:44
camelia rakudo-moar c19ae7: OUTPUT«"Whatever" => 42␤»
FROGGS ahh, :/
jnthn m: say $(*) => 42 # maybe 20:51
camelia rakudo-moar c19ae7: OUTPUT«* => 42␤»
vendethiel oh :o) 20:55
vendethiel friend: "Your slides look great. I still had that vision that perl was 'hasbeen'". me: "well, yeah, for p5 maybe. But p6 is totally new, they started writing specs aroudn the same time as py3" 21:27
^ that's the answer I hear most of the times 21:28
"wow, I thought perl was from the past" (:(.) " but p6 looks great" (:).)
vendethiel is quite pleased, because everybody who read some p6 code found it nice. Just not with one-liners so much :-P 21:32
#perl6++
masak vendethiel++ 21:36
ren1us usually if i show my friends any code i write, in any language, they just look befuddled, lol. i do find that people really like it when they see how much of a sandbox it really is. 21:37
vendethiel ren1us: I show perl 6 code to people that code :P 21:40
I wouldn't show a language with sigils to people that don't code
ren1us vendethiel: I show code to people who falsely claim to code and have been in computer science classes with me for years 21:41
vendethiel and they can't code ?
ren1us not well.
that's actually something that i've been finding more and more. colleges don't teach good coding. you get some in intro level and occasionally 'data structures' courses, but i keep seeing juniors and seniors with a 400 line main method in their java code 21:43
vendethiel :(
even programming schools don't teach testing and stuff...
masak learning to code well is hard. 21:44
vendethiel rather than hard, you need to want it. That's like everything else. If you think you'll ever do okay with your 400-lines main, then why even try ?
ren1us people who learn in high school tend to be much better about things like actual coding conventions and writing short, elegant code. i think it's because in universities, the coding is taught as a mechanism to displaying concepts, whereas in high school, they're teaching coding for coding
woolfy vendethiel++ 22:32
vendethiel has guided his friend onto the advent calendar, but sure hopes he'll soon be able to point people to his tutorials
woolfy good job!
sergot gnight o/ 23:08
Mouq .tell atroxaper github.com/atroxaper/Pod-SAX/pull/1 23:54
yoleaux Mouq: I'll pass your message to atroxaper.