»ö« 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:01 TreyHarr1 joined
zwu Just read that "operators are lexically scoped by default", so if a module defined operators, must it be exported and imported lexically in order to to them? 00:01
ZoffixLappy Yes 00:03
They're just subs.
Also, not sure what "by default means"... is there a way to overide the default?
zwu If I use a dynamic loading "require ..." how can I import them too? 00:04
or is there a way to use as a call $MyModule::my_subs() for operators defined in a module? 00:05
ugexe there is just so much wrong with this
ZoffixLappy m: class Foo { sub infix:<+> is export { $^a - $^b } }; import Foo; say 2+2;
camelia rakudo-moar 1acf80: OUTPUT«0␤»
ugexe `my $body ... sub test_response(..., $body)`
also a my @body 00:06
ZoffixLappy insteresting. Bailador's debug output gives me "{Content-Type => whatever, X-Foo => meow}", but looking at headers I'm getting text/html content-type even though I'm getting the X-Foo header :/ 00:07
ugexe the comments for encode-psgi-response say body can be an array, str, or buf, but 10ish lines down it has $body ~~ Supply
zwu ZoffixLappy: should sub being multi in "... sub infix:<+> is export ...?"
00:08 spider-mario left
ZoffixLappy zwu, depends on what you want. In the above, I completely shadowed built-in + operator. I couldn't use a multi in this case because a multi for a + between two Ints is already defined, so it'd be ambiguous. But if you were defining a + for some custom objects, then yeah, you'd use a multi 00:09
zwu, if this is of any help (use left/right arrows to navigate slides): tpm2016.zoffix.com/#/14 00:10
zwu ZoffixLappy: great, thanks alot!
00:12 Herby_ left
ugexe failure to set Content-Type would seem to be related to Bailador::App.render() 00:14
i suspect in the first multi that the else conditional is reached, which calls the 2nd multi without passing the $type (which then defaults to text/html) 00:15
ZoffixLappy ugexe++ 00:19
That is exactly it.
00:22 pierre_ joined 00:25 wamba left 00:46 BenGoldberg joined 00:47 sufrostico left
ZoffixLappy .tell ufobat sent you a PR to fix Bailador's content_type() being broken: github.com/ufobat/Bailador/pull/66 00:52
yoleaux ZoffixLappy: I'll pass your message to ufobat.
dalek osystem: 0a12cf0 | (Zoffix Znet)++ | META.list:
Add Bailador::Plugin::Static

Automatically serve static files in your Bailador apps
00:57
ZoffixLappy github.com/zoffixznet/perl6-Bailad...gin-Static
01:00 zwu left 01:06 al2o3-cr left 01:12 molaf left 01:25 molaf joined 01:40 pierre_ left, pierre_ joined 01:52 sortiz joined
sortiz \o #perl6 01:52
ZoffixLappy "method 'trans' not found for invocant of class 'Any' in sub uri-unescape at sources/92D0C475746E4D3627F2FFB218718FDAA2724E51 (URI::Escape) line 30" 01:55
*sigh* will this day ever end
o/ sortiz
sortiz ZoffixLappy, technically the day is over in half of the world, may be you are in the wrong half ;-) 01:56
ZoffixLappy :) 01:57
It's just I've spent the last 13 hours fixing and writing software to get closer to starting the original goal I started to achieve this morning. I keep getting stymied by unimplemented and broken stuff 01:58
02:01 pierre_ left
ZoffixLappy Luckily, the last one seems to be my fault :) 02:03
Best mistakes are ones in your own software, because they're the fastest to fix \o/
02:04 nbrown joined 02:07 bitmap joined 02:13 ugexe joined
grondilu :q 02:20
02:20 grondilu left 02:22 noganex_ joined
ZoffixLappy This is annoying :/ For some reason regular POST request to Bailador app works just fine, but jQuery POST fails (never gets a response) even though doing that same jQ post to httpbin.org/post works fine :( 02:24
Programming is hard :/
sortiz What kind of content-type uses the body of these requests? 02:25
02:25 noganex left
ZoffixLappy text/html.. I guess 02:26
sortiz A POST body almost never is text/html 02:27
ZoffixLappy Ohh. I may know what's up... I need CORS 02:28
sortiz If your client is using more than one origin, yes. 02:31
02:34 rba_ joined
ZoffixLappy No love... This is my code: github.com/zoffixznet/js-glot-io I start app.p6 with perl6 app.p6, so it's listening on :3000. Then I just pop open the HTML file with firefox index.html and when I click the "Run" button, LiveHTTPHeaders plugin tells me I get response 200 and Content-Type: text/html but nothing else at all :/ 02:34
Even though if I disable JS and do the same step, i get a response :/
battery dying... ENOPOWERSOCKETINSIGHT 02:36
sortiz About Bailador, I'm worst than John Snow ;-) 02:37
02:38 Ben_Goldberg joined, BenGoldberg left, Ben_Goldberg is now known as BenGoldberg, colomon left
ZoffixLappy found one lol 02:38
Shitty table tho :/ 02:40
I wonder if my issue is because I'm running my page with firefox index.html instead of it being properly served :/
And SURE IT WAS!!! GRRR.... If I serve my index.html with Bailador the stuff works ~_~ 02:44
Another 100 hours wasted on nonsense and I may end up with a working web app :P \o/ 02:45
02:46 colomon joined 02:48 nbrown left
BenGoldberg Browsers sometimes treat file:// stuff quite strangely... 02:51
02:55 BenGoldberg left 02:56 BenGoldberg joined 03:01 pierre_ joined 03:03 yqt left 03:04 ZoffixLappy left 03:07 pierre_ left 03:08 colomon left 03:10 colomon joined 03:14 colomon left 03:17 kid51 left 03:21 colomon joined 03:48 BenGoldberg left 03:56 maybekoo2 left 04:07 Cabanossi left 04:09 khw left, Cabanossi joined 04:52 skids left 04:56 ufobat joined
ufobat good morning :) 05:09
yoleaux 00:52Z <ZoffixLappy> ufobat: sent you a PR to fix Bailador's content_type() being broken: github.com/ufobat/Bailador/pull/66
ufobat ZoffixWin, its merged :-)
05:25 hotel_california joined 05:26 hotel left 05:38 hotel_california left 05:39 hotel joined 05:46 pierre_ joined 05:51 Ven joined 05:54 Ven left 06:00 CIAvash joined 06:02 wamba joined 06:03 xinming_ joined 06:10 rindolf joined 06:27 rurban joined 06:34 sortiz left 06:39 wamba left 06:41 wamba joined 06:49 geekosaur left 06:52 geekosaur joined 06:54 wamba left 07:12 RabidGravy joined
RabidGravy boom 07:16
07:18 rindolf left 07:22 darutoko joined
ufobat ola! 07:27
RabidGravy eh up 07:31
jeek Is Shlomi Fish sane now? 07:33
RabidGravy that's a leading question 07:34
jeek I recall a time, and probably a conversation in another channel, where it was strongly implied that Mr. Fish was not all there. 07:35
My memory is admittedly not the greatest.
RabidGravy there are lot of people who are rather eccentric around the Perl world, I' 07:38
eh?
... I know the thing about brilliance and madness is somewhat of a cliche but programming (and programming communities) does seem to bring it into relief 07:40
.seen tokuhirom 07:48
yoleaux I saw tokuhirom 30 Oct 2015 02:34Z in #perl6: <tokuhirom> after: split('=', 'YYY=', 2) returns just 'YYY'
RabidGravy :(
could do with him merging a PR against Websocket
ufobat but tokuhirom is quite active on github, isn't he? 07:58
07:59 firstdayonthejob joined
ufobat now i am afraid that my PR on HTTP::Server::Tiny will not get merged into it ;) thank you RabidGravy 07:59
RabidGravy reasonably active 08:01
RabidGravy cleans up a bunch of outdated PRs
08:09 Ven joined 08:14 rindolf joined 08:16 pierre_ left 08:19 rurban left
masak jeek: anything precipitated this question? any relation to Perl 6? :) 08:21
(antenoon, #perl6) 08:22
RabidGravy eh up chief
sjn \o
jeek rindolf signing off, saw his quit message 08:26
08:31 Ven left
rindolf jeek: the Llama thing? 08:32
jeek No. 08:34
08:35 vendethiel left 08:48 wamba joined 08:49 rindolf left 08:54 TreyHarr1 left, TreyHarris joined, ufobat left 08:55 spider-mario joined 08:59 Emeric joined 09:08 vendethiel joined
_nadim Morning 09:09
RabidGravy marnin 09:13
_nadim I am not making sense of grammar actions, I have this nopaste.linux-dev.org/?1097109 where, I thought, I'd extract only what is of interest to me. I get 'arguments' but not the rest. 09:16
09:16 Ven joined, AlexDaniel joined
AlexDaniel m: dd split(‘=’, ‘YYY=’, 2) 09:17
camelia rakudo-moar 1acf80: OUTPUT«("YYY", "").Seq␤»
09:17 rurban joined
AlexDaniel m: dd split(‘=’, ‘YYY=’, NaN) 09:18
camelia rakudo-moar 1acf80: OUTPUT«This type cannot unbox to a native integer␤ in block <unit> at /tmp/8fiYS8YJd5 line 1␤␤»
AlexDaniel m: dd split(‘=’, ‘YYY=’, Inf)
camelia rakudo-moar 1acf80: OUTPUT«("YYY", "")␤»
AlexDaniel so it wants a native integer but not quite
09:20 maybekoo2 joined 09:23 pierre_ joined 09:24 RabidGravy left
AlexDaniel m: say {$^_}(42) # heh 09:32
camelia rakudo-moar 1acf80: OUTPUT«5===SORRY!5=== Error while compiling /tmp/bs2evkclrG␤Redeclaration of symbol $^_ as a placeholder parameter␤at /tmp/bs2evkclrG:1␤------> 3say {$^_7⏏5}(42) # heh␤»
AlexDaniel m: my $_-_-_-_-_ = 42 09:37
camelia ( no output )
09:44 domm_ joined 10:05 pierre_ left
AlexDaniel What's the maximum length for a variable name? 10:07
10:07 rurban left
AlexDaniel 10 million characters seems to be ok, nice 10:10
xfix I don't think there is one, other than your memory limit.
Perl 6 grammar is written in Perl 6 itself, so it's not using some low level language where an user can be worried about overflowing some buffer. 10:11
10:14 domm_ left, domm_ joined
psch m: my $x = (("a" xx 2 ** 63) xx 2 ** 63) xx 2 ** 63; say $x.chars 10:15
camelia rakudo-moar 1acf80: OUTPUT«0␤»
psch hm, precedence?
10:15 pmurias joined
psch m: my $x = (("a" xx (2 ** 63)) xx (2 ** 63)) xx (2 ** 63); say $x.chars 10:15
camelia rakudo-moar 1acf80: OUTPUT«0␤»
psch m: my $x = (("a" xx (2 ** 63)) xx (2 ** 63)); say $x.chars
camelia rakudo-moar 1acf80: OUTPUT«0␤»
psch m: my $x = (("a" xx (2 ** 63)); say $x.chars
camelia rakudo-moar 1acf80: OUTPUT«5===SORRY!5=== Error while compiling /tmp/1YJTTEOOg2␤Cannot use variable $x in declaration to initialize itself␤at /tmp/1YJTTEOOg2:1␤------> 3my $x = (("a" xx (2 ** 63)); say $7⏏5x.chars␤ expecting any of:␤ argument list␤ …»
psch m: my $x = ("a" xx (2 ** 63)); say $x.chars 10:16
camelia rakudo-moar 1acf80: OUTPUT«0␤»
psch m: my $x = ("a" xx (2 ** 31)); say $x.chars
camelia rakudo-moar 1acf80: OUTPUT«Memory allocation failed; could not allocate 17179869184 bytes␤»
psch ah, there
Hotkeys Rip
psch m: my $x = ("a" xx (2 ** 15)); say $x.chars
camelia rakudo-moar 1acf80: OUTPUT«65535␤»
10:16 domm_ left
psch well, that's a limit in xx, not Str i suppose 10:16
m: my $x = "a"; $x ~= $x for ^1000; say $x.chars
camelia rakudo-moar 1acf80: OUTPUT«Memory allocation failed; could not allocate 536870912 bytes␤»
psch m: my $x = "a"; $x ~= $x for ^15; say $x.chars 10:17
camelia rakudo-moar 1acf80: OUTPUT«32768␤»
psch m: my $x = "a"; $x ~= $x for ^32; say $x.chars
camelia rakudo-moar 1acf80: OUTPUT«Memory allocation failed; could not allocate 536870912 bytes␤»
psch m: my $x = "a"; $x ~= $x for ^31; say $x.chars
camelia rakudo-moar 1acf80: OUTPUT«Memory allocation failed; could not allocate 536870912 bytes␤»
AlexDaniel psch: it does weird stuff silently, so that's still a bug I guess
psch m: my $x = "a"; $x ~= $x for ^16; say $x.chars
camelia rakudo-moar 1acf80: OUTPUT«65536␤»
psch m: my $x = "a"; $x ~= $x for ^17; say $x.chars
camelia rakudo-moar 1acf80: OUTPUT«131072␤»
psch stops poking for magic numbers
AlexDaniel psch: rt.perl.org/Ticket/Display.html?id=126014
psch AlexDaniel++: ah, already ticket 10:18
AlexDaniel but it says nothing about getting 0
psch +ed
i think we have a magic number that truncates a bigint to 0?
maybe in pow too
AlexDaniel not in pow
psch m: say 2 ** 2 ** 64 10:19
camelia rakudo-moar 1acf80: OUTPUT«Numeric overflow␤ in block <unit> at /tmp/zusMCQeiqU line 1␤␤Actually thrown at:␤ in block <unit> at /tmp/zusMCQeiqU line 1␤␤»
AlexDaniel well, in pow it was kinda fixed: rt.perl.org/Ticket/Display.html?id=125811
it does not work on jvm though
j: say 2 ** 2 ** 64
camelia rakudo-jvm 40a953: OUTPUT«cannot connect to eval server: Connection refused␤»
AlexDaniel well, that's not what I meant
psch the fix doesn't work? 10:20
AlexDaniel psch: yeah, it does not throw a proper exception as it does on moar
psch yeah, 'cause the fix checks for 0, but r-j produces Inf :)
$ ./perl6-j -e'say 2 ** 2 ** 64'
Inf
AlexDaniel hmm there's also this error message 10:22
“repeat count > 1073741824 arbitrarily unsupported..”
ah, that's for strings
psch m: use nqp; say nqp::pow_n(2, nqp::pow_n(2, 64))
camelia rakudo-moar 1acf80: OUTPUT«This type cannot unbox to a native number␤ in block <unit> at /tmp/YmNBughccP line 1␤␤»
10:22 TEttinger left
psch m: use nqp; say nqp::pow_n(2, 99999999999999999999999999999999999) 10:23
camelia rakudo-moar 1acf80: OUTPUT«This type cannot unbox to a native number␤ in block <unit> at /tmp/KH3STvD5Td line 1␤␤»
AlexDaniel m: my $x = ("a" x (2 ** 63)); say $x.chars
camelia rakudo-moar 1acf80: OUTPUT«repeat count (-9223372036854775808) cannot be negative␤ in block <unit> at /tmp/DTJByw_7LC line 1␤␤»
psch ah, pow_I...
m: use nqp; say nqp::pow_I(2, 99999999999999999999999999999999999, Int, Int)
camelia rakudo-moar 1acf80: OUTPUT«0␤»
psch m: use nqp; say nqp::pow_I(2, 99999999999999999999999999999999999, Num, Int)
camelia rakudo-moar 1acf80: OUTPUT«0␤»
psch $ ./perl6-j -e'use nqp; say nqp::pow_I(2, 99999999999999999999999999999999999, Num, Int)' 10:24
-Inf
i do think pow_I should be better there, instead of trying to catch that in the HLL...
10:24 maybekoo2 left
psch otoh, how many digits would that even be? ...and how many bytes? 10:25
m: say so -Inf
camelia rakudo-moar 1acf80: OUTPUT«True␤»
psch that's what causes r-j not to throw the overflow, fwiw 10:26
'cause infix:<**> does < nqp::pow(...) or otherchecks() || fail overflow >
...paraphrased
AlexDaniel ok so at least I am going to report this 10:27
m: my $x = ("a" x (9999999999999999999))
camelia rakudo-moar 1acf80: OUTPUT«repeat count (-8446744073709551617) cannot be negative␤ in block <unit> at /tmp/mmOv8ANGbM line 1␤␤»
psch m: use nqp; say nqp::unbox_i(9999999999999999999)
camelia rakudo-moar 1acf80: OUTPUT«-8446744073709551617␤»
AlexDaniel or this! 10:28
psch m: use nqp; say nqp::unbox_i(2 ** 64 - 1);
camelia rakudo-moar 1acf80: OUTPUT«-1␤»
psch that's just native int semantics vOv
10:30 loren joined
psch m: use nqp; my $x = 2 ** 64 - 1; say $x; say nqp::p6box_i(nqp::unbox_i($x)); 10:31
camelia rakudo-moar 1acf80: OUTPUT«18446744073709551615␤-1␤»
psch boxing is destructive... /o\
AlexDaniel OK, that's what I got: RT #128035 10:38
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=128035
10:38 _nadim joined
AlexDaniel m: my $x = 42 xx (2 ** 62); say $x.elems 10:39
camelia rakudo-moar 1acf80: OUTPUT«(signal SEGV)»
AlexDaniel yeaaaah!
m: my $x = 42 xx (2 ** 62)
camelia rakudo-moar 1acf80: OUTPUT«(signal SEGV)»
AlexDaniel so it's not just 32-bit systems! 10:40
10:40 rindolf joined
psch hrm, quite a few phaser and CX related jvm tickets 10:45
i'm fairly sure those two things hang more or less on the same peg
AlexDaniel CX?
psch control exception
m: { last; CONTROL { default { .perl.say } } }
camelia rakudo-moar 1acf80: OUTPUT«CX::Last.new␤»
psch m: class CX { }; { last; CONTROL { default { .perl.say } } } # ooh 10:46
camelia rakudo-moar 1acf80: OUTPUT«CX::Last.new␤»
psch aw, that doesn't clobber all over it :P
did that get fixed for X:: as well and i didn't notice?
m: class X { }; say 1 + "foo"; 10:47
camelia rakudo-moar 1acf80: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5foo' (indicated by ⏏)␤ in block <unit> at /tmp/X387dC3Woy line 1␤␤Actually thrown at:␤ in block <unit> at /tmp/X387dC3Woy line 1␤␤»
AlexDaniel psch: anyway, thanks for noticing that xx is broken on 64-bit too. I updated the ticket
10:49 kid51 joined 10:53 pierre_ joined
psch oh boy, my first actual RT weirdness! 10:55
i don't have Reply or Comment on #124628
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=124628
10:55 pierre_ left 10:57 pierre_ joined, leont joined
AlexDaniel psch: Actions/Reply ? 11:05
psch AlexDaniel: ooh! i never used them there, usually just on the top right of an existing comment... 11:06
AlexDaniel yeah, but there is no discription and no comments :/ 11:07
description*
11:09 pRiVi joined 11:11 leont left 11:12 grondilu joined 11:24 CIAvash left 11:31 wamba left
psch m: A: { }; last A # heh 11:35
camelia rakudo-moar 1acf80: OUTPUT«control exception without handler␤ in block <unit> at /tmp/sImK7xYQJf line 1␤␤»
psch m: last
camelia rakudo-moar 1acf80: OUTPUT«last without loop construct␤ in block <unit> at /tmp/9qFbYQ25QW line 1␤␤»
psch well, that's a rather easy fix at least... 11:39
11:44 Ven left 11:47 pierre_ left 11:59 gtodd1 joined 12:00 richi238 joined, masak_ joined 12:01 [Coke]_ joined 12:04 huf_ joined, M-Illandan1 joined 12:05 vike1 joined 12:06 huf left, aries_liuxueyang left, richi235 left, JimmyZ left, vike left, vytas left, M-Illandan left, masak left, [Coke] left, gtodd left, chris2 left 12:08 aries_liuxueyang joined 12:09 loren left 12:11 _mg_ joined 12:12 JimmyZ joined, vytas joined 12:14 chris2 joined 12:22 CIAvash joined 12:29 itcharlie joined
itcharlie seems like Im in the right place now :) 12:29
Perl 6 module installations are not working in windows 12:30
First error without Git Shell: gist.github.com/itcharlie/cec33e5b...c9c9258e9a
Second error with Git Shell: gist.github.com/itcharlie/b379b122...6b9a13f7e1
First error shows that it doesn't find Git command in path. 12:31
ugexe no, you mean panda doesnt work on windows
itcharlie ugexe:
correct
probably due to the full path name not being Windows friendly 12:32
more specifically this error here: Can't execute /c/Strawberry/perl/bin/prove.bat. 12:33
ugexe maybe try zef
ZoffixWin zef++
itcharlie zef? 12:34
ah ok
found it
12:34 _mg_ left, loren joined
itcharlie zef comes installed by default with Rakudo Star? 12:35
ZoffixWin Doesn't look like it: github.com/tadzik/Task-Star/blob/m.../META.info 12:36
itcharlie, github.com/ugexe/zef
itcharlie Thanks ZoffixWin
ZoffixWin: I enjoy your blog posts on Perl6 by the way
thank you
ZoffixWin Thanks.
itcharlie thank you ugexe I will try zef now 12:37
12:41 colomon left 12:43 AndyDee joined 12:44 pierre_ joined 12:45 hotel left, hotel joined 12:47 rurban joined, llfourn joined 12:48 colomon joined
moritz hi all; what's that "Perl 6 in your browser" link that recently circulated? 12:53
psch moritz: glot.io i think?
apparently so: glot.io/new/perl6 12:54
moritz psch: thanks!
12:56 pierre_ left
grondilu m: role A { method foo { "oops" } }; class :: does A { has $.foo }.new(:foo<var>).foo.say 12:57
camelia rakudo-moar 1acf80: OUTPUT«oops␤»
grondilu ^methods always prevail over attribute, even when they come from a mixin?
12:57 rurban left
psch m: class A { has $.foo; method foo { "oops" } }; A.foo # that's equivalent at runtime 12:58
camelia ( no output )
grondilu m: role A { method foo { $!foo // "oops" } }; class :: does A { has $.foo }.new(:foo<var>).foo.say 12:59
camelia rakudo-moar 1acf80: OUTPUT«5===SORRY!5=== Error while compiling /tmp/lKTYUuSU99␤Attribute $!foo not declared in role A␤at /tmp/lKTYUuSU99:1␤------> 3ole A { method foo { $!foo // "oops" } }7⏏5; class :: does A { has $.foo }.new(:foo␤ expecting any of:␤ …»
12:59 loren left 13:00 pierre_ joined
psch m: role A { method foo { ::?CLASS.^attributes.grep(*.name eq '$!foo')[0].get_value(self) // "oops" } }; class :: does A { has $.foo }.new(:foo<bar>).foo.say 13:00
camelia rakudo-moar 1acf80: OUTPUT«bar␤»
psch not sure that's the cleanest method there... 13:01
grondilu m: role A { method foo { "oops" } }; class :: does A { has $.foo; method foo { $!foo } }.new(:foo<var>).foo.say 13:02
camelia rakudo-moar 1acf80: OUTPUT«var␤»
grondilu I can do that I guess
psch i think you can still reach A.foo somehow, but i always forget how exactly... :S
ZoffixWin m: role A { method foo { self!foo // "oops" } }; class :: does A { has $.foo; method !foo { $!foo } }.new.foo.say
camelia rakudo-moar 1acf80: OUTPUT«oops␤»
ZoffixWin m: role A { method foo { self!foo // "oops" } }; class :: does A { has $.foo; method !foo { $!foo } }.new(:var<meow>).foo.say 13:03
camelia rakudo-moar 1acf80: OUTPUT«oops␤»
ZoffixWin m: role A { method foo { self!foo // "oops" } }; class :: does A { has $.foo; method !foo { $!foo } }.new(:foo<meow>).foo.say
camelia rakudo-moar 1acf80: OUTPUT«meow␤»
13:03 BenGoldberg joined
grondilu ZoffixWin: that looks slightly cleaner indeed 13:05
13:06 Emeric left, Emeric joined 13:07 colomon left 13:15 colomon joined 13:17 colomon left 13:18 Ven joined 13:20 colomon joined
AlexDaniel m: $_ = Empty; say S/a/b/ 13:24
camelia rakudo-moar 1acf80: OUTPUT«Nil␤»
AlexDaniel m: $_ = Empty; say .substr(5) 13:25
camelia rakudo-moar 1acf80: OUTPUT«(HANDLED) Start argument to substr out of range. Is: 5, should be in 0..0; use *5 if you want to index relative to the end␤ in block <unit> at /tmp/Ua2Aieiyrs line 1␤␤»
AlexDaniel What is “(HANDLED)”?
psch m: $_ = Empty; $x = .substr(5); say "alive" 13:26
camelia rakudo-moar 1acf80: OUTPUT«5===SORRY!5=== Error while compiling /tmp/MkaHV6_09_␤Variable '$x' is not declared␤at /tmp/MkaHV6_09_:1␤------> 3$_ = Empty; 7⏏5$x = .substr(5); say "alive"␤»
psch m: $_ = Empty; my $x = .substr(5); say "alive"
camelia rakudo-moar 1acf80: OUTPUT«alive␤»
psch m: $_ = Empty; .substr(5);
camelia ( no output )
psch AlexDaniel: "don't complain when sunk or evaluated", pretty much
pmurias It would be awesome if we could somehow reuse glot.io to have runnable synopsises for modules
AlexDaniel I'm not sure why we can host camelia ourselves but would need some external dependency (that has unknown goals) to have runnable whatever 13:28
unless I am missing something
psch scope of users is a concern i'd guess 13:29
llfourn I think glot.io did the hard work of building a container spawning thing
psch as in, i'm assuming glot.io can handle at least a few more that camelia could
oh, yeah, security is probably another concern
llfourn with glot.io you can IO I guessed but haven't tried 13:30
pmurias it's a case of usefulness overiding security for camelia
there used be a lot of ways to overide the sandbox for camelia in the past
s/sandbox/restricted setting/ 13:31
psch 'use nqp' pretty much still clobbers all sense of security
llfourn yeah I wouldn't trust restricted setting for security anyways
psch but restricting that would be too detrimental for devs
AlexDaniel pmurias: there are still many 13:32
llfourn yeah writing to file works on glot.io just checked
AlexDaniel if we're going to host glot.io thingy ourselves then I'm all for it, of course 13:33
llfourn it seems to be open source :) 13:34
grondilu m: role A { method f($ where * > 0) {...} }; class :: does A { method f($ where * > 0) {} }
camelia ( no output )
grondilu m: role A { multi method f($ where * > 0) {...} }; class :: does A { multi method f($ where * > 0) {} }
camelia rakudo-moar 1acf80: OUTPUT«5===SORRY!5=== Error while compiling /tmp/0cR5LXBhQ_␤Multi method 'f' with signature :(<anon|84841888> $: $ where { ... }, *%_) must be implemented by <anon|84841888> because it is required by a role␤at /tmp/0cR5LXBhQ_:1␤»
grondilu m: role A { multi method f($) {...} }; class :: does A { multi method f($) {} }
camelia ( no output )
grondilu ^something's wrong here 13:35
jnthn grondilu: where constraints are never considered equivalent (because the usual slipperly slope on those things), so you can't use them as a thing to satisfy in a role requirement. 13:36
grondilu ok, previously I was using a subset but I thought I was overdoing it. Apparently I really need them, then. 13:37
jnthn So, behaving as designed, though a warning (or error) may be in order if you do use an unsatisfiable signature in a stub in a role.
llfourn wonders if it would work if they both refered to the same subset type...
jnthn llfourn: I think thay may cut it, yes
llfourn role A { multi method f($ where * > 0) {...} }; class :: does A { multi method f($ where * >
woops nvm that
13:38 zwu joined
llfourn m: role A { multi method f(UInt) { ... } }; class :: does A { multi method f(UInt) { }} # works 13:38
camelia ( no output )
13:39 RabidGravy joined
AlexDaniel hmmm 13:41
m: say so ().all 13:42
camelia rakudo-moar 1acf80: OUTPUT«True␤»
AlexDaniel m: say so ().any
camelia rakudo-moar 1acf80: OUTPUT«False␤»
AlexDaniel m: say so ().none
camelia rakudo-moar 1acf80: OUTPUT«True␤»
BenGoldberg m: Slip.all.say, Slip.any.say, Slip.none.say;
camelia rakudo-moar 1acf80: OUTPUT«all((Slip))␤any((Slip))␤none((Slip))␤»
AlexDaniel m: say so ().one
camelia rakudo-moar 1acf80: OUTPUT«False␤»
BenGoldberg m: Slip.all.so.say, Slip.any.so.say, Slip.none.so.say, Slip.none.so.say; 13:43
camelia rakudo-moar 1acf80: OUTPUT«False␤False␤True␤True␤»
jnthn m: say [||](); say [&&](); # also :)
camelia rakudo-moar 1acf80: OUTPUT«False␤True␤»
BenGoldberg m: say [+^](); 13:44
camelia rakudo-moar 1acf80: OUTPUT«0␤»
BenGoldberg m: say [+|](), [+&]();
camelia rakudo-moar 1acf80: OUTPUT«0-1␤»
13:44 masak_ is now known as masak 13:46 Ben_Goldberg joined
Ben_Goldberg can forsee that -1 being used for obfuscated code. 13:46
13:46 BenGoldberg left, Ben_Goldberg is now known as BenGoldberg
AlexDaniel m: say [==]() 13:48
camelia rakudo-moar 1acf80: OUTPUT«True␤»
13:49 pmurias left
AlexDaniel m: say [X]() 13:49
camelia rakudo-moar 1acf80: OUTPUT«(((Any)))␤»
13:50 pmurias joined
psch m: say [&&] Empty 13:51
camelia rakudo-moar 1acf80: OUTPUT«True␤»
psch right, Empty is just a special Slip, isn't it 13:52
m: say Empty ~~ Slip; say defined Empty
camelia rakudo-moar 1acf80: OUTPUT«True␤False␤»
llfourn m: say Empty eqv |()
camelia rakudo-moar 1acf80: OUTPUT«True␤»
ZoffixWin Does anyone know where (and if) all the file tests are documented? like IO.e, IO.f, etc 13:54
AlexDaniel ZoffixWin: github.com/perl6/roast/blob/master...le-tests.t ? 13:57
ZoffixWin :S
AlexDaniel yea :S
ah 13:58
“documented”
I've read it as “tested”
ZoffixWin All that tells me is our IO spectest is incomplete. I see .rwx and .z and whole bunch of other things in github.com/rakudo/rakudo/blob/nom/...IO/Path.pm
dogbert2 doc.perl6.org/type/IO::Path#File_Test_operators 13:59
ZoffixWin dogbert2++ thanks
AlexDaniel some are also mentioned here: doc.perl6.org/language/io#Checking_...irectories
perhaps /io should also have a link to /IO::Path#File_Test_operators 14:00
BenGoldberg One would hope for all of those docs to have links to one another.
dalek c: 9e2eac3 | (Mathieu Gagnon)++ | doc/Type/Bag.pod:
Fix broken link in type/Bag
14:03
ZoffixWin There are some artifacts of copypasta in exception messages. PR to fix: github.com/rakudo/rakudo/pull/761 14:06
It was an edit on GitHub; I didn't run spectests. 14:07
AlexDaniel ZoffixWin++ 14:08
14:15 tharkun_ left
dalek c: 7b5fc80 | (Zoffix Znet)++ | doc/Type/IO/Path.pod:
Document .rw and .rwx file tetss
14:16
14:16 _mg_ joined, tharkun joined 14:20 cale2 joined 14:23 khw joined
ZoffixWin Would be nice to have .fr 14:24
14:25 mohae joined 14:26 rurban joined 14:28 pierre_ left, domidumont joined
ZoffixWin m: say "works" if .r and .f given 'evalbot/TODO'.IO; 14:28
camelia rakudo-moar 1acf80: OUTPUT«works␤»