»ö« 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.
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
I'm gonna first learn how to call strftime in pure C
00:02 zakharyas left
ZoffixWin found struct tm www.tutorialspoint.com/c_standard_l...rftime.htm 00:02
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:04
ZoffixWin well... there's augment, but that modifies the core type throughout your entire program: perl6.party/post/20160427-Perl-6-Ex...ebedragons 00:06
literal yeah, that's a bit much 00:07
BenGoldberg I thought that only modules which 'use'd your code would see the augmented core type. 00:08
ZoffixWin BenGoldberg, nope
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␤»
ZoffixWin literal, ^ there's also that
(also in that article)
literal the main thing is that I want a different type name
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>})␤»
literal it can just be a Str/Num/Hash in all other respects, to start with
ZoffixWin literal, what are you trying to accomplish?
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:11
00:11 RabidGravy left
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:12
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:13
AlexDaniel mrsharpoblunto.github.io/foswig.js/ 00:14
literal BenGoldberg: yes, but that's not easy to match against
ZoffixWin AlexDaniel, "restrollo"
AlexDaniel ZoffixWin: “crapup”
literal when MyStringType { ... }
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␤»
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␤»
literal ugexe: doesn't actually function as a string though :P
BenGoldberg : class Str2 { has $.str handles *; method CALL-ME($str) { self.new(str => $str); }; method foo { 42 }; }; Str2("abc").substr(1, 1).say;
ZoffixWin He just forgot is Str
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;
camelia rakudo-moar ac36d2: OUTPUT«b␤»
ZoffixWin Oh, never mind 00:17
ugexe add a method Str { $.str} and method Stringy { $.str} 00:18
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:19
grondilu did not know about 'handles *' 00:21
00:24 jjido joined
ugexe you can get most of the way there, but it stores the string inside a private $!value 00:25
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␤»
timotimo github.com/supernovus/perl6-datetime-format btw 00:28
literal nice. Also, looks like "does Stringy" is not needed there
ugexe does Stringy allows ~$var to work
literal I see
how come CALL-ME isn't inherited?
00:28 jjido left
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
literal timotimo: results in "Cannot find method 'Str2'" if it's not specified 00:30
00:30 BenGoldberg left
timotimo wait, how are you trying to invoke that? 00:30
literal see ugexe's last code paste
ugexe m: my $str = Str("xxx"); say $str 00:31
camelia rakudo-moar ac36d2: OUTPUT«xxx␤»
timotimo Str(123) does call Str
as in, it invokes the type object
00:31 BenGoldberg joined
literal also, why is "does Stringy" needed if Str does Stringy? 00:32
timotimo i don't think it should be needed 00:33
00:34 BenGoldberg left
ZoffixWin timotimo, thanks. Not sure what I was searching that I missed it :S 00:37
00:41 BenGoldberg joined
timotimo :) 00:45
00:47 telex left 00:48 telex joined, Ben_Goldberg joined, BenGoldberg left 00:50 Ben_Goldberg is now known as BenGoldberg
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␤»
ZoffixWin is there a way to make that compile-time require?
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
timotimo, it doesn't take symbols
m: need Test <&is>;
camelia rakudo-moar ac36d2: OUTPUT«5===SORRY!5=== Error while compiling /tmp/D3nrCcD1oF␤Confused␤at /tmp/D3nrCcD1oF:1␤------> 3need Test7⏏5 <&is>;␤»
ZoffixWin And use only takes tags :S
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␤ …»
ZoffixWin m: BEGIN { require Test <&is> }; say is 2, 2; try { EVAL "ok"; CATCH { default { say "caught" }}}
camelia rakudo-moar ac36d2: OUTPUT«5===SORRY!5=== Error while compiling /tmp/kpQN4eZC69␤Undeclared routine:␤ is used at line 1␤␤»
00:57 lostinfog left
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␤␤»
ZoffixWin flips desk
BenGoldberg m: need Test; 00:59
camelia ( no output )
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
so like $Foobar := Test::EXPORT::DEFAULT::is or whatever
bedtime 01:03
ZoffixWin m: need Test; my &is = &Test::EXPORT::DEFAULT::is; is 2, 2; try { EVAL "ok 42"; CATCH { default { say "caught" }}}
camelia rakudo-moar ac36d2: OUTPUT«ok 1 - ␤caught␤»
ZoffixWin That's LTA, but better than nothing. timotimo++
01:03 hotel|out is now known as hotel 01:04 colomon left
hotel :=? 01:05
heh that looks funny
01:06 BenGoldberg left 01:07 colomon joined 01:08 BenGoldberg joined 01:10 BenGoldberg left 01:12 BenGoldberg joined
hotel can someone explain promises to me? 01:12
ZoffixWin RFC for easier compile type specific symbol import: rt.perl.org/Ticket/Display.html?id=128090
hotel, try this [slightly dated] slideshow: jnthn.net/papers/2015-yapcasia-concurrency.pdf 01:13
hotel thanks
ugexe a simple way to think of it is as a mechanism to chain `start { }`s together 01:14
hotel needs to brush up on the idea of concurrency altogether 01:19
s/concurrency/asynchrony/ 01:20
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, maybekoo2 left
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 left, jjido joined
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
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=128090
pmichaud design.perl6.org/S11.html#Compile-t...mportation 01:31
01:31 jjido left
pmichaud Is that not what you are looking for? 01:31
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:38
ZoffixWin pmichaud, unsure. It seems to require *author* of the module to do "extra things" instead of just using `is export`: 01:40
m: use Test <&is>; say is 2, 2
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␤»
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:41
01:42 kid51 left
hotel any takers? 3; 01:44
01:44 cpage_ joined 01:46 pierre_ joined
ZoffixWin hotel, what do you mean 'set equal to'? 01:48
hotel yeah I'm not really sure
ZoffixWin ...
hotel 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
hotel guess I set that later then 01:51
on another note, just watched what was probably the saddest scene in all of 24 01:53
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";␤»
hotel m: my constant CRLF = "dummy"; say "hi CRLF";
camelia rakudo-moar ac36d2: OUTPUT«hi CRLF␤»
pmichaud ZoffixWin: yeah, I think it's just a NYI bug.
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
camelia rakudo-moar ac36d2: OUTPUT«About to sit and wait for a Promise to complete␤Done waiting 1.0042692␤»
ugexe {CRLF}
pmichaud ZoffixWin: oh, I see what you mean. 01:59
01:59 mr-foobar left
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
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:00
02:01 johnjohn101 joined
johnjohn101 hi perl6 02:01
02:01 molaf left
ZoffixWin (a module update where Joe Smith implements a new sub in their FooBarBer module that I use) 02:01
pmichaud Then I suspect the "use Test" ought to be more explicit about what is to be imported. 02:03
And yes, that looks like a NYI bug to me.
use Test <&is>; should import only &is and nothing else.
02:03 Khisanth left 02:05 pierre_ left 02:12 BenGoldberg left 02:13 BenGoldberg joined 02:14 molaf joined 02:15 noganex joined 02:16 Khisanth joined 02:18 noganex_ left 02:22 colomon left 02:25 colomon joined 02:27 jjido joined 02:32 jjido left, mr-foobar left 02:33 mr-foobar joined
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␤␤»
ZoffixWin
.oO( why the hell not... )
m: say now - now
camelia rakudo-moar ac36d2: OUTPUT«-0.00159147␤»
02:43 colomon left, crucialrhyme joined
ZoffixWin m: say DateTime.new(0).Instant 02:43
camelia rakudo-moar ac36d2: OUTPUT«Instant:10␤»
ZoffixWin
.oO( 10?? )
02:44 colomon joined 02:46 sufrostico left
hotel ugexe++ 02:49
02:49 uruwi joined
hotel can I initialise members of a class in the class body? 02:50
or does it have to be in BUILD
ZoffixWin use defaults
m: class Foo { has $.bar = 42; }; say Foo.new.bar
camelia rakudo-moar ac36d2: OUTPUT«42␤»
hotel yeah but these aren't given to the class when instantiating it 02:51
or at least they're not supposed to be
oh
02:51 hotel is now known as hotel|chagrin
ZoffixWin m: class Foo { has $!bar = 42; method bar { $!bar } }; say Foo.new(:72bar).bar 02:52
camelia rakudo-moar ac36d2: OUTPUT«42␤»
hotel|chagrin yeah thanks 02:53
02:53 Actualeyes left 02:56 itcharlie joined
hotel|chagrin so what's the real difference between declaring variables with my/has in a class? 02:57
02:58 crucialrhyme left
dalek c: b2f5a76 | (Zoffix Znet)++ | doc/Type/IO/Path.pod:
Toss non-more-readable "more readable" portion
02:59
ZoffixWin hotel|chagrin, my will create a class variable, has an instance attribute
hotel|chagrin but what's the functional difference? 03:00
ZoffixWin is typing an example
hotel|chagrin thanks
geekosaur class variable should be shared between all instances
hotel|chagrin so it's static
geekosaur in C++ parlance, es
yes 03:01
hotel|chagrin ah
that makes sense
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 ]
camelia rakudo-moar ac36d2: OUTPUT«Cannot modify an immutable Str␤ in block <unit> at /tmp/A334GyShlU line 1␤␤»
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 ]
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…»
ZoffixWin screw you then!
:P
hotel|chagrin lol
thanks to everyone for putting up with my learning 03:02
03:02 hotel|chagrin is now known as hotel
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
03:02 crucialrhyme joined
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:02
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)
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 ]
camelia rakudo-moar ac36d2: OUTPUT«[Modded Also modded Modded Original]␤»
ZoffixWin (is rw goes before the default) 03:05
03:05 |2701 left
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
camelia rakudo-moar ac36d2: OUTPUT«5===SORRY!5=== Error while compiling /tmp/7xmlgZ7tUR␤Undeclared routine:␤ p used at line 1␤␤»
hotel m: class X { method !p { say 'p' }; method u { self!p }; }; X.new.u
camelia rakudo-moar ac36d2: OUTPUT«p␤»
03:13 cdg joined
ZoffixWin m: my %foo = foo => 'bar', meow => 'mer'; 03:14
camelia ( no output )
ZoffixWin m: constant %foo = foo => 'bar', meow => 'mer';
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 …»
ZoffixWin Bug?
Guess not 03:15
m: my foo = foo => 'bar', meow => 'mer';
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';␤»
ZoffixWin oops
m: my \foo = foo => 'bar', meow => 'mer';
camelia ( no output )
ZoffixWin Oh. Well, binding := also doesn't work and I guess that's what `constant` is doing 03:16
BenGoldberg m: my \foo = foo => 'bar', meow => 'mer'; say foo; 03:18
camelia rakudo-moar ac36d2: OUTPUT«(foo => bar meow => mer)␤»
BenGoldberg m: constant %foo = Hash.new( foo => 'bar', meow => 'mer' ); say %foo< meow > 03:19
camelia rakudo-moar ac36d2: OUTPUT«(Any)␤»
BenGoldberg m: constant %foo = Hash.new( foo => 'bar', meow => 'mer' ); say %foo
camelia rakudo-moar ac36d2: OUTPUT«{}␤»
BenGoldberg m: constant %foo = ( foo => 'bar', meow => 'mer' ).hash; say %foo
camelia rakudo-moar ac36d2: OUTPUT«{foo => bar, meow => mer}␤»
BenGoldberg m: constant %foo = ( foo => 'bar', meow => 'mer' ).hash; say %foo< meow >
camelia rakudo-moar ac36d2: OUTPUT«mer␤»
ZoffixWin m: constant %foo = %( foo => 'bar', meow => 'mer' ); say %foo< meow > 03:25
camelia rakudo-moar ac36d2: OUTPUT«mer␤»
03:28 jjido joined 03:30 finanalyst joined, mr-foobar left 03:32 jjido left
hotel m: my $a, my $b; $a, $b = split " ", "hello world" 03:34
camelia ( no output )
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 kurahaupo left
hotel is there a concise way to assign elements of an output list to different variables? 03:35
ZoffixWin m: my $a, my $b; ($a, $b) = split " ", "hello world"; say $a; say $b 03:36
camelia rakudo-moar ac36d2: OUTPUT«hello␤world␤»
hotel ah, the elusive parenthesis
03:36 pierre_ joined 03:39 pierre_ left 03:45 johnjohn101 left
ZoffixWin (╯°□°)╯︵ ┻━┻ 03:46
Thus ends my 4-hour attempt to make my Bailador return 304s correctly. 03:47
03:47 cpage_ left
hotel good work 03:47
ZoffixWin The table flip indicates I failed :P
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?
ZoffixWin deal? 03:49
hotel so far in all the pl6 things I've seen, I haven't seen any `return` keyword
hotel finds out it exists 03:51
geekosaur it's alwayts been a perl thing that the last value in a sub is what is returned 03:53
in fact the return keyword only came into existence in older perl relatively late (and had horrid performance for a long time)
hotel oh, so it's not usually necessary? 03:54
geekosaur correct
hotel so here gist.github.com/HotelCalifornia/ff...9afc8bed69 03:55
geekosaur it'd be sufficient to just say `%env' as the last line
hotel oh cool 03:56
thanks
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
e.g. `method foo { 42 }` earlier 03:57
03:57 Ben_Goldberg joined, BenGoldberg left, Ben_Goldberg is now known as BenGoldberg
hotel yeah, I was wondering in terms of methods with more calculations in them 04:06
04:10 sortiz joined
sortiz \o #perl6 04:10
hotel what happens when you define a method with the & twigil? 04:24
grondilu m: my &talk = sub { say "hi" }; talk 04:25
camelia rakudo-moar ac36d2: OUTPUT«hi␤»
grondilu oh sorry you meant a method
hotel also jk 04:26
I misread it
grondilu I don't think it's possibl to define a method as variable.
hotel it was a sub in the end 04:27
04:29 jjido joined
sortiz m: my &foo = method () { self.say }; "Hi".&foo; 04:29
camelia rakudo-moar ac36d2: OUTPUT«Hi␤»
04:34 jjido left
hotel if you use callsame from an anonymous function, does it call the other anonymous functions with the same symbol? 04:35
s/symbol/signature/
ignore me 04:36
04:37 milwauke` left
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);
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…»
BenGoldberg m: my $f = sub ($x) { $x <= 1 ?? 1 !! $x * callsame($x-1) }; say $f.(4);
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␤␤»
hotel yeah yeah, I was misreading that
I thought it said `method &foo`
but it really said `my &foo = ...` 04:40
04:40 BenGoldberg left, itcharlie left
hotel anyway, time for bed 04:41
night
04:41 hotel is now known as hotel|netteiru 04:42 kaare_ joined 04:56 Cabanossi left 04:58 Cabanossi joined
ugexe m: my $xxx = sub ($a) { $a < 5 ?? &?ROUTINE($a+1) !! $a; }; say $xxx.(1) 05:03
camelia rakudo-moar ac36d2: OUTPUT«5␤»
05:03 AlexDaniel left 05:21 verzit left 05:29 jjido joined, cdg left 05:32 verzit joined, cdg_ joined
sortiz ZoffixWin, ping. 05:33
05:34 jjido left 05:37 cdg_ left, jack_rabbit joined 05:42 CIAvash joined 05:48 TreyHarris left
dalek osystem: 54e7f0d | titsuki++ | META.list:
Add Term::Readsecret to ecosystem

See github.com/titsuki/p6-Term-Readsecret
05:52
osystem: ecb5339 | titsuki++ | META.list:
Merge pull request #204 from titsuki/add-readsecret

Add Term::Readsecret to ecosystem
05:57 wamba joined 06:00 cdg joined 06:02 vendethiel- joined 06:03 vendethiel left 06:05 cdg left 06:23 wamba left 06:29 TreyHarris joined
nadim Morning. Latest commit doesn't install nopaste.linux-dev.org/?1098673 any ideas? 06:48
06:50 hotel joined 06:51 skids left, hotel|netteiru left 07:03 mr-foobar joined 07:10 maybekoo2 joined 07:12 mr-foobar left 07:13 mr-foobar joined 07:14 yqt left 07:15 cpage_ joined 07:26 finanalyst left 07:36 cognominal left 07:45 molaf left 07:48 jjido joined 07:50 jjido_ joined 07:53 jjido left 07:54 domidumont joined 07:58 firstdayonthejob joined 07:59 domidumont left 08:00 domidumont joined 08:06 firstdayonthejob left 08:07 firstdayonthejob joined, jjido_ left, rindolf joined 08:08 jjido joined 08:15 darutoko joined 08:32 RabidGravy joined 08:41 domidumont left, domidumont joined, wamba joined 08:43 mr-foobar left 08:44 mr-foobar joined 08:46 domidumont left
masak good antenoon, #perl6 08:48
bazzar: fwiw, I've been toying with the idea of parsing out a postgres schema lately. 08:49
08:50 TEttinger left 09:00 araujo left 09:10 darutoko left
RabidGravy masak, but isn't it just query some stuff from information_schema 09:10
masak RabidGravy: ooh -- that's probably a lot better than parsing out text. 09:15
I haven't thought about this deeply yet -- thanks for the nudge in the right direction! :D
RabidGravy a *lot* easier
I don't think there's any of DBIx::Class::Schema::Loader that do it by parsing a DDL specification 09:16
masak right :)
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
masak that way, I can have tests that confirm that the database schema is what I think it is.
RabidGravy er s/metadata/normal data/ 09:18
masak .oO( Ted Codd requires that the tautology always be what the tautology is )
RabidGravy :)
not enough coffee has got tomy fingers yet
masak further, I can use the same JSON-YAML file to statically check all the queries made against the database.
all this in order to assert that app and database evolve together nicely. 09:19
09:19 jjido left
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:19
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
(hedging on whether that may be an ORM or something else)
masak I'm not actively against such plans :) 09:23
but I'm going to start by unabstractedly solving my own use cases
RabidGravy oh sure 09:24
09:30 darutoko joined, titsuki joined
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:32
masak that's not a bad idea 09:35
I have a DBIish dependency anyway
oh, and I could look into what it'd take to provide a mocked database as a driver to DBIish
literal </w 3 09:37
sortiz In fact there is DBDish::TestMock, just for that kind of stuff.
09:38 cpage_ left
masak oh wow 09:41
I should think out loud more often on this channel, clearly
09:41 cognominal joined
masak sortiz++ 09:42
um, though github.com/perl6/DBIish/blob/ca684...Handle.pm6 is probably not enough for my purposes... 09:43
sortiz I get bored for lack of open issues to be resolved in DBIish ;-)
masak duly noted
09:45 Ven joined
masak well, I could submit some issue about DBDish::TestMock being locked down to a particular schema... 09:48
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
FreeTDS could fly if there is something I can test it against 09:54
sortiz RabidGravy, if you have Informix and its ODBC driver, may be that DBDish::ODBC already supports it. 09:55
RabidGravy would still have to download the client sdk to get the ODBC driver 09:56
:\
sortiz :/
RabidGravy plus the native driver is much more fun
sortiz Sure, say that to me ;-) 09:57
10:00 domidumont joined 10:02 mr-foobar left 10:05 kurahaupo joined 10:11 titsuki left, darutoko left
RabidGravy WAHAY! Finally managed to log in to the IBM site 10:13
awful, the company clearly knows nothing about computer software 10:14
10:14 maddingu1 is now known as maddingue 10:18 spider-mario joined
nadim Morning again, 10:28
Latest commit doesn't install nopaste.linux-dev.org/?1098673 any ideas? 10:29
10:35 Ven left
RabidGravy when was the last time you updated? That change went in weeks ago iirc 10:36
10:37 mr-foobar joined
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:38
RabidGravy yeah that's what it looks like 10:39
why would "git remote" show nothing when pull and push are clearly working? 10:43
weird 10:47
anyhow just twatted it and re-cloned 10:48
10:48 firstdayonthejob left 10:52 Ven joined 10:57 domidumont left 11:04 mr-foobar left 11:05 mr-foobar joined 11:06 nowan_ joined 11:07 CIAvash left 11:08 nowan left 11:12 jack_rabbit left 11:16 mr-foobar left 11:18 mr-foobar joined 11:24 kid51 joined
ZoffixWin sortiz, pong 11:25
11:27 domidumont joined
ZoffixWin What was it? 11:28
11:29 sunnavy_ left, sunnavy_ joined 11:31 milwauke` joined 11:35 Emeric joined
sortiz ZoffixWin o/ 11:37
ZoffixWin \o
moritz \o\o
sortiz I found this for you: gist.github.com/salortiz/051c7a814...2377c02f70 11:38
moritz fights with a blank screen after apt-get upgrade and reboot :(
and the wiki interface on the old lapotp seems to be broken, with about 70% packet loss on an otherwise fine network 11:39
*wifi
ZoffixWin press ctrl+alt+F1 to see the log messages from trying to start X? 11:40
11:41 domidumont left
ZoffixWin sortiz, cool. Much different than the way I was going about it. 11:42
sortiz, you should submit it as a patch to modules.perl6.org/repo/POSIX
I went with this one at the end: github.com/supernovus/perl6-dateti...me-dt-lang
11:42 mr-foobar left 11:43 perlawhirl joined
ZoffixWin Well, actually, I abandoned that part of the code altogether by now lol :P 4 wasted hours 11:43
perlawhirl Zoffix: The other thing about the module is that strptime is NYI 11:44
ZoffixWin I noticed last night
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:45
RabidGravy they accept patches though 11:47
11:53 |2701 joined
sortiz afk& 11:55
12:13 jjido joined 12:14 Ven left 12:16 Relsak joined
ZoffixWin Yey! Finally moved all my blog posts to perl6.party/ Didn't realize I had so many :o 12:18
m: say 14 / DateTime.today.week-number
camelia rakudo-moar cf199c: OUTPUT«Method 'today' not found for invocant of class 'DateTime'␤ in block <unit> at /tmp/rAFUpbHH95 line 1␤␤»
ZoffixWin m: say 14 / DateTime.new.today.week-number
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␤␤»
ZoffixWin Well, that many per week lol :P
m: say 14 / DateTime.now.week-number 12:19
camelia rakudo-moar cf199c: OUTPUT«0.777778␤»
ZoffixWin And I forget who said they missed the dancing cats (Xliff_ ?), but I brought them back: perl6.party/about
12:21 aries_liuxueyang left
RabidGravy ZoffixWin, dancing cats! 12:22
stmuk I was a dancing cat fan 12:24
12:25 araujo joined 12:26 araujo left, araujo joined, araujo left, araujo joined 12:28 araujo left, araujo joined, araujo left, araujo joined 12:29 araujo left, aries_liuxueyang joined 12:36 vaisian_ joined 12:39 Ven joined 12:40 jjido left 12:43 aries_liuxueyang left 12:46 aries_liuxueyang joined 12:48 darutoko joined, darutoko left 12:54 aries_liuxueyang left 12:56 colomon left
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:56
psch doesn't quite grasp the question 12:59
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:00
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
me--
psch yay for rubber duck debugging \o/ 13:04
13:08 Ven left 13:09 finanalyst joined 13:10 Perl6IRC joined 13:11 Perl6IRC left, uruwi left 13:27 aries_liuxueyang joined 13:29 Actualeyes joined 13:30 mr-foobar joined 13:33 dogbert17 joined 13:36 Actualeyes left 13:40 wamba left
dalek c: 9d1a02e | (Jan-Olof Hendig)++ | doc/Type/Dateish.pod:
Documented the yyyy-mm-dd method
13:40
13:41 _4d47 joined 13:42 mr-foobar left, Ven joined 13:43 mr-foobar joined 13:47 cdg joined 13:55 mr-foobar left 13:56 Actualeyes joined, mr-foobar joined 13:59 Relsak left 14:00 mr-foobar left 14:01 mr-foobar joined 14:11 vaisian_ left 14:20 ufobat joined
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
ZoffixWin \o 14:21
14:22 TimToady left
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 :(