| Time |
S |
Nick |
Message |
| 00:10 |
|
jnthn |
'night, #perl6 o/ |
| 00:10 |
|
|
stevan_ joined #perl6 |
| 00:10 |
|
tadzik |
good night jnthn |
| 00:10 |
|
tadzik |
that's a niceblog post :) |
| 00:40 |
|
|
palakas__ joined #perl6 |
| 00:43 |
|
|
palakas_ joined #perl6 |
| 00:58 |
|
|
Targen joined #perl6 |
| 01:00 |
|
colomon |
jnthn++ |
| 01:02 |
|
|
imarcusthis joined #perl6 |
| 01:35 |
|
|
skids joined #perl6 |
| 01:38 |
|
|
stevan_ joined #perl6 |
| 02:10 |
|
|
hulu joined #perl6 |
| 02:22 |
|
hulu |
masak: helo |
| 02:27 |
|
hulu |
r: my $scalar = 'This is $scalar holding a String'; say '$scalar is ', $scalar.^name; |
| 02:27 |
|
p6eval |
rakudo 6d5dc6: OUTPUT«$scalar is Str» |
| 02:28 |
|
hulu |
what's means of the .^name |
| 02:28 |
|
diakopter |
^ means a meta-method |
| 02:29 |
|
diakopter |
r: .say for Str.^methods |
| 02:29 |
|
p6eval |
rakudo 6d5dc6: OUTPUT«BUILDIntNumchompchopsubstrpredsuccmatchordslinessamecasesamespacetrim-leadingtrim-trailingtrimwordsencodecapitalizewordcasetransindentcodestclcpathWHICHBoolStrACCEPTSNumericgistperlcombsubstsplit»… |
| 02:32 |
|
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» |
| 02:32 |
|
timotimo |
hulu: you're accidentally calling words on the String class, not the instance |
| 02:32 |
|
timotimo |
r: my $scalar = 'This is $scalar holding a String'; say '$scalar is ', $scalar.words; |
| 02:32 |
|
p6eval |
rakudo 6d5dc6: OUTPUT«$scalar is This is $scalar holding a String» |
| 02:33 |
|
timotimo |
r: my $scalar = 'This is $scalar holding a String'; say '$scalar is ' ~ $scalar.words; |
| 02:33 |
|
p6eval |
rakudo 6d5dc6: OUTPUT«$scalar is This is $scalar holding a String» |
| 02:33 |
|
|
FROGGS_ joined #perl6 |
| 02:33 |
|
timotimo |
hm |
| 02:33 |
|
timotimo |
r: say "foo bar".words |
| 02:33 |
|
p6eval |
rakudo 6d5dc6: OUTPUT«foo bar» |
| 02:33 |
|
timotimo |
oh, duh :) |
| 02:33 |
|
timotimo |
r: "foo bar".words.perl.say |
| 02:33 |
|
p6eval |
rakudo 6d5dc6: OUTPUT«("foo", "bar").list» |
| 02:33 |
|
diakopter |
meta-method means calling the method on the object's metaobject |
| 02:33 |
|
timotimo |
er, yes. not the class, i'm tired and it's late |
| 02:33 |
|
timotimo |
please forgive me |
| 02:34 |
|
* timotimo |
goes to bed, hide under the blankets |
| 02:39 |
|
|
GlitchMr joined #perl6 |
| 02:41 |
|
hulu |
thx |
| 02:51 |
|
hulu |
r: .say for Str.^meta-methods |
| 02:51 |
|
p6eval |
rakudo 6d5dc6: OUTPUT«No such method 'meta-methods' for invocant of type 'Perl6::Metamodel::ClassHOW' in block at /tmp/yAdrQSz6AG:1» |
| 02:52 |
|
timotimo |
hulu: thought of that before, but it won't work: |
| 02:52 |
|
timotimo |
say Str.WHAT.^methods |
| 02:52 |
|
timotimo |
or am i mistaken? |
| 02:52 |
|
geekosaur |
hulu, "meta-method" is talking about perl6, not talking *in* perl6 |
| 02:52 |
|
timotimo |
r: say Str.WHAT.^methods |
| 02:52 |
|
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» |
| 02:52 |
|
geekosaur |
r: say Str.^methods |
| 02:52 |
|
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» |
| 02:52 |
|
timotimo |
hm, this one does work |
| 02:52 |
|
timotimo |
r: say Str.WHAT.^methods[0].^methods |
| 02:52 |
|
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» |
| 02:52 |
|
diakopter |
r: say Str.HOW.^methods |
| 02:52 |
|
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» |
| 02:52 |
|
diakopter |
r: print Str.HOW.^methods |
| 02:52 |
|
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:53 |
|
diakopter |
r: try print $_ for Str.HOW.^methods |
| 02:53 |
|
p6eval |
rakudo 6d5dc6: OUTPUT«Nominal type check failed for parameter '$got'; expected Any but got NQPRoutine insteadcurrent 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… |
| 02:53 |
|
diakopter |
r: try { print $_ } for Str.HOW.^methods |
| 02:53 |
|
p6eval |
rakudo 6d5dc6: OUTPUT«use of uninitialized variable $v of type Any in string contextuse of uninitialized variable $v of type Any in string contextuse of uninitialized variable $v of type Any in string contextuse of uninitialized variable $v of type Any in string contextuse of uninit… |
| 02:55 |
|
diakopter |
r: for Str.HOW.^methods { try { say $_.name; CATCH { } } } |
| 02:55 |
|
p6eval |
rakudo 6d5dc6: OUTPUT«set_invoke_forwarderarchetypesnewnew_typeparameterizeadd_fallbackcomposerolesrole_typecheck_listconcretizationis_composedcansetup_junction_fallbackfind_method_fallbackhas_fallbacksset_namenameset_docsdocsverauthset_verset_authset_stash_typea… |
| 02:55 |
|
diakopter |
hulu: there you go |
| 02:55 |
|
diakopter |
oh, I guess you don't need the try |
| 02:55 |
|
diakopter |
r: for Str.HOW.^methods { say $_.name; } |
| 02:55 |
|
p6eval |
rakudo 6d5dc6: OUTPUT«set_invoke_forwarderarchetypesnewnew_typeparameterizeadd_fallbackcomposerolesrole_typecheck_listconcretizationis_composedcansetup_junction_fallbackfind_method_fallbackhas_fallbacksset_namenameset_docsdocsverauthset_verset_authset_stash_typea… |
| 02:56 |
|
diakopter |
r: for Str.HOW.^methods.reverse { say $_.name; } |
| 02:56 |
|
p6eval |
rakudo 6d5dc6: OUTPUT«WALKdispatch:<hyper>dispatch:<.*>dispatch:<.+>dispatch:<.?>dispatch:<.=>dispatch:<.^>dispatch:<!>dispatch:<::>dispatch:<var>CaptureclonecandoesisaDUMP-IDDUMPperlgistprintsayitemStringyStrRealNumericBUILD_LEAST_DERIVEDBUILDALLblessCREATE… |
| 03:06 |
|
|
sevin joined #perl6 |
| 03:09 |
|
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… |
| 03:12 |
|
swarley |
I'm confused by this line |
| 03:12 |
|
swarley |
$<septype>=['%''%'?] <normspace>? <quantified_atom> |
| 03:13 |
|
hulu |
r: my ($string, $offset, $count) = ('Pugs is da bomb', 2, 5); substr($string, $offset) = "gilism ain't for wimps"; say $string; |
| 03:13 |
|
p6eval |
rakudo 6d5dc6: OUTPUT«Cannot assign to a non-container in block at /tmp/_xus5EeD38:1» |
| 03:14 |
|
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:19 |
|
geekosaur |
r: my $str = 'foo bar'; substr-rw($str, 5) = 'baz gunk'; $str.say |
| 03:19 |
|
p6eval |
rakudo 6d5dc6: OUTPUT«foo bbaz gunk» |
| 03:19 |
|
geekosaur |
whoops. index |
| 03:20 |
|
* geekosaur |
wonders what language he was thinking in that he went 1-based |
| 03:20 |
|
|
xinming joined #perl6 |
| 03:22 |
|
hulu |
r: my $str = 'foo bar'; substr($str, 5) = 'baz gunk'; $str.say |
| 03:22 |
|
p6eval |
rakudo 6d5dc6: OUTPUT«Cannot assign to a non-container in block at /tmp/AIUiuIx9be:1» |
| 03:22 |
|
hulu |
look at https://github.com/perl6/perl6[…]1-01substrings.pl |
| 03:22 |
|
hulu |
why |
| 03:23 |
|
geekosaur |
that is out of date; substr-rw is a recent change |
| 03:24 |
|
sorear |
geekosaur: some basic maybe? |
| 03:24 |
|
geekosaur |
huh? |
| 03:25 |
|
geekosaur |
(yes, I know basic's MID$ did it that way) |
| 03:25 |
|
sorear |
replying to 19:20 * geekosaur wonders what language he was thinking in that he |
| 03:25 |
|
geekosaur |
oh |
| 03:25 |
|
geekosaur |
actualy I had fortran in mind when I said that :) |
| 03:26 |
|
swarley |
r: say Q/Hello world/ ~~ /\w [ \w+! <?before \w> ]?/ |
| 03:26 |
|
p6eval |
rakudo 6d5dc6: OUTPUT«「Hell」» |
| 03:26 |
|
swarley |
that seems odd |
| 03:27 |
|
swarley |
That's token atom from src/QRegex/P6Regex/Grammar.pm |
| 03:27 |
|
swarley |
well, that's part of it |
| 03:27 |
|
swarley |
But that would seem as if the capture is wrong.. |
| 03:28 |
|
swarley |
nqp: say Q/Hello world/ ~~ /\w [ \w+! <?before \w> ]?/ |
| 03:28 |
|
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)» |
| 03:28 |
|
swarley |
nqp: say(Q/Hello world/ ~~ /\w [ \w+! <?before \w> ]?/) |
| 03:28 |
|
p6eval |
nqp: OUTPUT«Hell» |
| 03:28 |
|
swarley |
Anyone have something to say that I'm missing? |
| 03:30 |
|
swarley |
Wait, I'm confused as to why it's stopping short on purpose.. |
| 03:31 |
|
swarley |
Oh. Because quantified_atom is the only thing actually used |
| 03:31 |
|
swarley |
actually no |
| 03:31 |
|
swarley |
Because quantified_atom doesn't consume that character.. |
| 03:33 |
|
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:45 |
|
swarley |
nqp: say(Q/Hello world/ ~~ /\w [ \w+!]?/) |
| 03:45 |
|
p6eval |
nqp: OUTPUT«Hello» |
| 03:46 |
|
|
nnunley joined #perl6 |
| 03:48 |
|
swarley |
I can't build parrot on Git Bash |
| 03:49 |
|
swarley |
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:51 |
|
sorear |
how ancient |
| 03:51 |
|
swarley |
v5.8.8 |
| 03:51 |
|
sorear |
Test::Harness was first released with perl 5 |
| 03:51 |
|
sorear |
(.000) |
| 03:51 |
|
swarley |
This is perl, v5.8.8 built for msys |
| 03:52 |
|
sorear |
according to module::corelist anyway |
| 03:52 |
|
rjbs |
jnthn: congrats on the continued progress |
| 03:52 |
|
rjbs |
(just read the blog post) |
| 03:53 |
|
rjbs |
swarley: Time to install cpanm followed by "everything else you need." ;) |
| 03:53 |
|
swarley |
Just tried that actually |
| 03:53 |
|
swarley |
Looks like I have bigger issues |
| 03:55 |
|
* swarley |
sighs and installs cygwin |
| 03:59 |
|
swarley |
Also, what is this expression? \w+! |
| 03:59 |
|
hulu |
r: say "Door $_ is open" for 1..10 X** 2; |
| 03:59 |
|
p6eval |
rakudo 6d5dc6: OUTPUT«Door 1 is openDoor 4 is openDoor 9 is openDoor 16 is openDoor 25 is openDoor 36 is openDoor 49 is openDoor 64 is openDoor 81 is openDoor 100 is open» |
| 04:00 |
|
hulu |
what's means of X** 2 |
| 04:01 |
|
swarley |
Im thinking that it's a variable for that loop.. |
| 04:01 |
|
geekosaur |
no, that's a metaoperator |
| 04:01 |
|
swarley |
No clue what that is |
| 04:01 |
|
geekosaur |
X is cross product; so it returns every possible combination of the left side ** the right side |
| 04:02 |
|
swarley |
ah. So it's like a map? |
| 04:02 |
|
geekosaur |
1..10 X** 2 means 1**2, 2**2, ..., 10**2 |
| 04:02 |
|
geekosaur |
vaguely |
| 04:02 |
|
geekosaur |
but if the right side weren't a scalar... |
| 04:02 |
|
hulu |
like map |
| 04:02 |
|
geekosaur |
r: .say for 1..10 X** 1..3 |
| 04:02 |
|
p6eval |
rakudo 6d5dc6: OUTPUT«111248392741664525125636216749343864512981729101001000» |
| 04:03 |
|
swarley |
Oh. So it's a combination operator |
| 04:03 |
|
swarley |
It applies the operation from each element to blah blah... |
| 04:03 |
|
swarley |
I think I understand |
| 04:04 |
|
geekosaur |
every popssible combination of each element on the left with each element on the right, with ** as the combiner |
| 04:04 |
|
hulu |
r: 1..10 X~ |
| 04:04 |
|
p6eval |
rakudo 6d5dc6: OUTPUT«===[0mSORRY!===[0m�Bogus statement�at /tmp/6uEuxDjRlI:1�------> 1..10 X~�<EOL>� expecting any of:� infix or meta-infix� infix stopper� prefix or meta-prefix�» |
| 04:05 |
|
hulu |
r: 1..10 X~ ',' |
| 04:05 |
|
p6eval |
rakudo 6d5dc6: ( no output ) |
| 04:05 |
|
hulu |
r: say 1..10 X~ ',' |
| 04:05 |
|
p6eval |
rakudo 6d5dc6: OUTPUT«1, 2, 3, 4, 5, 6, 7, 8, 9, 10,» |
| 04:06 |
|
geekosaur |
r: say 1..10 X+ 1..3 |
| 04:06 |
|
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:08 |
|
|
preflex_ joined #perl6 |
| 04:09 |
|
swarley |
inter::progs - Determine what C compiler and linker to use...Compilation failed with 'gcc-4' |
| 04:10 |
|
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:10 |
|
sorear |
parrot lifts a lot of configuration from the p5 extension builder |
| 04:11 |
|
swarley |
I moved into a cygwin environment, and the perl installation is working fine now. |
| 04:11 |
|
swarley |
I suppose I'll reinstall gcc |
| 04:12 |
|
sorear |
can you install extensions on the perl env though |
| 04:12 |
|
sorear |
is jnthn around? |
| 04:13 |
|
sorear |
left 4h ago, so prolly not back yet |
| 04:13 |
|
swarley |
Yes, I can |
| 04:15 |
|
|
sevin joined #perl6 |
| 04:17 |
|
|
xinming_ joined #perl6 |
| 04:18 |
|
|
Rix joined #perl6 |
| 04:25 |
|
swarley |
slowly getting closer to successful compilation.. |
| 04:28 |
|
hulu |
r: my $x = ~[**] 5, 4, 3, 2; |
| 04:28 |
|
p6eval |
rakudo 6d5dc6: OUTPUT«(timeout)» |
| 04:29 |
|
hulu |
what's means ~[**] |
| 04:30 |
|
hulu |
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:30 |
|
p6eval |
rakudo 6d5dc6: OUTPUT«(timeout)» |
| 04:31 |
|
hulu |
r: my $x = ~[**] 5, 4; |
| 04:31 |
|
p6eval |
rakudo 6d5dc6: ( no output ) |
| 04:32 |
|
hulu |
r: my $x = ~[**] 5, 4;say $x; |
| 04:32 |
|
p6eval |
rakudo 6d5dc6: OUTPUT«625» |
| 04:32 |
|
hulu |
r: my $x = ~[**] 5, 4,3;say $x; |
| 04:32 |
|
p6eval |
rakudo 6d5dc6: OUTPUT«542101086242752217003726400434970855712890625» |
| 04:33 |
|
swarley |
Okay no this is terrible |
| 04:34 |
|
swarley |
Time to try with gcc-4 |
| 04:34 |
|
swarley |
-3* |
| 04:35 |
|
hulu |
r: my $x = ~** 5, 4;say $x; |
| 04:35 |
|
p6eval |
rakudo 6d5dc6: OUTPUT«===[0mSORRY!===[0m�HyperWhatever (**) is not yet implemented. Sorry. �at /tmp/cgQS0vN0bS:1�------> my $x = ~**� 5, 4;say $x;�» |
| 04:36 |
|
hulu |
r: my $x = ~[**] 5, 4;say $x; |
| 04:36 |
|
p6eval |
rakudo 6d5dc6: OUTPUT«625» |
| 04:36 |
|
swarley |
h_> Emily i dont think they assept returns |
| 04:36 |
|
swarley |
« |
| 04:36 |
|
swarley |
whoops |
| 04:36 |
|
hulu |
r: my $x = ~[**] 5..4;say $x; |
| 04:36 |
|
swarley |
CONST_STRING split across lines at 461 in src/string/api.c |
| 04:36 |
|
p6eval |
rakudo 6d5dc6: OUTPUT«1» |
| 04:36 |
|
hulu |
r: my $x = ~[**] (5..4);say $x; |
| 04:36 |
|
p6eval |
rakudo 6d5dc6: OUTPUT«1» |
| 04:53 |
|
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:53 |
|
p6eval |
rakudo 6d5dc6: OUTPUT«===[0mSORRY!===[0m�Undeclared routine:� k used at line 1��» |
| 04:58 |
|
hulu |
r: my ($major,$minor) = (5,3);my @array := [ for ^$major { [ for ^$minor {'@'} ] } ];@array[ pick 1, ^$major ][ pick 1, ^$minor ] = ' ';.say for @array; |
| 04:58 |
|
p6eval |
rakudo 6d5dc6: OUTPUT«@ @ @@ @ @@ @ @ @ @@ @ @» |
| 04:59 |
|
hulu |
what's means ^$major , pick 1 |
| 04:59 |
|
|
Targen_ joined #perl6 |
| 05:00 |
|
geekosaur |
r: .say for ^5 |
| 05:00 |
|
p6eval |
rakudo 6d5dc6: OUTPUT«01234» |
| 05:00 |
|
geekosaur |
r: pick 1, ^5 |
| 05:00 |
|
p6eval |
rakudo 6d5dc6: ( no output ) |
| 05:00 |
|
geekosaur |
r: say pick 1, ^5 |
| 05:00 |
|
p6eval |
rakudo 6d5dc6: OUTPUT«0» |
| 05:00 |
|
geekosaur |
r: say pick 1, ^5 |
| 05:00 |
|
p6eval |
rakudo 6d5dc6: OUTPUT«1» |
| 05:00 |
|
geekosaur |
r: say pick 1, ^5 |
| 05:00 |
|
p6eval |
rakudo 6d5dc6: OUTPUT«4» |
| 05:01 |
|
geekosaur |
r: say pick 2, ^5 |
| 05:01 |
|
p6eval |
rakudo 6d5dc6: OUTPUT«4 1» |
| 05:01 |
|
geekosaur |
r: say pick 3, ^5 |
| 05:01 |
|
p6eval |
rakudo 6d5dc6: OUTPUT«2 1 0» |
| 05:01 |
|
geekosaur |
clear now? |
| 05:02 |
|
clkao |
7/win 30 |
| 05:08 |
|
|
Rix joined #perl6 |
| 05:12 |
|
|
alec joined #perl6 |
| 05:16 |
|
|
xinming joined #perl6 |
| 05:19 |
|
hulu |
Does perl6 has the cpan |
| 05:23 |
|
geekosaur |
https://github.com/tadzik/panda/ |
| 05:24 |
|
geekosaur |
I think if you have rakudo star installed you should have panda as part of that? |
| 05:25 |
|
geekosaur |
(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 |
| 06:17 |
|
|
quester joined #perl6 |
| 06:22 |
|
|
bapa joined #perl6 |
| 06:54 |
|
|
geekosaur joined #perl6 |
| 07:12 |
|
moritz |
geekosaur: R* IS the main rakudo distribution |
| 07:12 |
|
phenny |
moritz: 01 Feb 20:53Z <[Coke]> tell moritz to change **{1..3} to **1..3 in this code: http://perlgeek.de/en/article/5-to-6#post_07 |
| 07:13 |
|
moritz |
I know of no other rakudo distribution, in fact |
| 07:14 |
|
|
hulu joined #perl6 |
| 07:15 |
|
moritz |
[Coke]: fixing right now, thanks |
| 07:15 |
|
hulu |
what's means of $*CORE |
| 07:18 |
|
moritz |
the * means it's a dynamic or global variable |
| 07:20 |
|
hulu |
r: constant %term = (:dba('term') , :prec<z=>); |
| 07:20 |
|
p6eval |
rakudo 6d5dc6: ( no output ) |
| 07:20 |
|
hulu |
r: say constant %term = (:dba('term') , :prec<z=>); |
| 07:20 |
|
p6eval |
rakudo 6d5dc6: OUTPUT«"dba" => "term" "prec" => "z="» |
| 07:21 |
|
hulu |
what's means :dba('term') |
| 07:24 |
|
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:25 |
|
|
quester left #perl6 |
| 07:25 |
|
moritz |
it intorudces a pair |
| 07:26 |
|
|
Psyche^ joined #perl6 |
| 07:28 |
|
hulu |
moritz: thx |
| 07:38 |
|
|
vividsnow joined #perl6 |
| 07:43 |
|
|
domidumont joined #perl6 |
| 08:03 |
|
|
Psyche^ joined #perl6 |
| 08:08 |
|
|
domidumont joined #perl6 |
| 08:15 |
|
|
daniel-s joined #perl6 |
| 08:20 |
|
masak |
morning, #perl6 |
| 08:21 |
|
nwc10 |
jnthn++ # bloggage |
| 08:27 |
|
nwc10 |
so good I read it twice |
| 08:37 |
|
* moritz |
still hasn't finished it, too many interruptions |
| 08:39 |
|
moritz |
jnthn: "we know that the JVM’s idea of type if some way off the Perl 6 notion of type" s/if/is/ |
| 08:44 |
|
moritz |
jnthn++ # very nice blog post |
| 08:59 |
|
|
erkan joined #perl6 |
| 09:20 |
|
|
sqirrel joined #perl6 |
| 09:28 |
|
|
PacoAir joined #perl6 |
| 09:34 |
|
|
kaare_ joined #perl6 |
| 09:44 |
|
|
Psyche^ joined #perl6 |
| 09:44 |
|
|
PacoAir_ joined #perl6 |
| 09:48 |
|
* masak |
is at the FOSDEM |
| 09:48 |
|
* sjn |
too o/ |
| 09:48 |
|
masak |
:) |
| 09:48 |
|
masak |
don't sneak up on me like that :P |
| 09:52 |
|
masak |
jnthn: s/there more this applies/the more this applies/ in le blog post |
| 09:53 |
|
masak |
I like how much jnthn actually manages to weave DDD into the introduction ;) |
| 09:54 |
|
arnsholt |
Wow, long blog is long |
| 09:54 |
|
arnsholt |
jnthn++ |
| 09:55 |
|
masak |
you mean all the blog posts together amount to a lot of text? yes. |
| 09:55 |
|
* masak |
grins |
| 09:58 |
|
|
PacoAir joined #perl6 |
| 10:02 |
|
moritz |
giant episode of planetsix :-) |
| 10:11 |
|
moritz |
nqp: nqp::printf('a%d', 42) |
| 10:11 |
|
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:22 |
|
|
SunilJoshi joined #perl6 |
| 10:44 |
|
hulu |
where i can get perl 6 complete.pdf |
| 10:44 |
|
moritz |
jnthn: wrapping variables in a QAST::Want isn't quite as trivial as hoped for: binding checks if stuff is a QAST::Var |
| 10:44 |
|
moritz |
hulu: what would that be? |
| 10:46 |
|
hulu |
perl 6 complete is a book's name |
| 10:46 |
|
hulu |
<perl 6 complete> is a book's name |
| 10:47 |
|
moritz |
then probably from the publisher |
| 10:48 |
|
moritz |
though I wonder if it was ever released at all |
| 10:50 |
|
|
hulu_ joined #perl6 |
| 10:50 |
|
hulu_ |
helo |
| 10:51 |
|
hulu_ |
where i can download the book named <perl 6 complete> |
| 10:51 |
|
moritz |
hulu_: I just discussed that with hulu |
| 10:52 |
|
moritz |
why do you ask the same question again? |
| 10:52 |
|
tadzik |
:D |
| 10:52 |
|
hulu_ |
i just break online |
| 10:53 |
|
hulu_ |
please |
| 10:53 |
|
hulu_ |
repet |
| 10:55 |
|
moritz |
hulu_: http://irclog.perlgeek.de/perl[…]3-02-02#i_6404426 |
| 10:56 |
|
hulu_ |
moritz: i am looking |
| 10:56 |
|
hulu_ |
masak: helo |
| 10:56 |
|
hulu_ |
moritz: thx |
| 11:06 |
|
hulu_ |
moritz: where i can find the book of perl6 |
| 11:07 |
|
tadzik |
hulu_: http://perl6.org/documentation/ contains everything you need |
| 11:08 |
|
tadzik |
we took special care of that |
| 11:09 |
|
hulu_ |
<Learning Perl 6> where i can download it |
| 11:09 |
|
hulu_ |
tadzik: <Learning Perl 6> where i can download it |
| 11:10 |
|
tadzik |
I've no idea, I've never heard of that book |
| 11:10 |
|
|
Su-Shee joined #perl6 |
| 11:12 |
|
nwc10 |
gah. hateful: |
| 11:12 |
|
nwc10 |
$ 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 |
| 11:12 |
|
nwc10 |
source level should be comprised in between '1.3' and '1.6' (or '5', '5.0', ..., '7' or '7.0'): 7.0 |
| 11:12 |
|
nwc10 |
which part of 7.0 don't you understand? |
| 11:13 |
|
nwc10 |
apparently 7. |
| 11:13 |
|
nwc10 |
6 is fine. |
| 11:13 |
|
nwc10 |
hateful piece of tiobe-report |
| 11:19 |
|
nwc10 |
Is java.nio.file part of Java 7? |
| 11:33 |
|
jnthn |
nwc10: Yes. |
| 11:35 |
|
nwc10 |
OK, so I think that that gcj is producing a seriously-less-than-aweome error message |
| 11:36 |
|
nwc10 |
which should be "I can't do Java version 7. Sorry" |
| 11:36 |
|
moritz |
please submit a bug report |
| 11:37 |
|
nwc10 |
for what? |
| 11:37 |
|
tadzik |
LTA error message :) |
| 11:38 |
|
moritz |
gcj not telling you straight that it doesn't support version 7.0, but produces some bullshit error |
| 11:40 |
|
nwc10 |
it's gcj-4.4. I think it's two versions beyond what gcc.gnu.org say they support |
| 11:40 |
|
nwc10 |
and I'm not sure if Debian are going to fix their package |
| 11:41 |
|
jnthn |
According to wikipedia, "As of 2009 there have been no new developments announced from gcj." |
| 11:42 |
|
jnthn |
And http://gcc.gnu.org/java/ makes it look very...stable. |
| 11:42 |
|
nwc10 |
oh boy yes. |
| 11:42 |
|
nwc10 |
even Module::Build is more active than that |
| 11:43 |
|
jnthn |
http://stackoverflow.com/quest[…]compiler-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 |
|
nwc10 |
(dromedary is the failover machine for perl5.git.perl.org) |
| 11:45 |
|
|
cogno joined #perl6 |
| 11:49 |
|
hulu_ |
moritz: what diff between != !== |
| 11:52 |
|
moritz |
hulu_: they are the same |
| 11:53 |
|
moritz |
!= is kept for historical purposes |
| 11:53 |
|
moritz |
s/purposes/reasons/ |
| 11:58 |
|
cogno |
One can see it as an huffmanization too |
| 12:02 |
|
hulu_ |
moritz: my @sorted = @names.sort({ %sets{$_} }).sort({ %matches{$_} }).reverse; what's means |
| 12:02 |
|
nwc10 |
I wonder why gcj died |
| 12:04 |
|
hulu_ |
moritz: what's ({ %sets{$_} }) means |
| 12:07 |
|
nwc10 |
t/nqp/46-charspec.t ....... no ICU lib loaded |
| 12:07 |
|
nwc10 |
apart from that, all tests successful on dromedary |
| 12:07 |
|
tadzik |
that's from Parrot |
| 12:07 |
|
tadzik |
Parrot must be compiled with libicu-dev present |
| 12:07 |
|
nwc10 |
which I infer isn't installed on dromedary |
| 12:07 |
|
tadzik |
probably |
| 12:10 |
|
jnthn |
nwc10: Thanks for doing a test run :) |
| 12:10 |
|
jnthn |
Nice to see it Just Works elsewhere too |
| 12:10 |
|
nwc10 |
yes, pleasingly "just works" once you have a real javac |
| 12:11 |
|
jnthn |
*nod* |
| 12:12 |
|
moritz |
hulu_: { ... } is a block, which puts its argument into $_ |
| 12:12 |
|
moritz |
and %sets{$_} is a hash lookup |
| 12:16 |
|
tadzik |
so I move from maintaining parrot myself to nqp --gen-parrot |
| 12:16 |
|
tadzik |
zeitgeist |
| 12:31 |
|
|
Targen joined #perl6 |
| 12:39 |
|
|
sorear joined #perl6 |
| 12:44 |
|
hulu_ |
moritz: my @sorted = @names.sort({ %sets{$_} }).sort({ %matches{$_} }).reverse; what's means |
| 12:48 |
|
|
cognominal joined #perl6 |
| 12:50 |
|
|
SunilJoshi joined #perl6 |
| 12:58 |
|
|
SunilJoshi joined #perl6 |
| 13:01 |
|
|
vividsnow joined #perl6 |
| 13:03 |
|
|
MayDaniel joined #perl6 |
| 13:12 |
|
moritz |
hulu_: doesn't the text that you got this from explains it? |
| 13:13 |
|
moritz |
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:20 |
|
FROGGS |
hi there |
| 13:20 |
|
moritz |
\o FROGGS |
| 13:36 |
|
masak |
yay, talk seems to have gone fine \o/ |
| 13:38 |
|
swarley |
> exit |
| 13:38 |
|
swarley |
Null PMC access in find_method('new') |
| 13:39 |
|
swarley |
That's from nqp, what is the exit command supposed to be? |
| 13:40 |
|
masak |
what's the exit command? |
| 13:40 |
|
swarley |
Like.. Exiting the shell? |
| 13:40 |
|
masak |
(worksforme -- here it's just silent) |
| 13:41 |
|
masak |
swarley: did you read about `exit` somewhere? what suggests to you that that's the way to abort the REPL? |
| 13:41 |
|
swarley |
oh, no i didn't |
| 13:41 |
|
masak |
> sub exit() { say("You can check out anytime, but you can never leave") } |
| 13:41 |
|
masak |
> exit() |
| 13:41 |
|
masak |
You can check out anytime, but you can never leave |
| 13:42 |
|
swarley |
It works to exit rakudo |
| 13:42 |
|
masak |
ok. |
| 13:42 |
|
masak |
> sub exit() { last } |
| 13:42 |
|
masak |
> exit() |
| 13:42 |
|
masak |
masak ubuntu:~$ |
| 13:42 |
|
masak |
:P |
| 13:42 |
|
swarley |
oh |
| 13:43 |
|
masak |
yes, exit() is spec'd in S29 for Perl 6. |
| 13:44 |
|
masak |
but nqp is a non-strict subset of Perl 6, so it's not clear to me that it's part of nqp. |
| 13:44 |
|
masak |
that said, it would be nice, of course. |
| 13:44 |
|
swarley |
I just assumed, since that's the only way I've seen to exit interpreters properly |
| 13:44 |
|
masak |
^D |
| 13:44 |
|
masak |
^C |
| 13:44 |
|
swarley |
Well yeah. But I mean programmatically |
| 13:45 |
|
swarley |
I used EOF to get out of the REPL when exit wouldn't work |
| 13:45 |
|
swarley |
But I generally don't like using it |
| 13:45 |
|
masak |
'exit' wouldn't work in nqp even if the subroutine were defined, unless it were special-cased. |
| 13:46 |
|
masak |
you'd have to write it as 'exit()'. |
| 13:46 |
|
moritz |
nqp: nqp::exit(0); say("still here") |
| 13:46 |
|
p6eval |
nqp: ( no output ) |
| 13:46 |
|
swarley |
ah, right. I always forget about that. |
| 13:46 |
|
masak |
moritz++ |
| 13:47 |
|
masak |
so, exit exists. case closed :) |
| 13:47 |
|
swarley |
oh okay. Cool |
| 13:47 |
|
swarley |
Or, I can just use last haha. It seems to work to exit the repl as well |
| 13:48 |
|
swarley |
nqp: last; say("hello") |
| 13:48 |
|
p6eval |
nqp: OUTPUT«Warninghello» |
| 13:48 |
|
swarley |
warning? |
| 13:50 |
|
|
cognominal joined #perl6 |
| 13:50 |
|
|
thundergnat joined #perl6 |
| 13:57 |
|
moritz |
well, the last exits the L in REPL :-) |
| 13:59 |
|
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. :/ |
| 13:59 |
|
thundergnat |
r: use MONKEY_TYPING; augment class Int { method foo (*@) { "foo" } }; say Int.foo; |
| 13:59 |
|
p6eval |
rakudo 6d5dc6: OUTPUT«foo» |
| 13:59 |
|
thundergnat |
r: use MONKEY_TYPING; augment class Cool { method foo (*@) { "foo" } }; say Int.foo; #:( |
| 13:59 |
|
p6eval |
rakudo 6d5dc6: OUTPUT«No such method 'foo' for invocant of type 'Int' in block at /tmp/2jjKk3JKph:1» |
| 13:59 |
|
thundergnat |
:( |
| 13:59 |
|
moritz |
thundergnat: it should work, I think |
| 14:00 |
|
moritz |
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:01 |
|
thundergnat |
*latest Rakudo |
| 14:02 |
|
moritz |
2012.10 did it right? |
| 14:02 |
|
moritz |
that's surpising |
| 14:02 |
|
thundergnat |
Yes |
| 14:04 |
|
thundergnat |
Should I file a bug report? I wasn't entirely sure that the change was unintended |
| 14:05 |
|
moritz |
yes, please report |
| 14:11 |
|
|
sorear joined #perl6 |
| 14:17 |
|
|
b1rkh0ff joined #perl6 |
| 14:39 |
|
nwc10 |
How come this doesn't generate any output? |
| 14:39 |
|
nwc10 |
nqp nqp-jvm-cc.nqp -e 'say(@ARGS[1])' aa bb cc |
| 14:39 |
|
nwc10 |
(just using nqp outputs aa) |
| 14:39 |
|
moritz |
does it produce a newline at least? |
| 14:40 |
|
moritz |
does it work with nqp::say(@args[1]) |
| 14:40 |
|
moritz |
and I hope with nqp it outputs bb :-) |
| 14:40 |
|
nwc10 |
yes, it produces a line. So, bad me for misdescribing |
| 14:41 |
|
nwc10 |
Use of undeclared variable '@args' at line 2, near "[1])" |
| 14:41 |
|
nwc10 |
and an explosion of backtrace |
| 14:41 |
|
moritz |
maybe @ARGS/ @*ARGS isn't set up properly |
| 14:41 |
|
|
xinming joined #perl6 |
| 14:42 |
|
nwc10 |
aha. |
| 14:42 |
|
nwc10 |
that sounds plausible |
| 14:44 |
|
* nwc10 |
was playing with nqp/examples/fib.nqp and wanted to tweak it to take $H on the command line |
| 14:44 |
|
nwc10 |
gah, $N |
| 14:44 |
|
nwc10 |
anyway, I *have* tweaked it locally |
| 14:44 |
|
nwc10 |
but nqp-jvm ignores @ARGS, it seems |
| 14:49 |
|
arnsholt |
Hmm. Looks like my refactor broke something |
| 14:50 |
|
arnsholt |
That's an annoying thing with floats. It less obvious what's wrong when they have weird values |
| 14:53 |
|
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:53 |
|
nwc10 |
and runs in about 60% of the time of Perl 5 |
| 14:54 |
|
moritz |
woah :-) |
| 14:54 |
|
arnsholt |
Nice! |
| 14:54 |
|
nwc10 |
which is nice. The NQP code isn't using typed variables |
| 14:54 |
|
arnsholt |
Even better. Gonna try with the types as well? |
| 14:55 |
|
|
SunilJoshi joined #perl6 |
| 15:00 |
|
|
zby_home_ joined #perl6 |
| 15:03 |
|
nwc10 |
a) I don't know the syntax |
| 15:04 |
|
nwc10 |
b) it probably makes the program buggy, as it's intended to be able to be calculate values larger than a native int |
| 15:04 |
|
arnsholt |
In that case native types aren't a good idea, yeah |
| 15:05 |
|
arnsholt |
Instead you can say that not only is it a bit faster than Perl 5, it also handles arbitrary precision =) |
| 15:12 |
|
|
awwaiid joined #perl6 |
| 15:14 |
|
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:14 |
|
nwc10 |
I haven't worked out *where* to patch it |
| 15:14 |
|
nwc10 |
(let alone how) |
| 15:15 |
|
jnthn |
my int $x # how you declare native int |
| 15:15 |
|
jnthn |
nwc10: Hm, I'm not sure either ;) |
| 15:17 |
|
|
SunilJoshi joined #perl6 |
| 15:33 |
|
timotimo |
oh, slice context? never heard of that one |
| 15:33 |
|
timotimo |
r: say @@( <a b> Z <c d> ) # (['a', 'c'], ['b', 'd']) |
| 15:33 |
|
p6eval |
rakudo 6d5dc6: OUTPUT«===[0mSORRY!===[0m�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�… |
| 15:33 |
|
timotimo |
oh, seems like that has been removed again |
| 15:33 |
|
timotimo |
moritz: could you remove that from the 5-to-6 document, too? (or anyone else could tell me what i'm missing ;) ) |
| 15:33 |
|
moritz |
timotimo: the 5-to-6 document takes the specs as the standard, not what's implemented |
| 15:34 |
|
timotimo |
oh, so @@ is in the spec? good to know |
| 15:34 |
|
timotimo |
n: say @@( <a b> Z <c d> ) # (['a', 'c'], ['b', 'd']) |
| 15:34 |
|
p6eval |
niecza v24-18-gaf64300: OUTPUT«===[0mSORRY!===[0m��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 … |
| 15:34 |
|
timotimo |
std: say @@( <a b> Z <c d> ) # (['a', 'c'], ['b', 'd']) |
| 15:34 |
|
p6eval |
std 7deb9d7: OUTPUT«ok 00:00 43m» |
| 15:34 |
|
timotimo |
should have tried that before complaining. |
| 15:35 |
|
* timotimo |
tries to make a better error message for rakudo |
| 15:35 |
|
moritz |
oh hm, might be gone from the specs |
| 15:35 |
|
moritz |
ack -Q '@@' # no match |
| 15:35 |
|
timotimo |
oh? hm. |
| 15:36 |
|
timotimo |
is it in STD because it emits some other kind of parse? |
| 15:37 |
|
moritz |
maybe it parses it as @( @( ... ) ) |
| 15:37 |
|
timotimo |
should that be acceptable? |
| 15:38 |
|
moritz |
I have no idea |
| 15:38 |
|
moritz |
oops, seems that @@ was removed in Feb 2010 |
| 15:41 |
|
arnsholt |
There we go |
| 15:42 |
|
arnsholt |
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:46 |
|
moritz |
shouldn't that give a compiler warning? |
| 15:48 |
|
timotimo |
would it make any sense for rakudo to emit an obsoletion warning? |
| 15:48 |
|
timotimo |
i mean for @@( ... )? |
| 15:49 |
|
timotimo |
"please use .LoL instead"? "please use .tree instead"? |
| 15:49 |
|
moritz |
I don't think so, because it never implemented it |
| 15:49 |
|
timotimo |
well, i think the obsoletion exception puts a "in perl6, please use $replacement instead" |
| 15:49 |
|
timotimo |
okay, nothing to do here then :) |
| 15:59 |
|
arnsholt |
moritz: Apparently not. I only think you get warnings for implicit conversions with certain -W flags |
| 16:01 |
|
moritz |
-Wall :-) |
| 16:02 |
|
arnsholt |
Not one of the flags Parrot turns on for compilation, unfortunately =) |
| 16:02 |
|
|
sevin joined #perl6 |
| 16:02 |
|
timotimo |
oh, i totally didn't know rule and token implied ratchet |
| 16:05 |
|
masak |
I have signed copy of the new "Beginning Perl" by Ovid. |
| 16:05 |
|
arnsholt |
Cool! |
| 16:06 |
|
arnsholt |
Ovid is one of the Perl people I'd really like to meet one day |
| 16:06 |
|
arnsholt |
He seems like a hoopy frood |
| 16:06 |
|
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 |
| 16:06 |
|
timotimo |
:D |
| 16:06 |
|
arnsholt |
=D |
| 16:06 |
|
timotimo |
that's cute. unless you creeped on him ;) |
| 16:06 |
|
masak |
don't think so. |
| 16:07 |
|
masak |
it was all in jest. |
| 16:07 |
|
masak |
well, except for me being a great fan of his. |
| 16:07 |
|
masak |
as evidenced by http://strangelyconsistent.org[…]roles-are-awesome |
| 16:12 |
|
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:14 |
|
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:15 |
|
timotimo |
but try to come up with something like that! ;) |
| 16:17 |
|
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:18 |
|
timotimo |
right. i think what i didn't quite understand was how to pass things from the new method to the BUILD method |
| 16:18 |
|
timotimo |
arnsholt: i believe so |
| 16:19 |
|
timotimo |
in controlling lazyness, maybe "my $ls = lazy { $expansive_computation };" meant to read "expensive" instead? |
| 16:19 |
|
masak |
arnsholt: yes. |
| 16:19 |
|
timotimo |
but i think both words could be correct in this case |
| 16:19 |
|
masak |
arnsholt: constructors (by definition) are methods that .bless |
| 16:19 |
|
arnsholt |
Yeah, that's what I thought |
| 16:19 |
|
masak |
arnsholt: I wouldn't ever create a method 'new' that isn't a constructor. |
| 16:20 |
|
arnsholt |
Definitely. That'd be a recipe for disaster I think |
| 16:20 |
|
masak |
it's mroe common than people think to have non-'new' constructors. |
| 16:20 |
|
masak |
MyGrammar.parse, for example. |
| 16:20 |
|
masak |
more* |
| 16:20 |
|
arnsholt |
And DBIish.connect if memory serves |
| 16:20 |
|
timotimo |
how about a new method that returns something from a cache? would that be considered bad, because it's not a "new" object? |
| 16:21 |
|
timotimo |
submethod new($foo) is cached { ... } ;) |
| 16:21 |
|
|
thundergnat left #perl6 |
| 16:21 |
|
masak |
timotimo: depends on the other invariants on the class, I'd say. |
| 16:21 |
|
masak |
feels a bit odd, but not necessarily morally wrong. |
| 16:22 |
|
timotimo |
mhm. for an immutable class, it's probably not problematic, but for a mutable one it might rub people the wrong way |
| 16:22 |
|
arnsholt |
Heh. "Morally wrong" ^_^ |
| 16:23 |
|
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 |
|
timotimo |
but i thought you needed | for that? |
| 16:24 |
|
timotimo |
(me with the non-questions again!) |
| 16:24 |
|
arnsholt |
I think it interacts with multidispatch somehow |
| 16:25 |
|
arnsholt |
(The stuff after ; isn't considered when dispatching?) |
| 16:26 |
|
jnthn |
Yes, that. |
| 16:26 |
|
jnthn |
It makes what's beyond the ; not be consider by the multi-dispatch candidate sorting thingy. |
| 16:27 |
|
masak |
do we still have ;; ? |
| 16:27 |
|
masak |
(or did I dream that?) |
| 16:31 |
|
jnthn |
I...have some memories of something like that... :) |
| 16:32 |
|
jnthn |
Is that the "produces separate candidates" thing? |
| 16:33 |
|
timotimo |
like two alternative signatures that both cause the same candidate to be invoked? |
| 16:33 |
|
|
sevin joined #perl6 |
| 16:33 |
|
timotimo |
sub frob(Int $a, Str $b;;Str $a, Int $b) { say "one is a string, the other an int." } |
| 16:33 |
|
timotimo |
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"); |
| 16:33 |
|
p6eval |
rakudo 6d5dc6: OUTPUT«===[0mSORRY!===[0m�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�» |
| 16:34 |
|
jnthn |
timotimo: No, more than you declare candidates of different lenght for the purpose of multi-dispatch |
| 16:34 |
|
jnthn |
timotimo: I may be misremembering. |
| 16:35 |
|
jnthn |
S06 will have the details :) |
| 16:46 |
|
|
kaare_ joined #perl6 |
| 16:47 |
|
|
SunilJoshi joined #perl6 |
| 16:48 |
|
Celelibi |
hi |
| 16:49 |
|
Celelibi |
Is there a cpan for perl6 ? |
| 16:49 |
|
huf |
http://modules.perl6.org/ |
| 16:49 |
|
huf |
there's that |
| 16:49 |
|
geekosaur |
https://github.com/tadzik/panda/ |
| 16:49 |
|
Celelibi |
thx. |
| 16:50 |
|
huf |
yeah, the client is panda |
| 16:50 |
|
dalek |
nqp/dyncall-sized-num: 65c6ac0 | (Arne Skjærholt)++ | src/6model/reprs/P6 (2 files): |
| 16:50 |
|
dalek |
nqp/dyncall-sized-num: Make P6{int,num} complain about weird bit sizes, and teach P6int sub-bytes. |
| 16:50 |
|
dalek |
nqp/dyncall-sized-num: review: https://github.com/perl6/nqp/commit/65c6ac08b1 |
| 16:50 |
|
dalek |
nqp/dyncall-sized-num: 59a19e2 | (Arne Skjærholt)++ | src/ (4 files): |
| 16:50 |
|
dalek |
nqp/dyncall-sized-num: Refactor {bind,at}_pos_ref to follow the new native access scheme. |
| 16:50 |
|
dalek |
nqp/dyncall-sized-num: |
| 16:50 |
|
dalek |
nqp/dyncall-sized-num: I think we're most of the way there now. Some cleanup left to do, but the hard |
| 16:50 |
|
dalek |
nqp/dyncall-sized-num: work should be done. |
| 16:50 |
|
dalek |
nqp/dyncall-sized-num: review: https://github.com/perl6/nqp/commit/59a19e21b5 |
| 16:51 |
|
jnthn |
arnsholt++ |
| 16:51 |
|
dalek |
rakudo/dyncall-sized-num: 80dc914 | (Arne Skjærholt)++ | src/binder/sixmodelobject.h: |
| 16:51 |
|
dalek |
rakudo/dyncall-sized-num: Update sixmodelobject.h. |
| 16:51 |
|
dalek |
rakudo/dyncall-sized-num: review: https://github.com/rakudo/raku[…]commit/80dc914c06 |
| 16:52 |
|
dalek |
zavolaj: bf396de | (Arne Skjærholt)++ | t/05-arrays. (2 files): |
| 16:52 |
|
dalek |
zavolaj: Add tests for sized ints and nums in arrays. |
| 16:52 |
|
dalek |
zavolaj: review: https://github.com/jnthn/zavol[…]commit/bf396de07b |
| 16:55 |
|
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 |
|
|
vividsnow joined #perl6 |
| 16:57 |
|
jnthn |
arnsholt: What were we doing on out of bounds before? |
| 16:57 |
|
Celelibi |
Well. Looks like there is no image lib for perl6 yet. |
| 16:58 |
|
arnsholt |
The old approach returned a pointer to the data, so we returned a NULL pointer |
| 16:58 |
|
arnsholt |
But there's no pointer-passing anymore, so that can't happen anymore |
| 16:59 |
|
jnthn |
arnsholt: Yeah, I meant what happened in response to the null pointer? |
| 17:00 |
|
jnthn |
arnsholt: If it was that the op threw an exception, we could maybe do it right in the REPR... |
| 17:02 |
|
arnsholt |
jnthn: Oh, right |
| 17:02 |
|
* arnsholt |
checks |
| 17:04 |
|
|
grondilu joined #perl6 |
| 17:04 |
|
arnsholt |
Hmm. Looks like noone did any bounds checking, so we may have ended up segfaulting... |
| 17:04 |
|
arnsholt |
Err, s/bounds/null pointer/ |
| 17:04 |
|
grondilu |
Was masak's talk at FOSDEM recorded? |
| 17:08 |
|
arnsholt |
jnthn: I don't think that particular code path had ever been tested, TBH |
| 17:08 |
|
arnsholt |
Going by the code in master, I'm pretty sure it'll try to read from a NULL-pointer |
| 17:09 |
|
arnsholt |
There's an out-of-bounds test, but that one gets a pointer object, not a native |
| 17:11 |
|
jnthn |
Ah. |
| 17:11 |
|
jnthn |
Guess we get to not segfualt then ;) |
| 17:12 |
|
arnsholt |
In that case I guess we can do whatever we want to, since there's no (sensible) backwards compat to worry about |
| 17:15 |
|
jnthn |
:) |
| 17:15 |
|
jnthn |
Yes, I'm happy not being backward compatible with segfaulting. |
| 17:16 |
|
dalek |
nqp: f88e4e8 | jnthn++ | src/core/NQPRoutine.pm: |
| 17:16 |
|
dalek |
nqp: Port multi-dispatch candidate sort to NQP. |
| 17:16 |
|
dalek |
nqp: |
| 17:16 |
|
dalek |
nqp: This is a fairly direct port of the C code rather than an attempt to |
| 17:16 |
|
dalek |
nqp: be a great deal more idiomatic. Not yet used for anything. |
| 17:16 |
|
dalek |
nqp: review: https://github.com/perl6/nqp/commit/f88e4e88a3 |
| 17:17 |
|
|
sevin joined #perl6 |
| 17:18 |
|
nwc10 |
so, will there be a mini-perl6 hackathon at FOSDEM tomorrow to make the multi-dipsatch canditate sort to ideomatic? :-) |
| 17:22 |
|
|
rindolf joined #perl6 |
| 17:22 |
|
rindolf |
Hi all. |
| 17:22 |
|
rindolf |
TimToady: here? |
| 17:23 |
|
TimToady |
but not really awake yet |
| 17:23 |
|
rindolf |
TimToady: ah. |
| 17:23 |
|
timotimo |
oh, huh, you can junction signatures |
| 17:23 |
|
rindolf |
TimToady: what is the percentage of your awakeness? |
| 17:23 |
|
rindolf |
awkity? |
| 17:23 |
|
rindolf |
awakity? |
| 17:23 |
|
rindolf |
awakedom? |
| 17:23 |
|
rindolf |
awakehood? |
| 17:23 |
|
|
benabik joined #perl6 |
| 17:24 |
|
* rindolf |
is in a silly mood. |
| 17:24 |
|
TimToady |
well, somewhere above 50%, but the coffee hasn't quite hit yet |
| 17:24 |
|
rindolf |
TimToady: ah. |
| 17:24 |
|
rindolf |
TimToady: this is one reason why I abstain from caffeine. |
| 17:24 |
|
rindolf |
Well, I eat it a little in foods. |
| 17:24 |
|
rindolf |
TimToady: OK, what's new? |
| 17:25 |
|
rindolf |
TimToady: how's the family? Kids? Grandkids? |
| 17:25 |
|
* rindolf |
thinks of a really big young goat. |
| 17:25 |
|
rindolf |
Grandkid. |
| 17:25 |
|
TimToady |
well, I'm looking at one of the two grandkids kicking on the sofa |
| 17:25 |
|
TimToady |
the new one is 6 months old or so |
| 17:25 |
|
rindolf |
TimToady: ah. |
| 17:25 |
|
TimToady |
(this one is Geneva's) |
| 17:26 |
|
rindolf |
TimToady: you have a daughter called Geneva? |
| 17:26 |
|
TimToady |
last I checked |
| 17:26 |
|
rindolf |
TimToady: OK. |
| 17:26 |
|
Celelibi |
Is raduko really usable currently? |
| 17:26 |
|
rindolf |
TimToady: I hope this trend will continue. |
| 17:26 |
|
* TimToady |
too |
| 17:26 |
|
TimToady |
Celelibi: for some things, sure |
| 17:26 |
|
jnthn |
Celelibi: Depends what you want to use it for. |
| 17:27 |
|
* jnthn |
has successfully used it for various stuffs :) |
| 17:27 |
|
rindolf |
Celelibi: depending on how usable and what for. |
| 17:27 |
|
Celelibi |
I mean: can I move from perl5 to perl6? |
| 17:27 |
|
rindolf |
Celelibi: also see Niecza (sp?) |
| 17:27 |
|
rindolf |
Celelibi: you shouldn't "move". |
| 17:27 |
|
TimToady |
Celelibi: you can start using both |
| 17:27 |
|
rindolf |
Celelibi: you should learn it and use both. |
| 17:27 |
|
Celelibi |
Well, currently I can't really use Perl6 since it really lacks modules. |
| 17:28 |
|
TimToady |
programming in Perl 6 will improve your Perl 5 as well |
| 17:28 |
|
rindolf |
Celelibi: do you mean something like CPAN? |
| 17:28 |
|
Celelibi |
yes. |
| 17:28 |
|
TimToady |
Celelibi: what you mean by "usable" is that everyone else has done the hard work for you :P |
| 17:29 |
|
Celelibi |
precisely. :) |
| 17:29 |
|
TimToady |
well, we're all working very hard around here |
| 17:29 |
|
Celelibi |
Is there any way to use perl5 modules from a perl6 code? |
| 17:30 |
|
rindolf |
Celelibi: well, feel free to write a new Perl 6 module or enhance an existing one. |
| 17:30 |
|
rindolf |
Celelibi: CPAN was not built in a day. |
| 17:30 |
|
rindolf |
Celelibi: and we now also want to enable Perl 6 to make use of the Perl 5-based CPAN. |
| 17:30 |
|
rindolf |
Celelibi: there may be Inline::Rakudo on CPAN. |
| 17:33 |
|
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 |
|
|
spider-mario joined #perl6 |
| 17:35 |
|
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:35 |
|
TimToady |
nope, did a bit of Lojban, saw the error of my ways |
| 17:35 |
|
Celelibi |
But I don't think I'll do this if that means porting Image::Magick to perl6. |
| 17:35 |
|
rindolf |
TimToady: ah. |
| 17:35 |
|
rindolf |
TimToady: I see. |
| 17:35 |
|
rindolf |
TimToady: BTW, don't you want to learn Hebrew? |
| 17:36 |
|
TimToady |
I want to learn every language, but I have only one brane, and more importantly, only 24 hours in a day |
| 17:36 |
|
rindolf |
TimToady: giving infinite time and infinite motivation. |
| 17:36 |
|
Celelibi |
All we need is a Matrix-like knowledge transfer system. |
| 17:37 |
|
|
FROGGS joined #perl6 |
| 17:38 |
|
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:39 |
|
Celelibi |
Who never thought about a way to plug his brain to a computer? :) |
| 17:39 |
|
jnthn |
arnsholt: Believe so, yes. |
| 17:40 |
|
arnsholt |
Excellent |
| 17:40 |
|
arnsholt |
It's the proper thing to do I think, but always good to get a second opinion |
| 17:43 |
|
rindolf |
Celelibi: well, maybe it dates back to the hallucinations of the Jewish prophets. |
| 17:43 |
|
rindolf |
Celelibi: who met God and his angels. |
| 17:45 |
|
rindolf |
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:45 |
|
TimToady |
well, I believe that God will choose to speak through whatever medium is currently in vogue :) |
| 17:45 |
|
rindolf |
Celelibi: at least that's what I understood from http://en.wikipedia.org/wiki/B[…]_%28psychology%29 |
| 17:45 |
|
TimToady |
nowadays it's more likely to be the Internet :) |
| 17:46 |
|
rindolf |
TimToady: I think everyone can speak as God sometimes. |
| 17:46 |
|
TimToady |
which is a kind of mass hallucination :) |
| 17:46 |
|
geekosaur |
reality is a mass hallucination, by some arguments |
| 17:46 |
|
TimToady |
but a very nice one, in spots |
| 17:47 |
|
* 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 |
|
TimToady |
as long as the medium I'm swimming around in supports creativity, I don't mind if there's a better Creator |
| 17:50 |
|
rindolf |
TimToady: the Roman Catholic Pope now has a Twitter account. |
| 17:51 |
|
TimToady |
perhaps quantum strings are limited to 140 characters |
| 17:52 |
|
rindolf |
TimToady: :-) |
| 17:52 |
|
rindolf |
TimToady: http://www.robcottingham.ca/ca[…]-this-brain-fire/ - see this and my comment. |
| 17:52 |
|
rindolf |
TimToady: once upon a time, Gutenberg's Bible was as looked down upon as Twitter/Facebook/Google+ today. |
| 17:52 |
|
TimToady |
fire made your brain like cooked food :) |
| 17:53 |
|
rindolf |
TimToady: at least I think. |
| 17:53 |
|
rindolf |
TimToady: yes. |
| 17:53 |
|
TimToady |
otoh, cooked food is actually more nutritious, so I don't hold it against fire |
| 17:53 |
|
colomon |
rn: say "this is a test" [&split] " " |
| 17:53 |
|
p6eval |
niecza v24-18-gaf64300: OUTPUT« » |
| 17:53 |
|
p6eval |
..rakudo 6d5dc6: OUTPUT«===[0mSORRY!===[0m�Unable to parse expression in bracketed infix; couldn't find final ']'�at /tmp/o0E5alr0Wb:1�------> say "this is a test" [&�split] " "�» |
| 17:54 |
|
TimToady |
so I don't mind if God changes our brains for the better either :) |
| 17:54 |
|
rindolf |
TimToady: well, without fire, we wouldn't be talking today on IRC. |
| 17:54 |
|
colomon |
n: say ("this is a test" [&split] " ") |
| 17:54 |
|
p6eval |
niecza v24-18-gaf64300: OUTPUT« » |
| 17:54 |
|
colomon |
n: say split "this is a test", " " |
| 17:54 |
|
p6eval |
niecza v24-18-gaf64300: OUTPUT« » |
| 17:54 |
|
colomon |
ah |
| 17:54 |
|
colomon |
n: say (" " [&split] "this is a test ") |
| 17:55 |
|
p6eval |
niecza v24-18-gaf64300: OUTPUT«this is a test » |
| 17:55 |
|
colomon |
n: say (" " [&split] "this is a test ").perl |
| 17:55 |
|
p6eval |
niecza v24-18-gaf64300: OUTPUT«["this", "is", "a", "test", ""].list» |
| 17:55 |
|
* TimToady |
sometimes wonders why we only blame God for the scary bits of the universe ("it was an Act of God...") |
| 17:56 |
|
rindolf |
TimToady: well, like Muhammad said, “Trust in God, but tie your Camel”. |
| 17:56 |
|
* colomon |
thinks of "Wonder of wonders, miracle of miracles" as a counter-example.... what's the write name of that song? |
| 17:56 |
|
rindolf |
colomon: don't know. |
| 17:56 |
|
TimToady |
indeed, hafta run some errands, or scary bits will happen to me :) |
| 17:56 |
|
TimToady |
afk & |
| 17:57 |
|
rindolf |
TimToady: bye, have fun. |
| 17:57 |
|
colomon |
rindolf: ah, it's just "Miracle of Miracles". |
| 17:57 |
|
rindolf |
colomon: ah, OK. |
| 18:00 |
|
colomon |
in case anyone is wondering what I'm going on about: http://www.lyricsondemand.com/[…]racleslyrics.html |
| 18:06 |
|
rindolf |
colomon: ah, Fiddler on the Roof! |
| 18:06 |
|
rindolf |
colomon: “If I were a richman” |
| 18:06 |
|
arnsholt |
jnthn: 'Nother question: Is NULL a sensible zero-value for a Parrot STRING*, or should I create an empty string or some such? |
| 18:06 |
|
jnthn |
STRINGNULL or so |
| 18:07 |
|
jnthn |
It's the equivalent to PMCNULL |
| 18:07 |
|
rindolf |
colomon: nice song! |
| 18:07 |
|
arnsholt |
Right, right. I keep forgetting Parrot has those things |
| 18:08 |
|
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:22 |
|
|
not_gerd joined #perl6 |
| 18:24 |
|
not_gerd |
hello, #perl6 |
| 18:24 |
|
not_gerd |
how do I access environment vars from NQP? |
| 18:24 |
|
|
kivutar joined #perl6 |
| 18:26 |
|
rindolf |
not_gerd: hi. |
| 18:27 |
|
rindolf |
not_gerd: I presume with a PMC. |
| 18:27 |
|
rindolf |
Parrot Magic Cookie. |
| 18:27 |
|
rindolf |
But that's just wild-guessing. |
| 18:31 |
|
arnsholt |
not_gerd: Not entirely sure that's implemented in NQP yet. What do you need it for? |
| 18:35 |
|
not_gerd |
arnsholt: I just ack'd through the Rakudo source, and there's indeed no wrapper yet |
| 18:35 |
|
arnsholt |
> class Foo { has int1 $.tiny; method set() { $!tiny = 3; } }; my Foo $x .= new; $x.set; say $x.tiny |
| 18:35 |
|
arnsholt |
1 |
| 18:35 |
|
arnsholt |
\o/ |
| 18:35 |
|
not_gerd |
arnsholt: trying to generate a nqp-jvm for windows via cygwin |
| 18:36 |
|
not_gerd |
I'll need the path separator to end up \; instead of ; or : |
| 18:36 |
|
arnsholt |
Oh, right |
| 18:40 |
|
|
clintongormley joined #perl6 |
| 18:42 |
|
arnsholt |
jnthn: REPR compose is only supposed to happen once, right? |
| 18:42 |
|
|
SunilJoshi joined #perl6 |
| 18:42 |
|
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 |
|
clintongormley |
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 |
|
* clintongormley |
is working in a java shop now, and the Perl jokes are becoming a little tiresome... |
| 18:46 |
|
arnsholt |
I might submit a Perl 6 talk to a Java conference here in Norway =) |
| 18:46 |
|
clintongormley |
heh |
| 18:46 |
|
clintongormley |
i can't wait for the day these java types start raving about how cool p6 grammars are |
| 18:47 |
|
arnsholt |
=) |
| 18:56 |
|
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:59 |
|
not_gerd |
jnthn: https://github.com/jnthn/nqp-jvm-prep/pull/10 |
| 18:59 |
|
arnsholt |
perigrin: Or 1980, for that matter ;) |
| 18:59 |
|
flussence |
.oO( Perl's a real JokeFactoryFactory, ain't it? ) |
| 19:00 |
|
perigrin |
arnsholt: well yeah I'm just picking the place where I know Perl introduced lexical closures |
| 19:00 |
|
|
sizz joined #perl6 |
| 19:01 |
|
perigrin |
clintongormley: then you can ask them if they'll be ready for Roles by 2025 |
| 19:01 |
|
clintongormley |
but they'll be called Joles, or Rojes, or something |
| 19:01 |
|
not_gerd |
jnthn: there's a typo in my pull request - will fix |
| 19:02 |
|
perigrin |
clintongormley: jTraits. |
| 19:02 |
|
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 |
| 19:02 |
|
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? |
| 19:03 |
|
perigrin |
swarley: I have no official position but I think it's safe to say "Heck no! Go for it!" |
| 19:03 |
|
arnsholt |
I'd think it's a pretty cool thing to do =) |
| 19:04 |
|
swarley |
For anyone that isn't aware, YARV is MRI Ruby's VM |
| 19:04 |
|
* perigrin |
guessed but wasn't sure. |
| 19:04 |
|
arnsholt |
Oh cool. I thought it might be the Rubinius one |
| 19:06 |
|
swarley |
No, Rubinius uses LLVM |
| 19:06 |
|
swarley |
Which, in my opinion |
| 19:06 |
|
swarley |
Is not the best choice for a dynamic language |
| 19:06 |
|
swarley |
But I'm not an expert, so what do I know |
| 19:06 |
|
arnsholt |
Oh, right |
| 19:07 |
|
* not_gerd |
fixed typo in pull request |
| 19:07 |
|
swarley |
Maybe it would be better to try to make a PASM -> YARV first |
| 19:07 |
|
swarley |
then maybe try PIR -> YARV |
| 19:07 |
|
swarley |
etc etc |
| 19:08 |
|
perigrin |
I think that following teh same path jnthn took to the JVM would be a reasonable choice |
| 19:08 |
|
swarley |
Well, my biggest concern is that I've not attempted something like that before. |
| 19:08 |
|
swarley |
I'm okay with lexical analysis. My biggest issue is with larger grammar construction |
| 19:08 |
|
|
cognominal joined #perl6 |
| 19:09 |
|
perigrin |
mostly it's "get nqp working" then the rest bootstraps from what I gathered. |
| 19:10 |
|
swarley |
Ah. |
| 19:10 |
|
swarley |
Well |
| 19:10 |
|
swarley |
I think I'm going to get familiar with YARV first |
| 19:10 |
|
swarley |
Do a little work with PASM |
| 19:10 |
|
not_gerd |
swarley: PASM is deprecated |
| 19:10 |
|
perigrin |
that's fair :) |
| 19:10 |
|
swarley |
It's just for learning purposes |
| 19:11 |
|
not_gerd |
and Rakudo really wants to be ported at the NQP layer |
| 19:11 |
|
swarley |
I'm not planning to use a PASM parser |
| 19:11 |
|
swarley |
I just want to learn YARV bytecode with it |
| 19:18 |
|
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 |
|
jnthn |
Porting NQP doesn't need writing a parser. |
| 19:20 |
|
jnthn |
It does need writing a regex compiler... ;) |
| 19:20 |
|
masak |
turns out I got to do a 20-minute impromptu talk about Perl 6 this afternoon :> |
| 19:20 |
|
arnsholt |
jnthn: Yeah, that's what I'd surmised |
| 19:20 |
|
masak |
(I did a TDD demo of implementing minesweeper, with lots of good questions from the audience) |
| 19:20 |
|
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. |
| 19:21 |
|
arnsholt |
(I'm trying to port CStruct over to the new compose scheme) |
| 19:21 |
|
jnthn |
not_gerd: Looking at your PR |
| 19:23 |
|
dalek |
nqp-jvm-prep: 1796813 | (Gerhard R)++ | Makefile: |
| 19:23 |
|
dalek |
nqp-jvm-prep: Add some variable definitions to Makefile |
| 19:23 |
|
dalek |
nqp-jvm-prep: |
| 19:23 |
|
dalek |
nqp-jvm-prep: This way, we can easily override the tools to use via |
| 19:23 |
|
dalek |
nqp-jvm-prep: |
| 19:23 |
|
jnthn |
not_gerd++ # merged it all |
| 19:24 |
|
|
dalek joined #perl6 |
| 19:25 |
|
jnthn |
masak: Sounds nice :) |
| 19:26 |
|
jnthn |
masak++ |
| 19:26 |
|
not_gerd |
jnthn: thanks |
| 19:30 |
|
dalek |
nqp/dyncall-sized-num: 96581f1 | (Arne Skjærholt)++ | src/6model/reprs/CStruct.c: |
| 19:30 |
|
dalek |
nqp/dyncall-sized-num: Die in CStruct if native type isn't a multiple of 8 bits wide. |
| 19:30 |
|
dalek |
nqp/dyncall-sized-num: review: https://github.com/perl6/nqp/commit/96581f1270 |
| 19:30 |
|
dalek |
nqp/dyncall-sized-num: 0048c0e | (Arne Skjærholt)++ | src/6model/reprs/P6 (2 files): |
| 19:30 |
|
dalek |
nqp/dyncall-sized-num: Make P6{int,num} robust when bits key is absent on REPR composition. |
| 19:30 |
|
dalek |
nqp/dyncall-sized-num: review: https://github.com/perl6/nqp/commit/0048c0ea54 |
| 19:30 |
|
dalek |
nqp/dyncall-sized-num: 1531df3 | (Arne Skjærholt)++ | src/6model/reprs/CArray.c: |
| 19:30 |
|
dalek |
nqp/dyncall-sized-num: Set sensible zero values in CArray on out-of-bounds access. |
| 19:30 |
|
dalek |
nqp/dyncall-sized-num: review: https://github.com/perl6/nqp/commit/1531df35f2 |
| 19:30 |
|
dalek |
nqp/dyncall-sized-num: 1a8e58a | (Arne Skjærholt)++ | src/6model/reprs/P6opaque.c: |
| 19:30 |
|
dalek |
nqp/dyncall-sized-num: Teach P6opaque how to align objects properly. |
| 19:30 |
|
dalek |
nqp/dyncall-sized-num: review: https://github.com/perl6/nqp/commit/1a8e58a62e |
| 19:30 |
|
dalek |
nqp/dyncall-sized-num: 6b1e294 | (Arne Skjærholt)++ | src/6model/reprs/P6opaque.c: |
| 19:30 |
|
dalek |
nqp/dyncall-sized-num: Teach P6opaque how to deal with odd (not multiple of 8) native bit widths. |
| 19:30 |
|
dalek |
nqp/dyncall-sized-num: review: https://github.com/perl6/nqp/commit/6b1e294f6d |
| 19:30 |
|
dalek |
nqp/dyncall-sized-num: 2d2074c | (Arne Skjærholt)++ | src/6model/reprs/CArray.c: |
| 19:30 |
|
dalek |
nqp/dyncall-sized-num: Remove dead code from CArray. |
| 19:30 |
|
dalek |
nqp/dyncall-sized-num: review: https://github.com/perl6/nqp/commit/2d2074ca80 |
| 19:30 |
|
dalek |
nqp/dyncall-sized-num: bbf29dd | (Arne Skjærholt)++ | src/6model/reprs/CStruct.c: |
| 19:30 |
|
dalek |
nqp/dyncall-sized-num: Compute allocation strategy of CStruct on REPR compose. |
| 19:30 |
|
dalek |
nqp/dyncall-sized-num: review: https://github.com/perl6/nqp/commit/bbf29dd99d |
| 19:31 |
|
arnsholt |
jnthn: I think that's pretty much it |
| 19:32 |
|
* masak |
heads out to dinner & |
| 19:35 |
|
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:36 |
|
jnthn |
not_gerd: Plesae don't break it with nmake or then I can't build ;-) |
| 19:39 |
|
cognominal |
nr: $/ = 'foo'; say $/ |
| 19:39 |
|
p6eval |
rakudo 6d5dc6: OUTPUT«foo» |
| 19:39 |
|
p6eval |
..niecza v24-18-gaf64300: OUTPUT«===[0mSORRY!===[0m��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��» |
| 19:39 |
|
* not_gerd |
goes investigating nmake syntax |
| 19:39 |
|
cognominal |
niecza++ |
| 19:40 |
|
jnthn |
arnsholt: I'm reviewing commit by commit, so maybe you already tweaked this: |
| 19:40 |
|
jnthn |
https://github.com/perl6/nqp/c[…]f8f1e6bbc9e#L0R71 |
| 19:41 |
|
jnthn |
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:41 |
|
jnthn |
heh, copy_to turned out cutely :) |
| 19:43 |
|
jnthn |
https://github.com/perl6/nqp/c[…]8f1e6bbc9e#L0R111 # is that missing a cast on the RHS maybe? |
| 19:45 |
|
arnsholt |
Yeah, I'm very happy with copy_to. It keeps all the pointer-mucking in get and set |
| 19:46 |
|
arnsholt |
Right about the first one. That can be factored out of the if |
| 19:47 |
|
arnsholt |
On the second one, yeah I guess I should explicitly cast |
| 19:47 |
|
arnsholt |
You'll find the same thing in P6int, in that case |
| 19:49 |
|
|
sizz_ joined #perl6 |
| 19:51 |
|
swarley |
Where is the lexer/parser in parrot? |
| 19:52 |
|
diakopter |
which one... there are many |
| 19:52 |
|
swarley |
The one for PIR/PASM |
| 19:52 |
|
|
MikeFair_ joined #perl6 |
| 19:53 |
|
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 |
|
swarley |
i can't seem to find anything with a relevant filename |
| 19:54 |
|
arnsholt |
Troo, troo. So 0.0/0.0, I guess? |
| 19:55 |
|
jnthn |
*nod* |
| 19:57 |
|
jnthn |
arnsholt: Other than those small things, I'm very happy with this. :) |
| 19:57 |
|
jnthn |
arnsholt++ |
| 19:57 |
|
arnsholt |
Speaking of, is there a special reason you do "float x = 0.0; value = x/0.0"? |
| 19:58 |
|
jnthn |
arnsholt: Yes, my C compiler rejected explicit 0.0/0.0 as divide by zero error...as a compile time error |
| 20:00 |
|
arnsholt |
Right, right. Keeping the compiler happy is plenty reason =) |
| 20:03 |
|
|
bruges_ joined #perl6 |
| 20:03 |
|
swarley |
Is there not a grammar in th parrot source tree? |
| 20:03 |
|
benabik |
swarley: The compiler for PIR/PASM is called IMCC. It's found in parrot/compilers/imcc/ |
| 20:03 |
|
swarley |
I can't see one.. |
| 20:03 |
|
swarley |
Oh, alright. Thank you very much |
| 20:04 |
|
swarley |
I saw that, and I was looking for it |
| 20:04 |
|
swarley |
I just didn't know it was there |
| 20:04 |
|
* swarley |
shivers |
| 20:05 |
|
swarley |
C parsers.. |
| 20:05 |
|
swarley |
oh wait, is that a .y i see? |
| 20:05 |
|
japhb |
arnsholt, this commit looks strange to me: https://github.com/perl6/nqp/commit/6b1e294f6d |
| 20:05 |
|
japhb |
arnsholt, so if bits % 8 is 2, then you're going to add 2 to bits? Why? |
| 20:06 |
|
benabik |
swarley: Yes. You probably want imcc.y and imcc.l |
| 20:06 |
|
swarley |
oh thank heavens |
| 20:06 |
|
arnsholt |
japhb: Der, derp, derp. Thanks =) |
| 20:07 |
|
arnsholt |
I did the very same thing for my first attempt at implementing alignment |
| 20:07 |
|
japhb |
heh. |
| 20:07 |
|
japhb |
Easy mistake to make! |
| 20:07 |
|
arnsholt |
It should be 8-bits%8, of course |
| 20:07 |
|
jnthn |
d'oh, I missed that one too |
| 20:07 |
|
jnthn |
japhb++ |
| 20:08 |
|
japhb |
OCD FTW |
| 20:09 |
|
dalek |
nqp/dyncall-sized-num: f08620a | (Arne Skjærholt)++ | src/6model/reprs/P6opaque.c: |
| 20:09 |
|
dalek |
nqp/dyncall-sized-num: Fix braino in P6opaque computation of bitwidths. |
| 20:09 |
|
dalek |
nqp/dyncall-sized-num: |
| 20:09 |
|
dalek |
nqp/dyncall-sized-num: japhb++ for spotting it. |
| 20:09 |
|
dalek |
nqp/dyncall-sized-num: review: https://github.com/perl6/nqp/commit/f08620abd5 |
| 20:12 |
|
|
pmurias joined #perl6 |
| 20:13 |
|
arnsholt |
jnthn: For the explicit casts in P6int/P6num, I'll be explicit and cast all of 'em |
| 20:13 |
|
arnsholt |
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 |
| 20:13 |
|
pmurias |
swarley: porting QAST would be easier/more usefull than porting PIR |
| 20:14 |
|
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:16 |
|
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 |
| 20:16 |
|
cognominal |
nr: $_='a'; s :g /a/b; say $_ |
| 20:16 |
|
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 ...) |
| 20:16 |
|
p6eval |
rakudo 6d5dc6: OUTPUT«===[0mSORRY!===[0m�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>� … |
| 20:16 |
|
p6eval |
..niecza v24-18-gaf64300: OUTPUT«===[0mSORRY!===[0m��Malformed replacement part; couldn't find final / at /tmp/676xM3kY3D line 1:�------> $_='a'; s :g /a/�b; say $_��Parse failed��» |
| 20:16 |
|
arnsholt |
And I sort of like the symmetry of it, in any case |
| 20:16 |
|
cognominal |
oops |
| 20:16 |
|
swarley |
what is the exact definition of QAST? |
| 20:16 |
|
cognominal |
nr: $_='a'; s :g /a/b/; say $_ |
| 20:16 |
|
p6eval |
rakudo 6d5dc6: OUTPUT«===[0mSORRY!===[0m�Unrecognized adverb: :g�at /tmp/lCkLYXvcV9:1�------> $_='a'; s :g �/a/b/; say $_� expecting any of:� colon pair (restricted)�» |
| 20:16 |
|
p6eval |
..niecza v24-18-gaf64300: OUTPUT«b» |
| 20:16 |
|
swarley |
i'm assuming Q abstract syntax tree |
| 20:17 |
|
cognominal |
nr: $_='a'; s:g/a/b/; say $_ |
| 20:17 |
|
p6eval |
rakudo 6d5dc6, niecza v24-18-gaf64300: OUTPUT«b» |
| 20:17 |
|
cognominal |
nr: $_='a'; s :g/a/b/; say $_ |
| 20:17 |
|
p6eval |
niecza v24-18-gaf64300: OUTPUT«b» |
| 20:17 |
|
p6eval |
..rakudo 6d5dc6: OUTPUT«===[0mSORRY!===[0m�Unrecognized adverb: :g�at /tmp/9W2Sq334qT:1�------> $_='a'; s :g�/a/b/; say $_� expecting any of:� colon pair (restricted)�» |
| 20:18 |
|
jnthn |
swarley: Q abstract syntax tree, yes. |
| 20:18 |
|
jnthn |
swarley: It replaced PAST, and Q is P++. :) |
| 20:18 |
|
dalek |
nqp/dyncall-sized-num: e221d3d | (Arne Skjærholt)++ | src/6model/reprs/CArray.c: |
| 20:18 |
|
dalek |
nqp/dyncall-sized-num: Return NaN instead of 0.0 on out-of-bounds read in CArray. |
| 20:18 |
|
dalek |
nqp/dyncall-sized-num: review: https://github.com/perl6/nqp/commit/e221d3d66a |
| 20:18 |
|
dalek |
nqp/dyncall-sized-num: 9cb0060 | (Arne Skjærholt)++ | src/6model/reprs/P6 (2 files): |
| 20:18 |
|
dalek |
nqp/dyncall-sized-num: Explicitly cast assigned values to the correct type in P6{int,num}. |
| 20:18 |
|
dalek |
nqp/dyncall-sized-num: |
| 20:18 |
|
dalek |
nqp/dyncall-sized-num: Also factors out a shared subexpression in P6num. |
| 20:18 |
|
dalek |
nqp/dyncall-sized-num: review: https://github.com/perl6/nqp/commit/9cb0060dbf |
| 20:19 |
|
swarley |
oh, haha. |
| 20:19 |
|
japhb |
jnthn, that is fast becoming a top FAQ, I think. Certainly in the top 5 this last week alone ... |
| 20:20 |
|
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:20 |
|
jnthn |
japhb: I'm not particularly sure where to put the answer though ;) |
| 20:20 |
|
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 |
| 20:20 |
|
jnthn |
japhb: I did say so in my blog :) |
| 20:21 |
|
jnthn |
But I guess only so many read that ;) |
| 20:21 |
|
swarley |
jnthn, is nqp-jvm a branch of github:perl6/nqp? |
| 20:22 |
|
jnthn |
swarley: No, separate repo for now |
| 20:23 |
|
jnthn |
https://github.com/jnthn/nqp-jvm-prep |
| 20:24 |
|
swarley |
oh, alright. Thank you |
| 20:25 |
|
swarley |
So, there is technically no grammar? |
| 20:26 |
|
pmurias |
yes |
| 20:26 |
|
pmurias |
Perl 6 and NQP (a Perl 6 dialect) are compiled to QAST |
| 20:26 |
|
swarley |
Okay, so is there like.. A QAST opcode listing? |
| 20:27 |
|
pmurias |
https://github.com/perl6/nqp/b[…]ocs/qast.markdown |
| 20:28 |
|
pmurias |
swarley: that's partial documentation |
| 20:29 |
|
pmurias |
swarley: https://github.com/jnthn/nqp-j[…]ree/master/t/qast |
| 20:29 |
|
pmurias |
swarley: test for QAST |
| 20:29 |
|
pmurias |
* tests |
| 20:30 |
|
swarley |
Alright.. This seems like it's going to be a long time! |
| 20:30 |
|
swarley |
and these things |
| 20:30 |
|
swarley |
QAST::Var.new( :name('knowhow'), :scope('local'), :decl('var') ), |
| 20:30 |
|
swarley |
Just named parameters right? |
| 20:30 |
|
jnthn |
var is a variable |
| 20:30 |
|
swarley |
Well ye |
| 20:30 |
|
swarley |
s |
| 20:30 |
|
swarley |
But I mean |
| 20:30 |
|
jnthn |
:decl('param') adds a parameter |
| 20:31 |
|
swarley |
:name, :scope |
| 20:31 |
|
jnthn |
Oh, I see |
| 20:31 |
|
jnthn |
Yeah, that is saying "this is a declaration of a local variable called knowhow" |
| 20:31 |
|
swarley |
alright cool. |
| 20:31 |
|
swarley |
Do these tests explain well enough what the intended operation is? |
| 20:32 |
|
FROGGS |
swarley: named params can be like: :name('value'), :name<value>, and even :$name |
| 20:32 |
|
swarley |
Also, is there a test that I should start with trying to pass? |
| 20:34 |
|
jnthn |
swarley: qast_literal.t is probably the simplest one. |
| 20:40 |
|
swarley |
alright sounds good |
| 20:41 |
|
|
MayDaniel joined #perl6 |
| 21:00 |
|
|
sizz joined #perl6 |
| 21:05 |
|
swarley |
So wait, would it be better to rewrite the bootstraps for YARV? |
| 21:05 |
|
swarley |
not that I understand any of it o_O |
| 21:06 |
|
swarley |
Wait, that has to be generated from nqp itself or something |
| 21:06 |
|
swarley |
or someone has the brain of a machine.. |
| 21:15 |
|
|
quester joined #perl6 |
| 21:16 |
|
pmurias |
swarley: you need to implement a lot of QAST before you can boostrap in YARV |
| 21:18 |
|
swarley |
what is <ident> supposed to match? |
| 21:19 |
|
swarley |
r: say "_Hello13" ~~ /<ident>/ |
| 21:19 |
|
p6eval |
rakudo 6d5dc6: OUTPUT«「_Hello13」 ident => 「_Hello13」» |
| 21:19 |
|
swarley |
r: say "1_Hello13" ~~ /<ident>/ |
| 21:19 |
|
p6eval |
rakudo 6d5dc6: OUTPUT«「_Hello13」 ident => 「_Hello13」» |
| 21:19 |
|
swarley |
alright then |
| 21:20 |
|
swarley |
r: say "H_Hello13" ~~ /<ident>/ |
| 21:20 |
|
p6eval |
rakudo 6d5dc6: OUTPUT«「H_Hello13」 ident => 「H_Hello13」» |
| 21:21 |
|
FROGGS |
r: say "'hello'-123" ~~ /<ident>/ |
| 21:21 |
|
p6eval |
rakudo 6d5dc6: OUTPUT«「hello」 ident => 「hello」» |
| 21:26 |
|
not_gerd |
jnthn: is the JVM setting supposed to be called NQPCORE.setting.class or NQPCOREJVM.setting.class? |
| 21:26 |
|
not_gerd |
the rules has the former name, but generates the latter |
| 21:26 |
|
not_gerd |
^rule |
| 21:26 |
|
jnthn |
not_gerd: It's meant to be the latter for now |
| 21:27 |
|
jnthn |
not_gerd: That...may explain the excessive building :) |
| 21:28 |
|
|
raiph joined #perl6 |
| 21:42 |
|
moritz |
nwc10: is it correct to say that constant folding the only compile-time optimization that Perl 5 does? |
| 21:42 |
|
dalek |
perl6-bench: 575c02c | (Geoffrey Broadwell)++ | analyze: |
| 21:42 |
|
dalek |
perl6-bench: Heuristically guess that a supposed fail when there is a skip:null pair in the JSON was actually an intentional (but code-based) skip |
| 21:42 |
|
dalek |
perl6-bench: review: https://github.com/japhb/perl6[…]commit/575c02c8ab |
| 21:42 |
|
dalek |
perl6-bench: 55f801c | (Geoffrey Broadwell)++ | microbenchmarks.pl: |
| 21:42 |
|
dalek |
perl6-bench: Add reduce_int_comb_range_1e4 test, inspired by bench-scripts++ |
| 21:42 |
|
dalek |
perl6-bench: review: https://github.com/japhb/perl6[…]commit/55f801cc1a |
| 22:12 |
|
|
not_gerd left #perl6 |
| 22:31 |
|
|
spider-mario joined #perl6 |
| 22:36 |
|
|
quester left #perl6 |
| 22:45 |
|
|
pjcj joined #perl6 |
| 22:47 |
|
|
cognominal joined #perl6 |
| 23:06 |
|
|
lestrrat joined #perl6 |
| 23:09 |
|
|
MayDaniel joined #perl6 |
| 23:24 |
|
dalek |
perl6-bench: bb173b9 | (Geoffrey Broadwell)++ | microbenchmarks.pl: |
| 23:24 |
|
dalek |
perl6-bench: D'oh! kboga++ for spotting off-by-10x error |
| 23:24 |
|
dalek |
perl6-bench: review: https://github.com/japhb/perl6[…]commit/bb173b9cb2 |
| 23:31 |
|
|
clintongormley left #perl6 |
| 23:32 |
|
|
kivutar joined #perl6 |