»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
00:03 BenGoldberg joined 00:05 daxim left 00:08 daxim joined, mcmillhj left 00:20 mcmillhj joined 00:24 mcmillhj left 00:27 risou_awy is now known as risou 00:31 zakharyas left 00:32 zakharyas joined 00:36 zakharyas left 00:37 mcmillhj joined 00:42 mcmillhj left 00:45 lukaramu_ left 00:47 risou is now known as risou_awy
skids m: use nqp; BEGIN { grammar fee { }; my $b := fee."!cursor_init"("bar",:0p); say "simple grammar has a " ~ nqp::getattr($b,Cursor,"\$!braid").^name; role foo { }; my $c := nqp::atkey(%*LANG, "MAIN").^mixin(foo)."!cursor_init"("bar",:p(0)); "mixed-in grammar attributes:".say; .name.say for $c.^attributes; say "Mixed in grammar .braid method returns a " ~ $c.braid.^name; nqp::getattr($c,Cursor,"\$!braid").say } 00:50
camelia simple grammar has a Braid
mixed-in grammar attributes:
$!shared
$!from
$!pos
$!match
$!name
$!bstack
$!cstack
$!regexsub
$!restart
$!braid
Mixed in grammar .braid method returns a Braid
5===SORRY!5=== Error while compiling …
skids This gets tripped when using .FOREIGN_LANGUAGE from a slang. 00:51
00:53 mcmillhj joined 00:54 raschipi joined
skids .tell TimToady irclog.perlgeek.de/perl6/2017-03-09#i_14230054 github.com/tadzik/Grammar-BNF/tree/define_slang 00:54
yoleaux skids: I'll pass your message to TimToady.
00:57 bpmedley left 00:58 mcmillhj left 01:06 raschipi left 01:09 aborazmeh joined, aborazmeh left, aborazmeh joined, mcmillhj joined
Util m: grammar G1 { rule TOP { \w+ } }; my $a = "abc"; G1.parse($a) and say $/.gist; 01:14
camelia 「abc」
Util m: grammar G1 { rule TOP { \w+ } }; my $a = "abc"; G1.parse($a) and say $/.gist for 1,2;
camelia Nil
Nil
Util I expect that second line to output «「abc」␤「abc」␤». Back in Rakudo Star 2015.11, that *was* the output.
Before I start bisecting, *are* the `Nil`s a bug, or new proper behaviour that I need to learn?
TimToady I don't believe .parse makes any guarantees about setting $/ 01:15
yoleaux 8 Mar 2017 22:02Z <skids> TimToady: 44b60a560d did the trick. Not that I'll be yanking the "old way" code just I instinctively tested the "new way". Thanks.
00:54Z <skids> TimToady: irclog.perlgeek.de/perl6/2017-03-09#i_14230054 github.com/tadzik/Grammar-BNF/tree/define_slang
01:15 cibs left
TimToady you should just use the return value 01:15
01:16 mcmillhj left
TimToady I'm a little surprised the first one sets $/, actually 01:16
01:17 cibs joined
Util TimToady: That works great. Thanks! I was not suprised that it used to work,because docs.perl6.org/language/variables#.../_Variable says: 01:21
The Grammar.parse method also sets the caller's $/ to the resulting Match object.
01:25 zakharyas joined
TimToady huh. well, use of $/ inside loop thunks is tricky at the best of times, so it's probably setting the wrong $/ somehwere 01:27
MasterDuke i remember some change to $/ somewhat recently
bisectable6: grammar G1 { rule TOP { \w+ } }; my $a = "abc"; G1.parse($a) and say $/.gist for 1,2;
bisectable6 MasterDuke, Bisecting by output (old=2015.12 new=cb41476) because on both starting points the exit code is 0
MasterDuke, bisect log: gist.github.com/b080d0851eca1ed3dc...a4b9dd7e04
MasterDuke, (2016-10-28) github.com/rakudo/rakudo/commit/1f...ca1fb5d856
MasterDuke huh, not what i was thinking 01:28
01:30 zakharyas left
TimToady Util: btw, .gist is redundant with say, as it happens 01:30
Util TimToady: Thanks for that pointer. I have shotgun-and-hammer habits from the early days of being uable to delve easily into the guts of Captures. (like belt-and-suspenders, but more traumatic) 01:33
01:33 mcmillhj joined
Util s/uable/unable/ 01:33
01:37 mcmillhj left 01:43 mcmillhj joined, mcmillhj left 01:53 Cabanossi left 01:54 Cabanossi joined 01:56 risou_awy is now known as risou 02:36 khw joined 02:51 Cabanossi left 02:54 Cabanossi joined 02:57 cosecant joined 02:58 cosecant left 03:03 aborazmeh left 03:05 kaare_ left, kaare__ joined 03:12 noganex joined 03:15 noganex_ left
SmokeMachine m: my Int %a{Str:D; Str:D; Str:D}; %a{""; Int.^name; "singleton"} = 42 03:15
camelia Type check failed in assignment to %a; expected Int but got Hash (${})
in block <unit> at <tmp> line 1
03:20 zengargoyle left 03:22 zengargoyle joined 03:25 xtreak joined 03:33 jdoege joined 03:34 kyan left
jdoege Quick(hopefully) question. Does Perl 6 have a facility for embedding a tcl interpreter like Python does with tkinter? 03:34
03:34 kyan joined
llfourn jdoege: check out: docs.perl6.org/language/nativecall 03:36
afaik no one has done the work specifically for tcl
but we have github.com/niner/Inline-Python which embeds a python interpreter
jdoege From which I could import tkinter... :-) 03:38
Using the entirety of Python as a gasket from Perl6 to tcl.
llfourn sounds like fun :) 03:39
jdoege If no one looks close, they'll never know! :-)
awwaiid moritz: yes, I implemented matplotlib example in rakudo and ruby. Is it being used as the basis for some other example somewhere? It would be better as something more direct rather than py.run
jdoege TY 03:40
03:42 vendethiel- left 03:44 vendethiel joined
Geth ecosystem: 9d73beb569 | (Lloyd Fournier)++ | META.list
Update META.list

renamed Spit-sh org to spitsh
03:44
03:45 cdg_ left 03:46 cdg joined 03:47 naxieAlDle joined 04:00 skids left 04:02 cdg_ joined 04:05 cdg left 04:08 Cabanossi left 04:09 Cabanossi joined 04:10 kaare_ joined 04:14 kaare__ left 04:27 xtreak left 04:29 xtreak joined 04:30 wamba joined 04:31 agentzh left 04:35 Actualeyes left 04:36 cdg_ left 04:41 firefish5000 left 04:43 vendethiel- joined 04:44 vendethiel left 04:55 firefish5000 joined 05:03 khw left
TimToady jdoege: you could do the same via Inline::Perl5 too; in fact, Perl 5 embedded Tcl and Tk long before Python did 05:07
hobbs PerlTk was cool enough to have a whole book! And a chapter in Nutshell, IIRC. 05:14
geekosaur cool for fairly horrifying values thereof, having had the fun of trying to forward port it 05:17
05:27 naxieAlDle left, Cabanossi left 05:28 Cabanossi joined 05:30 xtreak left 05:31 Actualeyes joined 05:33 xtreak joined 05:34 eythian_ joined, eythian left 05:42 curan joined 05:57 beginner joined
beginner how to internally make an asynchronous call to a function through an object 06:00
06:08 agentzh joined 06:11 Cabanossi left 06:12 beginner left 06:14 Cabanossi joined 06:16 noganex left 06:30 user10 joined 06:31 user9 left, user10 is now known as user9 06:33 zakharyas joined 06:37 wamba left 06:42 j75 left, j75 joined 06:46 xtreak left 06:50 RabidGravy joined 06:54 xtreak joined 06:58 zakharyas left, zakharyas joined 07:01 domidumont joined 07:02 BenGoldberg left, zakharyas left 07:05 BenGoldberg joined 07:10 bwisti left 07:12 Cabanossi left 07:13 Cabanossi joined 07:14 Khisanth left 07:20 xtreak left 07:21 CIAvash joined 07:23 xtreak joined 07:26 wamba joined 07:28 Khisanth joined 07:36 firestar joined
firestar hey guys 07:36
i was trying an example from documentation and it didn't work 07:38
grammar foo { regex foo { <.setup> blah blah }; method setup { say 'hi'; }; }
it is from this doc: github.com/perlpilot/perl6-docs/bl...-intro.pod
when calling the setup method <.setup>, i get this error: P6opaque: no such attribute '$!pos' in type Cursor when trying to get a value 07:39
any idea how to fix this?
07:49 nebuchadnezzar left 07:51 bjz joined, nebuchadnezzar joined 07:56 vendethiel- left 08:02 xtreak left 08:04 xtreak joined 08:06 TEttinger left 08:09 TEttinger joined
sjn m: grammar Foo { regex foo { bla <.setup> }; method setup { say "hi"; }; }; my $m = Foo.parse("bla", :rule<foo>); 08:12
camelia hi
P6opaque: no such attribute '$!pos' in type Cursor when trying to get a value
in regex foo at <tmp> line 1
in block <unit> at <tmp> line 1
08:13 noganex joined
moritz awwaiid: I consider using it as a base for an example in my book, if that's OK with you 08:19
08:20 BenGoldberg left 08:21 as_ joined
as_ rakudo: sub f($x, $y) {} ; f (1, 2); 08:21
camelia Too few positionals passed; expected 2 arguments but got 1
in sub f at <tmp> line 1
in block <unit> at <tmp> line 1
as_ i think the error message should be different in this case
it is a bit (or not a bit) misleading
08:25 eythian_ is now known as eythian 08:27 Shozan is now known as SHODAN 08:28 noganex_ joined 08:29 noganex left 08:30 eroux joined
moritz but it's true 08:31
08:32 eroux left 08:33 noganex_ left 08:34 Todd left
as_ true but for p5 developers is not obvious 08:35
masak I can see the argument -- we could probably statically determine that the programmer mistakenly put in whitespace between `f` and `(` 08:37
08:38 noganex joined
masak and we could do it in the error reporting path, so that it doesn't reduce overall performance 08:39
08:39 dakkar joined
masak might be worth it -- then again, might not ;) 08:40
El_Che as_: github.com/FROGGS/p6-Slang-Tuxic :)
masak oh, I was *just* going to suggest that one ;)
08:41 xtreak left 08:42 bjz left 08:44 xtreak joined 08:47 as_ left
firestar @sjn any idea why this doesn't work? 08:48
08:52 bjz joined 08:55 wamba left 08:56 xtreak left 09:01 jsimonet1 left 09:02 jsimonet joined 09:04 jonas1 joined 09:05 Actualeyes left 09:06 bjz left 09:08 bjz joined 09:18 xtreak joined, wamba joined 09:19 domidumont left 09:21 domidumont joined, tardisx left 09:23 plicease left 09:24 plicease joined 09:25 Xliff joined 09:27 domidumont left 09:28 tardisx joined, domidumont joined, noganex left, Xliff_ left 09:30 Ven joined, noganex joined 09:38 holyghost joined
holyghost Hi, I've looked at the perl6 Net::X modules, I want to do game networking server and client, which modules(s) do I need to fetch ? 09:39
jast I don't know the specific packages but can say a few general things. are you wanting to implement a specific game protocol or make something of your own? 09:41
holyghost both
curan I've registered for the Perl conference in Amsterdam – where do I find the corporate tickets to buy? I'm only seeing an "unregister" link
jast I'm guessing there won't be terribly many readily implemented game protocols 09:42
holyghost I can write my own or use Atlas (rewritten in perl6) from worldforge.org
I need things like socket, listen and connect 09:43
jast for your own protocol, it would depend on what type of game it is. games that need a lot of real-time information tend to use UDP, transmit delta information based on the last thing the client has acknowledged receiving, and often use fairly complex prediction logic to minimize the amount of data needing to be sent, so they can send only the data that deviates from the prediction model
09:43 bjz_ joined, bjz left
holyghost It's for a MMORPG 09:43
client and server as I said 09:44
So I guess UDP and TCP
jast I'm not seeing an abundance of third-party modules for this, so I think you'll want to look at IO::Socket and IO::Socket::Async from the standard library. there's also IO::Socket::SSL in the module ecosystem if you need encryption. 09:46
holyghost thx that'll do
jast good luck :)
holyghost quit bbl 09:47
09:47 holyghost left 09:48 ZzZombo joined
ZzZombo m: sub x(Int:D(Cool) $x) { say $x };x('1') 09:51
camelia Type check failed in binding to '$x'; expected Int but got Str ("1")
in sub x at <tmp> line 1
in block <unit> at <tmp> line 1
ZzZombo Don't you die on me! 09:52
09:56 domidumont left 09:58 domidumont joined 10:18 user__ joined
user__ hi 10:18
10:19 xtreak left
user__ how to make an asynchronous call locally 10:19
El_Che curan: I ask about the tickets this week. The organizing were finalizing info about pricing, so it should be up soon
s/organizing/organizers/ 10:20
10:22 xtreak joined 10:26 cibs left 10:28 cibs joined
sammers user_: can you give an example of what you are trying to do? 10:28
10:30 ok joined, ok is now known as Guest84161 10:31 Guest84161 left 10:35 user__ left
curan El_Che: great! It's just that I need to get this info ASAP for a final greenlight and then being able to book trip and accomodation 10:39
10:40 noganex_ joined
DrForr Tickets for what? 10:40
10:41 noganex left 10:43 noganex joined, gregf_ left
El_Che curan: are you on twitter? I was in a similar position and contact them through there 10:43
DrForr: yapc^WTPC EU 10:44
10:45 noganex_ left 10:48 risou is now known as risou_awy, lep-delete left, lep-delete joined
DrForr curan: #yapc on irc.perl.org has the conference managers. 10:48
curan El_Che: I don't use "social" media 10:52
DrForr: thanks, will join there
10:53 naxieAlDle joined 10:58 lukaramu joined 11:00 lep-delete left 11:02 xtreak left
El_Che curan: yeah, twitter is my only sin 11:04
DrForr: and did you decide on the config format for Tidy?
DrForr Not really, but if YAML is common I'll go with the proverbial flow. I'll probably take some time this weekend to properly spruce up what I've got, especially now that otehrs have been asking for it. *others 11:09
IOninja firestar: pretty sure those aren't docs but someone's drafts. The docs are at docs.perl6.org
11:11 Cabanossi left
firestar IOninja: thanks 11:12
do you know if it's possible to pass-down variables to proto-regexes in a grammar?
11:13 Cabanossi joined
firestar in the same fashion as grammar A { token TOP($x) { .**{$x}; }; A.parse('hhh', args => \(3)); 11:13
IOninja m: grammar A { token TOP($x) { <foo($x)> }; proto token foo {*}; token foo:sym<bar>($x) { .**{$x} } }; say A.parse('hhhoooo', args => \(3)); 11:15
camelia Too many positionals passed; expected 1 argument but got 2
in regex foo at <tmp> line 1
in regex TOP at <tmp> line 1
in block <unit> at <tmp> line 1
IOninja hmmmm
11:16 gregf_ joined
IOninja jnthn: any idea? 11:17
11:17 daxim left
jnthn No, you can't do that with proto regexes yet 11:18
IOninja firestar: not sure why it doesn't work, maybe NYI yet. But you can use dynamic variables instead as a workaround.
Ah. OK :)
m: grammar A { token TOP($*x) { <foo> .+ }; proto token foo {*}; token foo:sym<bar> { .**{$*x} } }; say A.parse('hhhoooo', args => \(3));
camelia 「hhhoooo」
foo => 「hhh」
jnthn Can probably be done, though will need some careful handling since the naive way would slow down every single protoregex 11:19
firestar dynamic variables seem to work :) 11:20
m: grammar foo { regex foo { <.setup> blah blah }; method setup { say 'hi'; }; } 11:21
camelia Potential difficulties:
Space is not significant here; please use quotes or :s (:sigspace) modifier (or, to suppress this warning, omit the space, or otherwise change the spacing)
at <tmp>:1
------> 3grammar foo { regex foo { <.setup> …
11:22 daxim joined
firestar what is the active scope of a dynamic variable? 11:24
is it like a global variable
jnthn The dynamic scope 11:25
Thus the same :)
*the name
Essentially, "visible to all of my callers"
Uh, callees 11:26
m: sub foo() { say $*a; }; sub bar() { my $*a = 42; foo() }; bar(); foo();
firestar and it persists up the call stack even if set by other modules, right?
camelia 42
Dynamic variable $*a not found
in sub foo at <tmp> line 1
in block <unit> at <tmp> line 1

Actually thrown at:
in sub foo at <tmp> line 1
in block <unit> at <tmp> line 1
jnthn Correct 11:27
firestar ok, that clears it up alot. thanks
jnthn Fun fact: since the Perl 6 compiler is also just a Perl 6 program, at BEGIN time you can see its dynamic variables too. :P
I've totally never abused th...oh wait, I did. 11:28
11:30 TEttinger left
llfourn m: BEGIN $*W.install_lexical_symbol($*UNIT,"KEEP_WORLD",$*W); note KEEP_WORLD.^name # >:D 11:35
camelia Perl6::World
jnthn I wasn't *that* naughty :) 11:36
DrForr I may need to be that naughty eventually :)
11:38 rindolf joined 11:39 wamba left, ChoHag left 11:41 Cabanossi left 11:42 pmurias joined
pmurias hi 11:42
DrForr o/
11:42 labster left 11:43 donaldh joined, Cabanossi joined
IOninja m: :foo「bar」.say 11:49
camelia 5===SORRY!5=== Error while compiling <tmp>
Bogus postfix
at <tmp>:1
------> 3:foo7⏏5「bar」.say
expecting any of:
infix
infix stopper
statement end
statement modifier
statement mod…
IOninja Well, that's dissapointing
Could've been a shortcut for strings
Well, can't use any escapes in it, so I guess not super usefull....
naxieAlDle you mean 11:51
:「bar」foo ?
IOninja nope
naxieAlDle m: :25foo .say 11:52
camelia foo => 25
IOninja m: :foo[42].say
camelia foo => [42]
IOninja Paired stuff has ^ that form and the string brackets are paired...
naxieAlDle o… oh… what's that…
right, [] instead of () 11:53
m: :foo{ … } .say 11:54
camelia foo => -> ;; $_? is raw { #`(Block|36597032) ... }
naxieAlDle m: :foo{ 25 => 42 } .say
camelia foo => {25 => 42}
naxieAlDle IOninja: well, it could also support “” and ‘’ 11:58
so that you have your escapes :)
IOninja :foo“meow”
doesn't look as cool.
naxieAlDle yea
:|
IOninja: or… we can support ⇒, and then it will be 1 char difference 11:59
IOninja Image is important!
naxieAlDle foo⇒“meow”
actually, no difference
IOninja ew
naxieAlDle squints at ⇒ 12:00
12:04 wamba joined 12:07 bjz_ left, drrho left 12:11 drrho joined 12:12 bjz joined 12:17 aborazmeh joined, aborazmeh left, aborazmeh joined
donaldh Trying to install DBIish, $drv ~~ ::('DBDish::Driver') is failing 12:25
Is that a regression?
12:26 CIAvash left 12:29 raschipi joined
IOninja donaldh, what Perl 6 version are you using? 12:33
*sigh* don't people use name highlight features anymore.... 12:36
DrForr Gotta remember to do that. 12:37
12:40 bbkr joined, bbkr_ left 12:42 Cabanossi left 12:43 lichtkind left, donaldh left, Cabanossi joined 12:47 n1ce left 12:48 ZzZombo left 12:53 ZzZombo joined, ZzZombo left, ZzZombo joined, kent\n left
DrForr Do we have any tests in the main suite that exercise all the grammar match terms? 12:54
12:57 rindolf left
pmurias DrForr: you mean tests that check how the Perl 6 grammar is structured? 12:59
DrForr Yep.
pmurias isn't that Rakudo dependent?
ZzZombo Incoming bug 13:00
m: my %h=(:asd :dsa :kfa);say %h.map({.key~'=>'~.value}).join('␤')
camelia asd=>True
dsa=>1
kfa=>1
timotimo with "main suite" he might mean t rather than t/spec
DrForr Could very well be. I'm not certain enough of the core...
timotimo ZzZombo: unfortunately, that's a known bug
ZzZombo but why? I'm really curious.
timotimo the code to make successive colonpairs work is ... a bit hacky 13:01
and also ... not correct :|
13:02 rindolf joined
pmurias DrForr: as far as I know we don't test the grammar structure in roast as that would cause the spec to bin the grammar structure a lot 13:03
IOninja ZzZombo: if we knew why, the bug would be already fixed, wouldn't it?
pmurias s/bin/pin/
ZzZombo lazyness is a thing
and priorities
timotimo fortunately the workaround is trivial 13:05
it's still annoying
before i wrote that code, successive colonpairs would just completely be lost
IOninja ZzZombo: So the 1,500 of our bugs are unfixed due to laziness?
ZzZombo ugh
I don't like where this is going
IOninja And we know all the fixes, but too lazy to actually write them down.
ZzZombo what is your problem?
DrForr That's fair :) I was just going to come up with a single file that exercises the complete tree. I could just put 'warn;' in every branch and exercise until I get all the warn's covered.
ZzZombo are you trying to passively-aggressively blame me for not fixing bugs, aren't you? Or what is this all about? 13:06
13:06 bjz left
IOninja ZzZombo: people told you it's bug. You ask why is it that way. I told you if we knew we'd fix it. You say laziness is a thing. 13:07
jast that's not the way I'm parsing it
ZzZombo: I think with the laziness/priorities comment you were acknowledging that not all bugs are going to be fixed equally quickly? and I believe IOninja considered the 'laziness' bit an accusation of sorts 13:09
ZzZombo yea, did it trigger you? I didn't intent to, but whatever. 13:10
well, ninja'd. I was about to type the same as jast.
jast well, I think it's fair to react somewhat more strongly to something like that if it's about a project you've put a lot of effort into
at the very least, very much understandable 13:11
13:12 kent\n joined 13:16 bjz joined 13:22 araraloren joined 13:26 noganex_ joined 13:29 noganex left
pmurias DrForr: so you want to have a test file that uses every syntactic feature rather then have one that tests how the parse tree looks? 13:31
13:32 aborazmeh left 13:33 lukaramu_ joined
DrForr Well, I'd take either. 13:34
13:36 n1ce joined 13:37 lukaramu left 13:38 bjz left
naxieAlDle by the way, what's the ticket number for this colonpair thing? 13:38
RT #124553 I think 13:40
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=124553
naxieAlDle hm, nope… 13:41
DrForr Here's what I'm hoping to do: 13:42
13:43 andrzejku left
DrForr Find a set of tests - I guess they'll have to be independent tests - that exercise every alternation in the grammar. This way I can use that test suite and ensure that Perl6::Parser has complete coverage without having to copy blocks from RosettaCode and just hope I've covered all the ways to match. There are a few places where I can look at a term and say "Here's all the possible continuations..." but most of the time it's hard or impossible to 13:45
13:46 wamba left
ZzZombo Well, that was fun: gist.github.com/ZzZombo/8611c06b6d...8496e05f8. 13:48
timotimo it even generates references
ZzZombo Well, it was just captured as plain text. 13:50
13:52 pm5 joined
grondilu m: subset Vector of Array where *.all ~~ Numeric; say [1, 2] ~~ Vector; say [1, 2].all ~~ Numeric 13:54
camelia False
True
grondilu realises what he did wrong 13:55
13:55 donaldh joined
grondilu m: subset Vector of Array where { .all ~~ Numeric }; say [1, 2] ~~ Vector; say [1, 2].all ~~ Numeric 13:55
camelia True
True
donaldh IOninja: I had just "rakudobrew build moar" but have since wiped it and rebuilt. Rogue DBIish failures have gone now.
IOninja: actually still have the failures - 2017.02-217-g030c4c5 built on MoarVM version 2017.02-31-g91aab71 13:59
13:59 bwisti joined
IOninja m: $*PERL.compiler.version.say 14:00
camelia v2017.02.217.g.030.c.4.c.5
IOninja donaldh: what kind of failures?
grondilu: `where` thunks. No need for curlies there 14:01
donaldh $drv ~~ ::('DBDish::Driver') # False
grondilu why the different result then?
IOninja m: subset Vector of Array where .all ~~ Numeric; say [1, 2] ~~ Vector; say [1, 2].all ~~ Numeric
camelia True
True
IOninja grondilu: because *.all ~~ blah doesn't create a closure over the ~~ 14:02
grondilu ok
14:03 pm5 left, yqt joined
IOninja donaldh: which file is that bit in? 14:03
donaldh IOninja: t/01-Basic.t in DBIish 14:04
14:04 pm5 joined
IOninja nine: llfourn any idea why DBIish has this issue? This is the code in question: github.com/perl6/DBIish/blob/maste...asic.t#L29 14:05
m: use TAP; dd ::('TAP::Harness') 14:06
camelia TAP::Harness
IOninja seems to work fine here...
14:07 Actualeyes joined 14:10 ChoHag joined 14:13 naxieAlDle left
donaldh IOninja: maybe a lexical scope issue? 14:13
::('DBDish::Driver') # No such symbol 'DBDish::Driver' 14:14
IOninja donaldh: recently, a bunch of work on `require` was done. I'm guessing there's a `require DBDish::Driver` or something along those lines done somewhere
m: require TAP; dd ::('TAP::Harness')
camelia TAP::Harness
IOninja m: { require TAP; } dd ::('TAP::Harness') 14:15
camelia 5===SORRY!5=== Error while compiling <tmp>
Strange text after block (missing semicolon or comma?)
at <tmp>:1
------> 3{ require TAP; }7⏏5 dd ::('TAP::Harness')
expecting any of:
infix
infix stopper
stat…
IOninja m: { require TAP; }; dd ::('TAP::Harness')
camelia No such symbol 'TAP'
in block <unit> at <tmp> line 1

Actually thrown at:
in block <unit> at <tmp> line 1
IOninja star: { require TAP; }; dd ::('TAP::Harness')
camelia TAP::Harness
IOninja So now ^ the require is lexical
donaldh Hmmm.Also breaks github.com/perl6/perl6-lwp-simple/...ue-7.t#L10 14:16
IOninja lib/DBIish.pm6:1732: my \M = (require ::($module)); <-- could that be the issue? 14:17
donaldh: hm. I thought that case was fixed already...
NeuralAnomaly: status
NeuralAnomaly IOninja, [✘] Next release will be in 1 week and 2 days. Since last release, there are 44 new still-open tickets (4 unreviewed and 1 blockers) and 53 unreviewed commits. See perl6.fail/release/stats for details
IOninja gonna be a rocky release seems like :/ 14:18
nine donaldh: require is now lexial, same as use
14:18 firestar left
IOninja nine: this should work fine, right? try require IO::Socket::SSL; if ::('IO::Socket::SSL') ~~ Failure { ... } 14:19
nine IOninja: yes 14:20
SmokeMachine m: role R[Int $a] {}; role R::A[Int $a] does R[$a] {}; R::A[42].new # shouldn't it work?
camelia No appropriate parametric role variant available for 'R'
in any protect at gen/moar/stage2/NQPCORE.setting line 802
in block <unit> at <tmp> line 1
IOninja m: role F[int $a, int $b] {}; say F[&say.arity, &say.count] 14:22
camelia (F[Int,Num])
IOninja nm. was gonna ask something but see the error of my ways :}
perlpilot good $localtime all
SmokeMachine m: role R[Int $a] {}; role R::A[Int $a] does R[$a] {}; say R::A[42]
camelia (R::A[Int])
SmokeMachine m: role R[Int $a] {}; role R::A[Int $a] does R[$a] {}; say R::A[42].^pun 14:23
camelia No appropriate parametric role variant available for 'R'
in any protect at gen/moar/stage2/NQPCORE.setting line 802
in block <unit> at <tmp> line 1
donaldh nine: what is recommended as a replacement for github.com/perl6/DBIish/blob/maste...asic.t#L29
SmokeMachine m: role R[Int $a] {}; role R::A[Int $a] does R[$a] {}; class C does R::A[42] {}; say C.new
camelia 5===SORRY!5=== Error while compiling <tmp>
No appropriate parametric role variant available for 'R'
at <tmp>:1
14:23 curan left
donaldh nine: The test could "use DBDish;" and smartmatch against DBDish::Driver I suppose 14:24
nine donaldh: use DBIish::Driver;?
awwaiid moritz: definitely good with me, you have my full and complete permission to use it (with no need for attribution)
14:25 raschipi left
IOninja nine: from a users viewpoint, how come require has been made lexical? Seems there's quite an impact from this change, but there wasn't any warning for users... Release is in a week. 14:26
donaldh nine: DBDish::Driver is a role defined in unit module DBDish, so I'm guessing "use DBDish"
moritz awwaiid: ok, thanks
awwaiid moritz: I think we can make better examples though 14:27
nine Yes, use DBDish; in that test file fixes it
moritz awwaiid: do you want to contribute some?
awwaiid moritz: yes
:)
nine IOninja: well, yes, we could have handled this better. The whole change was caused by some cases of require usage were already broken by lexical_module_loading. The fix was to walk the rest of the way. 14:28
donaldh I'm guessing there's not much point in using the ::('DBDish::Driver') idiom when DBDish::Driver needs to be defined in the current scope.
moritz awwaiid: I'm always interested in co-authors for a chapter
nine IOninja: so in a sense the change was already announced, but only implicitly.
IOninja nine: got it. Thanks.
awwaiid moritz: I'm pinging directly
donaldh m: try require Hoopy::Doopy; if ::('Hoopy::Doopy') ~~ Failure { say "not available" } 14:38
camelia ( no output )
IOninja m: try require Hoopy::Doopy; dd ::('Hoopy::Doopy'); 14:39
camelia Doopy
IOninja m: try require Hoopy::Doopy; dd ::('Hoopy::Doopy').^name;
camelia "Doopy"
IOninja m: try require Hoopy::Doopy; dd ::('Hoopy::Doopy').HOW.^name;
camelia "Perl6::Metamodel::PackageHOW"
donaldh m: try require Hoopy::Doopy; Hoopy::Doopy.new; 14:40
camelia You cannot create an instance of this type (Doopy)
in block <unit> at <tmp> line 1
IOninja m: dd ::('ddasdas::dasdasdasdsadsa')
camelia Failure.new(exception => X::NoSuchSymbol.new(symbol => "ddasdas::dasdasdasdsadsa"), backtrace => Backtrace.new)
donaldh So it's getting a placeholder package that doesn't smartmatch against Failure.
IOninja m: try require ddasdas::dasdasdasdsadsa; dd ::('ddasdas::dasdasdasdsadsa') 14:41
camelia dasdasdasdsadsa
IOninja Yeah...
m: dd try require ddasdas::dasdasdasdsadsa; dd ::('ddasdas::dasdasdasdsadsa')
camelia Nil
dasdasdasdsadsa
14:41 obfusk_ joined, obfusk left
donaldh m: try require ASDFG; say ASDFG ~~ Failure 14:41
camelia False
IOninja m: try require ddasdas::dasdasdasdsadsa; if $! { say "not available" } 14:42
camelia not available
14:42 Cabanossi left
Geth DBIish: f6b2a2743c | (Stefan Seifert)++ | t/01-Basic.t
Fix test failures caused by lexcial require
14:42
nine Oh nice, I have push access to that repo :)
donaldh nine++ 14:43
IOninja nine: now it's a sideeffect that try require whatever; installs a whatever package? And using ::('whatever') won't fail?
14:43 Cabanossi joined
IOninja m: class Foo { has int $.bar = 42 }; role Bar[$x] { has int $.bar = $x; }; my $x = Foo.new; $x.^mixin(Bar[1000]); say $x.bar; 14:45
camelia 0
nine IOninja: S11 requires us to install the stub package to be replaced at runtime by require. It does not say what should happen if the require actually failed :)
IOninja Can I override an attribute of a class? Above I want it to give 1000 not zero
nine: ok
nine IOninja: I'm not sure what we should do. We could remove it from ::() lookup, but we cannot remove the lexical.
m: try require whateverfoo; say whateverfoo 14:46
camelia (whateverfoo)
nine m: try require whateverfoo; say whateverfoo.HOW.^name
camelia Perl6::Metamodel::PackageHOW
donaldh m: try require Doopy; Doopy.new
camelia You cannot create an instance of this type (Doopy)
in block <unit> at <tmp> line 1
IOninja nine: I think it's fine as is as a general thing. We'll just need to rake through ecosystem to spot any such usages that expect the ::('blah') after require to fail. 14:48
Like here: github.com/perl6/perl6-lwp-simple/...ue-7.t#L10
14:49 wamba joined
IOninja m: without (try require Mumbo::Jumbo) { say "no such thing, bruh" } 14:49
camelia no such thing, bruh
donaldh nine: IOninja: what would be the best way to test a type for validity?
that, I guess :-) 14:50
moritz m: without (try Test) { say "no such thing, bruh" } 14:51
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared name:
Test used at line 1
moritz m: without (try require Test) { say "no such thing, bruh" }
camelia no such thing, bruh
IOninja donaldh: no, it's wrong
moritz m: try require Test; say ?$!
camelia False
moritz m: try require Outofluck; say ?$!
camelia True
IOninja ...for two reasons :} 14:52
(export is only within the block; the type is undefined) 14:53
wonder how this test works; considering that site redirects to https :/ github.com/perl6/perl6-lwp-simple/...-org.t#L15 14:55
14:56 Ven left
IOninja Do we want all community modules to announce changes in here? I know Pod::To::Html does, but I see LWP::Simple doesn't 14:56
Any idea for my role question?
m: sub foo (|) {}; role F[$arity] { has int $!arity = $arity; }; &foo.^mixin(F[42]); say &foo.arity; 14:58
camelia 0
IOninja I mean...
m: sub foo (|) {}; role F[$arity] { has int $!arity = $arity; }; &foo.signature.^mixin(F[42]); say &foo.signature.arity; 14:59
camelia 0
IOninja how to make it non-zero?
oh 15:00
araraloren m: sub foo (|) {}; role F[$arity] { has int $.arity = $arity; }; &foo.^mixin(F[42]); say &foo.arity;
camelia 0
jnthn m: sub foo (|) {}; role F[$arity] { method arity() { $arity } }; &foo.^mixin(F[42]); say &foo.arity; 15:01
camelia 42
araraloren m: sub foo (|) {}; role F[$arity] { has int $.arity = $arity; }; say F[42].new.arity
camelia 42
jnthn Not sure why the other case didn't work (it really should, I think)
But you don't need an attribute at all if it's a constant
Just make the method return it
IOninja That was my first attempt, didn't work either. Lemme try again 15:02
Ah, OK, seems to work now. jnthn++ 15:03
15:15 bdmatatu joined
ZzZombo Seems like severe bugs in this: 15:18
m: $*PROGRAM-NAME.IO.split(/\s+ || <punct>/,:v,:skip-empty).perl.say
camelia ("\$", "PROGRAM", "NAME", "IO", "split", "", "", "s+", "||", "<punct>", "", "", "v", "", "skip", "empty", "", "perl", "say").Seq
15:18 mcmillhj joined
jnthn m: say $*PROGRAM-NAME 15:20
camelia <tmp>
jnthn What's the bug? :)
Oh, skip-empty
IOninja That skip-empty doesn't skip, but I suspect that's because you're asking `:v` to interleave matches, so it does interleave empty ones
m: $*PROGRAM-NAME.IO.split(/\s+ || <punct>/,:skip-empty).perl.say 15:21
15:21 ZzZombo_ joined, ZzZombo_ left, ZzZombo_ joined
camelia ("\$", "PROGRAM", "NAME", "IO", "split", "", "", "s+", "||", "<punct>", "", "", "skip", "empty", "", "perl", "say").Seq 15:21
IOninja heh
s: $*PROGRAM-NAME.IO, 'split', \(/\s+ || <punct>/,:skip-empty)
SourceBaby IOninja, Sauce is at github.com/rakudo/rakudo/blob/030c...th.pm#L532
jnthn Maybe .IO.split simply doesn't implement :skip-empty
IOninja Oh, I bet $5 it fails to pass the params properly
And of course it doesn't... 15:22
ZzZombo_ as well as :v and I bet the other named params...
IOninja It DOES capture them tho lol :P
Ohhh. Well, this is weird. The params to .split() on IO::Path is for the .open not for .split :S
15:24 ZzZombo left, skids joined
skids o/ 15:24
IOninja Well, this has the same issue as IO::Path.lines with the handle closing business
m: for ^2000 { $ = $*PROGRAM-NAME.IO.split(/\s+ || <punct>/,:skip-empty)[^1] } 15:25
camelia ( no output )
IOninja m: for ^20000 { $ = $*PROGRAM-NAME.IO.split(/\s+ || <punct>/,:skip-empty)[^1] }
camelia ( no output )
IOninja m: my &foo = [o] sub { $^a.uc }, sub { "$^a:$^b" }; <a b c d e f g h>.map(&foo).say 15:29
camelia Too few positionals passed; expected 2 arguments but got 1
in sub at <tmp> line 1
in block <unit> at <tmp> line 1
IOninja works locally :) 15:30
15:31 donaldh left 15:32 sufrosti1o joined, sufrostico joined
shdb jnthn: do you know how i would get the source address and the source port of a udp connection received by IO::Socket::Async? 15:35
15:36 xzhao left
jnthn shdb: That's not implemented yet, sorry. 15:38
Will probably get to it when dealing with other socket bits that we're missing 15:39
IOninja I'm gonna add IO::Path.split,.words and any other to IO Action plan. I think lizmat++ is right that all these should just slurp stuff, since we can't guarantee handle closing. And we can simplify the code greatly, but just fowarding all of the splitting and wording to Str.* routines 15:40
If you want it lazy, then do the .open thing yourself.
I've read somewhere old that 6.d stuff is supposed to be ADDITIVE to 6.c? Is that still true? 15:41
I kinda figured we'd just save all the src/Perl6 and src/core into some 6.c folder that'd get loaded for 6.c language and just copy stuff over for 6.d and work off that.
And critical bug fixes would be backported, and in later languages we could (from technical POV) change literally everything... 15:43
jnthn I'd viewed 6.d as being additive; certainly that's what the infrastructure we have at the moemnt supports 15:44
15:44 xzhao joined
shdb jnthn: ok thanks. i thought so looking at the source. i will keep an eye on it then 15:44
IOninja oh :( 15:45
OK. That'll do for now.
jnthn There're some really difficult problems to crack if you want to do otherwise with src/core/
I mean, if Int in 6.d and Int in 6.c aren't the same type, then you can't pass an Int from 6.c code to 6.d code :P 15:46
Without it faiing the type constraint
Which I think is quite clearly undesirable :)
I think we probably need to see how those things shake out in versioned modules before we do it at the language level 15:47
timotimo could always build a hllize-related mechanism for 6.c <-> 6.d :P
IOninja Well, one of the things I wanted to toss were SeekFromCurrent enums, but I guess they'd be left over in 6.d even if we override the subs to not accept them anymore. The other thing I marked for removal in 6.d I think was the $limit arg in IO::Path.lines 'cause it's kinda pointless
But if everything's additive the old candidate that takes $limit would remain 15:48
15:48 BenGoldberg joined
IOninja huggable: 6.d 15:48
huggable IOninja, Proposals for 6.d language: github.com/perl6/specs/blob/master/v6d.pod
IOninja That will stay then: "Remove dummy precision parameters from Rational/Int .Rat and .FatRat coercers" 15:49
BenGoldberg m: pi.Rat.nude.say 15:55
camelia (355 113)
BenGoldberg . o O (Change the default precision for Num to Rat conversion to 2**53, or whatever the platform supports) 15:56
m: (pi*2**64).Int / 2**64
camelia WARNINGS for <tmp>:
Useless use of "/" in expression ".Int / 2**" in sink context (line 1)
BenGoldberg m: ((pi*2**64).Int / 2**64).nude.say
camelia (884279719003555 281474976710656)
BenGoldberg m: ((pi*2**64).Int / 2**64).say 15:57
camelia 3.1415926535897931
BenGoldberg m: ((pi*2**64).Int / 2**64 - pi).say
camelia 0
IOninja BenGoldberg: what do you mean precision? You have 14 digits of precision 15:58
Not 2**53
BenGoldberg: and Num.Rat takes $epsilon precision tweaker, so... knock yourself out :)
BenGoldberg m: pi.Rat(14) - pi 15:59
camelia WARNINGS for <tmp>:
Useless use of "-" in expression ".Rat(14) - pi" in sink context (line 1)
BenGoldberg m: say pi.Rat(14) - pi
camelia -0.141592653589793
BenGoldberg m: say pi.Rat(20) - pi
camelia -0.141592653589793
BenGoldberg m: say pi.Rat(2**53) - pi
camelia -0.141592653589793
BenGoldberg m: say pi.Rat(epsilon =? 2**53) - pi
camelia 5===SORRY!5=== Error while compiling <tmp>
Preceding context expects a term, but found infix = instead
at <tmp>:1
------> 3say pi.Rat(epsilon =7⏏5? 2**53) - pi
BenGoldberg m: say pi.Rat(epsilon => 2**53) - pi
camelia 2.66764189404967e-07
BenGoldberg m: say pi.Rat(epsilon => 2**64) - pi 16:00
camelia 2.66764189404967e-07
IOninja We do have documentation... :)
BenGoldberg But that's not as fun as figuring things out via camelia.
IOninja Camelia supports /msg FWIW 16:01
16:01 araraloren left 16:02 robertle joined 16:04 donaldh joined
ZzZombo_ Eh? 16:05
16:05 user9 left
ZzZombo_ "Precedence of ~= is too loose to use inside ?? !!; please parenthesize" 16:05
What's the point?
16:06 user9 joined, risou_awy is now known as risou
ZzZombo_ If it's too loose, make it warn, but still work as advertised. 16:06
16:06 Actualeyes left
IOninja We'll get right on that, boss! 16:08
ZzZombo_ What is your damn problem??
Nobody is requesting YOU or anybody else to do anything right away.
IOninja Hahaha 16:09
ZzZombo_: and what's your damn problem? If you have a bug report it. Some of us are sick of your incessant bitching. 16:11
I told you several times before. We can't fix what we don't know about it. Report it, if you think it's a problem.
ZzZombo_ Great, I forgot the IRC wasn't meant for discussions, discussions whether something works as it should, and why. 16:13
IOninja Right, knock yourself out. 16:14
BenGoldberg m: Bool.pick ?? my $x !! my $y = 42; say $x; say $y;
camelia (Any)
(Any)
perlpilot *sigh*
BenGoldberg m: Bool.pick ?? my $x = 12 !! my $y = 42; say $x; say $y;
camelia 12
(Any)
ZzZombo_ What a prick
BenGoldberg m: (Bool.pick ?? my $x !! my $y) = 42; say $x; say $y; 16:15
camelia (Any)
42
IOninja ZzZombo_: right back at ya
BenGoldberg Children, children ...
perlpilot IOninja, ZzZombo_: could the two of you fight in private or something?
IOninja There's no fight. Ignore button works
ZzZombo_ I won't, since I already got over and won't respond to his attacks. 16:16
BenGoldberg This being irc, you're allowed to /ignore each other.
lizmat IOninja: IO::Path.splt/words/ code wouldn't simplify much, merely forwarding to Str instead of IO::Handle 16:18
TimToady ZzZombo_: if you have a problem with language design, take it up with me, not IOninja, who has been very useful around here when he's not being trolled 16:20
16:20 Actualeyes joined
IOninja lizmat: right now they're broken tho (or at least split is) it doesn't handle all the args that split can handle 16:22
16:22 risou is now known as risou_awy
perlpilot ZzZombo_: I think the answer to your "what's the point?" question is that it won't work like you think it should, so you get the exception to let you know that. 16:22
ZzZombo_: Making it work instead would perturb the language in ways that aren't good when taken holistically 16:24
ZzZombo_: or, put another way, your local optimization would cause a global pessimization :) 16:25
IOninja lizmat: and IO::Handle.split too doesn't take :skip-empty, or :v ATM. ... It takes :$COMB tho :P not sure what that is :)
lizmat IOninja: the logic of IO::Handle.split/comb are intertwined :-)
IOninja ah
lizmat :COMB just tells it to work like comb instead of split 16:26
probably needs cleaning up as well :-)
IOninja :)
16:26 lizmat left 16:27 lizmat joined 16:29 bdmatatu left 16:31 lizmat left 16:32 lizmat joined, pukku joined
pukku Hi! I have written a Perl 6 program to demonstrate some stuff for a talk I'm giving next week. (Some of you helped me with some issues related to this yesterday.) If I sent out a gist, would people be willing to spend a minute or two and let me know if there any Perl 6 idioms I should be using that I'm not? Right now, it's mostly a translation of a Perl 5 program. 16:35
IOninja pukku: sure. 16:36
Pre-emptively: use %h<foo> instead of %h{'foo'} :)
pukku Thanks! I've already gone through and changed those. Here is the code: gist.github.com/remorse/7fbfd973dc...258ea192dc 16:38
jnthn unless ($data.is-success) { # don't need parens around the condition here, or in many other places 16:40
IOninja pukku: `unless ($data.is-success) {` <--- remove the parentheses. We don't use them in Perl 6
BenGoldberg Positional variables, by default are optional. And when you don't supply one, they get an undef-like value... Since undefs are false, you don't need to explicitly give :$photo a False default...
jnthn Also if (!foo) is more natural as unless foo { } 16:41
IOninja pukku: same with `if (!%json<posts>) {` I'd write those as `unless %json<posts>`
BenGoldberg We do use parens, must most of feel that code looks cleaner with as few of them as possible.
El_Che maybe it's just me, but I dislike block starting with unless (also on Perl 5)
ah, jnthn had the same comment 16:42
IOninja pukku: and don't know about idiomaticisim, but I'd write those as: %json<posts> or croak "Not enough posts received."; <-- utilizing the shortcurcuiting of conditioonals and... Death to parens!
jnthn On 72, the hash keys don't need quoting with =>
Similar on 90 16:43
In somehtin glike
if (%s<regular-title>) { # note that I don't have to test defined and not empty!
BenGoldberg Also, if %json<posts>:v.elems != 1 looks a bit strange ... fetching a value is the default, so you can drop the :v
jnthn %pdata<post_body> = "<h2>%s<regular-title></h2>\n\n";
IOninja pukku: and Perl 6's idomatic casing is kebob-case; so instead of `multi add_tumblr_data`, I'd write `multi add-tumblr-data`
jnthn You can write if %s<regular-title> -> $title {
And then use $title rather than menioning the whole %s<regular-title> again 16:44
BenGoldberg And, what if posts happens to be present, but has zero items? if %json<posts>.elems > 1 { croak ... } would make more sense.
pukku Thanks for all the feedback!
IOninja pukku: and on line 138.... Death to parens! In Perl 6 no need any parens when intializing a %hash or an @array
jnthn my $_convert_imgs_helper = sub ($url) { 16:45
pukku - re parentheses -- I'll go through and get rid of most of them.
jnthn A subroutine in Perl 6 is lexical by default, not our-scoped, so you can just define that helper as a normal sub
pukku - re if (!) vs unless -- I thought I had read somewhere that people preferred unless; if that's not true, I'll probably go back to if (!)
IOninja pukku: and I personally would write $ua.get("$url"); as $ua.get: $url; no need to quote variables and... Death to parens! :)
jnthn And refer to it as &convert_images_helper or so
timotimo well there is a use case for "$url" instead of $url
because that does $url.Str for you 16:46
IOninja pukku: I prefer unless but I heard people with backgrounds in some sort of languages... to them it sounds very strange
timotimo: ah, right
Though I'd write that as ~$url
El_Che IOninja: I think it's more a natural language thing
timotimo yeah
El_Che TimToady could clarify :)
pukku - re quoting hash keys, I'll remove the quotes. However, I reflexively put them in because sometimes (in Perl 5 at least) you need them -- does magic quoting in perl 6 handle cases with hyphens and other potentially operator like characters? 16:47
- I'll switch over to kebab-case, which is easier to type!
timotimo magic quoting doesn't really exist as a thing any more
16:47 risou_awy is now known as risou
IOninja s: &slurp.candidates».signature.say 16:48
SourceBaby IOninja, Something's wrong: ((IO::ArgFiles:D $io = { ... }, :$bin, :$enc = "utf8", |c is raw) (Cool:D $path, :$bin = Bool::False, :$enc = "utf8", |c is raw))␤␤ERR: Cannot resolve caller sourcery(Bool); none of these signatures match:␤ ($thing, Str:D $method, Capture $c)␤ ($thing, Str:D $method)␤ (&code)␤ (&code, Capture $c)␤ in block <unit> at -e line 6␤␤
pukku - the ':v.elems' was because, in a conversation yesterday, it seemed like I needed to unwrap it to make sure I was counting the number of elements in the list, not that there was a key with an "any" value
16:48 st_elmo joined
timotimo right, without :v you'll get entries for keys that didn't exist in the hash 16:48
pukku - I like using the pointy arrow in the if!
IOninja pukku: %output<dir> ~ %output<file> can be written as just %output<dir file>.join 16:49
timotimo yes, pointy arrow with if is fantastic
pukku - quoting the $url variable is because I need the string version, not the Match object that it is otherwise
timotimo good point 16:50
IOninja pukku: also, you have a bug here; the $_ doesn't contain the error; use `orelse` so the Failure gets bound to $_ : gist.github.com/remorse/7fbfd973dc...-L171-L175 16:51
pukku: side note: mkdir() and slurp() might not be returning Failures but throwing instead, that should be corrected (i.e. they would return a Failure) by 2017.04.15
timotimo that's an IOwesome, right?
IOninja IOwesomeness \o/ 16:52
16:55 cdg joined 16:56 abraxxa left
IOninja pukku: with, without, and given blocks are a common sight too. Helps you avoid repeating the variables and stuff. e.g. lines 174-175 can be written like this: gist.github.com/zoffixznet/6386aba...5f4467a1c1 16:58
tbrowder ref undefined named param: this code seems to work and is even shorter: "!$fmt || $fmt ~~ &fmt". is "if $var" always a reliable test as good as "if $var.defined"?
IOninja pukku: and there are postfix statement modifer forms, so if you weren't using $_ already you could've used the postfix. Like .d or .mkdir with %output<blahblah> ~ 'some-dir' 16:59
tbrowder: it tests for different things. For example 0 is defined but false 17:00
17:00 mcmillhj left
IOninja Empty string is defined but false 17:00
m: say Empty.defined 17:01
camelia False
IOninja heh
m: say slip().defined
camelia False
IOninja Well, empty stuff that ain't a slip is defined but false :P
tbrowder but given the context, i.e., texting for definedness in a where block, is "if $var" reliable?
17:01 robertle left
BenGoldberg The 'with' keyword is like 'if' but tests for definedness instead of truth. 17:01
IOninja tbrowder: what's definedness? whether .defined returns False? 17:03
tbrowder: also, reliable for what? :)
m: class Foo { method defined { True }; method Bool { False } } <-- that would be accepted, but it's not "defined" 17:04
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routines:
accepted used at line 1
be used at line 1
but used at line 1. Did you mean 'put'?
it's used at line 1
that used at line 1. Did you mean 'WHAT'?
woul…
IOninja s/m://
BenGoldberg s: 3, 'defined'
SourceBaby BenGoldberg, Sauce is at github.com/rakudo/rakudo/blob/030c...Mu.pm#L102
IOninja s: Failure.new, 'defined' 17:05
SourceBaby IOninja, Sauce is at github.com/rakudo/rakudo/blob/030c...ure.pm#L51
IOninja ^ an override
Nil has one too
pukku Wow! Thanks for all of the feedback. I'm working on making most of the changes suggested (although there may be one or two that I miss...)
IOninja oh wait, not Nil. Slip, I guess..
pukku: any time. 17:06
tbrowder reviewing the named param constraint from yesterday: "sub foo(:!$fmt where { !$fmt.defined || $fmt ~~ &fmt })". shouldn't "sub foo(:$fmt where { !$fmt || $fmt ~~ &fmt })" work as well?
BenGoldberg It would've been funny if Mu's definitition of defined was something like: method defined(Mu:D) { True }; method defined(Mu:U) { False }, which would obviously eliminated the need for the nqp bits.
tbrowder reviewing the named param constraint from yesterday: "sub foo(:$fmt where { !$fmt.defined || $fmt ~~ &fmt })". shouldn't "sub foo(:$fmt where { !$fmt || $fmt ~~ &fmt })" work as well? [correction] 17:07
in other words, if $fmt is defined, regardless of its value, we can then do the smart match test on the defined var 17:08
hm, i see the problem now...how would the 'with' test plug in...let me try... 17:09
BenGoldberg If you had: "multi fmt($ where !$f) { True }; multi fmt($otherwise) {...}" then you could have: "sub foo(:$fmt where { fmt($fmt) })", because it's silly to smartmatch against something which you *know* is a subroutine. 17:10
17:10 domidumont left 17:12 mcmillhj joined
IOninja tbrowder: why not move all of the definedness checks and smartmatches into a sub? You can then `where &foo` and be done 17:13
Also...
buggable: eco subset::helper
buggable IOninja, Subset::Helper 'create awesome subsets': github.com/zoffixznet/perl6-Subset-Helper
IOninja tbrowder: also, in that context, .not is shorter than !$fmt
17:17 mcmillhj left
tbrowder IOninja: the sub is a good idea since i already had to define a token for the named var. how does Perl 6 detect the sub call "&foo" from the "&foo" which is a defined token? the presence or absence of the explicit block after the "where"? 17:17
17:17 donaldh left
tbrowder ref yr Subset::Helper i don't think a single var test warrants the dependency 17:19
IOninja tbrowder: why not?
tbrowder: what's a cost of a dependency? 17:20
In Rust, even `rand` function is given through a dependency.
tbrowder i guess that's personal preference and can be discussed over a brewski, but the Perl 6 ecosystem sure seems to make it easier to have such dependencies! 17:21
IOninja "I don't want a dependency" is another way of saying "I like to waste my time reinventing wheels and debugging all the bugs already debugged in a dependency"
ugexe but in reality it involves debugging other people's meta6.json files and whatnot 17:22
IOninja heh
Copy the file over then :)
I'm planning to tell people to start adding tags to their meta files BTW 17:23
tbrowder i'm not against dependencies at all, but in this case i think it isn't warranted, but i guarantee you i will try the Subset::Helper because i like param constraints!
IOninja And gonna add a tags row to modules.perl6.org; similar how we got bug tags on perl6.fail 17:24
ugexe wonder if you cant do something like &foo does role :: { method ACCEPTS(|c) { ... } }
17:25 girafe joined
ugexe tags would be more useful to search against than description or a fuzzy name search 17:25
pukku Is there a better way to say [email@hidden.address] { a => %x<a>, b => %x<b>};"? Something which reduces the repetition of %x? (Maybe there isn't, it's not like it takes a lot of extra typing, but just curious...)
tbrowder is the plan to have some standard tags? i like that idea 17:26
17:26 mcmillhj joined
ugexe @foo.push: { |%x } ? 17:26
or do you want specific keys only? 17:27
IOninja |%x<a b>:p would work, if you want just the slice
(untested) 17:28
pukku Sorry, my example wasn't clear -- I want to only have specific keys, and rename the keys. Should have been more like [email@hidden.address] { k1 => %x<a>, k2 => %x<b> };"
IOninja pukku: @foo.push: %( k1 => .<a>, k2 => .<b> ) with %x 17:29
ugexe its longer, but something like `@foo.push: with { :k1(.<a>), :k2(.<b>) }` might work
pukku Thanks!
17:30 dakkar left 17:32 mcmillhj left 17:34 risou is now known as risou_awy 17:39 tramdas joined, bjz joined
tramdas hello. what is the way to use interface in Perl6 17:39
IOninja tramdas: what kind of interface? 17:41
17:41 lichtkind joined 17:42 domidumont joined
IOninja m: <a b c d e f g>.map(*.uc ∘ *~*).say 17:42
camelia Type check failed in binding to '<anon>'; expected Callable but got Str ("a")
in whatevercode at <tmp> line 1
in block <unit> at <tmp> line 1
tbrowder IOninja: see using a sub for the named param code in github gist <gist.github.com/tbrowder/62e228377...5ef8fe>
IOninja Wondering why ^ that fails :/
mst tramdas: if you mean java-style, a role is an interface with (possibly) a partial default implementation
17:43 khw joined, agentzh left
tramdas @ioninja just to declare abstract methods 17:43
tbrowder great idea! now i'll try your Subset::Helper... 17:44
IOninja tbrowder: why have token instead of normal regex there? That particular code can be faster witho ut any regexes: .defined or $fmt eq any <a A b B>
17:44 mcmillhj joined
mst tramdas: docs.perl6.org/language/objects#Stubs 17:44
17:44 tramdas left 17:45 tramdas joined
IOninja m: role Foo { method bar { … } }; class Bar does Foo {} 17:45
camelia 5===SORRY!5=== Error while compiling <tmp>
Method 'bar' must be implemented by Bar because it is required by roles: Foo.
at <tmp>:1
IOninja m: role Foo { method bar { … } }; class Bar does Foo { method bar { say "hi" } }.bar
camelia hi
IOninja tramdas: dunno if you missed the link above due to reconect; mst linked to docs.perl6.org/language/objects#Stubs 17:47
TimToady m: <a b c d e f g>.map([∘] *.uc, *~*).say
camelia Too few positionals passed; expected 2 arguments but got 1
in block <unit> at <tmp> line 1
tbrowder because i'm not as well-informed as you are (and because this simple code is just for discussion, my real code has more comparisons that i think require a regex or set of tokens, but i will just use yr code for this...thanks!
17:48 inspire joined
tramdas <Ioninja> Thank u 17:49
IOninja m: <a b c d e f g h>.map([∘] *.uc, *~*).say
camelia (AB CD EF GH)
IOninja Ah OK. It closes over the ∘ I guess.
Thanks.
17:49 cibs left, mcmillhj left 17:51 cibs joined
inspire @tramdas : roles with stubs 17:52
TimToady m: <a b c d e f g h>.map(item(*.uc) ∘ item(*~*)).say
camelia (AB CD EF GH)
mst tramdas: you're welcome 17:55
17:55 inspire left
IOninja mst++ knowing wtf interfaces are! :) 17:56
m: <2 3 2 4 3 10>.map(*.&[-](2) ∘ *.flip ∘ &[**]).say 17:58
camelia (6 59 94093)
IOninja \o/
mst I've had a lot of practice teaching people Moo(se)
17:59 mcmillhj joined 18:13 bjz left
IOninja m: sub foo { role Bar {} }; say Bar 18:16
camelia (Bar)
IOninja m: FakeSignature
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared name:
FakeSignature used at line 1
IOninja How come FakeSignature isn't available? It don't got a my on it: github.com/rakudo/rakudo/blob/032b...rs.pm#L761
(I don't want it available, but just noticed it doesn't have a my) 18:17
[Coke] IOninja: defaults to my? 18:29
IOninja [Coke]: just in core?
*in setting
m: say CORE::Ffsdfdsfdsfdsfds 18:32
camelia Nil
IOninja m: say CORE::Ffsdfdsfdsfdsfds.HOW.^name
camelia Perl6::Metamodel::ClassHOW
IOninja nine: ^ is that normal?
or anyone :) 18:33
m: say PROCESS::edsadsadsa 18:34
camelia Could not find symbol 'edsadsadsa'
in block <unit> at <tmp> line 1

Actually thrown at:
in block <unit> at <tmp> line 1
IOninja m: say MY::edsadsadsa
camelia Nil
18:37 khw left 18:39 sufrostico left, sufrosti1o left
tbrowder ugexe: are you here? i just reinstalled zef with --force and now all my installed modules are unknown! 18:42
IOninja oops :}
tbrowder argh!
El_Che may the force be with you... or not 18:43
ugexe reinstalling zef shouldn't affect that
when you say unknown does `zef list --installed` show it? or does `use Whatever;` load it? 18:44
tbrowder i've tried update and a reinstall but no modules found (i think there is a simple fix but don't remember it--need to keep zef notes and hints...)
perlpilot tbrowder: don't break it in the first place? ;)
tbrowder i was just following a suggestion for a zef issue... 18:45
ugexe i mean it seems like you're getting a different perl6 than you expect
(btw no need for --force install for zef anymore, since it has a version now)
tbrowder ugexe: list --installed doesn't show it, but I do see a long list of installed modules 18:46
tony-o tbrowder: did you rebuild your perl6 and then reinstall zef when this started happening? 18:48
tbrowder i had rebuilt rakudo a week or so ago, version now: This is Rakudo version 2017.02-29-gb9332ae built on MoarVM version 2017.02 18:49
18:49 lostinfog joined, lostinfog left
tbrowder i just reinstalled zef a few minutes ago 18:49
tony-o can p6 find your module if you do: perl6 -e 'use YourModule;' 18:50
tbrowder no. it's listed in the p6 modules but zef can't find it online or locally. 18:54
when i do "zef update: i get some ---- lines and one : "Content Storage|Distribution Count"...that's it 18:55
ugexe what content storage and what distribution count? 18:56
tbrowder nothing... 18:57
18:57 agentzh joined 18:59 cpage_ joined
ugexe hmmm I wonder if its from zef being versioned "*" in the recent past, and you had *that* previously installed. and then your previous force install was really just a normal install of the versioned zef, and the wrong stuff is being loaded 19:00
19:01 sufrostico joined, sufrosti1o joined
tbrowder last time i had a problem didn't you have me blow away one of the zef directories and start over somehow? 19:02
ugexe `zef nuke RootDir` (or `rm -rf ~/.zef`)
tbrowder shall i try it?
ugexe i would probably clone zef locally and run `perl6 -Ilib bin/zef uninstall zef` (which might uninstall multiple versions, including version *), then reinstall zef 19:03
yes you should try that first
tbrowder ok, will do...
lichtkind does anyone know what is the story behind the name of zef tool? 19:06
ugexe en.wikipedia.org/wiki/Zef 19:08
pukku Is there a reason that spurt throws an "X::AdHoc" exception, while "chdir" throws an "X::IO" exception? Shouldn't spurt also throw an IO exception? 19:09
lichtkind thanks
moritz pukku: yes. A patch to change that would be very appreciated 19:10
pukku OK, so it's not intentional. I'll see if I can figure out how to make a patch.
IOninja pukku: that'll be covered by the IO grant that's currently being run by The Perl Foundation
pukku: but if you spot any more weirdness like that, drop me a line. 19:11
pukku: grant info: news.perlfoundation.org/2017/01/gra...ation.html
pukku: all will be completed by 2016.04.15 release. 19:12
tbrowder ugexe: successful uninstall reinstall from repo, then zef update and no repo info, can't find my module, it does list others
IOninja (though some things will be avilable only under 6.d language)
19:13 khw joined
ugexe tbrowder: are you using rakudobrew? are you sure zef is being invoked with the proper perl6 bin? 19:13
tbrowder i am NOT using rakudobrew 19:14
i haven't for a long time, just compile rakudo from repo current nom branch periodically 19:15
IOninja ugexe: `zef nuke RootDir` <--- is that a literal RootDir in that command? Same effect as rm -fr ~/.zef?
pukku Another bug -- mkdir doesn't seem to throw an error, or return an failure, if it doesn't create a directory?
ugexe gist the output of `RAKUDO_MODULE_DEBUG=1 ZEF_PLUGIN_DEBUG=1 perl6 -Ilib bin/zef update`
IOninja: yes - also StoreDir and TempDir: github.com/ugexe/zef/blob/master/r...json#L3-L5 19:16
IOninja Thanks
pukku: thanks. There a couple of bug reports in that area, though I'm unsure we'd want it to fail if the directory already exists 19:19
19:19 andrzejku joined
pukku This is an error where it can't create the directory, because it doesn't have write permissions. 19:19
(I agree it shouldn't fail if the directory already exists.)
tbrowder ugexe: gist is here <gist.github.com/tbrowder/ddfe58f55...841d58> 19:20
IOninja pukku: right, that's a bug. There's a ticket for it: rt.perl.org/Ticket/Display.html?id...et-history
tbrowder got to run pick up granddaughter from school...back in a short while... 19:21
IOninja pukku: actually if it can't create directory it does seem to Fail 19:23
ugexe tbrowder: what command did you use to install with (the entire perl Configure.pl ...)? This looks like the dynamic requires are not working
IOninja pukku: thought the behaviour varies in routine form -_- 19:24
s: &mkdir
SourceBaby IOninja, Sauce is at github.com/rakudo/rakudo/blob/f929...rs.pm#L227
BenGoldberg I've got a silly question regarding exceptions -- is there an easy way to create one from errno?
IOninja pukku: in sub form it just returns a list of directories that it managed to create :/ 19:25
19:25 Cabanossi left
BenGoldberg I know it's of course possible, I can do NativeCall and cglobal(...errno...) and perror(...) is native and so on and so forth, but if there's aready an easy in-core way of doing it I'd really prefer that. 19:25
geekosaur BenGoldberg, downloads.haskell.org/~ghc/8.0.2/d...oToIOError 19:26
whoops
did oty check chganne :/
urrrgh
I am really not doing well right now :/
I suspect the answer is "not that easy" for p6 19:27
pukku Hm. OK, then the documentation needs to be updated. According to that, only the version which starts with a mode, and then a list of dirnames, returns the successfully created names: docs.perl6.org/routine/mkdir
BenGoldberg That's perfect, just the wrong language ;)
geekosaur especially since if you need to access the C errno, it's secretly a call that retrieves thread local state
IOninja BenGoldberg: based on skimming through src/core/Exception.pm, nope
pukku: right, documentation and tests are also part of the IO grant.
geekosaur but my guess is that what rakudo gets is usually via libuv
IOninja pukku: and you can probably see now why that grant is running in the first place :) 19:28
geekosaur actially I did worse than wrong channel, I also thought you were one of the folks in #ghc :p
geekosaur could stand being less dizzy now...
19:29 Cabanossi joined
pukku I think that it's more useful the way that it's documented -- or at least, it would be good if you're creating one directory only, if it behaved like the rest of the IO stuff. You were right that spurt doesn't actually return an error, but throws, so I was hoping I could use the same construct (try { CATCH {} }) for both... 19:29
BenGoldberg hands geekosaur some energems. Chocolate+caffeine=win!
pukku BTW: for those who helped me previously, here is my updated, and hopefully more idiomatic, version: gist.github.com/remorse/8db4a635e5...16a3b68964 (although the error checking for mkdir is wrong)
tbrowder ugexe: i'll get that Config info in a while...it's not available at current location...
BenGoldberg They probably won't help with dizzyness, though -- you need this thing called "sleep" for that, which you should try to get more familiar with. 19:30
IOninja pukku: you can use this as a workingaround for now: no need for CATCH (try spurt "blah", "blah") orelse carp "blah blah $!.message()"
pukku I did try the "orelse" -- that didn't seem to work.
IOninja really :(
pukku I can try again -- hang on... 19:31
IOninja pukku: works for me. What perl6 version you got?
ugexe tbrowder: try deleting ~/.zef before doing that command. I see in your gist that you are using a modified zef config still
IOninja pukku: ensure you got parens right: gist.github.com/zoffixznet/42a5970...a5143da53c 19:32
pukku "This is Rakudo version 2017.01 built on MoarVM version 2017.01"
ugexe the reason you used a modified config is no longer needed
pukku But I didn't know that I needed the "try" bit -- let me try that...
IOninja pukku: pro tip, you can save typing in short subs by using implied signatures: sub croak { note $^msg; exit 1 } 19:33
pukku: you wouldn't were it failing instead of throwing, but it does ATM, so you need the try
19:34 jdoege left
pukku Maybe my version is too old, but "(try spurt ...) orelse ..." doesn't work for me. 19:34
IOninja s: &infix:<orelse>
SourceBaby IOninja, Sauce is at github.com/rakudo/rakudo/blob/f929...rs.pm#L696
IOninja pukku: last change to it was 3 months ago... What do you mean by doesn't work? 19:35
ugexe tbrowder: thats actually certainly why its broke. If you `rm -rf ~/.zef` it should fix whatever got criss-crossed
IOninja c: 2017.01 (try spurt "/root/blah", "blah") orelse say "you ain't a root, bruh" 19:36
committable6 IOninja, ¦2017.01: «you ain't a root, bruh»
IOninja pukku: ^ works fine on 2017.01...
pukku Hm. The gist you had does work. However, in context I get "Use of Nil in string context in block at ./tumblr.pl6 line 175" 19:37
No, wait, I see what's going on.
$_ isn't being set to something that stringifies. 19:38
IOninja c: 2017.01 (try spurt "/root/blah", "blah") orelse say "you ain't a root, bruh: $!"
committable6 IOninja, ¦2017.01: «you ain't a root, bruh: spurt is disallowed in restricted setting»
IOninja pukku: ^ use $!
pukku Got it -- thanks! 19:39
IOninja m: &exit.wrap: { note $^msg; nextwith 1 }; exit "meows"; say "already quit" 19:41
camelia meows
IOninja Another way to do the croak thing... 19:42
tbrowder ugexe: okay, i removed ~/.zef and all looks well. thanks! 19:43
IOninja my &croak = {exit 1} ∘ *.note; croak "meow"
m: my &croak = {exit 1} ∘ *.note; croak "meow"
camelia meow
IOninja haha :D Even cooler way to do the croak thing :)
pukku Composition? 19:44
IOninja Yup
Can use o instead of ∘ too.
tbrowder ugexe: btw, my configuration rakudo config script is at gist <>
IOninja m: my &croak = *.&exit ∘ *.note; croak "meow"; say "hi"
camelia meow
IOninja
.oO( ...make ∘ thunk... }
19:45
19:45 risou_awy is now known as risou 19:46 domidumont left
tbrowder ugexe: gist <gist.github.com/tbrowder/8514e8abe...498419> 19:46
ugexe tbrowder: The reason it broke I thought I had preemptively fixed this for your custom config specifically but I guess I was wrong heh github.com/ugexe/zef/blob/master/l...ig.pm6#L13 19:47
tbrowder ah, when no one was looking! sounds like NSA! heh-heh! 19:48
ugexe: thanks for the help--zef sure is robust--very good to see! 19:49
in spite of the current state of the p6 ecosystem, i still think the ux is better than cpan...my 2 cents 19:50
IOninja pukku: untested, but probably works. Alternate version of your convert-img routine with some signature unpacking fun: gist.github.com/zoffixznet/2a7f4a4...03d7ef3b28 19:58
IOninja edits out the left over `$r` :) 19:59
pukku Whoa. OK, I'm going to try that, and probably include it (with credit) in my slides if that's ok, but I could never have come up with that. 20:00
IOninja Feel free to use with no credit.
20:03 cpage_ left
BenGoldberg <!-- fun with html comments: <img src="..."> --> And then there's: <img src="/relative/path/here.png">, and then <img src="malformed> 20:07
I really hope your html comes from somewhere nice, which doesn't have that sort of nonsense. 20:10
pukku If I could find a DOM manipulator which didn't change the order of attributes when re-stringifying it, I would use that hands down. 20:11
20:14 risou is now known as risou_awy, bjz joined 20:16 labster joined 20:17 sufrostico left 20:18 sufrosti1o left 20:24 sufrostico joined 20:25 Praise left
rindolf IOninja: ah, you are Zoffix! The token has fallen 20:29
20:32 itaipu joined 20:33 Guest78078 joined 20:36 BenGoldberg left 20:37 xzhao left 20:38 xzhao joined
IOninja rindolf: token? 20:38
What token... 20:39
20:39 andrzejku left
rindolf IOninja: it's an expression that means "now I get it" 20:39
IOninja Ah ok. 20:40
20:40 naxieAlDle joined
rindolf IOninja: en.wiktionary.org/wiki/the_penny_drops 20:41
gfldex if you would take all the idioms out of the english language there would be hardly anything left
pukku I have to leave, but thanks to everyone for all of their suggestions, comments, and help!
rindolf pukku: bye
IOninja Weird. You'd think dropping a penny would lose something not gain something. 20:42
20:42 pukku left
rindolf IOninja: it comes from public phones 20:42
IOninja: i think 20:43
IOninja lol
20:43 sufrostico left 20:44 sufrostico joined 20:47 st_elmo left
Geth Inline-Python: 7c3d51bfcb | (Stefan Seifert)++ | 3 files
Fix segfault when loading matplotlib

Somehow one of the matplotlib module's attributes does not have a name. We ended up calling PyObject_GetAttrString with a NULL name. Skip the nameless "attribute" instead.
Fixes GH #17
20:48
nine Oh how I hate Python...
20:49 lichtkind_ joined 20:53 lichtkind left 21:01 agentzh left, Guest78078 left
moritz "fun" stuff indeed 21:06
use matplotlib::pyplot:from<Python>; 21:07
matplotlib::pyplot.title('Test foo');
Could not find symbol '&pyplot'
this is a rakudo 2017.02; should I try on a bleeding edge rakudo? 21:08
sjn hm. weird error in a test in HTTP::UserAgent (t/030-cookies.t) 21:09
sergot: ^
error is "Lexical 'HTTP' already declared" 21:10
no line number or anything
moritz sounds like fallout from the lexical module loading changes
lichtkind_ you all++ 21:11
21:11 lichtkind_ is now known as lichtkind
RabidGravy ah, I hadn't got round to testing H::UA 21:11
lichtkind moritz: so you dont want test reader?
IOninja sjn, what's your perl6 version? 21:12
sjn IOninja: This is Rakudo version 2017.02-199-g1934a56 built on MoarVM version 2017.02-25-g5dd8f04 21:13
I can upgrade
IOninja m: say $*PERL.compiler.version
camelia v2017.02.224.g.68.a.40.f.7
IOninja sjn, yes, try upgrading a bunch of fixes went in this morning
RabidGravy sjn, just fixed it, give it five
Geth doc: f002dfef74 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Callable.pod6
more better grammar
doc: 44c6891d86 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Callable.pod6
doc perl6/roast/commit/270dcf82f2
nine moritz: I think I do not yet create wrappers for nested namespaces 21:14
sjn also, that error message was a little LTA :-)
gfldex IOninja: please note ^^^
nine moritz: the whole code for creating wrappers in Inline::Python is very young
21:14 sufrosti1o joined 21:15 st_elmo joined
RabidGravy sjn, it's too early for it to give much of a useful diagnostic 21:15
nine moritz: do you actually need Python's datetime or were you just playing around?
sjn no context? not even neighbouring AST nodes?
IOninja gfldex: a bit unclear :) also, it gets LHS's .of. I can update when I get home 21:16
moritz nine: I wanted to pass python's date objects to matplotlib for one of the axes
21:16 andrzejku joined
gfldex IOninja: please do I am in dire need to watch The Expanse _right_now_ 21:16
21:16 andrzejku left 21:17 jonas1 left
sjn RabidGravy: upgrading rakudo removed the problem 21:17
Geth Inline-Python: 8943dff9c6 | (Stefan Seifert)++ | pyhelper.c
Enable passing around Python's date objects

Note: it's not yet possible to actually call methods on those objects, as they are not ordinary Python objects but a completely different beast. The datetime "module" is part of the Python interpreter itself and written in C.
nine moritz: then this ^^^ may be enough to get you up and running 21:18
RabidGravy sjn, I removed the offending require anyway
sjn ook
sjn gets different errors now o(
\o/ 21:19
moritz nine: thanks! 21:20
sjn huh... "You cannot create an instance of this type (SSL)"
in HTTP::UserAgent line 356 21:21
RabidGravy let's have a look
sjn could be missing stuff in my install 21:22
yeah, sorry, it looks like I have a broken install of OpenSSL :-(
21:23 sufrosti1o left
mst fscking software 21:23
21:24 sufrostico left
RabidGravy there's a chance that some recent change broke that line though 21:24
moritz nine++ # works
now I get the fun of ValueError in Perl 6 code :-) 21:25
21:25 sufrostico joined, sufrostico left, sufrostico joined
sjn Oh, and another question (and apologies for my ignorance here); Why doesn't NativeCall load libraries like "libssl.so.1.0.0"? installing the -dev package only adds a symlink with the "libssl.so" name which points at that first one.. 21:26
sjn imagines it has to do something with the horrible fact that a version number is part of the filename, but isn't there a way to figure out that one without always having to install -dev packages in order to make NativeCall modules work? 21:28
RabidGravy sjn, it does
perlpilot sjn: you mean, why doesn't NativeCall automatically find those when you specify just "foo.so" ?
RabidGravy it wotks out the version
sjn I just read an error: "Cannot locate native library 'libssl.so': libssl.so: cannot open shared object file: No such file or directory" 21:29
from NativeCall
RabidGravy IO::Socket::SSL does something special
sjn ehrm. ok? 21:30
RabidGravy but nativecall itself is quite happy to load the version
tbrowder ugexe: another dumb question on the correct META6.json file hash for a release. the actual file hasn't changed for several commits, but it has the correct info for the actual release. So is the hash reference for that file what is needed even though is is at a previous commit?
perlpilot Doesn't LibraryMake have some handy logic for turning "foo.so" into the appropriate "foo.so.1.0.1" and applying that to "is native"? 21:31
tbrowder s/is is/is at/
ugexe tbrowder: how can it not change if you set the source-url?
RabidGravy perlpilot the "native" trait does that for you 21:32
Geth Inline-Python: e925a7def0 | (Stefan Seifert)++ | configure.pl6
Fall back to python2.7-config if python2-config is unavailable

Fix GH #15
perlpilot ah, neat. I don't think it did t hat last time I used it (been a while-ish)
IOninja sjn, did you upgrade to HEAD? 21:33
21:33 sufrostico left
geekosaur sjn, ythis is a fight I'm pretty much resigned to losing :/ you should basically never use an unversioned .so 21:33
RabidGravy perlpilot, typically one can do github.com/jonathanstowe/Audio-Enc...P3.pm#L493 21:34
geekosaur because you can't possibly know if it is compatible with what you are doing
tbrowder well, it changed when i set it, but i now know how the format of the releases are made on github, so it was set ahead of my actual release creation which was done at the CLI in my local repo and pusheg to github which then auto-magically created the proper release files.
sjn IOninja: of... rakudo? This is Rakudo version 2017.02-224-g68a40f7 built on MoarVM version 2017.02-31-g91aab71
geekosaur but everyone fully expects that they can say foo.so and get a guaranteed 100% compatible shared object
which to me says they have never programmed in C (this is why pkg-config exists!)
RabidGravy like I say IO::Socket::SSL does something special
it passes the full name, because it bundles the ssl library for windows or something 21:35
IOninja sjn, yup looks good. Which module is failing now? the can't have instance thing? it likely needs a change in how it does require
perlpilot geekosaur: All those symlinks from foo.so to foo.so.1.0.0 just encourages that belief too :)
geekosaur no, that's specifically telling you which of the multiple runtime versions matches the dev library 21:36
but, everyone wants to think simple and expect the right thing to magically happen
and yes, it would have to be magic
Geth Inline-Python: 66f16cc5aa | (Moritz Lenz)++ | t/date.t
Test returning of date objects
21:37
Inline-Python: ed16dae1ba | (Moritz Lenz)++ | t/date.t
Tests for date and datetime object passing
Inline-Python: 9431e1bbe8 | (Stefan Seifert)++ | t/date.t
Merge branch 'date-test' of git://github.com/moritz/Inline-Python
ugexe m: use NativeCall :TEST; say guess_library_name(( "foo", Version.new(1) ))
camelia libfoo.so.1
nine moritz++ # thanks for the tests!
geekosaur because NativeCall can't run your program against every runtime version installed and pick the one that works (how does it tell? some failure modes are wrong output instead of crash/error)
sjn IOninja: right now I have trouble with HTTP::UserAgent, who fails with 085-auth.t and 090-ua-ssl.t (different error messages)
21:37 wamba left
El_Che sjn: I found this syntax nice: sub ldap_err2string(int8) returns Str is native('ldap-2.4', v2) is export { * } 21:38
(lib, version)
(of course it's the same thing, but a lot nicer on the eyes)
jnthn Using an unversioned openssl (if that's the lib in question) is likely going to end in tears, 'cus afaik the API for 1.1 changed some from 1.0...
RabidGravy yes, thar it is how you are supposed to do it
ugexe github.com/sergot/openssl/commit/7...d2a09ce091 # this is how it handles 1.1 - 1.0 api 21:40
tbrowder ugexe: so the source link INSIDE the META6.jsonpoints to the correct release tree: "source" : "github.com/tbrowder/Linux-Proc-Tim...ee/v0.1.0" which i believe is what zef will use for installation source, no?
IOninja sjn, ok, this line is wrong; needs to be changed to if $! github.com/sergot/http-useragent/b...-ssl.t#L10
RabidGravy IOninja, works fine here 21:41
IOninja not sure about the other test
ugexe tbrowder: i mean you said your meta6.json hadn't changed in awhile, yet you have to update the source-url *somewhere* inside the meta6.json file to point to whatever your release is
sjn right.
IOninja RabidGravy: maybe not the source of sjn's error but that check will never detect a missing sock::ssl
sjn I just install IO::Socket::SSL, and that makes all tests pass
installed*
RabidGravy I've literally just built a new rakudo and that test works 21:42
sjn RabidGravy: could be that you already had IO::Socket::SSL installed
IOninja RabidGravy, copy-paste that line into the bot and see
(I would, but I'm on the phone)
sjn I didn't have it, so I triggered the error IOninja spotted
IOninja m: try require Bobkis; if ::('Bobkis') ~~ Failure { say "boo" } else { say "we have Bubkis apparently"; } 21:43
camelia we have Bubkis apparently
ugexe m: say ::("IO::Socket::SSL") ~~ Failure
camelia True
IOninja RabidGravy: ^
RabidGravy right
tbrowder www.irccloud.com/pastebin/EjMSRUCp/meta6.json 21:44
IOninja ugexe, missing the try require bit that installs a `package`
IOninja &
ugexe ah 21:45
m: try require ::("IO::Socket::SSL"); say ::("IO::Socket::SSL") ~~ Failure
camelia True
21:45 sufrostico joined
tbrowder ugexe: those are the correct links for the one and only release, even though the meta6.json was last committed before the actual release 21:45
ugexe m: try require "IO::Socket::SSL"; say ::("IO::Socket::SSL") ~~ Failure 21:46
camelia True
21:46 TEttinger joined
RabidGravy just fixing it 21:47
ugexe tbrowder: ok, so in the ecosystem you just need to include a link to a meta6.json file with the correct release url (which could be one of many commits)
tbrowder roger! thanks! 21:48
21:48 bjz left 21:51 espadrine joined
RabidGravy IOninja, sjn, ugexe just fixed that 21:51
may look harder tomorrow
sjn RabidGravy++ # fixing stuffs :)
21:52 sufrostico left
Geth ecosystem: 6a60b0e608 | (Tom Browder)++ | META.list
add new module Linux::Proc::Time
21:52
21:58 risou_awy is now known as risou 22:04 tramdas left, agentzh joined 22:06 bjz joined
sjn was trying to get Telegram::Bot working, but the examples there seem to be incomplete 22:06
[Coke] wonders if Zefram is in this channel. 22:08
22:10 mcmillhj left 22:12 Cabanossi left 22:13 Cabanossi joined 22:14 bjz left 22:17 risou is now known as risou_awy, sufrostico joined 22:18 RabidGravy left 22:25 mcmillhj joined 22:31 mcmillhj left 22:36 agentzh left 22:38 naxieAlDle is now known as yoleaux2`, yoleaux2` is now known as naxieAlDle 22:39 Voldenet left 22:41 obfusk_ left, obfusk joined 22:42 mcmillhj joined 22:44 Voldenet joined, Voldenet left, Voldenet joined 22:46 risou_awy is now known as risou, st_elmo left, mcmillhj left 22:54 yqt left 22:58 zakharyas joined, mcmillhj joined 23:00 agentzh joined 23:02 risou is now known as risou_awy 23:03 mcmillhj left 23:04 mcmillhj joined 23:06 sufrostico left 23:08 mcmillhj left
skids
.oO("meth_providers" Heheh.)
23:18
23:19 mcmillhj joined 23:20 dct joined 23:24 mcmillhj left 23:25 Praise- joined 23:31 Praise- is now known as Praise, sufrostico joined
IOninja [Coke]: considering his opinion of Perl 6 he expressed in his talk, I highly doubt it :) 23:31
I'm just glad he files all these tickets.
23:33 unicodable6 left 23:36 mcmillhj joined, sufrostico left 23:39 cdg left 23:40 mcmillhj left 23:42 mcmillhj joined, pmurias left 23:49 mcmillhj left 23:50 BenGoldberg joined 23:52 Exchizzzz joined 23:53 dct left
Exchizzzz Hi guys. I've stumbled across » a few times, usually after a hash/list. Do you know what it's called so I can read more about it ? Thanks in advance :> 23:53
For instance: $/.make: $<Rule>».made 23:54
23:54 bjz joined
TimToady it's called a "hyper metaoperator" 23:54
japhb deletes his response in progress after TimToady appears 23:55
Yeah, what he said.
:-)
Exchizzzz Awesome TimToady, thanks - found it :>
TimToady it distributions an operation over the list at the wide end
Exchizzzz aaaahá
TimToady *butes
23:56 espadrine left
TimToady so in this case, kinda like a .list.map( { .made } ) 23:56
Exchizzzz I see, thanks :> 23:57
have a nice day/night/whatever it is in your timezone :b
23:57 Exchizzzz left 23:58 ZzZombo_ left 23:59 risou_awy is now known as risou