Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2012-06-03

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:15 UncleFester6 joined #perl6
00:19 UncleFester6 Hi - anyone else tried pre-compilation of a class that "use"s another class?  For a simple example I get "No STable at index ..." error?
00:19 UncleFester6 Anything I might need to know or be doing wrong?
00:24 rafl joined #perl6
00:26 Maddingue joined #perl6
00:54 SHODAN joined #perl6
00:54 eiro joined #perl6
00:54 sjn joined #perl6
00:54 Yappocall joined #perl6
00:54 groky joined #perl6
00:54 zamolxes joined #perl6
01:15 dalek nqp/qrpa: 25c0b53 | pmichaud++ | / (3 files):
01:15 dalek nqp/qrpa: Add initial version of QRPA, a quicker ResizablePMCArray implementation.
01:15 dalek nqp/qrpa: review: https://github.com/perl6/nqp/commit/25c0b5364a
01:16 UncleFester6 Hmmm - played around some more and noticed that in the failed example the script used a class that used a class with no methods.  Seems to happen in practice if you "use" a grammar.
01:17 UncleFester6 Looking to file rakudobug tomorrow after some further checking.
01:18 TimToady UncleFester6++
01:22 diakopter pmichaud: bleep Bloop :)
01:22 diakopter cow
01:23 diakopter oh, you might not've written that :)
01:23 sftp joined #perl6
01:40 pmichaud diakopter: ?
01:47 aesundstrom joined #perl6
01:52 aesundstrom left #perl6
01:55 pmichaud http://gist.github.com/2860944   # time differences, RPA vs QRPA for 100000 unshifts followed by 100000 shifts
01:55 diakopter pmichaud: oh, those were strings in the .t in your commit
01:55 pmichaud diakopter: I mostly copied the .t from the parrot repo -- it's a modified version of resizablepmcarray.t
01:56 pmichaud I barely looked at most of the tests :)
01:56 diakopter I figured that eventually
01:56 pmichaud eventually we may nqp-ize the test file anyway
01:57 diakopter in splice, is offset>0 by far the most common case?
01:58 diakopter or offset==0
01:58 pmichaud I suspect there's not a bias either way
01:58 pmichaud the offset==0 case occurs when you want to delete a lot of elements from the beginning of the array
01:58 tyatpi joined #perl6
01:58 pmichaud (or replace them)
01:59 dalek niecza/non-bootstrap: 53c98f4 | sorear++ | lib/Op.cs:
01:59 dalek niecza/non-bootstrap: Op, part 4
01:59 dalek niecza/non-bootstrap: review: https://github.com/sorear/niecza/commit/53c98f441c
01:59 pmichaud various versions of Rakudo have used splice as a mass-element-deleter
02:00 pmichaud so, Rakudo does do a fair bit of splicing with offset==0
02:00 diakopter pmichaud: are there any operations that qrpa does more slowly?
02:00 pmichaud not that I'm aware of
02:01 pmichaud there might be some pathological cases where qrpa could be made to run more slowly, but they'd be really contrived
02:01 TimToady only 100 times faster!?
02:01 diakopter did you test pop/push
02:01 pmichaud pop/push should be about the same speed.... I can test it
02:02 pmichaud TimToady: shift is 1000x faster, I think.
02:02 TimToady well, the shift is 100x
02:02 TimToady you're right, I misread
02:03 pmichaud and, of course, it gets even better performance as N gets bigger, since   qrpa is O(n) for that test while rpa is O(n**2)
02:03 sorear shift is 1000 times faster?  that sounds wrongissh
02:03 sorear ah ok
02:03 * sorear thought "<pmichaud> 1000x faster" meant same O(), better constants
02:04 pmichaud no, I meant only in that test.
02:04 pmichaud ...responding to TimToady's 100x comment :)
02:05 pmichaud http://gist.github.com/2860973  # same test for push/pop instead of unshift/shift
02:06 pmichaud I think RPA's second pop run might be hit with a gc run or something to explain the 0.008 there.  Although I do force a gc run between each test.
02:07 pmichaud anyway, qrpa is approx same speed as rpa for push/pop, which is as I would expect.
02:08 pmichaud afk, dinner
02:22 [Coke] pmichaud++ moritz++
02:33 tokuhiro_ joined #perl6
02:55 crab2313 joined #perl6
03:33 dalek niecza/non-bootstrap: 9802ad4 | sorear++ | lib/Op.cs:
03:33 dalek niecza/non-bootstrap: Op, final part
03:33 dalek niecza/non-bootstrap: review: https://github.com/sorear/niecza/commit/9802ad49ae
03:54 xinming joined #perl6
04:13 japhb joined #perl6
05:00 kaare_ joined #perl6
05:14 cbk joined #perl6
05:15 cbk joined #perl6
05:47 Entonian joined #perl6
06:02 JimmyZ_ joined #perl6
06:23 Facefox joined #perl6
06:30 GlitchMr joined #perl6
06:32 cbk joined #perl6
06:38 birdwindupbird joined #perl6
06:59 birdwindupbird joined #perl6
07:04 GlitchMr Why Perl 6 is amazing programming language - http://paste.uk.to/db2079d7
07:09 ashleydev joined #perl6
07:20 sorear n: say ("ab" ~~ /a & b/)
07:20 p6eval niecza v18-2-gea3d97a: OUTPUT«#<match from(0) to(2) text(ab) pos([].list) named({}.hash)>␤»
07:21 mdmkolbe left #perl6
07:35 GlitchMr What is "&"?
07:35 sorear conjunction
07:35 sorear a & b is supposed to never match
07:36 sorear it looks for character that is both a and b
07:36 cognominal joined #perl6
07:38 GlitchMr niecza> 'ab' ~~ / . & . /
07:38 GlitchMr #<match from(0) to(2) text(ab) pos([].list) named({}.hash)>
07:38 GlitchMr So, it should make one-character match?
07:38 sorear yes
07:38 ashleydev joined #perl6
07:39 sorear r: say ('ab' ~~ / . & . /)
07:39 shachaf Perl 6 has & in regexps?
07:39 p6eval rakudo acf903: OUTPUT«q[a]␤␤»
07:39 shachaf I've always wanted & in regexps.
07:39 sorear shachaf: yes, but only in PEG mode
07:40 sorear regexes which contain & cannot be compiled to DFAs
07:40 GlitchMr Is it syntactic sugar for lookaheads?
07:40 sorear (well, technically they can, but the problem is PSPACE-hard)
07:40 sorear GlitchMr: basically yes
07:41 sorear GlitchMr: however, & requires the length to match, so [.. & .] will never match
07:41 sorear GlitchMr: it's hard to get that with lookahead syntax
07:41 shachaf Neat.
07:42 pupoque joined #perl6
07:42 GlitchMr / h. & .i / is /hi/, I guess?
07:43 sorear Yes
07:44 GlitchMr Heading: Nothing is illegal
07:44 GlitchMr The empty pattern is now illegal.
07:44 GlitchMr ok...
07:45 sorear it's a pun.
07:46 geekosaur use/mention distinction, ho...
07:46 GlitchMr oh... I get it
07:46 wamba joined #perl6
07:47 GlitchMr It's not everything is allowed, is that if you will put nothing, it's illegal.
07:47 GlitchMr lol
07:47 GlitchMr well, ok, my grammar sucks
07:50 GlitchMr Also, how can I make "<<" infix?
07:50 sorear n: say 1 +< 5
07:50 p6eval niecza v18-2-gea3d97a: OUTPUT«32␤»
07:50 GlitchMr Well, I want to create infix.
07:51 GlitchMr :infix<<<> obviously doesn't work
07:51 dalek niecza/non-bootstrap: 7b23bf5 | sorear++ | / (3 files):
07:51 dalek niecza/non-bootstrap: RxOp, part 1
07:51 dalek niecza/non-bootstrap: review: https://github.com/sorear/niecza/commit/7b23bf5417
07:51 GlitchMr Anything I can think of doesn't work
07:52 sorear try :infix« << »
07:52 sorear n: sub infix:['<<']($l,$r) {say $l; say $r}; 1 << 2
07:52 p6eval niecza v18-2-gea3d97a: OUTPUT«1␤2␤»
07:52 sorear n: sub infix:«<<»($l,$r) {say $l; say $r}; 1 << 2
07:52 p6eval niecza v18-2-gea3d97a: OUTPUT«1␤2␤»
07:52 sorear n: sub infix:< \<\< >($l,$r) {say $l; say $r}; 1 << 2
07:52 p6eval niecza v18-2-gea3d97a: OUTPUT«[31m===[0mSORRY![3​1m===[0mâ�¤â�¤Unsupported use of << to do left shift; in Perl 6 please use +< or ~< at /tmp/DgrNjJ3udR line 1:â�¤------> [32mx:< \<\< >($l,$r) {say $l; say $r}; 1 <<[33mâ��[31m 2[0mâ�¤â�¤Potential difficulties:â�¤  &infix:<\<\<> is declared but …
07:53 sorear n: sub infix:<<< << >>>($l,$r) {say $l; say $r}; 1 << 2
07:53 p6eval niecza v18-2-gea3d97a: OUTPUT«[31m===[0mSORRY![31m===[0m��Variable $l is not predeclared at /tmp/HucQCmWFUd line 1:�------> [32msub infix:<<< << >>>([33m�[31m$l,$r) {say $l; say $r}; 1 << 2[0m��Variable $r is not predeclared at /tmp/HucQCmWFUd line 1:�------> [32msub infix:<<< …
07:53 sorear I think all four should have worked
07:54 sorear but maybe the first two will help you, GlitchMr
07:54 sorear sleep&
07:54 GlitchMr sorear, http://paste.uk.to/13df6adc
07:54 GlitchMr What I am doing wrong?
07:54 AdmiralA joined #perl6
07:54 GlitchMr Oh wait, it should be multi sub
07:54 sorear No, multi is not needed
07:54 sorear I think this is a rakudobug
07:54 GlitchMr It's niecza
07:55 GlitchMr niecza> sub infix:['<<'] ( Cout $cout, Str $string ) { print $string; return $cout }
07:55 sorear ah
07:55 sorear maybe all you're doing wrong is using the repl and it would work fine in a file
07:55 AdmiralA Hi, I'm a shell scripting/UNIX/python/C/all over the place guy who just found out that perl 6 exists!
07:55 AdmiralA I had no idea it went back all the way to 2001 or so!
07:56 sorear AdmiralA: cool.  I wish I could stay and chat, but if you hang on an hour or so the core EU team will be up.
07:56 sorear AdmiralA: welcome.
07:56 AdmiralA sorear: o/
07:56 AdmiralA is perl 6 approaching any interesting milestone?
07:56 sorear GlitchMr: yeah, there's a problem with the REPL - definitely warrants a bug report
07:57 GlitchMr http://paste.uk.to/4cb82906
07:57 sorear GlitchMr: but it works find in p6eval which means it will work fine in a file
07:57 GlitchMr Ok, this works
07:58 AdmiralA like, if someone new to perl came along, do I direct her to learn.perl.org or Using Perl 6? For instance, if she was new to Python, I'd direct her towards Python 3
07:58 sorear AdmiralA: direct her towards learn.perl.org
07:58 sorear AdmiralA: perl 6 ... we've still got major quality of implementation issues to iron out
07:59 AdmiralA Is the language syntax frozen?
07:59 AdmiralA or is that being worked out too?
07:59 sorear Not frozen, but very stable
07:59 AdmiralA That sounds promising :)
07:59 sorear n: /x ** y/
07:59 p6eval niecza v18-2-gea3d97a: OUTPUT«Potential difficulties:â�¤  Unsupported use of atom ** y as separator; nowadays please use atom+ % y at /tmp/WMuO38DqbZ line 1:â�¤------> [32m/x ** y[33mâ��[31m/[0mâ�¤â�¤Â»
08:00 sorear that's a recent syntax change; as you see the older syntax is supported with a warning
08:00 GlitchMr https://github.com/sorear/niecza/issues/130
08:00 GlitchMr Ok, bug inserted
08:00 sorear that's a p6-style regex, like perl 5 /x(?:yx)*/
08:01 sorear GlitchMr: thanks
08:01 sorear now I must sleep& for real.
08:05 GlitchMr perl6: my %hash = 'a' => 'b', 'c' => 'd'; print %hash<c>
08:05 p6eval rakudo acf903, niecza v18-2-gea3d97a, pugs: OUTPUT«d»
08:14 AdmiralA left #perl6
08:15 GlitchMr What if I would like to make <> operator which would work like in Perl 5?
08:15 GlitchMr How can I specify something which works like term
08:19 tadzik GlitchMr: you mean lines()?
08:20 GlitchMr Well, but let's say that I want <> operator to read from STDIN or files in ARGV.
08:20 birdwindupbird joined #perl6
08:20 GlitchMr How can I specify something that can be used like normal number
08:21 tadzik r: .say for lines();
08:21 p6eval rakudo acf903: OUTPUT«Land der Berge, Land am Strome,␤Land der Äcker, Land der Dome,␤Land der Hämmer, zukunftsreich!␤Heimat bist du großer Söhne,␤Volk, begnadet für das Schöne,␤vielgerühmtes Österreich,␤vielgerühmtes Österreich!␤␤Heiß umfehdet, wild umstritten␤liegst dem Erdteil du inmi…
08:21 GlitchMr what lines?
08:21 GlitchMr Well, ok
08:21 tadzik r: .say for $*IN.lines();
08:21 p6eval rakudo acf903: OUTPUT«Land der Berge, Land am Strome,␤Land der Äcker, Land der Dome,␤Land der Hämmer, zukunftsreich!␤Heimat bist du großer Söhne,␤Volk, begnadet für das Schöne,␤vielgerühmtes Österreich,␤vielgerühmtes Österreich!␤␤Heiß umfehdet, wild umstritten␤liegst dem Erdteil du inmi…
08:21 GlitchMr What about something more generic
08:21 tadzik same thing
08:22 tadzik any filehandle has .lines(), iirc
08:22 GlitchMr I want @ to return value "42"
08:22 GlitchMr For example, @ + @
08:26 tadzik why would you do that? :)
08:28 GlitchMr I don't know, but it would be nice abuse of Perl 6 grammar
08:29 moritz \o
08:29 diakopter hi
08:30 GlitchMr sub term:<@> {42}
08:30 GlitchMr ok, I've done it
08:31 tadzik n: sub term:<@> {42}; say @ + @
08:31 p6eval niecza v18-2-gea3d97a: OUTPUT«84␤»
08:31 tadzik crazy
08:32 moritz \o/
08:32 moritz r: sub term:<@> {42}; say @ + @
08:32 p6eval rakudo acf903: OUTPUT«===SORRY!===␤Cannot add tokens of category 'term'␤at /tmp/n81OSvGcO2:1␤»
08:33 GlitchMr http://paste.uk.to/e92a491c
08:33 GlitchMr Would it be possible to make sub term:<@> global, but $answer not.
08:34 GlitchMr http://paste.uk.to/b27e4c81
08:34 GlitchMr Just like in this JavaScript example
08:35 GlitchMr Ok, already done, I've used state.
08:35 GlitchMr Now I've @ variable which is magical
08:36 GlitchMr ... except... I've broken normal arrays (fail)
08:36 moritz GlitchMr: that's a well known limitation in niecza: it doesn't handle read-onlyness of return values
08:37 GlitchMr niecza> :
08:37 GlitchMr 42
08:37 GlitchMr niecza> : = 2
08:37 GlitchMr 2
08:37 GlitchMr This is awesome
08:40 Celelibi is there some template-like feature in perl6?
08:40 tadzik what sort of template do you need?
08:41 tadzik you mean like C++ templates or HTML::Templates?
08:42 Celelibi Like  type-generic but still type-checked.
08:43 Celelibi Like the C++ templates.
08:43 moritz parametric roles can help you then
08:43 Celelibi Or Ada Generic.
08:43 tadzik right
08:44 moritz r: role A[$sometype] { }; class B { }; class C is B { }; say A[C] ~~ A[B]; say A[B] ~~ A[C]
08:44 p6eval rakudo acf903: OUTPUT«True␤False␤»
08:45 crab2313 left #perl6
08:46 crab2313 joined #perl6
08:52 crab2313 n: sub term:<@> {21}; @ + @ + @;
08:52 p6eval niecza v18-2-gea3d97a:  ( no output )
08:52 crab2313 n: sub term:<@> {21}; say @ + @ + @;
08:52 p6eval niecza v18-2-gea3d97a: OUTPUT«63␤»
08:57 crab2313 r: sub infix:<加>($a, $b) {$a + $b} ; say 1 加 2;
08:57 p6eval rakudo acf903: OUTPUT«3␤»
08:58 tadzik hmm
09:02 moritz r: my $x; { $OUTER::x := 5 }; say $x
09:02 p6eval rakudo acf903: OUTPUT«5␤»
09:02 moritz r: my $x; { $OUTER := 5 }; say $x
09:02 p6eval rakudo acf903: OUTPUT«===SORRY!===␤Variable $OUTER is not declared␤at /tmp/jZSZ7D7An7:1␤»
09:02 moritz r: my $x; { OUTER := 5 }; say $x
09:02 p6eval rakudo acf903: OUTPUT«Cannot bind to pseudo-package OUTER␤  in method bind_key at src/gen/CORE.setting:6387␤  in method postcircumfix:<{ }> at src/gen/CORE.setting:1261␤  in block <anon> at /tmp/aS1Sl2EaTm:1␤␤»
09:21 xdbr joined #perl6
09:22 xdbr joined #perl6
09:44 wamba joined #perl6
09:48 brrt joined #perl6
09:56 GlitchMr r: sub infix<plus> { #`(Cobol programming in Perl) $^a + $^b } print 2 plus 2
09:56 p6eval rakudo acf903: OUTPUT«===SORRY!===␤Missing block␤at /tmp/PcZiRsR41h:1␤»
09:56 GlitchMr n: sub infix<plus> { #`(Cobol programming in Perl) $^a + $^b } print 2 plus 2
09:56 p6eval niecza v18-2-gea3d97a: OUTPUT«[31m===[0mSORRY![31m===[0m��Malformed block at /tmp/uHmV9oDgvo line 1:�------> [32msub infix[33m�[31m<plus> { #`(Cobol programming in Perl) $[0m��Parse failed��»
09:57 timotimo n: sub infix<plus> { #`(Cobol programming in Perl) $^a + $^b }; print 2 plus 2
09:57 p6eval niecza v18-2-gea3d97a: OUTPUT«[31m===[0mSORRY![31m===[0m��Malformed block at /tmp/wrX2BEBWRq line 1:�------> [32msub infix[33m�[31m<plus> { #`(Cobol programming in Perl) $[0m��Parse failed��»
09:57 GlitchMr perl6: sub infix:<plus> { #`(Cobol programming in Perl) $^a + $^b } print 2 plus 2
09:57 timotimo :o
09:57 p6eval pugs: OUTPUT«*** ␤    Unexpected end of input␤    expecting "use", statements or "}"␤    at /tmp/lmJl_k9t7Y line 2, column 1␤»
09:57 p6eval ..niecza v18-2-gea3d97a: OUTPUT«[31m===[0mSORRY![31m===[0m��Strange text after block (missing comma, semicolon, comment marker?) at /tmp/_1aDwfuJ71 line 1:�------> [32m`(Cobol programming in Perl) $^a + $^b }[33m�[31m print 2 plus 2[0m��Parse failed��»
09:57 p6eval ..rakudo acf903: OUTPUT«===SORRY!===␤Confused␤at /tmp/H6usy4mei7:1␤»
09:57 GlitchMr perl6: sub infix:<plus> { #`(Cobol programming in Perl) $^a + $^b }; print 2 plus 2
09:57 p6eval pugs: OUTPUT«*** ␤    Unexpected end of input␤    expecting "use", statements or "}"␤    at /tmp/rpZqaHK4UU line 2, column 1␤»
09:57 p6eval ..rakudo acf903, niecza v18-2-gea3d97a: OUTPUT«4»
09:58 GlitchMr Why I need semicolon after sub?
09:59 moritz because statements are separated with ;
09:59 moritz you can leave it out if a } is followed by a newline
09:59 moritz s/if/where/
10:00 GlitchMr Meaningless linebreaks?
10:01 GlitchMr This isn't JavaScript, Ruby or Python...
10:01 GlitchMr But I guess that special cases are fun
10:03 moritz well
10:03 moritz would you want to write a semicolon after   if $foo { }  ?
10:04 moritz in other languages, control structures are special-cased to always terminate a statement
10:04 GlitchMr Well, in most languages semicolon is automatical after brace.
10:04 GlitchMr (Well, except for do { } while () statement)
10:04 moritz but only for certain constructs
10:05 GlitchMr Perl golf would use comma operator anyways... (which isn't comma operator, but who cares?)
10:05 GlitchMr Comma operator is hack anyways
10:05 GlitchMr https://en.wikipedia.org/wiki/Comma_operator
10:06 GlitchMr Is there any real use for it aside of JavaScript code compression
10:07 moritz for (int i = 0, int j = 1; i + j < 2 * max; i++, j++)
10:08 GlitchMr And aside for(;;) statement
10:08 GlitchMr Because I think that comma operator was made for this statement as hack
10:08 GlitchMr But why you could use it outside of this statement?
10:10 GlitchMr Actually, whole for(;;) is a hack. You can easily do it using while() statement (except for small problem with continue (next in Perl))
10:11 dalek rakudo/nom: 452cdbc | moritz++ | src/ (4 files):
10:11 dalek rakudo/nom: small typed exceptions refactor
10:11 dalek rakudo/nom:
10:11 dalek rakudo/nom: in Perl6::World.throw, mix in X::Comp into exception classes
10:11 dalek rakudo/nom: which do not already conform to X::Comp.
10:11 dalek rakudo/nom: This means that we can have exceptions that are both thrown
10:11 dalek rakudo/nom: from run time and from compile time, and still DWIM with their
10:11 dalek rakudo/nom: backtraces.
10:11 dalek rakudo/nom:
10:11 dalek rakudo/nom: Rename X::Bind::Comp to X::Bind, and throw it at run time
10:11 dalek rakudo/nom: from PseudoStash
10:11 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/452cdbca2b
10:12 dalek roast: d9262ef | moritz++ | S32-exceptions/misc.t:
10:12 dalek roast: [throws_ok] allow subtypes; Liskov applies
10:12 dalek roast:
10:12 dalek roast: also test OUTER := 5 exception
10:12 dalek roast: review: https://github.com/perl6/roast/commit/d9262efc53
10:13 GlitchMr perl6: (print 'a'), (print 'b') # I know it's list operator and not comma operator
10:13 p6eval rakudo acf903, niecza v18-2-gea3d97a, pugs: OUTPUT«ab»
10:15 cognominal_ joined #perl6
10:19 GlitchMr http://www.perl6.org/compilers/
10:20 GlitchMr That list of compilers is huge
10:20 GlitchMr Shouldn't "Feature matrix" and "Supplementals" be in one column and "Compilers" use two columns?
10:21 moritz +1
10:21 cognominal___ joined #perl6
10:22 tadzik sounds sane
10:24 spider-mario joined #perl6
10:26 GlitchMr Except I don't know how to install mowyw
10:26 moritz cpanm App::Mowyw
10:27 GlitchMr So it's on CPAN :)
10:27 GlitchMr Nice.
10:28 GlitchMr Also, it doesn't seem that cpanm command exists on my PC, but that's ok.
10:28 moritz cpan App::cpanminus
10:29 tadzik or curl -L http://cpanmin.us | perl - App::cpanminus
10:29 tadzik to go full hardcore :)
10:29 moritz DA
10:29 GlitchMr Webpage which is Perl script O_o
10:29 moritz sorry
10:30 moritz perlbrew install-cpanm # for the *real* hackers :-)
10:31 GlitchMr I've stupid problem with "GitHub for Windows"... why it says I've modified two files in perl6.org before I've done anything O_o
10:32 GlitchMr I guess it's CRLF issue or something
10:33 GlitchMr ^M$
10:33 GlitchMr CRLF?
10:34 moritz vim shows a CR as ^M, yes
10:34 GlitchMr Should I fix it?
10:35 moritz if you feel like
10:35 dalek perl6.org: e6962c0 | GlitchMr++ | source/archive/talks/200 (2 files):
10:35 dalek perl6.org: Change CRLF into LF to be consistent with rest of repository.
10:35 dalek perl6.org: review: https://github.com/perl6/p​erl6.org/commit/e6962c021b
10:36 GlitchMr https://github.com/perl6/perl6.org/commit/e​6962c021b2e3609764010d5a805ca40e53896f6?w=1
10:36 GlitchMr ok...
10:38 moritz if you only change whitespace, and append ?w=1 to the URL, it shows you nothing
10:38 moritz no surprise there
10:39 GlitchMr Also, GitHub for Windows annoys me
10:39 moritz then don't use it
10:39 GlitchMr When using shell from it, perl claims it's 5.8.8
10:39 GlitchMr O_o
10:39 moritz just install msysgit or whatever it's called
10:39 GlitchMr I've removed perl from /usr/bin and now it works
10:39 GlitchMr I guess that msysgit is the problem because it includes Perl 5.8.8
10:40 GlitchMr This is perl 5, version 14, subversion 2 (v5.14.2) built for MSWin32-x64-multi-thread
10:40 GlitchMr I should update my Perl
10:40 GlitchMr Perl 5.16.0 was released...
10:40 renormalist joined #perl6
10:44 mucker joined #perl6
10:45 GlitchMr Starting with v5.20, it is planned to require a literal "{" to be escaped, for example by preceding it with a backslash.
10:45 GlitchMr Sounds like huge backwards compatibility break...
10:45 moritz so 5.18 will warn, and 5.20 will die if you don't \ it?
10:46 GlitchMr Many programming languages implement this
10:47 GlitchMr If Perl will add new features into {} then RegExp functions in other languages will have problem whatever to accept this feature at cost of backwards compatibility.
10:48 moritz huh?
10:48 moritz {} already have special meaning in regexes
10:50 GlitchMr http://wiki.ecmascript.org/doku.php?​id=harmony:regexp_match_web_reality
10:53 dalek rakudo/nom: d0b6640 | moritz++ | src/core/ (2 files):
10:53 dalek rakudo/nom: X::Temporal::InvalidFormat
10:53 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d0b6640123
10:53 dalek roast: a1248db | moritz++ | S32-exceptions/misc.t:
10:53 dalek roast: test X::Temporal::InvalidFormat
10:53 dalek roast: review: https://github.com/perl6/roast/commit/a1248dbe9b
11:04 JimmyZ joined #perl6
11:10 mucker joined #perl6
11:10 jnthn afternoon o/
11:10 moritz \jnthn
11:11 jnthn .oO( jnthn has escaped! )
11:12 whiteknight joined #perl6
11:12 mucker ugh toll allow say, lua as a backend ?
11:12 mucker * is nqp
11:12 * moritz still cannot parse that question
11:13 mucker crp is nql generic enough to allow lua a backend
11:13 mucker *nqp !
11:13 moritz yes, I think so
11:13 * mucker is intoxicated
11:13 mucker ok
11:14 jnthn EWAYPASTBALMERPEAK
11:17 mucker my co-worked was asking on benchmarks the other day ... parrot vm < lua vm < java vm < java vm < clr vm right ?
11:18 mucker *co-worker ... lua vm < js vm
11:19 brrt mucker: you should test that stuff really :-)
11:19 brrt and it depends mightily on what you require
11:19 moritz there are multiple JVMs and multiple CLR VMs and multiple JS vms
11:19 moritz and very different work loads
11:19 brrt for instance, if you use threads you will get really different pictures from when you do not
11:20 brrt sometimes, v8 (javascript) can run faster than the output from gcc
11:20 brrt but most of the times, it will not
11:20 dalek rakudo/nom: 729d90a | moritz++ | src/core/ (2 files):
11:20 dalek rakudo/nom: typed exceptions for Temporal leap second checking
11:20 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/729d90ae60
11:20 * mucker want's do so such for perl6 but no free time :(
11:20 dalek roast: c04814d | moritz++ | S32-exceptions/misc.t:
11:20 dalek roast: test leap second exception
11:20 dalek roast: review: https://github.com/perl6/roast/commit/c04814dce1
11:21 moritz it also depends on how GC-heavy your workload is, and what kind of GC pressure it builds up etc.
11:22 mucker just for the sake of argument can't get rid of gc and uise malloc and free ?? /even if it's a dyn lang ? /
11:22 mucker *we get
11:22 moritz and what do the numbers tell you if you do that?
11:22 moritz "In a totally contrived setting, $vm-a is faster than $vm-b"?
11:23 mucker i think mallc and free trump all benchmarks
11:23 moritz well, the point of a GC and pools is often to avoid malloc and free
11:23 moritz (or one of the points)
11:24 brrt malloc and free are not allways 'fast'
11:24 moritz and not always slow either :-)
11:24 mucker i remembere reading lots of blog posts saying how gc in parrot is slow
11:25 brrt malloc()-ing 1000s of smallish objects from the heap only to free them at the end of a subroutine is slow
11:25 brrt a GC with a pool will be faster in many cases then, because it can clean 'm up in one swoop
11:25 mucker ^ that's what I had in mind
11:26 brrt which is why many real programs written in an unmanaged language manage their memory in a pool fashion
11:28 brrt anyway, if you really want to benchmark parrot, i think you're very welcome at irc.perl.org/ #parrot, people there know more about the internals than i do
11:28 Timbus i think 'gc vs malloc' is an apples/oranges thing dude. its more like 'how much the vm mallocs' and 'how good is the allocation strategy'
11:28 mucker low leval dynamic language language --> registers, package variables, dynamically scoped variables, math ops without gc, threads out to be small and cute right ?? I think parrot went the The Right Way and went for closures support ....
11:29 mucker delaying out belowed project and creating the endless flamewar when will perl6 be out
11:29 brrt oh, parrot can be a pleasure to work with, if you avoid intermediate languages like some scary disease
11:30 moritz ... and if you don't try to implement Perl 6 on top of it :-)
11:31 mucker perl6 should have been done in c++ now with all the threading support and all it seems like a right fit ? /heresy/
11:32 moritz mucker: you'd still need a runtime environment
11:33 mucker moritz: what is runtime env ? always wanted to ask
11:33 moritz mucker: something like a virtual machine
11:34 mucker moritz: then like perl5 we could settle for a stacky vm right ?
11:34 moritz we could
11:34 moritz and niecza does, quite successfully
11:34 mucker that nice to hear
11:35 brrt runtime enviroment is (at the very least) a set of routines to do the 'minimal' stuff
11:35 brrt low-level routines without which the language cannot exists
11:35 brrt exist
11:36 tokuhiro_ joined #perl6
11:36 brrt i.e.: malloc() and  free() and exit() for C
11:36 Timbus does rakudo still use parrots pmc types
11:36 mucker ok silly question times now :) /hope i am not wastime too much of your time/ how do u implement op prededence ?
11:36 Timbus like hash, (pmc)array, etc?
11:37 mucker *nqp
11:37 Timbus just wondering how much 'stuff' an alternate backend for rakudo would need
11:38 moritz Timbus: well, for interfacing with the outside world, yes (like, sockets, stat and the like)
11:38 Timbus that's fine
11:38 moritz Timbus: and the pmcarray stuff too, but that's just generic array stuff, not too parrot specific
11:39 moritz mucker: with a precedence parser
11:39 mucker moritz: does nqp make it easier ?
11:39 moritz mucker: easier than what?
11:40 mucker than bison or yacc
11:40 Timbus hmmm better question: does nqp implement things like its own hash/array. or is that provided by the vm?
11:41 Timbus how bootstrappy is it, basically
11:41 brrt joined #perl6
11:42 arnsholt mucker: NQP is a lot nicer to work with than lex and yacc
11:42 mucker okie dokie
11:42 arnsholt In no small part since you're writing Perl 6 grammars, instead of the slightly harebrained syntax lex and yacc want
11:48 jnthn Timbus: At the moment, by the VM.
11:49 jnthn Timbus: Objecty stuff it does itself.
11:49 jnthn The hash/array stuff is largely hidden behind a set of (compiled away) abstractions.
11:49 moritz ok, 10 non-typed exceptions remain in the setting (not counting internal errors and NYI stuff)
11:49 jnthn moritz++
11:51 * moritz really wants to wrap up his grant this month
11:52 Timbus ah. thanks jnthn
12:00 dalek rakudo/nom: bb6d6b2 | moritz++ | src/core/ (2 files):
12:00 dalek rakudo/nom: typed exception for non-ASCII chars in pack "A" templates
12:00 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/bb6d6b2c82
12:02 GlitchMr I found quick way of testing perl6/perl6.org
12:03 GlitchMr You run mowyw and php54 -t online after that
12:09 GlitchMr (or perhaps I read TDWTF too much?)
12:10 GlitchMr Also, wouldn't it be possible to make mowyw faster... it's slow when I was to change ONE file
12:31 pmichaud good morning, #perl6
12:32 jnthn o/
12:32 xinming joined #perl6
12:36 GlitchMr https://dl.dropbox.com/u/63913412/threecolumns.png
12:36 GlitchMr I don't know why, but I don't like the result...
12:37 moritz GlitchMr: you can run mowyw --make
12:37 GlitchMr ... wow... that's really hidden
12:37 GlitchMr There is no --help...
12:37 moritz there's a man page :-)
12:38 moritz GlitchMr: having two columns with the same title is not so great
12:38 GlitchMr Yeah...
12:38 GlitchMr https://dl.dropbox.com/u/63913412/looksstupid.png
12:38 GlitchMr But this is even worse
12:39 moritz you can just make them the same width
12:40 JimmyZ joined #perl6
12:46 GlitchMr https://dl.dropbox.com/u/63913412/whataboutnow.png
12:48 LoRe i like the stupid thing
12:49 tadzik yeah, it looks ok
12:53 GlitchMr I'll check it in validator and push
12:55 dalek perl6.org: 99d489c | GlitchMr++ | source/style.css:
12:55 dalek perl6.org: Add unprefixed versions of CSS properties so I'll enjoy shadows in my browser
12:55 dalek perl6.org: review: https://github.com/perl6/p​erl6.org/commit/99d489c463
12:55 dalek perl6.org: 333cc60 | GlitchMr++ | source/ (2 files):
12:55 dalek perl6.org: Move "Feature matrix" and "Supplementals" to one column in "Compilers" page.
12:55 dalek perl6.org:
12:55 dalek perl6.org: Those sections were small and the biggest problem was "Compilers"
12:55 dalek perl6.org: section which had a lot of text compared to those.
12:55 dalek perl6.org: review: https://github.com/perl6/p​erl6.org/commit/333cc609c2
12:58 dalek perl6.org: 5b4d8a0 | GlitchMr++ | source/compilers/index.html:
12:58 dalek perl6.org: Except it's not three-column. I forgot to remove this comment while experimenting with designs.
12:58 dalek perl6.org: review: https://github.com/perl6/p​erl6.org/commit/5b4d8a003a
12:58 drbean joined #perl6
13:01 dalek roast: 7a26e13 | moritz++ | S32-exceptions/misc.t:
13:01 dalek roast: test X::Buf::Pack::NonASCII
13:01 dalek roast: review: https://github.com/perl6/roast/commit/7a26e13602
13:03 drbean joined #perl6
13:05 crab2313 joined #perl6
13:08 Psyche^ joined #perl6
13:09 GlitchMr Also, just wondering, but is there more idiomatic way to say
13:09 GlitchMr for split '', $string { }
13:10 wamba joined #perl6
13:10 arnsholt You're looking for comb
13:10 moritz for $string.comb { }
13:10 arnsholt What moritz++ said
13:12 drbean joined #perl6
13:12 pmichaud is the version of http://perl6.org/compilers that's appearing now the most recent (with GlitchMr++ 's changes above)?
13:12 GlitchMr Yes
13:13 UncleFester6 joined #perl6
13:13 GlitchMr ... but there is problem with padding on the left...
13:13 pmichaud I think it looks great, _except_ on my screen the link to "Hackage" occurs at the beginning of the line, which makes it look like "Hackage" is another Perl 6 implementation (and that there's a missing space between it and the pugs entry above).
13:14 pmichaud Not sure it's easily fixable, but it confused me for a few seconds before I could figure out what was going on
13:14 GlitchMr Well, it's about font and stuff
13:14 pmichaud I can post a screen dump... one second
13:14 GlitchMr But yes, it's confusing
13:14 GlitchMr It happens to me too
13:14 pmichaud okay
13:15 cognominal joined #perl6
13:15 GlitchMr If somehow we would rewrite the sentence so this wouldn't happen...
13:15 pmichaud maybe make "published" the link instead of "Hackage"
13:15 ggoebel joined #perl6
13:16 leprevost joined #perl6
13:16 UncleFester6 tadzik: I think RT #113478 may be the non-deterministic pre-compilation problem.  Thought you might be interested.
13:16 pmichaud or even "the most recent".... if "Hackage" itself weren't the link, then there'd be no problem.  :-)
13:17 tadzik UncleFester6: indeed
13:17 tadzik UncleFester6: well, that's a bit diffent
13:17 tadzik UncleFester6: your problem can be worked around by actually precompiling stuff in the right order
13:17 GlitchMr karma GlitchMr
13:17 aloha GlitchMr has karma of 2.
13:18 GlitchMr wait...
13:18 dalek perl6.org: 1c85b2e | GlitchMr++ | source/compilers/index.html:
13:18 dalek perl6.org: Make "published" a link instead of "Hackage" to avoid confusion.
13:18 dalek perl6.org: review: https://github.com/perl6/p​erl6.org/commit/1c85b2ee2c
13:18 tadzik but that doesn't (always) help for, say, URI or panda
13:18 GlitchMr karma GlitchMr
13:18 aloha GlitchMr has karma of 2.
13:18 GlitchMr ...?
13:18 jnthn Stuff not working when not compiled in the right order is not a bug.
13:18 crab2313 What is karma ?
13:18 jnthn Not telling you "this won't work" and refusing to pre-compile stuff in the wrong order is a bug though.
13:19 jnthn It should simply not allow that to happen.
13:19 jnthn It's on my todo list.
13:19 tadzik it's the currency with which you can buy donuts from whiteknight
13:19 pmichaud karma pmichaud
13:19 aloha pmichaud has karma of 1473.
13:19 pmichaud mmmm, donuts.
13:19 jnthn karma jnthn
13:19 aloha jnthn has karma of 2646.
13:19 tadzik karma tadzik
13:19 aloha tadzik has karma of 939.
13:19 tadzik 961 to go
13:19 jnthn ...wish it was for beer, not donuts :)
13:19 UncleFester6 The ufo make file compiles stuff in the wrong order ...
13:19 tadzik erm, 9061
13:19 tadzik UncleFester6: oh. It shouldn't
13:19 jnthn UncleFester6: Really? That's...bad.
13:21 leprevost joined #perl6
13:23 PacoAir joined #perl6
13:26 UncleFester6 I just double checked and it does for URI anyway.  If you do a make and remove the blib/lib .pm files test fail.  I took the output of make, re-ordered the pre-compiles and the tests ran.
13:27 tadzik does every make -j1 give the same ordering?
13:27 moritz UncleFester6: I've been saying that for ages :/
13:28 jnthn So...ufo is broken?
13:28 jnthn As in, getting dependencies wrong?
13:29 moritz yes
13:29 moritz it sometimes fails to recompile dependencies
13:29 tadzik that to
13:29 tadzik oo
13:29 jnthn Yeah, that's gonna cause some real issues.
13:30 tadzik it shouldn't if you always make clean
13:30 moritz well
13:30 moritz you shouldn't need 'make clean' just to get compilation right :/
13:30 tadzik but it's still broken if you do that
13:30 tadzik that's the biggest issue
13:30 jnthn Right, it should rebuild the things that need rebuilding.
13:30 jnthn tadzik: But does it consistently get the order right?
13:31 tadzik I can't tell, because now it's always broken
13:31 tadzik I've checked like 5 times with URI already
13:32 dalek rakudo/nom: 5756efd | moritz++ | src/core/ (2 files):
13:32 dalek rakudo/nom: typed exception for wrong argument to :x in regex matches
13:32 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5756efd638
13:32 dalek roast: ac06e5e | moritz++ | S32-exceptions/misc.t:
13:32 dalek roast: test X::Str::Match::x
13:32 dalek roast: review: https://github.com/perl6/roast/commit/ac06e5e46c
13:33 UncleFester6 tadzik: is there agreement that if you pre-compile the URI modules in the right order the tests work?
13:33 tadzik UncleFester6: no
13:33 tadzik at least I cannot prove this right now
13:34 jnthn I'm going to add something to Rakudo, soon, to make it refuse to pre-compile a module if all of its dependencies haven't already been pre-compiled.
13:34 jnthn If ufo builds start exploding as a result, we'll soon see where the issue is.
13:34 tadzik I'm wondering whether ufo is confused by lines appearing in pod
13:34 tadzik =begin SYNOPSIS\nuse Something\n
13:34 moritz quite possible
13:34 jnthn Ouch.
13:34 tadzik regex-parsing strikes back
13:35 tadzik I don't say that it does happen, but it could
13:35 * tadzik tries to compile URI by hand
13:36 UncleFester6 I piped the of make into a shell file, manually reordered the compiles,  did 'rm -rf blib' and tests worked for me.
13:36 UncleFester6 s/the of/the output of/
13:36 birdwindupbird joined #perl6
13:36 tadzik URI?
13:37 UncleFester6 yes
13:37 tadzik the ordering seems to be correct for me
13:37 tadzik https://gist.github.com/2863526
13:38 moritz here URI.pm is compiled before DefaultPort
13:38 * tadzik wonders how hard it's to implement precompilation on-demand in 'use' or somewhere
13:39 tadzik but I should wonder more about 3 projects due tomorrow
13:39 tadzik moritz: you sure your MAKEFLAGS are clean?
13:39 UncleFester6 the order in the paste looks right. do the test run when compiled with that ordering?
13:39 tadzik no
13:39 moritz tadzik: yes. SOURCES in the Makefile is ordered wrongly
13:39 tadzik Oh, ok
13:39 moritz maybe because of use vs. need
13:40 tadzik but, nothing use-s URI::DefaultPort
13:40 tadzik as far as I can see
13:40 moritz tadzik: it's 'need', not 'use'
13:40 tadzik there we go
13:40 tadzik need
13:40 UncleFester6 yes URI::DefaultPort is needed / used
13:40 * tadzik tries a patch
13:40 * moritz too
13:41 tadzik I'll try that for Panda then :)
13:41 UncleFester6 so the tests run now?
13:42 tadzik they didn't run here anyway
13:42 moritz some run, some don#t
13:42 tadzik right
13:42 moritz but at least it now compiles DefaultPort before URI.pm
13:43 wamba joined #perl6
13:44 moritz ufo patch pushed
13:44 moritz $ perl6 -Iblib/lib  t/01.t
13:44 moritz ===SORRY!===
13:44 moritz No object at index 73
13:45 UncleFester6 I was getting similar errors until I compiled in the right order.
13:45 tadzik the same patch didn't help panda either
13:45 tadzik although I used ||
13:46 tadzik heh, now panda failed too
13:47 tadzik https://gist.github.com/2863548
13:47 UncleFester6 tadzik: that's the same error as the RT that started this conversation
13:48 tadzik I know
13:48 tadzik I still don't know why it works that way
13:49 moritz is the order correct now?
13:49 tadzik it was correct anyway, Panda only uses use
13:50 tadzik okay, that's not this
13:50 tadzik see https://gist.github.com/2863548#comments
13:50 UncleFester6 On my system the UFO make compiles IETF/RFC_Grammar.pm first which is wrong because IETF/RFC_Grammar.pm requires grammars at runtime.
13:50 tadzik compare the order
13:51 tadzik I did two runs in a row, the order is exactly the same, and one works and one doesn't
13:51 tadzik it's not about ordering
13:51 UncleFester6 s/is wrong/may be wrong/
13:52 moritz anyway
13:52 moritz the other problem with ufo (which is unrelated to this one) is that it doesn't declare dependencies
13:53 tadzik that too
13:57 pmichaud jnthn: ping
13:58 xinming joined #perl6
14:00 jnthn pmichaud: pong
14:01 pmichaud on $!target and .LANG, were you referring to issues prior to your 05-25 commits there or afterwards?
14:01 pmichaud (making extra copies of ucs-4 strings)
14:02 * jnthn needs to find said commits...
14:02 jnthn nqp repo?
14:02 moritz r: class A { }; class B does A { }
14:02 p6eval rakudo bb6d6b: OUTPUT«===SORRY!===␤B cannot compose A because it is not composable␤»
14:02 pmichaud yes, nqp repo
14:02 pmichaud the commits themselves aren't too relevant, I'm just curious if the 05-25 commits were intended to address the $!target issue or not
14:03 jnthn pmichaud: Oh, I haven't done anything to address it.
14:03 pmichaud because I *think* the way it is now actually works out okay :-)
14:03 jnthn I think the commits you're looking at are when I made QHLL be HLL
14:03 pmichaud well, there's an argument to be had that .LANG ends up with an incorrect $!orig, but I still think it's okay
14:03 jnthn oh, it's passing self.target()....
14:03 jnthn *nod*
14:03 pmichaud right
14:04 jnthn Well, provided Parrot is smart enough to treat the transcode as a no-op
14:04 pmichaud and since .target() is already ucs-4, transcoding it to ucs-4 doesn't make an extra copy
14:04 jnthn The :g issue remains though.
14:04 jnthn But yeah, it seems LANG is OK, though it does lose orig.
14:04 pmichaud it's not exactly a no-op, it still makes a new string header but doesn't copy the string itself.  At least according to the comments.
14:05 pmichaud (That code appears to be left-over from when Parrot had COW strings)
14:05 pmichaud strings in parrot are now immutable, so I'm fairly sure it's not an issue :)
14:05 pmichaud I might run a memory consumption test to make sure.
14:05 fgomez joined #perl6
14:06 pmichaud yes, :g is still an issue; I'll take a look at it sometime soonish.
14:08 jnthn fwiw, I very much doubt the way LANG is, is because I thought "oh, we should pass target, not orig, to avoid re-transcoding"
14:09 jnthn It's more likely to be the result of a thinko.
14:09 pmichaud well, before your changes it did pass .orig :-)
14:09 pmichaud and called cursor_start instead of cursor_init
14:09 jnthn Oh :)
14:09 jnthn Yeah, I know I had to change it to cursor_init
14:09 pmichaud cursor_init is faster anyway
14:09 pmichaud so I'm happy with the change :)
14:14 Araq joined #perl6
14:15 wamba joined #perl6
14:16 UncleFester6 left #perl6
14:23 UncleFester6 joined #perl6
14:23 UncleFester6 moritz: I just reproduced your problem with URI and figured out why it's happening I think.
14:24 UncleFester6 ufo puts the PERL6LIB ordering with lib first and blib/lib second which is preferring .pm files when it shouldn't
14:25 UncleFester6 if I put blib/lib before lib/ in min PERL6LIB the problem goes away
14:34 moritz P6LIB = $(PWD)/$(BLIB)/lib:$(PWD)/lib:$(PERL6LIB)
14:34 moritz and then
14:34 moritz env PERL6LIB=$(P6LIB) $(PERL6) --target=pir --output=$@ $<
14:34 moritz looks like blib first, no?
14:34 moritz env PERL6LIB=/home/moritz/p6/uri/bl​ib/lib:/home/moritz/p6/uri/lib: perl6 --target=pir --output=blib/lib/IETF/RFC_Grammar.pir lib/IETF/RFC_Grammar.pm
14:34 moritz also looks like blib first
14:35 UncleFester6 yes ... working on something relevant ...
14:35 UncleFester6 (I hope)
14:46 UncleFester6 sorry my statement about ufo P6LIB ordering is wrong .. I will keep working on the similar looking errors I guess
14:48 dalek rakudo/map: 4a00632 | pmichaud++ | src/core/MapIter.pm:
14:48 dalek rakudo/map: Short-circuit 'redo' label in MapIter.reduce.
14:48 dalek rakudo/map: review: https://github.com/rakudo/rakudo/commit/4a00632ff6
14:50 dalek rakudo/nom: 253f6db | moritz++ | src/core/ (2 files):
14:50 dalek rakudo/nom: typed exception for "does" with non-composable type
14:50 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/253f6db62c
14:51 GlitchMr nr: print [cmp] 1, 2, 3, 1
14:51 p6eval niecza v18-2-gea3d97a: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Cannot reduce with cmp because structural infix operators are diffy and not chaining at /tmp/1Zff8ab0oq line 1:â�¤------> [32mprint [cmp][33mâ��[31m 1, 2, 3, 1[0mâ�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/b…
14:51 p6eval ..rakudo 5756ef: OUTPUT«Increase»
14:51 moritz niecza++
14:51 dalek roast: b94655c | moritz++ | S32-exceptions/misc.t:
14:51 dalek roast: test X::Composition::NotComposable
14:51 dalek roast: review: https://github.com/perl6/roast/commit/b94655cbe4
14:52 GlitchMr nr: sub infix:<cheat_cmp> { $^a cmp $^b }; print [cheat_cmp] 1, 2, 3, 1
14:52 p6eval rakudo 5756ef, niecza v18-2-gea3d97a: OUTPUT«Increase»
14:53 GlitchMr (ok, this is workaround :P)
14:55 GlitchMr nr: print (2 ~~ (1, 2, 3)).perl
14:55 p6eval rakudo 5756ef, niecza v18-2-gea3d97a: OUTPUT«Bool::False»
14:56 UncleFester6 moritz: ping / quick question I hope
14:56 moritz UncleFester6: pong
14:57 UncleFester6 ufo copies the .pm files into the blib directory.  When you run tests after a rebuild how do you know whether you are using pre-compiled .pir or .pm?
14:58 moritz UncleFester6: I don't think there's an easy way to check
14:59 UncleFester6 I am semi manually removing the .pm files to be sure with - find blib/ -name '*.pm' -exec rm -i {} \;
14:59 UncleFester6 It may be a difference in our testing environments.
15:00 moritz oh
15:00 moritz I think that rakudo compares timestamps of .pir and .pm files
15:00 moritz and only uses the .pir version if it's not older than the .pm
15:00 moritz so it would make sense to first copy the .pm, then create the .pir file
15:01 JimmyZ_ joined #perl6
15:02 UncleFester6 ufo makefile copies the .pm after - no?  anyway thanks.  will research on my own for a while ...
15:02 moritz yes, I think it copies later on
15:03 JimmyZ_ joined #perl6
15:03 * moritz thinks it's time to completely rewrite the Makefile generation part of ufo
15:06 UncleFester6 left #perl6
15:11 brrt joined #perl6
15:16 crab2313 left #perl6
15:17 crab2313 joined #perl6
15:17 moritz ok, I've pushed a TODO file to ufo
15:17 dalek rakudo/nom: cd04b8c | moritz++ | TODO:
15:17 dalek rakudo/nom: add TODO file
15:17 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/cd04b8cc6a
15:18 moritz oh shit, wrong repo
15:18 moritz sorry 'bout that
15:18 dalek rakudo/nom: 9d64f9a | moritz++ | TODO:
15:18 dalek rakudo/nom: remove TODO file, I meant to commit it to the ufo repo. moritz--
15:18 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9d64f9ab09
15:22 GlitchMr nr: print 4242.base(37)
15:22 p6eval rakudo 253f6d: OUTPUT«base must be between 2 and 36, got 37␤  in method Str at src/gen/CORE.setting:9351␤  in method print at src/gen/CORE.setting:7082␤  in sub print at src/gen/CORE.setting:6953␤  in block <anon> at /tmp/f102IF5xB1:1␤␤»
15:22 p6eval ..niecza v18-2-gea3d97a: OUTPUT«Unhandled exception: base must be between 2 and 36, got 37␤  at /home/p6eval/niecza/lib/CORE.setting line 1402 (die @ 5) ␤  at /home/p6eval/niecza/lib/CORE.setting line 830 (Int.base @ 6) ␤  at /tmp/QVjLALfY5l line 1 (mainline @ 3) ␤  at /home/p6eval/niecza…
15:22 GlitchMr I've proposal. What about putting array then?
15:22 GlitchMr (actually, don't do that, it would be too confusing)
15:23 moritz might not be too confusing when using a different name
15:23 moritz but what's the use case?
15:24 GlitchMr .base could return object
15:25 colomon GlitchMr: If you really want to do that, it's pretty trivial to write your own module to do it.
15:27 GlitchMr nr: print ~([2, 1, 2] but '212')
15:27 p6eval rakudo 253f6d, niecza v18-2-gea3d97a: OUTPUT«212»
15:27 GlitchMr nr: print ([2, 1, 2] but '212')[0]
15:27 p6eval rakudo 253f6d, niecza v18-2-gea3d97a: OUTPUT«2»
15:29 GlitchMr (but right, this could be module if anything)
15:29 GlitchMr Perl 6 specification is already quite complex
15:31 brrt joined #perl6
15:41 GlitchMr n: eval 'print "a"."b"', :lang<perl5>
15:41 p6eval niecza v18-2-gea3d97a: OUTPUT«Unhandled exception: System.IO.FileNotFoundException: Could not load file or assembly 'Perl5Interpreter' or one of its dependencies. The system cannot find the file specified.␤File name: 'Perl5Interpreter'␤  at System.AppDomain.Load (System.String assemblyS…
15:47 GlitchMr n:  my $socket = IO::Socket::INET.new(host => "www.glitchmr.pl", port => 80);
15:47 p6eval niecza v18-2-gea3d97a: OUTPUT«Potential difficulties:â�¤  $socket is declared but not used at /tmp/TIpZKXMC95 line 1:â�¤------> [32mmy [33mâ��[31m$socket = IO::Socket::INET.new(host => "[0mâ�¤â�¤Unhandled exception: Unable to resolve method postcircumfix:<( )> in type Anyâ�¤  at /tmp/TIpZKXMC95…
15:50 GlitchMr r:  my $socket = IO::Socket::INET.new(host => "www.glitchmr.pl", port => 80);
15:50 p6eval rakudo 253f6d: OUTPUT«Could not find symbol 'IO::Socket::&INET'␤  in block <anon> at /tmp/renmfUoZJA:1␤␤»
15:50 GlitchMr How can I make sockets?
15:53 jnthn GlitchMr: Like that, but Rakudo has sockets disabled on p6eval
15:53 moritz GlitchMr: see the tests, and the examples related to HTTP on modules.perl6.org
15:53 jnthn In the REPL it works.
15:53 jnthn (locally)
15:56 Chillance joined #perl6
15:58 cognominal joined #perl6
16:12 sorear good * #perl6
16:12 moritz \o sorear
16:15 dalek rakudo/nom: da68917 | moritz++ | src/core/ (2 files):
16:15 dalek rakudo/nom: typed exception for eval with unknown :lang
16:15 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/da68917796
16:15 dalek rakudo/nom: 1d48515 | moritz++ | docs/ChangeLog:
16:15 dalek rakudo/nom: note -O2 changes in ChangeLog
16:15 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1d48515374
16:17 moritz oh dammit, I didn't mean to push da68917 either
16:19 dalek rakudo/nom: 89da094 | moritz++ | src/core/ (2 files):
16:19 dalek rakudo/nom: Revert "typed exception for eval with unknown :lang"
16:19 dalek rakudo/nom:
16:19 dalek rakudo/nom: This reverts commit da68917796e380a368f3c98d37018fccda494287.
16:19 dalek rakudo/nom: It made the setting compilation hang. No idea why.
16:19 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/89da0940c2
16:19 * moritz is not concentrated, and shouldn't hack
16:22 cognominal joined #perl6
16:25 sorear mm, dilute moritz
16:27 dalek rakudo/nom: acb50df | moritz++ | src/core/ (2 files):
16:27 dalek rakudo/nom: typed exception for eval with unknown :lang
16:27 dalek rakudo/nom:
16:27 dalek rakudo/nom: second shot; works this time
16:27 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/acb50df9eb
16:27 dalek roast: 6aa9f56 | moritz++ | S32-exceptions/misc.t:
16:27 dalek roast: test X::Eval::NoSuchLang
16:27 dalek roast: review: https://github.com/perl6/roast/commit/6aa9f5686c
16:33 brrt joined #perl6
16:33 brrt left #perl6
16:37 Khisanth joined #perl6
16:43 thelazydeveloper joined #perl6
16:47 raiph joined #perl6
16:48 Chillance joined #perl6
17:03 dalek nqp/qrpa: 27720d1 | pmichaud++ | src/PAST/NQP.pir:
17:03 dalek nqp/qrpa: Add (temporary) nqp::qlist() to construct QRPA instead of RPA lists.
17:03 dalek nqp/qrpa: review: https://github.com/perl6/nqp/commit/27720d1536
17:03 dalek nqp/qrpa: 98f6a4e | pmichaud++ | / (4 files):
17:03 dalek nqp/qrpa: Add nqp::islist().
17:03 dalek nqp/qrpa: review: https://github.com/perl6/nqp/commit/98f6a4ec65
17:20 cognominal joined #perl6
17:37 GlitchMr perl6: use v8; // use Node.js
17:37 p6eval pugs: OUTPUT«*** ␤    Unexpected "use"␤    expecting operator␤    at /tmp/zOCnPkWecV line 1, column 12␤»
17:37 p6eval ..niecza v18-2-gea3d97a: OUTPUT«[31m===[0mSORRY![31m===[0m��Null regex not allowed at /tmp/sKEsVsXjl6 line 1:�------> [32muse v8; //[33m�[31m use Node.js[0m��Action method quote:sym<//> not yet implemented at /tmp/sKEsVsXjl6 line 1:�------> [32muse v8; //[33m�[31m use Node.js[…
17:37 p6eval ..rakudo acb50d: OUTPUT«===SORRY!===␤Null regex not allowed at line 2, near " use Node."␤»
17:37 GlitchMr perl6: use v8
17:37 p6eval rakudo acb50d, niecza v18-2-gea3d97a, pugs:  ( no output )
17:38 dalek rakudo/nom: d8f1a1b | moritz++ | src/core/ (2 files):
17:38 dalek rakudo/nom: Temporal gets more typed exceptions
17:38 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d8f1a1bcd5
17:41 dalek roast: 3ed2a34 | moritz++ | S32-exceptions/misc.t:
17:41 dalek roast: test X::Temporal::Truncation
17:41 dalek roast: review: https://github.com/perl6/roast/commit/3ed2a34412
17:42 moritz 4 exceptions remain to be ported.
17:43 diakopter moritz++
17:43 moritz (that is, exceptions from src/core/)
17:43 * jnthn viers moritz++'s progress
17:43 jnthn .oO( ouch, that was a tenuous pun... )
17:47 birdwindupbird joined #perl6
17:49 whiteknight joined #perl6
17:50 sorear phenny: "viers"?
17:50 phenny sorear: "viers" (en to en, translate.google.com)
17:50 sorear phenny: de "viers"?
17:50 phenny sorear: "Viers" (de to en, translate.google.com)
17:50 felher vier is the german 4 :)
17:51 felher And pronounced like fear
17:51 sorear phenny: sv "viers"?
17:51 phenny sorear: "viers" (sv to en, translate.google.com)
17:51 sorear phenny: ru "viers"?
17:51 phenny sorear: "viers" (ru to en, translate.google.com)
17:51 * diakopter learns something new every day. and then forgets it.
17:51 moritz diakopter: such is human nature
17:51 sorear eine, zwei, ?, vier ?
17:51 felher eins, zwei, drei, vier :)
17:52 GlitchMr Make Perl 6 awk:
17:52 GlitchMr sub infix:[''] { $^a ~ $^b }
17:52 GlitchMr (ok, this is insane)
17:52 tadzik eee
17:53 moritz if you want to allow two terms in a row, you'll have to hack the grammar in quite a few places
17:53 moritz and you won't get any sensible parse error messages out of it
17:53 GlitchMr For me it seems to work this way
17:53 GlitchMr (I haven't expected that, really)
17:53 * moritz neither
17:54 GlitchMr niecza> 1 1 'cake' (1, 2)
17:54 GlitchMr 11cake1 2
17:55 sorear wow.
17:55 GlitchMr nr: sub infix:[' '] { $^a ~ $^b }; print 1 1 'cake' (1, 2)
17:55 p6eval rakudo acb50d, niecza v18-2-gea3d97a: OUTPUT«11cake1 2»
17:55 tadzik niice
17:56 GlitchMr nr: sub infix:[' '] { $^a ~ $^b }; sub a { 'a' }; sub b { 'b' }; print a() b()
17:56 p6eval rakudo acb50d, niecza v18-2-gea3d97a: OUTPUT«ab»
17:56 jnthn Whoa.
17:56 jnthn WAT :)
17:57 GlitchMr (hint: you shouldn't do it in real code, but it looks cool)
17:57 timotimo i don't understand why
17:58 icwiener joined #perl6
17:58 timotimo why one would want that, that is
17:58 GlitchMr I feelt surprised when I have noticed it worked
17:58 timotimo it's still cool that that works
17:58 GlitchMr In both implementations!
17:59 timotimo std: sub infix:[' '] { $^a ~ $^b }; sub a { 'a' }; sub b { 'b' }; print a() b()
17:59 p6eval std f179a1b: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Two terms in a row at /tmp/PMGC3n2d6U line 1:â�¤------> [32msub a { 'a' }; sub b { 'b' }; print a() [33mâ��[31mb()[0mâ�¤    expecting any of:â�¤ infix or meta-infixâ�¤    infixed functionâ�¤       statement modifier loopâ�¤Parse failedâ�¤FAILED 00:00 43mâ�¤Â»â€¦
17:59 timotimo whoops :)
17:59 cogno joined #perl6
18:01 GlitchMr How can I join arrays?
18:01 sorear std: sub infix:[''] { $^a ~ $^b }; sub a { 'a' }; sub b { 'b' }; print a() b()
18:01 tadzik with a comma maybe
18:01 p6eval std f179a1b: OUTPUT«ok 00:00 43m␤»
18:01 sorear if you drop the space it works better
18:01 GlitchMr Comma worked in Perl 5, but
18:01 GlitchMr niecza> (@a, @b).perl
18:01 GlitchMr ([1, 2].list, [3, 4].list)
18:02 GlitchMr I don't think I want that
18:02 tadzik hrm
18:02 GlitchMr niecza> (@a, @b)[0]
18:02 GlitchMr 1 2
18:02 GlitchMr niecza> (@a, @b)[1]
18:02 GlitchMr 3 4
18:02 tadzik r: my @a = 1, 2; my @b = 3, 4; (@a, @b).perl.say
18:02 p6eval rakudo acb50d: OUTPUT«(Array.new(1, 2), Array.new(3, 4))␤»
18:02 jnthn Flattening is lazy.
18:02 jnthn r: my @a = 1, 2; my @b = 3, 4; (@a, @b)[0].say
18:02 p6eval rakudo acb50d: OUTPUT«1␤»
18:02 jnthn r: my @a = 1, 2; my @b = 3, 4; (@a, @b)[1].say
18:02 p6eval rakudo acb50d: OUTPUT«2␤»
18:02 jnthn etc
18:02 GlitchMr Is it Niecza bug?
18:02 GlitchMr n: my @a = 1, 2; my @b = 3, 4; (@a, @b)[1].say
18:02 tadzik r: my @a = 1, 2; my @b = 3, 4; (@a, @b).map: { say $_ };
18:02 p6eval niecza v18-2-gea3d97a: OUTPUT«3 4␤»
18:02 p6eval rakudo acb50d:  ( no output )
18:02 jnthn Yes.
18:03 tadzik heh, lazy again
18:03 sorear GlitchMr: flattening is very wonky in niecza
18:07 GlitchMr How can I check if value is in array?
18:09 GlitchMr I would use ~~ like in Perl 5, but it doesn't seem to work in Perl 6
18:09 tadzik isn't there .first?
18:10 tadzik r: my @a = 1..6; say @a.first(3);
18:10 p6eval rakudo acb50d: OUTPUT«3␤»
18:10 tadzik r: my @a = 1..6; say @a.first(* > 2);
18:10 p6eval rakudo acb50d: OUTPUT«3␤»
18:10 tadzik looks ok
18:10 benabik r: say <1 2 3> ~~ 2
18:10 p6eval rakudo acb50d: OUTPUT«False␤»
18:10 benabik r: say <1 2 3> ~~ '2'
18:10 p6eval rakudo acb50d: OUTPUT«False␤»
18:10 GlitchMr Except it seems that I cannot use .first with Nil
18:11 GlitchMr Perhaps I should try using any()
18:11 benabik r: say any(<1 2 3>) ~~ 2
18:11 p6eval rakudo acb50d: OUTPUT«any(False, False, False)␤»
18:11 GlitchMr r: say any(<1 2 3>) === 2
18:11 p6eval rakudo acb50d: OUTPUT«any(False, False, False)␤»
18:11 GlitchMr r: say 2 === any(<1 2 3>)
18:11 p6eval rakudo acb50d: OUTPUT«any(False, False, False)␤»
18:11 GlitchMr what?
18:12 benabik r: say so any(<1 2 3>) ~~ 2
18:12 p6eval rakudo acb50d: OUTPUT«False␤»
18:12 tadzik r: say 2 == any(<1 2 3>)
18:12 p6eval rakudo acb50d: OUTPUT«any(False, True, False)␤»
18:12 benabik r: say so any(<1 2 3>) ~~ '2'
18:12 p6eval rakudo acb50d: OUTPUT«True␤»
18:12 timotimo huh.
18:17 cogno joined #perl6
18:19 gfldex well that cannot work
18:20 gfldex at least the 2 === 2
18:21 gfldex say (2 == any(<1 2 3>)).Bool;
18:21 gfldex r: say (2 == any(<1 2 3>)).Bool;
18:21 p6eval rakudo d8f1a1: OUTPUT«True␤»
18:21 benabik gfldex: You can use `say so *` instead of `say (*).Bool
18:22 gfldex r: say so.^WHAT;
18:22 p6eval rakudo d8f1a1: OUTPUT«===SORRY!===␤Cannot use .^ on a non-identifier method call at line 2, near ";"␤»
18:22 gfldex r: say (&so).^WHAT;
18:22 spider-mario joined #perl6
18:22 p6eval rakudo d8f1a1: OUTPUT«===SORRY!===␤Cannot use .^ on a non-identifier method call at line 2, near ";"␤»
18:22 gfldex what is "so"?
18:23 benabik Basically turns something into a boolean.
18:24 benabik r: say so any(1,2,3) == 2
18:24 p6eval rakudo d8f1a1: OUTPUT«True␤»
18:24 gfldex what is it's precedence?
18:24 gfldex (what is the question that i should have asked)
18:25 benabik Fairly low?  Not sure.
18:26 gfldex i will stick with ().Bool then :)
18:26 benabik It's fairly low precedence.  The high prec version is ?.
18:27 benabik http://tablets.perl6.org/appendix-​b-grouped.html#table-of-precedence
18:29 gfldex after consulting that table i still wont do so
18:30 GlitchMr http://paste.uk.to/f1a888c7
18:30 GlitchMr "in" operator from Python.
18:30 GlitchMr Now in Perl 6
18:30 GlitchMr (I like abusing mutable grammars :P)
18:30 benabik I find "say so THING" more readable than "say (THING).Bool"
18:30 benabik But it's up to you, I suppose.
18:31 benabik It's not really abuse when that's what it's designed for.
18:32 gfldex r: say so (1,2,3) >>==<< (1,2,3);
18:32 p6eval rakudo d8f1a1: OUTPUT«True␤»
18:32 gfldex r: say so (1,2,3) >>==<< (1,2,4);
18:32 p6eval rakudo d8f1a1: OUTPUT«True␤»
18:33 spider-mario r: say so (1, 2, 3) Z== (1, 2, 3)
18:33 p6eval rakudo d8f1a1: OUTPUT«True␤»
18:33 spider-mario r: say so all((1, 2, 3) Z== (1, 2, 3))
18:33 p6eval rakudo d8f1a1: OUTPUT«True␤»
18:33 spider-mario r: say so all((1, 2, 3) Z== (1, 2, 4))
18:33 p6eval rakudo d8f1a1: OUTPUT«False␤»
18:33 spider-mario r: say so all((1, 2, 3) Zeqv (1, 2, 3))
18:33 p6eval rakudo d8f1a1: OUTPUT«True␤»
18:33 spider-mario r: say so all((1, 2, 3) Zeqv (1, 2, 4))
18:33 p6eval rakudo d8f1a1: OUTPUT«False␤»
18:34 gfldex so is narrower then hyperops, that's a bug waiting to happen
18:34 spider-mario I’m not sure that’s the issue
18:34 spider-mario r: say (1, 2, 3) »==« (1, 2, 4)
18:35 p6eval rakudo d8f1a1: OUTPUT«True True False␤»
18:35 spider-mario say so (True, True, False)
18:35 spider-mario r: say so (True, True, False)
18:35 p6eval rakudo d8f1a1: OUTPUT«True␤»
18:35 gfldex r: say so True, True, False;
18:35 p6eval rakudo d8f1a1: OUTPUT«TrueTrueFalse␤»
18:37 gfldex since anything in perl6 can coerce into Bool (as i had to learn the hard way) I prefere to stick stuff into parens if I want to have a bool
18:37 spider-mario say so 45 «+» 2
18:37 spider-mario r: say so 45 «+» 2
18:37 p6eval rakudo d8f1a1: OUTPUT«True␤»
18:37 gfldex that one can't be false
18:37 spider-mario looks right to me
18:37 spider-mario yes, but
18:37 spider-mario r: say ?45 «+» 2
18:37 p6eval rakudo d8f1a1: OUTPUT«3␤»
18:38 gfldex yes, that's even wronger :)
18:38 benabik r: say so 0 «+» 2
18:38 p6eval rakudo d8f1a1: OUTPUT«True␤»
18:38 spider-mario “so” was correctly executed after «+»
18:38 benabik say so 0
18:38 benabik r: say so 0
18:38 p6eval rakudo d8f1a1: OUTPUT«False␤»
18:47 pmichaud r:  say so (False, False, False)   # note
18:47 p6eval rakudo d8f1a1: OUTPUT«True␤»
19:10 moritz r: say so Mu xx 2
19:10 p6eval rakudo d8f1a1: OUTPUT«True␤»
19:15 tadzik . o O ( 2+2*2. Better written as 22+ )
19:18 moritz does anybody know how to trigger the die() in src/core/Str.pm line  784?
19:18 moritz die "Don't know how to handle a {.WHAT.gist} as a substitution key";
19:18 moritz that's part of the Str.trans code
19:19 moritz r: "a".trans({} => "a")
19:19 p6eval rakudo d8f1a1:  ( no output )
19:19 moritz r: class A { }; "a".trans(A.new => "a")
19:19 p6eval rakudo d8f1a1: OUTPUT«No such method 'comb' for invocant of type 'A'␤  in method trans at src/gen/CORE.setting:4203␤  in block <anon> at /tmp/rt1k985grN:1␤␤»
19:19 moritz r: class A { method comb() { self } }; "a".trans(A.new => "a")
19:19 p6eval rakudo d8f1a1: OUTPUT«Too many positional parameters passed; got 2 but expected 1␤  in method comb at /tmp/898GkpBuFW:1␤  in method trans at src/gen/CORE.setting:4203␤  in block <anon> at /tmp/898GkpBuFW:1␤␤»
19:19 moritz r: class A { method comb(*@) { self } }; "a".trans(A.new => "a")
19:19 p6eval rakudo d8f1a1: OUTPUT«Index out of range. Is: 1, should be in 0..0␤  in method Str at src/gen/CORE.setting:9365␤  in method Stringy at src/gen/CORE.setting:711␤  in sub prefix:<~> at src/gen/CORE.setting:1002␤  in method trans at src/gen/CORE.setting:4205␤  in block <anon> at /tmp/dllTc…
19:20 cognominal joined #perl6
19:20 moritz 'cause I just made a typed exception out of it, and now I don't know how to test it :/
19:24 timotimo r: sub infix:[''] { $^a ~ $^b }; sub a { 'a' }; sub b { 'b' }; a() + b();
19:24 p6eval rakudo d8f1a1: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏a' (indicated by ⏏)␤  in method Numeric at src/gen/CORE.setting:9364␤  in sub infix:<+> at src/gen/CORE.setting:2406␤  in sub infix:<+> at src/gen/CORE.setting:2406␤  in block …
19:24 timotimo oh, right
19:24 timotimo r: sub infix:[''] { $^a ~ $^b }; sub a { 'a' }; sub b { 'b' }; a() ~ b();
19:24 p6eval rakudo d8f1a1:  ( no output )
19:24 timotimo well, that's not helpful
19:24 sorear moritz: are you even sure it's reachable?
19:24 timotimo r: sub infix:[''] { $^a ~ $^b }; sub a { 'a' }; sub b { 'b' }; say a() ~ b();
19:24 p6eval rakudo d8f1a1: OUTPUT«ab␤»
19:24 timotimo interesting
19:24 moritz sorear: no, not sure
19:25 sorear r: "foo".trans("x" => * + *)
19:25 p6eval rakudo d8f1a1: OUTPUT«WhateverCode.new() is not a Pair␤  in method trans at src/gen/CORE.setting:4214␤  in block <anon> at /tmp/1m7gFQEaLx:1␤␤»
19:25 sorear r: "foo".trans("x" => sub () { })
19:25 p6eval rakudo d8f1a1:  ( no output )
19:26 sorear r: "foo".trans(Any => Any)
19:26 p6eval rakudo d8f1a1:  ( no output )
19:26 sorear r: say "foo".trans("o" => Any)
19:26 p6eval rakudo d8f1a1: OUTPUT«No such method 'comb' for invocant of type 'Any'␤  in method trans at src/gen/CORE.setting:4203␤  in block <anon> at /tmp/7ebSY_57sh:1␤␤»
19:26 sorear r: say "foo".trans(Any => "o")
19:26 p6eval rakudo d8f1a1: OUTPUT«foo␤»
19:26 sorear r: say "foo".trans(Any.new => "o")
19:26 p6eval rakudo d8f1a1: OUTPUT«No such method 'comb' for invocant of type 'Any'␤  in method trans at src/gen/CORE.setting:4203␤  in block <anon> at /tmp/nNFMkI1ejp:1␤␤»
19:28 sorear r: say "foo".trans([Any.new] => [Any.new])
19:28 p6eval rakudo d8f1a1: OUTPUT«Don't know how to handle a Pair() as a substitution key␤  in method triage_substitution at src/gen/CORE.setting:4167␤  in method next_substitution at src/gen/CORE.setting:4184␤  in method trans at src/gen/CORE.setting:4234␤  in block <anon> at /tmp/oEZmJdP9oM:1␤␤»…
19:28 sorear moritz: I think have a winner
19:29 sorear moritz: incidentally, the type is _always_ given as Pair()
19:29 moritz sorear++
19:30 sorear r: say Whatever ~~ Cool
19:30 p6eval rakudo d8f1a1: OUTPUT«False␤»
19:30 sorear r: say "foo".trans([*]=>1) # probably minimal
19:30 p6eval rakudo d8f1a1: OUTPUT«Index out of range. Is: 1, should be in 0..0␤  in method Str at src/gen/CORE.setting:9365␤  in method Stringy at src/gen/CORE.setting:711␤  in sub prefix:<~> at src/gen/CORE.setting:1002␤  in method trans at src/gen/CORE.setting:4205␤  in block <anon> at /tmp/_wKtA…
19:30 sorear oh, parse funnyiness
19:31 sorear r: say "foo".trans(*,=>1)
19:31 p6eval rakudo d8f1a1: OUTPUT«===SORRY!===␤Preceding context expects a term, but found infix > instead␤at /tmp/s1kSSA51Mt:1␤»
19:31 sorear r: say "foo".trans(*, =>1)
19:31 p6eval rakudo d8f1a1: OUTPUT«===SORRY!===␤Preceding context expects a term, but found infix => instead␤at /tmp/STZ2Ucczpt:1␤»
19:31 sorear r: say "foo".trans([* ]=>1)
19:31 p6eval rakudo d8f1a1: OUTPUT«Index out of range. Is: 1, should be in 0..0␤  in method Str at src/gen/CORE.setting:9365␤  in method Stringy at src/gen/CORE.setting:711␤  in sub prefix:<~> at src/gen/CORE.setting:1002␤  in method trans at src/gen/CORE.setting:4205␤  in block <anon> at /tmp/ELE4s…
19:31 jnthn std: say "foo".trans(*, =>1)
19:31 p6eval std f179a1b: OUTPUT«Use of uninitialized value $x in pattern match (m//) at STD.pm line 66577.�Use of uninitialized value $x in concatenation (.) or string at STD.pm line 66616.�[31m===[0mSORRY![31m===[0m�Preceding context expects a term, but found infix => instead at /tmp/RKKuS1rDv…
19:31 dalek rakudo/nom: 6d966bd | moritz++ | src/core/ (2 files):
19:31 dalek rakudo/nom: typed exception for Str.trans
19:31 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6d966bd4e7
19:31 dalek roast: 7d371b6 | moritz++ | S32-exceptions/misc.t:
19:31 dalek roast: test X::Str::Trans::IllegalKey, sorear++
19:31 dalek roast: review: https://github.com/perl6/roast/commit/7d371b61e1
19:32 sorear moritz: does exception typing have a stealably stable kernel?
19:33 moritz sorear: well, everything subclasses from Exception, which is pretty stable, but also pretty rakudo-specific
19:33 moritz sorear: rakudo has some hacks to propagate custom types through parrot's Exception PMC, which you don't need either
19:33 moritz n: class A { }; try die A.new; say $!.WHAT
19:34 p6eval niecza v18-2-gea3d97a: OUTPUT«A()␤»
19:34 moritz oh, that part is already supported
19:34 moritz rakudo wraps all non-Exception objects in X::AdHoc, so that you can access .backtrace
19:34 moritz (that's spec too)
19:36 moritz n: say 1.^name
19:36 p6eval niecza v18-2-gea3d97a: OUTPUT«Int␤»
19:40 Araq left #perl6
19:47 snearch joined #perl6
20:43 zby_home joined #perl6
20:45 dalek rakudo/nom: 9d2ddde | moritz++ | src/core/ (2 files):
20:45 dalek rakudo/nom: another typed exception for Str.trans
20:45 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9d2ddde08e
20:46 dalek roast: 7b9ba33 | moritz++ | S32-exceptions/misc.t:
20:46 dalek roast: test X::Str::Trans::InvalidArg
20:46 dalek roast: review: https://github.com/perl6/roast/commit/7b9ba336e3
20:46 moritz 2 remaining exceptions to be ported.
20:48 dalek rakudo/map: ad22611 | pmichaud++ | src/core/MapIter.pm:
20:48 dalek rakudo/map: Revert commit af0d2e1 so that MapIter makes repeated calls to .munch().
20:48 dalek rakudo/map: This makes .map horribly slow again for loops of 1..BIGVAL, but we'll
20:48 dalek rakudo/map: hopefully improve that in subsequent commits.
20:48 dalek rakudo/map: review: https://github.com/rakudo/rakudo/commit/ad226113f6
20:48 dalek rakudo/map: 6c20932 | pmichaud++ | src/ (5 files):
20:48 dalek rakudo/map: Initial moves to use QRPA in Rakudo Lists.
20:48 dalek rakudo/map: review: https://github.com/rakudo/rakudo/commit/6c2093218a
20:49 moritz n: sub f (*@a) { say 'called f'; 3 }; say <a b c>.map: &f
20:49 p6eval niecza v18-2-gea3d97a: OUTPUT«Potential difficulties:â�¤  @a is declared but not used at /tmp/2hEH1Yxpj2 line 1:â�¤------> [32msub f (*[33mâ��[31m@a) { say 'called f'; 3 }; say <a b c>.m[0mâ�¤â�¤called fâ�¤3â�¤Â»
20:49 moritz r: sub f (*@a) { say 'called f'; 3 }; say <a b c>.map: &f
20:49 p6eval rakudo 6d966b: OUTPUT«This type cannot unbox to a native integer␤  in method reify at src/gen/CORE.setting:5050␤  in method reify at src/gen/CORE.setting:4945␤  in method reify at src/gen/CORE.setting:4945␤  in method gimme at src/gen/CORE.setting:5332␤  in method eager at src/gen/CORE.…
20:49 moritz niecza is correct here, I think
20:49 pmichaud I should've noted in the commit message that just switching List to use QRPA instead of RPA gains back about 95% of the speed lost by ad22611
20:50 moritz map with a slurpy is simply a call with the whole list as an argument to the funciton
20:50 moritz pmichaud: wow
20:51 pmichaud > sub f (*@a) { say 'called f'; 3 };  say <a b c>.map: &f
20:51 pmichaud called f
20:51 pmichaud 3
20:51 pmichaud that's locally in my 'map' branch.
20:52 pmichaud so I'm guessing ad22611 fixed whatever bug is showing up in p6eval
20:52 moritz \o/
20:53 felher What is QRPA and RPA?
20:54 pmichaud RPA == ResizablePMCArray
20:54 pmichaud that's Parrot's basic array type for holding a variable list of objects
20:54 pmichaud QRPA == Pm's rewrite of RPA so that it has much faster shift and unshift operations
20:55 felher Okay, so RPA is written in C i guess? QRPA is written in?
20:55 moritz also C
20:56 felher Okay. Thanks you two :)
21:07 raiph joined #perl6
21:08 pmichaud afk, walk
21:08 raiph i'm thinking of creating a perl6 subreddit. anyone think it's a bad idea?
21:08 tadzik isn't there one already?
21:09 raiph oh
21:09 raiph heh. well that answers that.
21:13 cognominal joined #perl6
21:17 zby_home_ joined #perl6
21:42 pupoque joined #perl6
22:00 b1rkh0ff joined #perl6
22:20 dalek rakudo/map: 91e59f1 | pmichaud++ | src/core/ListIter.pm:
22:20 dalek rakudo/map: Code cleanup: Replace some nqp:: ops with things the inliner can now handle.
22:20 dalek rakudo/map: review: https://github.com/rakudo/rakudo/commit/91e59f17ba
22:22 timotimo in this mail i'm reading here, a person says MMD and "method keyword" are among their favourite perl6 features. what's MMD and what's so special about the method keyword? (answer or link would be fine for either)
22:23 benabik MMD is "multi method dispatch", IIRC
22:25 timotimo ah, ok. that indeed is cool (especially when combined with pattern matching)
22:31 felher oha. QRPA looks quite object orientated for being C :)
22:33 benabik Object oriented is a programming style.  It can be done in any language.  Granted, some make it easier than others.
22:33 benabik Also, Parrot has a pre-processor that takes C and sets up all the objecty stuff.
22:34 felher Yeah. With a pre-processor OOP can even be in done in no language...
22:35 felher One may argue that you then define your own language :)
22:47 felher pmichaud: this may be and odd/noob question: In your QRPA-Code, when you resize your array, why do you only align to 4096 element boundaries for those little arrays?
22:48 benabik You can do OO in pure C.  There's a lot of manual mucking around with function pointers, and some very long function names, but it can be done.  :-)
22:50 felher benabik: yeah, i know. I tried it more than once. In about half of the time i noticed that it wasn't worth the effort. Only afterwards, of course :)
22:51 felher benabik: but if parrot gives one such a nice interface and you don't have to build it yourself, thats of course a different story :)
22:51 benabik felher: Well, one could argue that the Linux kernel uses OO in C to pretty good effect.  But it's really only worth the effort in something so large.
22:52 felher benabik: yeah. I totally agree in every part of your statement :)
22:55 dalek niecza/non-bootstrap: fb31c9b | sorear++ | lib/ (3 files):
22:55 dalek niecza/non-bootstrap: Finish RxOp
22:55 dalek niecza/non-bootstrap: review: https://github.com/sorear/niecza/commit/fb31c9b00c
22:56 sorear remarkable, RxOp.pm6: 725 lines, RxOp.cs: 724 lines
22:56 spider-mario GTK uses OO in C.
22:56 sorear I guess the Niecza mid-end was never a particularly good fit to Perl 6's strengths
22:56 spider-mario (it might be one of the most cited examples)
22:59 felher spider-mario: right. i used glib/libpurple once :)
22:59 TimToady I'm sure you could find a line to trim somewhere in the Perl 6 :)
23:00 TimToady or you could always split one of the lines in the c# :)
23:01 sorear sure, and if you count characters it comes out 25087 to 20143 in favor of p6
23:01 diakopter I bet both files could be squinched into one line
23:01 sorear but I came into this project fearing a 5-10x code size blowup, and it hasn't materialized
23:55 TimToady it might be useful if the compiler warns on attempts to evaluate multiple values in a boolean context; "did you mean any() or all()?"
23:59 sorear what do you mean by evaluating multiple values?

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo