Time |
Nick |
Message |
00:01 |
dpk |
p6: say 'xß' ~~ rx:i/XSS|YS/ |
00:01 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «Nil» |
00:02 |
dpk |
p6: say 'xss' ~~ rx:i/XSS|YS/ |
00:02 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «「xss」» |
00:02 |
dpk |
p6: say 'xß' ~~ rx:i/Xß|YS/ |
00:02 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «「xß」» |
00:02 |
dpk |
p6: say 'xss' ~~ rx:i/Xß|YS/ |
00:02 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «Nil» |
00:02 |
dpk |
⬑ this seems like a bug |
00:03 |
dpk |
though beware there is also the more complicated case (from an implementation perspective) of rx:i/[XS|Y]S/ |
00:04 |
dpk |
none of the regexp engines i've tried has got that one right, and only Ruby (oniguruma) has got the previous examples right too |
00:05 |
dpk |
(i've tried re2, pcre, perl 5, and egrep) |
00:21 |
|
lookatme joined #perl6 |
00:21 |
lookatme |
o/ |
00:23 |
tyil |
\o |
00:30 |
|
kaare_ joined #perl6 |
00:32 |
|
ryn1x joined #perl6 |
00:33 |
|
MasterDuke joined #perl6 |
00:38 |
|
Khisanth joined #perl6 |
00:40 |
|
Cabanossi joined #perl6 |
00:41 |
dpk |
okay, even ICU's regexp engine does not bother to try to match (?i:(XS|Y)S) against xß 'correctly' |
00:41 |
dpk |
so i think that case can safely be ignored |
00:51 |
|
aborazmeh joined #perl6 |
00:51 |
|
aborazmeh joined #perl6 |
00:55 |
|
char_var[buffer] joined #perl6 |
00:57 |
|
silug joined #perl6 |
00:58 |
lookatme |
I am curious if I collect the everything(include lib, precomp) moar needed, is it possible run it in another pc. |
01:04 |
|
silug joined #perl6 |
01:17 |
ryn1x |
When uploading to CPAN on PAUSE do I need to put Perl6 in the 'Target Directory' field? |
01:19 |
|
cdg joined #perl6 |
01:19 |
|
dayangkun joined #perl6 |
01:33 |
|
mudman joined #perl6 |
01:40 |
|
Cabanossi joined #perl6 |
01:50 |
|
b2gills joined #perl6 |
01:55 |
|
cdg joined #perl6 |
01:58 |
ZzZombo |
m: say "\n" ~~ /<ws>/ |
01:58 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «「」 ws => 「」» |
02:00 |
|
lizmat joined #perl6 |
02:03 |
ZzZombo |
Eh, why does the regex doc page omit info for `<ww>` despite using the negated form in 4 places towards the end of it? |
02:03 |
ZzZombo |
What does exactly it do? |
02:03 |
buggable |
New CPAN upload: Terminal-Spinners-0.0.3.tar.gz by RYNIX https://cpan.metacpan.org/authors/id/R/RY/RYNIX/Perl6/Terminal-Spinners-0.0.3.tar.gz |
02:05 |
geekosaur |
ZzZombo, it's in there. look for 'Predefined subrules:' |
02:06 |
* geekosaur |
notes a typo, reading on therefrom... |
02:08 |
ZzZombo |
Why is it written with the '?'?? It makes no sense, and made Ctrl+F to fail. |
02:08 |
ZzZombo |
Also, shouldn't the dot be used to suppress capture? |
02:10 |
geekosaur |
that is explained in the description |
02:11 |
geekosaur |
*any* symbol character prevents capture; '?' is used because it implies 'this is an assertion that matches a *state*, as opposed to something that actually matches one or more characters' |
02:12 |
lookatme |
m: say "123" ~~ /<.ww>/; say "123" ~~ /<?ww>/; say "123" ~~ /<ww>/; |
02:12 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «「」「」「」 ww => 「」» |
02:12 |
geekosaur |
whereas <.ww> would suggest that <ww> matches some character or characters |
02:12 |
lookatme |
What's the difference `.` and `?` |
02:12 |
geekosaur |
in this case they;re the same from a perl 6 standpoint, it's consistency for the reader that matteers |
02:12 |
geekosaur |
ok, what I said above was mumblenonsense |
02:12 |
geekosaur |
lemme see if I can figure out a different way to say it |
02:13 |
geekosaur |
perl 6 actually does not care what symbol you use to say 'this is non-capturing'. (in some specific circumstances using ! has meaning.) |
02:14 |
lookatme |
I found ` <alpha> # match a letter and capture to $alpha (eventually $<alpha>) |
02:14 |
lookatme |
<.alpha> # match a letter, don't capture |
02:14 |
lookatme |
<?alpha> # match null before a letter, don't capture` in design doc |
02:14 |
geekosaur |
from a *human* standpoint, using '.' is intended to say 'this matches some text, and would give it to us but we told it not to' |
02:14 |
geekosaur |
from a *human* standpoint, using '?' means 'this matches a particular state instead of a particular set of characters' |
02:15 |
geekosaur |
so like <?before foo> means "match the state of being just before 'foo'", as opposed to "match 'foo'" |
02:17 |
geekosaur |
<ww> is an assertion that you are between word characters. it doesn't match and wouldn't capture any actual characters; it is a state. as such, it doesn't make much sense normally to use it in default capturing mode, since the capture would aways be empty |
02:18 |
|
kitsunenokenja joined #perl6 |
02:18 |
geekosaur |
*but* in some contexts (like building regexes programmatically) it is useful for all such things to behave consistently, so you don't need to have special cases "this <xxx> captures, but this <xxy> doesn't" |
02:18 |
geekosaur |
so all rules behave the same way: they add *something* to the list of captuires, unless they start with a symbol in which case they do not. |
02:20 |
geekosaur |
so, if you say <ww> in a regex, if it matches it doesn't match *haracters*, but it still records an empty capture for consistency |
02:20 |
lookatme |
m: say "fp" ~~ /<alpha><alpha>/; say "fp" ~~ /<.alpha><alpha>/; say "fp" ~~ /<?alpha><alpha>/; # this make sense |
02:20 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «「fp」 alpha => 「f」 alpha => 「p」「fp」 alpha => 「p」「f」 alpha => 「f」» |
02:21 |
geekosaur |
and . and ? don't actually mean anything different. but for human readers . implies it would capture characters but ? implies it's about a certain condition being true instead of about what character(s) it would match |
02:21 |
geekosaur |
it's just convention |
02:21 |
lookatme |
Hmm |
02:25 |
ZzZombo |
But the question what exactly constitutes "within word" still stands. |
02:28 |
geekosaur |
that's defined a little before that in \w |
02:28 |
geekosaur |
"matches a single word character; i.e., a letter (Unicode category L), a digit or an underscore." |
02:29 |
geekosaur |
so <?ww> matches between two things that match \w, and <?wb> matches between two things where one matches \w and the other matches \W |
02:30 |
lookatme |
m: say "123abc" ~~ /\d+<?ww>\w+/ |
02:30 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «「123abc」» |
02:30 |
|
mudman joined #perl6 |
02:31 |
ZzZombo |
thanks |
02:31 |
lookatme |
m: say "123 abc" ~~ /<?wb>\w+/ |
02:31 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «「123」» |
02:32 |
geekosaur |
huh, maybe it's smarter than p5's, that would be nice. (one thing that always annoyed me about the p5 version was I had to separately handle the "start/end of line" case( |
02:33 |
geekosaur |
ok, filed doc bug :) |
02:33 |
|
khw joined #perl6 |
02:33 |
geekosaur |
(unrelated, I just noticed it while ooking at the doc) |
02:34 |
geekosaur |
that said, the doc wshould probably be clearer about what those chars mean if it's not already stated somewhere |
02:34 |
geekosaur |
the speculation was clear about it |
02:39 |
|
stmuk_ joined #perl6 |
02:55 |
|
ilbot3 joined #perl6 |
02:55 |
|
Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend! |
03:02 |
|
noganex joined #perl6 |
03:08 |
|
dmaestro joined #perl6 |
03:09 |
dmaestro |
m: use Inline::Perl5 |
03:09 |
camelia |
rakudo-moar eacf9b277: ( no output ) |
03:10 |
|
ufobat_ joined #perl6 |
03:10 |
dmaestro |
m: use Inline::Perl5 ; my $a = EVAL "[ 1, 2 ]", :lang<Perl5>; say $a.elems |
03:10 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «2» |
03:10 |
dmaestro |
m: use Inline::Perl5 ; my $a = EVAL "[ ]", :lang<Perl5>; say $a.elems |
03:10 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «0» |
03:11 |
|
entonian joined #perl6 |
03:12 |
|
konsolebox joined #perl6 |
03:13 |
dmaestro |
Interesting, I don't get the above result (0 elements for an empty Inline::Perl5::Array) on my Mac running Rakudo Star 2017.10 |
03:14 |
dmaestro |
> my $a = EVAL "[]", :lang<Perl5> ; say $a.elems |
03:14 |
dmaestro |
4294967296 |
03:18 |
dmaestro |
Inline::Perl5:ver<0.29>:auth<github:niner> |
03:19 |
geekosaur |
looks like a fixed bug to me |
03:20 |
dmaestro |
How recently? version? |
03:24 |
dmaestro |
Is there a way to ask camelia what version of a module is loaded? |
03:28 |
geekosaur |
I think there is b ut it's not easy and I'm not sure of details. means messing with CompUnitRepos |
03:30 |
dmaestro |
ok, thanks. I haven't found a reference to that bug in Inline::Perl5 - could it have been a rakudo bug on Mac? |
03:31 |
|
BenGoldberg joined #perl6 |
03:34 |
geekosaur |
also possible, yes |
03:34 |
geekosaur |
it could even be a perl 5 bug |
03:35 |
geekosaur |
(or worse, not a bug but somehow a mismatch because perl 5 got replaced/upgraded/it's running the wrong one) |
03:53 |
dmaestro |
Well, turns out an attempted re-install of Inline::Perl5 failed because of too-new version of Module::Runtime - I had the latest version in my local::lib. |
03:54 |
dmaestro |
I removed the local::lib version so it would fall back on the system installed module. Inline::Perl5 reinstalled OK and the bug disappeared. |
03:55 |
|
Cabanossi joined #perl6 |
03:56 |
|
konsolebox joined #perl6 |
03:57 |
geekosaur |
there you go then. probably mismatched versioning, then; different perl 5 releases have subtly different internals and macros like (iirc) PvAV will not necessarily work right against a different perl library |
03:59 |
|
noganex_ joined #perl6 |
04:02 |
|
dmaestro joined #perl6 |
04:02 |
dmaestro |
I removed the local::lib version so it would fall back on the system installed module. Inline::Perl5 reinstalled OK and the bug disappeared. |
04:03 |
dmaestro |
Nope, only seemed to disappear - the correct result is given the first time I run it! Subsequent attempts fail. |
04:03 |
geekosaur |
wow. that sounds like a precomp issue |
04:04 |
geekosaur |
.tell nine http://colabti.org/irclogger/irclogger_log/perl6?date=2017-11-24#l119 possible precomp bug? (cf http://colabti.org/irclogger/irclogger_log/perl6?date=2017-11-24#l156) |
04:04 |
yoleaux |
geekosaur: I'll pass your message to nine. |
04:05 |
dmaestro |
m: use Inline::Perl5; my $a = EVAL "[]", :lang<Perl5>; $b = EVAL "[]", :lang<Perl5>; say [ $a.elems, $b.elems ] |
04:05 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>Variable '$b' is not declaredat <tmp>:1------> 3Perl5; my $a = EVAL "[]", :lang<Perl5>; 7⏏5$b = EVAL "[]", :lang<Perl5>; say [ $a.e» |
04:05 |
dmaestro |
m: use Inline::Perl5; my $a = EVAL "[]", :lang<Perl5>; my $b = EVAL "[]", :lang<Perl5>; say [ $a.elems, $b.elems ] |
04:05 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «[0 0]» |
04:07 |
dmaestro |
doug$ perl6 -e 'use Inline::Perl5; my $a = EVAL "[]", :lang<Perl5>; my $b = EVAL "[]", :lang<Perl5>; say [ $a.elems, $b.elems ]' --> [0 4294967296] |
04:13 |
geekosaur |
hm, that's not even precomp, it's just weird. |
04:13 |
geekosaur |
well, left message for nine, maybe they can decipher it |
04:19 |
|
konsolebox joined #perl6 |
04:22 |
dmaestro |
Posted details in https://github.com/niner/Inline-Perl5/issues/106 |
04:24 |
|
Cabanossi joined #perl6 |
04:34 |
|
konsolebox joined #perl6 |
04:35 |
ZzZombo |
m: say 'asd' ~~ /(.*)/ |
04:35 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «「asd」 0 => 「asd」» |
04:35 |
ZzZombo |
m: say 'asd' ~~ /(.)*/ |
04:35 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «「asd」 0 => 「a」 0 => 「s」 0 => 「d」» |
04:44 |
|
kshannon joined #perl6 |
04:49 |
|
ivans joined #perl6 |
04:53 |
|
konsolebox joined #perl6 |
05:09 |
|
Cabanossi joined #perl6 |
05:10 |
|
kaare_ joined #perl6 |
05:16 |
|
konsolebox joined #perl6 |
05:23 |
|
ragnor4k joined #perl6 |
05:32 |
|
konsolebox joined #perl6 |
05:39 |
|
Cabanossi joined #perl6 |
06:09 |
|
Cabanossi joined #perl6 |
06:19 |
|
wamba joined #perl6 |
06:20 |
|
konsolebox joined #perl6 |
06:22 |
|
s0me0ne-unkn0wn joined #perl6 |
06:29 |
ZzZombo |
Why does this keep on matching indefinitely: |
06:29 |
ZzZombo |
token string { \h* [<header> || <key-value>]? <comment>? \h* [\n || $] } |
06:29 |
ZzZombo |
on the last line of my file, which is empty. |
06:31 |
ZzZombo |
m: say '' ~~ /$/ |
06:31 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «「」» |
06:42 |
ZzZombo |
m: my token a { \h* [\n || $] };say '' ~~ &a |
06:42 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «「」» |
06:42 |
ZzZombo |
what |
06:44 |
|
mojca joined #perl6 |
06:44 |
|
mojca joined #perl6 |
06:51 |
Geth |
¦ doc: 523f616499 | (Alex Chen)++ (committed using GitHub Web editor) | doc/Language/regexes.pod6 |
06:51 |
synopsebot |
Link: https://doc.perl6.org/language/regexes |
06:51 |
Geth |
¦ doc: Fix typo, geekosaur ++ |
06:51 |
Geth |
¦ doc: |
06:51 |
Geth |
¦ doc: close #1683 |
06:51 |
Geth |
¦ doc: review: https://github.com/perl6/doc/commit/523f616499 |
07:00 |
|
mojca joined #perl6 |
07:00 |
|
mojca joined #perl6 |
07:01 |
ZzZombo |
m: my token a { (\h* [\n || $])* };say '' ~~ &a |
07:01 |
ZzZombo |
yeah, this works to show my issue. |
07:01 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «(timeout)» |
07:01 |
ZzZombo |
^ |
07:05 |
|
domidumont joined #perl6 |
07:06 |
|
mson joined #perl6 |
07:07 |
|
darutoko joined #perl6 |
07:10 |
|
geospeck joined #perl6 |
07:10 |
ZzZombo |
m: my token a { (\h* [\n || $])+ };say '' ~~ &a |
07:11 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «(timeout)» |
07:11 |
geekosaur |
the expression can match nothing, and can do so repeatedly |
07:12 |
|
domidumont joined #perl6 |
07:12 |
geekosaur |
and will do so at the end of input because the $ will always match there and match empty string for \h* |
07:13 |
lookatme |
m: say "" ~~ /(<?>)/ |
07:13 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «「」 0 => 「」» |
07:13 |
lookatme |
m: say "" ~~ /(<?>)*/ # will timeout |
07:13 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «(timeout)» |
07:13 |
geekosaur |
(potentially it's worse than that because iirc $ matches before newline whereas $$ means actual end of input, but the alternation with \n catches that screw case) |
07:13 |
|
lowbro joined #perl6 |
07:13 |
|
lowbro joined #perl6 |
07:14 |
lookatme |
m: say "" ~~ /(<?>)**1..3/ # will timeout |
07:14 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «「」 0 => 「」 0 => 「」 0 => 「」» |
07:14 |
lookatme |
Interesting :) |
07:14 |
geekosaur |
basically anything that can match zero characters and succeed, that is then repeatable with no stop case (that is, nothing following that can match), will always loop forever matching end of input |
07:15 |
geekosaur |
and yes, that too, if instead of * or + you give it a range, it'll match the maximum number of times |
07:16 |
ZzZombo |
so, what can I do to avoid that? Keep in mind that for my purposes, empty or consisting of only whitespace documents are valid. |
07:19 |
geekosaur |
I would generally make sure the action tokens always match something, and write the grammar with whitespace tokens in positions that don't get to repeat forever. (this means for example letting the TOP token end with a single, nonrepeated, optional whitespace match --- and, again, the whitespace rule should always match *something*) |
07:20 |
geekosaur |
it's rather difficult to make grammar engines or parser generators handle this for you; the halting problem will always find some way to bite you |
07:36 |
|
lizmat joined #perl6 |
07:39 |
|
parv joined #perl6 |
07:42 |
|
markong joined #perl6 |
07:43 |
buggable |
New CPAN upload: Terminal-Spinners-0.0.4.tar.gz by RYNIX https://cpan.metacpan.org/authors/id/R/RY/RYNIX/Perl6/Terminal-Spinners-0.0.4.tar.gz |
07:54 |
|
Cabanossi joined #perl6 |
07:56 |
|
Ven joined #perl6 |
08:03 |
|
pecastro joined #perl6 |
08:19 |
|
dayangkun joined #perl6 |
08:30 |
Geth |
¦ ecosystem: e28a057086 | (Jarkko Haapalainen)++ (committed using GitHub Web editor) | META.list |
08:30 |
Geth |
¦ ecosystem: App::Platform moved to CPAN |
08:30 |
Geth |
¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/e28a057086 |
08:32 |
|
abraxxa joined #perl6 |
08:37 |
|
wamba joined #perl6 |
08:39 |
|
Cabanossi joined #perl6 |
08:43 |
|
scimon joined #perl6 |
09:09 |
|
Cabanossi joined #perl6 |
09:10 |
|
konsolebox joined #perl6 |
09:25 |
|
robertle joined #perl6 |
09:37 |
|
mojca joined #perl6 |
09:37 |
|
mojca joined #perl6 |
09:39 |
|
Cabanossi joined #perl6 |
09:45 |
|
wamba joined #perl6 |
09:46 |
Geth |
¦ mu: 97bba7fbcd | (Moritz Lenz)++ | misc/perl6advent-2017/schedule |
09:46 |
Geth |
¦ mu: p6advent: claim day 8 |
09:46 |
Geth |
¦ mu: review: https://github.com/perl6/mu/commit/97bba7fbcd |
09:58 |
|
xi- joined #perl6 |
10:04 |
|
lizmat joined #perl6 |
10:06 |
|
ZzZombo joined #perl6 |
10:16 |
|
sena_kun joined #perl6 |
10:19 |
|
eliasr joined #perl6 |
10:26 |
|
mojca joined #perl6 |
10:26 |
|
mojca joined #perl6 |
10:27 |
|
aborazmeh joined #perl6 |
10:27 |
|
aborazmeh joined #perl6 |
10:36 |
Geth |
¦ doc: gfldex++ created pull request #1686: be precise when to early is to early for constant |
10:36 |
Geth |
¦ doc: review: https://github.com/perl6/doc/pull/1686 |
10:39 |
|
Cabanossi joined #perl6 |
10:42 |
|
wamba joined #perl6 |
10:45 |
|
mojca joined #perl6 |
10:45 |
|
mojca joined #perl6 |
10:46 |
|
Ven joined #perl6 |
10:48 |
|
Geth joined #perl6 |
10:55 |
|
ryn1x joined #perl6 |
11:06 |
|
Ven joined #perl6 |
11:16 |
ZzZombo |
m: my $b=Str;my $a is default(Int)=$b;say $a.new; |
11:16 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «» |
11:16 |
ZzZombo |
m: my $b=Nil;my $a is default(Int)=$b;say $a.new; |
11:16 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «Any.new» |
11:17 |
ZzZombo |
what is this? |
11:18 |
ZzZombo |
I expect the second to be `Int.new` in effect. |
11:18 |
ZzZombo |
nvm |
11:19 |
ZzZombo |
m: my %b;my $a is default(Int)=%b<asd>;say $a.new; |
11:19 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «Any.new» |
11:19 |
ZzZombo |
hm |
11:19 |
ZzZombo |
this is fucked up |
11:21 |
ZzZombo |
how then can I pass a TYPE as a parameter, and have a default value for it at the same time? Obviously I can't do `my $class=$arg // $default` for this. |
11:35 |
El_Che |
ZzZombo: you should look into mult |
11:35 |
El_Che |
multi |
11:37 |
jnthn |
m: sub foo($x = 'default value') { dd $x }; foo 42; foo Int; foo; |
11:37 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «Int $x = 42Int $x = IntStr $x = "default value"» |
11:38 |
|
bisectable6 joined #perl6 |
11:54 |
|
Cabanossi joined #perl6 |
12:00 |
|
araraloren joined #perl6 |
12:02 |
|
astj joined #perl6 |
12:02 |
|
mojca joined #perl6 |
12:02 |
|
mojca joined #perl6 |
12:07 |
gfldex |
m: my $b := Nil; my $a is default(Int) = $b; say $a.new; |
12:07 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «0» |
12:07 |
gfldex |
m: say Int.new; |
12:07 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «0» |
12:08 |
gfldex |
ZzZombo: ^^^ |
12:08 |
ZzZombo |
I do not want a multi. I get the parameter from a hash. |
12:09 |
ZzZombo |
gfldex, thanks. |
12:09 |
ZzZombo |
m: my %b;my $c:=%b<asd>;my $a is default(Int)=$c;say $a.new; |
12:09 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «Any.new» |
12:10 |
ZzZombo |
? |
12:12 |
gfldex |
ZzZombo: `is default` reacts only to Nil, not just any undefined value. And Hash will autovivify to Any. |
12:13 |
gfldex |
m: my %b of Nil; my $c:=%b<asd>; my $a is default(Int)=$c; say $a.new; |
12:13 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «0» |
12:13 |
|
konsolebox joined #perl6 |
12:13 |
gfldex |
ZzZombo: ^^^ |
12:13 |
ZzZombo |
nice |
12:14 |
jnthn |
m: my %b of Nil; %b<x> = 42 |
12:14 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «Type check failed in assignment to %b; expected Nil but got Int (42) in block <unit> at <tmp> line 1» |
12:14 |
jnthn |
Only so nice ;) |
12:14 |
ZzZombo |
oh |
12:14 |
ZzZombo |
m: my %b;my $c:=%b<asd> // Nil;my $a is default(Int)=$c;say $a.new; |
12:14 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «0» |
12:14 |
ZzZombo |
this |
12:14 |
jnthn |
m: my %b is default(Nil); my $c:=%b<asd>; my $a is default(Int)=$c; say $a.new; |
12:14 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «0» |
12:14 |
jnthn |
Also this |
12:16 |
|
Ven joined #perl6 |
12:20 |
jnthn |
lunch & |
12:21 |
|
cpage_ joined #perl6 |
12:25 |
|
jeromelanteri joined #perl6 |
12:26 |
timotimo |
i'd use :exists to see if something's in there rather than relying on a specific value being returned by accessing |
12:26 |
|
konsolebox joined #perl6 |
12:28 |
|
ZZZzz joined #perl6 |
12:32 |
|
rindolf joined #perl6 |
12:39 |
|
Cabanossi joined #perl6 |
12:53 |
|
zakharyas joined #perl6 |
13:03 |
|
nuk9 joined #perl6 |
13:10 |
|
raschipi joined #perl6 |
13:20 |
|
kitsunenokenja joined #perl6 |
13:23 |
|
pmurias joined #perl6 |
13:25 |
Altreus |
Why doesn't the if version require a block? https://docs.perl6.org/language/py-nutshell#List_Comprehensions |
13:27 |
|
tlaxkit joined #perl6 |
13:28 |
teatime |
I think in perl5 at least that form of if was described as a "statement modifier" |
13:32 |
|
Zoffix joined #perl6 |
13:33 |
Zoffix |
Altreus: because those are statement modifiers and none of them require a block. I think the writer of that section simply didn't realize `for` doesn't need it either |
13:33 |
raschipi |
m: .say for 1..4 |
13:33 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «1234» |
13:34 |
Zoffix |
What happened with ugexe? I got a flood of notifications about closed PRs from him this morning |
13:36 |
Zoffix |
m: sub foo { $^a * 2 }; say (&foo for ^3) |
13:36 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «(sub foo ($a) { #`(Sub|61255088) ... } sub foo ($a) { #`(Sub|61255088) ... } sub foo ($a) { #`(Sub|61255088) ... })» |
13:36 |
Zoffix |
m: say (-> $ {42} for ^3) |
13:36 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «(42 42 42)» |
13:37 |
Zoffix |
I would've expected the block form to behave same as the sub form above. Basically the same as a block at the end of a routine (it'd get returned as a block, unless it's a bareblock |
13:39 |
Geth |
¦ doc: 403d0fea02 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/py-nutshell.pod6 |
13:39 |
synopsebot |
Link: https://doc.perl6.org/language/py-nutshell |
13:39 |
Geth |
¦ doc: Tweak list comprehension examples |
13:39 |
Geth |
¦ doc: |
13:39 |
Geth |
¦ doc: - These are blocks, not anonymous functions |
13:39 |
Geth |
¦ doc: - Show a block-less `for` example https://irclog.perlgeek.de/perl6/2017-11-24#i_15489899 |
13:39 |
Geth |
¦ doc: review: https://github.com/perl6/doc/commit/403d0fea02 |
13:39 |
|
Cabanossi joined #perl6 |
13:39 |
|
wamba joined #perl6 |
13:39 |
Zoffix |
) |
13:39 |
MasterDuke |
Zoffix: re ugexe, i would guess it's related to https://irclog.perlgeek.de/perl6/2017-11-23#i_15486662 and the subsequent conversation |
13:39 |
Altreus |
Zoffix: we tested it, and it complains about sink context |
13:39 |
Altreus |
well, without the arrow |
13:40 |
Altreus |
m: ( $_ + 1 for 1,2,3 ) |
13:40 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «WARNINGS for <tmp>:Useless use of "+" in expression "$_ + 1" in sink context (line 1)» |
13:40 |
Altreus |
like this |
13:40 |
Altreus |
whereas |
13:40 |
Altreus |
m: ( $_ + 1 if $_ > 1 for 1,2,3 ) |
13:40 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «WARNINGS for <tmp>:Useless use of "+" in expression "$_ + 1" in sink context (line 1)» |
13:40 |
Altreus |
oh that's new |
13:40 |
Altreus |
on our rakudo that didn't complain |
13:41 |
Zoffix |
m: say ( $_ + 1 for 1,2,3 ) |
13:41 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «(2 3 4)» |
13:41 |
Altreus |
oh it's because I didn't store it in an array isn't it |
13:41 |
Altreus |
m: my @saddfga = ( $_ + 1 for 1,2,3 ) |
13:41 |
camelia |
rakudo-moar eacf9b277: ( no output ) |
13:41 |
raschipi |
Yeah, it detected you're just throwing the value away and warned you of that. |
13:42 |
raschipi |
m: ( quietly $_ + 1 for 1,2,3 ) |
13:42 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «WARNINGS for <tmp>:Useless use of "+" in expression "$_ + 1" in sink context (line 1)» |
13:42 |
raschipi |
m: ( quietly ($_ + 1) for 1,2,3 ) |
13:42 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «WARNINGS for <tmp>:Useless use of "+" in expression "$_ + 1" in sink context (line 1)» |
13:42 |
Altreus |
so it's a feature of the REPL, I guess, that it complains about sink context and then echoes the result anyway? |
13:43 |
raschipi |
REPL is weird |
13:43 |
Zoffix |
It won't work. `quietly` is for silencing CX::Warn and those ^ I think come from optimizer complaining |
13:43 |
Zoffix |
Altreus: doesn't do it for me. What code are you using? |
13:44 |
raschipi |
It didn't complain in the REPl for me either |
13:44 |
Zoffix |
It's possible you're using a very old Rakudo, Altreus |
13:44 |
raschipi |
Oh, sorry. It did |
13:44 |
Altreus |
yes I think it's just a version thing :) |
13:45 |
raschipi |
> ( $_ + 1 for 1,2,3 ) WARNINGS for <unknown file>: Useless use of "+" in expression "$_ + 1" in sink context (line 1) |
13:45 |
|
comborico1611 joined #perl6 |
13:46 |
Zoffix |
That shows for me too. `( $_ + 1 if $_ > 1 for 1,2,3 )` doesn't show it tho. Weird. |
13:47 |
Altreus |
aha, must be the REPL and not the eval bot |
13:47 |
raschipi |
camelia doesn't use the REPL |
13:48 |
Zoffix |
MasterDuke: thought so. Thanks. |
13:48 |
* Zoffix |
& |
13:48 |
|
Zoffix left #perl6 |
13:49 |
Geth |
¦ doc: 80d2f04df9 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/py-nutshell.pod6 |
13:49 |
Geth |
¦ doc: Make references to routines actual links to their docs |
13:49 |
Geth |
¦ doc: review: https://github.com/perl6/doc/commit/80d2f04df9 |
13:49 |
synopsebot |
Link: https://doc.perl6.org/language/py-nutshell |
13:50 |
|
Ven joined #perl6 |
14:03 |
Altreus |
does perl6 have any built in partial application for functions? |
14:03 |
moritz |
Altreus: yes, see method "assuming" |
14:04 |
moritz |
and for operators there's a syntax |
14:04 |
moritz |
m: say $plus-two = * + 2; say $plus-two(5) |
14:04 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>Variable '$plus-two' is not declaredat <tmp>:1------> 3say 7⏏5$plus-two = * + 2; say $plus-two(5)» |
14:04 |
moritz |
m: my $plus-two = * + 2; say $plus-two(5) |
14:04 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «7» |
14:05 |
Altreus |
yo |
14:05 |
Altreus |
imma look this up |
14:05 |
Altreus |
can't catch this language out can I? |
14:06 |
moritz |
well, you can ask for homocionicy or whatever it's called :) |
14:06 |
timotimo |
homoiconicity i think |
14:08 |
Altreus |
well I'd never heard of it to ask |
14:08 |
Altreus |
now you've ruined it ;) |
14:09 |
|
Cabanossi joined #perl6 |
14:09 |
raschipi |
That is what Python does, using whitespace to represent syntax. |
14:10 |
lucs |
Am I supposed to keep synchronized the version number of my module both in the .pm6 file (unit module Foo:ver<1.1>) and in the META6.json file ("version" : "1.0",)? (whoops! they're different!) |
14:10 |
|
Aaronepower joined #perl6 |
14:11 |
lucs |
s/to keep/to manually keep/ |
14:14 |
|
geospeck joined #perl6 |
14:15 |
pmurias |
raschipi: nope, homoiconicity means the program text has the same structure as the program AST |
14:15 |
yoleaux |
23 Nov 2017 00:26Z <samcv> pmurias: that is a little bit complex. simply see this table https://unicode.org/reports/tr10/#Comparison_Variable_Table the full definition is complex, but non-ignorable just means nothing is ignored except the baseline levels of the UCD spec |
14:17 |
SmokeMachine |
m: react whenever Supply.zip(Supply.interval(1), Supply.from-list(^10)) {.say} |
14:18 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «(timeout)(0 0)» |
14:19 |
SmokeMachine |
m: react { whenever Supply.zip(Supply.interval(1), Supply.from-list(^10)) {.say}; whenever Promise.in: 11 {say "timed out"; done} |
14:19 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>Missing blockat <tmp>:1------> 3r Promise.in: 11 {say "timed out"; done}7⏏5<EOL>» |
14:20 |
SmokeMachine |
m: react { whenever Supply.zip(Supply.interval(1), Supply.from-list(^10)) {.say}; whenever Promise.in: 11 {say "timed out"; done}} |
14:20 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «(0 0)(1 1)(2 2)(3 3)(4 4)(5 5)(6 6)(7 7)(8 8)(9 9)timed out» |
14:21 |
SmokeMachine |
m: react { whenever Supply.zip(Supply.interval(1), Supply.from-list(^10)) {.say}; whenever Promise.in: 15 {say "timed out"; done}} |
14:21 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «(0 0)(1 1)(2 2)(3 3)(4 4)(5 5)(6 6)(7 7)(8 8)(9 9)timed out» |
14:22 |
SmokeMachine |
m: react { whenever Supply.zip(Supply.interval(1), Supply.from-list(^2)) {.say}; whenever Promise.in: 15 {say "timed out"; done}} |
14:22 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «(0 0)(1 1)timed out» |
14:22 |
|
geospeck joined #perl6 |
14:23 |
jnthn |
If you're trying to get it to not bother wiht the timed out thing once the zip is over, then add ;LAST done after the .say |
14:23 |
jnthn |
*with |
14:24 |
raschipi |
pmurias: Like in Lisp? |
14:24 |
|
konsolebox joined #perl6 |
14:25 |
|
Ven joined #perl6 |
14:30 |
pmurias |
raschipi: yes |
14:31 |
SmokeMachine |
jnthn: I think it's different from the docs... it says that the resulted supply will be done when any of the supplies be done... |
14:31 |
SmokeMachine |
m: react { whenever Supply.zip(Supply.interval(.1), Supply.from-list(^10)) {.say}} |
14:31 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «(timeout)(0 0)» |
14:35 |
jnthn |
Hm, interesting |
14:35 |
SmokeMachine |
I think its will only be done when every supply is done: https://github.com/rakudo/rakudo/blob/master/src/core/Supply.pm#L1224 |
14:36 |
jnthn |
Yup, that's what the impl reads like to me also |
14:36 |
SmokeMachine |
s/its/it/ |
14:36 |
jnthn |
Wonder what roast things |
14:36 |
jnthn |
*thinks |
14:36 |
SmokeMachine |
https://docs.perl6.org/type/Supply#method_zip |
14:39 |
|
Ven joined #perl6 |
14:41 |
jnthn |
Yeah, agree the impl isn't in line with the docs |
14:41 |
jnthn |
Also, what the docs want is surely the more useful thing |
14:42 |
SmokeMachine |
it does not test with live/on-demand supplies... https://github.com/perl6/roast/blob/d1baf2e7a3e56cd6619c46040d04ed6daebc1d02/S17-supply/zip.t |
14:42 |
SmokeMachine |
I agree... |
14:43 |
jnthn |
Doesn't test the current behavior that we don't like though, so we're free to fix it :) |
14:44 |
SmokeMachine |
:) |
14:45 |
jnthn |
Goodness, the folks doing construction work outside my office have a machine that's creating so much vibration, my keyboard is shaking... |
14:45 |
SmokeMachine |
:-o |
14:46 |
SmokeMachine |
I think zip-latest has the same problem... |
14:47 |
timotimo |
jnthn: yes, for the other thing, see "zip-latest" i guess? |
14:47 |
|
astj joined #perl6 |
14:49 |
|
philomath joined #perl6 |
14:49 |
SmokeMachine |
adding a LEAST {done} on each whenever would fix that? |
14:49 |
jnthn |
LAST, but yes |
14:49 |
jnthn |
Think so, anyway |
14:50 |
jnthn |
I don't have time to try it right now |
14:50 |
|
cdg joined #perl6 |
14:50 |
SmokeMachine |
yes, LAST, sorry! |
14:50 |
SmokeMachine |
Ill do that when I come home... |
14:50 |
jnthn |
Cool :) |
14:51 |
jnthn |
SmokeMachine++ |
14:51 |
SmokeMachine |
:) |
14:53 |
|
Ven joined #perl6 |
14:54 |
|
nuk9 left #perl6 |
14:56 |
raschipi |
LAST but not LEAST |
14:56 |
jnthn |
;) |
14:58 |
SmokeMachine |
:) |
14:59 |
|
geospeck joined #perl6 |
15:01 |
|
astj joined #perl6 |
15:09 |
|
Ven_ joined #perl6 |
15:09 |
|
ryn1x joined #perl6 |
15:17 |
|
astj joined #perl6 |
15:25 |
|
ryn1x joined #perl6 |
15:34 |
|
Ven_ joined #perl6 |
15:46 |
|
gfldex joined #perl6 |
15:47 |
|
cdg joined #perl6 |
15:48 |
comborico1611 |
Question on printing unsigned integer into bits. value = 65000; putchar( value & displaymask ? '1' : '0' ) ; Is value still 65000, or somehow miraculously binary? |
15:49 |
|
raschipi joined #perl6 |
15:52 |
comborico1611 |
Raschipi, Question on printing unsigned integer into bits. value = 65000; putchar( value & displaymask ? '1' : '0' ) ; Is value still 65000, or somehow miraculously binary? |
15:53 |
raschipi |
Is that Perl6? |
15:53 |
comborico1611 |
Heh, no. |
15:53 |
raschipi |
So I have no idea |
15:53 |
comborico1611 |
Oh, alright. Thanks, though. |
15:54 |
raschipi |
Everything is binary, modern computers know nothing else. |
15:54 |
|
john_parr joined #perl6 |
15:54 |
comborico1611 |
Hmm. |
15:54 |
|
Ven joined #perl6 |
15:55 |
raschipi |
In the past there were decimal computers and even before that there was analog computers, But it has been decades that's not used anymore. |
15:56 |
raschipi |
So I can answer with confidence it is indeed binary. |
15:56 |
|
jstuder joined #perl6 |
15:57 |
comborico1611 |
But the purpose of the program is to print an integer into binary. |
15:58 |
comborico1611 |
I suppose it is possible that giving an integer to bitwise& automatically converts integer into binary. |
15:59 |
raschipi |
integer is binary |
16:00 |
gfldex |
m: my Int $i = 49152; say $i.base(2); |
16:00 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «1100000000000000» |
16:00 |
raschipi |
comborico1611: If displaymask has only one bit set, doing an AND on it with a number will tell if the same bit is set on the number |
16:01 |
comborico1611 |
That's a nice clean binary. |
16:01 |
|
ryn1x joined #perl6 |
16:02 |
comborico1611 |
I don't know why this is so confusing to me. |
16:04 |
raschipi |
here is something similar in P6: |
16:04 |
raschipi |
m: my $num = 116; say so $num +& 2** $_ for 1,2,3...30 |
16:04 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «FalseTrueFalseTrueTrueTrueFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalse» |
16:04 |
raschipi |
Or with 0 and 1: |
16:05 |
raschipi |
m: my $num = 116; say + so $num +& 2** $_ for 1,2,3...30 |
16:05 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «010111000000000000000000000000» |
16:08 |
raschipi |
Do you get the algorithm? |
16:12 |
|
ggg joined #perl6 |
16:13 |
ggg |
hi? |
16:13 |
tyil |
hi |
16:15 |
|
wamba joined #perl6 |
16:15 |
comborico1611 |
I'm sorry, no. Thanks for trying. |
16:15 |
raschipi |
let's go over it, one bit at a time |
16:16 |
comborico1611 |
I do understand how to bitwise and operator works. But how a particular code works, I don't understand. |
16:17 |
raschipi |
You didn't get the one you posted or the ones in Perl6 too? |
16:17 |
comborico1611 |
1 & 0 = 0 1 & 1= 1. And so on. |
16:18 |
comborico1611 |
The one i posted. |
16:19 |
raschipi |
Can you provide context for it? |
16:19 |
raschipi |
What it does depends on the value displaymask has. |
16:20 |
comborico1611 |
User enters an integer. The program simply outputs it's binary equivalent. It uses a for Loop to go bit by bit, and it is that for Loop that is strange to me. |
16:20 |
raschipi |
So the part that is strange you didn't post? |
16:21 |
raschipi |
It probably multiples displaymask by 2 or bit shifts it one position over (which is the same thing for integers) |
16:21 |
comborico1611 |
I did: value = 65000; putchar( value & displaymask ? '1' : '0' ) ; Is value still 65000, or somehow miraculously binary? |
16:22 |
comborico1611 |
The worst part of this is I'm typing from my phone. |
16:22 |
raschipi |
putchar probably outputs to the screen and has no side effects |
16:22 |
raschipi |
probably |
16:23 |
comborico1611 |
Correct. |
16:23 |
|
Morfent joined #perl6 |
16:23 |
|
gagalicious joined #perl6 |
16:23 |
raschipi |
So, what's the matter? |
16:24 |
comborico1611 |
But bit mask is 10000000 00000000 . That & with 65000 (binary) yields all zeros. Yet his program prints 65000 in binary. |
16:25 |
comborico1611 |
So there is something I'm missing. |
16:25 |
comborico1611 |
I wish i could post photos on here. |
16:26 |
El_Che |
I am happy you can't |
16:26 |
El_Che |
:) |
16:26 |
comborico1611 |
Haha. Good point! |
16:27 |
El_Che |
many people have slack/mattermost/... allergies |
16:27 |
raschipi |
m: say + so 0b0000000000100000 +& 65000 |
16:27 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «1» |
16:27 |
|
dmaestro joined #perl6 |
16:27 |
|
prettty-girl joined #perl6 |
16:28 |
raschipi |
10000000 00000000 & with 65000 is 0 because the corresponding bit in the number is 0. Do you know AND can be applied to numbers bigger than 1 bit, right? |
16:29 |
comborico1611 |
I wasn't sure if it could. |
16:29 |
comborico1611 |
It treats them as 1? |
16:30 |
raschipi |
You do it "bit by bit", like when summing you go digit by digit summing them. |
16:30 |
comborico1611 |
Correct. |
16:31 |
raschipi |
So, if a number has just one of it's own bits set, the result will have a 1 only if the other number has a 1 in the corresponding position |
16:32 |
comborico1611 |
Correct. Hey, thank you for trying, but i need to take a break. |
16:32 |
raschipi |
Right, another time then |
16:32 |
comborico1611 |
If i figure this thing out, I'll try to remember to tell you what my hang-up was. |
16:36 |
Morfent |
when i run make rakudo-test when compiling rakudo star from source on freebsd 12, t/04-nativecall/02-simple-args.t fails with "Dubious, test returned 1 (wstat 256, 0x100)" |
16:36 |
timotimo |
can you ./perl6 t/04-nativecall/02-simple-args.t and see what it outputs? |
16:37 |
Morfent |
https://hastebin.com/rupepocuxo.go |
16:38 |
Morfent |
i'm wondering if the issue's related to the tests that are skipped on mac os x, since its kernel uses parts of freebsd's |
16:38 |
timotimo |
this should be too far from the kernel to matter :\ |
16:38 |
Morfent |
ah |
16:39 |
Morfent |
is this something i'd need to worry about though? |
16:39 |
|
Cabanossi joined #perl6 |
16:40 |
timotimo |
i could imagine perhaps "unsigned short" not meaning "16bit integer" on your system |
16:40 |
timotimo |
that would certainly mess this test up |
16:41 |
timotimo |
maybe our C code for these tests should fprint diagnostics when they don't get the right value |
16:42 |
timotimo |
so maybe putting an fprintf(stderr, "# value received: %hd\n", x); before the "return 0" in 02-simple-args.c tells us something interesting |
16:45 |
Morfent |
i'll give that a shot |
16:46 |
timotimo |
though perhaps %hx is nicer to look at than %hd |
16:47 |
|
khw joined #perl6 |
16:48 |
Morfent |
# value received: -2 |
16:48 |
timotimo |
hm, isn't that correct though? |
16:49 |
timotimo |
like, if you use %hx it'll use unsigned logic and display as hexadecimal and that should correspond to 0xFFFE |
16:49 |
timotimo |
well, 0xfffe in the case of %hx, 0xFFFE with %hX |
16:49 |
Morfent |
i was in the middle of running make when you mentioned to use %hx |
16:50 |
timotimo |
you shouldn't need to run make again i think |
16:50 |
|
MilkmanDan joined #perl6 |
16:50 |
timotimo |
though i'm not sure how exactly compile_test_lib is implemented |
16:51 |
Morfent |
i wasn't sure, so i was running it again just to be safe |
16:52 |
Morfent |
# value received: fffe |
16:52 |
timotimo |
OK, so the C code we have there is not what we expect |
16:52 |
timotimo |
i mean, it doesn't compile the same way on your system as on others |
16:52 |
timotimo |
i.e. we're relying on undefined behaviour? |
16:53 |
raschipi |
Morfent: which compiler do you have? |
16:53 |
Morfent |
clang 4.0.1 |
16:54 |
Morfent |
i have clang 5.0.0 installed, i'll check again with that |
16:54 |
raschipi |
Is Perl6 even tested on Clang? |
16:55 |
timotimo |
it is |
16:55 |
timotimo |
oh |
16:55 |
timotimo |
moarvm is, but that only runs nqp's test suite |
16:56 |
timotimo |
and those don't contain nativecall stuff, or at least not much of it |
16:56 |
raschipi |
Morfent: Can you try GCC? |
16:56 |
Morfent |
sure |
17:01 |
timotimo |
you're on freebsd, right? any more details than that? |
17:01 |
timotimo |
freebsd 12 |
17:02 |
timotimo |
Morfent: just to verify, the fprint you have goes between both return statements, right? |
17:03 |
Morfent |
it goes before both |
17:03 |
timotimo |
oh |
17:03 |
timotimo |
well, that changes things a whole lot |
17:03 |
|
setty1 joined #perl6 |
17:04 |
timotimo |
now it could be it's correctly running the "return 11" but we're somehow not taking the return value correctly |
17:04 |
timotimo |
rather than giving us 0xfffe but comparing against 0xfffe giving "false" |
17:04 |
timotimo |
can you make that change and re-run? |
17:07 |
Morfent |
sure |
17:08 |
Morfent |
wait what change do you mean? |
17:08 |
|
Cabanossi joined #perl6 |
17:10 |
timotimo |
put the fprintf between "return 11" and "return 0" |
17:10 |
timotimo |
such that it only gets run when the code is about to return 0 |
17:12 |
Morfent |
same deal, # value received: fffe |
17:12 |
timotimo |
now that is interesting! |
17:12 |
timotimo |
um, could you change the wording inside the message so we can be sure that it actually compiled the change you made? |
17:13 |
timotimo |
i don't want to be surprised by compile_test_lib being "clever" about caching or something :) |
17:16 |
scimon |
Can I apologise in advance for anything I say in my talk at LPW tomorrow that's wrong. :D |
17:16 |
Morfent |
# value received, different message: fffe |
17:16 |
timotimo |
okay that's weird! |
17:18 |
Geth |
¦ ecosystem: a34a96fb5c | (David Warring)++ (committed using GitHub Web editor) | META.list |
17:18 |
Geth |
¦ ecosystem: Font::AFM to CPAN |
17:18 |
Geth |
¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/a34a96fb5c |
17:19 |
timotimo |
can you operate gdb and/or lldb? |
17:19 |
Morfent |
never used them before |
17:21 |
timotimo |
how complicated is it to get a freebsd 12 VM up and running containing a working perl6? |
17:22 |
timotimo |
doesn't look trivial to get at a freebsd 12 |
17:23 |
buggable |
New CPAN upload: Font-AFM-1.24.2.tar.gz by WARRINGD https://cpan.metacpan.org/authors/id/W/WA/WARRINGD/Perl6/Font-AFM-1.24.2.tar.gz |
17:25 |
raschipi |
This download links in the PAUSE new upload messages are kinda useless. I think linking to the module home page would be better. |
17:25 |
Morfent |
the os itself is relatively simple to get installed, but there's a bit of work involved to get it to run properly in virtualbox |
17:25 |
timotimo |
damn (: |
17:25 |
timotimo |
:( |
17:26 |
|
lizmat joined #perl6 |
17:26 |
Morfent |
i'm not sure if virtualbox additions will run correctly or not since 12 is on the dev branch atm |
17:26 |
Morfent |
i can install virtualbox and get a vm set up to see if it'll work |
17:27 |
|
raschipi_ joined #perl6 |
17:27 |
timotimo |
i'm not sure if i'll have much time to look into this today |
17:27 |
|
raiph joined #perl6 |
17:28 |
timotimo |
would you be okay with a guided gdb session over irc? |
17:30 |
Morfent |
sure |
17:31 |
timotimo |
cool. we have a ./perl6-gdb-m script that'll land you right inside a gdb session |
17:31 |
timotimo |
it'll run the program to completion if you don't ctrl-c, but we can just re-run it after setting up break points and such |
17:31 |
timotimo |
so you'd run ./perl6-gdb-m t/04-nativecall/...t |
17:32 |
timotimo |
then set a break point with "break TakeUInt16" |
17:32 |
timotimo |
when you "run" it'll reach that point and wait for us to do whatever |
17:32 |
dmaestro |
I'm trying to do a deep comparison (eqv), but I want cmp semantics between Cool values. Any way to lexically modify the eqv op behavior to do that? |
17:32 |
timotimo |
oh, but a moarvm without --debug=3 and with anything but --optimize=0 will make debugging a pain |
17:33 |
Morfent |
Could not open t/04-nativecall/...t. Failed to stat file: no such file or directory |
17:33 |
timotimo |
well, the ... would be ... what, 02-simple-args i think? |
17:33 |
|
ryn1x_ joined #perl6 |
17:34 |
|
Morfent joined #perl6 |
17:36 |
|
ryn1x joined #perl6 |
17:38 |
|
pmurias joined #perl6 |
17:38 |
Morfent |
ok, tried again with ./perl-gdb-m t/04-nativecall/02-simpleargs.t |
17:38 |
timotimo |
Morfent: did you get my last message? you'd have t/04-nativecall/02-simple-args.t in the argument list |
17:38 |
Morfent |
i don't think i did |
17:38 |
timotimo |
needs one more hyphen i believe? |
17:39 |
dmaestro |
Wishing I could hook into the (presumed) recursive behavior of eqv, but this doesn't work: |
17:39 |
dmaestro |
say { multi sub infix:<eqv>(Cool $l, Cool $r) { $l cmp $r === Same }; [42.0] eqv ['42'] }() |
17:39 |
timotimo |
dmaestro: aye, the implementations of eqv all look only in *their* lexical scope for the other operators, which is the core setting |
17:39 |
dmaestro |
m: say { multi sub infix:<eqv>(Cool $l, Cool $r) { $l cmp $r === Same }; [42.0] eqv ['42'] }() |
17:39 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «False» |
17:40 |
timotimo |
lexically speaking your own implementations are unreachable |
17:40 |
dmaestro |
Yeah, I figured that was the reason ... |
17:40 |
evalable6 |
dmaestro, rakudo-moar eacf9b277: OUTPUT: «False» |
17:41 |
dmaestro |
Any other features of Perl6 that conveniently reach deep into nested structures I might use? |
17:42 |
timotimo |
hypers kind of do that |
17:42 |
timotimo |
m: say [[1, 1], 2] »==« [[1, 2], 2] |
17:42 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «[[True False] True]» |
17:42 |
timotimo |
m: say [[1, 1], 2] »==« [1, [2, 2]] |
17:42 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «Lists on either side of non-dwimmy hyperop of infix:<==> are not of the same length while recursingleft: 2 elements, right: 1 elements in block <unit> at <tmp> line 1» |
17:42 |
dmaestro |
hmm... |
17:43 |
timotimo |
if you catch that exception in case things are odd-shaped |
17:43 |
dmaestro |
That might actually work for what I'm doing ... |
17:43 |
timotimo |
and you'll then have to break the structure down |
17:43 |
|
geospeck joined #perl6 |
17:43 |
timotimo |
because [False] is a list with one element, and therefor it'll booleanify to True |
17:44 |
Morfent |
i'm not really sure what you mean by needing one more hyphen timotimo |
17:44 |
timotimo |
the file name |
17:44 |
timotimo |
you wrote "simpleargs" i thought it should be "simple-args" |
17:45 |
Morfent |
oh, that was a typo |
17:45 |
timotimo |
OK |
17:45 |
Morfent |
Function "TakeUInt16" not defined. Make breakpoint pending on future shared library load? (y or [n]) |
17:46 |
timotimo |
oh, the i must be lower case |
17:47 |
dmaestro |
m: say [42.0] »cmp« ['42'] |
17:47 |
camelia |
rakudo-moar eacf9b277: OUTPUT: «[Same]» |
17:48 |
Morfent |
that was it |
17:48 |
Morfent |
Thread 1 hit Breakpoint 1, 0x000000080dc9ca54 in TakeUint16 () from /usr/home/morfent/Downloads/rakudo-star-2017.10/rakudo/lib02-simple-args.so |
17:48 |
|
silug joined #perl6 |
17:48 |
timotimo |
OK, good |
17:49 |
timotimo |
now "print x" gives you what? |
17:49 |
Morfent |
No symbol "x" in current context. |
17:49 |
timotimo |
oh? |
17:49 |
timotimo |
hm, compile_test_lib is perhaps not compiling any debug info into the files |
17:50 |
AlexDaniel |
squashable6: next |
17:50 |
squashable6 |
AlexDaniel, ⚠🍕 Next SQUASHathon in 6 days and ≈16 hours (2017-12-02 UTC-12⌁UTC+14). See https://github.com/rakudo/rakudo/wiki/Monthly-Bug-Squash-Day |
17:50 |
AlexDaniel |
If someone has any suggestions for the next squashathon, please let me know |
17:51 |
|
mson joined #perl6 |
17:52 |
moritz |
maybe Perl 6 websites? |
17:52 |
moritz |
perl6.org, examples.perl6.org, modules.perl6.org etc. |
17:53 |
moritz |
dunno if that's a good idea |
17:54 |
|
Cabanossi joined #perl6 |
17:54 |
timotimo |
Morfent: try editing t/04-nativecall/CompileTestLib.pm to have -O0 -g3 after the $cfg<cflags> and $cfg<ldflags> in lines 16 and 16 |
17:54 |
timotimo |
16 and 17 |
17:57 |
Morfent |
done |
17:57 |
dmaestro |
timotimo: I think this will do 90% of what I want. Thanks! |
17:57 |
dmaestro |
m: say so all([42] »cmp« ['42']) === Same |
17:57 |
camelia |
rakudo-moar 3166400d9: OUTPUT: «True» |
17:57 |
timotimo |
cool |
17:59 |
|
araraloren_ joined #perl6 |
17:59 |
|
domidumont joined #perl6 |
18:00 |
Morfent |
The spawned command 'clang -shared -fPIC -O3 -DNDEBUG -Wl,-rpath,"//usr/home/morfent/Downloads/rakudo-star-2017.10/install/lib" -lm -lpthread -lkvm -o -O0 -g3 lib02-simple-args.so 02-simple-args.o' exited unsuccessfully (exit code: 1) |
18:01 |
timotimo |
bleh, does it hate multiple -O flags? |
18:01 |
Morfent |
yeah, -O3 and -O0 |
18:01 |
Morfent |
er |
18:01 |
timotimo |
okay, put .subst("-O3", "") after the closing " in those lines |
18:02 |
timotimo |
that's terrible, but it'll get us what we want for now |
18:02 |
Morfent |
still fails |
18:02 |
timotimo |
oh |
18:02 |
Morfent |
oh, those flags are showing up after -o |
18:02 |
timotimo |
yes, that's the problem here |
18:02 |
timotimo |
OK, then put it *before* the cflags and ldflags :D |
18:04 |
timotimo |
i mean ideally you'd rebuild moarvm with --optimize=0 --debug=3 in the flags for its Configure.pl |
18:04 |
Morfent |
...now the test passes |
18:04 |
timotimo |
:o |
18:05 |
Morfent |
oh wait i forgot to remove the second set of flags on line 16 |
18:05 |
|
araralonre__ joined #perl6 |
18:05 |
Morfent |
but now i can print x |
18:05 |
Morfent |
$1 = 65534 |
18:06 |
timotimo |
m: say 0xfffe |
18:06 |
camelia |
rakudo-moar 3166400d9: OUTPUT: «65534» |
18:06 |
timotimo |
that's correct |
18:06 |
timotimo |
which makes sense because the test passes |
18:07 |
|
llfourn joined #perl6 |
18:07 |
timotimo |
without disassembling the code and looking directly at register contents we won't make headway here it seems? |
18:07 |
Morfent |
i was running this after fixing my typo |
18:07 |
Morfent |
the test still fails |
18:07 |
timotimo |
oh? the test fails but x prints 65534? |
18:07 |
Morfent |
yeah |
18:07 |
timotimo |
what does "print 0xfffe" give you? |
18:07 |
|
BenGoldberg joined #perl6 |
18:08 |
Morfent |
$2 = 65534 |
18:09 |
timotimo |
OK, now you can step through the code with "n" and see what it does. "list" will output a piece of source code |
18:11 |
Morfent |
it segfaults at some point |
18:12 |
Morfent |
https://hastebin.com/yoceqikulu.cs |
18:14 |
timotimo |
the trap would have been interesting. it's supposed to output information before crashing though i think? |
18:15 |
SmokeMachine |
im having a problem compiling rakudo... |
18:15 |
SmokeMachine |
https://www.irccloud.com/pastebin/jC1gQLFO/ |
18:16 |
Morfent |
this is what list shows just after the trap https://hastebin.com/kaxacerewa.cpp |
18:16 |
SmokeMachine |
does any one knows why? |
18:16 |
timotimo |
Morfent: it doesn't have line number or source code info for where it actually is (which is moarvm's interpreter loop) so it just outputs what it last had |
18:17 |
timotimo |
SmokeMachine: are you working from a clean state? i.e. "make clean" and everything? |
18:17 |
SmokeMachine |
trying to make clean... |
18:18 |
timotimo |
Morfent: how were you compiling rakudo? did you have a Configure.pl with --gen-moar in the commandline? |
18:18 |
Morfent |
perl Configure.pl --backends=moar --gen-moar |
18:19 |
timotimo |
OK, you can give moar options there, too, let me look |
18:19 |
Morfent |
perl version's v5.24.3 |
18:19 |
AlexDaniel |
moritz: interesting idea. There are only 27 open issues (from all mentioned repos) so maybe that does not provide enough room for the squashathon |
18:19 |
timotimo |
--moar-version=--optimize=0 --moar-version=--debug=3 |
18:19 |
SmokeMachine |
timotimo: make cleaned... im trying to make again... |
18:20 |
SmokeMachine |
same error... |
18:20 |
AlexDaniel |
I was also thinking about a bot squashathon, but at the moment you can't really run whateverable locally… :S |
18:21 |
|
geospeck joined #perl6 |
18:23 |
timotimo |
SmokeMachine: that's very strange because the step right before it should have used Perl6/Grammar.moarvm just the same way as this one? |
18:23 |
|
Morfent joined #perl6 |
18:24 |
SmokeMachine |
https://www.irccloud.com/pastebin/gxZwnh85/timotimo |
18:24 |
timotimo |
SmokeMachine: but it already gave you a step with "stage parse" and other timings, right? |
18:25 |
SmokeMachine |
yes |
18:25 |
SmokeMachine |
https://www.irccloud.com/pastebin/FNWCTq0Z/ |
18:26 |
|
geospeck_ joined #perl6 |
18:26 |
timotimo |
that doesn't make sense to me :( |
18:27 |
timotimo |
Morfent: with those flags to Configure.pl you'll have to rebuild, but it'll let you actually use gdb properly |
18:27 |
Morfent |
alright |
18:28 |
SmokeMachine |
:( |
18:31 |
|
Morfent joined #perl6 |
18:31 |
|
geospeck joined #perl6 |
18:35 |
raschipi |
Can you imagine a bot squashaton, 300 bots connected at the same time to the channel for debugging? |
18:35 |
timotimo |
we'll just set up an irc server docker container :P |
18:38 |
|
robertle joined #perl6 |
18:43 |
|
cdg joined #perl6 |
18:49 |
Morfent |
timotimo: after running perl Configure.pl --backends=moar --gen-moar --moar-option=--debug=3 --moar-option=--optimize=0, make still compiles with -O3 |
18:49 |
timotimo |
did it recompile moar at all? |
18:50 |
timotimo |
i.e. did you see many short lines with "3rdparty" and such? |
18:51 |
Morfent |
yep |
18:52 |
Morfent |
https://hastebin.com/rorafedeni.m |
18:55 |
timotimo |
hm, yes, indeed :\ |
18:55 |
timotimo |
well, you can cd into the nqp/moarvm folder or where it is exactly |
18:55 |
timotimo |
check out the Makefile for a list of options that were originally passed to Configure.pl in there |
18:55 |
timotimo |
tweak that and re-run Configure.pl inside moarvm, then "make install" |
18:55 |
timotimo |
after that, no real need to recompile anything else |
18:57 |
SmokeMachine |
timotimo: I cloned again, and that worked... |
18:58 |
timotimo |
i'm afraid i have to leave for a bit now |
18:59 |
|
dmaestro joined #perl6 |
19:02 |
AlexDaniel |
raschipi: in debug mode *ables only join #whateverable tho :) |
19:09 |
|
redhands joined #perl6 |
19:12 |
raschipi |
AlexDaniel: Why would people run them on debug mode? |
19:12 |
|
MasterDuke joined #perl6 |
19:12 |
AlexDaniel |
IIRC it's harder to run them otherwise :D |
19:14 |
raschipi |
Right, then problem solved |
19:14 |
|
MasterDuke_ joined #perl6 |
19:17 |
|
stmuk joined #perl6 |
19:23 |
jstuder |
Hey all, for the docs I rewrote a section on "Truncating slices" in the subscripts page to address some inaccurate info and submitted the PR a few days back. I was hoping that someone more senior could give it a once over to make sure everything is accurate. |
19:23 |
jstuder |
Or should I just commit it and any inaccuracies can be addressed after the fact? |
19:27 |
Morfent |
timotimo: after doing that, gdb gives something a bit different https://hastebin.com/fecosawula.cs |
19:29 |
|
mojca joined #perl6 |
19:29 |
|
mojca joined #perl6 |
19:30 |
AlexDaniel |
jstuder: OK, first of all thanks for the awesome PR |
19:31 |
AlexDaniel |
jstuder: PRs that have lots of effort put to them often require lots of effort to review them, that's why it took so long :) |
19:31 |
AlexDaniel |
jstuder: so it is totally correct to come here and to kick some asses to get the job done |
19:32 |
AlexDaniel |
jstuder: here's one thing: “produced one-after-another up until the point that the subscript no longer yields a defined value from the collection” |
19:32 |
AlexDaniel |
m: my @letters = <a b c d e f>; @letters[4]:delete; say @letters[3..*] |
19:32 |
camelia |
rakudo-moar 3166400d9: OUTPUT: «(d (Any) f)» |
19:32 |
AlexDaniel |
jstuder: so [4] was actually not defined, but it didn't stop |
19:33 |
jstuder |
AlexDaniel: no problem. I'm not trying to kick any asses, just wasn't sure anyone was aware. |
19:33 |
jstuder |
AlexDaniel: i see. |
19:33 |
AlexDaniel |
my point is that you should feel free to kick some asses :) |
19:33 |
jstuder |
ok i appreciate it. |
19:34 |
AlexDaniel |
m: my @letters = <a b c d e f>; @letters[4]:delete; say @letters[lazy 3..*]' |
19:34 |
camelia |
rakudo-moar 3166400d9: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>Two terms in a rowat <tmp>:1------> 3tters[4]:delete; say @letters[lazy 3..*]7⏏5' expecting any of: infix infix stopper postfix statement end…» |
19:34 |
AlexDaniel |
m: my @letters = <a b c d e f>; @letters[4]:delete; say @letters[lazy 3..*] |
19:34 |
camelia |
rakudo-moar 3166400d9: OUTPUT: «(d)» |
19:34 |
AlexDaniel |
hmmm… but that's a bug, right? |
19:35 |
AlexDaniel |
c: 2015.12 my @letters = <a b c d e f>; @letters[4]:delete; say @letters[lazy 3..*] |
19:35 |
committable6 |
AlexDaniel, ¦2015.12: «(d)» |
19:35 |
AlexDaniel |
or is it? |
19:42 |
jstuder |
Hmm I guess there could be more to this than I thought. |
19:42 |
jstuder |
I appreciate you looking into it. |
19:49 |
AlexDaniel |
jstuder: ok, here's something to consider |
19:50 |
AlexDaniel |
c: 2015.12 my @letters = <a b c d e f>; @letters[4]:delete; say @letters[3..*]; |
19:50 |
committable6 |
AlexDaniel, ¦2015.12: «(d)» |
19:50 |
AlexDaniel |
c: HEAD my @letters = <a b c d e f>; @letters[4]:delete; say @letters[3..*]; |
19:50 |
committable6 |
AlexDaniel, ¦HEAD(3166400): «(d (Any) f)» |
19:50 |
AlexDaniel |
let's see what was the justification for the change |
19:50 |
AlexDaniel |
bisect: my @letters = <a b c d e f>; @letters[4]:delete; say @letters[3..*]; |
19:50 |
bisectable6 |
AlexDaniel, Bisecting by output (old=2015.12 new=3166400) because on both starting points the exit code is 0 |
19:50 |
bisectable6 |
AlexDaniel, bisect log: https://gist.github.com/2bca83b3f25f8043ca20a4d09264a640 |
19:50 |
bisectable6 |
AlexDaniel, (2017-10-08) https://github.com/rakudo/rakudo/commit/456358e3c380eeeb5fe5bc6260ba6f51c42a52ff |
19:51 |
AlexDaniel |
c: 456358e3c3^,456358e3c3 my @letters = <a b c d e f>; @letters[4]:delete; say @letters[3..*]; |
19:51 |
committable6 |
AlexDaniel, ¦456358e3c3^: «(d)» ¦456358e: «(d (Any) f)» |
19:51 |
AlexDaniel |
:S |
19:56 |
AlexDaniel |
jstuder: alright, I created this ticket: https://github.com/rakudo/rakudo/issues/1268 |
19:59 |
jstuder |
I guess we'll find out what the intended behavior is and I'll revise the PR accordingly. |
19:59 |
jstuder |
AlexDaniel: that bisectable bot is pretty cool. |
20:01 |
jstuder |
AlexDaniel: is there some way to use it without displaying all the results on the channel? I'd love to give it a try but wouldn't want to drive everyone crazy. |
20:05 |
moritz |
jstuder: you can try to /msg the bot |
20:06 |
jstuder |
moritz: thanks. I'm definitely going to give that a try. |
20:12 |
|
someuser joined #perl6 |
20:13 |
jstuder |
bisectable says it's too private in there :( |
20:13 |
jstuder |
oh well, there is always git bisect |
20:15 |
|
committable6 joined #perl6 |
20:19 |
|
kerframil joined #perl6 |
20:19 |
|
silug joined #perl6 |
20:21 |
AlexDaniel |
jstuder: you can go to #whateverable and do as many queries as you like :) |
20:21 |
|
zakharyas joined #perl6 |
20:22 |
jstuder |
AlexDaniel: thanks |
20:24 |
|
mojca left #perl6 |
20:25 |
|
jstuder joined #perl6 |
20:28 |
|
cdg joined #perl6 |
20:36 |
|
zakharyas joined #perl6 |
20:37 |
|
zakharyas joined #perl6 |
20:39 |
|
Cabanossi joined #perl6 |
21:09 |
|
Guest31287 joined #perl6 |
21:11 |
|
vike joined #perl6 |
21:27 |
|
Guest31287 joined #perl6 |
21:30 |
|
espadrine joined #perl6 |
21:32 |
|
kitsunenokenja joined #perl6 |
21:33 |
|
s0me0ne-unkn0wn joined #perl6 |
21:39 |
|
Cabanossi joined #perl6 |
21:41 |
|
Cabanossi joined #perl6 |
21:42 |
|
Morfent joined #perl6 |
21:49 |
Geth |
¦ mu: 85fa828441 | (Jonathan Worthington)++ (committed using GitHub Web editor) | misc/perl6advent-2017/schedule |
21:49 |
Geth |
¦ mu: Add myself to the Advent shcedule |
21:49 |
Geth |
¦ mu: review: https://github.com/perl6/mu/commit/85fa828441 |
21:50 |
jnthn |
Such typing! |
21:53 |
moritz |
jnthn: for the advent post you'll have the option to correct your typing before it goes live :-) |
22:04 |
|
japhb joined #perl6 |
22:10 |
Geth |
¦ doc: f4b6bd9707 | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/glossary.pod6 |
22:10 |
synopsebot |
Link: https://doc.perl6.org/language/glossary |
22:10 |
Geth |
¦ doc: add item LGTM |
22:10 |
Geth |
¦ doc: review: https://github.com/perl6/doc/commit/f4b6bd9707 |
22:11 |
jnthn |
moritz: Phew! :) |
22:18 |
|
cdg joined #perl6 |
22:20 |
|
comborico1611 joined #perl6 |
22:25 |
timotimo |
Morfent: hey |
22:25 |
Morfent |
hey |
22:25 |
|
pi2 joined #perl6 |
22:26 |
timotimo |
Morfent: can you send me the .so file that gets compiled for the test that was failing? |
22:26 |
timotimo |
i have a compiler expert sitting next to me :P |
22:27 |
timotimo |
alternatively, go back to the break point in TakeUint16 and ask gdb to "disassemble" |
22:29 |
|
pilne joined #perl6 |
22:30 |
Morfent |
this is what disassemble outputs https://hastebin.com/wekabonemu.pl |
22:31 |
timotimo |
can you also give the output of "info registers" |
22:32 |
|
japhb joined #perl6 |
22:32 |
Morfent |
https://hastebin.com/yecewegimi.go |
22:35 |
|
Thrush joined #perl6 |
22:37 |
Thrush |
Has anybody here tried the challenges on code-golf.io ? |
22:38 |
Thrush |
Perl 6 often dominates. |
22:39 |
|
Cabanossi joined #perl6 |
22:39 |
AlexDaniel |
well… yes |
22:40 |
s0me0ne-unkn0wn |
But still cannot beat golf-oriented languages like Jelly |
22:40 |
|
geospeck joined #perl6 |
22:41 |
s0me0ne-unkn0wn |
Perl 6 with its whitespace enforcement is not the best golf language imho :) |
22:41 |
AlexDaniel |
golf-oriented languages make no sense to me really. I remember there was one that mapped typical golfing problems to each ascii character, so every solution was 1 byte… |
22:41 |
Thrush |
There's the prime-number puzzle, and the top score is 22 chars. I can get it down to 23 chars, but I can't figure out how to squeeze out an extra char. |
22:42 |
Thrush |
Perl 6 is nice for golf puzzles with prime numbers, due to the .is-prime method. |
22:42 |
AlexDaniel |
Thrush: use unicode character instead of a normal numeric |
22:42 |
AlexDaniel |
m: say 10; say ⑩ |
22:42 |
camelia |
rakudo-moar f82433bfd: OUTPUT: «1010» |
22:42 |
s0me0ne-unkn0wn |
golf-oriented languages make no sense beyond code gold, to be precise :) |
22:43 |
AlexDaniel |
Thrush: no, for the number |
22:43 |
s0me0ne-unkn0wn |
AlexDaniel: They usually count bytes, not characters in golf competitions |
22:43 |
Geth |
¦ mu: deepnext++ created pull request #29: Update schedule |
22:43 |
Geth |
¦ mu: review: https://github.com/perl6/mu/pull/29 |
22:43 |
AlexDaniel |
s0me0ne-unkn0wn: not that particular website |
22:44 |
AlexDaniel |
s0me0ne-unkn0wn: well, “bytes” makes no sense to me either… |
22:44 |
Thrush |
AlexDaniel: There's a unicode character for 10? And for 100? |
22:44 |
AlexDaniel |
like, in what encoding, right? |
22:44 |
timotimo |
Morfent: hi, this is timotimos so-called "expert" speaking |
22:44 |
AlexDaniel |
Thrush: that you'll have to figure out :) |
22:44 |
AlexDaniel |
Thrush: also relevant: https://github.com/perl6/mu/blob/master/misc/perl6advent-2017/schedule#L25 |
22:44 |
timotimo |
the trouble is that the c function expects the upper bits of the 16-bit argument to be clean, but as you can see from "info registers", they're clearly not |
22:45 |
s0me0ne-unkn0wn |
Probably some language somewhere in India have a dedicated character for "100" and if it's on unicode table you can use it with Perl 6 :) |
22:45 |
timotimo |
i have had a look in the ABI, but it unfortunately remains quiet on the issue. |
22:45 |
timotimo |
the safe thing is probably for the caller to clear those bits if some callees expect that |
22:46 |
timotimo |
and with that, back to timotimo |
22:47 |
AlexDaniel |
I'll just leave this here… :P https://gist.github.com/AlexDaniel/52b203c7a541a76290e2246ec335336c |
22:47 |
Thrush |
This is very interesting. I never knew there was a unicode character for 10 (or 100) before. |
22:49 |
s0me0ne-unkn0wn |
Wow, 1000000000000 even |
22:50 |
|
mcmillhj joined #perl6 |
22:51 |
AlexDaniel |
s0me0ne-unkn0wn: so -0.5 is not that interesting, huh? :P |
22:52 |
timotimo |
Morfent: can you do another recompile of moarvm? this time with --moar-option=--has-libffi in the mix? |
22:53 |
timotimo |
er, i mean, you're using moarvm's configure.pl directly, so use --has-libffi directly |
22:54 |
Thrush |
m: say 100; say ௱ |
22:54 |
camelia |
rakudo-moar f82433bfd: OUTPUT: «100100» |
22:54 |
Thrush |
Wow... I got it! |
22:55 |
Thrush |
I found the symbol for "௱" (TAMIL NUMBER ONE HUNDRED) at http://www.fileformat.info/info/unicode/category/No/list.htm . |
22:55 |
s0me0ne-unkn0wn |
AlexDaniel: Well, right now I live in Croatia and I have the clock with glagolic characters in place of normal digits on my wall so digits lower than 13 represented by single character don't surprise me a lot, but 1000000000000... |
22:57 |
Thrush |
Glagolic? Do you mean "glagolitic"? |
23:01 |
Morfent |
timotimo: probing whether your compiler thinks that it is gcc Can't compile simple gcc probe, so something is badly wrong at build/probe.pm line 147. |
23:01 |
Geth |
¦ mu: 570da66916 | deepnext++ (committed using GitHub Web editor) | misc/perl6advent-2017/schedule |
23:01 |
Geth |
¦ mu: Update schedule |
23:01 |
Geth |
¦ mu: review: https://github.com/perl6/mu/commit/570da66916 |
23:01 |
Geth |
¦ mu: 077e632f57 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | misc/perl6advent-2017/schedule |
23:01 |
Geth |
¦ mu: Merge pull request #29 from deepnext/patch-1 |
23:01 |
Geth |
¦ mu: |
23:01 |
Geth |
¦ mu: Update schedule |
23:01 |
Geth |
¦ mu: Thanks! |
23:01 |
Geth |
¦ mu: review: https://github.com/perl6/mu/commit/077e632f57 |
23:04 |
timotimo |
Morfent: http://hg.dyncall.org/pub/dyncall/dyncall/file/3581366858a6/dyncall/dyncall_callvm_x64.c#l74 - check this out |
23:04 |
timotimo |
see how it passes short args by pretending they are longlong |
23:04 |
Morfent |
yeah |
23:05 |
ryn1x |
Does CPAN store statistics anywhere? Like number of downloads? |
23:05 |
s0me0ne-unkn0wn |
Thrush: Exactly, excuse me for my English, I speak mostly Slavic languages :) |
23:05 |
timotimo |
that's where the upper bytes of the regsiter get filled by sign extension |
23:07 |
timotimo |
the question becomes: do we have functions that would expect sign extension for the upper bytes? |
23:07 |
Thrush |
Quite all right, s0me0ne-unkn0wn. I just googled the term, and google was correcting me slightly. |
23:08 |
Thrush |
s0me0ne-unkn0wn: Ĉu vi parolas Esperanton? (Do you speak Esperanto?) |
23:09 |
El_Che |
utf8 pr0n hour at #perl6, /me thinks :) |
23:10 |
|
mcmillhj joined #perl6 |
23:11 |
s0me0ne-unkn0wn |
Thrush: Unfortunatelly no, my first language is Russian, I also speak Croatian, Bosnian an Serian (which are mosly the same language), very limited Polish and Bulgarian and also Perl (as native) and Perl 6 (as foreign) :) |
23:11 |
AlexDaniel |
El_Che: softcore, real unicode porn will be in the advent post :P |
23:11 |
|
lizmat joined #perl6 |
23:12 |
El_Che |
AlexDaniel: haha |
23:15 |
lizmat |
. |
23:18 |
El_Che |
lizmat: that the most boring utf8 of the evening :) |
23:18 |
lizmat |
sorry, it was only intended as ascii :-) |
23:20 |
El_Che |
:) |
23:21 |
El_Che |
(there was a utf8 conversation going on before you joined) |
23:23 |
Thrush |
Thanks for your help, guys. I have to leave now. |
23:29 |
|
wamba joined #perl6 |
23:39 |
|
mudman joined #perl6 |
23:42 |
|
comborico1611 joined #perl6 |
23:44 |
|
raschipi joined #perl6 |
23:56 |
|
redhands left #perl6 |
23:56 |
|
Herby_ joined #perl6 |
23:57 |
Herby_ |
o/ |
23:57 |
mudman |
\ o |
23:57 |
raschipi |
\o |
23:58 |
|
comborico1611 joined #perl6 |