»ö« 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.
lookatme o/ 00:58
Herby_ lookatme: \o/ 01:56
AlexDaniel squashable6: next 02:01
squashable6 AlexDaniel, ⚠🍕 Next SQUASHathon in 2 days and ≈7 hours (2017-12-02 UTC-12⌁UTC+14). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day
Geth doc: 64121a95f1 | (Jeremy Studer)++ | 3 files
Make eager examples showcase "eager" eval more

The existing examples did not really showcase the "eagerness" of the evaluation.
02:49
travis-ci Doc build failed. Jeremy Studer 'Make eager examples showcase "eager" eval more 03:08
travis-ci.org/perl6/doc/builds/308770157 github.com/perl6/doc/compare/dcb56...121a95f1f0
buggable [travis build above] ☠ Did not recognize some failures. Check results manually. 03:09
Herby__ exit 04:36
whoops!
wander afternoon #perl6 05:34
Recently I attempt to understand how our re-dispatching system works, and learned many of it by reading the blog ↓ 05:37
rakudo.party/post/Perl6-But-Heres-...with-Maybe
however, some questions still remain
the main is, "how to decide who is the next candidate?" 05:38
I know some examples and how they work (github.com/perl6/doc/issues/1689), but is there a complete rule how it choose the next candidate? 05:39
AlexDaniel that's not just about nextsame and friends, the same order is used when you just call something (I think) 05:40
another piece of the puzzle: docs.perl6.org/type/Routine#Trait_is_default 05:41
generally stuff with stricter signatures has higher priority, but I don't know what are these rules exactly 05:43
AlexDaniel relevant code: github.com/perl6/nqp/blob/8c3aedcc...ne.nqp#L59 05:44
wander huh, what it comes to external-defined functions, we can use "which is more narrow". But how about when it intersects with class inherit? 05:45
see the interesting example 05:46
gist.github.com/W4anD0eR96/0121e30...24018ef163
AlexDaniel eval: gist.githubusercontent.com/W4anD0e...ispatch.p6 05:47
evalable6 AlexDaniel, Successfully fetched the code from the provided URL.
b.f.i
a.f.i
b.f.a
a.f.a
perlbot AlexDaniel: ===SORRY!=== Error while compiling /tmp/PVevymQFrX Confused at /tmp/PVevymQFrX:1 ------> https:⏏//gist.githubusercontent.com/W4anD0eR96/ expecting any of: colon pair [Exited 1]
AlexDaniel simcop2387: can it react on something different?
wander: actually that's probably not the right piece of code, but that's all my sleepy mind can find at the moment :) 05:48
wander what does "not the right piece of code" mean? User is not recommended to write code like this? 05:50
lookatme m: class A { multi method b() { say "A"; }; }; class B is A { multi method b() { nextsame; }; }; say B.new.^lookup("b").candidates>>.signature; B.new.b 05:52
camelia ((A $: *%_) (B $: *%_))
A
AlexDaniel wander: I'm talking about the link to nqp sources 05:53
wander see, sorry for misunderstanding 05:54
lookatme m: class A { method b() { say "A"; }; }; class B is A { method b() { nextsame; }; }; say B.new.^lookup("b").candidates>>.signature; B.new.b 05:58
camelia ((B $: *%_))
A
wander re-dispatching is a sub-topic of multi-dispatching, i think 06:11
TimToady any dispatcher can re-dispatch, so what 'nextsame' et al. mean depends on the current dispatcher (and they can be nested) 06:12
TimToady one could be in the single-dispatcher, the multi-dispatcher, and the wrap dispatcher all at the same time 06:14
if you don't like the current dispatcher anymore, you can say 'lastcall' to throw it away, and the 'nextsame' will talk to the next innermost dispatcher 06:15
wander I'm supposed to learn what dispatcher is, looks interesting :-) 06:46
wander how about "single-dispatcher"? and in which dispatch the example intersecting re-dispatching with class inherit is 06:53
TimToady those are the same; the class dispatcher finds a single method in a class, but within that class you might have the method defined as several multi methods, so that would turn around and use the multi-dispatcher inside the normal class dispatcher 06:57
and since methods are routines, one of those could have had .wrap called on it, maybe for Aspect Oriented Programming, so that dispatcher might also come into play 06:58
wander emmmmm..got something. So how can we explain this example(gist.github.com/W4anD0eR96/0121e30...018ef163)? I tried to do that but end with losing myself. 07:04
wander Here is no wrapper dispatch. As you mention a new concept "class dispatcher", how does it communicates with multi-dispatcher? 07:06
It calls 'b.f.i' at first, which looks well; the next is a.f.i, huh, no problem; then it back to b.f.a, which messes up logic 07:09
u-ou what is dispatch in programming
I mean, what does the word mean in programming context 07:10
BenGoldberg In general, dispatch in programming means a lookup table of some sort which is keyed by a name, with functions as values. 07:11
u-ou ok 07:12
wander Preamble `sub f(Int) { ... }; sub f(Any) { ... };`, then calls `f(42)`. dispatch is to choose which one to be called, for example. 07:13
BenGoldberg If you hear "multi dispatch", usuaully that means that each value from the lookup table is, instead of a single function, a list of functions... typically with different signatures. Like wander's example ^
TimToady there is only one single-method dispatch there, which goes to an anonymouse proto method that is generated around the most general multi method 07:14
the purpose of that proto is to dispatch to all the multis within its scope, which in this case is all four of them 07:15
wander u-ou: my lexical example miss `multi` 07:15
TimToady so the ordering you see is merely picking based on which parameter types are closer to the actual argument type, and which parameter types are more generic
B is more specific than A, and Int is more specific than Any 07:16
if you only want to redispatch to the multis in a given class, you can provide an explicit proto that can see only those multi methods 07:17
TimToady without that, the autogenerated proto will see all the multis from the object's class, as well as any parent classes of that class 07:19
TimToady the rules in a grammar dispatch by exactly the same visibility rules, but use yet another dispatcher that is smart about LTM (longest token matching), so it calls the methods in order of how much they match 07:21
TimToady this is all pluggable underneath, so you could write your own dispatcher too, but we don't advertise that heavily :) 07:22
but basically, this is how we unify methods and functions and such; everything is a function, but a method is merely a function that happens to be called by a method dispatcher via the class hierarchy 07:25
TimToady bed & 07:26
lookatme good night 07:27
u-ou night :) 07:28
wander I tried adding 'proto' and saw the difference. Now I could explain the very example, in fact I have four multi method whose signatures are (B, Int), (A, Int), (B, Any) and (A, Any). They are flatten so can be sorted from narrow to wide. 07:29
could I write my own dispatcher directly? sounds cool. or it means I can manipulate dispatcher by adding proto properly 07:30
wander good night, thanks a lot for your explanation :) 07:32
buggable New CPAN upload: PDF-Font-0.0.1.tar.gz by WARRINGD cpan.metacpan.org/authors/id/W/WA/...0.1.tar.gz 08:03
wander suggest fixing this issue as soon as possible(github.com/perl6/doc/issues/1692) 08:55
wander I cannot work it out because everything goes well locally. It has nothing to do with our commit, maybe. 08:57
DrForr I'd forgotten how well perl symbols and LaTeX don't play together. 11:24
wander .ask TimToady could you please reply this(irclog.perlgeek.de/perl6/2017-11-29#i_15506760) when you're free? I'm quite curious. thanks. 12:18
yoleaux wander: I'll pass your message to TimToady.
Zoffix What was it that aren't closures? classes/roles or methods too? 12:21
wander huh? 12:23
Zoffix Yeah, I think it's just classe/roles; methods do close over class body but not stuff beyond 12:25
DrForr Ah, wrong package, forgot. 12:27
Zoffix man, can't look at AST on this dumb phone :(
Zoffix jnthn: you around? What was it that aren't closures? Methods aren't closures? Was just looking at the Proxy examples here and see methods closing over a variable; is that fine? docs.perl6.org/type/Proxy 12:30
Zoffix m: my ($m, $s) = do { my $x = 42; my method { $x }, { $x = $^v } }; $s(100); say $m($) 12:38
camelia 100
Zoffix shrugs
Methods ain't closures based on this: github.com/rakudo/rakudo/commit/23...50ec570b9d 12:43
But I don't understand how above example works if they're not and also whether the Proxy example is goo
Zoffix wander: "latest version" is what exactly? 12:48
To me it means latest Rakudo release, to some, latest Star release, to others, the HEAD commit when you wrote that Issue
Zoffix That's for D#1692 12:49
synopsebot D#1692 [open]: github.com/perl6/doc/issues/1692 [build] Build fail strange
Zoffix Gotta be rakudo issue. Latest pod changes, likely 12:50
wander as mention"latest version", I mean the latest perl6/doc version(at that time, 81de65a ). 12:51
ok, let me pull the latest Rakudo and try it again 12:52
Zoffix Ah, I thought you meant latest rakudo version 12:53
Zoffix & 12:54
wander :P 12:54
pmurias hi 12:57
jnthn .tell Zoffix Anonymous methods actually are closures. The thing that makes things "not a closure" is when they are installed somewhere at compile time. A type has a single meta-object with a single method table. 13:03
yoleaux jnthn: I'll pass your message to Zoffix.
Altreus What is the ($) for in zoffix's bot example? 13:05
dasfagggdhkjh Altreus: $m has a Callable in it, the $m() calls it, and the $ is a anonymous state variable that in this case just serves to provide a dummy value for a routine that expects one positional argument. docs.perl6.org/language/variables#...$_Variable 13:24
perlawhirl is there any reason why argless .classify() shouldn't just classify against the value? 13:37
m: say <A A A A B B B C C D>.classify({ $_ })
camelia {A => [A A A A], B => [B B B], C => [C C], D => [D]}
perlawhirl m: say <A A A A B B B C C D>.classify(*)
camelia Doesn't make sense to classify with itself
in block <unit> at <tmp> line 1
perlawhirl it does tho
m: say <A A A A B B B C C D>.classify() # :(
camelia Must specify something to classify with, a Callable, Hash or List
in block <unit> at <tmp> line 1
timotimo zoffix, it's very problematic to show methods being passed to the proxy constructor; you can't use $!foo syntax in there without making things explode rather violently in most cases 13:45
m: class test { has $.something; has $!foo; method getfoo is rw { Proxy.new(FETCH => method() { $!foo }; STORE => method($n) { $!foo = $n } } }; test.new.getfoo = 99 13:46
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in argument list; couldn't find final ')' (corresponding starter was at line 1)
at <tmp>:1
------> 3tfoo is rw { Proxy.new(FETCH => method()7⏏5 { $!foo }; STORE => me…
timotimo m: class test { has $.something; has $!foo; method getfoo is rw { Proxy.new(FETCH => method () { $!foo }; STORE => method ($n) { $!foo = $n }) } }; test.new.getfoo = 99
camelia Unexpected named argument 'FETCH' passed
in method getfoo at <tmp> line 1
in block <unit> at <tmp> line 1
timotimo m: class test { has $.something; has $!foo; method getfoo is rw { Proxy.new(FETCH => method () { $!foo }, STORE => method ($n) { $!foo = $n }) } }; test.new.getfoo = 99
camelia Cannot assign to an immutable value
in method <anon> at <tmp> line 1
in block <unit> at <tmp> line 1
timotimo m: class test { has $.something; has $.blah; has $.flob; has $!foo; method getfoo is rw { Proxy.new(FETCH => method () { $!foo }, STORE => method ($n) { $!foo = $n }) } }; test.new.getfoo = 99
camelia P6opaque: no such attribute '$!foo' on type test in a Proxy when trying to get a value
in method <anon> at <tmp> line 1
in block <unit> at <tmp> line 1
Altreus Is it because it was declared as a method so it expects a $self? 13:56
timotimo it's a little more tricky than that 13:58
when code for $!foo is generated it'll look around itself to the innermost class definition
that lets it know what type to put into the generated code
but STORE and FETCH are called on the proxy object
so there's code to grab (or set) attribute $!foo in a test object, but the object the method is called on isn't a test at all 13:59
m: class test { has $.something; has $.blah; has $.flob; has $!foo; method getfoo is rw { Proxy.new(FETCH => sub ($p) { $!foo }, STORE => sub ($p, $n) { $!foo = $n }) } }; test.new.getfoo = 99
camelia ( no output )
timotimo here it closes over "self" from the "getfoo" method, which is the test object 14:00
timotimo so now the type of the innermost class definition and the object stored in "self" match up and everything's good 14:00
m: class test { has $.something; has $.blah; has $.flob; has $!foo; method getfoo is rw { Proxy.new(FETCH => sub (\self:) { $!foo }, STORE => sub (\self: $n) { $!foo = $n }) } }; test.new.getfoo = 99 14:01
camelia 5===SORRY!5=== Error while compiling <tmp>
Can only use the : invocant marker in the signature for a method
at <tmp>:1
------> 3o is rw { Proxy.new(FETCH => sub (\self:7⏏5) { $!foo }, STORE => sub (\self: $n) {
timotimo ah, ok
if that were legal syntax, it would have blown up again
Geth doc: f4426c44cf | (Alex Chen)++ | 4 files
Try to make build OK
Zoffix timotimo: what I don't get is why is it taking methods in the first place? 14:02
Zoffix This seems a lot less clunky to use: my $x := do { my @stuff; Proxy.new: :STORE{ @stuff.push: $_ }, :FETCH{ @stuff.join: "|" } }; 14:03
And is in fact what I first wrote this morning until it gave me wrong results and I realized it's passing the proxy object as the first values
Zoffix Or better yet: my $x := Proxy.new: { my @stuff; :STORE{ @stuff.push: $_ }, :FETCH{ @stuff.join: "|" } }; 14:05
Especially if you say it's very problematic to show methods; well, if we don't then we have some explanation to do about why first arg is a dud 14:07
moritz i guess we'd have to add a new API
the old one has annoyed me at times, too 14:08
Proxy.new is in somewhat whitespread use in the ecosystem
Zoffix I can imagine. 14:09
Gonna hack up a Proxee module some time this week and experiment with a few things
moritz moritz@hack:~/p6/perl6-all-modules$ git grep -wlF Proxy.new|cut -d/ -f 1-3|sort -u|wc -l
42
42 different distributions use it
Zoffix m: say WHY "Life, the Universe and Everything": 14:10
camelia 42
Zoffix Coincidence? I think NOT! 14:11
:)
wander github.com/rakudo/rakudo/blob/1c38...Str.pm#L21 14:13
Zoffix s: "Life, the Universe and Everything", 'WHY', \() 14:14
SourceBaby Zoffix, Sauce is at github.com/rakudo/rakudo/blob/4fca...Str.pm#L21
wander IIRC moritz picked it up once :P 14:15
Zoffix I was showing off my cool bot :P 14:16
wander so it is
cool to me too
Zoffix eco: Sourcery 14:17
buggable Zoffix, CoreHackers::Sourcery 'Helper for showing actual source code locations of core subs and methods': github.com/zoffixznet/perl6-CoreHa...s-Sourcery
Zoffix Uses this module
travis-ci Doc build passed. Alex Chen 'Try to make build OK' 14:29
travis-ci.org/perl6/doc/builds/308983984 github.com/perl6/doc/compare/64121...426c44cfb7
wander lucky :P 14:30
moritz the more you practice, the more luck you have 14:33
Geth doc: 10a5e8a4a6 | (Alex Chen)++ | doc/Language/functions.pod6
Collect sub MAIN into routine
14:37
synopsebot Link: doc.perl6.org/language/functions
Altreus timotimo: but zoffix's original example didn't actually use a class, which is what made me wonder 14:39
so I guess the reason the call to $m needed a solo $ is that it was declared as a method and therefore needs an invocant?
timotimo what code are you refering to? 14:43
Zoffix Is there any significant difference between `my &foo := {;}` and `my &foo = {;}`? I can see the latter gives true for nqp::iscont, but is there any difference for regular users? 15:17
moritz not really 15:20
m: my &foo := {;}; &foo = {;}; say 'alive' 15:21
camelia Cannot modify an immutable Block (-> ;; $_? is raw { #...)
in block <unit> at <tmp> line 1
moritz Zoffix: ^^ that's the most important difference, I think
Zoffix Oh right. moritz++ 15:22
abraxxa is there a way to tell zef to install all requirements of a perl6 script? 15:46
[Coke] zef install --deps-only . 15:49
... but that's more for a project with a META6.json file
azawawi hi 15:51
Altreus timotimo: zoffix did this: «my ($m, $s) = do { my $x = 42; my method { $x }, { $x = $^v } }; $s(100); say $m($)» 15:53
$m is declared as a method but isn't run on an object 15:54
so I guess that's what the $ is for
azawawi m: grammar G { rule TOP { ^ <e> $}; rule e { <e> "+" <e> | "a" | "b" | "c" } }; say G.parse('a+c');
camelia (timeout) 15:55
azawawi how do i remove recursion (timeout) from that grammar?
what's a better way to write: grammar G { rule TOP { ^ <e> $}; rule e { <e> "+" <e> | "a" | "b" | "c" } }; say G.parse('a+c');
jast in formal terms this is called left recursion and an easy way to get rid of it is to split the rule in two, e.g.: rule e { <term> "+" <e> | <term> }; rule term { "a" | "b" | "c" }; 15:59
DrForr Looks like you want to do mathematics. I'd look at github.com/drforr/perl6-Grammar-Co.../Infix.pm6 but I'm a bit biased :)
azawawi jast: cool thx 16:01
jast: im a bit rusty on compiler stuff :)
jast I was very, very interested in it for a couple of years, a lot of it has stuck :) 16:02
azawawi jast: left recursion elimination right?
jast yep
azawawi cool
the thing is if you read docs.perl6.org/language/grammars, you dont find any mention of left recursion elimination 16:03
jast right
TimToady we should at least detect it and complain
jast in *principle* it's not necessary to eliminate left recursion in grammars, it just happens to be necessary if the underlying parsing engine uses top-down parsing (e.g. LL(k) parsers)
azawawi TimToady: I totally agree 16:04
it happened to me here... github.com/azawawi/perl6-inline-go...ar.pm6#L58 16:05
jast I kind of like packrat parsers with PEG instead of standard grammars, but those do take some getting used to
azawawi also perl6 is not complaining of undefined rules until they're actually used. This is good and bad while developing/debugging a grammar 16:06
TimToady the other way to fix it is the way Perl 6's grammar does, install some kind of bottom-up parser in a layer-cake
TimToady p6 just throws an operator precedence parser in under the name EXPR 16:06
jast yeah, that would work for pretty much everything you'd ever want to parse, except maybe natural languages :-) 16:07
azawawi btw what type of parsing are perl6 grammars actually doing (behind the scenes)?
jast I can guess, but I have to leave anyway so I'll let someone more knowledgeable answer 16:08
TimToady it's just PEG, but not packrat 16:09
azawawi en.wikipedia.org/wiki/Parsing_expr...on_grammar right? 16:10
jast packrat doesn't inherently solve left recursion issues anyway, it needs some extra treatment
TimToady the power comes from the fact that it writes lexers for you, so you never need to write your own 16:11
p6 grammmars, I mean
and it automatically calculates longest token matching across all the rules that can be a prefix at that spot
azawawi TimToady: thanks 16:13
Looking at sample grammar test code github.com/albastev/Grammar-Modeli...ause.t#L11 , it seems :rule parameter in Grammar.parse is not being used (or known) to perl6 community. 16:16
or it may have been introduced recently
Another problem cross-platform found... go does not generate shared library (DLL) on windows... sigh 16:17
so no Inline::Go or "Let's Go" for windows :) 16:18
Error message: "-buildmode=c-shared not supported on windows/amd64" since Go 1.5 when that feature was introduced...
DrForr Doesn't play well with others?
El_Che azawawi: what about the gcc compiler? 16:19
azawawi DrForr: it is funny given how good is its support on windows 16:19
azawawi buildmode=c-archive 16:20
El_Che azawawi: stackoverflow.com/questions/405734...ith-go-1-7 <-- a two step solution?
azawawi El_Che: cool thanks ... will try it now 16:23
El_Che azawawi: for the record, every Go programmer that I talked to told me to keep away of C-go :) 16:28
azawawi El_Che: :) 16:29
El_Che I am only exagerating slightly
:)
[Coke] m: use Telemetry :COLUMNS; 16:30
camelia 5===SORRY!5=== Error while compiling <tmp>
Error while importing from 'Telemetry': no such tag 'COLUMNS'
at <tmp>:1
------> 3use Telemetry :COLUMNS7⏏5;
Zoffix Altreus: yeah, it's for the invocant. In the `$foo.method(...)` it gets passed as the first arg, so if you got that Method object in a variable, you need to stick the invocant as the first arg, or use the methodop syntax with that variable: 16:50
m: my $meth := my method n { self.uc.say }; "meow".$meth; "foos".&n; &n('bars'); $meth('bdasdas')
camelia MEOW
FOOS
BARS
BDASDAS
Altreus perl5-y 16:51
azawawi El_Che: it is a go for windows Inline::Go. Thanks :)
Altreus I guess the main difference is that it's in self and not $^a or whatever
Zoffix Yeah
Altreus is that the entire purpose of `method`?
Zoffix Probably
Also, `method`s inside classes will get installed as methods, but `sub`s won't 16:52
Altreus so much to learn :( 16:55
Zoffix You don't need to learn everything in one go :) 16:56
DrForr scrambles around for peanuts to throw.
Zoffix wonders how many ways to call a method we got 16:58
wander azawawi:
Zoffix I'm gonna guess: 40
wander m: grammar G { rule TOP { ^ <e>+ % '+' $}; rule e { "a" | "b" | "c" } }; say G.parse('a+c');
camelia 「a+c」
e => 「a」
e => 「c」
Zoffix No, 80
wander for this special case, I think ^ is elegant enough 16:59
and yes, left recursion is common, we should discuss it in doc.
SmokeMachine Zoffix: is there a list with each way?
wander TimToady: could you please reply this(irclog.perlgeek.de/perl6/2017-11-29#i_15506760) when you're free? I'm quite curious. thanks. 17:00
Zoffix SmokeMachine: I'm making one :)
SmokeMachine :)
wander AlexDaniel: please take a look at this(irclog.perlgeek.de/perl6/2017-11-2...15507634), seems yoleaux doesn't work correctly 17:01
SmokeMachine Zoffix: Id love to see that list... :)
azawawi what about also warnings on non-existing rules? is perl6 lazy on this case? since i didnt encounter while developing the inline::go grammar until it was used. 17:01
El_Che azawawi: glad to be a useful lurker :) 17:02
jnthn azawawi: They're just method calls, and the missing methods could be provided by a subclass, for example 17:03
SmokeMachine m: grammar G {token TOP {<a>}}
camelia ( no output )
SmokeMachine m: grammar G {token TOP {<a>}}; G.parse: "bla"
camelia No such method 'a' for invocant of type 'G'. Did you mean 'at'?
in regex TOP at <tmp> line 1
in block <unit> at <tmp> line 1
azawawi jnthn: ah ok.
Zoffix wander: by the way, jnthn may know more about your overriding dispatcher question 17:04
jnthn Overriding dispatcher? :)
Zoffix :)
jnthn understands the words but not the meaning ;)
Zoffix "<wander> could I write my own dispatcher directly? sounds cool. or it means I can manipulate dispatcher by adding proto properly" 17:05
m: multi x(Int) { say "here" }; multi x (Any) { say "there" }; x 42
camelia here
Zoffix I guess the question is, is there a way to change the way that dispatches and, say, prefer an `Any` candidate over all the rest 17:06
jnthn Hmm
Not *easily*, but of course all things are possible with sufficient evil
Of note, mixing a role into a proto that overrides the !find_best_dispatchee method probably works out 17:07
jnthn The multi-dispatch algo is written in NQP code 17:07
Zoffix neat
jnthn The only reason it goes fast is because it then sticks resolutions it does into a multi-dispatch cache the VM can do fast lookups in 17:08
Zoffix m: my @a = <uc>; "foo".@a
camelia Invocant of method 'CALL-ME' must be a type object of type 'List', not an object instance of type 'Array'. Did you forget a 'multi'?
in block <unit> at <tmp> line 1
Zoffix This form is mentioned in Synopses but isn't implemented. Cuts down on my list :) 17:09
( design.perl6.org/S12.html#Fancy_method_calls )
wander thanks. now I know there is `!find_best_dispatchee`
for the whole story, at first I lost in this code snip(gist.github.com/W4anD0eR96/0121e30...4018ef163) 17:11
then TimToady explained it(irclog.perlgeek.de/perl6/2017-11-2...15506557), where he mentioned terms 'single-dispatcher', 'multi-dispatcher' and 'class-dispatcher'
still I don't have good understanding about there dispatcher, maybe I can explain why choosing a very candidate to dispatch(which is more narrow), but 'single-' and 'class-' look confusing to me 17:12
for what zoffix recurred to, that is because TimToady said one can write his own dispatcher, which I'm curious about, emmm, just curious 17:14
jnthn stackoverflow.com/questions/450472...3#45123753 17:15
I wrote that once to explain the semantics
Zoffix huggable: dispatch :is: stackoverflow.com/questions/450472...3#45123753 17:16
huggable Zoffix, Added dispatch as stackoverflow.com/questions/450472...3#45123753
Altreus Zoffix: yes I do Q_Q 17:17
anything I don't know when I write code is going to be code I write again later :P 17:18
Zoffix Well, my original guess was spot on... I'm hopping I missed some form that double the amount of variants to 80.
m: gist.github.com/zoffixznet/919f75c...5bc9434176
camelia Saw 40 different ways to call a method
Zoffix SmokeMachine: ^ you were wondering
There's also a few ways mentioned in the Syn but aren't implemented :) 17:19
m: "foo".$$$$$$$("".^lookup: "uc").say
camelia FOO
Zoffix And if you accept this as a separate variant, then the number is infinite :) 17:20
SmokeMachine :D
wander jnthn: thanks. let me read the answer. 17:23
TimToady Zoffix: there's also arguably function composition 17:27
Zoffix :D
TimToady also .= mebbe 17:29
simcop2387 AlexDaniel: yea i can make it not react to eval there. i'll do that today
Zoffix o 17:30
buggable New CPAN upload: PDF-Font-0.0.2.tar.gz by WARRINGD cpan.metacpan.org/authors/id/W/WA/...0.2.tar.gz 17:33
TimToady .tell Zoffix yer also missing the 'meow $o:' form, which definitely belongs in your list 17:35
yoleaux TimToady: I'll pass your message to Zoffix.
moritz you can also cheat and use the MOP in various ways 17:38
.^find_method, .^method_table<uc>
AlexDaniel squashable6: next 17:40
yoleaux 13:03Z <tbrowder> AlexDaniel: ref pod tests and lines with ws at end: only way i know how to guarantee retaining the ws is to generate the test file via the test harness somehow. any other ideas?
squashable6 AlexDaniel, ⚠🍕 Next SQUASHathon in 1 day and ≈16 hours (2017-12-02 UTC-12⌁UTC+14). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day
AlexDaniel tbrowder: yea, that's a good idea I think
wander AlexDaniel: please take a look at this(irclog.perlgeek.de/perl6/2017-11-2...15507634), seems yoleaux doesn't work correctly 17:55
AlexDaniel wander: mmm, why? 17:56
wander yoleaux says 'wander: I'll pass your message to TimToady.', but it didn't pass it, did it? 17:57
AlexDaniel I think you can send a private message to yoleaux
and it'll reply to you with messages
AlexDaniel` .ask AlexDaniel test pm 17:58
yoleaux AlexDaniel`: I'll pass your message to AlexDaniel.
AlexDaniel there
:)
azawawi El_Che: it is ugly but works :) github.com/azawawi/perl6-inline-go...Go.pm6#L30
El_Che++ 17:59
Inline::Go passes tests on my windows machine :) 18:01
timotimo i wonder when larry will introduce us to the rest of the gang: larry wany, larry wone, and larry wnone? 18:11
El_Che azawawi: so the idea is to write go code that is compiled but the modules and callable from the perl code? 18:16
azawawi El_Che: yup that's the ultimate goal 18:22
El_Che: it is actually two-in-one... Grammar + Execution at the end hopefully
El_Che azawawi: and libraries? go get in the background? 18:23
or do you count on a vendor directory?
azawawi to tell you truth i havent thought about it yet :)
El_Che hehe 18:24
azawawi the builtin go packages are good enough so far :) golang.org/pkg/ 18:25
El_Che azawawi: dep is getting there being the official tool, so a dep managed directory could be a requirement 18:26
azawawi github.com/golang/dep ? 18:26
El_Che yep 18:28
because golang dependency management is terrible, there are meany third party tools to manage them. 18:29
dep has the input of many of these third party authors 18:30
I use it, no probs so far :)
El_Che the stars it has should give some assurance :) 18:32
simcop2387 eval: say "Hello World" 18:36
evalable6 Hello World
simcop2387 perlbot: eval: say "Hello World" 18:40
perlbot simcop2387: Hello World
simcop2387 rkeval: say "Hello World"
perlbot simcop2387: Hello World
simcop2387 perlbot: theonion
perlbot simcop2387: Tips For Holiday Shopping On A Budget www.theonion.com/tips-for-holiday-...1820841649
simcop2387 ok good. all working as expected now. AlexDaniel, it'll now respond to eval: only if you address it, but will also work with rkeval (rakudo eval) without being addressed. bleval (perl5 blead), and eval5.X (for other perl 5 versions if wanted). i think i also forgot to mention it supports every perl version, from 1 to 5.26+blead. so eval1: eval2: eval3: etc 18:42
AlexDaniel cool, although not quite sure why would we possibly need that here :) 18:43
(perl5 evals I mean) 18:44
simcop2387 compare code? dunno. :) 18:45
though if anybody here worked with lwall way way way back in the day and had access to (and can get it still) I'd love a copy of perl 0 to put on the bot :) 18:46
AlexDaniel around here we try to compare perl5 with perl 6 as much as we compare perl 6 with ruby, python or whatever… :) 18:47
fwiw I'd love a universal eval bot for all languages
simcop2387 that's kind of what the bot has morphed into, it's got rbeval (ruby) and jseval (node). now that i did the massive rewrite to the sandbox for it, i'll probably add python (mostly for the pastebin, it's a pita for oneliners). and a few others. 18:48
AlexDaniel rbeval puts 42
rbeval: puts 42
perlbot AlexDaniel: [Died SIGSYS (Illegal Syscall)]
TimToady eval: put 42 18:49
evalable6 42
TimToady rkeval: put 42
perlbot TimToady: 42
simcop2387 ah yes that was one of the things i did this rewrite for, upgraded ruby and it broken. give me a moment i need to allow the getrandom syscall
ilmari ceval: int main (void) { return 42; } 18:49
;( 18:50
AlexDaniel jseval: console.log('Hello');
perlbot AlexDaniel: Hello
AlexDaniel cool
simcop2387 AlexDaniel: ruby fixed
AlexDaniel rbeval: puts 42
perlbot AlexDaniel: 42
azawawi El_Che: cool thx for info
simcop2387 ilmari: yea i need to figure out how i want to handle C, it's more easily dangerous since i've got to sandbox the compiler and the program 18:51
ilmari tcc has an -run option
simcop2387 there's a lot more execve() calls that i can't defend (i basically have to open it up entirely if i want gcc)
oh neat, i was going to look at tcc but wasn't sure how well it supports newer c standards 18:52
and i kind of want a c++eval too but that's more difficult.
TimToady rkeval: say dir(".")».basename
perlbot TimToady: (key.pem README.md hello.txt elib lib married.fwp cert.pem single.fwp template.angular example.html M1qEyehFsH)
TimToady rkeval: say dir("..")».basename 18:53
perlbot TimToady: (dev eval home perl5 langs bin usr lib lib64 tmp)
ilmari simcop2387: I just thecked with strace tcc -run doens't need to write anything 18:54
Ven`` TimToady: hi. wanted to know if you had had time to upload the materials of your talk?
simcop2387 ilmari: writing's not a problem, it's gcc doing execve for linking and such that was. tcc -run looks great
TimToady Ven``: you mean all the pictures? there was no text... 18:55
TimToady there wasn't even a title :) 18:55
simcop2387 perlbot: bleval: open(my $fh, ">/tmp/foo") or die "Can't write $!"; print $fh "Hello world"x100; close($fh);
perlbot simcop2387: 1
AlexDaniel benchable6: uptime 18:56
benchable6 AlexDaniel, 1 day, 1 hour, 13 minutes, and 17 seconds, 1101.556MB maxrss. This is Rakudo version 2017.10-215-g85105077a built on MoarVM version 2017.10-86-g89fae17a6 implementing Perl 6.c.
AlexDaniel geez over 1000 MB…
TimToady rkeval: print slurp '/tmp/foo' 18:57
perlbot TimToady: Failed to open file /tmp/foo: No such file or directory in block <unit> at /tmp/WZCnGJ_IzF line 1 [Exited 1]
simcop2387 TimToady: each eval gets its own container, and they're destroyed after exit
TimToady cool
simcop2387 yea a lot of my changes to my eval setup was to reduce memory usage (allowing secure reading from disk, etc.) most evals only take <30mb now.
timotimo AlexDaniel: i can try that locally; that's in the whateverable repo? 19:03
AlexDaniel timotimo: yes, I can give you some intstructions. Maybe on #whateverable 19:04
rindolf simcop2387: good job 19:06
Geth ecosystem: d84103c91e | (Ahmad M. Zawawi)++ (committed using GitHub Web editor) | META.list
Move Inline::Go to CPAN :)
19:09
buggable New CPAN upload: Go-Inline-0.0.2.tar.gz by AZAWAWI cpan.metacpan.org/authors/id/A/AZ/...0.2.tar.gz 19:13
New CPAN upload: Inline-Go-0.0.2.tar.gz by AZAWAWI cpan.metacpan.org/authors/id/A/AZ/...0.2.tar.gz
masak m: say <A A A A B B B C C D>.classify(*) 19:38
camelia Doesn't make sense to classify with itself
in block <unit> at <tmp> line 1
masak m: say <A A A A B B B C C D>.classify()
camelia Must specify something to classify with, a Callable, Hash or List
in block <unit> at <tmp> line 1
masak perlawhirl: I agree with you one or both of those could work. 19:39
moritz m: say <A A A A B B B C C D>.classify({$_}) 19:41
camelia {A => [A A A A], B => [B B B], C => [C C], D => [D]}
[Coke] tcleval: puts 42
if you're self-classifying... why are you doing that? 19:43
m: say <A A A A B B B C C D>.Bag<A>; # seems more useful than getting a list of 4 As 19:44
camelia 4
[Coke] I agree that if you make it do something, that's probably the best thing to make it do, though. 19:45
masak [Coke]: "why would you ever want to do [a thing that even remotely makes sense]?" usually doesn't hold up as a counterargument in the Perl world :P 19:47
masak "you oughtn't want that in the first place" is more of a Python argument 19:47
[Coke] masak: you're reading waaaay too much into my question
Apologies for any tone issues on my part. I'm curious why someone would want that particular usage of classify, even explicitly. 19:49
masak that's fine, as long as we keep separate the curious question itself and its role as a counterargument 19:50
apologies for going into overdrive defending a use case I don't fully understand either :P 19:51
perlpilot m: say <A A A A B B B C C D>.classify(*.Str);
camelia {A => [A A A A], B => [B B B], C => [C C], D => [D]}
perlpilot m: say <A A A A B B B C C D>.classify(*.Str).Bag;
camelia Bag(A(4), B(3), C(2), D)
perlpilot (just a couple of suggestions for the thing that no one seems to understand ;-) 19:52
masak but I think the error message "Doesn't make sense to classify with itself" could easily just be replaced by logic which carries out the thing
I don't really see why .classify should be the judge of what makes sense or not
perlpilot masak: +1
(except under the auspices of type constraints) 19:53
masak it "makes sense" at least in the sense that it's clear what it *should* do if it weren't complaining so much! :P
TimToady classification by type might be a more reasonable default 20:02
that is, after all, what classification means :) 20:03
[Coke] m: say ('A', 'b', e, π, .1, 4).classify(*.WHAT) 20:06
camelia Doesn't make sense to classify with itself
in block <unit> at <tmp> line 1
TimToady m: say <a 1 2.3 4+1i 1/2 3 4 z>.classify: {.WHAT.^name}
camelia {ComplexStr => [4+1i], IntStr => [1 3 4], RatStr => [2.3 1/2], Str => [a z]}
TimToady m: say <a 1 2.3 4+1i 1/2 3 4 z>.classify: {.WHAT} 20:07
camelia Use of uninitialized value of type ComplexStr in string context.
Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.
{(ComplexStr) => [4+1i], (RatStr) => [2.3 1/2], (IntStr) => [1 3 4], (Str) => [a z]}
in…
[Coke] was tryign to avoid the *Str variants.
TimToady looks like ComplexStr is doing it rwong 20:08
m: say (ComplexStr => 42)
camelia ComplexStr => 42
[Coke] misses having Readline for the REPL. :(
TimToady hmm 20:09
m: quietly say <a 1 2.3 4+1i 1/2 3 4 z>.classify: {.WHAT}
camelia {(RatStr) => [2.3 1/2], (IntStr) => [1 3 4], (ComplexStr) => [4+1i], (Str) => [a z]}
[Coke] DrForr: Do you have a mac? 20:10
TimToady m: say <a 1 2.3 4+1i 1/2 3 4 z>.classify: {Any} 20:11
camelia {(Any) => [a 1 2.3 4+1i 1/2 3 4 z]}
TimToady m: say <a 1 2.3 4+1i 1/2 3 4 z>.classify: {RatStr}
camelia {(RatStr) => [a 1 2.3 4+1i 1/2 3 4 z]}
TimToady m: say <a 1 2.3 4+1i 1/2 3 4 z>.classify: {ComplexStr}
camelia {(ComplexStr) => [a 1 2.3 4+1i 1/2 3 4 z]}
TimToady m: say <a 1 2.3 4+1i 1/2 3 4 z>.classify: {(ComplexStr,RatStr).pick} 20:12
camelia Use of uninitialized value of type ComplexStr in string context.
Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.
{(RatStr) => [2.3 1/2 3], (ComplexStr) => [a 1 4+1i 4 z]}
in block <unit> at <tmp> line…
TimToady m: say <a 1 2.3 4+1i 1/2 3 4 z>.classify: {(IntStr,RatStr).pick}
camelia Use of uninitialized value of type IntStr in string context.
Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.
{(RatStr) => [a 1 4+1i 1/2 3 z], (IntStr) => [2.3 4]}
in block <unit> at <tmp> line 1
Use…
TimToady ,, 20:13
m: say <a 1 2.3 4+1i 1/2 3 4 z>.classify: {(IntStr,RatStr).pick}
camelia Use of uninitialized value of type IntStr in string context.
Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.
{(RatStr) => [2.3 1/2 3 4 z], (IntStr) => [a 1 4+1i]}
in block <unit> at <tmp> line 1
Use…
TimToady looks like it's in the rendering, since it's always the one that's sorted first
m: say <a 1 2.3 4+1i 1/2 3 4 z>.classify({.WHAT}).perl 20:14
camelia Use of uninitialized value of type RatStr in string context.
Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.
(my Any %{Any} = (RatStr) => $[RatStr.new(2.3, "2.3"), RatStr.new(0.5, "1/2")], (Str) => $["a",…
TimToady m: quietly say <a 1 2.3 4+1i 1/2 3 4 z>.classify({.WHAT}).perl 20:15
camelia (my Any %{Any} = (ComplexStr) => $[ComplexStr.new(<4+1i>, "4+1i")], (Str) => $["a", "z"], (RatStr) => $[RatStr.new(2.3, "2.3"), RatStr.new(0.5, "1/2")], (IntStr) => $[IntStr.new(1, "1"), IntStr.new(3, "3"), IntStr.new(4, "4")])
patrickz Hey! I'm trying out cro with TLS. I'm using `cro stub` to initialize a project. `curl localhost:20000 -vvv` fails with an "NSS error -5938 (PR_END_OF_FILE_ERROR)". Does anyone have an idea where to look? 20:39
timotimo patrickz: how did you set up a private key for the ssl stuff? 20:40
patrickz I didn't... 20:41
timotimo maybe that error comes from no private key existing or something
patrickz There is a RESOURCES/fake-tls/ folder with three .pem files. I thought cro set up a working TLS environment... 20:42
perlpilot patrickz: it might be a curl problem. (at least I think I've heard of this with curl before) 20:44
timotimo oh, hmm 20:45
patrickz firefox fails just as well. Hm...
AlexDaniel m: say 42; say 43 20:46
camelia 42
43
AlexDaniel eval: say 42; say 43
evalable6 42
43
tony-o m: 'tmp'.IO.dir.perl.say;
camelia Failure.new(exception => X::IO::Dir.new(path => "/home/camelia/tmp", os-error => "Failed to open dir: 2"), backtrace => Backtrace.new)
jnthn patrickz: Try curl -k 20:48
tony-o m: '/tmp/xyz'.IO.spurt('hello'); '/tmp/xyz'.IO.modified.base(8).say; '/tmp/xyz'.IO.modified.DateTime.posix.base(8).say; 20:49
camelia 13207616572.10423124
13207616525
tony-o is there a rounding reason those two don't somewhat agree^ ? 20:50
perlpilot tony-o: leap seconds would be my guess 20:54
(but 40-some-odd seconds does sound like a bit much)
timotimo m: say time - now 20:56
camelia -37.1266353130341
timotimo m: say [min] (time - now) xx 100
camelia -37.0678160190582
timotimo m: say [min] (time - now) xx 1000
camelia -37.579318523407
timotimo too fast %)
m: say [min] (time - now) xx 100_000
camelia Too many arguments in flattening array.
in block <unit> at <tmp> line 1
20:57
timotimo d'oh
patrickz jnthn: did that, gives the same result. That's the full output of `curl -kvvv` : gist.github.com/patzim/1549ad2b8d2...9aaca31da2
timotimo m: say reduce((time - now) xx 100_000, * min *)
camelia Cannot resolve caller reduce(Seq, WhateverCode); none of these signatures match:
(&with, + is raw)
in block <unit> at <tmp> line 1
timotimo m: say ((time - now) xx 100_000).reduce(&[min]) 20:58
camelia Too many arguments in flattening array.
in block <unit> at <tmp> line 1
timotimo m: say ((time - now) xx 100_000).reduce(* min *)
camelia -37.9999985694885
timotimo can i just say that "+ is raw" looks weird
Zoffix . 21:06
yoleaux 17:35Z <TimToady> Zoffix: yer also missing the 'meow $o:' form, which definitely belongs in your list
Zoffix Added :) up to 43 ways no and I think I missed some safecall forms :) An Advent article is itching to be written :) 21:06
Zoffix And on that topic.... what's the actual usecase for wanting to use `.+` method call? 21:07
Zoffix s/no/now/ 21:08
gfldex m: multi f(Int $i){ return .Str }; multi f(Num $i){ return .Str }; 42.&+f 21:12
camelia 5===SORRY!5=== Error while compiling <tmp>
Calling f() will never work with any of these multi signatures:
(Int $i)
(Num $i)
at <tmp>:1
------> 3}; multi f(Num $i){ return .Str }; 42.&+7⏏5f
s0me0n3-unkn0wn patrickz: Try to reproduce with HTTP::Server::Ogre. If the problem persists, it's some low level stuff with certificates/keys in IO::Socket::Async::SSL, which is common to Cro and HTTP::Server::Ogre. If the problem is gone, it's some problem initializing Cro, probably
gfldex m: multi f(Int $i){ return $i.Str }; multi f(Num $i){ return $i.Str }; 42.+&f
camelia ( no output )
Geth mu: 91762f3c70 | (Zoffix Znet)++ (committed using GitHub Web editor) | misc/perl6advent-2017/schedule
Add "There's a Madness to My Method" to list
21:13
gfldex m: multi f(Str(Int) $i){ return $i.Str }; multi f(Str(Num) $i){ return $i.Str }; dd 42.+&f 21:13
camelia ("42",)
Zoffix gfldex: I know what it does, but I don't know why I'd want to do that 21:14
gfldex Zoffix: I'm quite sure at some point somebody will come up with a really clever use case. I'm also quite sure that somebody wont be me. :-> 21:15
Zoffix heh 21:16
jnthn patrickz: Hm, no idea. Haven't seen that before. I'd expect it to need -k to work, but to then work.
patrickz jnthn: I'll look into it further, given it also fails on my RPi (on which I haven't tried yet, and which is where I need it...) 21:17
tony-o that would be useful in tar for padding base 8 numbers ..
jnthn patrickz: I presume a curl of some other HTTPS service works? 21:18
I'm guessing yes but
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* NSS error -5938 (PR_END_OF_FILE_ERROR)
I'm wondering what end of file it reached...
My guess is "socket was closed unexpectedly"
Zoffix tony-o: the method call? Got a code example I could steal? 21:20
tony-o working on a tar pp module rn, give me a few and i'll post it 21:21
patrickz I tried it with wireshark, and there it looked like clean connection shutdown. I don't have much raw connection reading skills though...
tony-o trying to figure out how to get the file owner name
Zoffix \o/
patrickz jnthn: That's what it looks in wireshark: >[SYN] <[SYN,ACK] >[ACK] >[PSH, ACK] <[ACK] <[FIN, ACK] >[FIN,ACK] <[ACK] 21:25
geospeck is there any way to get the method's signature? for example if I know the methods name and I want to see what params accepts 21:29
gfldex geospeck: see: docs.perl6.org/type/Method#(Code)_..._signature 21:29
Zoffix m: "".^lookup('split').candidates>>.signature.say 21:30
camelia ((Str:D $: Regex:D $pat, $limit is copy = Inf;; :$v is copy, :$k, :$kv, :$p, :$skip-empty, *%_) (Str:D $: Cool $match;; :$v is copy, :$k, :$kv, :$p, :$skip-empty, *%_) (Str:D $: Cool $match, $limit is copy = Inf;; :$v is copy, :$k, :$kv, :$p, :$skip-e…
geospeck yep, that works, thanks guys! 21:32
tony-o m: sub r (Str $x, Int $y) { }; say &r.signature.params.perl;
camelia (Str $x, Int $y)
patrickz is off to bed.
Thanks so far everyone! 21:33
tony-o m: sub r (Str $x, Int $y) { }; say &r.signature.params.perl; say &r.^name
camelia (Str $x, Int $y)
Sub
tony-o oop
tony-o m: sub r (Str $x, Int $y) { }; say &r.signature.params.perl; say &r.^name 21:33
camelia (Str $x, Int $y)
Sub
tony-o m: sub r (Str $x, Int $y) { }; say &r.signature.params.perl; say &r.name
camelia (Str $x, Int $y)
r
geospeck > "".^lookup('say').candidates>>.signature.say
((Mu $: *%_))
> &say.signature
(| is raw)
why is different?
geospeck or | == *%_ 21:34
Zoffix geospeck: without candidates you get the proto
tony-o ^ 21:35
geospeck oh I see
Zoffix no, | is a capture, *%_ is a named param slurpy
geospeck thanks Zoffix!
Zoffix geospeck: above you're looking up different routines though. .^lookup is a metamethod, so you're looking up method 'say' on Str object, whereas the second call gives you the &say subroutin 21:37
e
geospeck I think I need the second one 21:38
tony-o Zoffix: you know of a way to get the uname from the uid in pp6 or nqp ?? 21:41
Zoffix tony-o: no idea what those are 21:46
perlpilot tony-o: you mean uid, uname as "user id" and "user name"? If so, you may need to use NativeCall to get at the getpwuid() routine 21:49
tony-o ah 21:53
perlpilot: have you used that in windows at all? is that comp?
perlpilot oh, no. I don't generally use Windows. 21:57
tony-o perlpilot: ty!
perlpilot I'd guess that there's some other routine that you'd use though.
Zoffix calls it a day
But I'll check the backlog for any ideas for examples of the `.+` methodcall op tomorrow
perlpilot maybe look to Perl 5 and the Win32 namespace to see what's done there?
perigrin There should be a POSIX call for that I think and win32 has been vaguely POSIX complient for a while 21:58
perhaps not 21:59
perigrin I may be vastly overesitmating posix 21:59
perlpilot looks like getpwuid() is in POSIX, so ... maybe? 22:01
tony-o: where did you get the uid in the first place?
AlexDaniel squashable6: next 22:09
squashable6 AlexDaniel, ⚠🍕 Next SQUASHathon in 1 day and ≈11 hours (2017-12-02 UTC-12⌁UTC+14). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day
s0me0n3-unkn0wn patrickz: I initialized cro stub and after that 22:11
patrickz: # HELLO_HOST=localhost HELLO_PORT=20000 HELLO_TLS_KEY=/etc/ssl/private/ssl-cert-snakeoil.key HELLO_TLS_CERT=/etc/ssl/certs/ssl-cert-snakeoil.pem perl6 -Ilib service.p6
s0me0n3-unkn0wn patrickz: (As root, to gain access to /etc/ssal/private; paths are standard Ubuntu certificate/key generated when system is installed) 22:12
patrickz: After that, I can access localhost:20000 with curl 22:13
japhb s0me0n3-unkn0wn: But the fake-tls key/cert didn't work for you? 22:23
tony-o perlpilot:
m: use nqp; my $io = '/tmp/xyz'.IO; $io.spurt('test'); nqp::stat($io.absolute, 10); 22:24
camelia ( no output )
tony-o m: use nqp; my $io = '/tmp/xyz'.IO; $io.spurt('test'); nqp::stat($io.absolute, 10).say;
camelia 1012
tony-o m: use nqp; my $io = '/tmp/xyz'.IO; $io.spurt('test'); nqp::stat($io.absolute, 11).say; #gid 22:25
camelia 100
s0me0n3-unkn0wn japhb: It didn't, should it? %?RESOURCES<fake-tls/server-key.pem> gives Nil to me 22:26
japhb s0me0n3-unkn0wn: Does the file exist? I wonder if there's just a bug in finding it. 22:28
s0me0n3-unkn0wn japhb: How do I know if %?RESOURCES<fake-tls/server-key.pem> is Nil? Sorry, I'm not to good in P6 resources yet 22:35
s0me0n3-unkn0wn japhb: Well, I found out that %?RESOURCES is also Nil :) 22:47
timotimo that could happen when you don't have a META6.json perhaps? 22:48
tyil if it doesnt appear in the META6.json's resources key, it'll be Nil afaik
or if the file doesn't exist in the resources dir
japhb Should be set up here in the sub template: github.com/croservices/cro/blob/ma...#L205-L207 22:49
tyil also, there's no :exists available on %?RESOURCES to check whether a file is set in the resources, I have looked at possibly adding that, but couldn't think up of a clean way to do it 22:50
s0me0n3-unkn0wn It does exit in filesystem and in META6.json but it is uppercase in filesystem and lowercase in META6.json, I don't know it that matters
tyil I think that will matter, as filesystems are usually case sensitive 22:51
s0me0n3-unkn0wn Mine ext4 is case-sensitive definitely :)
SmokeMachine m: use Test; my (@even,@odd); lives-ok { (:@even, :@odd) := classify { $_ % 2 ?? "odd" !! "even" }, 1,2,3,4}, "Can bind result list of classify"; 22:54
camelia 5===SORRY!5=== Error while compiling <tmp>
Cannot use bind operator with this left-hand side
at <tmp>:1
------> 3y { $_ % 2 ?? "odd" !! "even" }, 1,2,3,47⏏5}, "Can bind result list of classify";
expecting any of:
postfi…
SmokeMachine m: use Test; my (@even,@odd); lives-ok { (:@even, :@odd) := classify { $_ % 2 ?? 'odd' !! 'even' }, 1,2,3,4}, 'Can bind result list of classify'; 22:56
camelia 5===SORRY!5=== Error while compiling <tmp>
Cannot use bind operator with this left-hand side
at <tmp>:1
------> 3y { $_ % 2 ?? 'odd' !! 'even' }, 1,2,3,47⏏5}, 'Can bind result list of classify';
expecting any of:
postfi…
SmokeMachine github.com/perl6/roast/blob/fca87f...sify.t#L50
AlexDaniel propdump: Ⅹ 23:05
unicodable6 AlexDaniel, gist.github.com/9b75baef6d702454d6...3d47e28358