»ö« 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.
jnthn 'night, #perl6 o/ 00:11
00:11 stevan_ joined
tadzik good night jnthn 00:11
that's a niceblog post :)
00:41 palakas__ joined, palakas_ left 00:43 palakas_ joined 00:46 palakas__ left 00:59 imarcusthis left, Targen joined
colomon jnthn++ 01:01
01:03 imarcusthis joined 01:33 skids left 01:34 stevan_ left 01:36 skids joined 01:39 stevan_ joined 01:50 awwaiid left 02:08 GlitchMr left 02:11 hulu joined
hulu masak: helo 02:23
02:25 japhb_ left
hulu r: my $scalar = 'This is $scalar holding a String'; say '$scalar is ', $scalar.^name; 02:28
p6eval rakudo 6d5dc6: OUTPUT«$scalar is Str␤»
hulu what's means of the .^name 02:29
diakopter ^ means a meta-method
r: .say for Str.^methods 02:30
p6eval rakudo 6d5dc6: OUTPUT«BUILD␤Int␤Num␤chomp␤chop␤substr␤pred␤succ␤match␤ords␤lines␤samecase␤samespace␤trim-leading␤trim-trailing␤trim␤words␤encode␤capitalize␤wordcase␤trans␤indent␤codes␤tclc␤path␤WHICH␤Bool␤Str␤ACCEPTS␤Numeric␤gist␤perl␤comb␤subst␤split␤»…
hulu r: my $scalar = 'This is $scalar holding a String'; say '$scalar is ', $scalar.^words; 02:32
p6eval rakudo 6d5dc6: OUTPUT«No such method 'words' for invocant of type 'Perl6::Metamodel::ClassHOW'␤ in block at /tmp/cZe8tkdQUE:1␤␤»
timotimo hulu: you're accidentally calling words on the String class, not the instance 02:33
r: my $scalar = 'This is $scalar holding a String'; say '$scalar is ', $scalar.words;
p6eval rakudo 6d5dc6: OUTPUT«$scalar is This is $scalar holding a String␤»
timotimo r: my $scalar = 'This is $scalar holding a String'; say '$scalar is ' ~ $scalar.words; 02:34
p6eval rakudo 6d5dc6: OUTPUT«$scalar is This is $scalar holding a String␤»
02:34 FROGGS_ joined
timotimo hm 02:34
r: say "foo bar".words
p6eval rakudo 6d5dc6: OUTPUT«foo bar␤»
timotimo oh, duh :)
r: "foo bar".words.perl.say
p6eval rakudo 6d5dc6: OUTPUT«("foo", "bar").list␤»
diakopter meta-method means calling the method on the object's metaobject
timotimo er, yes. not the class, i'm tired and it's late
please forgive me
timotimo goes to bed, hide under the blankets
02:36 FROGGS left 02:39 grondilu left 02:40 GlitchMr joined 02:42 PacoAir left
hulu thx 02:42
r: .say for Str.^meta-methods 02:52
p6eval rakudo 6d5dc6: OUTPUT«No such method 'meta-methods' for invocant of type 'Perl6::Metamodel::ClassHOW'␤ in block at /tmp/yAdrQSz6AG:1␤␤»
timotimo hulu: thought of that before, but it won't work:
say Str.WHAT.^methods 02:53
or am i mistaken?
geekosaur hulu, "meta-method" is talking about perl6, not talking *in* perl6
timotimo r: say Str.WHAT.^methods
p6eval rakudo 6d5dc6: OUTPUT«BUILD Int Num chomp chop substr pred succ match ords lines samecase samespace trim-leading trim-trailing trim words encode capitalize wordcase trans indent codes tclc path WHICH Bool Str ACCEPTS Numeric gist perl comb subst split␤»
geekosaur r: say Str.^methods
p6eval rakudo 6d5dc6: OUTPUT«BUILD Int Num chomp chop substr pred succ match ords lines samecase samespace trim-leading trim-trailing trim words encode capitalize wordcase trans indent codes tclc path WHICH Bool Str ACCEPTS Numeric gist perl comb subst split␤»
timotimo hm, this one does work
r: say Str.WHAT.^methods[0].^methods
p6eval rakudo 6d5dc6: OUTPUT«No such method 'gist' for invocant of type 'Sub'␤ in method gist at src/gen/CORE.setting:5128␤ in sub say at src/gen/CORE.setting:7595␤ in block at /tmp/Bxenog4dm5:1␤␤»
diakopter r: say Str.HOW.^methods
p6eval rakudo 6d5dc6: OUTPUT«No such method 'gist' for invocant of type 'NQPRoutine'␤ in method gist at src/gen/CORE.setting:5128␤ in sub say at src/gen/CORE.setting:7595␤ in block at /tmp/MszRYP4zyn:1␤␤»
diakopter r: print Str.HOW.^methods
p6eval rakudo 6d5dc6: OUTPUT«Nominal type check failed for parameter '$got'; expected Any but got NQPRoutine instead␤ in method REIFY at src/gen/CORE.setting:6366␤ in method reify at src/gen/CORE.setting:5501␤ in method gimme at src/gen/CORE.setting:5878␤ in method print at src/gen/CORE.se… 02:54
diakopter r: try print $_ for Str.HOW.^methods
p6eval rakudo 6d5dc6: OUTPUT«Nominal type check failed for parameter '$got'; expected Any but got NQPRoutine instead␤current instr.: '' pc 99920 (src/gen/CORE.setting.pir:47361) (src/gen/CORE.setting:10457)␤called from Sub '' pc 272541 (src/gen/CORE.setting.pir:123333) (src/gen/CORE.setting:63…
diakopter r: try { print $_ } for Str.HOW.^methods
p6eval rakudo 6d5dc6: OUTPUT«use of uninitialized variable $v of type Any in string context␤use of uninitialized variable $v of type Any in string context␤use of uninitialized variable $v of type Any in string context␤use of uninitialized variable $v of type Any in string context␤use of uninit…
diakopter r: for Str.HOW.^methods { try { say $_.name; CATCH { } } } 02:55
p6eval rakudo 6d5dc6: OUTPUT«set_invoke_forwarder␤archetypes␤new␤new_type␤parameterize␤add_fallback␤compose␤roles␤role_typecheck_list␤concretization␤is_composed␤can␤setup_junction_fallback␤find_method_fallback␤has_fallbacks␤set_name␤name␤set_docs␤docs␤ver␤auth␤set_ver␤set_auth␤set_stash_type␤a… 02:56
02:56 proller left
diakopter hulu: there you go 02:56
oh, I guess you don't need the try
r: for Str.HOW.^methods { say $_.name; }
p6eval rakudo 6d5dc6: OUTPUT«set_invoke_forwarder␤archetypes␤new␤new_type␤parameterize␤add_fallback␤compose␤roles␤role_typecheck_list␤concretization␤is_composed␤can␤setup_junction_fallback␤find_method_fallback␤has_fallbacks␤set_name␤name␤set_docs␤docs␤ver␤auth␤set_ver␤set_auth␤set_stash_type␤a…
02:57 Chillance left
diakopter r: for Str.HOW.^methods.reverse { say $_.name; } 02:57
p6eval rakudo 6d5dc6: OUTPUT«WALK␤dispatch:<hyper>␤dispatch:<.*>␤dispatch:<.+>␤dispatch:<.?>␤dispatch:<.=>␤dispatch:<.^>␤dispatch:<!>␤dispatch:<::>␤dispatch:<var>␤Capture␤clone␤can␤does␤isa␤DUMP-ID␤DUMP␤perl␤gist␤print␤say␤item␤Stringy␤Str␤Real␤Numeric␤BUILD_LEAST_DERIVED␤BUILDALL␤bless␤CREATE…
03:04 alec__ is now known as alec 03:07 sevin joined
diakopter r: for Str.HOW.^methods.sort { say $_.name; } 03:09
p6eval rakudo 6d5dc6: OUTPUT«Nominal type check failed for parameter ''; expected Any but got NQPRoutine instead␤ in sub infix:<cmp> at src/gen/CORE.setting:3344␤ in block at src/gen/CORE.setting:6047␤ in method sort at src/gen/CORE.setting:6041␤ in method sort at src/gen/CORE.setting:127…
swarley I'm confused by this line 03:13
$<septype>=['%''%'?] <normspace>? <quantified_atom>
hulu r: my ($string, $offset, $count) = ('Pugs is da bomb', 2, 5); substr($string, $offset) = "gilism ain't for wimps"; say $string; 03:14
p6eval rakudo 6d5dc6: OUTPUT«Cannot assign to a non-container␤ in block at /tmp/_xus5EeD38:1␤␤»
hulu what's means substr($string, $offset) = "gilism ain't for wimps"; 03:15
geekosaur nothing these days; it's substr-rw instead of substr. but lvalue substr replaces part of a string. (from $offset to the end of the string is removed, then the assigned string put in its place) 03:16
03:17 xinming_ left
geekosaur r: my $str = 'foo bar'; substr-rw($str, 5) = 'baz gunk'; $str.say 03:20
p6eval rakudo 6d5dc6: OUTPUT«foo bbaz gunk␤»
geekosaur whoops. index
geekosaur wonders what language he was thinking in that he went 1-based 03:21
03:21 xinming joined
hulu r: my $str = 'foo bar'; substr($str, 5) = 'baz gunk'; $str.say 03:23
p6eval rakudo 6d5dc6: OUTPUT«Cannot assign to a non-container␤ in block at /tmp/AIUiuIx9be:1␤␤»
hulu look at github.com/perl6/perl6-examples/bl...strings.pl
why
geekosaur that is out of date; substr-rw is a recent change 03:24
sorear geekosaur: some basic maybe? 03:25
geekosaur huh?
(yes, I know basic's MID$ did it that way) 03:26
sorear replying to 19:20 * geekosaur wonders what language he was thinking in that he
geekosaur oh
actualy I had fortran in mind when I said that :)
swarley r: say Q/Hello world/ ~~ /\w [ \w+! <?before \w> ]?/ 03:27
p6eval rakudo 6d5dc6: OUTPUT«「Hell」␤␤»
swarley that seems odd
That's token atom from src/QRegex/P6Regex/Grammar.pm
well, that's part of it 03:28
But that would seem as if the capture is wrong..
nqp: say Q/Hello world/ ~~ /\w [ \w+! <?before \w> ]?/ 03:29
p6eval nqp: OUTPUT«Confused at line 2, near "say Q/Hell"␤current instr.: 'panic' pc 13207 (src/stage2/gen/NQPHLL.pir:4680) (src/stage2/gen/NQPHLL.pm:328)␤»
swarley nqp: say(Q/Hello world/ ~~ /\w [ \w+! <?before \w> ]?/)
p6eval nqp: OUTPUT«Hell␤»
swarley Anyone have something to say that I'm missing?
Wait, I'm confused as to why it's stopping short on purpose.. 03:30
Oh. Because quantified_atom is the only thing actually used 03:32
actually no
Because quantified_atom doesn't consume that character..
geekosaur hulu: in fact that perl 6 snippet must be pretty old... "Pugs is da bomb"? these days pugs only supports about a third of the perl6 spec... 03:34
03:37 sevin left
swarley nqp: say(Q/Hello world/ ~~ /\w [ \w+!]?/) 03:46
p6eval nqp: OUTPUT«Hello␤»
03:47 nnunley joined
swarley I can't build parrot on Git Bash 03:49
I get a can't load Test/Harness.pm in @INC 03:50
sorear sounds like your perl 5 is incomplete 03:51
swarley holy shit, it's using an ancient version 03:52
sorear how ancient
swarley v5.8.8
sorear Test::Harness was first released with perl 5
(.000)
swarley This is perl, v5.8.8 built for msys
sorear according to module::corelist anyway 03:53
rjbs jnthn: congrats on the continued progress
(just read the blog post)
swarley: Time to install cpanm followed by "everything else you need." ;) 03:54
swarley Just tried that actually
Looks like I have bigger issues
swarley sighs and installs cygwin 03:55
Also, what is this expression? \w+! 04:00
hulu r: say "Door $_ is open" for 1..10 X** 2;
p6eval rakudo 6d5dc6: OUTPUT«Door 1 is open␤Door 4 is open␤Door 9 is open␤Door 16 is open␤Door 25 is open␤Door 36 is open␤Door 49 is open␤Door 64 is open␤Door 81 is open␤Door 100 is open␤»
hulu what's means of X** 2 04:01
swarley Im thinking that it's a variable for that loop.. 04:02
geekosaur no, that's a metaoperator
swarley No clue what that is
geekosaur X is cross product; so it returns every possible combination of the left side ** the right side
swarley ah. So it's like a map? 04:03
geekosaur 1..10 X** 2 means 1**2, 2**2, ..., 10**2
vaguely
but if the right side weren't a scalar...
hulu like map
geekosaur r: .say for 1..10 X** 1..3
p6eval rakudo 6d5dc6: OUTPUT«1␤1␤1␤2␤4␤8␤3␤9␤27␤4␤16␤64␤5␤25␤125␤6␤36␤216␤7␤49␤343␤8␤64␤512␤9␤81␤729␤10␤100␤1000␤»
swarley Oh. So it's a combination operator 04:04
It applies the operation from each element to blah blah...
I think I understand
geekosaur every popssible combination of each element on the left with each element on the right, with ** as the combiner 04:05
hulu r: 1..10 X~
p6eval rakudo 6d5dc6: OUTPUT«===SORRY!===␤Bogus statement␤at /tmp/6uEuxDjRlI:1␤------> 1..10 X~⏏<EOL>␤ expecting any of:␤ infix or meta-infix␤ infix stopper␤ prefix or meta-prefix␤»
hulu r: 1..10 X~ ',' 04:06
p6eval rakudo 6d5dc6: ( no output )
hulu r: say 1..10 X~ ','
p6eval rakudo 6d5dc6: OUTPUT«1, 2, 3, 4, 5, 6, 7, 8, 9, 10,␤»
geekosaur r: say 1..10 X+ 1..3 04:07
p6eval rakudo 6d5dc6: OUTPUT«2 3 4 3 4 5 4 5 6 5 6 7 6 7 8 7 8 9 8 9 10 9 10 11 10 11 12 11 12 13␤»
04:09 preflex_ joined, Rix left
swarley inter::progs - Determine what C compiler and linker to use...Compilation failed with 'gcc-4' 04:10
04:11 preflex left, preflex_ is now known as preflex
sorear do you have a working c compiler on the machine? is it the same one your perl 5 uses to build extension modules? 04:11
parrot lifts a lot of configuration from the p5 extension builder
swarley I moved into a cygwin environment, and the perl installation is working fine now. 04:12
I suppose I'll reinstall gcc
sorear can you install extensions on the perl env though 04:13
is jnthn around?
left 4h ago, so prolly not back yet 04:14
swarley Yes, I can
04:16 sevin joined 04:18 xinming_ joined 04:19 Rix joined 04:21 xinming left
swarley slowly getting closer to successful compilation.. 04:26
hulu r: my $x = ~[**] 5, 4, 3, 2; 04:29
p6eval rakudo 6d5dc6: OUTPUT«(timeout)»
hulu what's means ~[**] 04:30
r: my $x = ~[**] 5, 4, 3, 2;say "5**4**3**2 = {substr($x,0,20)}...{substr($x,$x.chars-20)} and has {$x.chars} digits"; 04:31
p6eval rakudo 6d5dc6: OUTPUT«(timeout)»
hulu r: my $x = ~[**] 5, 4; 04:32
p6eval rakudo 6d5dc6: ( no output )
hulu r: my $x = ~[**] 5, 4;say $x; 04:33
p6eval rakudo 6d5dc6: OUTPUT«625␤»
hulu r: my $x = ~[**] 5, 4,3;say $x;
p6eval rakudo 6d5dc6: OUTPUT«542101086242752217003726400434970855712890625␤»
swarley Okay no this is terrible 04:34
Time to try with gcc-4 04:35
-3*
hulu r: my $x = ~** 5, 4;say $x; 04:36
p6eval rakudo 6d5dc6: OUTPUT«===SORRY!===␤HyperWhatever (**) is not yet implemented. Sorry. ␤at /tmp/cgQS0vN0bS:1␤------> my $x = ~**⏏ 5, 4;say $x;␤»
hulu r: my $x = ~[**] 5, 4;say $x; 04:37
p6eval rakudo 6d5dc6: OUTPUT«625␤»
swarley h_27> Emily i dont think they assept returns
21􏿽xAB21
whoops
hulu r: my $x = ~[**] 5..4;say $x;
swarley CONST_STRING split across lines at 461 in src/string/api.c
p6eval rakudo 6d5dc6: OUTPUT«1␤»
hulu r: my $x = ~[**] (5..4);say $x;
p6eval rakudo 6d5dc6: OUTPUT«1␤»
04:41 sevin left
hulu r: my ($major,$minor)=(5,3);my @array := [[k,k,k],[k,k,k],[k,k,k]];@array[pick 1, ^$major][pick 1,^$minor]=' '; 04:54
p6eval rakudo 6d5dc6: OUTPUT«===SORRY!===␤Undeclared routine:␤ k used at line 1␤␤»
hulu r: my ($major,$minor) = (5,3);my @array := [ for ^$major { [ for ^$minor {'@'} ] } ];@array[ pick 1, ^$major ][ pick 1, ^$minor ] = ' ';.say for @array; 04:59
p6eval rakudo 6d5dc6: OUTPUT«@ @ @␤@ @ @␤@ @ ␤@ @ @␤@ @ @␤»
hulu what's means ^$major , pick 1 05:00
05:00 Targen_ joined
geekosaur r: .say for ^5 05:01
p6eval rakudo 6d5dc6: OUTPUT«0␤1␤2␤3␤4␤»
05:01 alec left
geekosaur r: pick 1, ^5 05:01
p6eval rakudo 6d5dc6: ( no output )
geekosaur r: say pick 1, ^5
p6eval rakudo 6d5dc6: OUTPUT«0␤»
geekosaur r: say pick 1, ^5
p6eval rakudo 6d5dc6: OUTPUT«1␤»
geekosaur r: say pick 1, ^5
p6eval rakudo 6d5dc6: OUTPUT«4␤»
geekosaur r: say pick 2, ^5 05:02
p6eval rakudo 6d5dc6: OUTPUT«4 1␤»
geekosaur r: say pick 3, ^5
p6eval rakudo 6d5dc6: OUTPUT«2 1 0␤»
geekosaur clear now?
05:02 Rix left 05:03 Targen left
clkao 7/win 30 05:03
05:09 Rix joined 05:13 alec joined 05:17 xinming joined
hulu Does perl6 has the cpan 05:20
05:21 xinming_ left
geekosaur github.com/tadzik/panda/ 05:24
I think if you have rakudo star installed you should have panda as part of that? 05:25
(r* is not as up to date as the main rakudo distribution; its focus is stability and usability, so it comes with useful stuff like that and some other bundled modules) 05:26
hulu thx 05:27
06:13 hulu left 06:18 quester joined 06:20 bapa left 06:23 bapa joined 06:35 erkan left 06:43 benabik left 06:45 Patterner left 06:54 geekosaur left 06:55 geekosaur joined
moritz geekosaur: R* IS the main rakudo distribution 07:13
phenny moritz: 01 Feb 20:53Z <[Coke]> tell moritz to change **{1..3} to **1..3 in this code: perlgeek.de/en/article/5-to-6#post_07
moritz I know of no other rakudo distribution, in fact 07:14
07:15 hulu joined
moritz [Coke]: fixing right now, thanks 07:16
hulu what's means of $*CORE
moritz the * means it's a dynamic or global variable 07:19
hulu r: constant %term = (:dba('term') , :prec<z=>); 07:21
p6eval rakudo 6d5dc6: ( no output )
hulu r: say constant %term = (:dba('term') , :prec<z=>);
p6eval rakudo 6d5dc6: OUTPUT«"dba" => "term" "prec" => "z="␤»
hulu what's means :dba('term') 07:22
moritz dba stands for "Do Business As". It's a human-readable name for the current rule that is used in error emssages 07:25
hulu why use ":" 07:26
07:26 quester left
moritz it intorudces a pair 07:26
07:27 Psyche^ joined, Psyche^ is now known as Patterner
hulu moritz: thx 07:28
07:39 vividsnow joined 07:44 domidumont joined 07:59 Patterner left 08:04 vividsnow left, Psyche^ joined, Psyche^ is now known as Patterner 08:08 domidumont left 08:09 domidumont joined 08:16 daniel-s joined
masak morning, #perl6 08:21
nwc10 jnthn++ # bloggage 08:22
so good I read it twice 08:28
moritz still hasn't finished it, too many interruptions 08:38
jnthn: "we know that the JVM’s idea of type if some way off the Perl 6 notion of type" s/if/is/ 08:40
jnthn++ # very nice blog post 08:45
09:00 erkan joined 09:21 sqirrel joined 09:29 PacoAir joined 09:35 kaare_ joined 09:45 Psyche^ joined, PacoAir left, PacoAir_ joined 09:48 Patterner left, Psyche^ is now known as Patterner
masak is at the FOSDEM 09:48
sjn too o/ 09:49
masak :)
don't sneak up on me like that :P
jnthn: s/there more this applies/the more this applies/ in le blog post 09:53
I like how much jnthn actually manages to weave DDD into the introduction ;) 09:54
arnsholt Wow, long blog is long 09:55
jnthn++
masak you mean all the blog posts together amount to a lot of text? yes. 09:56
masak grins
09:57 PacoAir_ left 09:59 PacoAir joined
moritz giant episode of planetsix :-) 10:03
nqp: nqp::printf('a%d', 42) 10:12
p6eval nqp: OUTPUT«Error while compiling block : Error while compiling op printf: No registered operation handler for 'printf'␤current instr.: '' pc 46589 (src/stage2/QAST.pir:16197) (src/stage2/QAST.nqp:2447)␤»
10:23 SunilJoshi joined
hulu where i can get perl 6 complete.pdf 10:45
moritz jnthn: wrapping variables in a QAST::Want isn't quite as trivial as hoped for: binding checks if stuff is a QAST::Var
hulu: what would that be?
hulu perl 6 complete is a book's name 10:46
<perl 6 complete> is a book's name 10:47
moritz then probably from the publisher 10:48
though I wonder if it was ever released at all 10:49
10:51 hulu_ joined, hulu left, SunilJoshi left
hulu_ helo 10:51
where i can download the book named <perl 6 complete> 10:52
moritz hulu_: I just discussed that with hulu
why do you ask the same question again?
tadzik :D 10:53
hulu_ i just break online
please 10:54
repet
moritz hulu_: irclog.perlgeek.de/perl6/2013-02-02#i_6404426 10:56
hulu_ moritz: i am looking 10:57
masak: helo
moritz: thx
moritz: where i can find the book of perl6 11:07
tadzik hulu_: perl6.org/documentation/ contains everything you need 11:08
we took special care of that 11:09
11:09 Su-Shee left
hulu_ <Learning Perl 6> where i can download it 11:10
tadzik: <Learning Perl 6> where i can download it
tadzik I've no idea, I've never heard of that book 11:11
11:11 Su-Shee joined
nwc10 gah. hateful: 11:13
$ gcj -C -fsource=7.0 -classpath 3rdparty/bcel/bcel-5.2.jar -d bin src/org/perl6/nqp/jast2bc/JASTToJVMBytecode.java src/org/perl6/nqp/runtime/Base64.java
source level should be comprised in between '1.3' and '1.6' (or '5', '5.0', ..., '7' or '7.0'): 7.0
which part of 7.0 don't you understand?
apparently 7. 11:14
6 is fine.
hateful piece of tiobe-report
Is java.nio.file part of Java 7? 11:20
jnthn nwc10: Yes. 11:34
nwc10 OK, so I think that that gcj is producing a seriously-less-than-aweome error message 11:36
which should be "I can't do Java version 7. Sorry" 11:37
moritz please submit a bug report
nwc10 for what? 11:38
tadzik LTA error message :)
moritz gcj not telling you straight that it doesn't support version 7.0, but produces some bullshit error 11:39
nwc10 it's gcj-4.4. I think it's two versions beyond what gcc.gnu.org say they support 11:41
and I'm not sure if Debian are going to fix their package
jnthn According to wikipedia, "As of 2009 there have been no new developments announced from gcj." 11:42
And gcc.gnu.org/java/ makes it look very...stable. 11:43
nwc10 oh boy yes.
even Module::Build is more active than that
jnthn stackoverflow.com/questions/4035538...r-gcj-dead says it doesn't do the nio stuff 11:44
nwc10 oh ho ho. Fortunately Dennis installed javac on dromedary, so I'll try there 11:45
(dromedary is the failover machine for perl5.git.perl.org) 11:46
11:46 cogno joined
hulu_ moritz: what diff between != !== 11:50
moritz hulu_: they are the same 11:53
!= is kept for historical purposes 11:54
s/purposes/reasons/
cogno One can see it as an huffmanization too 11:59
hulu_ moritz: my @sorted = @names.sort({ %sets{$_} }).sort({ %matches{$_} }).reverse; what's means 12:02
nwc10 I wonder why gcj died 12:03
hulu_ moritz: what's ({ %sets{$_} }) means 12:05
12:06 cogno left
nwc10 t/nqp/46-charspec.t ....... no ICU lib loaded 12:08
apart from that, all tests successful on dromedary
tadzik that's from Parrot
Parrot must be compiled with libicu-dev present
nwc10 which I infer isn't installed on dromedary
tadzik probably
jnthn nwc10: Thanks for doing a test run :) 12:11
Nice to see it Just Works elsewhere too
nwc10 yes, pleasingly "just works" once you have a real javac
jnthn *nod* 12:12
moritz hulu_: { ... } is a block, which puts its argument into $_ 12:13
and %sets{$_} is a hash lookup
12:16 sorear left
tadzik so I move from maintaining parrot myself to nqp --gen-parrot 12:17
zeitgeist
12:32 Targen joined, Targen_ left 12:40 sorear joined
hulu_ moritz: my @sorted = @names.sort({ %sets{$_} }).sort({ %matches{$_} }).reverse; what's means 12:45
12:49 cognominal joined 12:51 SunilJoshi joined 12:57 SunilJoshi left 12:59 SunilJoshi joined 13:02 vividsnow joined 13:04 MayDaniel joined
moritz hulu_: doesn't the text that you got this from explains it? 13:13
hulu_: also, try to find out stuff on your own. Run part of the statement (for example just @names.sort({ %sets{$_} }) ) and see what you get. Then run more of it, and see what you get, and so on 13:14
13:20 FROGGS_ is now known as FROGGS
FROGGS hi there 13:21
moritz \o FROGGS
13:27 sorear left 13:34 Targen left
masak yay, talk seems to have gone fine \o/ 13:37
swarley > exit 13:39
Null PMC access in find_method('new')
That's from nqp, what is the exit command supposed to be? 13:40
masak what's the exit command? 13:41
swarley Like.. Exiting the shell?
masak (worksforme -- here it's just silent)
swarley: did you read about `exit` somewhere? what suggests to you that that's the way to abort the REPL?
swarley oh, no i didn't 13:42
13:42 cognominal left
masak > sub exit() { say("You can check out anytime, but you can never leave") } 13:42
> exit()
You can check out anytime, but you can never leave
swarley It works to exit rakudo
masak ok. 13:43
> sub exit() { last }
> exit()
masak@ubuntu:~$
:P
swarley oh
masak yes, exit() is spec'd in S29 for Perl 6. 13:44
but nqp is a non-strict subset of Perl 6, so it's not clear to me that it's part of nqp.
that said, it would be nice, of course. 13:45
swarley I just assumed, since that's the only way I've seen to exit interpreters properly
masak ^D
^C
swarley Well yeah. But I mean programmatically
I used EOF to get out of the REPL when exit wouldn't work 13:46
But I generally don't like using it
masak 'exit' wouldn't work in nqp even if the subroutine were defined, unless it were special-cased.
you'd have to write it as 'exit()'. 13:47
13:47 hoelzro|away is now known as hoelzro
moritz nqp: nqp::exit(0); say("still here") 13:47
p6eval nqp: ( no output )
swarley ah, right. I always forget about that.
masak moritz++
so, exit exists. case closed :)
swarley oh okay. Cool 13:48
Or, I can just use last haha. It seems to work to exit the repl as well
nqp: last; say("hello") 13:49
p6eval nqp: OUTPUT«Warning␤hello␤»
swarley warning?
13:51 cognominal joined, thundergnat joined
moritz well, the last exits the L in REPL :-) 13:58
thundergnat Is there a way in Rakudo to augment a parent type at run time and have the augmented method available to child types automatically? I know that used to "work" but it's entirely possible I was (ab)using unspecced behavior. :/ 14:00
r: use MONKEY_TYPING; augment class Int { method foo (*@) { "foo" } }; say Int.foo;
p6eval rakudo 6d5dc6: OUTPUT«foo␤»
thundergnat r: use MONKEY_TYPING; augment class Cool { method foo (*@) { "foo" } }; say Int.foo; #:(
p6eval rakudo 6d5dc6: OUTPUT«No such method 'foo' for invocant of type 'Int'␤ in block at /tmp/2jjKk3JKph:1␤␤»
thundergnat :(
moritz thundergnat: it should work, I think
but it's tricky to do 14:01
thundergnat It did what I expected as late as 2012.10. I just updated to latest and it no longer does. 14:02
*latest Rakudo
moritz 2012.10 did it right? 14:03
that's surpising
thundergnat Yes
14:04 b1rkh0ff left
thundergnat Should I file a bug report? I wasn't entirely sure that the change was unintended 14:05
moritz yes, please report 14:06
14:12 sorear joined 14:15 cognominal left 14:18 b1rkh0ff joined 14:26 SunilJoshi left
nwc10 How come this doesn't generate any output? 14:40
nqp nqp-jvm-cc.nqp -e 'say(@ARGS[1])' aa bb cc
(just using nqp outputs aa)
moritz does it produce a newline at least?
does it work with nqp::say(@args[1]) 14:41
and I hope with nqp it outputs bb :-)
nwc10 yes, it produces a line. So, bad me for misdescribing
Use of undeclared variable '@args' at line 2, near "[1])" 14:42
14:42 xinming left
nwc10 and an explosion of backtrace 14:42
moritz maybe @ARGS/ @*ARGS isn't set up properly
14:42 xinming joined
nwc10 aha. 14:43
that sounds plausible
nwc10 was playing with nqp/examples/fib.nqp and wanted to tweak it to take $H on the command line 14:45
gah, $N
anyway, I *have* tweaked it locally
but nqp-jvm ignores @ARGS, it seems
arnsholt Hmm. Looks like my refactor broke something 14:50
That's an annoying thing with floats. It less obvious what's wrong when they have weird values 14:51
nwc10 not exactly comparing like-with-like, but for various fibonachi example scripts, NQP on the JVM is 8 times faster than on Parrot 14:54
and runs in about 60% of the time of Perl 5
moritz woah :-) 14:55
arnsholt Nice!
nwc10 which is nice. The NQP code isn't using typed variables
arnsholt Even better. Gonna try with the types as well?
14:56 kaare_ left, SunilJoshi joined 15:01 zby_home_ joined
nwc10 a) I don't know the syntax 15:04
b) it probably makes the program buggy, as it's intended to be able to be calculate values larger than a native int
arnsholt In that case native types aren't a good idea, yeah 15:05
Instead you can say that not only is it a bit faster than Perl 5, it also handles arbitrary precision =)
15:13 awwaiid joined
jnthn nwc10: I didn't implement the @ARGS stuff properly yet. Feel free to add a note about it to ROADMAP...or patch it ;) 15:15
15:15 SunilJoshi left
nwc10 I haven't worked out *where* to patch it 15:15
(let alone how)
jnthn my int $x # how you declare native int
nwc10: Hm, I'm not sure either ;) 15:16
15:18 SunilJoshi joined 15:19 SunilJoshi left 15:22 hulu_ left
timotimo oh, slice context? never heard of that one 15:33
r: say @@( <a b> Z <c d> ) # (['a', 'c'], ['b', 'd']) 15:34
p6eval rakudo 6d5dc6: OUTPUT«===SORRY!===␤Non-declarative sigil is missing its name␤at /tmp/XAfcf6dfLS:1␤------> say @⏏@( <a b> Z <c d> ) # (['a', 'c'], ['␤ expecting any of:␤ argument list␤ prefix or term␤ prefix or meta-prefix␤…
timotimo oh, seems like that has been removed again
15:34 sqirrel left
timotimo moritz: could you remove that from the 5-to-6 document, too? (or anyone else could tell me what i'm missing ;) ) 15:34
moritz timotimo: the 5-to-6 document takes the specs as the standard, not what's implemented
timotimo oh, so @@ is in the spec? good to know 15:35
n: say @@( <a b> Z <c d> ) # (['a', 'c'], ['b', 'd'])
p6eval niecza v24-18-gaf64300: OUTPUT«===SORRY!===␤␤Non-declarative sigil is missing its name at /tmp/0ARfjqzUD7 line 1:␤------> say ⏏@@( <a b> Z <c d> ) # (['a', 'c'], [␤␤Unsupported use of bare 'say'; in Perl 6 please use .say if you meant $_, or use …
timotimo std: say @@( <a b> Z <c d> ) # (['a', 'c'], ['b', 'd'])
p6eval std 7deb9d7: OUTPUT«ok 00:00 43m␤»
timotimo should have tried that before complaining.
timotimo tries to make a better error message for rakudo 15:36
moritz oh hm, might be gone from the specs
ack -Q '@@' # no match
timotimo oh? hm.
is it in STD because it emits some other kind of parse? 15:37
moritz maybe it parses it as @( @( ... ) ) 15:38
timotimo should that be acceptable?
moritz I have no idea 15:39
oops, seems that @@ was removed in Feb 2010
arnsholt There we go 15:42
If you assign a FLOATVAL to the INTVAL of a union and expect to get the right results, you're gonna have a bad time 15:43
15:43 hoelzro is now known as hoelzro|away
moritz shouldn't that give a compiler warning? 15:46
timotimo would it make any sense for rakudo to emit an obsoletion warning? 15:49
i mean for @@( ... )?
"please use .LoL instead"? "please use .tree instead"? 15:50
moritz I don't think so, because it never implemented it
timotimo well, i think the obsoletion exception puts a "in perl6, please use $replacement instead"
okay, nothing to do here then :)
arnsholt moritz: Apparently not. I only think you get warnings for implicit conversions with certain -W flags 16:00
moritz -Wall :-) 16:02
arnsholt Not one of the flags Parrot turns on for compilation, unfortunately =) 16:03
16:03 sevin joined
timotimo oh, i totally didn't know rule and token implied ratchet 16:03
16:05 mikemol left
masak I have signed copy of the new "Beginning Perl" by Ovid. 16:06
arnsholt Cool!
Ovid is one of the Perl people I'd really like to meet one day 16:07
He seems like a hoopy frood
masak I told him I was a big fan of his, so the signature says "Carl, it was great to see you here! Keep your hands to yourself. -- Ovid" :P
timotimo :D
arnsholt =D
timotimo that's cute. unless you creeped on him ;)
masak don't think so.
it was all in jest. 16:08
well, except for me being a great fan of his.
as evidenced by strangelyconsistent.org/blog/ovid-i...re-awesome
timotimo that reminds me that i haven't looked at druid again for a long time. i think the last time i did i was tripped up by not really understanding new and BUILD properly 16:13
masak Druid certainly predates a lot of BUILD changes in Rakudo. 16:15
timotimo maybe i just need to write something myself that uses different aspects and combinations of BUILD and new in a context that makes sense 16:16
16:16 vividsnow left
timotimo but try to come up with something like that! ;) 16:16
masak short rule: BUILD is for initializing your attributes at object construction time. define your own 'new' method when you want a 'new' method with a nonstandard signature. 16:18
arnsholt But if you write your own new, you have to bless as well, right? 16:19
timotimo right. i think what i didn't quite understand was how to pass things from the new method to the BUILD method
arnsholt: i believe so
in controlling lazyness, maybe "my $ls = lazy { $expansive_computation };" meant to read "expensive" instead? 16:20
masak arnsholt: yes.
timotimo but i think both words could be correct in this case
masak arnsholt: constructors (by definition) are methods that .bless
arnsholt Yeah, that's what I thought
masak arnsholt: I wouldn't ever create a method 'new' that isn't a constructor.
arnsholt Definitely. That'd be a recipe for disaster I think 16:21
masak it's mroe common than people think to have non-'new' constructors.
MyGrammar.parse, for example.
more*
arnsholt And DBIish.connect if memory serves
timotimo how about a new method that returns something from a cache? would that be considered bad, because it's not a "new" object?
submethod new($foo) is cached { ... } ;) 16:22
16:22 thundergnat left
masak timotimo: depends on the other invariants on the class, I'd say. 16:22
feels a bit odd, but not necessarily morally wrong.
timotimo mhm. for an immutable class, it's probably not problematic, but for a mutable one it might rub people the wrong way 16:23
arnsholt Heh. "Morally wrong" ^_^
timotimo is ; in parameter lists of calls a thing? i don't think i ever really understood what it's for. is it to prevent lists passed as arguments from being flattened together by the , operator? 16:24
but i thought you needed | for that? 16:25
(me with the non-questions again!)
arnsholt I think it interacts with multidispatch somehow
(The stuff after ; isn't considered when dispatching?) 16:26
jnthn Yes, that. 16:27
It makes what's beyond the ; not be consider by the multi-dispatch candidate sorting thingy.
masak do we still have ;; ? 16:28
(or did I dream that?)
16:32 sevin left
jnthn I...have some memories of something like that... :) 16:32
Is that the "produces separate candidates" thing?
timotimo like two alternative signatures that both cause the same candidate to be invoked? 16:34
16:34 sevin joined
timotimo sub frob(Int $a, Str $b;;Str $a, Int $b) { say "one is a string, the other an int." } 16:34
r: sub frob(Int $a, Str $b;;Str $a, Int $b) { say "one is a string, the other an int." }; frob(1, "10"); frob(10, "1");
p6eval rakudo 6d5dc6: OUTPUT«===SORRY!===␤Redeclaration of symbol $a␤at /tmp/qAV6Lmn8QM:1␤------> sub frob(Int $a, Str $b;;Str $a⏏, Int $b) { say "one is a string, the ot␤»
jnthn timotimo: No, more than you declare candidates of different lenght for the purpose of multi-dispatch 16:35
timotimo: I may be misremembering.
S06 will have the details :) 16:36
16:47 kaare_ joined 16:48 SunilJoshi joined
Celelibi hi 16:49
Is there a cpan for perl6 ?
huf modules.perl6.org/ 16:50
there's that
geekosaur github.com/tadzik/panda/
Celelibi thx.
huf yeah, the client is panda 16:51
dalek p/dyncall-sized-num: 65c6ac0 | (Arne Skjærholt)++ | src/6model/reprs/P6 (2 files):
Make P6{int,num} complain about weird bit sizes, and teach P6int sub-bytes.
p/dyncall-sized-num: 59a19e2 | (Arne Skjærholt)++ | src/ (4 files):
Refactor {bind,at}_pos_ref to follow the new native access scheme.

I think we're most of the way there now. Some cleanup left to do, but the hard work should be done.
jnthn arnsholt++ 16:52
dalek kudo/dyncall-sized-num: 80dc914 | (Arne Skjærholt)++ | src/binder/sixmodelobject.h:
Update sixmodelobject.h.
volaj: bf396de | (Arne Skjærholt)++ | t/05-arrays. (2 files):
Add tests for sized ints and nums in arrays.
16:53
arnsholt jnthn: Oh, one thing. Previously, CArray returned NULL for out-of-bounds, but that's not possible anymore. I guess returning a zero value is the best we can do? 16:56
16:57 vividsnow joined
jnthn arnsholt: What were we doing on out of bounds before? 16:58
Celelibi Well. Looks like there is no image lib for perl6 yet.
arnsholt The old approach returned a pointer to the data, so we returned a NULL pointer 16:59
But there's no pointer-passing anymore, so that can't happen anymore
jnthn arnsholt: Yeah, I meant what happened in response to the null pointer? 17:00
arnsholt: If it was that the op threw an exception, we could maybe do it right in the REPR... 17:01
17:02 snobby left 17:03 sevin left
arnsholt jnthn: Oh, right 17:03
arnsholt checks
17:04 grondilu joined
arnsholt Hmm. Looks like noone did any bounds checking, so we may have ended up segfaulting... 17:05
Err, s/bounds/null pointer/
grondilu Was masak's talk at FOSDEM recorded?
arnsholt jnthn: I don't think that particular code path had ever been tested, TBH 17:09
Going by the code in master, I'm pretty sure it'll try to read from a NULL-pointer
There's an out-of-bounds test, but that one gets a pointer object, not a native 17:10
jnthn Ah. 17:12
Guess we get to not segfualt then ;)
arnsholt In that case I guess we can do whatever we want to, since there's no (sensible) backwards compat to worry about 17:13
jnthn :) 17:16
Yes, I'm happy not being backward compatible with segfaulting.
dalek p: f88e4e8 | jnthn++ | src/core/NQPRoutine.pm:
Port multi-dispatch candidate sort to NQP.

This is a fairly direct port of the C code rather than an attempt to be a great deal more idiomatic. Not yet used for anything.
17:17
17:18 sevin joined, sevin left
nwc10 so, will there be a mini-perl6 hackathon at FOSDEM tomorrow to make the multi-dipsatch canditate sort to ideomatic? :-) 17:19
17:21 FROGGS left 17:23 rindolf joined
rindolf Hi all. 17:23
TimToady: here?
TimToady but not really awake yet 17:24
rindolf TimToady: ah.
timotimo oh, huh, you can junction signatures
rindolf TimToady: what is the percentage of your awakeness?
awkity?
awakity?
awakedom?
awakehood?
17:24 benabik joined
rindolf is in a silly mood. 17:25
TimToady well, somewhere above 50%, but the coffee hasn't quite hit yet
rindolf TimToady: ah.
TimToady: this is one reason why I abstain from caffeine.
Well, I eat it a little in foods.
TimToady: OK, what's new?
TimToady: how's the family? Kids? Grandkids? 17:26
rindolf thinks of a really big young goat.
Grandkid.
TimToady well, I'm looking at one of the two grandkids kicking on the sofa
the new one is 6 months old or so
rindolf TimToady: ah.
TimToady (this one is Geneva's)
rindolf TimToady: you have a daughter called Geneva? 17:27
TimToady last I checked
rindolf TimToady: OK.
Celelibi Is raduko really usable currently?
rindolf TimToady: I hope this trend will continue.
TimToady too
Celelibi: for some things, sure
jnthn Celelibi: Depends what you want to use it for.
jnthn has successfully used it for various stuffs :) 17:28
rindolf Celelibi: depending on how usable and what for.
Celelibi I mean: can I move from perl5 to perl6?
rindolf Celelibi: also see Niecza (sp?)
Celelibi: you shouldn't "move".
TimToady Celelibi: you can start using both
rindolf Celelibi: you should learn it and use both.
Celelibi Well, currently I can't really use Perl6 since it really lacks modules.
TimToady programming in Perl 6 will improve your Perl 5 as well 17:29
rindolf Celelibi: do you mean something like CPAN?
Celelibi yes.
TimToady Celelibi: what you mean by "usable" is that everyone else has done the hard work for you :P
Celelibi precisely. :) 17:30
TimToady well, we're all working very hard around here
Celelibi Is there any way to use perl5 modules from a perl6 code?
rindolf Celelibi: well, feel free to write a new Perl 6 module or enhance an existing one. 17:31
Celelibi: CPAN was not built in a day.
Celelibi: and we now also want to enable Perl 6 to make use of the Perl 5-based CPAN.
Celelibi: there may be Inline::Rakudo on CPAN.
TimToady Celelibi: there is a way to use some modules, depending on how fancy you need the API to be; this will probably improve greatly over the next six months 17:34
rindolf TimToady: BTW, have you studied Esperanto? 17:35
17:36 spider-mario joined
Celelibi Well. I currenty need to write a few scripts manipulating images. And I thought "hey, why not let this be an exercise to practice perl6?" 17:36
TimToady nope, did a bit of Lojban, saw the error of my ways
Celelibi But I don't think I'll do this if that means porting Image::Magick to perl6.
rindolf TimToady: ah.
TimToady: I see.
TimToady: BTW, don't you want to learn Hebrew?
TimToady I want to learn every language, but I have only one brane, and more importantly, only 24 hours in a day 17:37
rindolf TimToady: giving infinite time and infinite motivation.
Celelibi All we need is a Matrix-like knowledge transfer system.
17:38 FROGGS joined
rindolf Celelibi: I think Asimov talked about it too. 17:39
arnsholt jnthn: VTABLE_get_integer_keyed will return 0 if the key is absent, right? 17:40
Celelibi Who never thought about a way to plug his brain to a computer? :)
jnthn arnsholt: Believe so, yes.
arnsholt Excellent 17:41
It's the proper thing to do I think, but always good to get a second opinion
rindolf Celelibi: well, maybe it dates back to the hallucinations of the Jewish prophets. 17:44
Celelibi: who met God and his angels.
Celelibi: BTW, לנבא in Hebrew did not originally meet to predict the future (that was a mistranslation in LXX which also influenced Jewish thought) but rather it meant to hallucinate voices of "Jehuvah"/"The Owner"/other Gods for guidance 17:46
TimToady well, I believe that God will choose to speak through whatever medium is currently in vogue :)
rindolf Celelibi: at least that's what I understood from en.wikipedia.org/wiki/Bicameralism_...chology%29
TimToady nowadays it's more likely to be the Internet :)
rindolf TimToady: I think everyone can speak as God sometimes. 17:47
TimToady which is a kind of mass hallucination :)
geekosaur reality is a mass hallucination, by some arguments
TimToady but a very nice one, in spots
geekosaur wonders how many religions have a Prime Hallucinogen 17:48
Celelibi What if we're all bare-flesh connected to a single huge computer simulating the world? 17:49
TimToady well, that's kinda what the holographic principle is claiming in physics :) 17:50
as long as the medium I'm swimming around in supports creativity, I don't mind if there's a better Creator 17:51
rindolf TimToady: the Roman Catholic Pope now has a Twitter account.
TimToady perhaps quantum strings are limited to 140 characters 17:52
rindolf TimToady: :-) 17:53
TimToady: www.robcottingham.ca/cartoon/archiv...rain-fire/ - see this and my comment.
TimToady: once upon a time, Gutenberg's Bible was as looked down upon as Twitter/Facebook/Google+ today.
TimToady fire made your brain like cooked food :)
rindolf TimToady: at least I think. 17:54
TimToady: yes.
TimToady otoh, cooked food is actually more nutritious, so I don't hold it against fire
colomon rn: say "this is a test" [&split] " "
p6eval niecza v24-18-gaf64300: OUTPUT« ␤»
..rakudo 6d5dc6: OUTPUT«===SORRY!===␤Unable to parse expression in bracketed infix; couldn't find final ']'␤at /tmp/o0E5alr0Wb:1␤------> say "this is a test" [&⏏split] " "␤»
TimToady so I don't mind if God changes our brains for the better either :) 17:55
rindolf TimToady: well, without fire, we wouldn't be talking today on IRC.
colomon n: say ("this is a test" [&split] " ")
p6eval niecza v24-18-gaf64300: OUTPUT« ␤»
colomon n: say split "this is a test", " "
p6eval niecza v24-18-gaf64300: OUTPUT« ␤»
colomon ah
n: say (" " [&split] "this is a test ")
p6eval niecza v24-18-gaf64300: OUTPUT«this is a test ␤»
colomon n: say (" " [&split] "this is a test ").perl 17:56
p6eval niecza v24-18-gaf64300: OUTPUT«["this", "is", "a", "test", ""].list␤»
TimToady sometimes wonders why we only blame God for the scary bits of the universe ("it was an Act of God...")
rindolf TimToady: well, like Muhammad said, “Trust in God, but tie your Camel”. 17:57
colomon thinks of "Wonder of wonders, miracle of miracles" as a counter-example.... what's the write name of that song?
rindolf colomon: don't know.
TimToady indeed, hafta run some errands, or scary bits will happen to me :)
afk &
rindolf TimToady: bye, have fun. 17:58
colomon rindolf: ah, it's just "Miracle of Miracles".
rindolf colomon: ah, OK.
colomon in case anyone is wondering what I'm going on about: www.lyricsondemand.com/soundtracks/...yrics.html 18:01
rindolf colomon: ah, Fiddler on the Roof! 18:07
colomon: “If I were a richman”
arnsholt jnthn: 'Nother question: Is NULL a sensible zero-value for a Parrot STRING*, or should I create an empty string or some such?
jnthn STRINGNULL or so
It's the equivalent to PMCNULL 18:08
rindolf colomon: nice song!
arnsholt Right, right. I keep forgetting Parrot has those things
rindolf colomon: as a child I was an Atheist, then became a half-Jewish/half-Deist, then an Atheist again and now I'm an agnostic. 18:09
18:23 not_gerd joined
not_gerd hello, #perl6 18:25
how do I access environment vars from NQP?
18:25 kivutar joined
rindolf not_gerd: hi. 18:27
not_gerd: I presume with a PMC.
Parrot Magic Cookie. 18:28
But that's just wild-guessing.
18:29 rindolf left 18:30 spider-mario left
arnsholt not_gerd: Not entirely sure that's implemented in NQP yet. What do you need it for? 18:32
not_gerd arnsholt: I just ack'd through the Rakudo source, and there's indeed no wrapper yet 18:36
arnsholt > class Foo { has int1 $.tiny; method set() { $!tiny = 3; } }; my Foo $x .= new; $x.set; say $x.tiny
1
\o/
not_gerd arnsholt: trying to generate a nqp-jvm for windows via cygwin
I'll need the path separator to end up \; instead of ; or : 18:37
arnsholt Oh, right
18:41 clintongormley joined 18:42 SunilJoshi left
arnsholt jnthn: REPR compose is only supposed to happen once, right? 18:43
18:43 SunilJoshi joined
clintongormley Hi all. Just wanted to say how excited I am by jnthn's blog about the JVM. It's a pleasure to see all of your work and planning paying off. 18:43
i also saw the comment in irc about the nqp fibonacci running fast :) i'm hoping that applies to the rest of p6 too 18:44
18:44 SunilJoshi left
clintongormley is working in a java shop now, and the Perl jokes are becoming a little tiresome... 18:45
arnsholt I might submit a Perl 6 talk to a Java conference here in Norway =) 18:47
clintongormley heh
i can't wait for the day these java types start raving about how cool p6 grammars are
arnsholt =) 18:48
perigrin clintongormley: when the Perl jokes start up again just say "So ... closures hunh? Finally decided to catch up with 1994?" 18:57
clintongormley :D 18:58
not_gerd jnthn: github.com/jnthn/nqp-jvm-prep/pull/10 19:00
arnsholt perigrin: Or 1980, for that matter ;)
flussence
.oO( Perl's a real JokeFactoryFactory, ain't it? )
perigrin arnsholt: well yeah I'm just picking the place where I know Perl introduced lexical closures 19:01
19:01 sizz joined
perigrin clintongormley: then you can ask them if they'll be ready for Roles by 2025 19:02
clintongormley but they'll be called Joles, or Rojes, or something
not_gerd jnthn: there's a typo in my pull request - will fix
perigrin clintongormley: jTraits. 19:03
arnsholt Sure, gcc. When there's a missing paren in a macro call, flagging it at the END OF THE FILE is a good idea
swarley If I'm able to implement the p6 regular expression parser on ruby, would anyone be against me attempting to creating a nqp->YARV bytecode compiler?
perigrin swarley: I have no official position but I think it's safe to say "Heck no! Go for it!" 19:04
arnsholt I'd think it's a pretty cool thing to do =)
swarley For anyone that isn't aware, YARV is MRI Ruby's VM 19:05
perigrin guessed but wasn't sure.
arnsholt Oh cool. I thought it might be the Rubinius one
swarley No, Rubinius uses LLVM 19:07
Which, in my opinion
Is not the best choice for a dynamic language
But I'm not an expert, so what do I know
arnsholt Oh, right
not_gerd fixed typo in pull request 19:08
swarley Maybe it would be better to try to make a PASM -> YARV first
then maybe try PIR -> YARV
etc etc
perigrin I think that following teh same path jnthn took to the JVM would be a reasonable choice
swarley Well, my biggest concern is that I've not attempted something like that before. 19:09
I'm okay with lexical analysis. My biggest issue is with larger grammar construction
19:09 cognominal joined
perigrin mostly it's "get nqp working" then the rest bootstraps from what I gathered. 19:10
swarley Ah. 19:11
Well
I think I'm going to get familiar with YARV first
Do a little work with PASM
not_gerd swarley: PASM is deprecated
perigrin that's fair :)
swarley It's just for learning purposes
not_gerd and Rakudo really wants to be ported at the NQP layer 19:12
swarley I'm not planning to use a PASM parser
I just want to learn YARV bytecode with it
jnthn arnsholt: (REPR compose once) Yes, I tried to put in code to make sure of that in the various Perl 6 meta-objects 19:19
Porting NQP doesn't need writing a parser. 19:20
It does need writing a regex compiler... ;)
masak turns out I got to do a 20-minute impromptu talk about Perl 6 this afternoon :> 19:21
arnsholt jnthn: Yeah, that's what I'd surmised
masak (I did a TDD demo of implementing minesweeper, with lots of good questions from the audience)
jnthn But you can get to where the NQP JVM port is today using the normal NQP frontend to give you a QAST tree, then feed it to a backend.
arnsholt (I'm trying to port CStruct over to the new compose scheme) 19:22
jnthn not_gerd: Looking at your PR
dalek nqp-jvm-prep: 1796813 | (Gerhard R)++ | Makefile: 19:24
nqp-jvm-prep: Add some variable definitions to Makefile
nqp-jvm-prep:
nqp-jvm-prep: This way, we can easily override the tools to use via
nqp-jvm-prep:
19:24 dalek left
jnthn not_gerd++ # merged it all 19:24
19:25 dalek joined, ChanServ sets mode: +v dalek
jnthn masak: Sounds nice :) 19:26
masak++
not_gerd jnthn: thanks 19:27
dalek p/dyncall-sized-num: 96581f1 | (Arne Skjærholt)++ | src/6model/reprs/CStruct.c:
Die in CStruct if native type isn't a multiple of 8 bits wide.
19:31
p/dyncall-sized-num: 0048c0e | (Arne Skjærholt)++ | src/6model/reprs/P6 (2 files):
Make P6{int,num} robust when bits key is absent on REPR composition.
p/dyncall-sized-num: 1531df3 | (Arne Skjærholt)++ | src/6model/reprs/CArray.c:
Set sensible zero values in CArray on out-of-bounds access.
p/dyncall-sized-num: 1a8e58a | (Arne Skjærholt)++ | src/6model/reprs/P6opaque.c:
Teach P6opaque how to align objects properly.
p/dyncall-sized-num: 6b1e294 | (Arne Skjærholt)++ | src/6model/reprs/P6opaque.c:
Teach P6opaque how to deal with odd (not multiple of 8) native bit widths.
p/dyncall-sized-num: 2d2074c | (Arne Skjærholt)++ | src/6model/reprs/CArray.c:
Remove dead code from CArray.
p/dyncall-sized-num: bbf29dd | (Arne Skjærholt)++ | src/6model/reprs/CStruct.c:
Compute allocation strategy of CStruct on REPR compose.
arnsholt jnthn: I think that's pretty much it
masak heads out to dinner & 19:33
jnthn arnsholt: Great! \o/ 19:36
not_gerd jnthn: should the nqp-jvm Makefile stay cross-platform (ie work with nmake/bsd make) or can I add some GNU-isms? 19:37
jnthn not_gerd: Plesae don't break it with nmake or then I can't build ;-)
cognominal nr: $/ = 'foo'; say $/ 19:40
p6eval rakudo 6d5dc6: OUTPUT«foo␤»
..niecza v24-18-gaf64300: OUTPUT«===SORRY!===␤␤Unsupported use of $/ variable as input record separator; in Perl 6 please use the filehandle's :irs attribute at /tmp/diMHQswwBp line 1:␤------> $/⏏ = 'foo'; say $/␤␤Parse failed␤␤»
not_gerd goes investigating nmake syntax
cognominal niecza++
jnthn arnsholt: I'm reviewing commit by commit, so maybe you already tweaked this: 19:41
github.com/perl6/nqp/commit/e50b1c...bc9e#L0R71
The float/double distinction here seems useless in so far as you pass it to something taking a FLOATVAL (which will thus widen it to a double, most probably) 19:42
heh, copy_to turned out cutely :)
github.com/perl6/nqp/commit/e50b1c...c9e#L0R111 # is that missing a cast on the RHS maybe? 19:44
arnsholt Yeah, I'm very happy with copy_to. It keeps all the pointer-mucking in get and set 19:46
Right about the first one. That can be factored out of the if 19:47
On the second one, yeah I guess I should explicitly cast
You'll find the same thing in P6int, in that case 19:48
19:50 sizz_ joined 19:51 sizz left
swarley Where is the lexer/parser in parrot? 19:52
diakopter which one... there are many
swarley The one for PIR/PASM 19:53
19:53 MikeFair_ joined
jnthn arnsholt: In CArray, for the sensible "0 value" it may be more Perl 6-y for the num one to be NaN. 19:54
19:54 MikeFair_ is now known as MikeFair
swarley i can't seem to find anything with a relevant filename 19:55
arnsholt Troo, troo. So 0.0/0.0, I guess?
jnthn *nod* 19:56
19:57 MayDaniel left
jnthn arnsholt: Other than those small things, I'm very happy with this. :) 19:58
arnsholt++
arnsholt Speaking of, is there a special reason you do "float x = 0.0; value = x/0.0"?
jnthn arnsholt: Yes, my C compiler rejected explicit 0.0/0.0 as divide by zero error...as a compile time error 19:59
arnsholt Right, right. Keeping the compiler happy is plenty reason =) 20:01
20:04 bruges_ joined
swarley Is there not a grammar in th parrot source tree? 20:04
benabik swarley: The compiler for PIR/PASM is called IMCC. It's found in parrot/compilers/imcc/
swarley I can't see one..
20:04 domidumont left
swarley Oh, alright. Thank you very much 20:04
I saw that, and I was looking for it 20:05
I just didn't know it was there
swarley shivers
C parsers.. 20:06
20:06 bruges left
swarley oh wait, is that a .y i see? 20:06
japhb arnsholt, this commit looks strange to me: github.com/perl6/nqp/commit/6b1e294f6d
arnsholt, so if bits % 8 is 2, then you're going to add 2 to bits? Why?
benabik swarley: Yes. You probably want imcc.y and imcc.l 20:07
swarley oh thank heavens
arnsholt japhb: Der, derp, derp. Thanks =)
I did the very same thing for my first attempt at implementing alignment 20:08
japhb heh.
Easy mistake to make!
arnsholt It should be 8-bits%8, of course
jnthn d'oh, I missed that one too
japhb++
japhb OCD FTW
dalek p/dyncall-sized-num: f08620a | (Arne Skjærholt)++ | src/6model/reprs/P6opaque.c:
Fix braino in P6opaque computation of bitwidths.

  japhb++ for spotting it.
20:10
20:13 pmurias joined
arnsholt jnthn: For the explicit casts in P6int/P6num, I'll be explicit and cast all of 'em 20:14
For the floats, I think FLOATVAL is going to be Parrot_Float8 on most platforms, but INTVAL is Parrot_Int4 or 32-bit, and Parrot_Int8 on 64-bit, so there I'll have to cover all the cases anyways
pmurias swarley: porting QAST would be easier/more usefull than porting PIR
swarley I suppose you're right. Is the parser for that in NQP's repo? 20:15
japhb arnsholt, There are platforms where 4-byte float is necessary, but I don't know if current Parrot supports building for them. 20:16
jnthn swarley: There is no parser. See the t/qast/ tests in the nqp-jvm repo. If I was to start porting NQP anywhere today, I'd start out getting those to pass. 20:17
arnsholt If those platforms don't provide an 8 byte float type, NQP isn't going to compile, but if they do it's probably a good idea
cognominal nr: $_='a'; s :g /a/b; say $_
japhb (And then there's the whole mess of 10-, 12-, and 16-byte floating point numbers. And don't even get me started on 1- and 2-byte ones, because those would never get used as the standard native on anything but an old video card ...)
p6eval rakudo 6d5dc6: OUTPUT«===SORRY!===␤Unrecognized adverb: :g␤at /tmp/AQpPkdqEgi:1␤------> $_='a'; s :g ⏏/a/b; say $_␤Malformed replacement part; couldn't find final $stop␤at /tmp/AQpPkdqEgi:1␤------> $_='a'; s :g /a/b; say $_⏏<EOL>␤ …
..niecza v24-18-gaf64300: OUTPUT«===SORRY!===␤␤Malformed replacement part; couldn't find final / at /tmp/676xM3kY3D line 1:␤------> $_='a'; s :g /a/⏏b; say $_␤␤Parse failed␤␤»
arnsholt And I sort of like the symmetry of it, in any case
cognominal oops
swarley what is the exact definition of QAST?
cognominal nr: $_='a'; s :g /a/b/; say $_
p6eval rakudo 6d5dc6: OUTPUT«===SORRY!===␤Unrecognized adverb: :g␤at /tmp/lCkLYXvcV9:1␤------> $_='a'; s :g ⏏/a/b/; say $_␤ expecting any of:␤ colon pair (restricted)␤»
..niecza v24-18-gaf64300: OUTPUT«b␤»
swarley i'm assuming Q abstract syntax tree
cognominal nr: $_='a'; s:g/a/b/; say $_ 20:18
p6eval rakudo 6d5dc6, niecza v24-18-gaf64300: OUTPUT«b␤»
cognominal nr: $_='a'; s :g/a/b/; say $_
p6eval niecza v24-18-gaf64300: OUTPUT«b␤»
..rakudo 6d5dc6: OUTPUT«===SORRY!===␤Unrecognized adverb: :g␤at /tmp/9W2Sq334qT:1␤------> $_='a'; s :g⏏/a/b/; say $_␤ expecting any of:␤ colon pair (restricted)␤»
jnthn swarley: Q abstract syntax tree, yes. 20:19
swarley: It replaced PAST, and Q is P++. :)
dalek p/dyncall-sized-num: e221d3d | (Arne Skjærholt)++ | src/6model/reprs/CArray.c:
Return NaN instead of 0.0 on out-of-bounds read in CArray.
p/dyncall-sized-num: 9cb0060 | (Arne Skjærholt)++ | src/6model/reprs/P6 (2 files):
Explicitly cast assigned values to the correct type in P6{int,num}.

Also factors out a shared subexpression in P6num.
swarley oh, haha. 20:20
japhb jnthn, that is fast becoming a top FAQ, I think. Certainly in the top 5 this last week alone ...
not_gerd in principle, parrot should build with FLOATVAL set to float instead of the default double, but I don't know if that has ever been tested 20:21
jnthn japhb: I'm not particularly sure where to put the answer though ;)
not_gerd using something alse is problematic because the range of floating point types can't be determined programatically and Parrot lacks the configure logic to handle user-supplied floating-point specification
jnthn japhb: I did say so in my blog :)
But I guess only so many read that ;) 20:22
swarley jnthn, is nqp-jvm a branch of github:perl6/nqp?
jnthn swarley: No, separate repo for now 20:23
github.com/jnthn/nqp-jvm-prep 20:24
swarley oh, alright. Thank you
So, there is technically no grammar? 20:26
pmurias yes 20:27
Perl 6 and NQP (a Perl 6 dialect) are compiled to QAST
swarley Okay, so is there like.. A QAST opcode listing?
pmurias github.com/perl6/nqp/blob/master/d...t.markdown 20:28
swarley: that's partial documentation 20:29
20:29 kaare_ left
pmurias swarley: github.com/jnthn/nqp-jvm-prep/tree...ter/t/qast 20:30
swarley: test for QAST
* tests
swarley Alright.. This seems like it's going to be a long time! 20:31
and these things
QAST::Var.new( :name('knowhow'), :scope('local'), :decl('var') ),
Just named parameters right?
jnthn var is a variable
swarley Well ye
s
But I mean
jnthn :decl('param') adds a parameter
swarley :name, :scope
jnthn Oh, I see 20:32
Yeah, that is saying "this is a declaration of a local variable called knowhow"
swarley alright cool.
Do these tests explain well enough what the intended operation is?
FROGGS swarley: named params can be like: :name('value'), :name<value>, and even :$name 20:33
swarley Also, is there a test that I should start with trying to pass?
jnthn swarley: qast_literal.t is probably the simplest one. 20:35
swarley alright sounds good 20:41
20:42 MayDaniel joined 20:50 MayDaniel left 21:01 sizz joined 21:02 sizz_ left
swarley So wait, would it be better to rewrite the bootstraps for YARV? 21:05
not that I understand any of it o_O 21:06
Wait, that has to be generated from nqp itself or something 21:07
or someone has the brain of a machine..
21:16 quester joined
pmurias swarley: you need to implement a lot of QAST before you can boostrap in YARV 21:17
swarley what is <ident> supposed to match? 21:19
r: say "_Hello13" ~~ /<ident>/ 21:20
p6eval rakudo 6d5dc6: OUTPUT«「_Hello13」␤ ident => 「_Hello13」␤␤»
swarley r: say "1_Hello13" ~~ /<ident>/
p6eval rakudo 6d5dc6: OUTPUT«「_Hello13」␤ ident => 「_Hello13」␤␤»
swarley alright then
r: say "H_Hello13" ~~ /<ident>/ 21:21
p6eval rakudo 6d5dc6: OUTPUT«「H_Hello13」␤ ident => 「H_Hello13」␤␤»
FROGGS r: say "'hello'-123" ~~ /<ident>/ 21:22
p6eval rakudo 6d5dc6: OUTPUT«「hello」␤ ident => 「hello」␤␤»
not_gerd jnthn: is the JVM setting supposed to be called NQPCORE.setting.class or NQPCOREJVM.setting.class? 21:27
the rules has the former name, but generates the latter
^rule
jnthn not_gerd: It's meant to be the latter for now
not_gerd: That...may explain the excessive building :) 21:28
21:29 raiph joined 21:34 vividsnow left
moritz nwc10: is it correct to say that constant folding the only compile-time optimization that Perl 5 does? 21:43
dalek rl6-bench: 575c02c | (Geoffrey Broadwell)++ | analyze:
Heuristically guess that a supposed fail when there is a skip:null pair in the JSON was actually an intentional (but code-based) skip
rl6-bench: 55f801c | (Geoffrey Broadwell)++ | microbenchmarks.pl:
Add reduce_int_comb_range_1e4 test, inspired by bench-scripts++
22:12 not_gerd left 22:32 spider-mario joined 22:37 quester left 22:45 pjcj left, pjcj joined 22:46 PacoAir left 22:48 cognominal left, cognominal joined 23:06 lestrrat left 23:07 lestrrat joined 23:10 MayDaniel joined
dalek rl6-bench: bb173b9 | (Geoffrey Broadwell)++ | microbenchmarks.pl:
D'oh! kboga++ for spotting off-by-10x error
23:25
23:29 kivutar left 23:32 clintongormley left 23:33 kivutar joined