»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend! Set by sorear on 4 February 2011. |
|||
00:00
fgomez joined,
atrodo left
00:01
spider-mario left
00:02
Chillance left
00:14
_jaldhar joined
00:27
_jaldhar left
00:30
_jaldhar joined
00:33
benabik left
|
|||
[Coke] yawns. | 00:33 | ||
00:37
snearch joined,
sisar joined
|
|||
[Coke] remains blocked on partcl-nqp for now. | 00:39 | ||
dalek | rl6-roast-data: 083a5ab | coke++ | / (4 files): today |
00:40 | |
rl6-roast-data: 00bc2db | coke++ | / (3 files): today |
|||
rl6-roast-data: c0d51ce | coke++ | p (2 files): today |
|||
rl6-roast-data: bcf5da5 | coke++ | p (2 files): today |
|||
rl6-roast-data: 8cd608d | coke++ | p (2 files): today |
|||
rl6-roast-data: 770f64f | coke++ | p (2 files): today |
|||
rl6-roast-data: e004f76 | coke++ | / (4 files): today |
|||
00:42
benabik joined
01:00
skids joined,
whiteknight left
01:03
scott__ joined
01:10
cognominal is now known as _gibi_
01:11
_gibi_ is now known as cognominal,
telex left
01:12
masak left,
masak joined,
telex joined
|
|||
TimToady | ?""" | 01:18 | |
01:19
[particle] left
|
|||
TimToady | that would be my kitty, who doesn't know Perl 6 very well yet | 01:21 | |
01:21
rk left,
rk joined
01:24
tokuhiro_ joined
01:25
fgomez left
|
|||
colomon | std: ?""" | 01:28 | |
p6eval | std cfe8d43: OUTPUT«===SORRY!===Confused at /tmp/9yM1_q_E9N line 1:------> ?""⏏" expecting any of: POST infix or meta-infix infixed function postcircumfix postfix postfix_prefix_meta_operator postop statement modifier | ||
..loopParse failed… | |||
01:33
fgomez joined
01:49
snearch left
02:06
tokuhiro_ left
02:09
MikeFair_ joined
02:11
orafu joined
02:15
OuLouFu left
|
|||
MikeFair_ waves to #perl6. | 02:15 | ||
02:18
sisar left
|
|||
colomon | o/ | 02:53 | |
sorear | o/ | 02:54 | |
03:40
lichtkind left
04:15
bluescreen100 left
|
|||
tipdbmp | r: "abc".chars | 04:27 | |
p6eval | rakudo d1f4dc: ( no output ) | ||
tipdbmp | r: say "abc".chars | ||
p6eval | rakudo d1f4dc: OUTPUT«3» | ||
tipdbmp | r: say "за̀пра".chars | 04:28 | |
p6eval | rakudo d1f4dc: OUTPUT«6» | ||
04:30
bluescreen100 joined
|
|||
tipdbmp | How do you count the characters of a string like the above (not counting the stress mark as a character)? | 04:31 | |
sorear | r: say "за̀пра".ords | ||
p6eval | rakudo d1f4dc: OUTPUT«1079 1072 768 1087 1088 1072» | ||
sorear | r: say "за̀пра".comb.grep(/<!:Mark>/) | ||
p6eval | rakudo d1f4dc: OUTPUT«з а ̀ п р а» | ||
sorear | n: say "за̀пра".comb.grep(/<!:Mark>/) | ||
p6eval | niecza v21-1-ga8aa70b: OUTPUT«з а ̀ п р а» | ||
sorear | n: say "за̀пра".comb.grep(/<!:M>/) | 04:32 | |
p6eval | niecza v21-1-ga8aa70b: OUTPUT«з а ̀ п р а» | ||
sorear | n: say "за̀пра".comb.grep(/<:Gc(!/M/)>/) | ||
p6eval | niecza v21-1-ga8aa70b: OUTPUT«Use of uninitialized value in string context at /home/p6eval/niecza/lib/CORE.setting line 1287 (warn @ 5)  at /home/p6eval/niecza/lib/CORE.setting line 266 (Mu.Str @ 15)  at <unknown> line 0 (ExitRunloop @ 0)  at /home/p6eval/niecza/lib/CORE.setting… | ||
sorear | n: say "за̀пра".comb.grep(/<:ccc(0)>/) | ||
p6eval | niecza v21-1-ga8aa70b: OUTPUT«===SORRY!===Cannot parse number: A at /home/p6eval/niecza/lib/CORE.setting line 1435 (die @ 5)  at /home/p6eval/niecza/lib/CORE.setting line 3525 (ANON @ 11)  at /home/p6eval/niecza/lib/CORE.setting line 3527 (NumSyntax.str2num @ 5… | ||
sorear | n: say "за̀пра".comb.grep(/<:ccc<0>>/) | ||
p6eval | niecza v21-1-ga8aa70b: OUTPUT«===SORRY!===Cannot parse number: A at /home/p6eval/niecza/lib/CORE.setting line 1435 (die @ 5)  at /home/p6eval/niecza/lib/CORE.setting line 3525 (ANON @ 11)  at /home/p6eval/niecza/lib/CORE.setting line 3527 (NumSyntax.str2num @ 5… | ||
sorear | theoretically .chars will do it. | 04:33 | |
TimToady | we don't have NFG yet | ||
tipdbmp | Oh, ok. | ||
TimToady | but 5 would be the "correct" answer by spec | ||
sorear | n: say "за̀пра".comb.grep(/<:ccc("0")>/) | 04:37 | |
p6eval | niecza v21-1-ga8aa70b: OUTPUT«з а п р а» | ||
sorear | n: say "за̀пра".comb.grep(/<:ccc("0")>/).elems | 04:38 | |
p6eval | niecza v21-1-ga8aa70b: OUTPUT«5» | ||
sorear | r: say "за̀пра".comb.grep(/<:ccc("0")>/).elems | ||
p6eval | rakudo d1f4dc: OUTPUT«===SORRY!===regex assertion not terminated by angle bracket at line 2, near "(\"0\")>/).e"» | ||
sorear | \o/ | 04:39 | |
04:40
Helios left
04:42
[particle] joined,
rk left
|
|||
tipdbmp | =) | 04:42 | |
sorear | of course this will be several orders of magnitude slower than .chars :( | 04:46 | |
04:50
benabik left
04:51
benabik joined,
benabik_ joined,
benabik left,
benabik_ is now known as benabik
04:55
am0c left
05:00
bluescreen100 left
05:11
skids left
05:15
Celelibi left
05:21
xinming_ left
05:23
xinming joined
05:46
kaleem joined
05:55
stepnem joined
06:05
wtw_ joined
06:16
daniel-s left
06:17
daniel-s joined
06:18
xinming_ joined
06:21
xinming left
|
|||
Su-Shee | good morning everyone. | 06:25 | |
scott__ | welcome | 06:30 | |
sorear | o/ | 06:36 | |
06:44
FROGGS__ joined
06:46
xinming_ left
06:48
xinming joined,
Edument joined
06:56
am0c joined
07:02
brrt joined
07:03
FROGGS joined
07:06
cognominal left
|
|||
FROGGS | good morning | 07:07 | |
brrt | 'o | 07:11 | |
sorear | o/ | ||
scott__ | o/ | ||
07:21
hoelzro|away is now known as hoelzro
|
|||
dalek | osystem: ee40694 | ronaldxs++ | META.list: Add Enc::MIME::Base64 module See end of README.md for explanation of why Perl 6 wants another MIME Base64 encoder. |
07:22 | |
osystem: b5a2b54 | (Aliaksandr Zahatski)++ | META.list: Merge pull request #13 from ronaldxs/patch-1 Add Enc::MIME::Base64 module |
|||
07:27
Edument left
|
|||
tadzik | haha, I just did the same thing :) | 07:28 | |
07:55
thou left
|
|||
dalek | rlito: 8b845c5 | (Flavio S. Glock)++ | / (3 files): Perlito5 - javascript: fix context in eval and in anon sub |
08:03 | |
08:06
Edument joined
08:16
fhelmberger joined
08:21
kresike joined
|
|||
kresike | good morning all you happy perl6 people | 08:21 | |
tadzik | good day kresike-y | ||
kresike | hello tadzik o/ | 08:22 | |
masak | morning, #perl6 | ||
kresike | hello masak o/ | ||
08:23
Patterner left
08:24
Psyche^ joined,
Psyche^ is now known as Patterner,
FROGGS left,
FROGGS__ left
|
|||
moritz | \o masak | 08:26 | |
\o tadzik, kresike | |||
08:26
FROGGS joined
|
|||
sorear | o// | 08:26 | |
08:26
FROGGS__ joined
|
|||
kresike | hello moritz o/ | 08:33 | |
moritz just created his first object in the RIPE test database | 08:35 | ||
dalek | rlito: da14ca5 | (Flavio S. Glock)++ | / (4 files): Perlito5 - update Makefile; bump perl version to 5.14.1 |
08:36 | |
Su-Shee | moritz: so, you're going to bring down the european internet until noon today? :) | ||
moritz | Su-Shee: I'm trying hard, yes :-) | 08:38 | |
no, it's just the test database so far | |||
08:38
Circlepuller left
08:39
Circlepuller joined
|
|||
Su-Shee | moritz: I just wanted to make you nervous. :) | 08:40 | |
08:41
abraxxa joined
|
|||
moritz | and suddenly I have to think of www.youtube.com/watch?v=_y36fG2Oba0 | 08:41 | |
abraxxa | i've upgraded rakudo from 2011.01 to 2012.08 and now the line $play_again = $input eq 'j'; result in the error Cannot assign into a PMCNULL container in block at | ||
08:42
mathw joined
|
|||
hoelzro | that's quite an upgrade | 08:42 | |
moritz | r: my $input = 'foo'; my $play_again = $input eq 'j'; say 'alive' | ||
p6eval | rakudo d1f4dc: OUTPUT«alive» | ||
moritz | abraxxa: seems to work here... maybe show more context? | ||
abraxxa: and delete any old .pir files (from precompiled modules) | 08:43 | ||
Su-Shee | well if that's all he's got as a error with an upgrade of a year... | ||
moritz | well, it's the *first* error :-) | ||
abraxxa | gist.github.com/806301 | ||
line 81 | |||
it was the first time i touched perl6 and never had time to do so since then | 08:44 | ||
was a coding contest against a friend who does c# | |||
the original c# code of a co-student had over thousand lines! | |||
moritz | it doesn't even show me the first prompt here :* | 08:45 | |
:( | |||
Su-Shee | abraxxa: "Willkommen bei EuroMillionen"? What are you going to pay for help? :)) | ||
isn't there just a ; missing in the line above? | 08:47 | ||
moritz | shouldn't be necessary, because the previous line ends with } | ||
Su-Shee | ok. | ||
abraxxa | when i comment out line 81 i get Null PMC access in get_bool() in block at ./euromill.pl6:82 | 08:49 | |
moritz | abraxxa: are you sure you're using the right perl6 binary | 08:50 | |
? | |||
so many Null PMC accesses are very uncharacteristic of rakudo 2012.08 | |||
abraxxa | [ahartmai@ahartmai-nb:~/perl6$ ]$ which perl6 -> /home/ahartmai/perl6/rakudo-2012.08/install/bin/perl6 | ||
sorear | r: gist.github.com/806301 | ||
moritz | what does perl6 --version say? | ||
p6eval | rakudo d1f4dc: OUTPUT«(timeout)Willkommen bei EuroMillionen!use of uninitialized value of type Str in string context in block at /tmp/NVkV7LiIcX:34use of uninitialized value of type Str in string context in block at /tmp/NVkV7LiIcX:34use of uninitialized value of type Str in st… | 08:51 | |
sorear | n: gist.github.com/806301 | ||
abraxxa | This is perl6 version 2012.08 built on parrot 4.4.0 revision RELEASE_4_4_0 | ||
p6eval | niecza v21-1-ga8aa70b: OUTPUT«(signal XFSZ)Willkommen bei EuroMillionen!Wollen sie einen Quicktipp abgeben? j/n: Wollen sie einen Quicktipp abgeben? j/n: Wollen sie einen Quicktipp abgeben? j/n: Wollen sie einen Quicktipp abgeben? j/n: Wollen sie einen Quicktipp abgeben? j/n: Wollen si… | ||
moritz | wtf is signal XFSZ? | ||
sorear | File size limit exceeded | ||
I did not know you had a disk quota on p6eval | 08:52 | ||
moritz | it's per-process | ||
set in Evalbot::Executer or so | |||
not globally | |||
sorear | I guess it just kept spewing messages to the output file until it got to 15M | 08:53 | |
.oO( proof of niecza speed ) |
08:54 | ||
abraxxa | so the syntax hasn't change somewhere since i wrote it? | 08:56 | |
sorear | doesn't look like it | 08:59 | |
but I do see one questionable bit | |||
until (my $input = prompt("Bitte geben sie Nummer $_ ein (1-50): ")) ~~ any @allowed_numbers && $input !~~ any @numbers {} | |||
until (my $input = prompt("Bitte geben sie Stern $_ ein (1-9): ")) ~~ any @allowed_stars && $input !~~ any @stars {} | |||
08:59
dakkar joined
|
|||
moritz | precedence? | 08:59 | |
sorear | that is parsed as $input ~~ any( @allowed_numbers && $input !~~ any @numbers ) | 09:00 | |
a function call without parens swallows everything to the right | |||
moritz | ... depending on the precedence of the stuff on the right :-) | ||
sorear | I am fairly certain that there is no such dependance | 09:02 | |
ah, 'and' | |||
09:05
jerome left
|
|||
abraxxa | the code runs until after the prompt in line 81 | 09:07 | |
is the repeat while loop ok? | |||
sorear | repeat while loops are still valid | 09:08 | |
moritz | sorear: and, or, feed operators, statement modifiers | ||
09:08
jerome joined
09:09
wk joined
|
|||
sorear | that particular repeat while is legal syntax | 09:09 | |
abraxxa | line 80 is different from the same lines above by not using my before $input | ||
sorear | if you fix the precedence thing what happens? | 09:10 | |
abraxxa | the error remains the same | 09:11 | |
sorear | you may have found a nom regression./ | 09:15 | |
you could try my compiler :D | |||
FROGGS | sorear: you'are the only one hacking on niecza? | ||
moritz | now please reduce the example to something minimal that still exposes the bug, and submit as a bug report | 09:17 | |
09:18
UncleFester6 joined
|
|||
moritz | somehow prompt doesn't work at all on my machine :( | 09:18 | |
UncleFester6 | After a few small fixes my new Enc::MIME::Base64 module now installs OK with panda ... | 09:19 | |
tadzik | awesome | 09:20 | |
abraxxa | paste.scsys.co.uk/207402 | 09:21 | |
sorear | FROGGS: no, colomon has been contributing a lot lately | ||
and others have done so in the paste | |||
abraxxa | that's a minimal test case | 09:24 | |
moritz: how should perl6 bugs be submitted? can i transform it to a test case for the testsuite? | 09:25 | ||
moritz | abraxxa: per email to [email@hidden.address] | ||
abraxxa: and yes, a test case would also be nice | 09:26 | ||
abraxxa | is the pasted code sufficient? | ||
moritz | no | ||
it contains way too much irrelevant code | |||
abraxxa | you might want to add this info to the channel topic | ||
moritz | remove everything from it that you don't need to reproduce the bug | ||
abraxxa | moritz: i'm talking about this one paste.scsys.co.uk/207402 | ||
sorear wonders if that can still be simplified | 09:28 | ||
e.g. do you really need the outer loop? | |||
or the ~~ any('j', 'n') ? | |||
think about this in terms of features | |||
abraxxa | works without the loop | ||
sorear | making your test case not use junctions would be a big simplification | ||
abraxxa | works also in a block | 09:29 | |
moritz | does it need prompt? | ||
abraxxa: oh, I didn't see that paste. Much better. | |||
sorear | sleep& | ||
abraxxa | paste.scsys.co.uk/207406 | 09:30 | |
moritz | abraxxa++ | 09:31 | |
abraxxa | moritz: no prompt for you ;) | ||
so the error message pointed to the right line | |||
rakudo++ | |||
moritz | r: my $r; repeat { $r = False } while $r | 09:32 | |
p6eval | rakudo d1f4dc: OUTPUT«Cannot assign into a PMCNULL container in block at /tmp/uNv11_2WYi:1» | ||
dalek | rlito: 6807ab1 | (Flavio S. Glock)++ | README-perlito5: Perlito5 - add a note about javascript minification |
||
moritz | r: my $r; repeat { } while $r | ||
p6eval | rakudo d1f4dc: OUTPUT«Null PMC access in get_bool() in block at /tmp/3zlZmjjYKh:1» | ||
moritz | ooh, different error message :-) | ||
abraxxa | looks like a boolification problem | ||
moritz | the problem is that likely that $r isn't set up properly | ||
so it's either a problem with assignment to it, or boolification, depending on what happens first | 09:33 | ||
abraxxa++ | |||
abraxxa: do you want to submit the bug, or should I? | |||
09:33
xinming left
|
|||
abraxxa | if that last code snippet is ok for submission i'll do it | 09:34 | |
moritz | it is | ||
09:35
xinming joined
|
|||
abraxxa | sent | 09:36 | |
moritz | r: my $r; repeat { $r = 1 } while False; | 09:38 | |
p6eval | rakudo d1f4dc: ( no output ) | ||
moritz | r: my $r; repeat { $r = 1 } while $r | 09:39 | |
p6eval | rakudo d1f4dc: OUTPUT«Cannot assign into a PMCNULL container in block at /tmp/cDgkya3ZJR:1» | ||
moritz | so it's dependent on $r being reference in the while condition | ||
09:47
dayangkun left
10:09
scott__ left,
am0c left
10:11
spider-mario joined,
UncleFester6 left
|
|||
moritz | TIL that the RIPE database stores poems | 10:16 | |
10:20
cognominal joined
10:22
daniel-s_ joined
10:25
daniel-s left,
huf left
10:26
woosley left,
huf joined
10:27
cognominal left
10:33
marmay joined
10:36
daxim joined
10:38
woosley joined
|
|||
estrai | is there an easy way to tell a class to accept only the attributes it knows about (as in defined) in the constructor? | 10:40 | |
tadzik | not that I know of | 10:41 | |
it should be possible to write MuX::StrictConstructor, like Moose has it :) | |||
flussence | make a stricter constructor that just passes through to default .new? | 10:42 | |
(is the default .new even reachable once you define another one?) | 10:43 | ||
jnthn | nextsame | 10:44 | |
arnsholt | Something like method new(:$arga!, :$argb!) { nextsame; } should do it I think | ||
jnthn | aye | ||
arnsholt | Or submethod, if it shouldn't be inherited | ||
jnthn | role CheckedNew { method new(*%args) { nextsame; | 10:45 | |
oops | |||
flussence | r: class A { has $.foo = 0; only method new(:$foo) { nextsame } }; my $a = A.new(:foo(5), :wuz(3)); | 10:46 | |
p6eval | rakudo d1f4dc: ( no output ) | ||
estrai | that's awesome, didn't know you can override .new like that | ||
flussence | that lack of error seems wrong | 10:47 | |
jnthn | oh... | ||
methods get an implicit *%_ | |||
flussence | r: class A { has $.foo = 0; only method new(:$foo) { die if %_; nextsame } }; my $a = A.new(:foo(5), :wuz(3)); | ||
p6eval | rakudo d1f4dc: OUTPUT« in method new at /tmp/ygSHTT47yY:1 in block at /tmp/ygSHTT47yY:1» | ||
flussence | that sounds better | 10:48 | |
jnthn | r: class A { has $.foo = 0; only method new((% (:$foo)) { nextsame } }; my $a = A.new(:foo(5), :wuz(3)); | ||
p6eval | rakudo d1f4dc: OUTPUT«===SORRY!===Missing blockat /tmp/dY2PiB6Ds7:1» | ||
jnthn | grr | ||
r: class A { has $.foo = 0; only method new(*% (:$foo)) { nextsame } }; my $a = A.new(:foo(5), :wuz(3)); | |||
p6eval | rakudo d1f4dc: OUTPUT«Unexpected named parameter 'wuz' passed in sub-signature in method new at /tmp/UjfWbX8HUQ:1 in block at /tmp/UjfWbX8HUQ:1» | ||
jnthn | That also does it :) | ||
flussence | jnthn++ | ||
jnthn | but really, you can write a role that pulls in a new method that does the validation. | ||
(against the object attributres) | 10:49 | ||
estrai | what would be the check I could use? | ||
10:49
cognominal joined
|
|||
estrai | eval likely, right? | 10:51 | |
buubot_backup | estrai: ERROR: syntax error at (eval 20) line 2, at EOF | ||
jnthn | do self.^attributes to introspect the object's available attributes. | 10:54 | |
Only look for those that have an accessor | |||
estrai | that's cool but still involves some manual work to remove sigils, is there any other method to retrieve only the attribute names? | 10:58 | |
10:58
FROGGS__ left,
FROGGS left
|
|||
jnthn | Don't think so | 10:58 | |
otoh, it's only a call to .substr :) | |||
10:59
FROGGS__ joined
|
|||
jnthn | and you're factoring it out into a role so it's not so much work | 10:59 | |
(as in, can re-use the effort) | |||
11:00
FROGGS joined
|
|||
estrai | yy, just checking :) thank you | 11:01 | |
11:02
cognominal left
11:05
Su-Shee_ joined
11:09
Su-Shee left
|
|||
daxim | someone with a reddit account please reply: www.reddit.com/r/perl/comments/zi3e...l6/c6533z7 "You're probably thinking of [November](www.perlfoundation.org/perl6/index.cgi?november) by viklund and masak." | 11:11 | |
11:21
ggoebel__ left,
Su-Shee_ is now known as Su-Shee
11:26
ggoebel__ joined
11:32
ggoebel__ left
11:36
broquaint left
11:37
ggoebel__ joined
11:38
UncleFester6 joined
11:48
broquaint joined
11:54
sisar joined,
ggoebel__ left
11:56
dakkar left
11:58
ggoebel__ joined
12:01
vs-midi joined
12:08
fgomez left,
fgomez joined
12:12
GlitchMr joined
12:23
FROGGS left,
FROGGS__ left
12:29
benabik left
12:30
benabik joined
12:31
dayangkun joined
12:41
JimmyZ joined
12:42
mtk joined
|
|||
sergot | hi o/ | 12:45 | |
12:47
atrodo joined
12:51
PacoAir joined
13:07
dakkar joined
13:08
tokuhiro_ joined
13:11
dayangkun left
13:13
tokuhiro_ left
13:25
bluescreen10 joined
13:26
fgomez left
|
|||
colomon | \o | 13:31 | |
13:33
SmartViking joined
|
|||
SmartViking | If I don't know perl to begin with, should I focus in learning perl6 or perl5? | 13:34 | |
I'm asking for opinions because I have none | 13:35 | ||
hoelzro | SmartViking: Perl6 still isn't considered "production ready" | ||
tadzik | SmartViking: what do you want to do with it? | ||
hoelzro | Perl 5 is still alive and kicking, and will be for a while | ||
SmartViking | tadzik: Just for my own amusement | ||
moritz | SmartViking: if you want results fast, Perl 5 is probably better. If you want to learn a nicer language, Perl 6 is better :-) | ||
hoelzro | and learning Perl 6 after Perl 5 shouldn't be a problem | ||
tadzik | SmartViking: Perl 6 is good for own amusement :) | ||
SmartViking | Hm ok now I've got a better idea, thanks :) | 13:36 | |
PerlJam | SmartViking: so ... which are you going to put effort into learning? :) | 13:43 | |
13:43
GlitchMr left,
GlitchMr joined,
Circlepuller_ joined
|
|||
SmartViking | PerlJam: I think I'm going to learn perl 6 :) | 13:43 | |
PerlJam | SmartViking: excellent! | 13:44 | |
SmartViking | PerlJam: :) | ||
13:45
Circlepuller left
13:46
skids joined,
GlitchMr left,
GlitchMr joined
|
|||
[Coke] | SmartViking: welcome aboard. Let us know if you have any questions. | 13:51 | |
SmartViking | [Coke]: Thanks, I will :) | ||
13:53
Targen_ left
13:55
gongyiliao joined
13:57
Circlepuller joined
13:58
Circlepuller_ left
13:59
fgomez joined
|
|||
moritz | github fail: cuts off two characters from an overlong message, and replaces it by three dots | 14:01 | |
[Coke] | moritz: wow, that sounds like something *I* would do. | 14:02 | |
PerlJam | sounds like a one of the standard rails routines. | 14:04 | |
14:05
GlitchMr left
|
|||
moritz | I've even seen that once with a printer for bank statements | 14:07 | |
the last page contained something along the lines of "please remove all the pages printed so far, more forthcoming" | 14:08 | ||
and then there was one more :-) | |||
Woodi | rn: sub set( $a ) { say $a.encode.bytes }; set( 3 ); | ||
p6eval | rakudo d1f4dc: OUTPUT«No such method 'encode' for invocant of type 'Int' in sub set at /tmp/Dzez5aMpI5:1 in block at /tmp/Dzez5aMpI5:1» | ||
..niecza v21-1-ga8aa70b: OUTPUT«Unhandled exception: Unable to resolve method encode in type Int at /tmp/h4O2ThGwCf line 1 (set @ 4)  at /tmp/h4O2ThGwCf line 1 (mainline @ 4)  at /home/p6eval/niecza/lib/CORE.setting line 4138 (ANON @ 3)  at /home/p6eval/niecza/lib/CORE.setting lin… | |||
Woodi | it's nqp ? | 14:09 | |
jnthn | encode is a method on Str | ||
Woodi | but $a is Perl varible | 14:10 | |
jnthn | wat? | ||
Woodi | so Int2Str conversion should be automatic I think | ||
moritz | not every possible method | 14:11 | |
Woodi | or it is perl6 here :) | ||
jnthn | That's only true for things we explicitly put in Cool. | ||
moritz | only for those specced to be present in class Cool | ||
jnthn | I'm not sure encode belongs there. | ||
Woodi | k, understud | ||
moritz | I'm sure it doesn't belong there | ||
jnthn | :) | ||
14:12
stopbit joined
14:13
benabik left,
benabik joined
14:16
mucker joined
14:17
Edument left
14:18
nnunley joined
14:19
wtw_ left
14:24
fhelmberger left,
Celelibi joined
|
|||
[Coke] | crud. I just did a git stash on a branch, did a bisect, checkout'd master, git stash pop... conflicts. is there a way to undo the git stash pop? (are the stash commits stored somewhere I could get a pristine copy?) | 14:28 | |
moritz | [Coke]: check with 'git stash show' if the stash is still in the stash list | 14:30 | |
[Coke]: if yes, you can just 'git checkout .' to reset the working copy to the repo, which undoes the stashing (but discards all other changes you made) | |||
hoelzro | git stash drop shouldn't mutate the stash if there are conflicts | ||
[Coke] | ah, even better. | ||
moritz | [Coke]: or did you want to find the commit from which you did the 'git stash'? | 14:31 | |
moritz is a bit confused | 14:32 | ||
[Coke] | no, I wanted the stash back so I could re-apply it cleanly. I just freaked out when I got the conflict. | 14:35 | |
all set now, danke. | 14:36 | ||
moritz++ hoelzro++ | 14:38 | ||
14:40
sirrobert joined
14:41
GlitchMr joined
14:50
FROGGS__ joined
14:51
FROGGS joined
15:06
lorenzo542 joined
|
|||
jnthn | goeteborg & | 15:11 | |
15:17
kaleem left
15:22
Celelibi left
15:24
fgomez left
|
|||
kresike | bye folks | 15:27 | |
15:27
kresike left
15:30
MayDaniel joined
15:41
marmay left
15:42
lorenzo542 left
15:43
atrodo left
15:45
sivoais left
15:46
sivoais joined
|
|||
SmartViking | What does the //= operator do? Is it different from =? | 15:46 | |
hoelzro | SmartViking: //= is "defined or" | 15:47 | |
PerlJam | SmartViking: $a //= $b is the same as $a = $a // $b | ||
diakopter | if the lhs is not defined, it assigns the rhs to the lhs | ||
SmartViking | Ok thanks | 15:48 | |
What does it mean that it's not defined? | 15:49 | ||
daxim | that the variable has no value | ||
SmartViking | daxim: But the variable does exist? | ||
daxim | yes | ||
SmartViking | Ok thanks | ||
PerlJam | SmartViking: when you say "my $foo;" $foo will be undefined until you assign a value to it. | 15:50 | |
15:50
atrodo joined
|
|||
TimToady | this is often used with array elements to make a cache | 15:50 | |
SmartViking | PerlJam: Ah that makes sense | ||
15:50
vs-midi left
|
|||
TimToady | in that case, the array exists, but the element won't exist | 15:50 | |
15:53
thou joined
|
|||
SmartViking | I'm liking perl 6 though. Seems like a language that will allow me to glu stuff together quickly | 15:54 | |
glue* | |||
And get stuff done | 15:55 | ||
15:55
pmurias joined
|
|||
PerlJam | That's pretty much the definition of "Perl" | 15:55 | |
pmurias | jnthn: how do I hook it a js backend to nqp? | ||
15:56
ggoebel__ left
15:57
sirrobert left
15:59
Pleiades` left
16:00
brrt left
16:01
wk left
|
|||
SmartViking | I've used Python for some years and while it's great, it aimes to be so 'clean' and canonical, it's hard to run a system command for example, and regex isn't that straighforward either which I've heard it is in perl | 16:01 | |
16:01
ggoebel__ joined
16:02
JimmyZ left
16:03
hoelzro is now known as hoelzro|away
|
|||
PerlJam | SmartViking: python tries to shoe-horn regex into strings. Having a little more first-class syntax for them helps. | 16:03 | |
16:03
Pleiades` joined
|
|||
SmartViking | PerlJam: Yeah. Python isn't that great with regex from the stance of the developer in my experience, it's always been a bit of a hazzle | 16:06 | |
16:08
ggoebel__ left
16:09
kaare__ joined
|
|||
SmartViking | Excuse my verbosity, bad personality trait | 16:10 | |
16:13
ggoebel__ joined
|
|||
TimToady | verbosity is not a problem here, as long as you're interesting :) | 16:21 | |
we find that we all have complementary personality defects here, so as long as it contributes to the overhealth of the culture and the technology, we like defective people here | 16:23 | ||
*overall health | |||
16:23
benabik left
|
|||
SmartViking | Great :) | 16:23 | |
PerlJam | SmartViking: and if you're not careful, someone may hug you. | 16:25 | |
SmartViking | PerlJam: I'll watch my back :) | ||
TimToady | there are a few personality defects that we try to discourage, such as the kinds of behaviors that reinforce the Male Only ethos prevalent among geeks | ||
16:26
tokuhiro_ joined
|
|||
TimToady | basically, it's fine to be weird here, as long as it's not an excuse to be antisocial | 16:27 | |
SmartViking | What does '~~ 'do? | 16:29 | |
PerlJam | SmartViking: ~~ is smart match. | ||
TimToady | in which context? in normal expressions, it's a smartmatch | ||
SmartViking | TimToady: Yeah normal expressiosn | 16:30 | |
TimToady | it's something a little different in regexes, but not yet implemented, actually, I think | ||
16:30
tokuhiro_ left,
wk joined,
wk left
16:31
wk joined
|
|||
TimToady | smartmatching is described in S03:3552 | 16:32 | |
SmartViking | Thanks | 16:33 | |
TimToady | afk & | 16:34 | |
16:44
abraxxa left
16:47
patspam joined
16:55
fgomez joined
16:57
stepnem_ joined
16:58
stepnem left,
stepnem_ is now known as stepnem
|
|||
sorear | good * #perl6 | 17:01 | |
17:02
stopbit left
17:03
stopbit joined
|
|||
felher | o/ sorear | 17:05 | |
17:14
dakkar left
17:16
fgomez left
|
|||
jnthn | pmurias: Probably similar-ish to Rakudo. | 17:24 | |
pmurias: I suspect that QAST::Compiler will want to become QAST::Compiler::Parrot or so, and then write a QAST::Compiler::JS or so. That's how the integration will want to look eventually, I think. | 17:25 | ||
17:25
benabik joined
|
|||
TimToady | nr: proto A(Int, Int) { {*} } | 17:28 | |
17:28
benabik left
|
|||
p6eval | niecza v21-1-ga8aa70b: OUTPUT«Potential difficulties: &A is declared but not used at /tmp/bVYHvmhseb line 1:------> proto A⏏(Int, Int) { {*} }» | 17:28 | |
..rakudo d1f4dc: OUTPUT«===SORRY!==={*} may only appear in proto at line 2, near " }"» | |||
TimToady | um, that *is* a proto | 17:29 | |
jnthn | Hm :) | ||
moritz | TimToady: no, it's inside a block inside a proto :-) | ||
jnthn | What it really wants to tell you is "we only support proto foo(...) { * }" | ||
TimToady | and the idea was that we could put stuff in the proto with the {*}, before and after | ||
like, caching | |||
jnthn | Yeah. I even implemented and use that in NQP | ||
Kinda funny that NQP has a feature that Rakudo doesn't :) | 17:30 | ||
TimToady | (you may recognized that as the proto for an ackermann function :) | ||
jnthn | If somebody want to steal NQP's handling of it, go for it. Otherwise I'll try and get to it when I have a tuit supply again :) | ||
17:30
benabik joined
|
|||
jnthn is currently preoccupied with the talk he's giving tomorrow that ain't really written yet :) | 17:30 | ||
TimToady | of course, niecza's failure mode is to just return Whatever.new there... | 17:31 | |
so I guess I prefer rakudo's failure mode on sorear++'s principle of failing early :) | |||
17:31
benabik left
|
|||
TimToady | jnthn: no rush, just didn't want it slipping past into 6.0.0 :) | 17:33 | |
17:34
benabik joined
17:35
benabik left
|
|||
dalek | rlito: 52de322 | (Flavio S. Glock)++ | / (7 files): Perlito5 - javascript: add "Javascript2" backend for optimization experiments |
17:35 | |
17:36
fglock joined,
benabik joined
17:38
thou left
17:40
benabik left
17:41
benabik joined
|
|||
jnthn | TimToady: Yeah, but adding the things I already figured out how to is kinda LHF ;) | 17:42 | |
17:42
benabik left
|
|||
TimToady | will it handle: proto A(Int $m, Int $n) { (state @)[$m][$n] //= do {*} } | 17:43 | |
jnthn | I don't immediately see any reason why not | 17:44 | |
17:44
benabik joined
|
|||
TimToady | I suppose a question is whether it requires the 'do' there | 17:45 | |
17:46
benabik left
17:47
benabik joined
17:48
ggoebel__ left
|
|||
jnthn | nqp: proto sub foo() { my $x := {*}; say($x) }; multi sub foo() { 42 }; foo() | 17:50 | |
p6eval | nqp: OUTPUT«42» | ||
jnthn | Not in NQP, apparently :) | ||
felher | (state @) is an persistent array with an empty name? | ||
jnthn | yeah | ||
felher | k, thnx :) | 17:51 | |
sorear | It's only persistent relative to the current instance of the current sub | ||
for the most part state variables act like normal variables lifted 1 sub up | |||
jnthn thinks of it as "one per closure clone" | 17:52 | ||
PerlJam | well, you could bind it to a name with a wider scope | ||
sorear | sub foo { return sub { push (state @), $_ } } # each time foo is called, a new state @ is created | ||
jnthn | aye | ||
felher | I see. Thanks :) | ||
17:54
Chillance joined
|
|||
TimToady | then the other question is, if {*} is just a magic term, can it be used where other blocks are expected, such as loop {*} | 17:55 | |
or would that have to be written {{*}} ? | 17:57 | ||
17:57
benabik left
17:58
ggoebel__ joined
18:00
SmartViking left,
benabik joined
18:01
wk left
18:04
fgomez joined
18:06
Chillance left
18:07
Chillance joined
18:09
daxim left
|
|||
[Coke] | that looks like another way to do something macroish. | 18:12 | |
TimToady | well, kind of, except it's standing for a dispatcher, not an AST | 18:17 | |
it's similar to {YOU_ARE_HERE} in the setting, which also has the brackets to remind you that it's a subscope, but also allow -n to be implemented as: for lines() {YOU_ARE_HERE} | 18:18 | ||
18:20
fgomez left
|
|||
TimToady | that's a little closer to a macro, since the setting could construed as a large macro around your compilation unit | 18:20 | |
maybe if we treat that as an actual unquasi, and generalize those to any rule in the grammar, we'll replace {YOU_ARE_HERE} someday with ¤blockoid:UNIT or some such | 18:25 | ||
and it would be one less special case | |||
I doubt we'd do anything similar to {*} though, since 1) it's not an AST, and 2) it needs to be huffmanly short | 18:26 | ||
18:27
wamba joined
18:28
sisar left
|
|||
TimToady | thinking of the setting as a macro means you could conceivably have a setting that composes multiple compilation units, which is a bit mind blowing | 18:28 | |
18:32
wamba left,
sirrobert joined
18:34
Celelibi joined
|
|||
sirrobert | is there any current work going on for a DBI-type module? | 18:39 | |
I saw DBIish, but the last commits were 4-5 months ago | |||
moritz | is there anything in particular you want from it? | 18:40 | |
sirrobert | Yes... but I can't remember what it was that wasn't working for me at the moment ... =) | ||
moritz | please open a ticket the next time you remember | ||
sirrobert | sure thing | 18:41 | |
I'll try to re-implement DBI and see what I hit | |||
DBIish | |||
moritz | my Perl 6 tuits have decreased, but they are still > 0) | ||
sirrobert | heh good | ||
I can try to do some stuff on it too | |||
if I understand it =) | |||
moritz | why would you try to reimplement it? | ||
sirrobert | I meant re-integrate | 18:42 | |
not re-implement | |||
moritz | oh | ||
:-) | |||
sirrobert | heh | ||
18:43
wk joined
18:51
wamba1 joined
18:53
fgomez joined
18:55
shinobicl joined
18:57
ggoebel__ left,
Patterner left,
[Coke] left,
spacebat left,
Grrrr left,
shachaf left,
avar left
18:58
ggoebel__ joined,
Patterner joined,
[Coke] joined,
spacebat joined,
Grrrr joined,
shachaf joined,
avar joined
19:06
ggoebel__ left
|
|||
sirrobert | moritz: huh, it integrated easily. I guess either I didn't know enough p6 a couple months ago or the architecture changes made it "just work" | 19:09 | |
19:09
fhelmberger joined
|
|||
moritz | sirrobert: good to hear :-) | 19:09 | |
sirrobert: what backend are you using? | |||
sirrobert | mysql | 19:11 | |
19:11
fhelmberger_ joined
|
|||
sirrobert | I think I'll start a light-weight ORM project | 19:12 | |
I didn't see one in the modules list | |||
arnsholt | Yeah, that one's a TODO | ||
moritz | fwiw I consider the postgresql backend the most robust one | ||
it does proper prepared statements (which the mysql backend doesn't) | 19:13 | ||
sirrobert | huh | 19:14 | |
I've never used postgres | |||
19:14
fhelmberger left,
araujo left
|
|||
sirrobert | I'll see if switching makes sense for me | 19:14 | |
moritz | you should. It's quite a nice database | ||
arnsholt | Postgres can be a bit odd at first when coming from MySQL, but on the whole it's awesome | 19:15 | |
moritz | at least if you start with something newish | ||
sirrobert | my old boss was into it (though the team used mysql) | ||
moritz | if you have a huge body of mysql data and SQL, switching won't make sense at all | ||
sirrobert | nah, it's a small set | ||
arnsholt | There was a pretty good post on HN comparing MySQL and Postgres the other day | ||
sirrobert | most everything is programmatic (p6-wise right now) and uses adapters | 19:16 | |
HN? | |||
arnsholt | Hacker News | ||
19:16
ggoebel__ joined
|
|||
arnsholt | news.ycombinator.com/ | 19:16 | |
sirrobert | looking | ||
found it; thanks =) | 19:17 | ||
reading | |||
benabik | this? news.ycombinator.com/item?id=4495377 | ||
sirrobert | I had found news.ycombinator.com/item?id=4387407 | ||
but yours looks better, benabik =) | |||
19:19
benabik left
19:20
Targen joined,
fhelmberger_ left
19:25
fglock left
|
|||
sirrobert | pretty cool | 19:28 | |
(postgres) | |||
I'll have to take a practical look too, but I like the theoretical emphasis. | |||
arnsholt | I think the post you found is pretty reasonable | 19:31 | |
The data truncation stuff in MySQL does make a certain kind of sense when you see the DB as "where some app stores its data" | 19:32 | ||
But if you're in the "lots of apps sharing a data source" it's pretty crazy | |||
19:36
fgomez left
|
|||
sirrobert | nod | 19:38 | |
19:39
GlitchMr left
19:42
mucker left
19:44
MayDaniel left
19:46
ggoebel__ left,
simcop2387 left
19:50
simcop2387 joined
19:51
ggoebel__ joined
19:52
fgomez joined
19:55
ggoebel__ left
20:01
ggoebel__ joined
20:02
tokuhiro_ joined
20:04
M_o_C joined
20:06
tokuhiro_ left,
FROGGS__ left
20:08
FROGGS left
20:09
FROGGS__ joined
|
|||
[Coke] wonders if we are anywhere near an oracle or ms sql integration | 20:10 | ||
20:12
araujo joined,
araujo left,
araujo joined
|
|||
sirrobert | is there native big-int support in rakudo? | 20:12 | |
[Coke] | "built in" is probably better than "native" when mentioning ints. Yup. | 20:14 | |
nr: say 2**100 | |||
p6eval | rakudo d1f4dc, niecza v21-1-ga8aa70b: OUTPUT«1267650600228229401496703205376» | ||
[Coke] | nr: say 2**1000 | ||
p6eval | niecza v21-1-ga8aa70b: OUTPUT«10715086071862673209484250490600018105614048117055336074437503883703510511249361224931983788156958581275946729175531468251871452856923140435984577574698574803934567774824230985421074605062371141877954182153046474983581941267398767559165543946077062914571196… | ||
..rakudo d1f4dc: OUTPUT«1071508607186267320948425049060001810561404811705533607443750388370351051124936122493198378815695858127594672917553146825187145285692314043598457757469857480393456777482423098542107460506237114187795418215304647498358194126739876755916554394607706291457119647768654… | |||
sirrobert | cool | ||
how about base conversions? | 20:15 | ||
hex to dec, etc? | |||
[Coke] | <nod> | ||
sirrobert | is there a page somewhere with code examples? | ||
[Coke] | r: say :08<10> | ||
p6eval | rakudo d1f4dc: OUTPUT«8» | ||
sirrobert | ooh | ||
[Coke] | r: say :08<13> | ||
p6eval | rakudo d1f4dc: OUTPUT«11» | ||
[Coke] | r: say :13<22> | ||
p6eval | rakudo d1f4dc: OUTPUT«28» | ||
sirrobert | wow, it's fast too | 20:16 | |
[Coke] | sirrobert: there's docs.perl.org, the synopsis, and the spec tests (perl6/roast on github). that's where I usually look | ||
sirrobert | I mean, fast enough for me =) | ||
r: say (:10<0xa111ff4efc4c11e18d67080027f5e34b>) ** 10 | |||
p6eval | rakudo d1f4dc: OUTPUT«2023715812404703679235203663383420543796506403783669618127906032009103508390627719708547814169269664260282428553784381864262027334858930200053064046901569273192257097336014118586511821526010272249171977304148848604687935662228390091491975276477058903425186245122413… | ||
sirrobert | thanks, that's excellent | 20:17 | |
20:20
thou joined
20:21
FROGGS joined
20:25
FROGGS__ left,
FROGGS left
|
|||
colomon just figured out a $work bug which had been plaguing him for about six weeks... | 20:28 | ||
sirrobert | w00t =) | ||
colomon | something incredibly simple once I figured it out, of course. :) | 20:32 | |
sirrobert | heh, was playing with randomly-chosen numbers to test things... hit a very weird thing (bug?) | 20:36 | |
r: say 24.base(20) | |||
p6eval | rakudo d1f4dc: OUTPUT«14» | ||
sirrobert | r: say 24.base(24) | ||
p6eval | rakudo d1f4dc: OUTPUT«10» | ||
sirrobert | r: say 24.base(36) | ||
p6eval | rakudo d1f4dc: OUTPUT«O» | ||
sirrobert | 0??? | ||
but then I realized it was 'O' not 0 =) | 20:37 | ||
geekosaur | hee | 20:40 | |
sirrobert | =) | ||
geekosaur was just commenting about that kind of thing... | |||
20:42
snearch joined
20:46
kaare__ left
20:49
sirrobert left
20:54
benabik joined
20:58
benabik_ joined,
benabik left,
benabik_ is now known as benabik
|
|||
[Coke] | . | 21:04 | |
Circlepuller | r: say 24.base(12) | 21:05 | |
p6eval | rakudo d1f4dc: OUTPUT«20» | ||
Circlepuller | r: say 24.base(16) | ||
p6eval | rakudo d1f4dc: OUTPUT«18» | ||
Circlepuller | r: say 16.base(24) | ||
p6eval | rakudo d1f4dc: OUTPUT«G» | ||
21:06
nwc10 joined
|
|||
Circlepuller | r: say 9.base(16) | 21:06 | |
p6eval | rakudo d1f4dc: OUTPUT«9» | ||
nwc10 | Is the ; mandatory after a sub declaration? | ||
ie | |||
std: sub foo {} foo | |||
p6eval | std cfe8d43: OUTPUT«===SORRY!===Strange text after block (missing comma, semicolon, comment marker?) at /tmp/GpwdzYOEaw line 1:------> sub foo {}⏏ foo expecting any of: horizontal whitespace infix or meta-infix infixed function statement | ||
..mo… | |||
benabik | I think it's not required if there is a newline. | ||
nwc10 | ah OK. | ||
benabik | This is more difficult to demonstrate in IRC. | ||
Circlepuller | like reg perl | ||
nwc10 | that's valid perl 5 | ||
Circlepuller | ^ | 21:07 | |
diakopter | p6eval takes a  as a newline | ||
std: sub foo {} foo | |||
p6eval | std cfe8d43: OUTPUT«ok 00:00 42m» | ||
nwc10 | can I do this? | 21:08 | |
p5: sub foo {} foo | |||
no, just tumbleweed | |||
Circlepuller | no, go to #perl for that | ||
diakopter | eval: sub foo {} foo | ||
buubot_backup | diakopter: No output. | ||
diakopter | eval: sub foo {die} foo | 21:09 | |
buubot_backup | diakopter: ERROR: Died at (eval 20) line 1. | ||
benabik | diakopter++ | ||
nwc10 | aha thanks | 21:10 | |
will it crash with interesting pack templates? :-) | |||
21:10
skids left
|
|||
benabik | nwc10: We thank you for not abusing our bots. | 21:12 | |
nwc10 | thanks for the help | 21:14 | |
21:14
nwc10 left
21:17
benabik left
|
|||
masak | good morning, #perl6! | 21:20 | |
sorear | masak++ | 21:21 | |
21:21
fgomez left
|
|||
sorear | good #perl6, masak | 21:21 | |
jnthn | evening o/ | 21:22 | |
with free wine | |||
oops, wrong window | |||
21:23
M_o_C left
|
|||
masak | :P | 21:24 | |
jnthn | Wrong window is consequence of very laggy connection rather than wine :P | 21:25 | |
masak | just keep telling yourself that. :P | 21:28 | |
masak is on a train, and still gets window changing right! | |||
jnthn | .oO( Wine Is Not an Excuse? ) |
21:29 | |
masak | :P | 21:30 | |
21:35
fgomez joined
21:42
snearch left
22:00
shinobicl left
22:03
stopbit left,
stopbit joined
22:04
SHODAN left,
SHODAN joined
22:08
jlaire left
22:09
bluescreen10 left
22:14
jlaire joined
22:20
raiph joined
22:29
stopbit left
22:31
ggoebel__ left
22:38
stepnem left
22:39
ggoebel__ joined
22:43
whiteknight joined
22:44
ggoebel__ left
|
|||
flussence | .oO( I want a loose-precedence "." so I don't need to bounce on the shift/9/0 keys as often... ) |
22:47 | |
22:49
ggoebel__ joined
|
|||
diakopter | std: maybe { } maybe { } | 22:53 | |
p6eval | std cfe8d43: OUTPUT«===SORRY!===Strange text after block (missing comma, semicolon, comment marker?) at /tmp/tiHeHpA6hN line 1:------> maybe { }⏏ maybe { } expecting any of: horizontal whitespace infix or meta-infix infixed function | ||
..stateme… | |||
diakopter | TimToady: std doesn't like S17's maybe | ||
chained, at least | |||
22:57
ggoebel__ left,
vs-midi joined
23:02
ggoebel__ joined
23:03
skids joined
|
|||
TimToady | std: maybe { }; maybe { } | 23:06 | |
p6eval | std cfe8d43: OUTPUT«ok 00:00 42m» | ||
TimToady | looks fine to me | ||
std: maybe { } maybe { } | 23:07 | ||
p6eval | std cfe8d43: OUTPUT«ok 00:00 42m» | ||
TimToady | there are no blocks in Perl 6 that are special-cased not to need a semicolon when followed by something on the same line | ||
we absolutely do not distinguish built-ins from user-defined code at that point | 23:08 | ||
so S17 is just wrong | 23:09 | ||
dalek | ecs: a9f9c60 | larry++ | S17-concurrency.pod: uncuddle maybes to avoid need for ; discovered by diakopter++ |
23:12 | |
23:16
spider-mario left
|
|||
diakopter | here's my number, so call me maybe | 23:16 | |
23:17
benabik joined
23:23
nnunley left
|
|||
TimToady | just added a fancy version to rosettacode.org/wiki/Ackermann_function#Perl_6 that allows us to calculate A(4,2) | 23:24 | |
also shows off use of Unicode | |||
diakopter | aww; my poor font | 23:25 | |
lots o boxes | |||
sorear | TimToady: what do we think of S06:1135 these days? | 23:26 | |
23:28
thou left
|
|||
TimToady | it was an attempt to out-dwim Ruby on magic callback syntax, but should probably be marked as conjectural | 23:28 | |
23:28
ggoebel__ left
|
|||
TimToady | we do seem to be doing pretty well without it | 23:29 | |
diakopter | how long does A(4,2) take | 23:31 | |
23:33
ggoebel__ joined
23:34
dayangkun joined
|
|||
TimToady | 2.2 seconds in rakudo, 3.1 in niecza, so rakudo wins on this one | 23:34 | |
diakopter | 3.1s; that's a good length for profiling | 23:35 | |
TimToady | without the extra cheating terms, A(4,2) chewed up multiple gigs before I killed it | ||
(even with the caching) | 23:36 | ||
((which I wish I could write in the proto, but oh well)) | |||
timotimo | (state @)[𝑚][𝑛] //= 𝔸(𝑚,𝑛) - that's a really nice trick (and the copypaste totally botched it i think) | ||
TimToady | (((actually, I wish "is cached" did that for me))) | ||
diakopter | is memoed? | 23:37 | |
TimToady | we're trying to speak English, not CSese | ||
timotimo | agreed. | ||
23:38
tokuhiro_ joined
|
|||
TimToady | though in this case, an explicit cache with integer indexes is likely to beat an automatic hash-based cache | 23:39 | |
and "is cached" can't know whether the integers are going to be compact or sparse | |||
even if declared Int | |||
nor can it know without help that the integers never go negative | 23:40 | ||
I suppose if it were declare sub A(Uint8, Uint8) or some such, it could figure it out | 23:41 | ||
diakopter | rn: say $_[Nil].WHAT | 23:42 | |
p6eval | niecza v21-1-ga8aa70b: OUTPUT«Parcel()» | ||
..rakudo d1f4dc: OUTPUT«use of uninitialized value of type Nil in numeric context in block at /tmp/r9MvqOmGer:1Any()» | |||
TimToady | but then we'd not be feeding it back into the cache with results larger than 256, which wouldn't work | ||
timotimo | Uint8? wow, you're optimistic :)) | ||
perl6 won't be that amazing, even when finished | |||
diakopter | :P | 23:43 | |
TimToady | (Uint8, Uint) would maybe work | ||
23:43
tokuhiro_ left
|
|||
TimToady | since we feed A() to itself only in the second argument | 23:43 | |
23:44
PacoAir left
|
|||
diakopter | n: say Inf[0-1] | 23:45 | |
p6eval | niecza v21-1-ga8aa70b: OUTPUT«Any()» | ||
TimToady | to a first approximation, though, "is cached" is always going to be hash based | ||
timotimo: but we do have uint8 specced, and Uint8 is just a boxed one of those :) | 23:46 | ||
diakopter | rn: say 1[1] | ||
p6eval | rakudo d1f4dc: OUTPUT«Index out of range. Is: 1, should be in 0..0 in method gist at src/gen/CORE.setting:9831 in sub say at src/gen/CORE.setting:7161 in block at /tmp/HYCAiGKW2x:1» | ||
..niecza v21-1-ga8aa70b: OUTPUT«Any()» | |||
timotimo | no, i meant, having values up to 256 for the arguments is optimistic ;) | 23:47 | |
uh, up to 255 of course | 23:48 | ||
diakopter | timotimo: heh; nothing will be amazing when Perl 6 is finished | ||
23:49
Circlepuller_ joined
|
|||
TimToady | oh, okay, then make it Uint3 or so :) | 23:50 | |
timotimo | perl6 getting finished will redefine amazing for quite a long time, no? | ||
TimToady | and it'll still be amazing :) | ||
timotimo | i'm already amazed! | 23:51 | |
TimToady | iterestingly, the RC "fixed width" font isn't really quite, notice how the mathematical italic m and n are different widths | 23:52 | |
23:52
Circlepuller left
|
|||
TimToady | and the double-struck A is a bit wider | 23:52 | |
at least in my firefox rendering | 23:53 | ||
TimToady ponders whether "iterest" should be a word or not | |||
23:53
Chillance left
23:56
fgomez left
23:57
fgomez joined
|
|||
flussence | TimToady: I've noticed a few "monospace" fonts aren't, too. Inconsolata isn't and that's one of the ones I like :( | 23:58 | |
23:58
kst left,
pmurias left
|
|||
timotimo | you were the one font he liked and you BLEW IT! | 23:59 | |
flussence | (that case is worse, because it's got varying widths in *latin-1* characters...) |