»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend! Set by moritz on 22 December 2015. |
|||
00:05
bjz joined
00:09
bjz left
|
|||
gfldex | m: role R {}; sub f(R $r){ dd $r}; my Int $v = 1 but R; f($v); | 00:11 | |
camelia | rakudo-moar fa84f1: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Calling f(Int) will never work with declared signature (R $r)at <tmp>:1------> 3b f(R $r){ dd $r}; my Int $v = 1 but R; 7⏏5f($v);» | ||
gfldex | should that work? | ||
m: role R {}; sub f($r){ dd $r}; my Int $v = 1 but R; f($v); dd $v, $v ~~ R; | 00:12 | ||
camelia | rakudo-moar fa84f1: OUTPUT«Int+{R} $r = 1Int+{R} $v = 1Bool::True» | ||
00:13
kurahaupo left
|
|||
BenGoldberg | bisectable, m: my (::N); N::x | 00:16 | |
bisectable | BenGoldberg: On both starting points (good=2015.12 bad=fa84f13) the exit code is 1 and the output is identical as well | ||
BenGoldberg: Output on both points: Cannot call method 'AT-KEY' on a null object in block <unit> at /tmp/sPmv84pXBd line 1 | |||
00:20
captain-adequate left,
cdg joined,
captain-adequate joined
|
|||
BenGoldberg | bisectable, m: role Foo[$x] { }; say Foo[42].WHO.^name | 00:21 | |
bisectable | BenGoldberg: On both starting points (good=2015.12 bad=fa84f13) the exit code is 0 and the output is identical as well | ||
BenGoldberg: Output on both points: VMNull | |||
BenGoldberg | m: say chr 2**63 | 00:23 | |
camelia | rakudo-moar fa84f1: OUTPUT«␀» | ||
BenGoldberg | m: say chr 2**63-2 | ||
camelia | rakudo-moar fa84f1: OUTPUT«chr codepoint cannot be negative in block <unit> at <tmp> line 1» | ||
BenGoldberg | m: multi sub cross() { } | 00:24 | |
camelia | ( no output ) | ||
BenGoldberg | bisectable, multi sub cross() { } | ||
bisectable | BenGoldberg: On both starting points (good=2015.12 bad=fa84f13) the exit code is 0 and the output is identical as well | ||
BenGoldberg: Output on both points: | |||
BenGoldberg | bisectable, m: for 0..0xffff -> $i { say $i if $i %% 100; my $c = try { :16(uniprop($i.chr, "Bidi_Mirroring_Glyph")).chr }; say "{$i.fmt("%04x")}: {$i.chr} ~ $c" if $c.defined} | 00:25 | |
bisectable | BenGoldberg: On both starting points (good=2015.12 bad=fa84f13) the exit code is 0 and the output is identical as well | 00:26 | |
BenGoldberg: gist.github.com/e95d4d857b72a32284...9d74d3a598 | |||
BenGoldberg | m: for 0..0xffff -> $i { say $i if $i %% 100; my $c = try { :16(uniprop($i.chr, "Bidi_Mirroring_Glyph")).chr }; say "{$i.fmt("%04x")}: {$i.chr} ~ $c" if $c.defined} | ||
camelia | rakudo-moar fa84f1: OUTPUT«(signal SEGV)0100200» | ||
AlexDaniel | commit releases for 0..0xffff -> $i { say $i if $i %% 100; my $c = try { :16(uniprop($i.chr, "Bidi_Mirroring_Glyph")).chr }; say "{$i.fmt("%04x")}: {$i.chr} ~ $c" if $c.defined} | 00:29 | |
ah right | 00:30 | ||
commit: releases for 0..0xffff -> $i { say $i if $i %% 100; my $c = try { :16(uniprop($i.chr, "Bidi_Mirroring_Glyph")).chr }; say "{$i.fmt("%04x")}: {$i.chr} ~ $c" if $c.defined} | |||
committable | AlexDaniel: gist.github.com/539428256414be39c0...16bfa35e69 | ||
AlexDaniel | BenGoldberg: bisectable does not catch SEGVs properly yet :( | 00:31 | |
… especially when they are fixed? | 00:32 | ||
BenGoldberg | But not fixed for camelia? | ||
AlexDaniel | m: for 0..0xffff -> $i { say $i if $i %% 100; my $c = try { :16(uniprop($i.chr, "Bidi_Mirroring_Glyph")).chr }; say "{$i.fmt("%04x")}: {$i.chr} ~ $c" if $c.defined} | ||
camelia | rakudo-moar fa84f1: OUTPUT«(signal SEGV)0100200» | ||
AlexDaniel | commit: HEAD for 0..0xffff -> $i { say $i if $i %% 100; my $c = try { :16(uniprop($i.chr, "Bidi_Mirroring_Glyph")).chr }; say "{$i.fmt("%04x")}: {$i.chr} ~ $c" if $c.defined} | ||
committable | AlexDaniel: ¦«HEAD»: 0100200 «exit signal = SEGV (11)» | ||
AlexDaniel | ah | 00:33 | |
00:33
tbrowder left
|
|||
AlexDaniel | MasterDuke: am I reading that incorrectly or does the one above say that it is OK on HEAD? | 00:34 | |
MasterDuke: I mean this one: gist.github.com/Whateverable/53942...16bfa35e69 | |||
MasterDuke: I mean, if it does, then it's a bug :) | |||
00:44
labster left
00:56
araujo__ joined
01:00
araujo_ left
01:02
FROGGS_ joined
01:05
FROGGS left
01:13
cdg left
01:26
rburkholder left,
rburkholder joined
01:27
cyphase left
01:31
cyphase joined
01:34
labster joined,
kalkin- left,
kalkin-_ joined
01:45
ilbot3 left
01:47
ilbot3 joined
01:52
zacts left
01:57
wamba joined
02:00
stanrifkin joined
02:05
stanrifkin left
02:10
kaare__ joined
|
|||
konobi | .tell pmurias well, es6 has support on all modern browsers... though a few still have aspects that aren't implementent yet. Thankfully we can use babel to transpile from pure es6 to es5, or combo of es5/es6 for different browsers support (or use polyfills) | 02:12 | |
yoleaux | konobi: I'll pass your message to pmurias. | ||
31 Jul 2016 19:31Z <pmurias> konobi: I'm applying your refactoring piece by piece as there was a bit of things that where breaking stuff and also I prefer run the tests after relatively small changes rather then debug complex interactions | |||
konobi | .tell pmurias yup... it had all been working up until a small change around code-ref/core/sixmodel =0( | 02:13 | |
yoleaux | konobi: I'll pass your message to pmurias. | ||
02:13
djbkd left
02:14
djbkd joined
|
|||
konobi | .tell pmurias i have a feeling it might be due to a missunderstanding somewhere of how the 'this' keyword works | 02:30 | |
yoleaux | konobi: I'll pass your message to pmurias. | ||
02:34
noganex_ joined
02:37
noganex left,
rmmm left
02:38
rmmm joined
02:39
rburkholder left
02:54
labster left
02:57
mcmillhj joined
03:03
mcmillhj left
|
|||
geekosaur | dalek pinged out about 8 hours ago... | 03:03 | |
MasterDuke | BenGoldberg: FYI, you were calling bisectable with an 'm: ' in front of your code. it should actually be valid Perl 6 (the 'm: ' will just be a label), but it's probably not what you intended | 03:09 | |
AlexDaniel: yeah, something seems off there | 03:10 | ||
03:11
mcmillhj joined
03:15
mcmillhj left
03:23
wamba left
03:24
mcmillhj joined
|
|||
harmil | Think I found my problem with an attribute becoming the type, Callable, but not sure why... | 03:27 | |
m: class NotComposed { has &.func = ~*; }; class IsRat does Rational[Int,Int] { has &.func = ~* }; class IsReal does Real { has &.func = ~* }; say "In NotComposed, func={NotComposed.new.func.perl}"; say "In IsRat, func={IsRat.new.func.perl}"; say "In IsReal, func={IsReal.new.func.perl}" | |||
camelia | rakudo-moar fa84f1: OUTPUT«In NotComposed, func={ ... }In IsRat, func=CallableIn IsReal, func={ ... }» | ||
harmil | It seems that any class that does Rational has its callable attributes munged. | 03:28 | |
geekosaur thinks that looks like a rakudobug... | 03:29 | ||
03:30
mcmillhj left
|
|||
harmil | Yeah, I was just checking to see if I was doing something stupid before sending email | 03:30 | |
03:38
mcmillhj joined
03:43
mcmillhj left
03:44
cibs left
03:51
njmurphy joined
04:14
mcmillhj joined
04:18
mcmillhj left
04:23
dainis left
04:28
finanalyst joined
04:31
mcmillhj joined
04:35
mcmillhj left
04:40
Cabanossi left
04:42
khw left
04:43
Cabanossi joined
04:45
mcmillhj joined
04:50
andrzejku joined,
mcmillhj left
04:51
skids left
04:57
mcmillhj joined
04:58
jeek joined
05:00
labster joined
05:02
mcmillhj left
|
|||
andrzejku | hi :) | 05:06 | |
05:09
agent_white joined
|
|||
holyghost | hello | 05:10 | |
andrzejku | I am looking for Perl friend | 05:12 | |
05:14
mcmillhj joined
|
|||
holyghost | try #perl | 05:14 | |
lots of good mainframe basic dude around here :-) | 05:15 | ||
andrzejku | ok | ||
holyghost | s/dude/dudes | ||
andrzejku | thank you | ||
05:16
NEveD joined
|
|||
andrzejku | holyghost, you are very good | 05:18 | |
05:18
mcmillhj left
05:19
abraxxa joined
05:33
mcmillhj joined
05:35
rburkholder joined
05:37
mcmillhj left
05:38
FROGGS_ left
05:40
ufobat joined
05:41
rburkholder left
05:45
mcmillhj joined
05:47
Zoffix joined
05:48
holyghost left
05:49
mcmillhj left
05:56
perlawhilrl joined
05:58
andrzejku left
06:02
Novell joined,
Woodi joined,
mcmillhj joined
06:03
Novell left
06:06
jonas2 joined
06:07
mcmillhj left
06:08
TimToady left,
freeside joined
06:09
Khisanth left
06:10
TimToady joined
06:15
AlexDaniel left
06:16
mcmillhj joined
06:21
mcmillhj left
06:22
Khisanth joined
06:26
setty1 left,
bob777 joined
06:31
firstdayonthejob joined
06:32
BenGoldberg left
06:37
bob777 left
06:38
firstdayonthejob left
06:41
bob777 joined
06:48
bob777 left
|
|||
moritz | \o | 06:59 | |
Zoffix | o/ | ||
07:02
darutoko joined
|
|||
ufobat | hello :-) | 07:06 | |
Woodi | hi today :) | 07:07 | |
I wonder what unmapped memory is... FreeBSD got patch that improves mem performance 35% - 135% reviews.freebsd.org/D7195 do they just removed we-have-infinity-lot-of-memory layer ? | 07:10 | ||
07:11
sno left
|
|||
moritz | "this can improve the performance 1.35X ~ 2.35x for FIO on hyperv." | 07:12 | |
what is FIO? | |||
Woodi | file IO ? | 07:22 | |
probably this wiki.mikejung.biz/Benchmarking | 07:24 | ||
07:28
zakharyas joined
07:29
pdcawley joined
07:32
perlawhilrl left
|
|||
Zoffix | New blog post "Hacking on The Rakudo Perl 6 Compiler: Mix Your Fix": perl6.party/post/Hacking-on-Rakudo-...x-Your-Fix | 07:36 | |
07:40
CIAvash joined
07:47
mcmillhj joined
07:51
mcmillhj left
07:53
cibs joined,
dakkar joined
|
|||
moritz | Zoffix: you seem to be unaware of local ettiquette. It's called "lol I blug" here :-) | 08:00 | |
08:03
mcmillhj joined
08:06
salva_ joined,
sno joined
08:08
mcmillhj left
08:11
freeside left
08:19
RabidGravy joined
08:22
mcmillhj joined
08:26
mcmillhj left
08:55
araujo__ left
08:57
mcmillhj joined
08:59
awwaiid left
09:01
ab6tract joined
09:02
mcmillhj left
|
|||
ab6tract | good *, #perl6 | 09:04 | |
i ran into something interesting while working on the Sereal port last Friday | |||
an array of Nums failed to smartmatch against an array of equivalent Rats | 09:05 | ||
calling .perl.EVAL on the array of Nums would make the smart match work | |||
i'm not sure how to craft a minimal example for this, because every approach i have used to reproduce would Just Work, except for the original test case based on a real Sereal blob | 09:06 | ||
eg: " not ok 3 - ARRAY -- got: $[1.23e0, 4.56e0, 7.89e0]expected: $[1.23, 4.56, 7.89]" | 09:10 | ||
m: say $[1.23e0, 4.56e0, 7.89e0] ~~ $[1.23, 4.56, 7.89] | |||
camelia | rakudo-moar 4b934d: OUTPUT«True» | ||
ab6tract | so, wtf? | ||
09:14
spider-mario joined
09:16
bjz joined
09:17
xinming_ joined
09:20
xinming left
|
|||
ab6tract | too early for the heavy questions, maybe? | 09:21 | |
moritz | ab6tract: what types do you get there? | 09:25 | |
ab6tract: are these "vanilla" Array objects, or parameterized? (Array[Num] or so)? | |||
ab6tract | moritz: they are vanilla. the data gets encoded in Sereal as a double and gets read back out through a C function that casts to double (NativeCall return type specified as num64) | 09:26 | |
09:26
mcmillhj joined
|
|||
ab6tract | JSON::Tiny and JSON::Fast don't seem to support Nums, and only pass back Rats (the expected result is saved into a json file when generating the corpus of Sereal files (p5 script)) | 09:27 | |
moritz | m: my num64 $n = 1e1; say [$n] ~~ [1e1] | ||
camelia | rakudo-moar 4b934d: OUTPUT«True» | ||
moritz | m: my num64 $n = 1e1; say [$n] ~~ [10.0] | 09:28 | |
camelia | rakudo-moar 4b934d: OUTPUT«True» | ||
ab6tract | moritz: indeed. exactly as happens to me: any attempt to get a non-ok result from $[1.23e0, 4.56e0, 7.89e0] ~~ $[1.23, 4.56, 7.89] fails | ||
and even calling .perl.EVAL on the object (should be a no-op, correct) makes it pass | |||
09:32
mcmillhj left
|
|||
ab6tract | so it's unclear how to even create a portable test case | 09:33 | |
i can work around it by calling .Str.Rat on the result from the read_double C call | 09:34 | ||
(custom function we wrote for getting doubles out of a blob) | |||
09:34
kurahaupo joined
|
|||
ab6tract | but that feels very much like a hack, because the expression works fine when i type it in manually! | 09:35 | |
moritz | ab6tract: can you get a minimal example that mimics the double extraction? | ||
s/get/produce/ | |||
09:39
mcmillhj joined
|
|||
ab6tract | without the underlying C code? | 09:39 | |
was just about to try it with pack/unpack, but it doesn't seem to support nums yet | 09:40 | ||
09:40
finanalyst left
09:43
mcmillhj left
09:49
mcmillhj joined
|
|||
psch | m: use NativeCall; sub fabs(num64 $) is native {*}; my $x = fabs(1e1); say [$x] ~~ [10.0] | 09:54 | |
camelia | rakudo-moar 4b934d: OUTPUT«False» | ||
09:54
mcmillhj left
|
|||
psch | m: use NativeCall; sub fabs(num64 $) is native {*}; my $x = fabs(1e1); say [$x] ~~ [10.0]; say $x | 09:54 | |
camelia | rakudo-moar 4b934d: OUTPUT«False(Mu)» | ||
ab6tract | psch: lol, why didn't i think of that | ||
psch | m: use NativeCall; sub fabs(num64 $) is native returns num64 {*}; my $x = fabs(1e1); say [$x] ~~ [10.0]; say $x | ||
camelia | rakudo-moar 4b934d: OUTPUT«True10» | ||
psch | ab6tract: no idea :) | ||
ab6tract | damnit, same issue | ||
fuck | 09:55 | ||
so, that doesn't actually help in the end | |||
psch | well, it does help insofar the its probably not NC directly | ||
s/the/that/ | |||
ab6tract | the C code just does a memcpy from the relevant buf and it's return values are consistent with the inputs | 09:56 | |
what really gets my goat is the .perl.EVAL part... | 10:00 | ||
10:00
labster left
10:02
mcmillhj joined
|
|||
psch | m: use NativeCall; sub fabs(num32 $) is native returns num32 {*}; my $x = fabs(1e1); say [$x] ~~ [10.0]; say $x | 10:05 | |
camelia | rakudo-moar 4b934d: OUTPUT«True10» | ||
psch | well, definitely weird :) | ||
10:06
mcmillhj left
|
|||
ab6tract | i've noticed that other serialization libs just do .Str.Rat | 10:11 | |
i was wondering if that is based on consensus for a best approach or.. | |||
psch | m: use nqp; use NativeCall; sub fabs(num32 $) is native returns num32 {*}; my $x = fabs(1e1); say nqp::what($x) | 10:12 | |
camelia | rakudo-moar 4b934d: OUTPUT«(Num)» | ||
ab6tract | m: use nqp; use NativeCall; sub fabs(num32 $) is native returns num32 {*}; say nqp::what( fabs(1e1) ) | 10:13 | |
camelia | rakudo-moar 4b934d: OUTPUT«(Num)» | ||
psch | i guess that also boxes on moar..? | 10:14 | |
10:14
mcmillhj joined
10:15
tx0h_ joined
|
|||
ab6tract | psch: sorry, how do you mean? | 10:16 | |
10:16
tx0h left,
tx0h_ is now known as tx0h
|
|||
psch | ab6tract: well, the native sub returns a native type | 10:16 | |
ab6tract: but Num isn't | |||
fwiw, i'm not sure r-j does it differently - we can't really have a WHAT for native types i think | 10:17 | ||
ab6tract | right, yeah | ||
psch | j: use nqp; say nqp::what(my num32 $ = 1e1) | ||
camelia | rakudo-jvm cd19db: OUTPUT«(Num)» | ||
ab6tract | this actually makes sense to me | 10:18 | |
as otherwise you would never have a solid way to get the value into anything else | |||
since you can't call a coercion method on an unboxed | |||
10:19
mcmillhj left
|
|||
timotimo | i inputted my password wrong 2 times and now it seems like i'm getting to wait for an hour before i'm allowed to try again? | 10:19 | |
10:19
cpage_ joined
|
|||
timotimo | oh ... | 10:20 | |
dalek died again | |||
no, i mean | |||
hack.p6c.org died again | |||
psch | oh | ||
i logged in like 20 minutes ago | |||
$ uptime 10:20:38 up 25 days, 17:15, 4 users, load average: 6409.08, 6379.62, 6306.41 | |||
timotimo | yeah | 10:21 | |
psch | that i think is a record..? | ||
timotimo | *shrug* | ||
i'm going to force-kill hack | |||
moritz | timotimo: thank you | 10:22 | |
timotimo | no need for thanks | 10:23 | |
10:23
dalek joined,
ChanServ sets mode: +v dalek,
synopsebot6 joined
|
|||
timotimo | ... if only we could figure out what makes the virtual discs freak out like that? | 10:23 | |
TEttinger | maybe thanking people fixes it but only temporarily | ||
timotimo | makes sense | 10:24 | |
moritz | TEttinger: more permanent solutions would be very welcome, yes | ||
TEttinger | and saying "thank you" actually reduces the reliability of the discs. clearly we need to switch to "cheerio, guvnah!" | ||
ab6tract | psch: here's the C code -- github.com/ab5tract/Sereal/blob/pe...code.c#L86 | 10:25 | |
and here's the sereal decoder -- github.com/ab5tract/Sereal/blob/pe...er.pm6#L64 | |||
just in case you get curious :) | 10:26 | ||
10:26
pmurias joined
|
|||
moritz | TEttinger: why do I get the distinct feeling you're trolling? | 10:26 | |
timotimo | not trolling, just making light of the situation | 10:28 | |
10:29
rindolf joined
|
|||
TEttinger | if I was trolling it would be a very different sense | 10:33 | |
joking is more transparent | |||
trolling might be, | |||
10:34
canopus left
|
|||
TEttinger | hey can perl6 help me find this one prime number, it's like my favorite but I forgot it and it's 4242 decimal places | 10:34 | |
which would be followed by attempts at guessing primes and returned with "no, not it" | 10:35 | ||
10:35
cdg joined
|
|||
moritz | I guess I just don't appreciate your sense of humor, then | 10:38 | |
TEttinger | that's fine. I don't have a great one | 10:39 | |
I'm also very sleepy | |||
good night | |||
moritz | sleep well, and dream of an improved sense of humor | ||
TEttinger | oh, long running process | ||
this thing will stay online, watching, judging, in silence | |||
10:43
bob777 joined,
canopus joined
10:44
Zoffix left
10:45
mcmillhj joined
10:49
mcmillhj left
10:58
mcmillhj joined
11:02
mcmillhj left
11:09
mcmillhj joined
11:10
tbrowder joined,
CIAvash left
11:14
mcmillhj left,
tbrowder left
11:15
CIAvash joined
11:20
aries_liuxueyang left
11:28
mcmillhj joined
11:33
mcmillhj left
|
|||
ab6tract | the intrigue continues... if I call .Str.Num on the num64 it *also* passes the smartmatch | 11:45 | |
11:46
cyphase left
|
|||
ab6tract | of course, smart match is not all that intelligent about arrays, so what one really wants to use is is-deeply | 11:47 | |
which fails when comparing Nums to Rats | |||
m: use Test; is-deeply [1.1e0], [1.1], "the same?"; | 11:48 | ||
camelia | rakudo-moar 4b934d: OUTPUT«not ok 1 - the same?# Failed test 'the same?'# at <tmp> line 1# expected: $[1.1]# got: $[1.1e0]» | ||
11:48
mcmillhj joined
|
|||
ab6tract | m: say [ [], [], [] ] ~~ [ [], [ [] ], [] ] | 11:48 | |
camelia | rakudo-moar 4b934d: OUTPUT«True» | ||
ab6tract | m: [ [], ['a'], [] ] ~~ [ [], [ ['a'] ], [] ] | 11:49 | |
camelia | ( no output ) | ||
ab6tract | m: say [ [], ['a'], [] ] ~~ [ [], [ ['a'] ], [] ] | ||
camelia | rakudo-moar 4b934d: OUTPUT«True» | ||
ab6tract | wow... is-deeply agrees with smartmatch here | 11:50 | |
great | |||
masak | m: say @?INC | ||
camelia | rakudo-moar 4b934d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Variable '@?INC' is not declaredat <tmp>:1------> 3say 7⏏5@?INC» | ||
masak | no @?INC ? | ||
do S11 and S28 need an update? or will @?INC come back? | 11:51 | ||
11:51
cyphase joined
|
|||
ilmari | m: say $*REPO.repo-chain | 11:51 | |
camelia | rakudo-moar 4b934d: OUTPUT«(inst#/home/camelia/.perl6 inst#/home/camelia/rakudo-m-inst-2/share/perl6/site inst#/home/camelia/rakudo-m-inst-2/share/perl6/vendor inst#/home/camelia/rakudo-m-inst-2/share/perl6 CompUnit::Repository::AbsolutePath.new(next-repo => CompUnit::Repository::NQ…» | ||
masak | I just wanted to know whether '.' was in @?INC (which I guess it's not) | 11:52 | |
ilmari | there's no '.' my $*REPO.repo-chain | 11:53 | |
11:53
aries_liuxueyang joined,
mcmillhj left
|
|||
ilmari | AFAICT | 11:53 | |
11:55
pmurias left
11:56
agent_white left
|
|||
jnthn | No, @?INC won't come back :) | 11:56 | |
You'd have to use lib '.' to get the cwd into the repo chain | 11:57 | ||
masak | I just wanted to check that it wasn't there by default | ||
ilmari | and I see 'use lib' resolves it to an absoulte path at use time, unlike perl5 | 11:58 | |
ab6tract | m: my @a = [ [], ['a'], [] ]; my @b = [ [], [ ['a'] ], [] ]; say @a ~~ @b; use Test; is-deeply @a, @b, "how are these the same?" | 12:01 | |
camelia | rakudo-moar 4b934d: OUTPUT«Trueok 1 - how are these the same?» | ||
ab6tract | why is it that i always manage to use p6 in a way that shows weird and disturbing seams? | 12:02 | |
masak | m: say [ ['a'] ].perl | 12:04 | |
camelia | rakudo-moar 4b934d: OUTPUT«["a"]» | ||
masak | ab6tract: it's the one-element rule you're encountering | ||
m: my @a = [ [], ['a'], [] ]; my @b = [ [], [ ['a'], ], [] ]; say @a ~~ @b; use Test; is-deeply @a, @b, "how are these the same?" | |||
camelia | rakudo-moar 4b934d: OUTPUT«Falsenot ok 1 - how are these the same?# Failed test 'how are these the same?'# at <tmp> line 1# expected: $[[], [["a"],], []]# got: $[[], ["a"], []]» | ||
ab6tract | fair enough, i thought that might be the case | 12:05 | |
masak | I don't know if there's a good doc page somewhere explaining that... | ||
...but that's clearly what's happening | |||
ab6tract | masak: unfortunately this doesn't explain my "array of Nums fails to smartmatch with array of Rats unless that array of Nums has .perl.EVAL called on itself" | 12:06 | |
masak | m: say [1e0, 2e0] ~~ [1.0, 2.0] | ||
camelia | rakudo-moar 4b934d: OUTPUT«True» | ||
masak | worksforme :) | ||
ab6tract | that is exactly my issue | 12:07 | |
12:07
bob777 left
|
|||
masak | you sure you're not experiencing floating-point fuzziness or something? | 12:07 | |
ab6tract | m: not ok 3 - ARRAY -- got: $[1.23e0, 4.56e0, 7.89e0]expected: $[1.23, 4.56, 7.89] | ||
camelia | rakudo-moar 4b934d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Two terms in a rowat <tmp>:1------> 3 ARRAY -- got: $[1.23e0, 4.56e0, 7.89e0]7⏏5 expected: $[1.23, 4.56, 7.89] expecting any of: infix infix stopper postfix…» | ||
ab6tract | oops | ||
" not ok 3 - ARRAY -- got: $[1.23e0, 4.56e0, 7.89e0]expected: $[1.23, 4.56, 7.89]" | |||
now, try to craft a case where those two don't pass ok | |||
masak: and if I call .Str.Num on those Nums it will pass the smartmatch | 12:08 | ||
masak | m: say [1.23e0, 4.56e0, 7.89e0] ~~ [1.23, 4.56, 7.89] | 12:09 | |
camelia | rakudo-moar 4b934d: OUTPUT«True» | ||
masak | dunno what you're doing, but it works here | ||
ab6tract | that's my point, masak. i am running into an error case | ||
you cannot get those to fail smartmatch | |||
masak | are you sure your test is using smartmatching? | ||
ab6tract | yes | ||
masak | wait, you want them to *fail* smartmatching? | ||
m: say 1.23e0 ~~ 1.23 | 12:10 | ||
camelia | rakudo-moar 4b934d: OUTPUT«True» | ||
ab6tract | no, i want them to pass. and they pass when inputting manually | ||
they only fail in the code that i am testing | |||
but even the got and expected values will pass smartmatch when put in manually | |||
and the code i am testing will pass smartmatch if i do $a_of_nums.perl.EVAL ~~ $b | 12:11 | ||
masak | what's the name of the assertion sub you're calling? | ||
ab6tract | but not if i do $a_of_nums ~~ $b | ||
'ok' | |||
masak | aha, and the expression you pass contains a smartmatch? | ||
ab6tract | yup | 12:12 | |
masak | how have the Nums been produced? | ||
ab6tract | from a C routine: github.com/ab5tract/Sereal/blob/pe...code.c#L86 | ||
masak | the plotchki thickens | ||
ab6tract | here is the nativecall definition: github.com/ab5tract/Sereal/blob/pe...ve.pm6#L21 | 12:13 | |
and here is the line of code that pulls a double from the buf | |||
github.com/ab5tract/Sereal/blob/pe...er.pm6#L39 | |||
masak | ok, I now urge you to golf this | ||
like, down to something ridiculously small, like three lines of code | |||
ab6tract | really not sure how to golf something that needs an object file | ||
masak | you'll think of something, I'm sure :D | 12:14 | |
ab6tract | doing it just with NativeCall doesn't trigger the same issue | ||
masak | right now there is too much code not contributing to the bug | ||
12:15
telex left
|
|||
ab6tract | right, but the smallest possible test case still requires a C compilation phase | 12:16 | |
i'll see what i can do | |||
12:16
telex joined
|
|||
masak | ++ab6tract | 12:16 | |
sometimes during especially intense golfing sessions, the C compilation phase (or equivalent) goes away | 12:17 | ||
ab6tract | m: use nqp; use NativeCall; sub fabs(num32 $) is native returns num32 {*}; say nqp::what( fabs(1e1) ); say [ fabs(1e1) ] ~~ [ 10.0 ] | 12:20 | |
camelia | rakudo-moar 4ee104: OUTPUT«(Num)True» | ||
ab6tract | m: use nqp; use NativeCall; sub fabs(num32 $) is native returns num64 {*}; say nqp::what( fabs(1e1) ); say [ fabs(1e1) ] ~~ [ 10.0 ] | 12:21 | |
camelia | rakudo-moar 4ee104: OUTPUT«(Num)False» | ||
ab6tract | m: use nqp; use NativeCall; sub fabs(num64 $) is native returns num64 {*}; say nqp::what( fabs(1e1) ); say [ fabs(1e1) ] ~~ [ 10.0 ] | ||
camelia | rakudo-moar 4ee104: OUTPUT«(Num)True» | ||
ab6tract | whoa | ||
should i expect the second one to work? | |||
12:23
mcmillhj joined,
bob777 joined
12:25
perlpilot joined
|
|||
ab6tract | answer: no, because num32 <> num64 and thus it gets mangled on way through the fabs routine | 12:25 | |
12:28
mcmillhj left
12:30
naser joined
|
|||
naser | hello | 12:31 | |
what are some good books on perl6, i found some on amazon but they are 10+ years old.. | |||
tadzik | there aren't any | 12:32 | |
12:32
kalkin-_ is now known as kalkin-
|
|||
tadzik | whatever's in perl6.org/documentation/ is your best bet at learning it :) | 12:32 | |
kalkin- | Is it true that TT is working on a Perl6 book? | ||
naser | I am feeling confused about this language, looks like an old yet new language, no books except few old ones.. | 12:33 | |
perlpilot | naser: if the books you have found on amazon are "Perl 6 and Parrot Essentials" and "Perl 6 Now", the first is no longer relevant and the second is more of a Perl 5 book :) | ||
kalkin- | naser: What helped me a lot is reading learnXinYminutes and the docs. Anything beyond that, wouldn't be in a Beginners Book anyway. | 12:34 | |
This channels is also very helpful and filled with kind people | 12:35 | ||
What I personally missing the most a Good Practice guide, to learn what is the Perl6 way to do this or that, but there can be a Good Practices guide, because now one really knows how Good Practices should be. | 12:36 | ||
12:36
wamba joined
12:37
cdg left,
cdg joined
12:38
mcmillhj joined
|
|||
naser | i wish i could find something i can view offline on an e-reader.. | 12:38 | |
probably i could scrap the content of perl6 site and turn it into an epub document... | |||
jeek | www.facebook.com/DaTweekaz/videos/...034206794/ | 12:39 | |
asciidoc converts to epub pretty easily | |||
kalkin- | pod2mobi would be nice, to read the docs on the kindle | 12:40 | |
I like the way you can read The Art of Unix Programming or Ruby on Rails docs on a Kindle. It is very comfortable | 12:41 | ||
12:41
naser left
12:42
mcmillhj left
12:46
cdg left
12:48
prammer joined
12:49
AndyBotwin left,
awwaiid joined
|
|||
apejens | kalkin-: it looks like metacpan.org/pod/EBook::MOBI kan do pod -> mobi? It has a plugin for it, and a small example, but might need to write the actual script `pod2mobi` | 12:50 | |
kalkin- | apejens: My impression was that Pod5 and 6 differ, am I wrong? | 12:51 | |
apejens | ahh, lol, I didn't see I was in #perl6, sorry! | ||
kalkin-: but perhaps a pod6 input plugin wouldn't be too hard to write | 12:52 | ||
kalkin- | apejens: i will look in to it, when i have time. Thanks for the hint | ||
12:58
bjz left
13:02
bjz joined
13:04
mcmillhj joined
13:05
mcmillhj left,
mcmillhj joined
13:18
mcmillhj left
13:19
skids joined
13:20
Sgeo left,
dvinciguerra joined
13:22
prammer left
|
|||
[Coke] | .tell pmurias I'm ok with using a cutting edge JS. There are compilers to get us to an older version if needed, no? (I think getting something working all the way through the stack is more important at this point, so if the newer JS makes your job easier...) | 13:25 | |
yoleaux | [Coke]: I'll pass your message to pmurias. | ||
13:30
mcmillhj joined
13:34
Actualeyes joined
13:35
mcmillhj left
13:43
bob777 left
13:44
bob777 joined
13:49
mcmillhj joined
13:54
kalkin-_ joined,
kalkin- left,
mcmillhj left
13:55
abraxxa left
13:59
mcmillhj joined
14:02
jonas2 left
|
|||
avar | Is Inline::Perl6 unmaintained? Trying to compile it on Rakudo star 2016.07 yields an error about a missing 'frames' struct member. | 14:03 | |
Looking at moarvm.git jnthn removed that back in march in 824748d | |||
14:03
mithaldu_ left
14:04
DrParis left
|
|||
[Coke] | buggable, source? | 14:04 | |
avar;it's not tested as part of the rakudo release process. | 14:05 | ||
14:05
chansen_ joined
|
|||
avar | Which is apparently an internal API now, so my attempt to patch this to use the new API failed: metacpan.org/source/NINE/Inline-Pe...rl6.xs#L91 | 14:05 | |
14:06
olinkl joined
|
|||
avar | Right, but it's also looking like I'm the only one who's tried to install this on a star release in ~6 months :){ | 14:06 | |
ab6tract | :S | 14:07 | |
14:07
tadzik left
|
|||
ugexe | ahem i think you mean 4 months and 28 days | 14:08 | |
avar | Anyway, a monkeypatch of getting rid of everytihng after ? seems to "work": metacpan.org/source/NINE/Inline-Pe...rl6.xs#L91 | ||
14:09
Lucas_One joined
14:11
bob778 joined
14:12
bob777 left,
bob778 is now known as bob777,
tadzik joined
14:14
mindos joined
14:15
mithaldu_ joined
14:16
peteretep joined,
pnu_ joined,
DrParis joined,
clkao joined,
zacts joined
14:17
jkramer left,
zostay joined,
jnap_ joined
14:18
Spot__ joined,
ggherdov joined,
PotatoGim joined
14:19
BuildTheRobots joined
|
|||
avar | nine: *ping* | 14:20 | |
[Coke] | avar; can you open an issue for this here: github.com/niner/Inline-Perl6 so nine sees it? | ||
heh. didn't see your ping yet. :) | |||
avar | will open an issue anyway.. | ||
14:21
Zoffix joined
|
|||
avar | github.com/niner/Inline-Perl6/issues/1 :) | 14:22 | |
14:23
ggherdov left
|
|||
[Coke] | avar++ | 14:23 | |
nine: might want to update links in the p5 distro of I:6 so that it points back to github. | 14:24 | ||
(metacpan wants me to open a ticket in cpan's RT. | 14:25 | ||
14:25
ggherdov joined
|
|||
avar | [Coke], nine : I also opened this issue asking "why the multiplicity?" github.com/niner/Inline-Perl6/issues/2 | 14:29 | |
14:29
kid51 joined,
prammer joined
|
|||
kid51 | First time I've ever seen Perl 6 in a job posting: jobs.perl.org/job/20342 | 14:30 | |
[Coke] | kid51: woohoo | ||
kid51: I'm actually using Perl 6 in a project at work myself, very happy. | 14:31 | ||
ugexe | wanted: senior perl6 web developer | ||
TimToady | maybe someone just fatfingered it :) | 14:33 | |
moritz | do I qualify if I'm a senior web developer, and a senior Perl 6 developer? :-) | ||
[Coke] | TimToady: killjoy. :P | 14:34 | |
14:36
chansen_ left
|
|||
stmuk_ | it says PHP 7 as well .. just looks like a BS jobpost mangled by an agent or manager | 14:36 | |
14:37
cog_ left,
chansen_ joined
14:38
hwcomcn joined
14:39
prammer left,
hwcomcn left,
hwcomcn joined
14:41
hwcomcn left
14:42
hwcomcn joined,
AndyBotwin joined
|
|||
nine | avar: thanks for the reports! I'm a bit ill right now but will have a look once I feel better. Inline::Perl6 hasn't seen much action as you may actually be the very first user ;) | 14:45 | |
14:45
finanalyst joined
14:46
finanalyst left,
zacts left
14:48
finanalyst joined,
finanalyst left,
holyghost joined
14:49
grondilu joined
14:52
cyphase left,
hwcomcn_ joined
|
|||
avar | nine: Yeah no rush at all, I'm just playing with this stuff for a hobby project | 14:53 | |
14:53
Zoffix left
14:55
hwcomcn left
14:57
sena_kun joined,
cyphase joined
14:58
Actualeyes left
|
|||
ab6tract | well, some of us colleagues of avar have evil-er plans in mind ;) | 15:04 | |
but it isn't a rush in our case, either | 15:05 | ||
15:05
AndyBotwin left
15:09
pmurias joined
|
|||
pmurias | maybe that job post is a bait and switch trap, they will promise you Perl 6 and make you write PHP? ;) | 15:10 | |
yoleaux | 02:12Z <konobi> pmurias: well, es6 has support on all modern browsers... though a few still have aspects that aren't implementent yet. Thankfully we can use babel to transpile from pure es6 to es5, or combo of es5/es6 for different browsers support (or use polyfills) | ||
02:13Z <konobi> pmurias: yup... it had all been working up until a small change around code-ref/core/sixmodel =0( | |||
02:30Z <konobi> pmurias: i have a feeling it might be due to a missunderstanding somewhere of how the 'this' keyword works | |||
13:25Z <[Coke]> pmurias: I'm ok with using a cutting edge JS. There are compilers to get us to an older version if needed, no? (I think getting something working all the way through the stack is more important at this point, so if the newer JS makes your job easier...) | |||
15:12
Actualeyes joined
15:13
ab6tract left
15:14
acrussell joined
|
|||
pmurias | .tell konobi arrow function having different this semantics was one of the problems | 15:15 | |
yoleaux | pmurias: I'll pass your message to konobi. | ||
15:16
cdg joined,
khw joined
|
|||
dalek | c: 245236e | (Tom Browder)++ | doc/Language/tables.pod6: correct example table |
15:21 | |
c: 7632895 | (Tom Browder)++ | doc/Language/tables.pod6: correct spelling |
15:22 | ||
15:25
tbrowder joined
15:26
cibs left,
cibs joined
15:28
geraud left,
TEttinger left
15:29
TEttinger joined
15:31
AndyBotwin joined
15:33
captain-adequate left,
AndyBotwin left
15:36
andrewb joined
15:37
andrewb is now known as Guest76415
15:38
captain-adequate joined
|
|||
tbrowder | don't see pragma when searching docsl zoffix's last blog post is great but first time i've seen "use monkey-guts" mentioned to enable nqp in p6 | 15:43 | |
15:44
zakharyas left
|
|||
tailgate | say I have an array @r = <(a b) (c d) (e f)>. Can I name the tuple values in a lambda, like @r.map({->($x, $y) $x ~ $y})? | 15:45 | |
jnthn | Yes, pretty much like you did it, just need the block around the lambda body | 15:47 | |
Also, <(a b) (c d) (e f)> looks a bit confused :) | |||
tailgate | jnthn: lol I just figured that out | ||
thnaks | 15:48 | ||
jnthn | m: my @r = <a b>, <c d>, <e f>; say @r.map(-> [$x, $y] { $x ~ $y }) | ||
camelia | rakudo-moar 4ee104: OUTPUT«(ab cd ef)» | ||
15:48
Matthew[m] left,
M-Illandan left
|
|||
tbrowder | ref rakudo dev: i've installed panda now system-wide (using its bootstrap instructions) along with rakudo head; however, panda can't find the source of p6 modules. do i have to download my own p6 module repo so "panda install" will work? | 15:48 | |
15:49
tadzik left
15:56
perlpilot left
15:59
gtodd1 joined
|
|||
gtodd1 | any heavy git users have an opinion on the best/simplest/safest way to maintain source control for an application developing and using/working with at the same time? | 16:02 | |
16:02
gtodd1 is now known as gtodd
|
|||
[Coke] | tbrowder: what are you doing that can't find the source of p6 modules? | 16:02 | |
also, are you behind a firewall? | |||
gtodd | by that I mean say I'm writing a module and using it in an app ... eventually I will have a repo for my application based on Module.p6m and a repo for Module.p6m | 16:03 | |
16:03
rindolf left
|
|||
[Coke] | I would just start out with repos for both things | 16:04 | |
gtodd | I was thinking of instead of pushing an pulling a ton up and down from bitbucket or github I could just have a branch "myapp" I switch into to add my own configuration etc. and then the main branch for the module itself ... | 16:05 | |
I guess if I'm going to go that way eventually I might as well do it now | |||
and have two repos | |||
jnthn | Provided the module is in a folder and isolated, it's possible to extract its history separately using git filter-branch later | 16:06 | |
If you go the two repo route from the start, git subtree may help make it less annoying | 16:07 | ||
gtodd | ok ... I thought I could have a branch specific remote so when I pushed it would be automagically pushing the right stuff to the right place | ||
it just doesn't seem big enough yet | |||
jnthn | Remtoes are always branch specific anyway :) | ||
Well, uh | |||
gtodd | Oh good :) ... | 16:08 | |
jnthn | Branches each have their own remote branch, and those might have different remotes | ||
pmurias | [Coke]: it should be possible to compile the runtime parts using the new javascript into the old version | ||
jnthn | I'd probably use subtree or something though... | ||
Or just fix it later with filter-branch | |||
dalek | c: f39e6d4 | Altai-man++ | doc/Type/A (3 files): Now examples from pages of Any/Array/Attribute are compilable. See github.com/perl6/doc/issues/776 |
16:09 | |
16:10
rindolf joined,
bob778 joined
|
|||
gtodd | jnthn: OK thanks the other bit of the puzzle is I have a number of toy apps (in perl6 perl5 Catalyst etc.) that are set up specifically to deploy or run on heroku or aws and where I want to abstract out the the non-specifc to me bits in order to have a public branch I can push to git-hub say | 16:11 | |
16:11
bob777 left,
bob778 is now known as bob777
|
|||
gtodd | jnthn: filter-branch seems interesting | 16:11 | |
I think I will do one that way and one with 2 repos and see which is more "natural" | 16:12 | ||
for each application :) | |||
jnthn | :) | ||
dalek | c: 4258331 | (Wenzel P. P. Peppmeyer)++ | util/extract-examples.p6: extract example based on .modified unless --force |
16:14 | |
16:21
hwcomcn_ left
16:22
AndyBotwin joined
16:24
BrassLantern joined
16:26
freeside joined
16:29
dakkar left
|
|||
jdv79 | unmatched}: your blogging pace is impressive | 16:31 | |
16:32
perlpilot joined
|
|||
moritz | not just pace, also quality | 16:34 | |
jdv79 | i already commended him on that point months ago:) | 16:35 | |
but yes, of course | |||
and very much an inspiration to try to do more | 16:36 | ||
16:40
dvinciguerra left
16:46
labster joined
16:52
Juerd joined
16:56
dvinciguerra joined
16:58
tadzik joined,
setty1 joined
17:01
AlexDaniel joined
17:02
itaipu joined
|
|||
tbrowder | [Coke}: I am no longer using rakudobrew. I am using the head of rakudo (git clone) and installing it in a system-wide location (with suitable path in my .bash_aliases). I installed panda from a git clone using its bootstrap and it also is installed system-wide using its default path (which I also have in my bash_aliases). Yhus panda and perl6 (and nqp, | 17:05 | |
etc.) are available from any dir. The problem is panda can't find modules when I command installation, so I need help to fix my dev environment so all play nicely together. | |||
s/Yhus/Thus | |||
17:06
pmurias left
|
|||
tbrowder | [Coke]: see finger fumble above | 17:06 | |
[Code]: no firewall | 17:07 | ||
17:08
firstdayonthejob joined
17:09
roguelazer joined
17:13
FROGGS joined
17:18
Guest76415 left
17:22
dha joined
17:23
M-Illandan joined,
Matthew[m] joined
17:25
spider-mario left
17:29
bob777 left
17:33
sno left
|
|||
dalek | c: 5ae4076 | (Wenzel P. P. Peppmeyer)++ | doc/Language/operators.pod6: make operators.pod6 compile |
17:44 | |
17:50
acrussell left
|
|||
[Coke] | tbrowder: I still don't understand what you mean. | 17:51 | |
can't find a module to -install-? or cannot find a module to use? | |||
and rakudobrew or not, if you installed panda with the perl6 you already isntalled, you should be ok. | |||
if it's somehow tied to the old rakudobrew you mentioned, I wouldn | 17:52 | ||
t expecet that to work | |||
17:58
cyphase left
18:02
itaipu left,
cyphase joined
18:12
Tonik joined
18:14
dogbert17 joined,
cognominal joined
18:19
firstdayonthejob left
18:27
CIAvash left
18:29
birdrock joined
18:48
TEttinger left,
sena_kun left
18:50
firstdayonthejob joined
18:51
TEttinger joined,
Tonik left
|
|||
konobi | moo | 18:56 | |
yoleaux | 15:15Z <pmurias> konobi: arrow function having different this semantics was one of the problems | ||
19:01
spider-mario joined
19:03
TEttinger left
19:05
cyphase left,
TEttinger joined
19:06
itaipu joined
|
|||
dogbert17 | o/ #perl6 | 19:08 | |
huggable buggable | 19:09 | ||
huggable: buggable | |||
19:10
darutoko left,
cyphase joined
|
|||
dogbert17 | have written up some docs for Pair.invert. Comments welcome : gist.github.com/dogbert17/211c3769...a826ecc16c | 19:11 | |
19:13
sno joined
|
|||
perlpilot | dogbert17: what about an example with ('Perl' => %hash).invert ? | 19:15 | |
or even ('Perl' => { foo => "bar", baz => "blat" }).invert # I'm not sure your description is quite right either. I think it's not about Positional, but rather Iterable | 19:18 | ||
dogbert17 | perlpilot: that might force me to make some changes :) | 19:19 | |
perlpilot: I believe that you're right, back to the drawing board then | 19:20 | ||
m: say ('Perl' => (1..5)).invert | 19:21 | ||
camelia | rakudo-moar 5c5ef1: OUTPUT«(1 => Perl 2 => Perl 3 => Perl 4 => Perl 5 => Perl)» | ||
dogbert17 | yeah, the positional rubbish must go | 19:22 | |
19:23
hankache joined
|
|||
hankache | good evening #perl6 | 19:24 | |
19:25
wamba left
|
|||
perlpilot | hello hankache | 19:25 | |
hankache | hi perlpilot | ||
19:26
bdmatatu joined,
wamba joined
|
|||
lizmat starts working on the P6W | 19:30 | ||
hankache | lizmat++ | ||
masak | ++lizmat | 19:32 | |
hankache | [+] (lizmat) | 19:33 | |
lizmat feels identified | |||
AlexDaniel | m: say [+] ‘lizmat’ | 19:34 | |
camelia | rakudo-moar 5c5ef1: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5lizmat' (indicated by ⏏) in block <unit> at <tmp> line 1Actually thrown at: in block <unit> at <tmp> line 1» | ||
AlexDaniel | m: say [-] ‘lizmat’ | ||
camelia | rakudo-moar 5c5ef1: OUTPUT«lizmat» | ||
hankache | how come? ^^^ | 19:35 | |
AlexDaniel | hankache: #128757 #128758 | 19:36 | |
synopsebot6 | Link: rt.perl.org/rt3//Public/Bug/Displa...?id=128757 | ||
Link: rt.perl.org/rt3//Public/Bug/Displa...?id=128758 | |||
bdmatatu | Hi all, is it possible to inherit from Date but override the formatter? | ||
TEttinger | lizmat is a number in radix 36 or higher | 19:37 | |
19:38
FROGGS left
|
|||
jdv79 | is react a "supply" block? | 19:38 | |
AlexDaniel | m: say :36<lizmat> | ||
camelia | rakudo-moar 5c5ef1: OUTPUT«1301684645» | ||
zostay | jdv79: yes, it just doesn't return a Supply | ||
gfldex | bdmatatu: see github.com/rakudo/rakudo/blob/nom/...ate.pm#L24 | 19:39 | |
timotimo | yup, it immediately noms all the values that you'd normally get from the supply block | ||
AlexDaniel | m: say :35<lizmat> | ||
camelia | rakudo-moar 5c5ef1: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Couldn't process entire number: 2/6 int chars, 2/-1 fractional charsat <tmp>:1------> 3say :35<lizmat>7⏏5<EOL>» | ||
AlexDaniel | ↑ what? | ||
2/-1 fractional chars? What is it all about? | |||
lizmat | AlexDaniel: perhaps because that excludes "z" Or do you mean the LTAness ? | 19:40 | |
dogbert17 | perlpilot: have updated the gist, i.e. gist.github.com/dogbert17/211c3769...a826ecc16c (feels like I have entered deep waters ...) | ||
AlexDaniel | lizmat: LTAness | ||
TEttinger | yeah, radix 35 would be 0-9a-y, but agreed on the unusual error | ||
AlexDaniel | I feel like I already rakudobugged this… | ||
TEttinger | it does say the general point though, that it can't process the number | ||
bdmatatu | Thanks gfldex, looks like inheriting from that is a bit tricky | 19:41 | |
19:41
kaare__ left
|
|||
gfldex | bdmatatu: all you need to do is provide your own .new | 19:41 | |
lizmat | bdmatatu: looks to me that you don't need to inherit from Date, but just specify a :formatter parameter ? | ||
AlexDaniel | hmm maybe not | 19:42 | |
bdmatatu | I was going to use the same formatter in a few places, so thought a class would be better. | ||
perlpilot | dogbert17++ Looks good to me. I don't have any other commentary. :) | ||
tx0h | hi | ||
dogbert17 | perlpilot: :) thx | ||
lizmat | class MyDate is Date { method new(|c) { self.Date.new(|c, :formatter( { ... } ) } } | 19:43 | |
self.Date::new | |||
19:44
sena_kun joined
|
|||
tx0h | i'm not sure if i have overseen something, but is there no way in bailador to use a scalar as a Template::Mojo ? | 19:44 | |
jdv79 | are supply and react doc'd? | ||
search seems to fail me | |||
dalek | c: 522a231 | (Jan-Olof Hendig)++ | doc/Type/Pair.pod6: Added docs for Pair.invert. perlpilot++ |
19:46 | |
bdmatatu | lizmat: thanks, works great! | 19:47 | |
dalek | c: 5f18bbf | (Wenzel P. P. Peppmeyer)++ | doc/Language/operators.pod6: better example |
||
c: ca3eef2 | (Wenzel P. P. Peppmeyer)++ | Makefile: add make examples-clean |
|||
19:49
AndyBotwin left
|
|||
dalek | c: 71caed5 | (Wenzel P. P. Peppmeyer)++ | doc/Language/concurrency.pod6: add whenever and react to index |
19:50 | |
gfldex | jdv79: ^^^ | ||
jdv79 | thanks | 19:51 | |
19:51
AndyBotwin joined
|
|||
pochi | m: my $a; $a = $a+1 | 19:52 | |
camelia | rakudo-moar 5c5ef1: OUTPUT«Use of uninitialized value of type Any in numeric context in block <unit> at <tmp> line 1» | ||
pochi | perl5 tells me which variable it thinks is uninitialized: "Use of uninitialized value $a in addition (+) at -e line 1." | 19:53 | |
hoelzro | perl 6 does, sometimes | ||
pochi | would that be possible in perl6 as well? | ||
hoelzro | m: my $a; say "$a" | ||
camelia | rakudo-moar 5c5ef1: OUTPUT«Use of uninitialized value $a of type Any in string contextAny of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in block <unit> at <tmp> line 1» | ||
hoelzro | it is possible, we just need to find the right code to change =) | 19:54 | |
pochi | :-) | ||
19:59
travis-ci joined
|
|||
travis-ci | Doc build errored. Wenzel P. P. Peppmeyer 'add whenever and react to index' | 19:59 | |
travis-ci.org/perl6/doc/builds/148988171 github.com/perl6/doc/compare/ca3ee...caed56380e | |||
19:59
travis-ci left
20:00
ufobat left,
rindolf left
|
|||
dogbert17 | is "string".comb the fastest way to split a string into a list of characters or might there be an alternative hiding in the docs somewhere? | 20:02 | |
20:03
cyphase left
|
|||
hoelzro | huh, turns out that's super easy to add (the uninitialized value variable name thing) | 20:03 | |
pochi: want to make a contribution to Perl 6? =) | |||
pochi | I was looking in Mu.pm :-) | ||
20:04
labster left
|
|||
hoelzro | that's the place to look! | 20:04 | |
pochi | compiling ... | ||
hoelzro | want more hints, or would you prefer to figure it out on your own? | ||
pochi | I just tried to copy-paste the code from the string case | 20:05 | |
20:05
bdmatatu left
|
|||
sena_kun | I don't see anywhere in the docs(grep too) usage of "=begin output". Why nobody used it over years? It seems to be a valid pod code. | 20:05 | |
hoelzro | pochi: did it work? | ||
sena_kun: that's the POD code for "example output of a chunk of code", right? | 20:06 | ||
sena_kun | hoelzro, sure. | ||
pochi | hoelzro: still compiling | ||
hoelzro | sena_kun: yeah, it seems like it would be very useful | ||
gfldex | sena_kun: did you check if the renderers support it too? | ||
sena_kun | gfldex, nope. That's why I'm asking. (: | 20:07 | |
20:07
cyphase joined
|
|||
gfldex | sena_kun: i believe they don't. It wouldn't be hard to change that tho. | 20:07 | |
20:07
setty1 left
|
|||
sena_kun | Let's try it locally... | 20:07 | |
gfldex, it's just we often use `code` block to show output. The easy solution is to just do a `:skip-test` and to worry, but I'm interested. | 20:09 | ||
20:10
pmurias joined
|
|||
pmurias | hi | 20:10 | |
sena_kun | s/to/don't | ||
Ah. | |||
pochi | hoelzro: no go :-( Seems $name just is the empty string | 20:12 | |
20:15
birdrock left,
rindolf joined
|
|||
hoelzro | pochi: could you show me the diff of the change you made? | 20:18 | |
AlexDaniel | m: sub hello { say 42 }; say &hello | 20:20 | |
camelia | rakudo-moar 5c5ef1: OUTPUT«sub hello () { #`(Sub|54567296) ... }» | ||
AlexDaniel | how can I do the same thing with a method? | ||
and is it even possible? | 20:21 | ||
m: class Foo { method hello { say 42 } }; my $x = Foo.new; say $x.&hello | |||
camelia | rakudo-moar 5c5ef1: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Undeclared routine: hello used at line 1. Did you mean 'shell'?» | ||
gfldex | AlexDaniel: you have to use the MOP | ||
jnthn | Foo.^lookup('hello') | 20:22 | |
AlexDaniel | m: class Foo { method hello { say 42 } }; my $x = Foo.new; $x.^lookup(‘hello’)($x) | 20:23 | |
camelia | rakudo-moar 5c5ef1: OUTPUT«42» | ||
AlexDaniel | so does not work as nicely on an instance | 20:24 | |
pochi | hoelzro: pastee.org/3ncbm | ||
jnthn | "does not work as nicely"? | ||
Works just the same | |||
20:24
setty1 joined
|
|||
AlexDaniel | jnthn: well, I have to pass the object itself if I want to call it | 20:25 | |
tbrowder | [Coke]: Sorry, when I first installed panda I tried to install a module (don't remember which) and panda couldn't find it. I just tried "panda install Linenoise" and it recognized it being installed. Sorry for the wasted bandwidth--looks like a non-problem now. | ||
jnthn | Sure, methods need an object to work on. | ||
AlexDaniel | jnthn: sure, I just hoped that it will be done for me | ||
jnthn | Ah. That's now how Perl 6 OO works :) | 20:26 | |
And if you do want that, closures are really compact in Perl 6. | |||
hoelzro | pochi: that's weird - a similiar patch worked for me | ||
AlexDaniel | yeah | ||
jnthn | {$x.hello} is quite a bit shorter than $x.^lookup('hello') :) | ||
pochi | hoelzro: You are right, it works on the 'my $a ...' example :-) | 20:27 | |
gfldex | jnthn: .assuming is defined for Routine, that includes Method, but there is no easy way to call that method. | ||
zostay | tx0h, i'm not sure i understand the question, the call to template() in bailador takes a string (scalar) containing the template, doesn't it? | ||
AlexDaniel | jnthn: except that .hello is a multimethod in my case, and it seems like it will be a bit longer to preserve that | ||
pochi | hoelzro: but not on my actual usecase :-) | ||
jnthn | m: say '-> |c { $x.foo(|c) }'.chars | 20:29 | |
camelia | rakudo-moar 5c5ef1: OUTPUT«20» | ||
pochi | m: class Foo { has Numeric $.a; method foo() { $.a = $.a + 1 } }; Foo.new.foo | ||
camelia | rakudo-moar 5c5ef1: OUTPUT«Use of uninitialized value of type Numeric in numeric context in method foo at <tmp> line 1Cannot modify an immutable Numeric in method foo at <tmp> line 1 in block <unit> at <tmp> line 1» | ||
jnthn | m: say '$x.^lookup("foo")'.chars | ||
camelia | rakudo-moar 5c5ef1: OUTPUT«17» | ||
jnthn | Only just and I was generous with whitespace :) | ||
sena_kun | It seems current renderers treat `output` as plain paragraph. | 20:30 | |
20:30
freeside left
|
|||
pochi | hoelzro: seems the warning about uninitialized variables can't handle attributes, because the string example doesn't work if it's a string attribute | 20:32 | |
hoelzro | pochi: ahhh...what's your exact usecase? | ||
AlexDaniel | jnthn: okay, that might work | ||
jnthn: thanks | |||
pochi | hoelzro: see a couple of lines above, I asked camelia :-) | ||
20:34
espadrine joined
|
|||
hoelzro | ahhh, that makes sense | 20:35 | |
hmm | |||
I really want to make that work now. | |||
20:35
berov joined
20:37
berov left
20:38
acrussell joined
|
|||
tx0h | zostay: no, it's just a path. that means that every time you request a page the file must get opened, read and closed. | 20:45 | |
20:47
espadrine left
20:49
tbrowder left
|
|||
zostay | ah, i see, i misread the code... skipped the template method in Bailador::App | 20:52 | |
app.renderer.render('text', ...) ought to do what you want | |||
20:53
gnull joined,
acrussell left
|
|||
tx0h | oh, i didn't saw that? let me try. ty. | 20:54 | |
zostay | np, i haven't used bailador in a while myself, i just read the code on github, but something like what i wrote is possible | 20:56 | |
20:59
gnull left
|
|||
tx0h nods | 20:59 | ||
21:00
skids left
|
|||
tx0h | it works, 2nd argument (3rd) must be an array with the vars for the template | 21:00 | |
21:01
geraud joined
|
|||
jdv79 | was there any word on using private class attrs from a role? | 21:05 | |
21:07
trnh joined,
trnh left,
trnh joined
21:09
mcmillhj left,
hankache left
|
|||
jdv79 | at present, and from memory, it seems there is no solution | 21:09 | |
21:10
hankache joined
|
|||
lizmat | and another Perl 6 Weekly hits the Net: p6weekly.wordpress.com/2016/08/01/...of-an-era/ | 21:11 | |
dalek | c: 5bb9af9 | Altai-man++ | doc/Type/ (2 files): AttributeContainer and Proc/Async now compile |
21:12 | |
21:13
xinming_ left,
kalkin-_ is now known as kalkin-
21:14
xinming joined
21:27
labster joined,
wamba left
21:29
cpage_ left
21:30
rindolf left
21:34
travis-ci joined
|
|||
travis-ci | Doc build passed. Altai-man 'AttributeContainer and Proc/Async now compile' | 21:34 | |
travis-ci.org/perl6/doc/builds/149013626 github.com/perl6/doc/compare/71cae...b9af92f822 | |||
21:34
travis-ci left
21:41
itaipu left
21:43
hankache left
|
|||
jdv79 | m: my @a = 1,2,3;my $h = {k => {k2 => @a}}; for $h.values>><k2>.list {.say} | 21:46 | |
camelia | rakudo-moar 67b654: OUTPUT«[1 2 3]» | ||
jdv79 | shouldn't that list flatten out there? | ||
21:48
trnh left
21:49
jargan joined
22:00
cpage_ joined
22:01
unmatched} left
22:11
zacts joined
|
|||
gfldex | sena_kun: i tried to implement =begin output and found that the parser eats indentation and newlines | 22:11 | |
22:12
dvinciguerra left
22:13
olinkl left
22:15
zacts left
22:16
olinkl joined
|
|||
sena_kun | gfldex, you investigated Pod::To::HTML? | 22:16 | |
gfldex | sena_kun: i'm using Pod::To::BigPage, easier to change because it's basicly just a flat list of multies | 22:17 | |
22:18
Sgeo joined
|
|||
gfldex | sena_kun: gist.github.com/gfldex/5f99bea644d...42e0d5c028 | 22:20 | |
sena_kun | gfldex, I see. Maybe I should to magically know it, but still. It looks like every Pod::To-like module has it's own way to parse Pod content, am I wrong? Or parsing already built-in into compiler as a part of language? | 22:25 | |
22:25
Rawriful joined
|
|||
sena_kun | Ah, I'm wrong, actually. | 22:26 | |
gfldex | sena_kun: rakudo does all the parsing of the actual .pod6 file. It outputs the data structure in the gist. There are a few shortcomings that different renderers deal with in different ways. | 22:27 | |
sena_kun | gfldex, ah, now I understand it. Thanks. Let's see... | 22:28 | |
22:28
setty1 left
22:29
WhopperSwan007 joined
|
|||
gfldex | sena_kun: how nodes are rendered depends on their parent nodes, at times generations deep. util/extract-examples.p6 is a simple example how to deal with that. | 22:29 | |
22:30
frobisher joined,
dha left
|
|||
gfldex | i tried to build a round-tripping Pod::To::Perl6 for easy testing both of a renderer and the pod6 part of the grammer and got stuck. | 22:30 | |
22:31
frobisher is now known as dha
|
|||
sena_kun | gfldex, I'm looking at Grammar.nqp now and it seems we have to extend it a little bit if we want it to treat `=begin output` in a special way. | 22:32 | |
Since internal parser treats `=begin something` as just plain paragraph, where all spaces and newlines are eaten. | 22:33 | ||
gfldex | sena_kun: if you want to dig into it, Pod::Block could do with a parent attribute and if filename/linenumber could be preserved it would make it much easier for renderers to complain about dupe index entries and other problems. | 22:34 | |
22:36
canopus left
|
|||
sena_kun | gfldex, I'm not sure my attempts can give some result, but I'll try to investigate it further. Also, I thought about the examples compilation: we can fix up at least two common-case problems in automatical way using grep. I'll prepare PR a bit leter, I suppose. | 22:39 | |
*later | |||
It'll take me some time to do a proper review of the diff. | 22:40 | ||
22:40
spider-mario left
|
|||
sena_kun | s@grep@grep/sed@ | 22:43 | |
22:44
canopus joined
22:52
mcmillhj joined
22:54
TEttinger left
22:57
firstdayonthejob left
22:59
pmurias left,
TEttinger joined
23:10
Rawriful left
23:12
tadzik left
23:13
Matthew[m] left,
M-Illandan left,
cpage_ left
23:16
cpage_ joined,
cpage_ left
23:21
Legal_Resale left,
cdg left
23:23
cpage_ joined
23:25
LegalResale joined,
cpage_ left,
TEttinger left
23:28
lambd0x joined
|
|||
lambd0x | Hi everyone! | 23:28 | |
jdv79 | europe might be sleeping | ||
plus its monday | 23:29 | ||
sena_kun | lambd0x, 0/ | ||
23:29
Celelibi joined
|
|||
lambd0x | sena_kun: \o | 23:29 | |
23:30
TEttinger joined
|
|||
lambd0x | People, how can I declare a continuous extending bidimensional array in perl 6. | 23:31 | |
dalek | c: 057226c | dmaestro++ | doc/Type/Int.pod6: Clarify description of lsb, msb Description of msb was slightly misleading, as the indexing referred to is always from the right. Clarified both lsb and msb. |
||
c: 8405f0b | (Wenzel P. P. Peppmeyer)++ | doc/Type/Int.pod6: Merge pull request #779 from dmaestro/clarify_Int_msb_description Clarify description of lsb, msb |
|||
c: d0dfc5a | Altai-man++ | html/js/main.js: The TOC animation was removed |
23:32 | ||
c: ce02d33 | (Wenzel P. P. Peppmeyer)++ | html/js/main.js: Merge pull request #783 from perl6/animation-has-gone The TOC animation was removed |
|||
lambd0x | Is there a way to do it? E.g. my @array; is a single-dimensional array that's continuous extending.. | ||
gfldex | m: my @a[*;*] | 23:34 | |
camelia | rakudo-moar e411e5: OUTPUT«Jagged array shapes not yet implemented. Sorry.  in block <unit> at <tmp> line 1» | ||
gfldex | lambd0x: ^^^ | 23:35 | |
m: my @a; @a[1;1] = 10; dd @a; | 23:36 | ||
camelia | rakudo-moar e411e5: OUTPUT«Array @a = [Any, [Any, 10]]» | ||
gfldex | that means you can use multi dim arrays but there is no constraint on the dimensions. If you need that you will have to implement that by hand. | 23:37 | |
m: my @a; @a[1;1] = 10; dd @a.pairs; | |||
camelia | rakudo-moar e411e5: OUTPUT«(0 => Any, 1 => $[Any, 10]).Seq» | ||
gfldex | also, .pairs and a few other methods don't do what they should. | 23:38 | |
m: my @a; @a[1;1] = 10; dd @a.elems; | |||
camelia | rakudo-moar e411e5: OUTPUT«2» | ||
23:44
RabidGravy left
|
|||
lambd0x | gfldex: so this is really a feature that still needs to be implemented.. wow | 23:44 | |
Well, at least I can use a statically defined multidimensional array at will. That might be sufficient for the time being. | 23:45 | ||
gfldex: thanks for answering | 23:46 | ||
23:47
dainis joined
23:48
bjz left
23:56
captain-adequate left
23:57
lambd0x left
|