»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
00:11 spider-mario left 00:15 UncleFester6 joined
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
Anything I might need to know or be doing wrong?
00:22 rafl left 00:25 rafl joined 00:27 Maddingue joined 00:50 SHODAN left, Yappocall left, groky left, zamolxes left 00:54 SHODAN joined, eiro joined, sjn joined, Yappocall joined, groky joined, zamolxes joined
dalek p/qrpa: 25c0b53 | pmichaud++ | / (3 files):
Add initial version of QRPA, a quicker ResizablePMCArray implementation.
01:15
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:16
Looking to file rakudobug tomorrow after some further checking. 01:17
TimToady UncleFester6++ 01:18
diakopter pmichaud: bleep Bloop :) 01:22
cow
oh, you might not've written that :) 01:23
01:23 sftp joined 01:24 sftp_ left 01:40 Guest63694 left
pmichaud diakopter: ? 01:40
01:47 aesundstrom joined 01:52 aesundstrom left
pmichaud 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
pmichaud diakopter: I mostly copied the .t from the parrot repo -- it's a modified version of resizablepmcarray.t
I barely looked at most of the tests :) 01:56
diakopter I figured that eventually
pmichaud eventually we may nqp-ize the test file anyway
diakopter in splice, is offset>0 by far the most common case? 01:57
or offset==0 01:58
pmichaud I suspect there's not a bias either way
the offset==0 case occurs when you want to delete a lot of elements from the beginning of the array
01:58 tyatpi joined
pmichaud (or replace them) 01:58
dalek ecza/non-bootstrap: 53c98f4 | sorear++ | lib/Op.cs:
Op, part 4
01:59
pmichaud various versions of Rakudo have used splice as a mass-element-deleter
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?
pmichaud not that I'm aware of
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!?
diakopter did you test pop/push
pmichaud pop/push should be about the same speed.... I can test it
02:01 UncleFester6 left
pmichaud TimToady: shift is 1000x faster, I think. 02:02
TimToady well, the shift is 100x
you're right, I misread
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
ah ok
sorear thought "<pmichaud> 1000x faster" meant same O(), better constants
pmichaud no, I meant only in that test. 02:04
...responding to TimToady's 100x comment :)
gist.github.com/2860973 # same test for push/pop instead of unshift/shift 02:05
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:06
anyway, qrpa is approx same speed as rpa for push/pop, which is as I would expect. 02:07
afk, dinner 02:08
[Coke] pmichaud++ moritz++ 02:22
02:25 tyatpi left 02:33 tokuhiro_ joined 02:41 icwiener left 02:46 Chillance left 02:55 crab2313 joined 03:11 tokuhiro_ left
dalek ecza/non-bootstrap: 9802ad4 | sorear++ | lib/Op.cs:
Op, final part
03:33
03:43 xinming left 03:54 xinming joined 03:57 pupoque left 04:13 japhb joined 05:00 kaare_ joined 05:14 cbk joined 05:15 cbk left, cbk joined 05:47 Entonian joined, Entonian left 05:54 cbk left 06:02 JimmyZ_ joined 06:23 Facefox joined 06:30 GlitchMr joined 06:32 cbk joined 06:38 birdwindupbird joined 06:58 birdwindupbird left 06:59 birdwindupbird joined
GlitchMr Why Perl 6 is amazing programming language - paste.uk.to/db2079d7 07:04
07:09 fgomez left, ashleydev joined
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 07:30 ashleydev left
GlitchMr What is "&"? 07:35
07:35 cognominal left
sorear conjunction 07:35
a & b is supposed to never match
it looks for character that is both a and b 07:36
07:36 cognominal joined
GlitchMr niecza> 'ab' ~~ / . & . / 07:38
#<match from(0) to(2) text(ab) pos([].list) named({}.hash)>
So, it should make one-character match?
sorear yes
07:38 ashleydev joined
sorear r: say ('ab' ~~ / . & . /) 07:39
shachaf Perl 6 has & in regexps?
p6eval rakudo acf903: OUTPUT«q[a]␤␤»
shachaf I've always wanted & in regexps.
sorear shachaf: yes, but only in PEG mode
regexes which contain & cannot be compiled to DFAs 07:40
GlitchMr Is it syntactic sugar for lookaheads?
sorear (well, technically they can, but the problem is PSPACE-hard)
GlitchMr: basically yes
GlitchMr: however, & requires the length to match, so [.. & .] will never match 07:41
GlitchMr: it's hard to get that with lookahead syntax
shachaf Neat.
07:42 pupoque joined
GlitchMr / h. & .i / is /hi/, I guess? 07:42
sorear Yes 07:43
GlitchMr Heading: Nothing is illegal 07:44
The empty pattern is now illegal.
ok...
sorear it's a pun. 07:45
geekosaur use/mention distinction, ho... 07:46
GlitchMr oh... I get it
07:46 wamba joined
GlitchMr It's not everything is allowed, is that if you will put nothing, it's illegal. 07:47
lol
well, ok, my grammar sucks
Also, how can I make "<<" infix? 07:50
sorear n: say 1 +< 5
p6eval niecza v18-2-gea3d97a: OUTPUT«32␤»
GlitchMr Well, I want to create infix.
:infix<<<> obviously doesn't work 07:51
dalek ecza/non-bootstrap: 7b23bf5 | sorear++ | / (3 files):
RxOp, part 1
GlitchMr Anything I can think of doesn't work
sorear try :infix« << » 07:52
n: sub infix:['<<']($l,$r) {say $l; say $r}; 1 << 2
p6eval niecza v18-2-gea3d97a: OUTPUT«1␤2␤»
sorear n: sub infix:«<<»($l,$r) {say $l; say $r}; 1 << 2
p6eval niecza v18-2-gea3d97a: OUTPUT«1␤2␤»
sorear n: sub infix:< \<\< >($l,$r) {say $l; say $r}; 1 << 2
p6eval niecza v18-2-gea3d97a: OUTPUT«===SORRY!===␤␤Unsupported use of << to do left shift; in Perl 6 please use +< or ~< at /tmp/DgrNjJ3udR line 1:␤------> x:< \<\< >($l,$r) {say $l; say $r}; 1 <<⏏ 2␤␤Potential difficulties:␤ &infix:<\<\<> is declared but …
sorear n: sub infix:<<< << >>>($l,$r) {say $l; say $r}; 1 << 2 07:53
p6eval niecza v18-2-gea3d97a: OUTPUT«===SORRY!===␤␤Variable $l is not predeclared at /tmp/HucQCmWFUd line 1:␤------> sub infix:<<< << >>>(⏏$l,$r) {say $l; say $r}; 1 << 2␤␤Variable $r is not predeclared at /tmp/HucQCmWFUd line 1:␤------> sub infix:<<< …
sorear I think all four should have worked
but maybe the first two will help you, GlitchMr 07:54
sleep&
GlitchMr sorear, paste.uk.to/13df6adc
What I am doing wrong?
07:54 AdmiralA joined
GlitchMr Oh wait, it should be multi sub 07:54
sorear No, multi is not needed
I think this is a rakudobug
GlitchMr It's niecza
niecza> sub infix:['<<'] ( Cout $cout, Str $string ) { print $string; return $cout } 07:55
sorear ah
maybe all you're doing wrong is using the repl and it would work fine in a file
AdmiralA Hi, I'm a shell scripting/UNIX/python/C/all over the place guy who just found out that perl 6 exists!
I had no idea it went back all the way to 2001 or so!
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
AdmiralA: welcome.
AdmiralA sorear: o/
is perl 6 approaching any interesting milestone?
sorear GlitchMr: yeah, there's a problem with the REPL - definitely warrants a bug report
GlitchMr paste.uk.to/4cb82906 07:57
sorear GlitchMr: but it works find in p6eval which means it will work fine in a file
GlitchMr Ok, this works
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
AdmiralA: perl 6 ... we've still got major quality of implementation issues to iron out
AdmiralA Is the language syntax frozen? 07:59
or is that being worked out too?
sorear Not frozen, but very stable
AdmiralA That sounds promising :)
sorear n: /x ** y/
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:␤------> /x ** y⏏/␤␤»
sorear that's a recent syntax change; as you see the older syntax is supported with a warning 08:00
GlitchMr github.com/sorear/niecza/issues/130
Ok, bug inserted
sorear that's a p6-style regex, like perl 5 /x(?:yx)*/
GlitchMr: thanks 08:01
now I must sleep& for real.
GlitchMr perl6: my %hash = 'a' => 'b', 'c' => 'd'; print %hash<c> 08:05
p6eval rakudo acf903, niecza v18-2-gea3d97a, pugs: OUTPUT«d»
08:12 xinming left 08:14 AdmiralA left
GlitchMr What if I would like to make <> operator which would work like in Perl 5? 08:15
How can I specify something which works like term
08:18 birdwindupbird left
tadzik GlitchMr: you mean lines()? 08:19
GlitchMr Well, but let's say that I want <> operator to read from STDIN or files in ARGV. 08:20
08:20 birdwindupbird joined
GlitchMr How can I specify something that can be used like normal number 08:20
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…
GlitchMr what lines?
Well, ok
tadzik r: .say for $*IN.lines();
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…
GlitchMr What about something more generic
tadzik same thing
any filehandle has .lines(), iirc 08:22
GlitchMr I want @ to return value "42"
For example, @ + @
tadzik why would you do that? :) 08:26
GlitchMr I don't know, but it would be nice abuse of Perl 6 grammar 08:28
moritz \o 08:29
diakopter hi
GlitchMr sub term:<@> {42} 08:30
ok, I've done it
tadzik n: sub term:<@> {42}; say @ + @ 08:31
p6eval niecza v18-2-gea3d97a: OUTPUT«84␤»
tadzik crazy
moritz \o/ 08:32
r: sub term:<@> {42}; say @ + @
p6eval rakudo acf903: OUTPUT«===SORRY!===␤Cannot add tokens of category 'term'␤at /tmp/n81OSvGcO2:1␤»
GlitchMr paste.uk.to/e92a491c 08:33
Would it be possible to make sub term:<@> global, but $answer not.
paste.uk.to/b27e4c81 08:34
Just like in this JavaScript example
Ok, already done, I've used state. 08:35
Now I've @ variable which is magical
... 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
GlitchMr niecza> : 08:37
42
niecza> : = 2
2
This is awesome
Celelibi is there some template-like feature in perl6? 08:40
tadzik what sort of template do you need?
you mean like C++ templates or HTML::Templates? 08:41
Celelibi Like type-generic but still type-checked. 08:42
Like the C++ templates. 08:43
moritz parametric roles can help you then
Celelibi Or Ada Generic.
tadzik right
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 08:46 crab2313 joined
crab2313 n: sub term:<@> {21}; @ + @ + @; 08:52
p6eval niecza v18-2-gea3d97a: ( no output )
crab2313 n: sub term:<@> {21}; say @ + @ + @;
p6eval niecza v18-2-gea3d97a: OUTPUT«63␤»
08:57 birdwindupbird left
crab2313 r: sub infix:<加>($a, $b) {$a + $b} ; say 1 加 2; 08:57
p6eval rakudo acf903: OUTPUT«3␤»
tadzik hmm 08:58
08:58 wamba left
moritz r: my $x; { $OUTER::x := 5 }; say $x 09:02
p6eval rakudo acf903: OUTPUT«5␤»
moritz r: my $x; { $OUTER := 5 }; say $x
p6eval rakudo acf903: OUTPUT«===SORRY!===␤Variable $OUTER is not declared␤at /tmp/jZSZ7D7An7:1␤»
moritz r: my $x; { OUTER := 5 }; say $x
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, xdbr left 09:22 xdbr joined 09:23 crab2313 left 09:44 wamba joined 09:48 brrt joined
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␤»
GlitchMr n: sub infix<plus> { #`(Cobol programming in Perl) $^a + $^b } print 2 plus 2
p6eval niecza v18-2-gea3d97a: OUTPUT«===SORRY!===␤␤Malformed block at /tmp/uHmV9oDgvo line 1:␤------> sub infix⏏<plus> { #`(Cobol programming in Perl) $␤␤Parse failed␤␤»
timotimo n: sub infix<plus> { #`(Cobol programming in Perl) $^a + $^b }; print 2 plus 2 09:57
09:57 JimmyZ_ left
p6eval niecza v18-2-gea3d97a: OUTPUT«===SORRY!===␤␤Malformed block at /tmp/wrX2BEBWRq line 1:␤------> sub infix⏏<plus> { #`(Cobol programming in Perl) $␤␤Parse failed␤␤» 09:57
GlitchMr perl6: sub infix:<plus> { #`(Cobol programming in Perl) $^a + $^b } print 2 plus 2
timotimo :o
p6eval pugs: OUTPUT«*** ␤ Unexpected end of input␤ expecting "use", statements or "}"␤ at /tmp/lmJl_k9t7Y line 2, column 1␤»
..niecza v18-2-gea3d97a: OUTPUT«===SORRY!===␤␤Strange text after block (missing comma, semicolon, comment marker?) at /tmp/_1aDwfuJ71 line 1:␤------> `(Cobol programming in Perl) $^a + $^b }⏏ print 2 plus 2␤␤Parse failed␤␤»
..rakudo acf903: OUTPUT«===SORRY!===␤Confused␤at /tmp/H6usy4mei7:1␤»
GlitchMr perl6: sub infix:<plus> { #`(Cobol programming in Perl) $^a + $^b }; print 2 plus 2
p6eval pugs: OUTPUT«*** ␤ Unexpected end of input␤ expecting "use", statements or "}"␤ at /tmp/rpZqaHK4UU line 2, column 1␤»
..rakudo acf903, niecza v18-2-gea3d97a: OUTPUT«4»
GlitchMr Why I need semicolon after sub? 09:58
moritz because statements are separated with ; 09:59
you can leave it out if a } is followed by a newline
s/if/where/
GlitchMr Meaningless linebreaks? 10:00
This isn't JavaScript, Ruby or Python... 10:01
But I guess that special cases are fun
moritz well 10:03
would you want to write a semicolon after if $foo { } ?
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.
(Well, except for do { } while () statement)
moritz but only for certain constructs
GlitchMr Perl golf would use comma operator anyways... (which isn't comma operator, but who cares?) 10:05
Comma operator is hack anyways
en.wikipedia.org/wiki/Comma_operator
Is there any real use for it aside of JavaScript code compression 10:06
moritz for (int i = 0, int j = 1; i + j < 2 * max; i++, j++) 10:07
GlitchMr And aside for(;;) statement 10:08
Because I think that comma operator was made for this statement as hack
But why you could use it outside of this statement?
Actually, whole for(;;) is a hack. You can easily do it using while() statement (except for small problem with continue (next in Perl)) 10:10
dalek kudo/nom: 452cdbc | moritz++ | src/ (4 files):
small typed exceptions refactor

in Perl6::World.throw, mix in X::Comp into exception classes which do not already conform to X::Comp. This means that we can have exceptions that are both thrown from run time and from compile time, and still DWIM with their backtraces.
Rename X::Bind::Comp to X::Bind, and throw it at run time from PseudoStash
10:11
ast: d9262ef | moritz++ | S32-exceptions/misc.t:
[throws_ok] allow subtypes; Liskov applies

also test OUTER := 5 exception
10:12
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 10:19 cognominal left
GlitchMr www.perl6.org/compilers/ 10:19
That list of compilers is huge 10:20
Shouldn't "Feature matrix" and "Supplementals" be in one column and "Compilers" use two columns?
moritz +1 10:21
10:21 cognominal___ joined
tadzik sounds sane 10:22
10:24 cognominal_ left, spider-mario joined
GlitchMr Except I don't know how to install mowyw 10:26
moritz cpanm App::Mowyw
GlitchMr So it's on CPAN :) 10:27
Nice.
Also, it doesn't seem that cpanm command exists on my PC, but that's ok. 10:28
moritz cpan App::cpanminus
tadzik or curl -L cpanmin.us | perl - App::cpanminus 10:29
to go full hardcore :)
moritz DA
GlitchMr Webpage which is Perl script O_o
moritz sorry
perlbrew install-cpanm # for the *real* hackers :-) 10:30
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:31
I guess it's CRLF issue or something 10:32
^M$ 10:33
CRLF?
moritz vim shows a CR as ^M, yes 10:34
GlitchMr Should I fix it?
moritz if you feel like 10:35
dalek href="https://perl6.org:">perl6.org: e6962c0 | GlitchMr++ | source/archive/talks/200 (2 files):
Change CRLF into LF to be consistent with rest of repository.
GlitchMr github.com/perl6/perl6.org/commit/...3896f6?w=1 10:36
ok...
moritz if you only change whitespace, and append ?w=1 to the URL, it shows you nothing 10:38
no surprise there
GlitchMr Also, GitHub for Windows annoys me 10:39
moritz then don't use it
GlitchMr When using shell from it, perl claims it's 5.8.8
O_o
moritz just install msysgit or whatever it's called
GlitchMr I've removed perl from /usr/bin and now it works
I guess that msysgit is the problem because it includes Perl 5.8.8
This is perl 5, version 14, subversion 2 (v5.14.2) built for MSWin32-x64-multi-thread 10:40
I should update my Perl
Perl 5.16.0 was released...
10:40 renormalist joined 10:44 mucker joined
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
Sounds like huge backwards compatibility break...
moritz so 5.18 will warn, and 5.20 will die if you don't \ it?
GlitchMr Many programming languages implement this 10:46
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:47
moritz huh? 10:48
{} already have special meaning in regexes
GlitchMr wiki.ecmascript.org/doku.php?id=har...eb_reality 10:50
dalek kudo/nom: d0b6640 | moritz++ | src/core/ (2 files):
X::Temporal::InvalidFormat
10:53
ast: a1248db | moritz++ | S32-exceptions/misc.t:
test X::Temporal::InvalidFormat
11:04 JimmyZ joined 11:10 mucker left, mucker joined
jnthn afternoon o/ 11:10
moritz \jnthn
jnthn
.oO( jnthn has escaped! )
11:11
11:12 whiteknight joined
mucker ugh toll allow say, lua as a backend ? 11:12
* is nqp
11:12 whiteknight is now known as Guest29518
moritz still cannot parse that question 11:12
mucker crp is nql generic enough to allow lua a backend 11:13
*nqp !
moritz yes, I think so
mucker is intoxicated
ok
jnthn EWAYPASTBALMERPEAK 11:14
mucker my co-worked was asking on benchmarks the other day ... parrot vm < lua vm < java vm < java vm < clr vm right ? 11:17
*co-worker ... lua vm < js vm 11:18
brrt mucker: you should test that stuff really :-) 11:19
and it depends mightily on what you require
moritz there are multiple JVMs and multiple CLR VMs and multiple JS vms
and very different work loads
brrt for instance, if you use threads you will get really different pictures from when you do not
sometimes, v8 (javascript) can run faster than the output from gcc 11:20
but most of the times, it will not
dalek kudo/nom: 729d90a | moritz++ | src/core/ (2 files):
typed exceptions for Temporal leap second checking
mucker want's do so such for perl6 but no free time :(
dalek ast: c04814d | moritz++ | S32-exceptions/misc.t:
test leap second exception
moritz it also depends on how GC-heavy your workload is, and what kind of GC pressure it builds up etc. 11:21
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
*we get
moritz and what do the numbers tell you if you do that?
"In a totally contrived setting, $vm-a is faster than $vm-b"?
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
(or one of the points)
brrt malloc and free are not allways 'fast' 11:24
moritz and not always slow either :-)
mucker i remembere reading lots of blog posts saying how gc in parrot is slow
brrt malloc()-ing 1000s of smallish objects from the heap only to free them at the end of a subroutine is slow 11:25
a GC with a pool will be faster in many cases then, because it can clean 'm up in one swoop
mucker ^ that's what I had in mind
brrt which is why many real programs written in an unmanaged language manage their memory in a pool fashion 11:26
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'
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 ....
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
moritz ... and if you don't try to implement Perl 6 on top of it :-) 11:30
mucker perl6 should have been done in c++ now with all the threading support and all it seems like a right fit ? /heresy/ 11:31
moritz mucker: you'd still need a runtime environment 11:32
mucker moritz: what is runtime env ? always wanted to ask 11:33
moritz mucker: something like a virtual machine
mucker moritz: then like perl5 we could settle for a stacky vm right ? 11:34
moritz we could
and niecza does, quite successfully
mucker that nice to hear
brrt runtime enviroment is (at the very least) a set of routines to do the 'minimal' stuff 11:35
low-level routines without which the language cannot exists
exist
11:36 tokuhiro_ joined
brrt i.e.: malloc() and free() and exit() for C 11:36
Timbus does rakudo still use parrots pmc types
mucker ok silly question times now :) /hope i am not wastime too much of your time/ how do u implement op prededence ?
Timbus like hash, (pmc)array, etc?
mucker *nqp 11:37
Timbus just wondering how much 'stuff' an alternate backend for rakudo would need
11:37 wamba left
moritz Timbus: well, for interfacing with the outside world, yes (like, sockets, stat and the like) 11:38
Timbus that's fine
moritz Timbus: and the pmcarray stuff too, but that's just generic array stuff, not too parrot specific
mucker: with a precedence parser 11:39
mucker moritz: does nqp make it easier ?
moritz mucker: easier than what?
mucker than bison or yacc 11:40
11:40 brrt left
Timbus hmmm better question: does nqp implement things like its own hash/array. or is that provided by the vm? 11:40
how bootstrappy is it, basically 11:41
11:41 brrt joined
arnsholt mucker: NQP is a lot nicer to work with than lex and yacc 11:42
mucker okie dokie
arnsholt In no small part since you're writing Perl 6 grammars, instead of the slightly harebrained syntax lex and yacc want
11:48 brrt left
jnthn Timbus: At the moment, by the VM. 11:48
Timbus: Objecty stuff it does itself. 11:49
The hash/array stuff is largely hidden behind a set of (compiled away) abstractions.
moritz ok, 10 non-typed exceptions remain in the setting (not counting internal errors and NYI stuff)
jnthn moritz++
moritz really wants to wrap up his grant this month 11:51
Timbus ah. thanks jnthn 11:52
dalek kudo/nom: bb6d6b2 | moritz++ | src/core/ (2 files):
typed exception for non-ASCII chars in pack "A" templates
12:00
GlitchMr I found quick way of testing perl6/perl6.org 12:02
You run mowyw and php54 -t online after that 12:03
(or perhaps I read TDWTF too much?) 12:09
Also, wouldn't it be possible to make mowyw faster... it's slow when I was to change ONE file 12:10
12:24 cognominal___ left 12:27 pupoque left
pmichaud good morning, #perl6 12:31
jnthn o/ 12:32
12:32 xinming joined 12:35 JimmyZ left
GlitchMr dl.dropbox.com/u/63913412/threecolumns.png 12:36
I don't know why, but I don't like the result...
moritz GlitchMr: you can run mowyw --make 12:37
GlitchMr ... wow... that's really hidden
There is no --help...
moritz there's a man page :-)
GlitchMr: having two columns with the same title is not so great 12:38
GlitchMr Yeah...
dl.dropbox.com/u/63913412/looksstupid.png
But this is even worse
moritz you can just make them the same width 12:39
12:40 JimmyZ joined
GlitchMr dl.dropbox.com/u/63913412/whataboutnow.png 12:46
LoRe i like the stupid thing 12:48
tadzik yeah, it looks ok 12:49
GlitchMr I'll check it in validator and push 12:53
dalek href="https://perl6.org:">perl6.org: 99d489c | GlitchMr++ | source/style.css:
Add unprefixed versions of CSS properties so I'll enjoy shadows in my browser
12:55
href="https://perl6.org:">perl6.org: 333cc60 | GlitchMr++ | source/ (2 files):
Move "Feature matrix" and "Supplementals" to one column in "Compilers" page.

Those sections were small and the biggest problem was "Compilers" section which had a lot of text compared to those.
href="https://perl6.org:">perl6.org: 5b4d8a0 | GlitchMr++ | source/compilers/index.html:
Except it's not three-column. I forgot to remove this comment while experimenting with designs.
12:58
12:58 drbean joined
dalek ast: 7a26e13 | moritz++ | S32-exceptions/misc.t:
test X::Buf::Pack::NonASCII
13:01
13:01 drbean left 13:03 drbean joined 13:05 crab2313 joined 13:06 xinming left 13:08 Psyche^ joined 13:09 drbean left
GlitchMr Also, just wondering, but is there more idiomatic way to say 13:09
for split '', $string { }
13:10 wamba joined
arnsholt You're looking for comb 13:10
moritz for $string.comb { }
arnsholt What moritz++ said
13:11 Patterner left, Psyche^ is now known as Patterner 13:12 drbean joined
pmichaud is the version of perl6.org/compilers that's appearing now the most recent (with GlitchMr++ 's changes above)? 13:12
GlitchMr Yes
13:13 UncleFester6 joined
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).
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
pmichaud I can post a screen dump... one second
GlitchMr But yes, it's confusing
It happens to me too
pmichaud okay
13:15 cognominal joined
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 13:16 leprevost joined
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. :-)
tadzik UncleFester6: indeed 13:17
UncleFester6: well, that's a bit diffent
13:17 leprevost left
tadzik UncleFester6: your problem can be worked around by actually precompiling stuff in the right order 13:17
GlitchMr karma GlitchMr
aloha GlitchMr has karma of 2.
GlitchMr wait... 13:18
dalek href="https://perl6.org:">perl6.org: 1c85b2e | GlitchMr++ | source/compilers/index.html:
Make "published" a link instead of "Hackage" to avoid confusion.
tadzik but that doesn't (always) help for, say, URI or panda
GlitchMr karma GlitchMr
aloha GlitchMr has karma of 2.
GlitchMr ...?
jnthn Stuff not working when not compiled in the right order is not a bug.
crab2313 What is karma ?
jnthn Not telling you "this won't work" and refusing to pre-compile stuff in the wrong order is a bug though.
It should simply not allow that to happen. 13:19
It's on my todo list.
tadzik it's the currency with which you can buy donuts from whiteknight
pmichaud karma pmichaud
aloha pmichaud has karma of 1473.
pmichaud mmmm, donuts.
jnthn karma jnthn
aloha jnthn has karma of 2646.
tadzik karma tadzik
aloha tadzik has karma of 939.
tadzik 961 to go
jnthn ...wish it was for beer, not donuts :)
UncleFester6 The ufo make file compiles stuff in the wrong order ...
tadzik erm, 9061
UncleFester6: oh. It shouldn't
jnthn UncleFester6: Really? That's...bad.
13:21 leprevost joined 13:22 wamba left 13:23 PacoAir joined 13:25 Guest29518 left
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:26
tadzik does every make -j1 give the same ordering? 13:27
moritz UncleFester6: I've been saying that for ages :/
jnthn So...ufo is broken? 13:28
As in, getting dependencies wrong?
moritz yes 13:29
it sometimes fails to recompile dependencies
tadzik that to
oo
jnthn Yeah, that's gonna cause some real issues.
tadzik it shouldn't if you always make clean 13:30
moritz well
you shouldn't need 'make clean' just to get compilation right :/
tadzik but it's still broken if you do that
that's the biggest issue
jnthn Right, it should rebuild the things that need rebuilding.
tadzik: But does it consistently get the order right?
tadzik I can't tell, because now it's always broken 13:31
I've checked like 5 times with URI already
dalek kudo/nom: 5756efd | moritz++ | src/core/ (2 files):
typed exception for wrong argument to :x in regex matches
13:32
ast: ac06e5e | moritz++ | S32-exceptions/misc.t:
test X::Str::Match::x
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
at least I cannot prove this right now
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
If ufo builds start exploding as a result, we'll soon see where the issue is.
tadzik I'm wondering whether ufo is confused by lines appearing in pod
=begin SYNOPSIS\nuse Something\n
moritz quite possible
jnthn Ouch.
tadzik regex-parsing strikes back
I don't say that it does happen, but it could 13:35
tadzik tries to compile URI by hand
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
s/the of/the output of/
13:36 birdwindupbird joined
tadzik URI? 13:37
UncleFester6 yes
tadzik the ordering seems to be correct for me
gist.github.com/2863526
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
but I should wonder more about 3 projects due tomorrow 13:39
moritz: you sure your MAKEFLAGS are clean?
UncleFester6 the order in the paste looks right. do the test run when compiled with that ordering?
tadzik no
moritz tadzik: yes. SOURCES in the Makefile is ordered wrongly
tadzik Oh, ok
moritz maybe because of use vs. need
tadzik but, nothing use-s URI::DefaultPort 13:40
13:40 tokuhiro_ left
tadzik as far as I can see 13:40
moritz tadzik: it's 'need', not 'use'
tadzik there we go
need
UncleFester6 yes URI::DefaultPort is needed / used
tadzik tries a patch
moritz too
tadzik I'll try that for Panda then :) 13:41
UncleFester6 so the tests run now?
tadzik they didn't run here anyway 13:42
moritz some run, some don#t
tadzik right
moritz but at least it now compiles DefaultPort before URI.pm
13:43 wamba joined
moritz ufo patch pushed 13:44
$ perl6 -Iblib/lib t/01.t
===SORRY!===
No object at index 73
UncleFester6 I was getting similar errors until I compiled in the right order. 13:45
tadzik the same patch didn't help panda either
although I used ||
heh, now panda failed too 13:46
gist.github.com/2863548 13:47
UncleFester6 tadzik: that's the same error as the RT that started this conversation
tadzik I know 13:48
I still don't know why it works that way
moritz is the order correct now? 13:49
tadzik it was correct anyway, Panda only uses use
okay, that's not this 13:50
see gist.github.com/2863548#comments
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.
tadzik compare the order
I did two runs in a row, the order is exactly the same, and one works and one doesn't 13:51
it's not about ordering
UncleFester6 s/is wrong/may be wrong/
moritz anyway 13:52
the other problem with ufo (which is unrelated to this one) is that it doesn't declare dependencies
tadzik that too 13:53
13:55 wamba left
pmichaud jnthn: ping 13:57
13:57 kaare_ left 13:58 xinming joined
jnthn pmichaud: pong 14:00
pmichaud on $!target and .LANG, were you referring to issues prior to your 05-25 commits there or afterwards? 14:01
(making extra copies of ucs-4 strings)
jnthn needs to find said commits... 14:02
nqp repo?
moritz r: class A { }; class B does A { }
p6eval rakudo bb6d6b: OUTPUT«===SORRY!===␤B cannot compose A because it is not composable␤»
pmichaud yes, nqp repo
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
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 :-)
jnthn I think the commits you're looking at are when I made QHLL be HLL
pmichaud well, there's an argument to be had that .LANG ends up with an incorrect $!orig, but I still think it's okay
jnthn oh, it's passing self.target()....
*nod*
pmichaud right
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
jnthn The :g issue remains though.
But yeah, it seems LANG is OK, though it does lose orig.
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.
(That code appears to be left-over from when Parrot had COW strings) 14:05
strings in parrot are now immutable, so I'm fairly sure it's not an issue :)
I might run a memory consumption test to make sure.
14:05 fgomez joined
pmichaud yes, :g is still an issue; I'll take a look at it sometime soonish. 14:06
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:08
It's more likely to be the result of a thinko. 14:09
pmichaud well, before your changes it did pass .orig :-)
and called cursor_start instead of cursor_init
jnthn Oh :)
Yeah, I know I had to change it to cursor_init
pmichaud cursor_init is faster anyway
so I'm happy with the change :)
14:12 mucker left 14:14 Araq joined 14:15 wamba joined 14:16 UncleFester6 left 14:23 UncleFester6 joined
UncleFester6 moritz: I just reproduced your problem with URI and figured out why it's happening I think. 14:23
ufo puts the PERL6LIB ordering with lib first and blib/lib second which is preferring .pm files when it shouldn't 14:24
if I put blib/lib before lib/ in min PERL6LIB the problem goes away 14:25
moritz P6LIB = $(PWD)/$(BLIB)/lib:$(PWD)/lib:$(PERL6LIB) 14:34
and then
env PERL6LIB=$(P6LIB) $(PERL6) --target=pir --output=$@ $<
looks like blib first, no?
env PERL6LIB=/home/moritz/p6/uri/blib/lib:/home/moritz/p6/uri/lib: perl6 --target=pir --output=blib/lib/IETF/RFC_Grammar.pir lib/IETF/RFC_Grammar.pm
also looks like blib first
14:35 spider-mario left
UncleFester6 yes ... working on something relevant ... 14:35
(I hope)
14:44 leprevost left
UncleFester6 sorry my statement about ufo P6LIB ordering is wrong .. I will keep working on the similar looking errors I guess 14:46
dalek kudo/map: 4a00632 | pmichaud++ | src/core/MapIter.pm:
Short-circuit 'redo' label in MapIter.reduce.
14:48
kudo/nom: 253f6db | moritz++ | src/core/ (2 files):
typed exception for "does" with non-composable type
14:50
GlitchMr nr: print [cmp] 1, 2, 3, 1 14:51
p6eval niecza v18-2-gea3d97a: OUTPUT«===SORRY!===␤␤Cannot reduce with cmp because structural infix operators are diffy and not chaining at /tmp/1Zff8ab0oq line 1:␤------> print [cmp]⏏ 1, 2, 3, 1␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/b…
..rakudo 5756ef: OUTPUT«Increase»
moritz niecza++
dalek ast: b94655c | moritz++ | S32-exceptions/misc.t:
test X::Composition::NotComposable
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»
GlitchMr (ok, this is workaround :P) 14:53
nr: print (2 ~~ (1, 2, 3)).perl 14:55
p6eval rakudo 5756ef, niecza v18-2-gea3d97a: OUTPUT«Bool::False»
UncleFester6 moritz: ping / quick question I hope 14:56
moritz UncleFester6: pong
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:57
moritz UncleFester6: I don't think there's an easy way to check 14:58
UncleFester6 I am semi manually removing the .pm files to be sure with - find blib/ -name '*.pm' -exec rm -i {} \; 14:59
It may be a difference in our testing environments.
moritz oh 15:00
I think that rakudo compares timestamps of .pir and .pm files
and only uses the .pir version if it's not older than the .pm
so it would make sense to first copy the .pm, then create the .pir file
15:01 JimmyZ left, JimmyZ_ joined, JimmyZ_ is now known as JimmyZ
UncleFester6 ufo makefile copies the .pm after - no? anyway thanks. will research on my own for a while ... 15:02
15:02 wamba left
moritz yes, I think it copies later on 15:02
15:03 JimmyZ_ joined
moritz thinks it's time to completely rewrite the Makefile generation part of ufo 15:03
15:06 JimmyZ left, JimmyZ_ is now known as JimmyZ, UncleFester6 left 15:11 brrt joined 15:16 crab2313 left 15:17 crab2313 joined
moritz ok, I've pushed a TODO file to ufo 15:17
dalek kudo/nom: cd04b8c | moritz++ | TODO:
add TODO file
moritz oh shit, wrong repo 15:18
sorry 'bout that
dalek kudo/nom: 9d64f9a | moritz++ | TODO:
remove TODO file, I meant to commit it to the ufo repo. moritz--
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␤␤»
..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…
GlitchMr I've proposal. What about putting array then?
(actually, don't do that, it would be too confusing)
moritz might not be too confusing when using a different name 15:23
but what's the use case?
GlitchMr .base could return object 15:24
colomon GlitchMr: If you really want to do that, it's pretty trivial to write your own module to do it. 15:25
GlitchMr nr: print ~([2, 1, 2] but '212') 15:27
p6eval rakudo 253f6d, niecza v18-2-gea3d97a: OUTPUT«212»
GlitchMr nr: print ([2, 1, 2] but '212')[0]
p6eval rakudo 253f6d, niecza v18-2-gea3d97a: OUTPUT«2»
GlitchMr (but right, this could be module if anything) 15:29
Perl 6 specification is already quite complex
15:29 brrt left 15:31 brrt joined 15:33 JimmyZ left
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…
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:␤------> my ⏏$socket = IO::Socket::INET.new(host => "␤␤Unhandled exception: Unable to resolve method postcircumfix:<( )> in type Any␤ at /tmp/TIpZKXMC95…
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␤␤»
GlitchMr How can I make sockets?
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
jnthn In the REPL it works.
(locally)
15:56 Chillance joined 15:58 cognominal left, cognominal joined
sorear good * #perl6 16:12
moritz \o sorear
dalek kudo/nom: da68917 | moritz++ | src/core/ (2 files):
typed exception for eval with unknown :lang
16:15
kudo/nom: 1d48515 | moritz++ | docs/ChangeLog:
note -O2 changes in ChangeLog
moritz oh dammit, I didn't mean to push da68917 either 16:17
dalek kudo/nom: 89da094 | moritz++ | src/core/ (2 files):
Revert "typed exception for eval with unknown :lang"

This reverts commit da68917796e380a368f3c98d37018fccda494287. It made the setting compilation hang. No idea why.
16:19
moritz is not concentrated, and shouldn't hack
16:22 cognominal left, cognominal joined 16:23 Khisanth left 16:25 brrt left
sorear mm, dilute moritz 16:25
dalek kudo/nom: acb50df | moritz++ | src/core/ (2 files):
typed exception for eval with unknown :lang

second shot; works this time
16:27
ast: 6aa9f56 | moritz++ | S32-exceptions/misc.t:
test X::Eval::NoSuchLang
16:33 brrt joined, brrt left 16:37 Khisanth joined 16:43 thelazydeveloper joined 16:47 raiph joined 16:48 Chillance left, Chillance joined
dalek p/qrpa: 27720d1 | pmichaud++ | src/PAST/NQP.pir:
Add (temporary) nqp::qlist() to construct QRPA instead of RPA lists.
17:03
p/qrpa: 98f6a4e | pmichaud++ | / (4 files):
Add nqp::islist().
17:10 birdwindupbird left 17:19 cognominal left, raiph left 17:20 cognominal joined
GlitchMr perl6: use v8; // use Node.js 17:37
p6eval pugs: OUTPUT«*** ␤ Unexpected "use"␤ expecting operator␤ at /tmp/zOCnPkWecV line 1, column 12␤»
..niecza v18-2-gea3d97a: OUTPUT«===SORRY!===␤␤Null regex not allowed at /tmp/sKEsVsXjl6 line 1:␤------> use v8; //⏏ use Node.js␤␤Action method quote:sym<//> not yet implemented at /tmp/sKEsVsXjl6 line 1:␤------> use v8; //⏏ use Node.js[…
..rakudo acb50d: OUTPUT«===SORRY!===␤Null regex not allowed at line 2, near " use Node."␤»
GlitchMr perl6: use v8
p6eval rakudo acb50d, niecza v18-2-gea3d97a, pugs: ( no output )
dalek kudo/nom: d8f1a1b | moritz++ | src/core/ (2 files):
Temporal gets more typed exceptions
17:38
ast: 3ed2a34 | moritz++ | S32-exceptions/misc.t:
test X::Temporal::Truncation
17:41
moritz 4 exceptions remain to be ported. 17:42
diakopter moritz++ 17:43
moritz (that is, exceptions from src/core/)
jnthn viers moritz++'s progress
.oO( ouch, that was a tenuous pun... )
17:47 birdwindupbird joined 17:49 whiteknight joined 17:50 whiteknight is now known as Guest65107
sorear phenny: "viers"? 17:50
phenny sorear: "viers" (en to en, translate.google.com)
sorear phenny: de "viers"?
phenny sorear: "Viers" (de to en, translate.google.com)
felher vier is the german 4 :)
And pronounced like fear 17:51
sorear phenny: sv "viers"?
phenny sorear: "viers" (sv to en, translate.google.com)
sorear phenny: ru "viers"?
phenny sorear: "viers" (ru to en, translate.google.com)
diakopter learns something new every day. and then forgets it.
moritz diakopter: such is human nature
sorear eine, zwei, ?, vier ?
felher eins, zwei, drei, vier :)
GlitchMr Make Perl 6 awk: 17:52
sub infix:[''] { $^a ~ $^b }
(ok, this is insane)
tadzik eee
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
and you won't get any sensible parse error messages out of it
GlitchMr For me it seems to work this way
(I haven't expected that, really)
moritz neither
GlitchMr niecza> 1 1 'cake' (1, 2) 17:54
11cake1 2
sorear wow. 17:55
GlitchMr nr: sub infix:[' '] { $^a ~ $^b }; print 1 1 'cake' (1, 2)
p6eval rakudo acb50d, niecza v18-2-gea3d97a: OUTPUT«11cake1 2»
tadzik niice
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»
jnthn Whoa.
WAT :)
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
timotimo why one would want that, that is 17:58
GlitchMr I feelt surprised when I have noticed it worked
timotimo it's still cool that that works
GlitchMr In both implementations!
timotimo std: sub infix:[' '] { $^a ~ $^b }; sub a { 'a' }; sub b { 'b' }; print a() b() 17:59
p6eval std f179a1b: OUTPUT«===SORRY!===␤Two terms in a row at /tmp/PMGC3n2d6U line 1:␤------> sub a { 'a' }; sub b { 'b' }; print a() ⏏b()␤ expecting any of:␤ infix or meta-infix␤ infixed function␤ statement modifier loop␤Parse failed␤FAILED 00:00 43m␤»…
timotimo whoops :)
17:59 cogno joined
GlitchMr How can I join arrays? 18:01
sorear std: sub infix:[''] { $^a ~ $^b }; sub a { 'a' }; sub b { 'b' }; print a() b()
tadzik with a comma maybe
p6eval std f179a1b: OUTPUT«ok 00:00 43m␤»
sorear if you drop the space it works better
GlitchMr Comma worked in Perl 5, but
niecza> (@a, @b).perl
([1, 2].list, [3, 4].list)
I don't think I want that 18:02
tadzik hrm
GlitchMr niecza> (@a, @b)[0]
1 2
niecza> (@a, @b)[1]
3 4
tadzik r: my @a = 1, 2; my @b = 3, 4; (@a, @b).perl.say
p6eval rakudo acb50d: OUTPUT«(Array.new(1, 2), Array.new(3, 4))␤»
jnthn Flattening is lazy.
r: my @a = 1, 2; my @b = 3, 4; (@a, @b)[0].say
p6eval rakudo acb50d: OUTPUT«1␤»
jnthn r: my @a = 1, 2; my @b = 3, 4; (@a, @b)[1].say
p6eval rakudo acb50d: OUTPUT«2␤»
jnthn etc
GlitchMr Is it Niecza bug?
n: my @a = 1, 2; my @b = 3, 4; (@a, @b)[1].say
tadzik r: my @a = 1, 2; my @b = 3, 4; (@a, @b).map: { say $_ };
p6eval niecza v18-2-gea3d97a: OUTPUT«3 4␤»
rakudo acb50d: ( no output )
jnthn Yes.
tadzik heh, lazy again 18:03
sorear GlitchMr: flattening is very wonky in niecza
GlitchMr How can I check if value is in array? 18:07
I would use ~~ like in Perl 5, but it doesn't seem to work in Perl 6 18:09
tadzik isn't there .first?
r: my @a = 1..6; say @a.first(3); 18:10
p6eval rakudo acb50d: OUTPUT«3␤»
tadzik r: my @a = 1..6; say @a.first(* > 2);
p6eval rakudo acb50d: OUTPUT«3␤»
tadzik looks ok
benabik r: say <1 2 3> ~~ 2
p6eval rakudo acb50d: OUTPUT«False␤»
benabik r: say <1 2 3> ~~ '2'
p6eval rakudo acb50d: OUTPUT«False␤»
GlitchMr Except it seems that I cannot use .first with Nil
Perhaps I should try using any() 18:11
benabik r: say any(<1 2 3>) ~~ 2
p6eval rakudo acb50d: OUTPUT«any(False, False, False)␤»
GlitchMr r: say any(<1 2 3>) === 2
p6eval rakudo acb50d: OUTPUT«any(False, False, False)␤»
GlitchMr r: say 2 === any(<1 2 3>)
p6eval rakudo acb50d: OUTPUT«any(False, False, False)␤»
GlitchMr what?
benabik r: say so any(<1 2 3>) ~~ 2 18:12
p6eval rakudo acb50d: OUTPUT«False␤»
tadzik r: say 2 == any(<1 2 3>)
p6eval rakudo acb50d: OUTPUT«any(False, True, False)␤»
benabik r: say so any(<1 2 3>) ~~ '2'
p6eval rakudo acb50d: OUTPUT«True␤»
timotimo huh.
18:15 cogno left 18:17 cogno joined
gfldex well that cannot work 18:19
at least the 2 === 2 18:20
say (2 == any(<1 2 3>)).Bool; 18:21
r: say (2 == any(<1 2 3>)).Bool;
p6eval rakudo d8f1a1: OUTPUT«True␤»
benabik gfldex: You can use `say so *` instead of `say (*).Bool
gfldex r: say so.^WHAT; 18:22
p6eval rakudo d8f1a1: OUTPUT«===SORRY!===␤Cannot use .^ on a non-identifier method call at line 2, near ";"␤»
gfldex r: say (&so).^WHAT;
18:22 spider-mario joined
p6eval rakudo d8f1a1: OUTPUT«===SORRY!===␤Cannot use .^ on a non-identifier method call at line 2, near ";"␤» 18:22
gfldex what is "so"?
benabik Basically turns something into a boolean. 18:23
r: say so any(1,2,3) == 2 18:24
p6eval rakudo d8f1a1: OUTPUT«True␤»
gfldex what is it's precedence?
(what is the question that i should have asked)
benabik Fairly low? Not sure. 18:25
gfldex i will stick with ().Bool then :) 18:26
benabik It's fairly low precedence. The high prec version is ?.
tablets.perl6.org/appendix-b-groupe...precedence 18:27
gfldex after consulting that table i still wont do so 18:29
GlitchMr paste.uk.to/f1a888c7 18:30
"in" operator from Python.
Now in Perl 6
(I like abusing mutable grammars :P)
benabik I find "say so THING" more readable than "say (THING).Bool"
But it's up to you, I suppose.
It's not really abuse when that's what it's designed for. 18:31
18:31 GlitchMr left
gfldex r: say so (1,2,3) >>==<< (1,2,3); 18:32
p6eval rakudo d8f1a1: OUTPUT«True␤»
gfldex r: say so (1,2,3) >>==<< (1,2,4);
p6eval rakudo d8f1a1: OUTPUT«True␤»
spider-mario r: say so (1, 2, 3) Z== (1, 2, 3) 18:33
p6eval rakudo d8f1a1: OUTPUT«True␤»
spider-mario r: say so all((1, 2, 3) Z== (1, 2, 3))
p6eval rakudo d8f1a1: OUTPUT«True␤»
spider-mario r: say so all((1, 2, 3) Z== (1, 2, 4))
p6eval rakudo d8f1a1: OUTPUT«False␤»
spider-mario r: say so all((1, 2, 3) Zeqv (1, 2, 3))
p6eval rakudo d8f1a1: OUTPUT«True␤»
spider-mario r: say so all((1, 2, 3) Zeqv (1, 2, 4))
p6eval rakudo d8f1a1: OUTPUT«False␤»
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
r: say (1, 2, 3) »==« (1, 2, 4) 18:35
p6eval rakudo d8f1a1: OUTPUT«True True False␤»
spider-mario say so (True, True, False)
r: say so (True, True, False)
p6eval rakudo d8f1a1: OUTPUT«True␤»
gfldex r: say so True, True, False;
p6eval rakudo d8f1a1: OUTPUT«TrueTrueFalse␤»
18:36 cogno left
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
r: say so 45 «+» 2
p6eval rakudo d8f1a1: OUTPUT«True␤»
gfldex that one can't be false
spider-mario looks right to me
yes, but
r: say ?45 «+» 2
p6eval rakudo d8f1a1: OUTPUT«3␤»
gfldex yes, that's even wronger :) 18:38
benabik r: say so 0 «+» 2
p6eval rakudo d8f1a1: OUTPUT«True␤»
spider-mario “so” was correctly executed after «+»
benabik say so 0
r: say so 0
p6eval rakudo d8f1a1: OUTPUT«False␤»
pmichaud r: say so (False, False, False) # note 18:47
p6eval rakudo d8f1a1: OUTPUT«True␤»
moritz r: say so Mu xx 2 19:10
p6eval rakudo d8f1a1: OUTPUT«True␤»
tadzik . o O ( 2+2*2. Better written as 22+ ) 19:15
moritz does anybody know how to trigger the die() in src/core/Str.pm line 784? 19:18
die "Don't know how to handle a {.WHAT.gist} as a substitution key";
that's part of the Str.trans code
r: "a".trans({} => "a") 19:19
p6eval rakudo d8f1a1: ( no output )
moritz r: class A { }; "a".trans(A.new => "a")
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␤␤»
moritz r: class A { method comb() { self } }; "a".trans(A.new => "a")
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␤␤»
moritz r: class A { method comb(*@) { self } }; "a".trans(A.new => "a")
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 left, cognominal joined
moritz 'cause I just made a typed exception out of it, and now I don't know how to test it :/ 19:20
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 …
timotimo oh, right
r: sub infix:[''] { $^a ~ $^b }; sub a { 'a' }; sub b { 'b' }; a() ~ b();
p6eval rakudo d8f1a1: ( no output )
timotimo well, that's not helpful
sorear moritz: are you even sure it's reachable?
timotimo r: sub infix:[''] { $^a ~ $^b }; sub a { 'a' }; sub b { 'b' }; say a() ~ b();
p6eval rakudo d8f1a1: OUTPUT«ab␤»
timotimo interesting
moritz sorear: no, not sure
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␤␤»
sorear r: "foo".trans("x" => sub () { })
p6eval rakudo d8f1a1: ( no output )
sorear r: "foo".trans(Any => Any) 19:26
p6eval rakudo d8f1a1: ( no output )
sorear r: say "foo".trans("o" => Any)
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␤␤»
sorear r: say "foo".trans(Any => "o")
p6eval rakudo d8f1a1: OUTPUT«foo␤»
sorear r: say "foo".trans(Any.new => "o")
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␤␤»
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␤␤»…
sorear moritz: I think have a winner
moritz: incidentally, the type is _always_ given as Pair() 19:29
moritz sorear++
sorear r: say Whatever ~~ Cool 19:30
p6eval rakudo d8f1a1: OUTPUT«False␤»
sorear r: say "foo".trans([*]=>1) # probably minimal
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…
sorear oh, parse funnyiness
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␤»
sorear r: say "foo".trans(*, =>1)
p6eval rakudo d8f1a1: OUTPUT«===SORRY!===␤Preceding context expects a term, but found infix => instead␤at /tmp/STZ2Ucczpt:1␤»
sorear r: say "foo".trans([* ]=>1)
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…
jnthn std: say "foo".trans(*, =>1)
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.␤===SORRY!===␤Preceding context expects a term, but found infix => instead at /tmp/RKKuS1rDv…
dalek kudo/nom: 6d966bd | moritz++ | src/core/ (2 files):
typed exception for Str.trans
ast: 7d371b6 | moritz++ | S32-exceptions/misc.t:
test X::Str::Trans::IllegalKey, sorear++
sorear moritz: does exception typing have a stealably stable kernel? 19:32
moritz sorear: well, everything subclasses from Exception, which is pretty stable, but also pretty rakudo-specific 19:33
sorear: rakudo has some hacks to propagate custom types through parrot's Exception PMC, which you don't need either
n: class A { }; try die A.new; say $!.WHAT
p6eval niecza v18-2-gea3d97a: OUTPUT«A()␤» 19:34
moritz oh, that part is already supported
rakudo wraps all non-Exception objects in X::AdHoc, so that you can access .backtrace
(that's spec too)
n: say 1.^name 19:36
p6eval niecza v18-2-gea3d97a: OUTPUT«Int␤»
19:40 Araq left 19:47 snearch joined 20:12 crab2313 left 20:22 snearch left 20:41 PacoAir left 20:43 zby_home joined
dalek kudo/nom: 9d2ddde | moritz++ | src/core/ (2 files):
another typed exception for Str.trans
20:45
ast: 7b9ba33 | moritz++ | S32-exceptions/misc.t:
test X::Str::Trans::InvalidArg
20:46
moritz 2 remaining exceptions to be ported.
dalek kudo/map: ad22611 | pmichaud++ | src/core/MapIter.pm:
Revert commit af0d2e1 so that MapIter makes repeated calls to .munch().

hopefully improve that in subsequent commits.
20:48
kudo/map: 6c20932 | pmichaud++ | src/ (5 files):
Initial moves to use QRPA in Rakudo Lists.
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:␤------> sub f (*⏏@a) { say 'called f'; 3 }; say <a b c>.m␤␤called f␤3␤»
moritz r: sub f (*@a) { say 'called f'; 3 }; say <a b c>.map: &f
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.…
moritz niecza is correct here, I think
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
moritz map with a slurpy is simply a call with the whole list as an argument to the funciton 20:50
pmichaud: wow
pmichaud > sub f (*@a) { say 'called f'; 3 }; say <a b c>.map: &f 20:51
called f
3
that's locally in my 'map' branch.
so I'm guessing ad22611 fixed whatever bug is showing up in p6eval 20:52
moritz \o/
felher What is QRPA and RPA? 20:53
pmichaud RPA == ResizablePMCArray 20:54
that's Parrot's basic array type for holding a variable list of objects
QRPA == Pm's rewrite of RPA so that it has much faster shift and unshift operations
felher Okay, so RPA is written in C i guess? QRPA is written in? 20:55
moritz also C
felher Okay. Thanks you two :) 20:56
20:56 fridim_ left 21:07 raiph joined
pmichaud afk, walk 21:08
raiph i'm thinking of creating a perl6 subreddit. anyone think it's a bad idea?
tadzik isn't there one already?
raiph oh 21:09
heh. well that answers that.
21:13 cognominal left, cognominal joined 21:15 birdwindupbird left 21:16 zby_home left 21:17 zby_home_ joined 21:37 zby_home_ left 21:42 pupoque joined 21:47 b1rkh0ff left 22:00 b1rkh0ff joined
dalek kudo/map: 91e59f1 | pmichaud++ | src/core/ListIter.pm:
Code cleanup: Replace some nqp:: ops with things the inliner can now handle.
22:20
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:22
benabik MMD is "multi method dispatch", IIRC 22:23
timotimo ah, ok. that indeed is cool (especially when combined with pattern matching) 22:25
22:30 pupoque left
felher oha. QRPA looks quite object orientated for being C :) 22:31
benabik Object oriented is a programming style. It can be done in any language. Granted, some make it easier than others. 22:33
Also, Parrot has a pre-processor that takes C and sets up all the objecty stuff.
felher Yeah. With a pre-processor OOP can even be in done in no language... 22:34
One may argue that you then define your own language :) 22:35
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:47
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:48
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:50
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.
felher benabik: yeah. I totally agree in every part of your statement :) 22:52
dalek ecza/non-bootstrap: fb31c9b | sorear++ | lib/ (3 files):
Finish RxOp
22:55
sorear remarkable, RxOp.pm6: 725 lines, RxOp.cs: 724 lines 22:56
spider-mario GTK uses OO in C.
sorear I guess the Niecza mid-end was never a particularly good fit to Perl 6's strengths
spider-mario (it might be one of the most cited examples)
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 :)
or you could always split one of the lines in the c# :) 23:00
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
sorear but I came into this project fearing a 5-10x code size blowup, and it hasn't materialized
23:05 spider-mario left 23:07 raiph left 23:17 icwiener left
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:55
sorear what do you mean by evaluating multiple values? 23:59