»ö« 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:00 marcovorg left 00:04 Dee22 joined
tinita does anyone else have the problem of a slow vim when editing perl 6 with syntax highlighting? 00:05
00:05 mcmillhj joined
tinita I have vim 8.0.378 00:06
00:07 zoll joined, AndyDee left 00:10 mcmillhj left 00:11 mcmillhj joined 00:13 robertle left 00:16 mcmillhj left 00:27 mcmillhj joined
MasterDuke tinita: yeah, it gets slow with large files 00:28
tinita MasterDuke: hm, 109 lines... 00:30
00:31 wamba left
tinita i'll try with a fresh .vimrc and only :syn on 00:31
00:31 mcmillhj left
timotimo one of the best feelings: having your terminal suddenly write "warning: your hard drive is failing" written all over it 00:41
00:41 dj_goku joined, dj_goku left, dj_goku joined
timotimo thankfully it was only because i had unplugged an external usb hard drive while the computer was suspended 00:41
00:43 mcmillhj joined 00:46 dj_goku left
raydiak \o 00:47
00:48 mcmillhj left 00:53 finanalyst joined 01:02 bjz left 01:04 BenGoldberg joined 01:12 lookatme joined
lookatme morning .o/ 01:12
01:44 ilbot3 left 01:46 bjz joined 01:47 ilbot3 joined, ChanServ sets mode: +v ilbot3 01:52 pilne left
kshannon It is it possible to do the equivalent of $*W.find_lexical_container_type at runtime? e.g. 'my %a;' produces a variable that has an Associative constraint on binding, but the variable itself contains a Hash: %a.WHAT == Hash; but trying to do %p := 1 gives an error message referring to Associative. 02:00
How do I ask %p what it's binding constraint is? 02:01
Do I need to somehow get acces to the lexpad instead of the variable?
02:05 BenGoldberg left
kshannon Oops typo, I was meaing one variable not two, please read %a wehere I said %p... 02:16
m: my %a; say %a.WHAT; say %a.of; say %a.VAR.WHAT; say %a.VAR.of; %a := a => 1; say %a.WHAT; say %a.of; 02:19
camelia (Hash)
(Mu)
(Hash)
(Mu)
(Pair)
(Mu)
kshannon m: my %a is Hash; say %a.WHAT; say %a.of; say %a.VAR.WHAT; say %a.VAR.of; %a := a => 1; say %a.WHAT; say %a.of;
camelia (Hash)
(Mu)
(Hash)
(Mu)
Type check failed in binding; expected Hash but got Pair (:a(1))
in block <unit> at <tmp> line 1
kshannon m: my %a is Associative; say %a.WHAT; say %a.of; say %a.VAR.WHAT; say %a.VAR.of; %a := a => 1; say %a.WHAT; say %a.of; 02:20
camelia (Associative)
(Mu)
(Associative)
(Mu)
(Pair)
(Mu)
MasterDuke Associative and Positional are roles, so you would want "does" 02:21
kshannon The question is how do I ask %a what it "does"? 02:26
I want to know how to introspect the restrictions on binding. 02:27
02:29 dj_goku joined, dj_goku left, dj_goku joined
kshannon m: my %a does Associative; say %a.WHAT; say %a.of; say %a.VAR.WHAT; say %a.VAR.of; %a := a => 1; say %a.WHAT; say %a.of; 02:30
camelia (Hash+{Associative})
(Mu)
(Hash+{Associative})
(Mu)
(Pair)
(Mu)
kshannon That's different to a plain 'my %a;'
MasterDuke i think there's something like .^mro, but i'm not coming up with what it is
02:32 curt_ left
kshannon I think the problem seems to be that the binding constraint is not recorded on the container (Hash/BagHash/Pair), but on the lexical pad that the variable is in. 02:33
02:35 dj_goku left
raydiak Isn't it adequate to know that % always has to be Associative and @ always has to be Positional? Or is there some complication I'm missing? 02:35
kshannon It might be that the information has been thrown away by runtime and the only remnant is inlined in the call to the p6bindassert op that the bind is compiled to.
02:35 ramortegui joined
kshannon m: my %a is Positional; %a := %(); 02:36
camelia Type check failed in binding; expected Positional but got Hash (${})
in block <unit> at <tmp> line 1
kshannon If you've specified a container type on the declaration then that becomes the binding constraint. 02:37
MasterDuke i don't know the answer to your questions. might need to wait a couple hours until the Europeans (e.g., moritz, timotimo, lizmat) wake up 02:39
raydiak I see...
kshannon BTW this isn't a case of the XY problem ( meta.stackexchange.com/questions/6...xy-problem ) I'm not actually trying to solve an issue - I'm just trying to understand the details. 02:42
Because learning is fun :)
02:44 mcmillhj joined
lookatme m: my %h; say %h.of; 02:45
camelia (Mu)
lookatme m: my Int %h; say %h.of; 02:46
camelia (Int)
lookatme Do you mean this constraint type ?
kshannon No.
m: my %h; %h := 1
camelia Type check failed in binding; expected Associative but got Int (1)
in block <unit> at <tmp> line 1
kshannon I mean the Associative type 02:47
m: my %h is Scalar; %h := 1
camelia Cannot make a Scalar object using .new
in block <unit> at <tmp> line 1
kshannon Hmmm. I wasn't execpting that...
lookatme What the binding for ? %h is a hash container 02:48
02:48 mcmillhj left
kshannon Yes %h is a hash container, but the restricition on binding to the variable %h is that the value must be Associative. 02:49
You can change that restriction by including 'my %h is SomeType' and then the value must be ACCEPTed by SomeType 02:50
lookatme Oh, I see 02:52
m: my %h is Int; say %h.WHAT; 02:54
camelia (Int)
lookatme Oh, that is a black magic !
02:54 fatguy left
lookatme m: my %h is Int; say %h.^methods; 02:55
camelia (Int Num Rat FatRat abs Bridge chr sqrt base polymod expmod is-prime floor ceiling round lsb msb narrow Range atanh sign asech sin tan atan2 acosech truncate asinh conj acosh pred asec cosec acotan cosh acos acosec sech unpolar log exp roots cotan sinh t…
02:56 noganex joined
kshannon m: my %h is Int; %h := 4; say %h + 2 02:57
camelia 6
lookatme %h is total a Int now. But it's so easy to misunderstand. I don't recommend use it. 02:58
kshannon But it's an int without a Scalar wrapper. You can't assign to %h, only bind to it. 02:59
and yes Int is a silly constraint.
02:59 noganex_ left
lookatme m: my %h is Int; say %h = 4; 03:01
camelia Cannot modify an immutable Int (0)
in block <unit> at <tmp> line 1
raydiak m: my %a is Numeric; %a := π; say %a; 03:03
camelia 3.14159265358979
lookatme It's like a container binding 03:04
m: my \h := 0; h = 4;
camelia Cannot modify an immutable Int (0)
in block <unit> at <tmp> line 1
lookatme Em, they called it **Sigilless variables** 03:05
03:11 Cabanoss- joined 03:14 Cabanossi left, Cabanoss- is now known as Cabanossi 03:20 cpage_ left 03:24 araujo left 03:31 zoll left 03:49 ramortegui left 03:58 khw left 04:03 cpage_ joined 04:18 dj_goku joined, dj_goku left, dj_goku joined 04:23 dj_goku left, Exodist left 04:24 Exodist joined 04:27 bjz left
kshannon m: package Foo { our %hash is Hash; %hash := %(); } # LTA error message... 04:31
camelia ===SORRY!===
First child of a 'bind' op must be a QAST::Var, got QAST::Op
geekosaur yeh, rakudobug that 04:34
04:44 mcmillhj joined 04:49 mcmillhj left 04:54 aindilis left 05:00 mcmillhj joined 05:05 mcmillhj left 05:06 cyphase left 05:12 dct joined 05:16 cyphase joined 05:19 ChoHag joined 05:26 rindolf joined 05:27 dct left 05:30 cbd_ joined
cbd_ pastebin.com/0vzDC3zU 05:32
^^ that is my problem
has to do with types
05:34 skids left
cbd_ specifically I am trying to use function prototypes 05:34
05:35 andrzejk_ joined, espadrine joined
moritz \o 05:36
cbd_ and specify the types of those functions
hobbs Numeric has a .Int method, so its subclasses (like Rat, which 2.2 is) can coerce to Int by truncating 05:37
it doesn't, however, have a .PositiveInt method :)
moritz cbd_: looks like a bug to me 05:38
cbd_ So the solution to this issue is to add one?
moritz cbd_: the error message says "expected PositiveInt", but it should expect Positional[PositiveInt]
m: subset Positive of Int where * > 0; sub f(Positive @p) {}; my Positive @x = (1, 2); f(@x) 05:40
camelia Constraint type check failed in binding to parameter '@p'; expected Positive but got Array[Positive] (Array[Positive].new(1...)
in sub f at <tmp> line 1
in block <unit> at <tmp> line 1
moritz m: subset Positive of Int where * > 0; sub f(Positive @p) {}; my Positive @x = (1, 2); &f.signature.params[0].type
camelia ( no output )
moritz m: subset Positive of Int where * > 0; sub f(Positive @p) {}; my Positive @x = (1, 2); say &f.signature.params[0].type
camelia (Positional[Int])
05:43 aborazmeh joined, aborazmeh left, aborazmeh joined
cbd_ So is it a bug with perl6, or am I writing it wrong? 05:44
moritz a bug in rakudo 05:45
m: sub f(Int @p) {}; my Int @x = (1, 2); say &f.signature.params[0].type 05:46
camelia (Positional[Int])
moritz m: sub f(Int @p) {}; my Int @x = (1, 2); f(@x)
camelia ( no output )
cbd_ a bug in the error message? or should the code that I put in the pastebin execute without error?
moritz it should run without error 05:49
cbd_ nice. so I should send an email to [email@hidden.address] 05:50
moritz yes, please 05:51
cbd_ hey hey, this will mark my first bug report to an open source project 05:52
finally giving back
05:53 mcmillhj joined
moritz \o/ 05:54
cbd_++
05:58 mcmillhj left
cbd_ cool. submitted it about a minute ago. The bug isn't fixed yet... what do I do? 05:59
06:04 cbd_ left 06:06 dj_goku joined, dj_goku left, dj_goku joined
moritz leave out the type constraint 06:07
or make the type constraint (Int @p) 06:08
06:11 dj_goku left 06:13 movl left 06:14 movl joined, mcmillhj joined 06:16 TimToady left 06:18 TimToady joined, mcmillhj left 06:22 Dee22 left 06:28 aborazmeh left
lookatme or just no constraint (@p) 06:34
06:34 aborazmeh joined, aborazmeh left, aborazmeh joined 06:35 wamba joined
kshannon m: class FooHash is Hash {}; class BarHash is FooHash {}; my %h is FooHash; say %h.WHAT; %h := BarHash.new; say %h.WHAT; %h := Hash.new; say %h.WHAT 06:42
camelia (FooHash)
(BarHash)
Type check failed in binding; expected FooHash but got Hash (${})
in block <unit> at <tmp> line 1
06:42 zacts left
kshannon m: class FooHash is Hash {}; class BarHash is FooHash {}; my %h is FooHash; say %h.WHAT; %h := BarHash.new; say %h.WHAT; say %h.VAR.WHAT; 06:43
camelia (FooHash)
(BarHash)
(BarHash)
kshannon m: class FooHash is Hash {}; class BarHash is FooHash {}; my %h is FooHash; say %h.WHAT; %h := BarHash.new; say %h.WHAT; %h := FooHash.new; say %h.WHAT; 06:44
camelia (FooHash)
(BarHash)
(FooHash)
kshannon m: class FooHash is Hash {}; class BarHash is FooHash {}; our %h is FooHash; say %h.WHAT; %h := BarHash.new; say %h.WHAT; %h := FooHash.new; say %h.WHAT; 06:46
camelia ===SORRY!===
First child of a 'bind' op must be a QAST::Var, got QAST::Op
kshannon m: our %h is Hash 06:53
camelia ===SORRY!===
First child of a 'bind' op must be a QAST::Var, got QAST::Op
06:54 rindolf left 07:00 rindolf joined 07:01 mcmillhj joined 07:02 xiaomiao left
Geth doc/extra-twigils: 78fd66c66a | (JJ Merelo)++ | doc/Language/variables.pod6
Changes a bit examples and grammar

Mainly for #1340 but while I was at it, I have formalized a bit some more text. This example is more perl6-ish, using `reduce` which is exclusive of Perl6
07:02
doc: JJ++ created pull request #1342:
Changes a bit examples and grammar
07:03
07:05 mcmillhj left 07:06 fatguy joined
Geth doc: c297a2a529 | (Gabor Szabo)++ | doc/Language/5to6-perlfunc.pod6
index qr to make it easier to locate
07:08
07:10 xiaomiao joined 07:11 aborazmeh left 07:16 Actualeyes left 07:17 mcmillhj joined
Geth doc/extra-twigils: 1acc2a03fb | (JJ Merelo)++ | doc/Language/variables.pod6
Changed to -

  (probably you wanted to say commutative, not associative, but I see
your point @KrisShannon and thanks for the suggestion)
07:19
doc/extra-twigils: 342f4ccbb7 | (JJ Merelo)++ | 184 files
Merge branch 'extra-twigils' of github.com:perl6/doc into extra-twigils
07:21 mcmillhj left 07:38 domidumont joined 07:41 travis-ci joined, brrt joined
travis-ci Doc build passed. JJ Merelo 'Changes a bit examples and grammar 07:41
travis-ci.org/perl6/doc/builds/236616738 github.com/perl6/doc/commit/78fd66c66aae
07:41 travis-ci left 07:43 domidumont left, domidumont joined 07:46 domidumont left 07:49 wamba left, mcmillhj joined 07:50 wamba joined 07:51 travis-ci joined
travis-ci Doc build passed. Juan Julián Merelo Guervós 'Merge branch 'master' into extra-twigils' 07:51
travis-ci.org/perl6/doc/builds/236617677 github.com/perl6/doc/compare/78fd6...eee059134d
07:51 travis-ci left 07:53 mcmillhj left 07:54 dj_goku joined 07:59 dj_goku left 08:01 brrt left 08:04 mcmillhj joined 08:05 brrt joined 08:10 curan joined 08:12 AndyDee joined, travis-ci joined
travis-ci Doc build passed. JJ Merelo 'Merge branch 'extra-twigils' of github.com:perl6/doc into extra-twigils' 08:12
travis-ci.org/perl6/doc/builds/236618966 github.com/perl6/doc/compare/98eee...2f4ccbb7be
08:12 travis-ci left 08:13 mcmillhj left 08:15 bioduds left 08:22 travis-ci joined
travis-ci Doc build errored. Gabor Szabo 'index qr to make it easier to locate' 08:22
travis-ci.org/perl6/doc/builds/236617704 github.com/perl6/doc/compare/68be3...97a2a52932
08:22 travis-ci left 08:25 stmuk joined 08:27 stmuk_ left 08:31 parv joined, parv left 08:34 zoll joined 08:38 zoll left 08:40 parv joined 08:46 nadim joined 08:49 brrt left, cyphase left, parv left, parv joined
nadim Good morning p6, is there a way to pass a junction as an object to a function rather than having it auto thread? 08:56
08:57 Actualeyes joined 09:14 fatguy left
lookatme yeah 09:14
nadim then how please 09:15
lookatme m: sub f(|c) { say c[0].WHAT; }(1|2|3)
camelia (Junction)
lookatme use a Capture
nadim OK
09:15 curan left
nadim is there a way to mark the junction object so P6 will not autothread? 09:17
the object, which can be a junction, is passed around and I'd prefer not change all the function calls to take captures
09:18 AlexDaniel left 09:19 CacoS joined 09:23 bjz joined
lookatme What are you trying to do ? 09:23
nadim I am adding support for junctions in Data::Dump::Tree. it can be passed any object or structure. 09:24
I'd change all the data passing to captures if necessary but I am curious to know if there is a class of non threading junctions. 09:25
09:26 CacoS left 09:28 bjz left
lookatme Do you mean a multi method with Junction parameter ? 09:28
09:29 CacoS joined, TEttinger left, CacoS left 09:30 bjz joined, CacoS joined, CacoS left
nadim sub, method, and multi method. I did not plan for junctions, I handle any object in a generic way. except that junctions don't get passed as an object but thread 09:31
09:31 cygx joined
lookatme m: sub (\c) { say c.WHAT;}(1|2) 09:31
camelia (Int)
(Int)
09:31 CacoS joined, CacoS left
lookatme I don't know :) 09:31
nadim :) 09:32
cygx nadim: no need to make them captures, but you do need a type constrain of Mu (which is the parent of both Junction and Any)
nadim that I can do easy, at least try :)
09:32 CacoS joined
lookatme Haha, I misunderstand you, probably .. 09:33
nadim lookatme: not always easy to guess what other think ;)
lookatme maybe, sometime code is easy understand than words 09:34
off work now . bye
09:34 lookatme left 09:37 circ-user-7AMq7 joined
circ-user-7AMq7 p6: say ('string' ~~ /tri/); 09:38
camelia 「tri」
circ-user-7AMq7 p6: say ('string ~~ /[k-x]/);
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in single quotes; couldn't find final "'"
at <tmp>:1
------> 3say ('string ~~ /[k-x]/);7⏏5<EOL>
expecting any of:
single quotes
term
circ-user-7AMq7 p6: say ('string' ~~ /[k-x]/);
camelia 5===SORRY!5===
Unrecognized regex metacharacter - (must be quoted to match literally)
at <tmp>:1
------> 3say ('string' ~~ /[k7⏏5-x]/);
Unable to parse expression in metachar:sym<[ ]>; couldn't find final ']'
at <tmp>:1
------> 3s…
09:42 dj_goku joined
cygx m: say 'string' ~~ /<[k..x]>/; 09:42
camelia 「s」
nadim cygx: Mu did the trick, thanks. I .gist the junction but I want to dig inside it, docs says junctions are not the best place for introspection, this will be fun. 09:48
09:48 dj_goku left
nadim and just 1% of the tests fail, so far so good 09:49
09:51 robertle joined, cyphase joined
cygx nadim: there's a stackoverflow question about unpacking junctions, cf stackoverflow.com/questions/43568394 09:52
09:54 xinming left, xinming joined
cygx bye o/ 09:56
09:56 cygx left
nadim great! 09:57
09:58 marcovorg joined 10:02 azawawi joined
azawawi Good afternoon 10:02
a.uguu.se/6JfFWsLdh32F.png # Graphics::PLplot example progress
working on both raw (native) and cooked api :) 10:03
nadim صباح النور 10:04
nice lib
10:05 labster left
nadim azawawi: wx widget from P6? 10:05
azawawi nadim: thx 10:14
nadim: yes, through wxwidget PLplot output driver
nadim: if you need png, you would use 'png' driver and set the filename
working on translating plplot.sourceforge.net/examples.php?demo=00 to Perl and improving usability of API as i go along 10:15
nadim is the wx lib called directly from p6? I can't see a wx p6 module in the modules list
azawawi nope from the PLplot library 10:16
packages.debian.org/jessie/plplot1...-wxwidgets to be exact 10:17
andrzejk_ hello
:)
azawawi andrzejk_: hi
10:17 espadrine left
andrzejk_ perl6 is awesome 10:18
:)
10:19 parv left 10:29 bjz left, domidumont joined 10:37 brrt joined 10:38 fatguy joined 10:41 Actualeyes left
circ-user-7AMq7 cegx: thanks for the correction! :) 10:45
cygx: thanks for the correction! :)
10:53 domidumont left 11:01 zacts joined 11:07 bjz joined 11:14 mr-foobar joined 11:30 dj_goku joined 11:35 dj_goku left 11:37 espadrine joined
Geth ecosystem: 1997e8d87b | (Zoffix Znet)++ (committed using GitHub Web editor) | META.list
De-publish all of my Bailador-related modules

I have no interest in maintaining these modules as Bailador project eventually did not meet my web dev needs
11:37
11:44 brrt left 11:47 AlexDani` joined, AlexDani` is now known as AlexDaniel
azawawi a.uguu.se/BfXq1tfO5nYJ.gif # PLplot Example 18 ... Perl 6 3D Plotting is here :) 12:06
The above is an animated GIF (will take a bit time to load from slow file sharing website) 12:07
12:08 wamba left 12:13 kaare__ left
timotimo azawawi: do you want an accounton hack.p6c.org so you can put stuff up on hack.p6c.org/~azawawi/stuff.gif ? 12:20
12:23 setty1 joined
azawawi timotimo: images that is? 12:26
timotimo: sure 12:27
timotimo: i had an account on feather
timotimo gimme the user name you'd like to have and an ssh pubkey 12:32
12:32 riatre joined 12:33 xiaomiao left 12:39 bjz left 12:40 xiaomiao joined
azawawi timotimo: I will do it later. Blood sugar going lower with 1st day Ramadan fasting :) 12:40
timotimo: need to finish example at hand
timotimo understood. i'll not be at the keyboard terribly much the rest of the day 12:41
or at least not reliably
azawawi have fun
timotimo ty 12:42
12:43 bjz joined
azawawi Is there an easy way for a number to be a Num instead of a Rat (other that .Num or e0 suffix"? 12:44
jnthn The e0 suffix *is* the easy away :)
azawawi If a nativecall function uses num64 (which is common) then we have to cast to .Num everytime
timotimo in my sdl module i have one version where all parameters are num64, and another where all are Num 12:45
i mean, multi candidates
jnthn azawawi: Sure, but typically one writes Perl 6 wrapper functions rather than exposing the raw native calls, so in the wrappers you can just do Num() in the signature to get the coercion to happen.
azawawi I see. thanks 12:46
AlexDaniel m: sub foo(Num() $x) { say WHAT $x }; foo 2
camelia (Num)
circ-user-7AMq7 m: sub foo(Num() $x) { say WHAT $x }; for(^700){foo 2} 12:49
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
for used at line 1. Did you mean 'foo'?
circ-user-7AMq7 m: sub foo(Num() $x) { say WHAT $x }; foo 2
camelia (Num)
AlexDaniel circ-user-7AMq7: you need a space after for
azawawi jnthn: in Graphics::PLplot im aiming on providing Raw (native) and cooked with sugar API :) 12:50
AlexDaniel circ-user-7AMq7: otherwise it is interpreted as a subroutine “for”
circ-user-7AMq7 thank you :)
AlexDaniel m: sub foo(Num() $x) { say WHAT $x }; for (^700){foo 2}
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing block (whitespace needed before curlies taken as a hash subscript?)
at <tmp>:1
------> 3) $x) { say WHAT $x }; for (^700){foo 2}7⏏5<EOL>
expecting any of:
block or pointy …
AlexDaniel m: sub foo(Num() $x) { say WHAT $x }; for (^700) {foo 2}
camelia (Num)
(Num)
(Num)
(Num)
(Num)
(Num)
(Num)
(Num)
(Num)
(Num)
(Num)
(Num)
(Num)
(Num)
(Num)
(Num)
(Num)
(Num)
(Num)
(Num)
(Num)
(Num)
(Num)
(Num)
(Num)
(Num)
(Num)
(Num)
(Num)
(Num)
(Num)
(Num)…
12:50 brrt joined 12:51 circ-user-7AMq7 left 12:52 brrt left
AlexDaniel should've said that you don't need parens, but I guess it's too late now :) 12:54
12:55 bjz left 12:57 bjz joined 13:11 bjz left 13:19 dj_goku joined, dj_goku left, dj_goku joined, xiaomiao left 13:22 pilne joined, raiph joined 13:23 fatguy left 13:24 dj_goku left 13:26 xiaomiao joined 13:42 Actualeyes joined 13:46 bjz joined 13:49 bjz_ joined, dogbert17 joined 13:50 bjz left 13:54 kaare__ joined 13:56 fatguy joined 14:10 CacoS left 14:16 araraloren joined
araraloren evening . 14:17
AlexDaniel \o/ 14:20
araraloren \o/ |o/ /o/ |o/ \o/ \o\ 14:21
14:22 bjz joined 14:24 bjz_ left, skids joined 14:33 khw joined 14:37 wamba joined 14:39 kaare__ left 14:50 kaare__ joined 15:03 bisectable6 left 15:07 dj_goku joined 15:10 andrzejk_ left 15:12 dj_goku left 15:14 bjz left 15:22 domidumont joined 15:24 committable6 left 15:25 committable6 joined, ChanServ sets mode: +v committable6, bisectable6 joined, ChanServ sets mode: +v bisectable6
AlexDaniel ∿o∿ 15:34
15:35 sftf joined
sftf Hi! Is there Damian Conway's "400 Years of Perl 6" 2017 video? 15:40
15:45 skids left 15:54 aborazmeh joined, aborazmeh left, aborazmeh joined 16:11 xiaomiao left 16:17 xiaomiao joined 16:26 yqt joined 16:31 azawawi left, zakharyas joined 16:38 aborazmeh left 16:41 finanalyst left 16:45 brrt joined 16:55 dj_goku joined, dj_goku left, dj_goku joined 16:58 cdg joined 17:00 dj_goku left, cdg left 17:01 cdg joined 17:02 Praise left 17:07 brrt left 17:09 brrt joined 17:10 CacoS joined 17:13 Cabanossi left, CacoS left 17:15 Cabanossi joined 17:17 Praise joined 17:19 camelia_ joined, camelia_ left 17:20 perlista joined 17:24 brrt left 17:25 brrt joined 17:33 brrt left 17:34 cognominal left 17:50 Actualeyes left 17:52 cdg_ joined 17:54 cdg left 18:06 pmurias joined 18:10 brrt joined 18:12 sftf left, zakharyas left 18:13 andrzejk_ joined 18:14 Cabanossi left 18:15 Cabanossi joined 18:19 CacoS joined, kaare__ left 18:20 kaare__ joined 18:29 cdg_ left, cdg joined 18:36 raiph left 18:42 Cabanossi left 18:43 dj_goku joined 18:45 Cabanossi joined
perlista Geth: hi 18:47
perlista: test
perlista: test2 18:48
18:49 dj_goku left, fatoban joined
fatoban perlista: hi 18:49
perlista fatoban: who are you?
18:49 fatoban left 18:50 perlista left 18:51 gdonald joined 18:53 cdg_ joined, curt_ joined 18:54 zakharyas joined 18:55 cdg left 19:01 brrt left 19:06 cdg joined 19:09 cdg_ left 19:10 dct joined, domidumont left, cdg left 19:15 brrt joined, pecastro left 19:26 TEttinger joined 19:27 pecastro joined 19:38 brrt left 19:43 Cabanossi left 19:45 Cabanossi joined 19:46 cdg joined 19:48 cdg left, cdg joined 19:56 dct left 20:00 dct joined 20:14 Cabanossi left 20:15 Cabanossi joined 20:22 devmikey joined 20:28 CacoS left 20:32 dj_goku joined, dj_goku left, dj_goku joined 20:36 dj_goku left 20:44 labster joined 20:47 cdg left, cdg joined 20:50 devmikey left 20:56 dct left 21:01 cognominal joined 21:02 espadrine left 21:05 zacts left 21:11 andrzejk_ left 21:12 pmurias left 21:13 marcovorg is now known as margeas 21:17 Skarsnik joined 21:19 dct joined 21:20 cognominal left 21:21 cdg_ joined 21:22 cdg left 21:23 setty1 left 21:24 cognominal joined 21:34 zacts joined 21:41 bjz joined 21:50 yqt left, dct left 21:56 TEttinger left, TEttinger joined 21:57 zakharyas left 22:09 bjz left
nadim any nice way to write this more compactly? if $p.key ~~ Str | Int && $p.value ~~ Str | Int. this is not the same: if $p.key & $p.value ~~ Str | Int 22:17
22:18 rindolf left
mst maybe an 'all' junction? 22:18
lizmat perhaps use Cool instead of Str|Int ?
mst if all($p.key, $p.value) ~~ Str|Int ?
lizmat it is less strict, but most likely does what you meabn 22:19
nadim I did try it earlier but I had other problems I'll try again
mst: I'll try all but & is all, maybe it is necessary left hand side 22:20
22:20 dj_goku joined, dj_goku left, dj_goku joined 22:21 cdg joined 22:23 zacts left
mst ah, then either it's a precedence issue or my idea is wrong, I guess 22:24
nadim lizmat: Cool did not work. as I said, I tried it earlier but I didn't know why it didn't work so I replaced it with Int | Str.
mst: all did not work, I don't know if it is possible to put junctions on both side of ~~
22:25 cdg_ left, dj_goku left
lizmat m: say "a" ~~ Int | Str # why did this collapse ? 22:26
camelia True
AlexDaniel what a wonderful question 22:27
maybe that's how it is supposed to be, but this is contrary to all of my expectations :)
22:28 itaylor57 left
jnthn 'cus that's what Junction.ACCEPTS does 22:28
22:28 zacts joined 22:29 cdg left
jnthn This in turn means it can short-circuit 22:29
(all can return as soon as there's a non-match, any as soon as there's a match, etc.)
AlexDaniel sure, but why ~~ does and == doesn't? What's the idea? 22:30
22:31 itaylor57 joined, itaylor57 left
jnthn == is compiled into an infix:<==> call and subject to auto-threading; ~~ is macro-ish and does the magic stuff involving $_ and then calls rhs.ACCEPTS(lhs) 22:32
nadim jnthn: can junctions be on both sides of ~~? and if yes, why doesn't $x & $y ~~ Int | Str work?
lizmat jnthn++ # remembers now :-)
22:33 itaylor57 joined
jnthn nadim: Yeah, but it means any(Int, Str).ACCEPTS($x & $y) which expands to any($x & $y ~~ Int, $x & $y ~~ Str) 22:34
nadim ah! 22:35
and how does ont get it expanded to $x ~~ Int | Str && $y ~~ Int | Str ? 22:36
if at all possible
mst ... would Int | Str ~~ $x & $y do so? 22:37
AlexDaniel m: my $x = 25; my $y = 2.5; say ($x, $y)».&(* ~~ Int | Str).all 22:38
camelia all(True, False)
AlexDaniel nadim: ha! look at these noodles of brainfart!
mst ... the goggles, they do nothing.
timotimo m: my $x = "hello"; my $y = 19; say all($x, $y).isa(Int|Str) 22:39
camelia True
jnthn mst: Don't think so; smartmatch is not symmetric
nadim looks like melted P6
mst jnthn: yes, using the asymmetricity was my thought
jnthn nadim: Something like timotimo++ just showed is more sensible :)
nadim timotimo++
mst m: my $x = "hello"; my $y = 19; say Int | Str ~~ $x & $y
camelia False
timotimo not actually certain it's correct
it could be the .isa on the junction of all() is checking against the junction on the rhs 22:40
mst surely that should be all($x, $y).ACCEPTS(Int | Str) ?
22:40 gregf_ left
timotimo and saying "yup, this junction isa junction" 22:40
jnthn mst: It'd end up doing Int ~~ $x, though, rather than $x ~~ Int
mst oh right I see
timotimo m: say ("foo" & 10e1).isa(Int | Str)
camelia True
jnthn And it's the type being on the RHS that decides the semantics of the match are a type check
AlexDaniel nadim: by the way, if this code is going to be in a warm path, avoid junctions altogether and come up with something else :)
timotimo look, it's actually wrong
22:40 aborazmeh joined
timotimo well, not wrong, just not what you expect 22:40
22:41 aborazmeh left, aborazmeh joined
mst I keep suffering from my brain parsing & as bitwise even though it parses | fine 22:41
timotimo :)
nadim AlexDaniel: warm path?
jnthn m: subset IntOrStr where Int | Str; say "foo" & 42 ~~ IntOrStr
camelia True
jnthn m: subset IntOrStr where Int | Str; say "foo" & 4.2 ~~ IntOrStr
camelia False
nadim timotimo: no it did not work as expected/wished for 22:42
AlexDaniel nadim: well, anything that will be executed often
nadim: because junctions were noticeably slow last time I checked
timotimo nadim: that's exactly what i said, though?
AlexDaniel not sure if they got faster while I was blinking :)
nadim it's a dumper, I don't know what the user dumps, so anything can be warm i guess
jnthn nadim: Doing a subset type like I did above is probably a good bet 22:43
22:43 Cabanossi left
nadim timotimo: had not got that far, when trying after the example 22:43
AlexDaniel mst: sometimes I see concatenation in it 22:44
22:45 Cabanossi joined
nadim jnthn: it's good to see it but maybe keeping it simple was a better idea to start with. junction ~~junction _looked_ simple but is obviously not 22:45
thanks all for the fun moment, and getting to understand junctions better, final code looking like "f $p.key ~~ Str | Int && $p.value ~~ Str | Int" is not so bad afterall. jnthn's subset is cool too. 22:47
timotimo ah, okay 22:49
yeah, irc can move pretty fast sometimes
nadim specially when one goes on testing ;)
timotimo that's why i tend to test stuff directly in irc, so others can immediately see where i'm at, where i'm going, and can point out problems to me 22:51
nadim good logic 22:52
timotimo i don't think i can stay awake too much longer ... 22:53
jnthn Me either :)
'night, #perl6
timotimo nite jnthn 22:54
22:54 bisectable6 left
nadim night all. here is the result. with dd dump at the bottom imgur.com/reqEMiu 22:54
22:54 committable6 left, evalable6 left
nadim yes it's a Pair from outter space ;) 22:54
22:55 mrsolo left, benchable6 left, bloatable6 left, quotable6 left, greppable6 left, integral_ left, statisfiable6 left, unicodable6 left 22:56 CIAvash[m] left, u-ou left
timotimo quite readable 22:56
Geth doc: 9f2e762ed1 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/IO/Handle.pod6
Fix typo
nadim where pair of Int | Str are displayed on one line and expanded if not
22:56 mrsolo joined 22:57 integral joined, integral left, integral joined
nadim timotimo: which one? even dd is readable in this case but with more depth in the data structures horizontal display is not redeable 22:57
timotimo yup 22:58
i meant the ddt output
nadim it is it's only goal, making things redeable, The Match handling, specially with colors, is, imho, 10 times more redeable with ddt 22:59
23:00 benchable6 joined, quotable6 joined, bloatable6 joined, ChanServ sets mode: +v benchable6, ChanServ sets mode: +v quotable6, ChanServ sets mode: +v bloatable6, evalable6 joined, committable6 joined, ChanServ sets mode: +v evalable6, ChanServ sets mode: +v committable6
timotimo you've already got a version that outputs an interactive html document; how well would you expect an interactive terminal-ui based one to work? 23:00
23:01 bisectable6 joined, ChanServ sets mode: +v bisectable6
nadim timotimo: better imo 23:01
the html output does not support color for example
timotimo well, that's doable at least ;) 23:02
nadim yes it is
timotimo i should finish up my stacked bar graph thingie
imgur.com/tnhR6Zp - it looks a bit like this 23:03
nadim feel free to add a ticket on the repo with the terminal UI idea, and how you'd like it to be. note that the advantage of dhtml is that you can have loads of pages open in a browser and compare them, also possible in a terminal but less fun
also, what would be really cool is to have a diff, which is supported, with forlding 23:04
stacked and text mode, I like! 23:05
timotimo it has to learn to output multi-lined bars, too, as sometimes there's two splits in the same character 23:06
23:06 CIAvash[m] joined
nadim for 2D tables? 23:06
timotimo no, just to get around that limitation 23:08
23:08 u-ou joined
timotimo this uses the eights blocks unicode has to offer 23:08
and setting foreground and background colors
nadim terminal graphics is so geeky! 23:09
timotimo have you seen sixel? :)
in particular libsixel 23:10
23:10 Skarsnik left
nadim nope ... browsing 23:10
timotimo i've pointed like ten people at libsixel already in the last week or three :) 23:11
nadim there quite a few that does graphics on a terminal but it is the first time I see gif animations, Lol! 23:12
timotimo yeah! :D
nadim moritz: imgur.com/026cpjU JSON::Tiny parse tree rendered by ddt
timotimo not only that, even Battle for Wesnoth in the terminal, and also some kind of graphical VM frontend running a windows in it %) 23:13
nadim Crazy!
maybe we can render the dhtml on the terminal afterall! 23:14
geekosaur remembers a site that was streaming world cup 2006 games over telnet via aalib
timotimo hah
there was also the april 1st thing where youtube offered TEXTp along 720p, 360p and 240p 23:15
nadim must resist. resist man! don't start playing with, be strong, resists! 23:17
timotimo i've a little bit of a start for a libsixel binding
but i figured out i needed a bunch of changes to go on and then i stopped working on it
nadim Do it! 23:18
notice how I say that I must resist but you should not ;)
timotimo hah
github.com/timo/libsixel-p6 23:20
nadim sixel is a killer, I'll have a look in the morning. but we can do quite a lot with text and colors. here is an example of a match, maybe not needed, .gist probably does a job good enough for most to read but with some efforts ... imgur.com/cHsvdzx
timotimo what kind of image support are you imagining? 23:21
nadim I don't get you question, can you please explain?
timotimo oh, note also that only a few somewhat niche terminal emulators will actually display sixel
nadim I read that DEc something 23:22
timotimo well, what would you do with sixel?
geekosaur yes, sixel graphics was a dec vt2xx+ thing
nadim sixel/curses
a curses that looks good (for nothing but still)
I was going to say, port asciio to it but it would be better to port it to curses (after I make some qooxdoo thingy) 23:23
23:24 azawawi joined
timotimo i haven't heard of asciio yet 23:24
zostay m: my %x := ().Bag; %x<a>
camelia This type (Scalar) does not support associative operations
in block <unit> at <tmp> line 1
nadim hu! gtk app that let's you draw ascii flowcharts and whatnot
azawawi hi
maybe github.com/azawawi/perl6-terminal-...r/examples to ASCii Art ? :)
zostay that's causing a regression in Hash::MultiValue, but it doesn't feel like a regression in my code but possibly in rakudo? 23:25
MasterDuke bisect: my %x := ().Bag; %x<a>
bisectable6 MasterDuke, Bisecting by exit code (old=2015.12 new=0c5fe56). Old exit code: 0
MasterDuke, bisect log: gist.github.com/d43a9bf6d1445203fa...fc790abbaf
MasterDuke, (2017-05-22) github.com/rakudo/rakudo/commit/b4...e96a530437
nadim timotimo: youtu.be/0l9W84PhOyI?t=170 23:26
timotimo that's cool 23:27
nadim bows down
timotimo oh, you built this?
nadim and very useful, just need to have manager that are not sissies and want powerpoint quality
yes a few years ago, I think I may do next version in P6, if I get time 23:28
23:28 troys joined
azawawi nadim++ 23:28
MasterDuke zostay: could you file a ticket and .tell lizmat? 23:29
23:29 greppable6 joined, ChanServ sets mode: +v greppable6, unicodable6 joined, ChanServ sets mode: +v unicodable6
nadim there's a presentation mode, I don't even remember how to use it ;), I made a presentation for to management with it once; just to piss some off :))) 23:29
23:29 statisfiable6 joined, ChanServ sets mode: +v statisfiable6
azawawi nadim: Please take a look at rosettacode.org/wiki/Draw_a_rotating_cube#Perl_6 # Shameless advertising :) 23:30
23:31 aborazmeh left 23:32 margeas left
nadim azawawi: I guess you know this one www.youtube.com/watch?v=M2F-KTrT_0E 23:33
azawawi nadim: cool 23:36
nadim night all 23:38
23:38 travis-ci joined
travis-ci Doc build passed. Zoffix Znet 'Fix typo' 23:38
travis-ci.org/perl6/doc/builds/236773819 github.com/perl6/doc/compare/c297a...2e762ed1d1
23:38 travis-ci left
azawawi timotimo: Python still beats us in simplicity rosettacode.org/wiki/Draw_a_rotating_cube#Python ... Damn you Python :) 23:40
nadim .tell timotimo github.com/stefanhaustein/TerminalImageViewer 23:42
azawawi nadim: good night
nadim arff what's the name of the teller service?
azawawi: night
23:42 Cabanossi left
MasterDuke nadim: yoleaux, but it seems to be down 23:45
nadim thanks
23:45 Cabanossi joined
timotimo not bad 23:46
nadim: hq9+ also beats us handily at hello world, quine, 99 bottles of beer, and incrementing a pointer 23:47
nadim that would be azawawi
timotimo oops, yes
23:51 wamba left 23:53 aborazmeh joined, aborazmeh left, aborazmeh joined
azawawi :) 23:56
i like vpython's approach. We need that with SDL :)
23:59 zacts left