Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-05-07

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:01 ZoffixWin Yeah, but then you got stuff like size_t, which is its return value. Or "const struct tm *tm" and I don't even know what that struct looks like or how will calling my sub from Perl 6 will look like :P
00:01 ZoffixWin I'm gonna first learn how to call strftime in pure C
00:02 * ZoffixWin found struct tm http://www.tutorialspoint.com/c_standard_library/c_function_strftime.htm
00:04 literal so is there no easy way to extend core types like Str/Hash/Num if I just want a subtype with an extra method (or just a different type name)?
00:06 ZoffixWin well... there's augment, but that modifies the core type throughout your entire program: http://perl6.party/post/20160427-Perl-6-Extra-Typical-Perl-6#herebedragons
00:07 literal yeah, that's a bit much
00:08 BenGoldberg I thought that only modules which 'use'd your code would see the augmented core type.
00:08 ZoffixWin BenGoldberg, nope
00:09 ZoffixWin m: my $s = 'foobar' but role { method to-large-letters { self.uc } }; say $s.to-large-letters
00:09 camelia rakudo-moar ac36d2: OUTPUT«FOOBAR␤»
00:09 ZoffixWin literal, ^ there's also that
00:09 ZoffixWin (also in that article)
00:09 literal the main thing is that I want a different type name
00:10 BenGoldberg m: my $s = 'foobar' but role { method to-large-letters { self.uc } }; say $s.WHAT
00:10 camelia rakudo-moar ac36d2: OUTPUT«(Str+{<anon|80752864>})␤»
00:10 literal it can just be a Str/Num/Hash in all other respects, to start with
00:10 ZoffixWin literal, what are you trying to accomplish?
00:11 BenGoldberg An object with a role mixed into it will have a different type name, as you can see above.  "Str+{<anon|80752864>}" is the type in this example.
00:12 literal just trying to port some P5 code example of an interpreter to P6, where in P5 they'd made e.g. a String type by blessing a string, and I wanted a similar no-fuss solution
00:13 literal I suppose I can just use the native types, but that's not as nice if I need to add methods to them later
00:14 AlexDaniel http://mrsharpoblunto.github.io/foswig.js/
00:14 literal BenGoldberg: yes, but that's not easy to match against
00:14 ZoffixWin AlexDaniel, "restrollo"
00:14 AlexDaniel ZoffixWin: “crapup”
00:14 literal when MyStringType { ... }
00:15 ugexe m: class Str2 { has $.str handles *; method CALL-ME($str) { self.new(str => $str); }; method foo { 42 }; }; my $str = Str2("aaa"); say $str.WHAT; say $str; say $str.perl; say $str.foo
00:15 camelia rakudo-moar ac36d2: OUTPUT«(Str2)␤Str2.new(str => "aaa")␤Str2.new(str => "aaa")␤42␤»
00:16 ZoffixWin m: class Str2 is Str { has $.str handles *; method CALL-ME($str) { self.new(str => $str); }; method foo { 42 }; }; my $str = Str2("aaa"); say $str.WHAT; say $str; say $str.perl; say $str.foo
00:16 camelia rakudo-moar ac36d2: OUTPUT«(Str2)␤␤""␤42␤»
00:16 literal ugexe: doesn't actually function as a string though :P
00:16 BenGoldberg : class Str2 { has $.str handles *; method CALL-ME($str) { self.new(str => $str); }; method foo { 42 }; }; Str2("abc").substr(1, 1).say;
00:16 ZoffixWin He just forgot is Str
00:16 BenGoldberg m: class Str2 is Stringy { has $.str handles *; method CALL-ME($str) { self.new(str => $str); }; method foo { 42 }; }; Str2("abc").substr(1, 1).say;
00:16 camelia rakudo-moar ac36d2: OUTPUT«b␤»
00:17 ZoffixWin Oh, never mind
00:18 ugexe add a method Str { $.str} and method Stringy { $.str}
00:19 literal in the Ruby example the author just used native types and monkey-patched additional methods on those, I was hoping Perl 6 could do it more elegantly :P
00:21 * grondilu did not know about 'handles *'
00:24 jjido joined #perl6
00:25 ugexe you can get most of the way there, but it stores the string inside a private $!value
00:26 ugexe m: class Str2 is Str does Stringy { method CALL-ME($str) { self.new(value => $str) }; method foo { 42 }; }; my $str2 = Str2("xxx"); say $str2.foo; say $str2 ~~ Str; say $str2
00:26 camelia rakudo-moar ac36d2: OUTPUT«42␤True␤xxx␤»
00:28 timotimo https://github.com/supernovus/perl6-datetime-format btw
00:28 literal nice. Also, looks like "does Stringy" is not needed there
00:28 ugexe does Stringy allows ~$var to work
00:28 literal I see
00:28 literal how come CALL-ME isn't inherited?
00:29 timotimo it's not inherited or it's just not invoked when you call an instance of the derived class?
00:29 ugexe i think Str("xxx") is really a coercer, not a CALL-ME
00:30 literal timotimo: results in "Cannot find method 'Str2'" if it's not specified
00:30 timotimo wait, how are you trying to invoke that?
00:30 literal see ugexe's last code paste
00:31 ugexe m: my $str = Str("xxx"); say $str
00:31 camelia rakudo-moar ac36d2: OUTPUT«xxx␤»
00:31 timotimo Str(123) does call Str
00:31 timotimo as in, it invokes the type object
00:31 BenGoldberg joined #perl6
00:32 literal also, why is "does Stringy" needed if Str does Stringy?
00:33 timotimo i don't think it should be needed
00:37 ZoffixWin timotimo, thanks. Not sure what I was searching that I missed it :S
00:41 BenGoldberg joined #perl6
00:45 timotimo :)
00:48 telex joined #perl6
00:48 Ben_Goldberg joined #perl6
00:51 ZoffixWin m: require Test <&is>; say is 2, 2; try { EVAL "ok"; CATCH { default { say "caught" }}}
00:51 camelia rakudo-moar ac36d2: OUTPUT«ok 1 - ␤True␤caught␤»
00:51 ZoffixWin is there a way to make that compile-time require?
00:52 timotimo what, like need?
00:52 * ZoffixWin thinks a BEGIN, but does that play nice with precomp, and is there no easier way to ask for specific symbols
00:52 ZoffixWin timotimo, it doesn't take symbols
00:52 ZoffixWin m: need Test <&is>;
00:52 camelia rakudo-moar ac36d2: OUTPUT«5===SORRY!5=== Error while compiling /tmp/D3nrCcD1oF␤Confused␤at /tmp/D3nrCcD1oF:1␤------> 3need Test7⏏5 <&is>;␤»
00:52 ZoffixWin And use only takes tags :S
00:57 ZoffixWin m: BEGIN require Test <&is>; say is 2, 2; try { EVAL "ok"; CATCH { default { say "caught" }}}
00:57 camelia rakudo-moar ac36d2: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Cwc0zOAlTX␤An exception occurred while evaluating a BEGIN␤at /tmp/Cwc0zOAlTX:1␤Exception details:␤  5===SORRY!5=== Error while compiling ␤  Lexical with name '&is' does not exist in this frame␤ …»
00:57 ZoffixWin m: BEGIN { require Test <&is> }; say is 2, 2; try { EVAL "ok"; CATCH { default { say "caught" }}}
00:57 camelia rakudo-moar ac36d2: OUTPUT«5===SORRY!5=== Error while compiling /tmp/kpQN4eZC69␤Undeclared routine:␤    is used at line 1␤␤»
00:58 ZoffixWin m: need Test; say Test::is( 2, 2 ); try { EVAL "ok"; CATCH { default { say "caught" }}}
00:58 camelia rakudo-moar ac36d2: OUTPUT«Could not find symbol '&is'␤  in block <unit> at /tmp/2qa4j_XN7W line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/2qa4j_XN7W line 1␤␤»
00:58 * ZoffixWin flips desk
00:59 BenGoldberg m: need Test;
00:59 camelia rakudo-moar ac36d2: ( no output )
01:01 timotimo ZoffixWin: right, need will only grab the module into your namespace, you'd have to import the symbols to have them as lexicals
01:01 timotimo so like $Foobar := Test::EXPORT::DEFAULT::is or whatever
01:03 timotimo bedtime
01:03 ZoffixWin m: need Test; my &is = &Test::EXPORT::DEFAULT::is; is 2, 2; try { EVAL "ok 42"; CATCH { default { say "caught" }}}
01:03 camelia rakudo-moar ac36d2: OUTPUT«ok 1 - ␤caught␤»
01:03 ZoffixWin That's LTA, but better than nothing. timotimo++
01:04 hotel :=?
01:05 hotel heh that looks funny
01:07 colomon joined #perl6
01:08 BenGoldberg joined #perl6
01:12 BenGoldberg joined #perl6
01:12 hotel can someone explain promises to me?
01:12 ZoffixWin RFC for easier compile type specific symbol import: https://rt.perl.org/Ticket/Display.html?id=128090
01:13 ZoffixWin hotel, try this [slightly dated] slideshow: http://jnthn.net/papers/2015-yapcasia-concurrency.pdf
01:13 hotel thanks
01:14 ugexe a simple way to think of it is as a mechanism to chain `start { }`s together
01:19 * hotel needs to brush up on the idea of concurrency altogether
01:20 hotel s/concurrency/asynchrony/
01:22 ZoffixWin m: await ^4 .map: { start sleep 1 }; say now - INIT now
01:22 camelia rakudo-moar ac36d2: OUTPUT«1.00427241␤»
01:25 jjido joined #perl6
01:26 ZoffixWin .ask ufobat is there no way at all to do async stuff with Bailador? Some of my requests can take up to 20 seconds and I looked through the code and see no user-space way to do async
01:26 yoleaux ZoffixWin: I'll pass your message to ufobat.
01:26 jjido joined #perl6
01:30 hotel standards: use taps or use react blocks?
01:30 pmichaud ZoffixWin:  (re RT #128090)   S11 already says how to do compile-time import of symbols
01:30 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=128090
01:31 pmichaud http://design.perl6.org/S11.html#Compile-time_Importation
01:31 pmichaud Is that not what you are looking for?
01:38 hotel how do you set something equal to a promise? I get that it's a type, but what does it actually mean to set something equal to one?
01:40 ZoffixWin pmichaud, unsure. It seems to require *author* of the module to do "extra things" instead of just using `is export`:
01:40 ZoffixWin m: use Test <&is>; say is 2, 2
01:40 camelia rakudo-moar ac36d2: OUTPUT«5===SORRY!5=== Error while compiling /tmp/zm89zGOGgu␤Error while importing from 'Test':␤no EXPORT sub, but you provided positional argument in the 'use' statement␤at /tmp/zm89zGOGgu:1␤------> 3use Test <&is>7⏏5; say is 2, 2␤»
01:41 ZoffixWin pmichaud, so it's out of my control. And I don't know if it's maybe just something that needs to be added to `is export` implementation
01:46 hotel any takers? 3;
01:46 cpage_ joined #perl6
01:46 pierre_ joined #perl6
01:48 ZoffixWin hotel, what do you mean 'set equal to'?
01:48 hotel yeah I'm not really sure
01:48 ZoffixWin ...
01:49 hotel https://github.com/zostay/P6SGI#201-the-environment ==> p6w.ready
01:49 ZoffixWin hotel, it takes a Promise object. You can get a promise with `start {...}` among other things
01:51 hotel guess I set that later then
01:53 hotel on another note, just watched what was probably the saddest scene in all of 24
01:58 hotel m: my constant CRLF = "dummy"; say "hi $CRLF";
01:58 camelia rakudo-moar ac36d2: OUTPUT«5===SORRY!5=== Error while compiling /tmp/kiN9shpLiK␤Variable '$CRLF' is not declared. Did you mean 'CRLF'?␤at /tmp/kiN9shpLiK:1␤------> 3my constant CRLF = "dummy"; say "hi 7⏏5$CRLF";␤»
01:58 hotel m: my constant CRLF = "dummy"; say "hi CRLF";
01:58 camelia rakudo-moar ac36d2: OUTPUT«hi CRLF␤»
01:58 pmichaud ZoffixWin: yeah, I think it's just a NYI bug.
01:58 ZoffixWin m: sub foo (Promise:D $p) { say 'About to sit and wait for a Promise to complete'; await $p; say 'Done waiting ' ~ now - INIT now }; foo start sleep 1
01:58 camelia rakudo-moar ac36d2: OUTPUT«About to sit and wait for a Promise to complete␤Done waiting 1.0042692␤»
01:58 ugexe {CRLF}
01:59 pmichaud ZoffixWin: oh, I see what you mean.
02:00 ZoffixWin m: use Test; sub ok {}
02:00 camelia rakudo-moar ac36d2: OUTPUT«5===SORRY!5=== Error while compiling /tmp/kJXCexGsFZ␤Redeclaration of routine ok␤at /tmp/kJXCexGsFZ:1␤------> 3use Test; sub ok {}7⏏5<EOL>␤»
02:00 mr-foobar joined #perl6
02:00 ZoffixWin Basically, I don't want a module update to introduce an error like this ^ into my code and then rake through a dozen of `use`d modules to find which one imported it
02:01 johnjohn101 joined #perl6
02:01 johnjohn101 hi perl6
02:01 ZoffixWin (a module update where Joe Smith implements a new sub in their FooBarBer module that I use)
02:03 pmichaud Then I suspect the "use Test" ought to be more explicit about what is to be imported.
02:03 pmichaud And yes, that looks like a NYI bug to me.
02:03 pmichaud use Test <&is>;   should import only &is and nothing else.
02:13 BenGoldberg joined #perl6
02:14 molaf joined #perl6
02:15 noganex joined #perl6
02:16 Khisanth joined #perl6
02:25 colomon joined #perl6
02:27 jjido joined #perl6
02:33 mr-foobar joined #perl6
02:42 ZoffixWin m: say Instant.new: 0
02:42 camelia rakudo-moar ac36d2: OUTPUT«Cannot make a Instant object using .new␤  in block <unit> at /tmp/9wfHQmdrfA line 1␤␤»
02:42 ZoffixWin .oO( why the hell not... )
02:42 ZoffixWin m: say now - now
02:42 camelia rakudo-moar ac36d2: OUTPUT«-0.00159147␤»
02:43 crucialrhyme joined #perl6
02:43 ZoffixWin m: say DateTime.new(0).Instant
02:43 camelia rakudo-moar ac36d2: OUTPUT«Instant:10␤»
02:43 ZoffixWin .oO( 10?? )
02:44 colomon joined #perl6
02:49 hotel ugexe++
02:49 uruwi joined #perl6
02:50 hotel can I initialise members of a class in the class body?
02:50 hotel or does it have to be in BUILD
02:50 ZoffixWin use defaults
02:50 ZoffixWin m: class Foo { has $.bar = 42; }; say Foo.new.bar
02:50 camelia rakudo-moar ac36d2: OUTPUT«42␤»
02:51 hotel yeah but these aren't given to the class when instantiating it
02:51 hotel or at least they're not supposed to be
02:51 hotel oh
02:52 ZoffixWin m: class Foo { has $!bar = 42; method bar { $!bar } }; say Foo.new(:72bar).bar
02:52 camelia rakudo-moar ac36d2: OUTPUT«42␤»
02:53 hotel|chagrin yeah thanks
02:53 Actualeyes left #perl6
02:56 itcharlie joined #perl6
02:57 hotel|chagrin so what's the real difference between declaring variables with my/has in a class?
02:59 dalek doc: b2f5a76 | (Zoffix Znet)++ | doc/Type/IO/Path.pod:
02:59 dalek doc: Toss non-more-readable "more readable" portion
02:59 dalek doc: review: https://github.com/perl6/doc/commit/b2f5a76ec6
02:59 ZoffixWin hotel|chagrin, my will create a class variable, has an instance attribute
03:00 hotel|chagrin but what's the functional difference?
03:00 * ZoffixWin is typing an example
03:00 hotel|chagrin thanks
03:00 geekosaur class variable should be shared between all instances
03:00 hotel|chagrin so it's static
03:00 geekosaur in C++ parlance, es
03:01 geekosaur yes
03:01 hotel|chagrin ah
03:01 hotel|chagrin that makes sense
03:01 ZoffixWin m: class Foo { my $.class = 'Original'; has $.instance = 'Original' }; my $first = Foo.new; my $second = Foo.new; $first.class = 'Modded'; $first.instance = 'Also modded'; say [ $first.class, $first.instance, $second.class, $second.instance ]
03:01 camelia rakudo-moar ac36d2: OUTPUT«Cannot modify an immutable Str␤  in block <unit> at /tmp/A334GyShlU line 1␤␤»
03:01 ZoffixWin m: class Foo { my $.class = 'Original' is rw; has $.instance = 'Original' is rw }; my $first = Foo.new; my $second = Foo.new; $first.class = 'Modded'; $first.instance = 'Also modded'; say [ $first.class, $first.instance, $second.class, $second.instance ]
03:01 camelia rakudo-moar ac36d2: OUTPUT«5===SORRY!5=== Error while compiling /tmp/qfDMh426yq␤Two terms in a row␤at /tmp/qfDMh426yq:1␤------> 3class Foo { my $.class = 'Original'7⏏5 is rw; has $.instance = 'Original' is r␤    expecting any of:␤        infix␤        infix sto…»
03:01 ZoffixWin screw you then!
03:01 ZoffixWin :P
03:01 hotel|chagrin lol
03:02 hotel|chagrin thanks to everyone for putting up with my learning
03:02 ZoffixWin hotel|chagrin, well, the output would be [ 'Modded', 'Also modded', 'Modded', 'Original' ]; So the $.class that I modified on $first got modified in $second too, because it's a class variable
03:02 crucialrhyme joined #perl6
03:02 geekosaur most of us old-time C-ers thought c++'s (and I think later java's) use of "static" for that was an abuse...
03:04 hotel makes a mean singleton :P
03:04 geekosaur (it's not actually an abuse, but old C types tend to think of lower level operations and it's not quite the same machine-level thing)
03:04 ZoffixWin m: class Foo { my $.class = 'Original'; has $.instance is rw = 'Original' }; my $first = Foo.new; my $second = Foo.new; $first.class = 'Modded'; $first.instance = 'Also modded'; say [ $first.class, $first.instance, $second.class, $second.instance ]
03:04 camelia rakudo-moar ac36d2: OUTPUT«[Modded Also modded Modded Original]␤»
03:05 ZoffixWin (is rw goes before the default)
03:06 ZoffixWin Curiously, the default accessor for the class var is rw, but isn't for attributes
03:06 hotel m: class X { method !p { say 'p' }; method u { !p }; }; X.new.u
03:06 camelia rakudo-moar ac36d2: OUTPUT«5===SORRY!5=== Error while compiling /tmp/7xmlgZ7tUR␤Undeclared routine:␤    p used at line 1␤␤»
03:06 hotel m: class X { method !p { say 'p' }; method u { self!p }; }; X.new.u
03:06 camelia rakudo-moar ac36d2: OUTPUT«p␤»
03:13 cdg joined #perl6
03:14 ZoffixWin m: my %foo = foo => 'bar', meow => 'mer';
03:14 camelia rakudo-moar ac36d2: ( no output )
03:14 ZoffixWin m: constant %foo = foo => 'bar', meow => 'mer';
03:14 camelia rakudo-moar ac36d2: OUTPUT«5===SORRY!5=== Error while compiling /tmp/z2fl0Om7G5␤Type check failed in constant declaration of %foo; expected Associative but got List (List)␤at /tmp/z2fl0Om7G5:1␤------> 3stant %foo = foo => 'bar', meow => 'mer'7⏏5;␤    expecting any …»
03:14 ZoffixWin Bug?
03:15 ZoffixWin Guess not
03:15 ZoffixWin m: my foo = foo => 'bar', meow => 'mer';
03:15 camelia rakudo-moar ac36d2: OUTPUT«5===SORRY!5=== Error while compiling /tmp/qZfRTPr31D␤Malformed my (did you mean to declare a sigilless \foo or $foo?)␤at /tmp/qZfRTPr31D:1␤------> 3my foo7⏏5 = foo => 'bar', meow => 'mer';␤»
03:15 ZoffixWin oops
03:15 ZoffixWin m: my \foo = foo => 'bar', meow => 'mer';
03:15 camelia rakudo-moar ac36d2: ( no output )
03:16 ZoffixWin Oh. Well, binding := also doesn't work and I guess that's what `constant` is doing
03:18 BenGoldberg m: my \foo = foo => 'bar', meow => 'mer'; say foo;
03:18 camelia rakudo-moar ac36d2: OUTPUT«(foo => bar meow => mer)␤»
03:19 BenGoldberg m: constant %foo = Hash.new( foo => 'bar', meow => 'mer' ); say %foo< meow >
03:19 camelia rakudo-moar ac36d2: OUTPUT«(Any)␤»
03:19 BenGoldberg m: constant %foo = Hash.new( foo => 'bar', meow => 'mer' ); say %foo
03:19 camelia rakudo-moar ac36d2: OUTPUT«{}␤»
03:19 BenGoldberg m: constant %foo = ( foo => 'bar', meow => 'mer' ).hash; say %foo
03:19 camelia rakudo-moar ac36d2: OUTPUT«{foo => bar, meow => mer}␤»
03:19 BenGoldberg m: constant %foo = ( foo => 'bar', meow => 'mer' ).hash; say %foo< meow >
03:19 camelia rakudo-moar ac36d2: OUTPUT«mer␤»
03:25 ZoffixWin m: constant %foo = %( foo => 'bar', meow => 'mer' ); say %foo< meow >
03:25 camelia rakudo-moar ac36d2: OUTPUT«mer␤»
03:28 jjido joined #perl6
03:30 finanalyst joined #perl6
03:34 hotel m: my $a, my $b; $a, $b = split " ", "hello world"
03:34 camelia rakudo-moar ac36d2: ( no output )
03:35 hotel m: my $a, my $b; $a, $b = split " ", "hello world"; say $a; say $b
03:35 camelia rakudo-moar ac36d2: OUTPUT«(Any)␤(hello world)␤»
03:35 hotel is there a concise way to assign elements of an output list to different variables?
03:36 ZoffixWin m: my $a, my $b; ($a, $b) = split " ", "hello world"; say $a; say $b
03:36 camelia rakudo-moar ac36d2: OUTPUT«hello␤world␤»
03:36 hotel ah, the elusive parenthesis
03:36 pierre_ joined #perl6
03:46 ZoffixWin (╯°□°)╯︵ ┻━┻
03:47 ZoffixWin Thus ends my 4-hour attempt to make my Bailador return 304s correctly.
03:47 hotel good work
03:47 ZoffixWin The table flip indicates I failed :P
03:48 ZoffixWin Or rather, I just found out I'd have to make a response from scratch too and I don't wanna
03:48 hotel what's the deal with returning things from subs?
03:49 ZoffixWin deal?
03:49 hotel so far in all the pl6 things I've seen, I haven't seen any `return` keyword
03:51 * hotel finds out it exists
03:53 geekosaur it's alwayts been a perl thing that the last value in a sub is what is returned
03:53 geekosaur in fact the return keyword only came into existence in older perl relatively late (and had horrid performance for a long time)
03:54 hotel oh, so it's not usually necessary?
03:54 geekosaur correct
03:55 hotel so here https://gist.github.com/HotelCalifornia/ff51508101d295f0ea52f79afc8bed69
03:55 geekosaur it'd be sufficient to just say `%env' as the last line
03:56 hotel oh cool
03:56 hotel thanks
03:56 geekosaur if you go look at some of the stuff sent to camelia in this channel, you'd have noticed that being done a lot
03:57 geekosaur e.g. `method foo { 42 }` earlier
03:57 Ben_Goldberg joined #perl6
04:06 hotel yeah, I was wondering in terms of methods with more calculations in them
04:10 sortiz joined #perl6
04:10 sortiz \o #perl6
04:24 hotel what happens when you define a method with the & twigil?
04:25 grondilu m: my &talk = sub { say "hi" }; talk
04:25 camelia rakudo-moar ac36d2: OUTPUT«hi␤»
04:25 grondilu oh sorry you meant a method
04:26 hotel also jk
04:26 hotel I misread it
04:26 grondilu I don't think it's possibl to define a method as variable.
04:27 hotel it was a sub in the end
04:29 jjido joined #perl6
04:29 sortiz m: my &foo = method () { self.say }; "Hi".&foo;
04:29 camelia rakudo-moar ac36d2: OUTPUT«Hi␤»
04:35 hotel if you use callsame from an anonymous function, does it call the other anonymous functions with the same symbol?
04:35 hotel s/symbol/signature/
04:36 hotel ignore me
04:39 sortiz hotel, a & sigiled variable can hold any Callable, and Method does Callable.
04:39 BenGoldberg m: my $f = sub ($x) { $x <= 1 ? 1 : $x * callsame($x-1) }; say $f.(4);
04:39 camelia rakudo-moar ac36d2: OUTPUT«5===SORRY!5=== Error while compiling /tmp/omOhBSW4hD␤Unsupported use of ? and : for the ternary conditional operator; in Perl 6 please use ?? and !!␤at /tmp/omOhBSW4hD:1␤------> 3my $f = sub ($x) { $x <= 1 ?7⏏5 1 : $x * callsame($x-1) }; say…»
04:39 BenGoldberg m: my $f = sub ($x) { $x <= 1 ?? 1 !! $x * callsame($x-1) }; say $f.(4);
04:39 camelia rakudo-moar ac36d2: OUTPUT«Too many positionals passed; expected 0 arguments but got 1␤  in sub  at /tmp/QSAdNG5JqY line 1␤  in block <unit> at /tmp/QSAdNG5JqY line 1␤␤»
04:39 hotel yeah yeah, I was misreading that
04:39 hotel I thought it said `method &foo`
04:40 hotel but it really said `my &foo = ...`
04:40 itcharlie left #perl6
04:41 hotel anyway, time for bed
04:41 hotel night
04:42 kaare_ joined #perl6
04:58 Cabanossi joined #perl6
05:03 ugexe m: my $xxx = sub ($a) { $a < 5 ?? &?ROUTINE($a+1) !! $a; }; say $xxx.(1)
05:03 camelia rakudo-moar ac36d2: OUTPUT«5␤»
05:29 jjido joined #perl6
05:32 verzit joined #perl6
05:32 cdg_ joined #perl6
05:33 sortiz ZoffixWin, ping.
05:37 jack_rabbit joined #perl6
05:42 CIAvash joined #perl6
05:52 dalek ecosystem: 54e7f0d | titsuki++ | META.list:
05:52 dalek ecosystem: Add Term::Readsecret to ecosystem
05:52 dalek ecosystem:
05:52 dalek ecosystem: See https://github.com/titsuki/p6-Term-Readsecret
05:52 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/54e7f0d76a
05:52 dalek ecosystem: ecb5339 | titsuki++ | META.list:
05:52 dalek ecosystem: Merge pull request #204 from titsuki/add-readsecret
05:52 dalek ecosystem:
05:52 dalek ecosystem: Add Term::Readsecret to ecosystem
05:52 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/ecb5339293
05:57 wamba joined #perl6
06:00 cdg joined #perl6
06:02 vendethiel- joined #perl6
06:29 TreyHarris joined #perl6
06:48 nadim Morning. Latest commit doesn't install  http://nopaste.linux-dev.org/?1098673  any ideas?
06:50 hotel joined #perl6
07:03 mr-foobar joined #perl6
07:10 maybekoo2 joined #perl6
07:13 mr-foobar joined #perl6
07:15 cpage_ joined #perl6
07:48 jjido joined #perl6
07:50 jjido_ joined #perl6
07:54 domidumont joined #perl6
07:58 firstdayonthejob joined #perl6
08:00 domidumont joined #perl6
08:07 firstdayonthejob joined #perl6
08:07 rindolf joined #perl6
08:08 jjido joined #perl6
08:15 darutoko joined #perl6
08:32 RabidGravy joined #perl6
08:41 domidumont joined #perl6
08:41 wamba joined #perl6
08:44 mr-foobar joined #perl6
08:48 masak good antenoon, #perl6
08:49 masak bazzar: fwiw, I've been toying with the idea of parsing out a postgres schema lately.
09:10 RabidGravy masak, but isn't it just query some stuff from information_schema
09:15 masak RabidGravy: ooh -- that's probably a lot better than parsing out text.
09:15 masak I haven't thought about this deeply yet -- thanks for the nudge in the right direction! :D
09:15 RabidGravy a *lot* easier
09:16 RabidGravy I don't think there's any of DBIx::Class::Schema::Loader that do it by parsing a DDL specification
09:16 masak right :)
09:17 masak so, here's my idea so far: query out the relevant details of the schema, then make sure they match some local JSON or YAML condensed version of that schema.
09:17 RabidGravy after all it is one of Ted Codds requirements for a relational database that the metadata be stored in the same way that the metadata is
09:17 masak that way, I can have tests that confirm that the database schema is what I think it is.
09:18 RabidGravy er s/metadata/normal data/
09:18 * masak .oO( Ted Codd requires that the tautology always be what the tautology is )
09:18 RabidGravy :)
09:18 RabidGravy not enough coffee has got tomy fingers yet
09:18 masak further, I can use the same JSON-YAML file to statically check all the queries made against the database.
09:19 masak all this in order to assert that app and database evolve together nicely.
09:19 masak also, I ought to be able to use the info in the JSON-YAML file if/when I want to mock the database.
09:22 RabidGravy I'm actually wondering if making a module to abstract the above for the DBs that DBIish supports will be a kick in the right direction to a proper full schema abstraction thingy
09:22 RabidGravy (hedging on whether that may be an ORM or something else)
09:23 masak I'm not actively against such plans :)
09:23 masak but I'm going to start by unabstractedly solving my own use cases
09:24 RabidGravy oh sure
09:30 darutoko joined #perl6
09:30 titsuki joined #perl6
09:32 sortiz In DBI there are a few methods for schema introspection (table_info, column_info, et. al.), something like that can be added to DBIish.
09:35 masak that's not a bad idea
09:35 masak I have a DBIish dependency anyway
09:35 masak oh, and I could look into what it'd take to provide a mocked database as a driver to DBIish
09:37 literal </w 3
09:37 sortiz In fact there is DBDish::TestMock, just for that kind of stuff.
09:41 masak oh wow
09:41 masak I should think out loud more often on this channel, clearly
09:41 cognominal joined #perl6
09:42 masak sortiz++
09:43 masak um, though https://github.com/perl6/DBIish/blob/ca68436d952bef65ba8d6ffec6c14b85ec50e795/lib/DBDish/TestMock/StatementHandle.pm6 is probably not enough for my purposes...
09:43 sortiz I get bored for lack of open issues to be resolved in DBIish ;-)
09:43 masak duly noted
09:45 Ven joined #perl6
09:48 masak well, I could submit some issue about DBDish::TestMock being locked down to a particular schema...
09:49 masak but I'm not entirely sure yet what it is I want instead
09:49 RabidGravy I'm still unable to obtain a login from IBM to download the Informix client SDK so no DBDish::Informix this week
09:54 RabidGravy FreeTDS could fly if there is something I can test it against
09:55 sortiz RabidGravy, if you have Informix and its ODBC driver, may be that DBDish::ODBC already supports it.
09:56 RabidGravy would still have to download the client sdk to get the ODBC driver
09:56 RabidGravy :\
09:56 sortiz :/
09:56 RabidGravy plus the native driver is much more fun
09:57 sortiz Sure, say that to me ;-)
10:00 domidumont joined #perl6
10:05 kurahaupo joined #perl6
10:13 RabidGravy WAHAY! Finally managed to log in to the IBM site
10:14 RabidGravy awful, the company clearly knows nothing about computer software
10:18 spider-mario joined #perl6
10:28 nadim Morning again,
10:29 nadim Latest commit doesn't install  http://nopaste.linux-dev.org/?1098673  any ideas?
10:36 RabidGravy when was the last time you updated?  That change went in weeks ago iirc
10:37 mr-foobar joined #perl6
10:38 sortiz nadim, I suspect that the problem is that the install attempt to install first NativeCall before the new required NativeCall::Types, so use for precomp an old (preinstalled) NC::Types and fails.
10:39 RabidGravy yeah that's what it looks like
10:43 RabidGravy why would "git remote" show nothing when pull and push are clearly working?
10:47 RabidGravy weird
10:48 RabidGravy anyhow just twatted it and re-cloned
10:52 Ven joined #perl6
11:05 mr-foobar joined #perl6
11:06 nowan_ joined #perl6
11:18 mr-foobar joined #perl6
11:24 kid51 joined #perl6
11:25 ZoffixWin sortiz, pong
11:27 domidumont joined #perl6
11:28 ZoffixWin What was it?
11:29 sunnavy_ joined #perl6
11:31 milwauke` joined #perl6
11:35 Emeric joined #perl6
11:37 sortiz ZoffixWin o/
11:37 ZoffixWin \o
11:37 moritz \o\o
11:38 sortiz I found this for you: https://gist.github.com/salortiz/051c7a81400522e30a7cf12377c02f70
11:38 * moritz fights with a blank screen after apt-get upgrade and reboot :(
11:39 moritz and the wiki interface on the old lapotp seems to be broken, with about 70% packet loss on an otherwise fine network
11:39 moritz *wifi
11:40 ZoffixWin press ctrl+alt+F1 to see the log messages from trying to start X?
11:42 ZoffixWin sortiz, cool. Much different than the way I was going about it.
11:42 ZoffixWin sortiz, you should submit it as a patch to http://modules.perl6.org/repo/POSIX
11:42 ZoffixWin I went with this one at the end: https://github.com/supernovus/perl6-datetime-format#strftime-str-format-datetime-dt-lang
11:43 perlawhirl joined #perl6
11:43 ZoffixWin Well, actually, I abandoned that part of the code altogether by now lol :P 4 wasted hours
11:44 perlawhirl Zoffix: The other thing about the module is that strptime is NYI
11:44 ZoffixWin I noticed last night
11:45 * ZoffixWin is also weary of supernovus's modules on account of the author saying on multiple occasions they aren't that involved with P6 anymore.
11:47 RabidGravy they accept patches though
11:53 |2701 joined #perl6
11:55 sortiz afk&
12:13 jjido joined #perl6
12:16 Relsak joined #perl6
12:18 ZoffixWin Yey! Finally moved all my blog posts to http://perl6.party/ Didn't realize I had so many :o
12:18 ZoffixWin m: say 14 / DateTime.today.week-number
12:18 camelia rakudo-moar cf199c: OUTPUT«Method 'today' not found for invocant of class 'DateTime'␤  in block <unit> at /tmp/rAFUpbHH95 line 1␤␤»
12:18 ZoffixWin m: say 14 / DateTime.new.today.week-number
12:18 camelia rakudo-moar cf199c: OUTPUT«Cannot make a DateTime object using .new␤  in block <unit> at /tmp/17y1cH5Zso line 1␤␤Actually thrown at:␤  in any  at gen/moar/m-Metamodel.nqp line 3055␤  in block <unit> at /tmp/17y1cH5Zso line 1␤␤»
12:18 ZoffixWin Well, that many per week lol :P
12:19 ZoffixWin m: say 14 / DateTime.now.week-number
12:19 camelia rakudo-moar cf199c: OUTPUT«0.777778␤»
12:19 ZoffixWin And I forget who said they missed the dancing cats (Xliff_ ?), but I brought them back: http://perl6.party/about
12:22 RabidGravy ZoffixWin, dancing cats!
12:24 stmuk I was a dancing cat fan
12:25 araujo joined #perl6
12:26 araujo joined #perl6
12:26 araujo joined #perl6
12:28 araujo joined #perl6
12:29 aries_liuxueyang joined #perl6
12:36 vaisian_ joined #perl6
12:39 Ven joined #perl6
12:46 aries_liuxueyang joined #perl6
12:48 darutoko joined #perl6
12:56 RabidGravy there isn't anyway of capturing the application of a parameterised role is there?  i.e. set an attribute without closing over the parameter in an accessor
12:59 * psch doesn't quite grasp the question
13:00 RabidGravy lizmat, with PackUnpack is there some way I'm missing of getting the byte length of an indivdual directive from the template (e.g. 'N' -> 4) ?
13:02 RabidGravy psch,  say I have "role Foo[Str $foo] { has Str $.foo; }" and want $.foo to be the parameter, and of course as I started typing it I released that I can just use it as a default initializer
13:02 RabidGravy me--
13:04 psch yay for rubber duck debugging \o/
13:09 finanalyst joined #perl6
13:10 Perl6IRC joined #perl6
13:27 aries_liuxueyang joined #perl6
13:28 Actualeyes joined #perl6
13:30 mr-foobar joined #perl6
13:33 dogbert17 joined #perl6
13:40 dalek doc: 9d1a02e | (Jan-Olof Hendig)++ | doc/Type/Dateish.pod:
13:40 dalek doc: Documented the yyyy-mm-dd method
13:40 dalek doc: review: https://github.com/perl6/doc/commit/9d1a02e308
13:41 _4d47 joined #perl6
13:42 Ven joined #perl6
13:43 mr-foobar joined #perl6
13:47 cdg joined #perl6
13:56 Actualeyes joined #perl6
13:56 mr-foobar joined #perl6
14:01 mr-foobar joined #perl6
14:20 ufobat joined #perl6
14:20 ufobat ola!
14:20 yoleaux 01:26Z <ZoffixWin> ufobat: is there no way at all to do async stuff with Bailador? Some of my requests can take up to 20 seconds and I looked through the code and see no user-space way to do async
14:21 ZoffixWin \o
14:22 ufobat ZoffixWin, :( no i am afraid not, according to my understanding you need to replay a supply as the content. but HTTP::Easy::PSGI is using the PSGI module
14:22 ZoffixWin :(
14:22 ufobat and the PSGI module waits until it is done :(
14:22 ufobat but!
14:22 ufobat HTTP::Server::Tiny is different.
14:23 ufobat and thats why I did the get-psgi-app, so it can easily run on other PSGI servers
14:23 TimToady joined #perl6
14:24 ufobat but i am not sure if this can handle supplys
14:25 ufobat ZoffixWin, https://github.com/tokuhirom/p6-HTTP-Server-Tiny/pull/29/commits/8568bb2bcd6643e69a795c58580270da02f22cb3#diff-c0a58c1c98f8c011a1987d2167aa590dR445
14:27 ZoffixWin wouldn't that still block just the same, since .receive is blocking?
14:30 ufobat i dont know. i am too new to perl6. i haven't played with channels nor supplies. i assumed it would block just for the next "block"
14:30 colomon joined #perl6
14:30 ufobat https://github.com/tokuhirom/p6-HTTP-Server-Tiny/blob/master/lib/HTTP/Server/Tiny.pm6#L323
14:31 ufobat this looks as if each block is sent as soon as possible
14:31 espadrine joined #perl6
14:32 ZoffixWin right, but my very first block would arrive after 30 seconds.
14:33 ZoffixWin I wonder if anyone tried seeing if things explode when you shove each request in its own start {}.
14:33 ZoffixWin Then on the framework end, you'd just write blocking code and it won't matter.
14:34 ufobat thats why a psgi app is supposed to return a promise, the webserver should not block in those 30 sec, it should be able to run other requests
14:35 ufobat so isnt that exactly what you're suggesting?
14:35 ufobat ah! there is a webserver implementation from zostay called smack, which is his p6sgi reference implementation
14:36 _4d47 left #perl6
14:36 ufobat i had not time to look at it so far, but its on my list :)
14:38 ZoffixWin Not exactly. As a user of the framework, all I want to care about is my current request. I don't want to think whether I need to return a Promise or hunt down which route is slowing down my entire app.
14:38 ufobat https://github.com/zostay/Smack
14:38 ZoffixWin m: start { } for ^1000; say now - INIT now
14:38 camelia rakudo-moar cf199c: OUTPUT«Memory allocation failed; could not allocate 14840 bytes␤»
14:38 ZoffixWin :/
14:39 ZoffixWin That runs in 0.17918281
14:39 ZoffixWin on my box.
14:40 ufobat the promise is part of the psgi spec, so you will(or must) return a promise anyway.
14:40 ufobat but yeah async stuff is on my todo list as well ;) but first i need a file upload.
14:41 ufobat looking forward for PR on the http/psgi servers to follow the spec, so bailador could run everywhere.
14:42 ZoffixWin heh, that's a programmer-defined limitation.
14:42 ZoffixWin And sri called that spec antiquated
14:44 ufobat the perl5 spec?
14:44 ufobat +psgi
14:45 ufobat i think zostay did a great job on making the p6sgi spec better :D
14:45 hotel_california joined #perl6
14:46 ZoffixWin ufobat, no, on zostay's P6SGI spec. While there seems to be a mismatch between the nicks he used in response, reading around the conversation indicates that he indeed was talking about the link muraiki addressed him with: http://irclog.perlgeek.de/perl6/2016-01-05#i_11834621
14:47 ZoffixWin I don't say we take everything sri says as mana, but he does have good amount of expertise and did point out the RoR example too.
14:49 ZoffixWin *manna
14:51 ufobat a interesting discussion :D i think i read it from the beginning ,)
14:52 vaisian joined #perl6
14:54 hotel joined #perl6
14:58 ZoffixWin Is increasing a variable like this not threadsafe? perl6 -e 'my $c = 0; await ^10000 .map: { start { $c++ } }; say now - INIT now; say $c'
14:58 ZoffixWin On every run it's missing 6-50 increments
15:03 ZoffixWin And once in a blue moon hangs indefinitely :/
15:07 RabidGravy yeah, I'm seeing between 0-3 being missed
15:08 RabidGravy it would be interesting at what point it kicks in (i.e. how many iterations)
15:09 * ZoffixWin is half-way through https://6guts.wordpress.com/2014/04/17/racing-to-writeness-to-wrongness-leads/
15:09 ZoffixWin I see ++ is mentioned as not safe **in that example** but it's unclear whether it's *still* unsafe in P6 :P
15:10 ZoffixWin I see one miss 50% of the time with ^100 starts
15:10 RabidGravy I would say there may be a  very slight danger of a race condition on updating the value, protecting the update with a lock seems to make it okay
15:10 RabidGravy e.g. "my $l = Lock.new; my $c = 0; await ^10000 .map: { start { $l.protect({$c++}) } }; say $c"
15:16 * ZoffixWin nods
15:16 ugexe cxreg: the bug you found yesterday is fixed now
15:16 ufobat ZoffixWin, i am neither a psgi nor a p6sgi expert, but my understanding of the P6SGI spec is that the server is responsible for parallel requests. If the server is doing to there is a `p6w.multithread` in the environment. and sri didnt metion why p6sgi is antiquated
15:17 ufobat and i know that sri is not psgi fan, because when you do async rendering in mojo with the psgi server backend you have some.. issues :/
15:18 ufobat maybe, fyi: http://blogs.perl.org/users/sterling_hanenkamp/2016/01/async-aborts-and-p6sgi.html
15:20 CIAvash joined #perl6
15:25 ufobat zostay: hm your HTTP::Supply test is not aborting on my box..
15:25 ugexe if this is what im thinking of, its not p6sgi that is antiquidated by psgi (implying a completely redesigned spec would be what they would do)
15:26 ugexe and by 'that is antiquidated' i mean was called antiquidated
15:26 winger_ joined #perl6
15:28 ufobat so i spent my time reading about psgi :D instead of implementing file uploads ;) *sigh* now its family time.. ttyl guys :)
15:28 ZoffixWin ufobat, I think it's more to do with locking yourself into some "spec" which makes it harder to react to future tech changes.
15:28 Ven joined #perl6
15:29 ugexe and designing the spec from the ground up around perl 6's strengths
15:29 ugexe s/the/a/
15:29 domidumont joined #perl6
15:30 ugexe still, by emulating what exists you are better learning the problem domain which may lead to such a new spec
15:31 ufobat aren't the difference between psgi and p6sgi are adressing the weaknesses of the psgi spec
15:33 ZoffixWin left #perl6
15:33 ufobat like the promise / supply thing
15:33 ufobat anyway :) i need to go now :)
15:35 ugexe thats trying to cram perl6 strengths into a spec that was designed around other things
15:37 titsuki joined #perl6
15:39 BenGoldberg joined #perl6
15:40 titsuki Hi. Sorry for veriy newbie-sh question. Does anyone know how to install panda from rakudo-star for windows( http://rakudo.org/downloads/star/rakudo-star-2016.04-x86_64%20(JIT).msi ) ?
15:40 titsuki *very
15:41 firstdayonthejob joined #perl6
15:41 ZoffixWin joined #perl6
15:42 ZoffixWin titsuki, it's already installed, but IIRC it's broken. See errata on http://perl6.org/downloads/
15:42 ZoffixWin titsuki, as an alternative, you can download and install zef: https://github.com/ugexe/zef
15:43 dogbert17 hello #perl6
15:44 titsuki Already installed ? But I cannot find panda in C:\rakudo\bin directory.
15:44 ZoffixWin \o
15:44 ZoffixWin titsuki, panda is part of R* distro. Try running where panda in the command prompt
15:44 dogbert17 I was taking a look at ZoffixWin's report https://github.com/perl6/doc/issues/497 hoping that I could document it a bit, but alas I can't figure out the syntax for sending a formatter to Date.new
15:45 ZoffixWin dogbert17, have you tried :formatter({ some code; })
15:45 dogbert17 I thinks so, hmm, let me try
15:46 ZoffixWin m: DateTime.new(0, formatter => { say 42; } ).Str.say
15:46 camelia rakudo-moar cf199c: OUTPUT«42␤True␤»
15:46 ZoffixWin works
15:46 dogbert17 Hmm, could it have something to do with the semicolon
15:47 ZoffixWin m: my $date = DateTime.new: 0; $date.formatter = { say 42; }; $date.Str
15:47 camelia rakudo-moar cf199c: OUTPUT«Cannot modify an immutable Callable␤  in block <unit> at /tmp/OGl8igpqlz line 1␤␤»
15:47 ZoffixWin m: DateTime.new(0, :formatter({ say 42; }) ).Str.say
15:47 camelia rakudo-moar cf199c: OUTPUT«42␤True␤»
15:47 ZoffixWin dogbert17, what's the error you're getting
15:47 nadim sortiz: thanks for the answer earlier. But what is the solution?
15:47 dogbert17 m: y $n = Date.new('2015-12-31', :&formatter({'test'}) ); # fail
15:47 camelia rakudo-moar cf199c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/dXm1uHjs6T␤Unsupported use of y///; in Perl 6 please use tr///␤at /tmp/dXm1uHjs6T:1␤------> 3y7⏏5 $n = Date.new('2015-12-31', :&formatter␤»
15:47 titsuki `where panda` returns none of lists ...
15:47 dogbert17 m: my $n = Date.new('2015-12-31', :&formatter({'test'}) ); # fail
15:47 camelia rakudo-moar cf199c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/zZbR0IeKg_␤Undeclared routine:␤    formatter used at line 1␤␤»
15:48 ZoffixWin titsuki, just use zef
15:48 ZoffixWin dogbert17, what's with '&'?
15:48 titsuki I see
15:48 titsuki I'll try zef
15:48 titsuki Thanks!
15:49 dogbert17 ok, it works now, but how do I specify the parameters, suppose I want a format like say yy/dd/mm
15:49 ZoffixWin dogbert17, it takes a callable.
15:49 ugexe you write the code to do that. thats what formatter is
15:50 ZoffixWin m: DateTime.new(0, formatter => { say $^a.year ; } ).Str.say
15:50 camelia rakudo-moar cf199c: OUTPUT«1970␤True␤»
15:50 ZoffixWin dogbert17, it takes one positional argument, the DateTime object
15:50 dogbert17 ugexe: yes, but how do I trick the date object to print it's year, month and day attributes?
15:52 ZoffixWin m: DateTime.new(0, formatter => sub ($self) { sprintf "%2d/%02d/%02d", .year.substr(2,2), .month, .day given $self ; } ).Str.say
15:52 camelia rakudo-moar cf199c: OUTPUT«70/01/01␤»
15:52 ZoffixWin Y2K!! :D
15:52 ugexe m: DateTime.new(0, formatter => { say $^a.attributes ; } ).Str.say
15:52 camelia rakudo-moar cf199c: OUTPUT«Method 'attributes' not found for invocant of class 'DateTime'␤  in block <unit> at /tmp/tBCskAIFYr line 1␤␤»
15:52 ugexe m: DateTime.new(0, formatter => { say $^a.^attributes ; } ).Str.say
15:52 camelia rakudo-moar cf199c: OUTPUT«(int $!hour int $!minute Mu $!second int $!timezone Int $!year Int $!month Int $!day Int $!daycount Callable &!formatter)␤True␤»
15:52 ugexe you are just accessing the object
15:52 ZoffixWin dogbert17, you don't "trick it." You get that object inside your formatter and you can call any methods your Dateish thing provides
15:52 dogbert17 ok, like Zoffix did then
15:53 ugexe m: DateTime.new(0, formatter => { say $^a.^methods; } ).Str.say
15:53 camelia rakudo-moar cf199c: OUTPUT«(new now clone Instant posix offset offset-in-minutes offset-in-hours later truncated-to whole-second in-timezone utc local Date daycount day-of-month IO day-of-week days-in-month earlier week week-number is-leap-year week-year weekday-of-month yyyy-mm-dd …»
15:53 dogbert17 ok, I think I get it, let me whips something together and create a PR
15:53 dogbert17 ZoffixWin++, ugexe++
15:53 Ben_Goldberg joined #perl6
15:54 ZoffixWin m: print DateTime.new(now, formatter => { $^a.yyyy-mm-dd } )
15:54 camelia rakudo-moar cf199c: OUTPUT«2016-05-07»
15:54 ZoffixWin m: print DateTime.new(now, formatter => *.yyyy-mm-dd )
15:54 camelia rakudo-moar cf199c: OUTPUT«2016-05-07»
15:54 dogbert17 :) I should be able to do something with this
16:09 RabidGravy is it possible to bind an objects attributes to the elements of an array such that update the elements of the array updates the attributes and vice-versa
16:09 RabidGravy I thought it was but can't find the right incantation
16:14 dogbert17 m: my $n = Date.new('2015-12-31', formatter => sub ($self) { sprintf "%2d/%02d/%02d", .year.substr(2,2), .month, .day given $self; } ); say $n.later(:1day); # how do I keep the format?
16:14 camelia rakudo-moar cf199c: OUTPUT«2016-01-01␤»
16:15 dogbert17 as soon as I do some kind of operation o the Date I get a new instance with the default formatter
16:15 skink joined #perl6
16:15 dogbert17 how do I keep my shiny new one?
16:16 vaisian_ joined #perl6
16:17 ZoffixWin dogbert17, I don't think you can. You get a new DateTime object as a result of the operation
16:17 Actualeyes left #perl6
16:18 psch Date.later returns self.new, i.e. Date
16:18 psch but otherwise yes
16:18 ZoffixWin m: my $n = Date.new('2015-12-31'); say Date.new: $n.later(:1day), formatter => sub ($self) { sprintf "%2d/%02d/%02d", .year.substr(2,2), .month, .day given $self; }
16:18 camelia rakudo-moar cf199c: OUTPUT«16/01/01␤»
16:19 dogbert17 ah, so that's what you have to do then
16:21 BenGoldberg You could make a subclass of Date, which always passes it's formatter in when making new children...
16:23 dogbert17 BenGoldberg: thx, that might be a way, do you know if it's possible to change the formatter on an already created object?
16:24 psch m: my &formatter = sub { sprintf "%2d/%02d/%02d", .year, .month, .day given $^a }; my &new-date = Date.^can('new')[0].candidates[3].assuming(Date, *, :&formatter); my $n = Date.today; say &new-date($n.later(:1day))
16:24 camelia rakudo-moar cf199c: OUTPUT«2016/05/08␤»
16:24 psch dogbert17: you can, but only with 'use nqp;' and nqp::bindattr
16:24 stmuk is GH slow or is it me?
16:25 psch dogbert17: depending on how internals-reliant you want to be that may or may not be a good idea :)
16:25 ZoffixWin works fine for me
16:27 dogbert17 psch: thanks, I'm just trying to wrap my head around how you're supposed to work with the formats. Suppose I have done some date related calcs during which I have received several Date instances and now, at the end of the calculation I want to write it out the U.S. way
16:27 dogbert17 chances are that I have lost the formatting routine along the way
16:28 * dogbert17 or am I just being silly?
16:28 ugexe you can use .wrap, roles, inheritence, monkey-typing... many ways to do what you want
16:28 jjido joined #perl6
16:30 psch dogbert17: i do think it's somewhat inconvenient that the formatter isn't passed along, but then you'd probably not want to have modules force formatters onto you either
16:30 psch dogbert17: i'd just do all the calculation without worrying about the format and create a new Date object when it's time to print it
16:31 psch ...and add the formatter then
16:31 ZoffixWin psch, you'd also have conflicts on how to decide which formatter to choose on operations of two dates
16:31 ZoffixWin dogbert17, I think the primary purpose of the formatter is to return a Dateish that will look a specific way when printed(), yet still behave like a Dateish if manipulated.
16:33 dogbert17 thanks guys, my only goal was to write something i Dateish.pod but I guess I got carried away :)
16:33 itaipu joined #perl6
16:33 dogbert17 s/i/in/
16:33 ZoffixWin like a superposition of Str and Dateish that collapses into one or the other the first time you try to see what it is
16:34 * psch boggles slightly
16:34 ZoffixWin :)
16:34 ZoffixWin The metaphor isn't exactly accurate (don't use it in the docs)
16:35 psch i mean, formatter is just how to represent the Dateish when .Str or .perl
16:35 wamba joined #perl6
16:35 psch err, .gist, not .perl
16:36 psch m: say Date.new(Date.today, :formatter(*.perl));
16:36 camelia rakudo-moar cf199c: OUTPUT«Date.new(2016,5,7)␤»
16:37 ZoffixWin left #perl6
16:38 psch :/
16:53 * skink is trying to figure out how to get the rakudo-star msi working right in appveyor
16:58 timotimo it's windows, so you probably have to put in a "reboot" step after installing the .msi
17:03 ZoffixWin joined #perl6
17:04 dogbert17 ZoffixWin: how about https://gist.github.com/dogbert17/829e1adf6c6f9b03f2f47d9eb1a2c72e
17:05 dogbert17 we at least get one formatter example in there
17:06 ZoffixWin dogbert17, 'defined as' is wrong, it works on a Dateish. The rest looks fine to me
17:08 dogbert17 ZoffixWin: do you want method formatter(Dateish:D:) instead?
17:09 ZoffixWin dogbert17, yeah
17:10 ZoffixWin It's provided by the Dateish role, which is composed into Date and DateTime and whatever else user wants to compose it into: https://github.com/rakudo/rakudo/blob/nom/src/core/Dateish.pm#L40
17:10 moritz ok, laptop emergency solved by reinstalling the OS
17:10 ZoffixWin Rather this, I guess: https://github.com/rakudo/rakudo/blob/nom/src/core/Dateish.pm#L6
17:10 moritz why does this feel like Windows, not Linux?
17:11 moritz ... and the Terminal doesn't do UTF-8 anymore :(
17:11 dogbert17 ok, I'll fix that :)
17:12 * ZoffixWin finally finished rewritting huggable from scratch.
17:12 ZoffixWin I even taught her to hug :P
17:12 dogbert17 ZoffixWin: gist updated.
17:13 ZoffixWin dogbert17, 👍
17:16 dalek doc: b6fa110 | (Jan-Olof Hendig)++ | doc/Type/Dateish.pod:
17:16 dalek doc: Updated docs for 'formatter'. ZoffixWin++, ugexe++, psch++
17:16 dalek doc: review: https://github.com/perl6/doc/commit/b6fa110740
17:16 dogbert17 done
17:17 Ben_Goldberg joined #perl6
17:17 ZoffixWin dogbert17++
17:17 skink Weird
17:17 dogbert17 ZoffixWin: not really a fan of writing docs but it's a good way to learn stuff
17:17 araujo joined #perl6
17:17 skink When I install the Rakudo MSI in Wine, it automatically updates %PATH%
17:17 John[Lisbeth] joined #perl6
17:17 skink But does not do so in AppVeyor
17:19 araujo joined #perl6
17:19 araujo joined #perl6
17:19 Ben_Goldberg joined #perl6
17:19 cxreg ugexe++ smls++
17:19 ZoffixWin dogbert17, you can add 'Closes #333' in commit messages to automatically close issue 333.
17:20 ZoffixWin Fixes #43432 works too, IIRC
17:20 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=43432
17:20 ZoffixWin synopsebot6, shush
17:20 dogbert17 ZoffixWin: didn't know that :)
17:25 BenGoldberg joined #perl6
17:27 huggable joined #perl6
17:27 ZoffixWin huggable, hug me
17:27 * huggable hugs ZoffixWin
17:27 ZoffixWin huggable, no bikeshedding please
17:27 huggable ZoffixWin, nothing found
17:27 ZoffixWin huggable, no bikeshedding
17:27 huggable ZoffixWin, nothing found
17:27 ZoffixWin :/
17:27 BenGoldberg huggable, huggable
17:27 huggable BenGoldberg, nothing found
17:27 BenGoldberg huggable, help
17:27 huggable BenGoldberg, nothing found
17:28 * BenGoldberg thinks this channel needs an infobot of some sort, not unlike perlbot on #perl.
17:29 ZoffixWin Isn't that what huggable does?
17:29 BenGoldberg Is that what he's for?
17:30 ZoffixWin She's for that yeah.
17:30 huggable joined #perl6
17:30 ZoffixWin huggable, no bikeshedding please
17:30 huggable ZoffixWin, 🚳
17:30 ZoffixWin huggable, hug BenGoldberg
17:30 * huggable hugs BenGoldberg
17:30 BenGoldberg huggable, huggable
17:30 huggable BenGoldberg, See https://github.com/zoffixznet/huggable
17:30 BenGoldberg huggable, perl6
17:30 huggable BenGoldberg, nothing found
17:31 BenGoldberg huggable, perl6 is awesome.
17:31 huggable BenGoldberg, nothing found
17:31 ZoffixWin :is:
17:31 skink Agh, apparently the msi is silently failing
17:31 BenGoldberg huggable, perl6 :is: awesome.
17:31 huggable BenGoldberg, Added perl6 as awesome.
17:31 skink Anyone here familiar with using appveyor?
17:32 ZoffixWin .tell AlexDaniel huggable is back with 99% of its db restored :P
17:32 yoleaux ZoffixWin: I'll pass your message to AlexDaniel.
17:32 moritz somehow this question seems to come up here regularly in recent days
17:33 * BenGoldberg sighs sadly.  Google chrome got borked somehow when I hibernated my computer.  It did not used to do that!
17:33 moritz maybe somebody should seek an appveyor-related IRC channel and gather some knowledge about it?
17:34 cdg joined #perl6
17:34 TimToady hotel: you can also use Z= if you don't like the parens
17:34 TimToady m: my $a, my $b; $a, $b Z= split " ", "hello world"; say $a; say $b
17:34 camelia rakudo-moar cf199c: OUTPUT«hello␤world␤»
17:34 vaisian joined #perl6
17:35 TimToady btw, split " ", "hello world" is usually better spelled "hello world".words or so
17:36 TimToady m: say words "hello world"
17:36 camelia rakudo-moar cf199c: OUTPUT«(hello world)␤»
17:36 TimToady or that
17:37 RabidGravy skink, the nearest I got to appveyor was azawawi sent me a PR to make one of modules compile with it
17:37 skink heh
17:39 ugexe are you installing the msi in app veyor? or installing rakudo some other way
17:41 skink Yeah, downloading and installing the msi per appveyor docs
17:42 skink Originally I was building it, which works, but took a looong time
17:43 skink ugexe, Current revision: https://github.com/skinkade/openssl/blob/WinTests/appveyor.yml
17:44 skink fails on the dir command indicating it didn't actually install it
17:47 ufobat ZoffixWin, about the issue.. the 'use Bailador' approach has a Bailador::App inside. All exported subs from 'Bailador' modify or use this app. But this app only gets started if you invoke "baile". i am happy that you got your code working, but i dont see how you run into that issue. you're not 'baile'ing but running your app with a webserver. :-( we can track it down or i simply write more documentation.. ;-)
17:51 ZoffixWin ufobat, it's probably because of the use of some of the subroutines exported by Bailador
17:51 ZoffixWin or maybe I was calling just return template() instead of self.template or whatever
17:52 ufobat ah yeah
17:52 ufobat thats it!
17:52 ugexe skink: first you probably want to remove the `/quiet`, as that might dump some debug output to stdout
17:52 ufobat the sub template exported by Bailador uses the app inside Bailador, not your own app!!!
17:53 huggable joined #perl6
17:53 mst that isn't the same app? that sounds bizarre
17:53 ufobat not unless you set it
17:53 ufobat what you have when you do a 'use bailador' is like mojolicous::lite
17:53 mst so why isn't template() the same as self.template() ?
17:54 ZoffixWin it is
17:54 ZoffixWin Well, self in self.template() is a different app.
17:54 mst right, which seems strange to me
17:55 mst surely the DSL is curried config methods for the app instance you're working with
17:55 ufobat it woudn't behave like that if you set your app inside bailador
17:55 ufobat there is a exported sub for this
17:56 mst why aren't the route handlers being invoked as methods on the same app, so you don't need the extra step?
17:56 ufobat it is a bit strange, it took to long to figure out what's going on
17:56 mst Mojo handles this, Dancer2 handles this, not sure why perl6 is trying to be more clumsy than perl5 in a method invocation when half the fun of perl6 is method invocations being easier?
17:58 ufobat i am not perfectly sure what you suggest to be different. the handles are methods of the app.
17:59 ufobat it could probably be implemented better, but i dont know it better so far :-(
17:59 mst I don't understand how it ended up how it is
17:59 ufobat zoffix had 2 apps.
18:00 ZoffixWin mst, it just has a class variable that it sets to a default app unless you set one yourself by calling app() and DSL is just a bunch of subs that call Bailador::App methods on that class variable
18:00 ufobat there is a app when you use all the exported subs. and if you write your app by inheritng fomr bailador::App there is your real app
18:01 mst class variable?
18:01 mst wat
18:01 ZoffixWin yeah :}
18:01 mst why would there by a class variable involved at all?
18:01 ZoffixWin I dunno
18:01 ZoffixWin Not everyone is a genius programmer.
18:02 ufobat that's how it was for quite a while :(
18:02 ufobat or is
18:02 mst ufobat: did you not look at mojo or dancer2 at all?
18:02 TimToady .oO(Hang the genius programmers on the right peg...)
18:02 ufobat i did
18:02 ufobat i just didnt change it so far
18:02 mst both of them do this with closures rather than a magic global variable
18:02 ufobat PR are welcome :)
18:04 TimToady .oO(Torment the early adopters on behalf of the late adopters...)
18:04 mst ... change it?
18:05 mst the idea of prior art is ... you look first ... to steal ideas before you start :)
18:06 TimToady More Fun™ the other way
18:06 ZoffixWin mst, change it because I don't think ufobat started Bailador, but inherited it
18:06 mst aha
18:06 spider-mario joined #perl6
18:06 ufobat i think bailador::app used to be a singleton, when i started to add some stuff it was a "semi" singelton..
18:07 mst ooooh, right
18:07 mst so it started off using the simpleton antipattern
18:07 mst and is slowly being rescued
18:07 * mst wishes we could build something into the compiler so that every time a newbies attempts to implement a simpleton they got a gentle electric shock and a link to a page full of alternatives
18:07 mst (pretty sure this would've saved me some time back in the day too)
18:08 * tadzik hides
18:08 tadzik to my defense, I wrote it on a napkin during my spanish classes
18:08 ZoffixWin :)
18:11 ufobat i am open for critique and stuff. so anything is welcome.
18:11 mst hard for me to be that helpful with it, given that entire style mostly makes me respond with 'wait, http method first? have you of you people even heard of REST? aaaaaaaaaaaaa *sob*'
18:12 mst but "your delcarative-style mutative DSL should probably be exporting subs that curry method calls onto a builder object that itself then is attached to an app object it's building" seems like, albeit maybe a little bit of effort, well worth it
18:13 araujo joined #perl6
18:15 araujo joined #perl6
18:15 araujo joined #perl6
18:16 AlexDaniel joined #perl6
18:16 AlexDaniel .
18:16 yoleaux 17:32Z <ZoffixWin> AlexDaniel: huggable is back with 99% of its db restored :P
18:16 AlexDaniel ZoffixWin: thank you!
18:16 ZoffixWin huggable, hug AlexDaniel
18:16 * huggable hugs AlexDaniel
18:16 AlexDaniel oh
18:16 AlexDaniel new feature?
18:16 ZoffixWin :P
18:16 cdg joined #perl6
18:16 ZoffixWin Yeah
18:17 ZoffixWin can also do:
18:17 mst ufobat: does the above sentence make some sort of sense? I'm happy to discuss architecture bits, just not 100% sure I'm the right person for 'user facing API' when it's a style of user-facing-API I'm not 100% fond of :)
18:17 ZoffixWin huggable, hug me
18:17 * huggable hugs ZoffixWin
18:17 timotimo huggable, hug huggable
18:17 * huggable hugs huggable
18:17 timotimo huggable, hug it
18:17 * huggable hugs it
18:18 ambs huggable: hug yourself.
18:18 * huggable hugs yourself.
18:18 ambs ts sk sk
18:18 ufobat mst, well... i am still thinking about it.
18:19 ufobat i think i dont understand how such a code would look like
18:19 ilmari huggable: hug you
18:19 * huggable hugs you
18:19 ilmari huggable: hug everyone
18:19 * huggable hugs everyone
18:19 * huggable hugs 4
18:19 ZoffixWin heh
18:20 * huggable hugs 4
18:20 AlexDaniel who would have thought, right?
18:20 maybekoo2 left #perl6
18:20 AlexDaniel ZoffixWin: anyway, so what's the placeholder?
18:21 ufobat mst: why should the builder be attached to the app? why not just building the app just before you call 'baile'
18:21 ugexe i would use a adapter dependency inversion facade visitor aggregate pattern
18:21 AlexDaniel ZoffixWin: or how can I create similar actions?
18:21 ZoffixWin AlexDaniel, in where? Your own bot?
18:22 AlexDaniel ZoffixWin: no, in huggable
18:22 AlexDaniel ZoffixWin: like foo :is: foo ?someone?! or what is it?
18:22 AlexDaniel %s?
18:22 ZoffixWin AlexDaniel, oh, no placeholder. I just wrote a small Hug.pm6 plugin: https://github.com/zoffixznet/huggable/blob/master/lib/IRC/Client/Plugin/Hug.pm6
18:22 AlexDaniel :(
18:22 ZoffixWin The :is: is part of the Factoid plugin
18:23 mst ufobat: eh?
18:23 AlexDaniel ZoffixWin: another thing I'd love to see is, uh, so that I could make huggable speak to somebody else
18:23 AlexDaniel ZoffixWin: like
18:23 AlexDaniel huggable: tell ZoffixWin dunno
18:23 huggable AlexDaniel, nothing found
18:23 AlexDaniel huggable: dunno
18:23 ufobat i misread you .(
18:23 huggable AlexDaniel, nothing found
18:23 AlexDaniel huh?
18:24 ZoffixWin AlexDaniel, oh, that one is missing. The "backup" I got had unicode mangled
18:24 grondilu joined #perl6
18:24 mst ufobat: oh, yeah, it should, but then you have to cram everything the builder knows how to do to the app into the app's new() method, which isn't always an advantage
18:24 ZoffixWin huggable, dunno :is: ¯\_(ツ)_/¯
18:24 huggable ZoffixWin, Added dunno as ¯\_(ツ)_/¯
18:24 mst ufobat: and if your DSL is currently global all the way, I'd bet that wouldn't be the easiest refactor to do first
18:25 mst ufobat: but, yeah, if I was designing it from scratch, and willing to take the time to get that to work, I'd do it the way you just suggested
18:25 ugexe good ol strategy pattern
18:25 mst ufobat: just it's probably more work than what I suggested and I was trying for "how would I end up not regarding this as a code smell in the fewest number of rectoring steps" :)
18:25 mst ugexe: eh?
18:26 skink ugexe, No output with or without additional flags, let alone /quiet
18:26 mst don't get all computer sciencey on me, I'm an easily confused ex-mathematician ;)
18:27 ufobat i am confused because i feel like i didnt suggest anything
18:28 mst 'why not just build the app'
18:28 zakharyas joined #perl6
18:28 ufobat ah sorry
18:28 lizmat RabidGravy: re http://irclog.perlgeek.de/perl6/2016-05-07#i_12447261 , PackUnpack is supposed to be close to P5's implementation
18:28 lizmat RabidGravy: how would you do that in P5 ?
18:29 dalek doc: e848c76 | (Jan-Olof Hendig)++ | doc/Type/IO/Handle.pod:
18:29 dalek doc: Documented the 'opened' method
18:29 dalek doc: review: https://github.com/perl6/doc/commit/e848c767e5
18:29 RabidGravy lizmat, I wouldn't do what I'm trying to do in P5 ;-)
18:30 lizmat well, then you can't  :-)
18:30 AlexDaniel huggable: hug me
18:30 * huggable hugs AlexDaniel
18:30 AlexDaniel m: say “/me hugs %ENV<ME>”
18:30 camelia rakudo-moar cf199c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/3xPgNSF0Kv␤Variable '%ENV' is not declared␤at /tmp/3xPgNSF0Kv:1␤------> 3say “/me hugs 7⏏5%ENV<ME>”␤»
18:30 lizmat I really see PackUnpack as a drop in for pack/unpack in P6 and v5
18:30 AlexDaniel m: say “/me hugs %*ENV<ME>”
18:30 camelia rakudo-moar cf199c: OUTPUT«/me hugs AlexDaniel␤»
18:30 ugexe im probably off, but strategy pattern just encapsulates some interface in which you can use a multi method to processing individual arguments
18:30 ugexe mst^
18:31 lizmat RabidGravy: nothing more, nothing less
18:31 ZoffixWin :o
18:31 ZoffixWin AlexDaniel, hax
18:31 ZoffixWin m: say “/me hugs %*ENV<ME>”
18:31 camelia rakudo-moar cf199c: OUTPUT«/me hugs ZoffixWin␤»
18:31 ZoffixWin neat
18:33 AlexDaniel m: say [~] %*ENV<ME>.comb.pick: *
18:33 camelia rakudo-moar cf199c: OUTPUT«eAlDenxial␤»
18:33 AlexDaniel m: say [~] %*ENV<ME>.comb.pick: *
18:33 camelia rakudo-moar cf199c: OUTPUT«lnlAexaiDe␤»
18:33 AlexDaniel m: say ([~] %*ENV<ME>.comb.pick: *).tc
18:33 camelia rakudo-moar cf199c: OUTPUT«EAaixenllD␤»
18:33 AlexDaniel hmm
18:33 AlexDaniel m: say ([~] %*ENV<ME>.comb.pick: *).lc.tc
18:33 camelia rakudo-moar cf199c: OUTPUT«Ialeaelndx␤»
18:33 mst ugexe: oh, I guess you could use that instead of what I was thinking, sure
18:33 mst I was just thinking 'curried method calls'
18:33 psch AlexDaniel: you can leave of the second . there
18:33 AlexDaniel m: say ([~] %*ENV<ME>.comb.pick: *).lctc
18:33 camelia rakudo-moar cf199c: OUTPUT«Method 'lctc' not found for invocant of class 'Str'␤  in block <unit> at /tmp/Tn9zHhaLRN line 1␤␤»
18:33 psch AlexDaniel: oh, no, sorry
18:33 psch AlexDaniel: gotta switch them around too :/
18:33 AlexDaniel m: say ([~] %*ENV<ME>.comb.pick: *).tclc
18:33 camelia rakudo-moar cf199c: OUTPUT«Leaalnxide␤»
18:33 AlexDaniel great
18:34 ufobat mst, so your suggestion with the builder object attached to the app, how would this end up... when does the app do something with the builder object?
18:35 mst eh?
18:35 mst the app ... doesn't
18:35 mst other way around
18:36 ufobat i am not getting the "attach the builder to the app" part
18:36 mst so 'get $path, $sub;' # as a sub call
18:36 ugexe something like $class.*method to curry the results along to the next argument instead of returning a set of results might be cool
18:36 mst does roughly $builder.get($path, $sub)
18:37 mst and then inside that, you're doing $!app.add_route('get', $path, $sub)
18:37 AlexDaniel m: print 8.chr x 27; say “/me hugs %*ENV<ME>”
18:37 camelia rakudo-moar cf199c: OUTPUT«/me hugs AlexDaniel␤»
18:37 mst the 'builder' thing is just somewhere to keep that logic that you can compose roles into etc. so plugins can extend the DSL
18:38 mst builder is entirely possibly the wrong name for it enterprise-pattern-wide
18:38 ufobat ahh, not it makes sense! thank you!
18:38 ufobat now
18:38 AlexDaniel ZoffixWin: I wonder if that ↑ works on some irc clients :)
18:39 mst ufobat: and then basically your 'default' case then becomes
18:39 AlexDaniel ZoffixWin: I mean, I don't expect it to actually /me, but the backspace thingy itself
18:39 mst ufobat: $builder.new(:app($global_class_app)).export();
18:39 mst (roughly, do excuse me half perl5 half perl6 pseudocoding)
18:40 ZoffixWin huggable hug foof
18:40 ZoffixWin huggable, hug foof
18:40 * huggable hugs foof
18:40 mst ur huggable is defective
18:41 ZoffixWin Why?
18:41 ZoffixWin m: my $b = 8.chr x 27; say “/me hugs %*ENV<ME>$b”
18:41 camelia rakudo-moar cf199c: OUTPUT«/me hugs ZoffixWin␤»
18:41 psch apparently ilbot3 strips those weird thingies you do there at least
18:41 mst because it just hugged a nonexistant nick that wasn't even a valid IRC nick?
18:42 psch huggable: hug herself and sobs
18:42 * huggable hugs herself and sobs
18:42 ZoffixWin mst, that's a feature not a bug! :D
18:42 mst psch++
18:43 ufobat mst but just for the thing zoffix did, having a $global_class_app and a own class inherting Bailador::App this woudn't help. because the builder has nothing to do with your class..
18:45 ugexe class Builder { has $.app handles /*/; }; ?
18:45 ZoffixWin ufobat, right, because you also have subs that you call inside route callables.
18:45 ZoffixWin ufobat, have you seen Growing Guide that shows the process of converting a ::Lite mojo app into a full one? http://mojolicious.org/perldoc/Mojolicious/Guides/Growing
18:45 ufobat not yet, ZoffixWin
18:46 ufobat ugexe, ?
18:47 ZoffixWin ::Lite is basically for quit prototyping and you can continue using for small apps and convert to a full app when it grows. With Bailador, (currently) you just have a choice between using the sub interface or the class-y interface and you have to explode a lot of stuff if you want to get fancy.r
18:47 ZoffixWin s/quit/quick/;
18:49 ugexe basically you provide a interface/contract for what some class needs to implement. then the 2 classes do not need to know anything about one another other than it does method XXX and method YYY
18:49 ZoffixWin m: class Builder { has $.app handles *; }; my $b = Builder.new: :app('meow'); say $b.uc; $b = Builder.new: :app(class { method frob { rand } }.new); $b.frob.say
18:49 camelia rakudo-moar cf199c: OUTPUT«MEOW␤0.994158023560217␤»
18:49 ufobat the 'use Bailador' thingy is the ::lite approach. and i think if there would be a $controller passed to the callable
18:50 ZoffixWin left #perl6
18:50 AlexDaniel “quit prototyping” :)
18:51 ufobat and the $c is capable of doing more, everything would be more easy. but this would break other web apps using the classical bailador approach
18:51 ufobat thats why i haven't thought much about it. i didnt want to break runnig code
18:51 mst ufobat: aye, fair enough
18:52 mst I'm ... blah, I'm convinced there's a way to square the circle but I'm not awake/alive enough today to quite figure it out
18:52 mst I'll have to try and think about this again later, sorry
18:54 ufobat thanks for the feedback :) mst, i appreciate it
18:55 mst if you look at the internals of Dancer2::Core::DSL you can see my last attempt at producing something sort of like this that I didn't dislike overly, though there's a few things about that that I think I got wrong
18:55 ufobat i assumed the approach through inherting from Bailador::App would result in a better interface and not breaking old code
18:56 ufobat but did i get you right, you like the "use exported subs" way better?
18:56 BenGoldberg joined #perl6
18:56 ufobat mst i
18:56 ufobat 'll read it
18:56 mst I know some people find the exported subs approach more elegant and easy to write
18:57 mst I'm not actually fond of it myself, really, but since Dancer/Dancer2 has turned out to be more accessible to a lot of people
18:57 mst I've been thinking about the design problems in the vein of "how do I allow the exported subs approach for whipuptitude without interfering with manipulexity later"
18:58 mst ufobat: so, no, I don't like it better, but I want to be able to share an ecosystem with people who do :)
18:58 ugexe m: role Bar { method xxx($a is rw) { $a += 10; }; }; role Bar2 { method xxx($a is rw) { $a += 20 }; }; class Foo { }; my $foo = Foo.new; $foo does Bar; $foo does Bar2; my $work = 1; say $foo.*xxx($work)
18:58 camelia rakudo-moar cf199c: OUTPUT«(21 31)␤»
18:59 ufobat mst and it's not enoght doing a app $incance-of-my-class-hat-inhertied-from-bailador-app (a sub which is exported) and then everthing would work as expected
18:59 mst I refer you to my previous "I've concluded I'm not awake enough to be confident about trying to analyse the details", sorry
18:59 ufobat because this would be possible
18:59 ufobat :D
19:00 mst I'd rather refuse to answer than give answers I think are quite possibly bull excrement
19:00 mst also, I have to go meet somebody
19:00 mst but I'd love to discuss this again when I'm actually capable of being properly useful to you :D
19:00 mst &
19:00 ufobat mst++
19:09 * tadzik wondews how much work would there be to turn rakudo-js into rakudo-webassembly
19:15 timotimo um, isn't that a very big difference?
19:16 timotimo like, rakudo-js is trying to emit javascript source code, webassembly is basically assembly code?
19:17 timotimo as in, it'd be almost easier to turn moarvm into a webassembly blob and run code that way?
19:21 masak timotimo: webasm is standardized starting from asm.js, which is a subset of JavaScript
19:22 skink MadcapJake, You around?
19:24 jjido joined #perl6
19:24 MadcapJake A little. I'm out shopping.
19:25 grondilu masak: you sure?  wasm will have its own designed AST so it should be possible to generate it to target wasm without going through javascript.
19:27 tadzik turning moarvm into webassembly sounds even cooler :D
19:27 skink MadcapJake, Does that choco stuff for r* still work?
19:28 MadcapJake No its old, I haven't been on Windows in years. Use the rakudo star msi
19:28 masak grondilu: yes, that's still true.
19:29 hankache joined #perl6
19:29 hankache hello #perl6
19:29 masak grondilu: I'm just pointing out that the starting material is not all that different in spirit from asm.js -- though the format is
19:29 skink MadcapJake, That's the problem. I'm trying to get the msi to work in appveyor and I'm having a doozy of a time
19:30 MadcapJake Rakudo has an appveyor setup doesn't it?
19:32 lizmat hankache o/
19:33 hankache hiya lizmat
19:34 hotel_california joined #perl6
19:36 vaisian_ joined #perl6
19:37 skink Oh wow I actually got it working
19:38 skink Only took eight commits :D
19:39 grondilu in any case rakudo.js will certainly help targetting wasm
19:40 grondilu (just as asm.js helps implementing it I guess)
19:41 hotel joined #perl6
19:45 skink ugexe, Any idea what this means?: https://github.com/sergot/openssl/issues/19
19:45 skink I'm getting the same error
19:46 hotel_california joined #perl6
19:51 hotel joined #perl6
19:56 tailgate Is there an example of overriding gist() in your own class? I'm having trouble getting it right
19:56 psch m: class A { method gist { "my special own class" } }; say A.new
19:56 camelia rakudo-moar f9db92: OUTPUT«my special own class␤»
19:57 psch tailgate: the only thing i'd consider of note there is that you just return the gist, and don't try to &say it yourself in the method
19:57 psch tailgate: what exactly doesn't work for you?
19:58 tailgate I think the problem is I typed return $str; rather than just not having "str"
19:58 tailgate Basically it's say (Any) rather than what I return
20:01 psch m: class A { method gist { my $str = "my special own class"; return $str } }; say A.new
20:01 camelia rakudo-moar f9db92: OUTPUT«my special own class␤»
20:01 psch tailgate: i think actual code would help more to figure out what's wrong with your... actual code :)
20:02 masak m: class A { method gist { "my special own class" } }; say ~A.new
20:02 camelia rakudo-moar f9db92: OUTPUT«A<62383072>␤»
20:02 masak m: class A { method gist { "my special own class" }; method Str { self.gist } }; say ~A.new
20:02 camelia rakudo-moar f9db92: OUTPUT«my special own class␤»
20:03 yqt joined #perl6
20:05 pierrot joined #perl6
20:48 AlexDaniel .tell ZoffixWin this \o[001] issue is scary
20:48 yoleaux AlexDaniel: I'll pass your message to ZoffixWin.
20:50 dolmen joined #perl6
20:51 jjido joined #perl6
21:08 TEttinger joined #perl6
21:09 rindolf AlexDaniel: why is it scary?
21:09 timotimo i don't even know what issue that is
21:10 * huggable hugs m
21:10 AlexDaniel huggable: hug me
21:10 * huggable hugs AlexDaniel
21:10 AlexDaniel this one
21:10 AlexDaniel actually, lots of things are breaking when you do that
21:11 AlexDaniel for example, these messages are not logged: http://irclog.perlgeek.de/perl6/2016-05-07#i_12448510
21:12 lizmat yikes
21:12 AlexDaniel lizmat: yeah, awful. And scary.
21:13 AlexDaniel I'm not sure if you can do something evil with that though, I'm not in the mood today
21:17 AlexDaniel hm, actually there is probably no problem with that
21:18 lizmat the not being logged bit is something moritz should look at...
21:19 AlexDaniel lizmat: https://xkcd.com/1172/
21:20 lizmat :-)
21:25 kaare_ joined #perl6
21:37 vaisian_ joined #perl6
21:37 timotimo MadcapJake: i finally found a bit of time to look at the shakespearean counter
21:38 timotimo MadcapJake: my multithreaded version is also slower than your naive version
21:38 timotimo um, no, i just read the time output wrong
21:39 mr-foobar joined #perl6
21:39 timotimo 171.21user 0.18system 0:43.72elapsed 391%CPU (0avgtext+0avgdata 210140maxresident)k
21:39 timotimo 130.02user 0.09system 2:10.12elapsed 99%CPU (0avgtext+0avgdata 95280maxresident)k
21:39 timotimo m: say "multithreaded version took only { 43 / (2 * 60 + 10) }x as much time as naive"
21:39 camelia rakudo-moar e093cc: OUTPUT«multithreaded version took only 0.330769x as much time as naive␤»
21:40 timotimo compare 33% as much time with 391% cpu time
21:40 timotimo there's noticable overhead, but it ended up faster in the end
21:41 skink Speaking of speed, using the r* msi vs building saves 22min on appveyor
21:43 timotimo MadcapJake: i commented my code into the gist
21:44 Emeric1 joined #perl6
21:46 ZoffixWin joined #perl6
21:48 ZoffixWin AlexDaniel, yeah, it's actually exploitable by using something that can send \n
21:48 yoleaux 20:48Z <AlexDaniel> ZoffixWin: this \o[001] issue is scary
21:49 ZoffixWin I'm gonna blow up IRC::Client and re-design it from scratch. Current version sucks. I wrote it half drunk when I didn't know any Perl 6.
21:49 AlexDaniel ZoffixWin: huh? I don't think that you can send \n
21:49 ZoffixWin Hm. I guess you're right, since it'll go via the server.
21:49 ZoffixWin Then why is that issue scary? :P
21:50 AlexDaniel ZoffixWin: http://irclog.perlgeek.de/perl6/2016-05-07#i_12448525
21:50 ZoffixWin Ah
21:51 AlexDaniel ZoffixWin: well, dunno. What happens if you send a really-really long string?
21:51 jnthn timotimo: Would be interested to know if you get slightly better results with moar/reframe on that concurrency thing, since one source of contention has been removed
21:52 AlexDaniel I have no idea how IRC works by the way
21:52 timotimo jnthn: then i'll first have to measure without jit, too
21:52 timotimo oh, and i didn't put "combine the numbers" back in
21:52 jnthn True :)
21:53 huggable joined #perl6
21:54 AlexDaniel huggable: test
21:54 huggable AlexDaniel, foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooz
21:55 ZoffixWin AlexDaniel, it'll either disconnect or the response won't be sent, I forget (at least on Freenode)
21:55 ZoffixWin That won't work lol. It can only happen with the 'Stored blah as blah', because everything else is shorter than *you* can send :)
21:56 AlexDanielttttt huggable: test
21:56 huggable AlexDanielttttt, trooooloolollllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
21:56 AlexDanielttttt huggable: t
21:56 huggable AlexDanielttttt, fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooz
21:56 ugexe skink: its apparently because p6-find-bundled uses @*INC which hasn't existed for almost a year
21:56 AlexDanielttttt ZoffixWin: not when you add my nickname
21:56 ZoffixWin U gyess
21:58 huggable joined #perl6
21:58 ZoffixWin huggable, hug trollolo
21:58 ugexe the fact the current %?RESOURCES implementation can't handle the openssl use case by allowing the author to somehow provide alternatives should suggest it needs to be redone
21:58 * ZoffixWin lols
21:58 AlexDanieltttttt ZoffixWin: wait, didn't you write it just couple of months ago?
21:59 ZoffixWin Looks like it continues to shove data, so in some way it is exploitable, I guess :) https://gist.github.com/zoffixznet/f9469aa867b6c53c76c701712d5fe5b1
22:00 skink ugexe, Well, that'd do it :)
22:00 ZoffixWin AlexDanieltttttt, no. My first Perl 6 code was App::NoPaste and the two supporting modules, and then I wrote IRC::Client and all its plugins and I did it in December so I could have a new Year IRC party bot.
22:01 ugexe it doesnt help that Find::Bundled has no tests so it merrily installs and makes openssl look like the culprit
22:01 AlexDanieltttttt oh geez my nickname
22:01 ZoffixWin Actually, after I wrote App::NoPaste I forgot Perl 6 (too much time went by), so IRC::Client can really count as my first Perl 6 project :P
22:02 ZoffixWin hmmm.. looks like I broke it :/
22:05 jnap_ joined #perl6
22:06 unhuggable joined #perl6
22:07 ZoffixWin unhuggable, hug me
22:07 * unhuggable hugs ZoffixWin
22:08 ZoffixWin oooooh: "* huggable :Nickname is already in use."
22:08 tailgate I'm trying to overload the + operator with the following code. https://gist.github.com/ahalbert/b2714e33f15d6e2b3aa9944ef6c1867d  It gives a type error when I tried to use it. Could anyone clairfy what it means?
22:09 raiph joined #perl6
22:09 ZoffixWin tailgate, you overloaded with `Unit` but trying to call it with `Units::Unit`
22:10 ZoffixWin tailgate, and it's trying to convert it into .Numeric and fails
22:10 AlexDaniel m: https://gist.github.com/AlexDaniel/429ed056c3791545824d2a1c139258fe
22:10 camelia rakudo-moar e093cc: OUTPUT«5===SORRY!5=== Error while compiling /tmp/bhidKciC4E␤Invalid typename 'Unit' in parameter declaration. Did you mean 'uint', 'Uni'?␤at /tmp/bhidKciC4E:1␤------> 3multi sub infix:<+>(Unit7⏏5 $x, Unit $y) {␤»
22:11 tailgate Unit has a member of type Num
22:11 ZoffixWin tailgate, what's in $a and $b?
22:12 tailgate Units::unit I should calirfy, the <+> is copied from the module Units
22:12 verzit joined #perl6
22:12 AlexDaniel tailgate: it would be cool if it was a runnable snippet :)
22:12 ugexe m: $*REPO.repo-chain.grep(*.files("libssl.so")).say
22:12 camelia rakudo-moar 626b5a: OUTPUT«Cannot unbox a type object␤  in block <unit> at /tmp/Jge8sCDuuw line 1␤␤»
22:12 tailgate the type is a Units::unit of $a and $b
22:12 ZoffixWin tailgate, Units::Unit is not a Unit
22:12 ZoffixWin tailgate, you're trying to match apples to oranges
22:12 ZoffixWin m: say Num ~~ Numeric
22:12 camelia rakudo-moar 626b5a: OUTPUT«True␤»
22:14 raiph m: subset literal of Str; my literal $foo = "abc"; say $foo; say $foo.WHAT #  literal: "subtype with ... just a different type name" (a subset is, er, literally, a subset so you can't add a method; in this case the subset is semantically equal to the original type except with a different name)
22:14 camelia rakudo-moar 626b5a: OUTPUT«abc␤(Str)␤»
22:14 raiph er, nevermind :( :)
22:16 huggable joined #perl6
22:17 huggable joined #perl6
22:17 ZoffixWin huggable, hug me
22:17 * huggable hugs ZoffixWin
22:17 ZoffixWin There! Fixed forever
22:18 jnthn huggable, hug tree
22:18 * huggable hugs tree
22:18 jnthn huggable++ # loves the environment
22:19 verzit joined #perl6
22:19 colomon joined #perl6
22:23 kurahaupo joined #perl6
22:23 skink ugexe, I switched it to use resources/libraries instead of Find::Bundled and...
22:23 skink It works! :D
22:23 skink Completely, somehow
22:26 ugexe it shouldnt
22:27 ugexe resources/libraries will mangle the name, and %?RESOURCES gives you no option to supply anything but a single name
22:27 ugexe (so first it would only work on EITHER windows or linux)
22:29 skink OpenSSL::NativeLib uses a sub which returns the bundled dll if $*DISTRO.is-win, else returns the native system lib
22:29 ugexe i.e. you cant mangle `ssl` into both libssl.so and ssleay32.dll
22:30 skink I only changed two lines to get it working. Not the cleanest fix, but all tests pass on both Linux and Windows
22:30 ugexe that doesnt install the lib. it sounds like you may just be hard coding an assumed location
22:31 ugexe resources/libraries would provide the library through %?RESOURCES<ssl> or %?RESOURCES<ssleay32>
22:33 ugexe the only real solution i can see unless %?RESOURCES gets reworked is to install both the .so and .dll on both OS
22:33 ugexe and NativeLib.pm6 still has exist to decide to use %?RESOURCES<ssl> or %?RESOURCES<ssleay32>
22:34 skink There is no .so being installed
22:34 ugexe ... i know
22:34 ugexe if you were on linux and needed it, then it would be
22:34 ugexe m: say $*VM.platform-library-name('ssl'.IO).Str
22:34 camelia rakudo-moar 626b5a: OUTPUT«libssl.so␤»
22:36 ugexe on windows that wont generate the correct name. so `resources/libraries` is useless
22:37 ugexe the original s22 implementation was on the right track in this respect
22:38 aries_liuxueyang joined #perl6
22:38 ugexe if a leaf node is a hash, it represents build time stuff that is meant to be handled by some builder so that those type of name customizations can be made
22:45 skink .seen sergot
22:45 yoleaux I saw sergot 9 Feb 2016 15:52Z in #perl6: <sergot> stmuk_++: merged, thanks a lot! :)
22:49 vaisian joined #perl6
22:50 vaisian left #perl6
22:54 kurahaupo_ joined #perl6
22:57 mr-foobar joined #perl6
23:04 cpage_ joined #perl6
23:09 sortiz q
23:10 ugexe on a positive note this hack removes dependencies on panda, Shell::Command, and File::Bundled
23:14 kurahaupo joined #perl6
23:17 RabidGravy :)
23:18 skink ugexe, :)
23:19 ugexe the drawback is 2 windows dlls get copied to the file system on linux (but never used). an alterntive is to use Build.PM to delete them from the META.info file but that seems even less koscher
23:21 Xliff_ How can you get the current size of a file referenced by an IO::Handle?
23:22 Xliff_ Nevermind IO::Handle::s
23:22 skink hey Xliff_
23:22 Xliff_ I will have to write a test to see if a file opened as :w will return the proper size without a .flush/.close.
23:22 Xliff_ \o skink
23:23 * ZoffixWin chuckles at AlexDaniel
23:24 skink ugexe, My original intent wasn't even to change any code. I just wanted to see if my cross-compiled libs worked.
23:24 ugexe did they?
23:24 skink Yes, thankfully
23:25 ZoffixWin http://i.imgur.com/NIuBvh7.png 😂😂😂
23:25 AlexDaniel yeah, I just wrote “hug me” to ZoffixWin… because for some weird reason he changed his nickname from “huggable” to “ZoffixWin”, and I had a private window opened… so I wrote a message to him thinking that I am talking to huggable
23:25 skink OpenSSL has a CROSS_COMPILE build setting so I expected them to, unlike my past attempts for other libs
23:25 ZoffixWin huggable, hug AlexDaniel
23:25 * huggable hugs AlexDaniel
23:27 MadcapJake huggable: hug everyone
23:27 * huggable hugs everyone
23:28 MadcapJake timotimo: cool! afk till tomorrow
23:30 TEttinger huggable, hug huggable
23:30 * huggable hugs huggable
23:33 Xliff_ m: my %h = (); say "Y" if %y<y> == 'y';
23:33 camelia rakudo-moar 626b5a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/7HX92swxKr␤Variable '%y' is not declared␤at /tmp/7HX92swxKr:1␤------> 3my %h = (); say "Y" if 7⏏5%y<y> == 'y';␤»
23:33 Xliff_ m: my %h = (); say "Y" if %h<y> == 'y';
23:33 camelia rakudo-moar 626b5a: OUTPUT«Use of uninitialized value of type Any in numeric context  in block <unit> at /tmp/NggOlN0OzO line 1␤Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5y' (indicated by ⏏)␤  in block <unit> at /tmp/NggOlN0…»
23:33 Xliff_ m: my %h = (); say "Y" if %h<y> eq 'y';
23:33 camelia rakudo-moar 626b5a: OUTPUT«Use of uninitialized value %h of type Any in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in block <unit> at /tmp/pnidGaR4NL line 1␤»
23:34 Xliff_ Is there a way to make that test without a call to :exists first?
23:38 Xliff_ So... no streamlined version of this?
23:38 Xliff_ m: my %h = ( y => 1 ); say "Y" if %h<y>:exists && %h<y> eq 'y';
23:38 camelia rakudo-moar 626b5a: ( no output )
23:40 AlexDaniel m: my %h; say ‘Y’ if (%h<y> // ‘’) eq ‘y’ # :-/
23:40 camelia rakudo-moar 626b5a: ( no output )
23:42 AlexDaniel m: my %h = ‘y’ => ‘y’; say ‘foo’ if %h<y>:v eq ‘y’
23:42 camelia rakudo-moar 626b5a: OUTPUT«foo␤»
23:42 AlexDaniel m: my %h; say ‘foo’ if %h<y>:v eq ‘y’
23:42 camelia rakudo-moar 626b5a: ( no output )
23:42 AlexDaniel Xliff_: ↑ that, I guess
23:43 AlexDaniel yeah, that
23:44 Xliff_ LOL! Thanks, AlexDaniel!
23:44 Xliff_ Now since you are hear... can you get a filename from an IO::Handle?
23:44 Xliff_ =)
23:44 ugexe skink: https://github.com/sergot/openssl/pull/25 i'll try and merge this later if it passes travis, and then i'll test your updated libs and merge those as well
23:45 AlexDaniel Somehow I don't think that IO::Handle has to have any associated filename
23:45 Xliff_ :s
23:45 grondilu joined #perl6
23:45 AlexDaniel it's just a handle!
23:45 Xliff_ Means I will have to capture output filename, somehow.
23:46 Xliff_ Thanks.
23:46 AlexDaniel I may be wroung though
23:46 ugexe you can set the file name anyway if you want
23:46 ugexe if you know what it will be and just want something to contain it while you pass around the IO::Handle
23:47 ugexe its just called :$path
23:49 ugexe m: IO::Handle.new(:path => $*CWD).path.say
23:49 camelia rakudo-moar 626b5a: OUTPUT«IO::Handle is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting line 1␤  in method new at src/RESTRICTED.setting line 32␤  in block <unit> at /tmp/zxPqGtJxMV line 1␤␤»
23:49 ugexe with no path .path will be '-'
23:49 skink ugexe, Yeah that's way better than my hack
23:49 AlexDaniel m: say $*IN.path
23:49 camelia rakudo-moar 626b5a: OUTPUT«IO::Special.new(what => "<STDIN>")␤»
23:50 AlexDaniel m: say ~$*IN.path
23:50 camelia rakudo-moar 626b5a: OUTPUT«<STDIN>␤»
23:50 AlexDaniel Xliff_: well… :)
23:51 kurahaupo joined #perl6
23:51 skink ugexe, This also means issue #19 can be closed
23:53 skink Also hold off on the libs, OpenSSL 1.0.2h just came out so I might as well build that
23:53 ugexe skink: want to redo your PR but change /native-lib to /resources, and attach your app veyor?
23:54 skink New PR with name change, update libs, and appveyor pointed at master?
23:54 skink Sound alright?
23:55 ugexe yeah
23:55 skink Alright, give me just a bit
23:55 uruwi joined #perl6
23:56 Xliff_ Hrm.
23:56 ugexe you should probably bump the version again too
23:56 Xliff_ IO::Handle::path isn't documented, here
23:56 Xliff_ https://doc.perl6.org/type/IO::Handle
23:56 ugexe its an attribute, not a method
23:56 cdg_ joined #perl6
23:57 AlexDaniel ugexe: does it mean that we never document attributes?
23:57 ugexe i mean i guess that gives it a method by default but ye ah
23:58 AlexDaniel huggable: docs
23:58 huggable AlexDaniel, nothing found
23:58 AlexDaniel huggable: doc issue
23:58 huggable AlexDaniel, nothing found
23:58 AlexDaniel huggable: doc issue :is: https://github.com/perl6/doc/issues/new
23:58 huggable AlexDaniel, Added doc issue as https://github.com/perl6/doc/issues/new
23:59 ugexe not usually. they are typically described in the method parameters
23:59 Xliff_ Actually, it's an attribute AND a method!
23:59 Xliff_ IO::Handle::path returns $!path.
23:59 Xliff_ Which looks to be an IO::Path

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo