»ö« 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:01 leego left 00:02 n1lp7r left, prammer left 00:07 leego joined
MasterDuke timotimo: i don't know how to read the actual output, but the output of perl6 --target=ast -e 'my $a = "A"; say "y" if $a eq "a" | "A";' is exactly the same as the output of perl6 --target=ast --optimize=0 -e 'my $a = "A"; say "y" if $a eq "a" | "A";' 00:08
unmatched} I'd write it as $letter.lc eq 'a'
(or ensure $letter has .lc from the get go) 00:09
MasterDuke for that example sure, but if you wanted different actual letters, e.g., "a" | "A" | "b" | "B" 00:10
which could then be $letter.lc eq 'a' | 'b', but you still neither either the junction or the or 00:11
*need either
00:11 adhoc_ joined 00:12 rkazak joined
unmatched} For DNA bases, it'd be ATCG 00:12
00:12 adhoc_ left
unmatched} As for the optimizer, even though it outputs stuff the same for the Junction, a more efficient way would be an eq whatever or eq whatever, but the optimizer doesn't do that ATM, which is what I believe timotimo was talking about 00:13
Not sure how that's to go about when Junctions will autothread ¯\_(ツ)_/¯
timotimo we are *not* going to spawn out threads for comparing a string against two different things 00:16
that's just pure overhead
unmatched} Yeah, I'd hope so 00:17
00:17 harovali left
El_Che 7 00:20
00:21 cyphase left 00:22 itaipu joined 00:23 awwaiid left, stux|RC-only joined, awwaiid joined 00:24 BenGoldberg joined 00:26 cyphase joined 00:31 pierre_ joined 00:33 rkazak left
skids well, unless they are all huge strings in which the first 1MB or so are the same :-) 00:33
timotimo OK, except in that case 00:34
but if they have ever been used in a hash, we do have the hash code ...
probably won't have it
skids If we had an opportunistic hashing thing going on in the background we might. Also if you are going to strcmp anyway it doesn't cost that much more to throw some instructions in to partially hash while pulling in cache lines. But that's all fantasy for now. 00:37
00:39 prammer joined
skids but then we get into dos-resistant versus rolling hashes and when to use which. 00:39
00:40 AlexDaniel left, Ben_Goldberg joined, mvorg left 00:41 BenGoldberg left, Ben_Goldberg is now known as BenGoldberg
timotimo oh, i had meant to inspect the hash function we use for collisions in strings that are ascii representations of decimal numbers 00:42
00:43 prammer left 00:46 prammer joined
MasterDuke would anybody mind if i add my (hopefully not too controversial two cents) to the Perl 6 errors are awesome or not discussion? or is that topic touchy? 00:48
skids You know actually "if you have N-strings for N>some_value and you compare them often, put them in a hash key" as a user-visible way of tweaking that behavior isn't so completely horrible.
00:50 Actualeyes left 00:51 prammer left
timotimo MasterDuke: we're not going to tell you to do or not do :) 00:52
00:52 itaipu left, vendethiel left
timotimo forgiveness is better than permission, after all 00:52
i don't think i have to tell you to be calm and respectful and all that ;)
i'm so annoyed i can't get "show comments newer than the last time you looked" outside of /r/perl6 00:53
MasterDuke that's pretty much what i figured, but if there is a lot of history i wasn't aware of i don't want to stir the pot unnecessarily
timotimo *shrug*, i don't think there really is 00:54
one person was presenting rakudo's error messages as a good example for the whole industry, commenters were like "no, those errors are shit"
that's all there is to it, if i'm not mistaken 00:55
sammers hi perl6
timotimo hey sammers
sammers hi timotimo
timotimo i wonder if people ever tell you to "go and make me a sammich, sammers" :o)
MasterDuke my feeling has always been that Perl 6's errors are good, but i'm sympathetic to whoever it was that complained that the list of "expecting any of" things wasn't all that helpful in the general case
sammers my wife
timotimo that's fair :D 00:56
sammers :)
timotimo MasterDuke: yeah, that's a very valid thing to say, and to add to the discussion
MasterDuke personally, i have never once gotten any useful information out of them
timotimo others have already weighed in with "we should perhaps filter the list to only have things the user would understand easily"
MasterDuke the messages that precede them are very helpful
sammers are there any examples of using an endless loop to emit to a Supply, without blocking?
timotimo yes, they can be uninformative at times
MasterDuke e.g. 00:57
m: .say if /asdf \s+ \/
camelia rakudo-moar b00d92: OUTPUT«5===SORRY!5===␤Regex not terminated.␤at <tmp>:1␤------> 3.say if /asdf \s+ \/7⏏5<EOL>␤Unable to parse regex; couldn't find final '/'␤at <tmp>:1␤------> 3.say if /asdf \s+ \/7⏏5<EOL>␤ expecting any of:␤ infix stoppe…»
timotimo sammers: since supplies are push-based, you can't emit in an endless loop without blocking a thread, unless you use something like an interval
sammers what about using Thread?
timotimo sure, that works 00:58
don't forget that things tapped to the supply will run on the same thread that does the emit
MasterDuke the first part, really helpful. the expecting any of i ignore
timotimo m: my $supply = start { supply { .emit for 1..* } }; $supply.tap({ .say; last if ++$ > 10 })
camelia rakudo-moar b00d92: OUTPUT«Method 'tap' not found for invocant of class 'Promise'␤ in block <unit> at <tmp> line 1␤␤»
sammers ah, so is there anyway to have a new Thread emit to a Supply on a different thread?
MasterDuke i understand that people doing fancy grammar related things probably do find them very useful 00:59
timotimo m: my $supply = await start { supply { .emit for 1..* } }; $supply.tap({ .say; last if ++$ > 10 })
camelia rakudo-moar b00d92: OUTPUT«No such method 'emit' for invocant of type 'Int'␤ in any at /home/camelia/rakudo-m-inst-2/share/perl6/runtime/CORE.setting.moarvm line 1␤ in block at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
timotimo oh
m: my $supply = await start { supply { .&emit for 1..* } }; $supply.tap({ .say; last if ++$ > 10 })
camelia rakudo-moar b00d92: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤11␤»
timotimo sammers: how does that look?
sammers ok, I will play with it... thanks
timotimo actually, i don't think i even need the start there?
m: my $supply = supply { .&emit for 1..* }; $supply.tap({ .say; last if ++$ > 10 })
camelia rakudo-moar b00d92: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤11␤»
timotimo yeah, neat.
unmatched} m: my $supply = supply { .emit for 1..* }; $supply.tap({ .say; last if ++$ > 10 }) 01:00
camelia rakudo-moar b00d92: OUTPUT«No such method 'emit' for invocant of type 'Int'␤ in any at /home/camelia/rakudo-m-inst-2/share/perl6/runtime/CORE.setting.moarvm line 1␤ in block at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
timotimo ah, of course!
unmatched} :(
timotimo the supply block gets run whet you tap the thing
MasterDuke but my impression is that most people "in the wild" writing Perl (5 or 6), are frequently doing command line text manipulation and things like that
timotimo unmatched}: you did see .&emit?
it's strange to have .take but not .emit 01:01
i do!
unmatched} timotimo: yeah, I kinda figured .emit would work :()
timotimo could be a rakudobug
MasterDuke and for them, the first part of the error message is extremely useful and the second part isn't
timotimo i.o.w.: please submit if you have time :)
unmatched} is too drunk to submit anything
01:01 cdg left
timotimo fair enough! i'll do it, then 01:01
already submitted 01:02
unmatched} And my apartment smells like burt popcorn, because I'm not steeped enough in North American culture to know to take off the cardboard bit of the pan-like popcorn thingies :/
MasterDuke so i would be in favour of turning the second part (i.e, "expecting any of" and things like that) off in the general case and adding a flag to turn it on, like we already have --ll-exceptions 01:03
but if i were to add that as an RFC rakudobug, would i get summarily smacked down? 01:04
timotimo i don't think it'd be smacked down just like that 01:05
oh, yikes
REPL seems to be kind of b0rked at the moment
when you "my $a = 0" and then "say $a", you get "variable $a not declared"
we don't have a test that ensures such basic things in the repl? 01:06
unmatched} MasterDuke: as I whined about earlier today, I feel the entire branch of "LTA errors" of tickets is missing its mark. We need to have a solid plan of what the errors are meant to look like and possibly expose the interface for emitting them to module-space. ATM, we're just like dung-beetles, changing the text of errors any time someone complains, without any plan whatsoever
timotimo unmatched}: huh? but all those errors are already structured exception objects that give you pretty much all you need to work with them?
and LTA error tickets aren't only about wording, but also about what class to emit and what properties those should have 01:07
unmatched} timotimo: oh damn. Maybe that's why RT#127933 git fixed :/ REPL no longer remembers previous lines 01:08
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=127933
MasterDuke unmatched}: i don't really have a problem with the existing tickets, but that's because as you say we don't have a concrete plan for errors overall
timotimo unmatched}: seems at least partially unrelated, because even with an int8 or similar you'll get "not declared" 01:09
i'm heading to bed now
unmatched} timotimo: they do, which is why module-space error writers would make a lot of sense. But tickets *are* a lot about wording. Last week I fixed the ticket for say Any ~ "x", which was actually in addition to previous LTA error message fixing it
buggable: rt 01:10
buggable: rt LTA
buggable unmatched}, TOTAL: 1361, UNTAGGED: 556, BUG: 421, LTA: 107, JVM: 62, NYI: 35, RFC: 31, SEGV: 31, UNI: 27, CONC: 25, PERF: 22, POD: 14, @LARRY: 14, PRECOMP: 10, TODO: 10, BUILD: 7, GLR: 6, STAR: 5, NATIVECALL: 4, WEIRD: 3, BOOTSTRAP: 3, MOARVM: 2, OSX: 2, WEB: 1, SPESH: 1, DOCS: 1, MATH: 1 Details: bug.perl6.party/1471396225.html
unmatched}, Found 98 tickets tagged with LTA. Details: bug.perl6.party/1471396228.html
timotimo they're not *all* about wording
BenGoldberg Why did buggable first say LTA: 107, then only 98? 01:11
unmatched} No, they aren't. But I somewhat feel the actual wording should be a very small part of the equation
BenGoldberg: she's buggy as hell
BenGoldberg Here I was hoping we'd somehow fixed 9 bugs in 3 seconds ;)
unmatched} :) 01:12
timotimo they are a big part of the equation, because the wording helps us figure out what kind of info is needed and what exception type is the right one
and until we have module-space error printers, it's all users have 01:13
unmatched} And that's exactly my point. Until we have module-space errors, any Joe Whatever is free to complain a particular error isn't good enough and we'll likely amend it... because we don't have any plan for errors 01:15
m: say Any ~ "x"
camelia rakudo-moar b00d92: OUTPUT«Use of uninitialized value of type Any in string context.␤Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful. in block <unit> at <tmp> line 1␤x␤»
unmatched} I didn't have any issues with the previous warning for the above, but X amount of human hours were spent on submitting the ticket, reading the ticket, fixing the ticket, spectesting the ticket, and commiting and closing the ticket.
And it's just a cycle 01:16
01:16 kyclark left
unmatched} Anyway. I have have one too many beers to think about this clearly :) 01:16
unmatched} leaves to fly to undiscovered planets in No Man's Sky
BenGoldberg You might be on the wrong side of Ballmer's Peak ;) 01:18
01:20 Actualeyes joined 01:23 kurahaupo_ joined 01:24 kurahaupo left
MasterDuke hoping to not be too controversial, but RT #128969 is a paraphrasing of my previous comments and suggestion about error messages 01:28
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=128969
01:29 kurahaupo_ left, kalkin- joined
timotimo you seem to assume human hours not spent fixing a trivial bug could have fixed a difficult bug instead 01:30
unmatched} timotimo: that's part of the assumtion yes, but the bigger issue is consistency. You could open a thousand tickets each complaining about LTAness of some particular error and they would all be valid tickets, *because there's no plan for errors* 01:33
01:33 kalkin-_ left
timotimo yeah, the metric for what error is good or not is subjective 01:34
but that doesn't mean we'll eternally flip-flop between different possibilities
unmatched} No, not eternally. Eventually we'd hit equllibrium :) For example why does block gobbling error put filename in which the error occurs last, yet levenshtein errors put the filename first? Which choice do you pick to be the "right" one? The errors I report for the same inconsistency will depend on that choice, because there's no master plan :D 01:40
01:46 ilbot3 left 01:47 ilbot3 joined
dataangel Does perl 6 have anything like the override keyword from c++11? (Lets you mark a function in a subclass to explicitly indicate that it should be overwriting a function in the base class, benefits not you get a compile time error, so you catch things like when someone renames the function in the base class but forgets to in the derived class) 01:49
* benefit is that you get
timotimo we don't have that, but it ought to be pretty easy for a module 01:50
dataangel But there seems to be a keyword for everything else why not one more? ;) 01:51
timotimo because they're not keywords :)
and they don't have to be added in core for things to work right
01:52 Calibellus joined
timotimo github.com/jonathanstowe/Attribute...te/Lazy.pm - check this for an example 01:53
01:54 awwaiid left, awwaiid joined
dataangel Very cool... not far along enough yet to understand the implementation yet but I'm looking forward to the meta-programming stuff 01:56
01:56 leego left
BenGoldberg dataangel, You could create a Role with a stub method, and give your base class a submethod BUILD which dies unless the current object being instantiated does that Role. 01:58
gfldex m: role R { method m {...} }; class C does R {};
camelia rakudo-moar b00d92: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Method 'm' must be implemented by C because it is required by a role␤at <tmp>:1␤»
gfldex dataangel: ^^^
timotimo i'd assume you'd have something like a compose method that would mix into the method object to be called when the class gets composed and then you'd inspect the superclasses (or the given class) for "does it have the specified method" and "do i actually override this properly? i.e. not just mix into a multi method?" 01:59
01:59 cyphase left
gfldex dataangel: you may want to unlearn the c++ concept of "baseclass" 01:59
dataangel gfldex: that's like having a pure virtual function C++ but it's not quite the same thing
BenGoldberg m: role R { submethod BUILD { say '\o/' } }; class C does R {}; C.new; 02:02
camelia rakudo-moar b00d92: OUTPUT«\o/␤»
gfldex any method call in Perl 6 uses late binding. If a method is implemented or not is a runtime question.
02:03 pierre_ left
dataangel gfldex: seems like if roles can detect method collisions at compile time it should at least be possible for them 02:03
gfldex m: role R { method m {...} }; class C {}; my $c = C.new but R; 02:04
camelia rakudo-moar b00d92: OUTPUT«Method 'm' must be implemented by C+{R} because it is required by a role␤ in any compose_method_table at gen/moar/m-Metamodel.nqp line 2850␤ in any apply at gen/moar/m-Metamodel.nqp line 2860␤ in any compose at gen/moar/m-Metamodel.nqp line 3033…»
02:04 cyphase joined
BenGoldberg Now that I'm thinking about it, the c++ 'override' keyword is used within a subclass, in order to indicate, "I'm not defining a method here just for my own darn use, I'm defining this method here in order for it to replace a matching method in my superclass" 02:04
gfldex the border between runtime and compile time is fuzzy in Perl 6
dataangel BenGoldberg: yes 02:05
BenGoldberg It's to prevent typos, more or less.
dataangel Will also do not let classes get out of sync
02:06 awwaiid left
BenGoldberg Yea, I can see that... if someone changes the source of a superclass, say "corrects" the spelling of a method, and any subclasses which *don't* have 'overrides' might compile but not work right. 02:06
02:07 awwaiid joined
dataangel yup 02:07
dataangel bbl
timotimo oh, the important thing about "is override" is that you have to complain about every class that doesn't use it ... 02:08
gfldex what is sensible in a static language 02:09
timotimo well, when you use the module it could have an "as late as possible" phaser that goes through the whole module it was used "in" 02:10
gfldex m: role R1 { method m {...} }; role R2 { method m {'oi'} }; class C does R1 {}; my $c = C.new but R2;
camelia rakudo-moar b00d92: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Method 'm' must be implemented by C because it is required by a role␤at <tmp>:1␤»
BenGoldberg Surely could be checked at compose time?
gfldex here the concept breaks
$c would have m, but the compiler assumes static behaviour - in a dynamic language 02:11
timotimo i don't think that's what 02:13
m: class foo { method m { ... }; method m { 'oi' } };
camelia rakudo-moar b00d92: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Package 'foo' already has a method 'm' (did you mean to declare a multi-method?)␤at <tmp>:1␤»
timotimo hm
well, putting roles into a class is like copy-pasting the role body into that class
BenGoldberg m: role R1 { method m { ... } }; role R2 { method m { 42 } }; my $c = (R1&R2).new; 02:14
camelia ( no output )
BenGoldberg m: role R1 { method m { ... } }; role R2 { method m { 42 } }; my $c = (R1&R2).new; dd $c; 02:15
camelia rakudo-moar b00d92: OUTPUT«P6opaque: no such attribute '$!reified' in type List when trying to check if it's initialized␤ in block <unit> at <tmp> line 1␤␤»
BenGoldberg wtf?
02:15 noganex joined
timotimo m: Junction.new 02:15
camelia rakudo-moar b00d92: OUTPUT«P6opaque: no such attribute '$!reified' in type List when trying to check if it's initialized␤ in block <unit> at <tmp> line 1␤␤»
gfldex m: role R1 { method m { ... } }; role R2 { method m { 42 } }; my $c = (R2&R1).new; dd $c;
camelia rakudo-moar b00d92: OUTPUT«P6opaque: no such attribute '$!reified' in type List when trying to check if it's initialized␤ in block <unit> at <tmp> line 1␤␤»
02:15 leego joined
timotimo i golfed it much shorter already 02:16
BenGoldberg Why didn't it error when I didn't try to print $c?
m: Str.new;
camelia ( no output )
BenGoldberg m: my $c = Junction.new;
camelia ( no output )
BenGoldberg m: Junction.new;
camelia rakudo-moar b00d92: OUTPUT«P6opaque: no such attribute '$!reified' in type List when trying to check if it's initialized␤ in block <unit> at <tmp> line 1␤␤»
gfldex Junctions are introspection-blackholes
timotimo it wasn't trying to autothread the junction when you didn't print or sink it 02:17
m: Junction.new; say "test"
camelia rakudo-moar b00d92: OUTPUT«P6opaque: no such attribute '$!reified' in type List when trying to check if it's initialized␤ in block <unit> at <tmp> line 1␤␤»
BenGoldberg m: Junction.new.sink;
camelia rakudo-moar b00d92: OUTPUT«P6opaque: no such attribute '$!reified' in type List when trying to check if it's initialized␤ in block <unit> at <tmp> line 1␤␤»
BenGoldberg m: my $c = (Int&Str).new;
camelia ( no output )
BenGoldberg m: my $c = (Int&Str).new; dd $c;
camelia rakudo-moar b00d92: OUTPUT«P6opaque: no such attribute '$!reified' in type List when trying to check if it's initialized␤ in block <unit> at <tmp> line 1␤␤»
02:18 noganex_ left
BenGoldberg It's a little strange that I could .new on a junction type. 02:19
And very strange what happens when trying to dd it.
m: my $c = ("ook" ^ 42).new; 02:20
camelia ( no output )
BenGoldberg m: dd 42.new;
camelia rakudo-moar b00d92: OUTPUT«0␤»
BenGoldberg m: dd "ook".new;
camelia rakudo-moar b00d92: OUTPUT«""␤»
BenGoldberg m: dd 42.new(27);
camelia rakudo-moar b00d92: OUTPUT«27␤»
02:23 jack_rabbit joined 02:27 labster left
SmokeMachine____ m: my Int %a = a => 1, b => Int; %a .= pairs.grep(-> (:key($), :value($val)) {$val ~~ Any:D}); dd %a 02:27
camelia rakudo-moar b00d92: OUTPUT«Hash[Int] %a = (my Int % = :a(1), :b(Int))␤»
02:28 labster joined
SmokeMachine____ I can't get it... 02:30
BenGoldberg m: my Int %a = a => 1, b => Int; %a = Hash[Int].new(pairs.grep(-> (:key($), :value($val)) {$val ~~ Any:D})); dd %a 02:31
camelia rakudo-moar b00d92: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Calling pairs() will never work with any of these multi signatures:␤ ($x)␤at <tmp>:1␤------> 3 = a => 1, b => Int; %a = Hash[Int].new(7⏏5pairs.grep(-> (:key($), :value($val)) {$␤»
SmokeMachine____ m: my Int %a = a => 1, b => Int; my Int %b = %a.pairs.grep(-> (:key($), :value($val)) {$val ~~ Any:D}); dd %b
camelia rakudo-moar b00d92: OUTPUT«Hash[Int] %b = (my Int % = :a(1))␤»
BenGoldberg m: my Int %a = a => 1, b => Int; %a = Hash[Int].new(%a.pairs.grep(-> (:key($), :value($val)) {$val ~~ Any:D})); dd %a
camelia rakudo-moar b00d92: OUTPUT«Hash[Int] %a = (my Int % = :a(1))␤»
02:31 kyclark joined
BenGoldberg m: my Int %a = a => 1, b => Int; %a := Hash[Int].new(%a.pairs.grep(-> (:key($), :value($val)) {$val ~~ Any:D})); dd %a 02:31
camelia rakudo-moar b00d92: OUTPUT«(my Int % = :a(1))␤»
SmokeMachine____ but why the .= doesn't work? 02:32
BenGoldberg m: my Int %a = a => 1, b => Int; %a{not defined *.value}:delete; dd %a
camelia rakudo-moar b00d92: OUTPUT«Hash[Int] %a = (my Int % = :a(1), :b(Int))␤»
BenGoldberg m: dd (not defined *.value) 02:33
camelia rakudo-moar b00d92: OUTPUT«Bool::False␤»
BenGoldberg m: False.not.say;
camelia rakudo-moar b00d92: OUTPUT«True␤»
BenGoldberg m: my Int %a = a => 1, b => Int; %a{*.value.defined.not}:delete; dd %a
camelia rakudo-moar b00d92: OUTPUT«WhateverCode object coerced to string (please use .gist or .perl to do that) in block <unit> at <tmp> line 1␤Hash[Int] %a = (my Int % = :a(1), :b(Int))␤»
BenGoldberg m: my Int %a = a => 1, b => Int; %a{%a.grep(*.value.defined.not).map: *.key}:delete; dd %a 02:34
camelia rakudo-moar b00d92: OUTPUT«Hash[Int] %a = (my Int % = :a(1))␤»
SmokeMachine____ but shouldn't the .= op work? 02:35
02:36 Calibellus left 02:37 kyclark left
BenGoldberg Maybe? 02:38
BenGoldberg shrugs
02:40 wamba joined
SmokeMachine____ m: my Int %a = a => 1, b => Int; dd %a{* ~~ Any:D} 02:41
camelia rakudo-moar b00d92: OUTPUT«WhateverCode object coerced to string (please use .gist or .perl to do that) in block <unit> at <tmp> line 1␤Int %a = Int␤»
SmokeMachine____ this internally loops through all keys?
02:43 Calibellus joined, Calibellus left
gfldex m: my Int %a = a => 1, b => Int; dd %a.pairs.grep(-> (:key($), :value($val)) {$val ~~ Any:D}); 02:43
camelia rakudo-moar b00d92: OUTPUT«(:a(1),).Seq␤»
gfldex .= should have worked
my Int $i = 42; $i.=new; dd $i; 02:44
m: my Int $i = 42; $i.=new; dd $i;
camelia rakudo-moar b00d92: OUTPUT«Int $i = 0␤»
gfldex Hash slices don't take a matcher, they want a list of keys 02:45
02:57 prammer joined 03:02 prammer left 03:07 cyphase left, awwaiid left 03:08 prammer joined, awwaiid joined
dalek c: 2ebe550 | gfldex++ | doc/Type/Proxy.pod6:
warn about breaking inmutability with Proxy
03:09
gfldex m: my class C is Proxy {}; 03:11
camelia ( no output )
gfldex m: my class C is Proxy {}; dd C.new;
camelia rakudo-moar b00d92: OUTPUT«Required named parameter 'FETCH' not passed␤ in block <unit> at <tmp> line 1␤␤»
03:11 jack_rabbit left 03:12 cyphase joined, jack_rabbit joined, prammer left 03:18 prammer joined
skids m: my class C is Proxy {}; dd C.new(FETCH -> $ { 42 } 03:20
camelia rakudo-moar b00d92: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in argument list; couldn't find final ')' ␤at <tmp>:1␤------> 3 is Proxy {}; dd C.new(FETCH -> $ { 42 }7⏏5<EOL>␤ expecting any of:␤ postfix␤»
skids m: my class C is Proxy {}; dd C.new(FETCH -> $ { 42 })
camelia rakudo-moar b00d92: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared name:␤ FETCH used at line 1␤␤»
skids m: my class C is Proxy {}; dd C.new(FETCH => $ { 42 })
camelia rakudo-moar b00d92: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in argument list; couldn't find final ')' ␤at <tmp>:1␤------> 3class C is Proxy {}; dd C.new(FETCH => $7⏏5 { 42 })␤ expecting any of:␤ infix stopper␤ …»
gfldex m: my class C is Proxy {}; dd C.new(FETCH => -> $ { 42 })
camelia rakudo-moar b00d92: OUTPUT«Required named parameter 'STORE' not passed␤ in block <unit> at <tmp> line 1␤␤»
skids m: my class C is Proxy {}; dd C.new(FETCH => -> $ { 42 }, STORE => -> $,$ { "OHAI".say; 42 })
camelia rakudo-moar b00d92: OUTPUT«42␤»
skids Hrm you cannot make a RO proxy? 03:21
gfldex you can
skids but you still need a STORE?
gfldex m: my class C is Proxy {}; my $container = C.new(FETCH => -> $ { 42 }, STORE => -> $,$ { "OHAI".say; 42 }); say $container; $container = 1; say $container 03:22
camelia rakudo-moar b00d92: OUTPUT«42␤1␤»
03:22 prammer left
skids m: my class C is Proxy {}; my $container := C.new(FETCH => -> $ { 42 }, STORE => -> $,$ { "OHAI".say; 42 }); say $container; $container = 1; say $container 03:22
camelia rakudo-moar b00d92: OUTPUT«42␤OHAI␤42␤»
gfldex the constructor on Proxy demands :$STORE 03:23
skids That would seem to be, but why? 03:24
gfldex design decision 03:25
give what massive foodgun proxy is I'm not sad about it 03:26
03:28 prammer joined 03:30 lichtkind_ joined 03:33 prammer left 03:34 lichtkind left
TEttinger mmm foodgun 03:34
03:35 awwaiid left 03:36 awwaiid joined, cpage_ joined
skids Did anyone ever figure out what :api<> is supposed to do for compunits? 03:37
03:42 wamba left 03:49 awwaiid left 03:50 awwaiid joined 03:54 gzix joined 04:00 skids left 04:04 kyclark joined 04:06 awwaiid left 04:07 awwaiid joined 04:09 khw left
gzix Hi.. I'm waiting for perl 6 a way long. When its going to possibly released 04:09
04:09 araujo joined
timotimo perl6.org/downloads/ - have fun 04:10
04:14 rkazak joined 04:19 cibs left, Cabanossi left 04:21 cibs joined
timotimo gzix: does that help? 04:22
04:22 Cabanossi joined 04:31 awwaiid left
gzix Can i use it for production 04:31
?
Anyway, thanks timotimo.. 04:32
gfldex you will encounter bugs
if that matters for what you do, we can not know
04:39 awwaiid joined 04:41 kyclark left 05:22 Khisanth left 05:29 prammer joined, awwaiid left 05:30 awwaiid joined 05:34 prammer left, Khisanth joined 05:36 gzix left 05:39 pierre_ joined, labster left 05:48 MilkmanDan left 05:49 brrt joined 05:58 brrt left
BenGoldberg m: role { method m { ... } } but role { method m { 42 } }.new; 05:58
camelia rakudo-moar b00d92: OUTPUT«Method 'm' must be implemented by <anon|57472960> because it is required by a role␤ in any compose_method_table at gen/moar/m-Metamodel.nqp line 2850␤ in any apply at gen/moar/m-Metamodel.nqp line 2860␤ in any compose at gen/moar/m-Metamodel.nqp l…»
BenGoldberg m: (role { method m { ... } } but role { method m { 42 } }).new; 05:59
camelia rakudo-moar b00d92: OUTPUT«Method 'mixin' not found for invocant of class 'Perl6::Metamodel::ParametricRoleHOW'␤ in block <unit> at <tmp> line 1␤␤»
BenGoldberg Strange error.
06:03 BenGoldberg left 06:10 CIAvash joined 06:14 rkazak left 06:16 andrzejku joined 06:20 Lemy_ left 06:22 firstdayonthejob joined 06:25 brrt joined 06:31 domidumont joined 06:34 awwaiid left 06:35 awwaiid joined, CIAvash left, domidumont left 06:36 domidumont joined 06:38 andrzejku left 06:39 danaj left 06:44 firstdayonthejob left, MilkmanDan joined 06:46 Actualeyes left, brrt left 06:47 sno left, Actualeyes joined 06:52 movl joined, CIAvash joined 06:57 avalenn left, awwaiid left 06:58 awwaiid joined, shantanu joined, avalenn joined 06:59 rkazak joined 07:00 Girafferson left 07:01 movl left 07:09 RabidGravy joined 07:12 darutoko joined 07:14 movl joined 07:15 TheLemonMan joined 07:18 awwaiid left 07:19 awwaiid joined 07:25 labster joined 07:28 rkazak left 07:31 awwaiid left 07:32 domidumont left, awwaiid joined
shantanu nine: Hi 07:34
nine m: say $*REPO.next-repo.installed 07:36
camelia rakudo-moar b00d92: OUTPUT«()␤»
nine m: say $*REPO.next-repo.next-repo.installed
camelia rakudo-moar b00d92: OUTPUT«()␤»
nine m: say $*REPO.next-repo.next-repo.next-repo.installed
camelia rakudo-moar b00d92: OUTPUT«(CompUnit::Repository::Installation::InstalledDistribution.new(prefix => "/home/camelia/rakudo-m-inst-2/share/perl6".IO(:SPEC(IO::Spec::Unix),:CWD("/home/camelia"))))␤»
nine Ah, there we go :)
m: say $*REPO.next-repo.next-repo.next-repo.name
camelia rakudo-moar b00d92: OUTPUT«perl␤»
07:38 bjz joined
nine m: say $*REPO.next-repo.next-repo.next-repo.installed[0].meta<provides>.keys 07:38
camelia rakudo-moar b00d92: OUTPUT«(Pod::To::Text NativeCall::Compiler::MSVC CompUnit::Repository::Staging experimental newline NativeCall::Compiler::GNU NativeCall NativeCall::Types Test TAP)␤»
nine shantanu: does this make sense?
m: say $*REPO.repo-chain.grep(CompUnit::Repository::Installable) 07:39
camelia rakudo-moar b00d92: OUTPUT«(inst#/home/camelia/.perl6 inst#/home/camelia/rakudo-m-inst-2/share/perl6/site inst#/home/camelia/rakudo-m-inst-2/share/perl6/vendor inst#/home/camelia/rakudo-m-inst-2/share/perl6)␤»
nine All Installable repos have the .installed method
shantanu ahh this is new for me. Whats $*REPO? 07:42
when I do a use lib 'lib 07:43
gfldex a way to solve the problems that arise when one tries to rely on filenames when it comes to modules
shantanu nine: when I do a use lib 'lib'; it seems to change the output of $*REPO 07:44
07:44 sno joined
shantanu nine: isn't use lib 'lib'; supposed to append to the @INC list? 07:45
nine: Ahh I just realized, thats a handle! so you call next-repo on it to cycle through your repos. :) 07:48
07:49 rba__ left
shantanu m: say $*REPO.next-repo.next-repo.next-repo.installed[0] 07:49
camelia rakudo-moar b00d92: OUTPUT«CompUnit::Repository::Installation::InstalledDistribution.new(prefix => "/home/camelia/rakudo-m-inst-2/share/perl6".IO(:SPEC(IO::Spec::Unix),:CWD("/home/camelia")))␤»
shantanu nine: got it! Thanks for your help! 07:50
07:53 zakharyas joined, dakkar joined 07:58 canopus left
nine shantanu: $*REPO replaced @INC. Giving those repositories a say in where to look next for a module has some nice advantages. 07:59
08:01 AlexDaniel joined
shantanu nine: I can figured. I do see a lot more support for generator like code in p6 with lazy arrays and such. I am quiet happy to see that. :) 08:02
08:06 canopus joined
dalek osystem: dedc552 | (Shantanu Bhadoria)++ | META.list:
Add Printer::ESCPOS to ecosystem

See github.com/shantanubhadoria/p6-Printer-ESCPOS
08:12
osystem: 59a9227 | RabidGravy++ | META.list:
Merge pull request #235 from shantanubhadoria/master

Add Printer::ESCPOS to ecosystem
08:13 awwaiid left 08:15 awwaiid joined
shantanu Thanks RabidGravy! This is my first port of one of my p5 modules to p6. Please review and send me your bricks, bats or flowers! 08:16
08:17 zakharyas left, araujo_ joined
RabidGravy to be honest I haven't the faintest what it even does, but hey! :) 08:17
gfldex shantanu: please consider adding travis support 08:18
DrForr shantanu: Hi! (from FB - Jeff G.) Glad to see that bit of perl6 didn't put you out :)
RabidGravy though if it's for a "printer" the usefulness of travis testing is somewhat limited :) 08:19
08:19 labster left
shantanu Its for Receipt printers that you see at those retail outlets and such. 08:19
RabidGravy excellent stuff, does it actually get used in the wild? 08:20
shantanu The ones that print out most of your bills at restaurants.
08:21 araujo left
shantanu Yeah I have got a few support requests for users around the world for my p5 module. Assuming there are 10-20 users for each one I have been contacted by I guess around 200-400 users. 08:21
RabidGravy (The last time I wrote any software to interact with an EPOS system was like twenty years ago ... in qbasic )
shantanu I use it at my job for my company's POS system as well. 08:22
gfldex shantanu: if you indent =begin code blocks, you will get an extra level of indentation in pod6 08:23
08:23 labster joined
shantanu btw in case you are interested my p5 version of module has 650 lines of code, the p6 version around 200. All due to easier typechecking support :) 08:23
gfldex m: enum FOO(ESC => "\x1b"); dd FOO.enums; 08:24
camelia rakudo-moar b00d92: OUTPUT«Map.new((:ESC("\x[1b]")))␤»
shantanu gfldex: Thanks, so no need to indent stuff inside =begin code blocks? Sorry I have been using POD:Weaver exclusively for p5. I hope that comes to p6 soon. 08:25
gfldex we don't got any external pod parsers yet, it's all done by The Perl 6 Grammar 08:26
and the action class in question will not remove the indentation. The renderers we have right now do add indentation. So there will be to much of the good stuff in the end, 08:28
m: enum FOO(ESC => "\x1b"); dd FOO.enums; say "ESC" ∈ FOO; 08:29
camelia rakudo-moar b00d92: OUTPUT«Map.new((:ESC("\x[1b]")))␤False␤»
gfldex m: enum FOO(ESC => "\x1b"); dd FOO.enums; say ESC ∈ FOO;
camelia rakudo-moar b00d92: OUTPUT«Map.new((:ESC("\x[1b]")))␤False␤»
gfldex m: enum FOO(ESC => "\x1b"); dd FOO.enums; say ESC ~~ FOO;
camelia rakudo-moar b00d92: OUTPUT«Map.new((:ESC("\x[1b]")))␤True␤»
gfldex ∈ would make sense for enums
shantanu: you could implement stuff like <UPC-A UPC-E JAN13 JAN8 CODE39 ITF CODABAR CODE93 CODE128>, match with ~~ and generate parts of the error messages automatically 08:31
s//Enum/
shantanu without using a subtype? 08:32
gfldex: can you give me a example of the code? 08:33
gfldex m: enum BarcodeSystem(<UPC-A UPC-E JAN13 JAN8 CODE39 ITF CODABAR CODE93 CODE128>); say BarcodeSystem.enums.keys.map({'"'~...}).join(', ');
camelia rakudo-moar b00d92: OUTPUT«"CODE128", "UPC-E", "JAN8", "CODE39", "UPC-A", "CODABAR", "JAN13", "ITF", "CODE93"␤»
shantanu gfldex: How would I call a enum declared in a class from its object? I had some trouble exporting the enum type from my package 08:35
AlexDaniel /o\ ({'"'~$_~'"'})
m: enum BarcodeSystem(<UPC-A UPC-E JAN13 JAN8 CODE39 ITF CODABAR CODE93 CODE128>); say BarcodeSystem.enums.keys.map({““$_””}).join(', ');
camelia rakudo-moar b00d92: OUTPUT«“CODE128”, “UPC-E”, “JAN8”, “CODE39”, “UPC-A”, “CODABAR”, “JAN13”, “ITF”, “CODE93”␤»
AlexDaniel m: enum BarcodeSystem(<UPC-A UPC-E JAN13 JAN8 CODE39 ITF CODABAR CODE93 CODE128>); say BarcodeSystem.enums.keys.map({“"$_"”}).join(', '); # or this, if you insist
camelia rakudo-moar b00d92: OUTPUT«"CODE128", "UPC-E", "JAN8", "CODE39", "UPC-A", "CODABAR", "JAN13", "ITF", "CODE93"␤»
08:36 g4 joined, g4 left, g4 joined
gfldex shantanu: didn't try that yet, may contain bugs 08:36
shantanu: later you do my `%barcodeSystemMap = UPC-A => 0,` what you would get for free with enums 08:37
AlexDaniel m: enum BarcodeSystem(<UPC-A UPC-E JAN13 JAN8 CODE39 ITF CODABAR CODE93 CODE128>); say ““{BarcodeSystem.enums.keys.join('”, “')}””;
camelia rakudo-moar b00d92: OUTPUT«“CODE128”, “UPC-E”, “JAN8”, “CODE39”, “UPC-A”, “CODABAR”, “JAN13”, “ITF”, “CODE93”␤»
shantanu I had a enum for barcodeSystem first declared within the class. But I got a bareword error when I tried to use the enum name like CODABAR in the object. 08:38
gfldex shantanu: enums are not used that often, so there may acutally be a few bugs left 08:39
shantanu gdflex: Thanks, I kinda see what you mean. it could shave off a few more lines if I declare a enum and then use it for validation and mapping as well. Would be cool if I could export the barewords from enum keys though. 08:40
gfldex shantanu: some golfing would be very welcome
does camelia understand multi-file gists? 08:41
08:42 awwaiid left 08:43 awwaiid joined
AlexDaniel no 08:48
gfldex: how would it know which file to execute? :) 08:49
that's a good question actually, something I can add to committable
RabidGravy gfldex, au contraire - I use enumerations a lot 08:50
gfldex AlexDaniel: find the one with a sub MAIN
AlexDaniel gfldex: okay, that would work. But what about gists without MAIN?
gfldex complain for multi gists without a MAIN 08:51
shantanu: you may want to define your own exception types by subclassing from Exception. Not sure if that makes sense for Printer::ESCPOS tho. 08:53
m: sub f(*@a where {$_.any ~~ Int}){say @a}; f(42); f(<a>); 08:55
camelia rakudo-moar b00d92: OUTPUT«[42]␤Constraint type check failed for parameter '@a'␤ in sub f at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
gfldex shantanu: ^^^ you can have the type constraint for slurpy arrays in the signature if you like
m: sub f(*@a where {$_.all ~~ Int}){say @a}; f(42); f(<a>);
camelia rakudo-moar b00d92: OUTPUT«[42]␤Constraint type check failed for parameter '@a'␤ in sub f at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
gfldex it's .all ofc 08:56
08:56 awwaiid left 08:57 awwaiid joined
gfldex m: Bool $a; say $a.Int; 08:57
camelia rakudo-moar b00d92: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3Bool7⏏5 $a; say $a.Int;␤ expecting any of:␤ infix␤ infix stopper␤ statement end␤ statement modifier␤ stateme…»
gfldex m: my Bool $a; say $a.Int;
camelia rakudo-moar b00d92: OUTPUT«(Bool)␤»
gfldex m: my Bool $a = True; say $a.Int; 08:58
camelia rakudo-moar b00d92: OUTPUT«True␤»
gfldex m: my Bool $a = True; print $a.Int;
camelia rakudo-moar b00d92: OUTPUT«True»
gfldex m: my Bool $a = True; dd $a.Int; 08:59
camelia rakudo-moar b00d92: OUTPUT«Bool::True␤»
gfldex m: my Bool $a = True; dd $a.Numeric; 09:00
camelia rakudo-moar b00d92: OUTPUT«1␤»
shantanu gfldex: Thanks! I was looking for constraint on slurpys. I think some of the documentation suggests it can't be done
gfldex doing it the easy way is NYI 09:01
09:02 TEttinger left 09:05 dj_goku left
shantanu gfldex: Yeah I thought $a.Int would work but there is a bug there. I am using $a.value, whats the difference between .value and .Numeric ? 09:10
gfldex Bool is an enum and the default type of enum values happens to be Int. You went lucky. :) 09:11
El_Che morning
shantanu gfldex: So that could change in future? Would I be better of with .Numeric? 09:13
RabidGravy If you know it is an Int then it's fine 09:14
but don't rely on other people's enumerations being Ints
gfldex shantanu: for bool .Numeric will work (I checked the source). A fix for that bug is easy. 09:16
dalek c: 4abb361 | gfldex++ | doc/Type/Signature.pod6:
show how to constraint slurpy arguments
09:17
shantanu I see that th documentation for Bool mentions numeric explicitly, I will switch to that. Thanks a lot for your suggestion. 09:19
gfldex yw 09:20
09:23 pierre_ left, g4 left 09:25 g4 joined
shantanu gfldex Is there a standard inbuilt exception name to throw if when method params provided are invalid? 09:25
nine shantanu: sounds like you want to beef up your method's signature?
shantanu nine: Hey, I am not sure what that means actually. 09:27
nine: I just wanted to throw the standard exception in case of invalid params if there is such a exception class. I have params whose validity is dependent on value of other params. 09:28
nine shantanu: you really want to put all parameter checking into your method's signature.
m: sub foo($a, $b where $b ne $a) { }; foo("a", "b"); foo("a", "a");
camelia rakudo-moar b00d92: OUTPUT«Constraint type check failed for parameter '$b'␤ in sub foo at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
nine shantanu: ^^^ 09:29
RabidGravy ooh Fedora has just given me rakudo 2016-07
nine RabidGravy: you could have had that with openSUSE several weeks ago ;)
shantanu nine: ohh yes, it thats the idea, if my method code can only include the tasks it needs to do and I delegate all the constraint checking to type definitions, it should lead to easier understanding of my code. 09:30
RabidGravy all good stuff
09:34 mvorg joined 09:36 araujo_ left
shantanu m: sub foo($a, $b where $b ne $a) { }; foo("a", "a"); 09:37
camelia rakudo-moar b00d92: OUTPUT«Constraint type check failed for parameter '$b'␤ in sub foo at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
shantanu m: sub foo($a, $b where $b ne $a) { }; foo("a", "b");
camelia ( no output )
09:38 araujo joined, araujo left, araujo joined 09:39 prammer joined, araujo left 09:40 su joined 09:41 su is now known as Guest61331 09:43 prammer left
shantanu m: '3' ∈ <3 a b> 09:46
camelia rakudo-moar b00d92: OUTPUT«WARNINGS for <tmp>:␤Useless use of "∈" in expression "'3' ∈ <3 a b>" in sink context (line 1)␤»
shantanu m: say '3' ∈ <3 a b> 09:47
camelia rakudo-moar b00d92: OUTPUT«False␤»
shantanu m: say 'a' ∈ <3 a b>
camelia rakudo-moar b00d92: OUTPUT«True␤»
shantanu Is that a bug?
09:47 awwaiid left
shantanu m: say 'a' ∈ ('3', 'a', 'b') 09:48
camelia rakudo-moar b00d92: OUTPUT«True␤»
jnthn No
m: say ('3', 'a', 'b')
camelia rakudo-moar b00d92: OUTPUT«(3 a b)␤»
jnthn m: say ('3', 'a', 'b').perl
camelia rakudo-moar b00d92: OUTPUT«("3", "a", "b")␤»
jnthn m: say <3 a b>.perl
camelia rakudo-moar b00d92: OUTPUT«(IntStr.new(3, "3"), "a", "b")␤»
gfldex m: sub foo($a, $b where $b ne $a) { }; foo("a", "a"); CATCH { default { say .^name } }; 09:49
camelia rakudo-moar b00d92: OUTPUT«X::AdHoc␤»
09:49 awwaiid joined
gfldex LTA exception name :) 09:49
shantanu: complete list: docs.perl6.org/type-exceptions.html 09:50
shantanu gfldex: Thanks :)
lizmat m: die; CATCH { dd $_ } # it's the default from "die" 09:51
camelia rakudo-moar b00d92: OUTPUT«X::AdHoc.new(payload => "Died")␤Died␤ in block <unit> at <tmp> line 1␤␤»
09:51 zakharyas joined
shantanu jnthn: Thanks, I learnt about IntStr! :) 09:52
AlexDaniel m: say ~IntStr.new(42, ‘sixty-nine’) 09:56
camelia rakudo-moar b00d92: OUTPUT«sixty-nine␤»
AlexDaniel m: say +IntStr.new(42, ‘sixty-nine’)
camelia rakudo-moar b00d92: OUTPUT«42␤»
09:59 pdcawley left
TheLemonMan hmm, #127012 should be referenced in #128803 as it has the same root cause 10:00
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=127012
Link: rt.perl.org/rt3//Public/Bug/Displa...?id=128803
10:01 pdcawley joined, vcv left, vcv joined
AlexDaniel TheLemonMan: and this root cause is? 10:03
TheLemonMan AlexDaniel, irclog.perlgeek.de/perl6/2016-08-16#i_13034286 10:04
shantanu DrForr: Hi Jeff! Yeah I am enjoying it so far. :) 10:09
AlexDaniel TheLemonMan: I've added a reference 10:10
DrForr Just glad to see that you weren't dissuaded. To those ont eh inside that's just a harmless bit of golfing, but if you don't understand the language I'm sure it can seem to be a WAT. 10:11
*on the 10:12
10:23 pierre_ joined
moritz .botsnack 10:26
yoleaux :D
synopsebot6 om nom nom
moritz goes back to roaming-imposed awayness
10:29 pierre_ left 10:34 grondilu left 10:36 grondilu joined 10:44 movl left, movl joined 10:49 awwaiid left 10:50 awwaiid joined
gfldex shantanu: FYI github.com/rakudo/rakudo/commit/a4140a3ec6 10:52
10:54 labster left 10:56 prammer joined
masak m: sub infix:«->»(\lhs, \rhs) { "blah" }; say 1 -> 2; say 3 10:56
camelia rakudo-moar b00d92: OUTPUT«1␤3␤» 10:57
10:57 pmurias joined
masak TimToady: is the above what you'd expect? 10:57
lizmat m: sub infix:«-->»(\lhs, \rhs) { "blah" }; say 1 --> 2; say 3 10:58
camelia rakudo-moar b00d92: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Confused␤at <tmp>:1␤------> 3nfix:«-->»(\lhs, \rhs) { "blah" }; say 17⏏5 --> 2; say 3␤ expecting any of:␤ postfix␤ statement end␤ statement modifier␤ stat…»
masak (I know why it happens, with <infixstopper> and stuff. just wondering if the behavior is sane enough)
lizmat: the `>>>` parses as `>>` and then spurious `>`
oh, I'm wrong 10:59
sorry, misconfigured terminal
lizmat ok :-)
masak all my »s expand into >>s :/
haven't figgered out why yet
lizmat I just added two hyphens in two places taking your example
masak aye 11:00
lizmat I mean, it would be nice if this would work: 11:01
11:01 prammer left
lizmat m: my @a = ^10; for @a --> Str { .Str } 11:01
camelia rakudo-moar b00d92: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3my @a = ^10; for @a7⏏5 --> Str { .Str }␤ expecting any of:␤ block or pointy block␤»
lizmat m: my @a = ^10; for @a -> \x --> Str { x.Str }
camelia ( no output )
lizmat I mean, in a sub signature you can also just specify the return sig 11:02
specifying a non-Slip return sig, can make the loop go faster 11:03
m: my @a = ^1000; for ^1000 { @a.map( ->\x --> Str { x.Str } }; say now - INIT now 11:05
camelia rakudo-moar b00d92: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in argument list; couldn't find final ')' ␤at <tmp>:1␤------> 3 ^1000 { @a.map( ->\x --> Str { x.Str } 7⏏5}; say now - INIT now␤»
lizmat m: my @a = ^1000; for ^1000 { @a.map: ->\x --> Str { x.Str } }; say now - INIT now
camelia rakudo-moar b00d92: OUTPUT«0.8080561␤»
lizmat m: my @a = ^1000; for ^1000 { @a.map: ->\x --> Str { x.Str } }; say now - INIT now 11:06
camelia rakudo-moar b00d92: OUTPUT«0.8038859␤»
lizmat oops, pasto
m: my @a = ^1000; for ^1000 { @a.map: *.Str }; say now - INIT now
camelia rakudo-moar b00d92: OUTPUT«0.994976␤»
lizmat m: say 0.8080561 / 0.994976
camelia rakudo-moar b00d92: OUTPUT«0.81213627␤»
11:08 araujo joined 11:09 araujo left 11:26 pierre_ joined 11:31 pierre_ left, awwaiid left 11:32 awwaiid joined 11:45 awwaiid left, awwaiid joined 11:49 pmurias left 11:55 n1lp7r joined 11:57 prammer joined, g4 left 12:01 prammer left 12:03 pierre_ joined 12:04 smls joined 12:07 prammer joined 12:10 prammer left
masak I don't know how big the audience is for this, but here's the current Q type hierarchy for 007: gist.github.com/masak/ab28db9201e8...ea9ae7ad51 12:11
(I just compiled it in tree form because I'm toying with new text for the 007 web page)
12:12 n1lp7r left, nilptr joined, nilptr is now known as n1lp7r
DrForr masak: Useful for me, thanks. 12:13
masak cool.
keep in mind that 007 is both inspired by and distinct from Perl 6. 12:14
we try to steer close to Perl 6 syntax and semantics, but we also try to be aggressively lazy when it serves us :)
DrForr Yeah, there are some obvious differences, and I'm taking a slighty different tack; mostly pragmatic. 12:15
masak remind me -- you're taking a different tack, with... what? :) 12:16
DrForr One moment. 12:17
12:17 pierre_ left
DrForr github.com/drforr/perl6-Perl6-Tidy 12:17
masak nice 12:18
looks like we have enough philosophical overlap that it would be interesting to have a chat at some point 12:19
DrForr I'm just a *bit* busy at YAPC but *please* grab me.
12:23 awwaiid left 12:24 awwaiid joined
masak :) 12:25
12:26 prammer joined 12:28 pierre_ joined
El_Che if someone with knowledge of the wealth of error could have a look at github.com/nxadm/syntastic/blob/ma...-perl6.md. I think I catch and hightlight most perl6 -c errors I have found, but I want to be as complete as possible before pushing perl 6 support upstream (syntastic, a vim linter) 12:33
screenshot: github.com/nxadm/syntastic/blob/ma...-perl6.png 12:36
lizmat wow 12:37
12:37 awwaiid left 12:38 awwaiid joined
El_Che lizmat: once perl6 -c can spit out json errors there are more possibilities for multi line errors (so far undeclared routine/name is the only ones I have found) 12:40
lizmat: I am working on an vim-perl6 howto that include all the plugins needed for perl6 support, but I was waiting untill this was pushed upstream to publish it 12:43
12:44 kjs_ joined 12:45 kjs_ left
El_Che so far I have sane vimrc defaults as a starting point, vim-perl (syntax highlighted), vim-airline (status bar), tabular (align text), vim-figitive (git support),vim-markdown (for the readmes), the syntastic fork (for now) with perl6 support, and youcompleteme with fuzzy autocomplete taht works great 12:45
in the future, maybe the autocomplete could be less fuzzy and more perl6 specific, but so far it has been good 12:46
lizmat El_Che++
El_Che I could publish it now and point people to the fork, but I think it's better to wait, no? 12:48
lizmat release early release often! :-) 12:49
[Coke] gfldex: telling people "they will encounter bugs" when they ask "is it ready for production" is unhelpfully true.
(all software has bugs)
12:49 kjs_ joined
El_Che I think that DrForr Perl6::Tidy would make a great base for a plugin for vim or atom 12:51
gfldex [Coke]: do you think it would be better to see folk walk away and never return because we promised what we can't hold?
El_Che (in the case of atom, it's just a config pointing to the rightexecutable)
DrForr I'm getting close to being able to roundtrip; the problem mainly is that the official grammar doesn't put a lot of the barewords into terms where they can be used, although I understand why. 12:52
12:52 mcmillhj joined, kjs_ left
[Coke] gfldex: I'm not saying "don't say we have bugs", but that marketing matters, even at this level. 12:52
12:53 rkazak joined 12:54 kjs_ joined, rkazak left
gfldex [Coke]: if being good at marketing requires me to give visitors advice that may cause them harm, then I will have to refuse to be good at marketing. 12:54
12:54 cat298 joined 12:55 kjs_ left
cat298 hey I am trying to work on two libraries at the same time, but "perl6 -Ilib" only seems to be loading 1, the other is the version panda installed 12:55
12:55 kjs_ joined
unmatched} cat298: -Ilib just adds ./lib to the search paths for libraries 12:56
cat298: are both of them in ./lib? 12:57
cat298 unmatched: I know, but the path is supposed have precedence when added via -Ilib, correct?
unmatched: yes, both are in ./lib
El_Che DrForr: a good autoformatter (besides tabular that works nicely on part of the file) is the only thing missing from my list
TheLemonMan hmm, is there any documentation about MoarVM call frames ? 12:59
nine cat298: precedence over what? 13:00
unmatched} cat298: yeah, and it works for me. What is your perl6 -v ? gist.github.com/zoffixznet/281a453...e78241c03f
nine: over installed modules
nine unmatched}: yes, it does
unmatched} TheLemonMan: maybe there's something in here? github.com/MoarVM/MoarVM/tree/master/docs 13:02
cat298 unmatched: well I am using Ilib successfully to modify one library I am developing
unmatched: but basically I am trying to add SSL/TLS support to http::client, and that means screwing around with the OpenSSL module, and the OpenSSL module seems to be loaded from Panda and not the lib directory 13:03
TheLemonMan unmatched}, doesn't seem so, but I found an useful post on 6guts 13:04
unmatched} cat298: works fine with two modules too. Not sure what to suggest to you. Maybe check you got the paths right. gist.github.com/zoffixznet/98c1e0f...f81a40cd06
jnthn TheLemonMan: The data structures in the MoarVM header files are commented with what stuff is. frame.h is the important one in this case. 13:05
13:05 Sgeo_ left
nine cat298: run as RAKUDO_MODULE_DEBUG=1 perl6 13:05
cat298 unmatched}: yeah but the issue is that the other module is 2 levels down in dependencies... so IO::Net::Socket is loaded from Panda, but I want to load OpenSSL from my local version
nine cat298: that will give you loads of debug output
cat298: if you gist the debug output, I may have a look at it 13:06
dalek -six-help: 89e02b5 | coke++ | summary.p6:
care about a few more tags
13:09
13:09 cdg joined, cdg left 13:10 cdg joined
cat298 nine: this is what I have: gist.github.com/clearairturbulence...a3180835f6 13:10
I know that it's not loading the other libraries because I commented out a ';' and I am not getting a syntax error 13:13
I am not loading the OpenSSl one that is
I just moved IO::Socket::SSL source into my lib to see if that would work to no avail 13:14
nine Hm....I don't see any IO::Net::Socket at all in this output 13:15
cat298 nine: sorry, I moved it after that gist, I'll create a new one 13:16
nine: gist.github.com/clearairturbulence...cb5352be54 13:17
13:17 prammer left
nine Still no IO::Net::Socket? 13:19
unmatched} Isn't it IO::Socket::SSL ? 13:20
oH
cat298 yeah it's IO::Socket::SSL
13:21 stux|RC joined
TheLemonMan jnthn, thanks, I still haven't managed to find out why sometimes the call-chain breaks up and doesn't go all the way down to <eval> 13:21
needs moar printfs!
nine Oh. I think we do not detect that the repository chain changed since we compiled that dependency as we never look at the Repository::FileSystem's content. 13:23
jnthn TheLemonMan: It may be a failure to keep ->caller in place in some situation 13:24
13:24 bjz left 13:25 bjz joined
DrForr El_Che: Formatting is the goal behind Perl6::Tidy, yes. Most of the stumbling blocks now are caused (as I think I alluded to) the fact that the AST is a bit random about what matches and doesn't match whitespace, and keywords aren't always present in the final AST (though arguably they shouldn't be, as the name of the rule/token tells you wnat should be there - it's redundant) 13:29
13:30 Sgeo_ joined
cat298 so is there a way to prevent a panda library from loading? I asked on stackoverflow about uninstalling/removing and haven't gotten a response yet 13:31
tadzik panda library?
cat298 tadzik: sorry I mean a library installed via panda 13:32
13:33 kyclark joined
tadzik well, libraries don't just load themselves, if you don't want it to load, don't load it :) 13:33
El_Che DrForr: I hope you get it working. For bigger project it could be something like gofmt 13:34
nine cat298: gist.github.com/niner/b39258032f70c083e57b
13:37 danaj joined 13:38 MilkmanDan left, skids joined
cat298 nine: thank you! that's incredibly useful 13:41
DrForr Oh, I will, it's just slogging. 13:43
13:45 Sgeo_ left
cat298 okay, that works, now it's loading the local libraries first 13:45
13:45 wamba joined
ugexe cat298: sometimes you have to delete the .precomp/ directory for your changes to take affect 13:48
at least when you do things like dynamically load another module
13:48 sena_kun joined 13:52 mcmillhj left, mcmillhj joined
ugexe maybe there should be a flag for perl6 that says "precompile or re-precompile everything" 13:53
cat298 ugexe: what's the difference syntax-wise between dynamically and statically loading a library? 13:54
TheLemonMan jnthn, yeah, some crude debugging doesn't show any place where ->caller is nulled though 13:55
ugexe cat298: I havent looked at your code, but for HTTP::UserAgent, Net::HTTP, and LWP::Simple you dynamically load IO::Socket::SSL ala `if (try require ::("IO::Socket::SSL")) !~~ Failure { <setup ssl> }`
nine ugexe: sounds like you want no precompilation; in the module that dynamically loads libraries? 13:57
cat298: dynamically means at runtime 13:58
13:58 rindolf joined
ugexe nine: no, more so I don't have to delete .precomp manually (not that i've had to lately). so I can always test/benchmark the full lifecycle of a run 13:58
13:59 stux|RC-only left
ugexe but also if this type of issue comes up again its easier to say "try it with --refresh-precomp" or whatever 14:00
TheLemonMan nah, screw that, I found where it goes legs up, now it's time to understand /why/ 14:01
cat298 yeah I just got a segfault trying to run it, next time I ran the command it worked fine 14:03
14:07 zakharyas left, zakharyas joined
ugexe cat298: if you delete $PROJECT_DIR/lib/.precomp and $HOME/.perl6 and *then* run it, does it segfault once and then run fine after? 14:09
14:11 zakharyas left
cat298 ugexe: not sure, I haven't been able to recreate it. It happened before I messed with uninstalling a panda library and removing .precomp directories 14:12
14:14 bob777 joined, kyclark left
ugexe I ask because last month I had a situation where tests would fail *only* during the first run, but all subsequent runs would pass. If I deleted the .precomp directories the cycle would be restarted 14:14
14:14 prammer joined 14:15 mcmillhj left 14:16 lichtkind_ left 14:17 lichtkind_ joined 14:18 bob777 left 14:19 mcmillhj joined 14:25 bob777 joined 14:38 cat298 left 14:43 awwaiid left 14:44 awwaiid joined 14:46 dj_goku joined
TheLemonMan hmm, committable doesn't work when queried, does it ? 14:49
AlexDaniel TheLemonMan: it doesn't, but camelia does. If you want to do a lot of committable queries then feel free to join #whateverable 14:54
14:54 kyclark joined
El_Che greetings from the beach 14:56
[Coke] hio
El_Che we live in the future 14:57
a device to connect to 40y old technology ;) 14:58
14:59 edehont joined 15:04 wamba left, jack_rabbit left 15:13 pierre_ left 15:15 zakharyas joined 15:16 awwaiid left, awwaiid joined 15:20 prammer left 15:22 pmurias joined, awwaiid left 15:23 awwaiid joined 15:30 hankache joined 15:33 djbkd left 15:37 edehont left 15:38 rindolf left 15:41 djbkd joined 15:42 rindolf joined, domidumont joined, bob777 left 15:46 awwaiid left
dalek c: d1abcae | (Zoffix Znet)++ | xt/trailing (2 files):
Use consistent file naming scheme
15:46
c: dc25e76 | (Zoffix Znet)++ | Makefile:
Update makefile to reflect tests moved from t/ to xt/
15:47 awwaiid joined 15:58 domidumont left
dalek c: 1154b64 | (Zoffix Znet)++ | doc/Programs/00-running.pod6:
Document PERL6_TEST_TIMES env var

Fixes #738
15:58
15:58 awwaiid left 15:59 awwaiid joined 16:07 TEttinger joined 16:09 mcmillhj left 16:10 kjs_ left
dj_goku El_Che: well the internet is older than that too. don't forget that. :D 16:11
16:17 MilkmanDan joined, sena_kun left 16:21 mcmillhj joined 16:23 El_Che left 16:25 El_Che joined, dakkar left
unmatched} It's pretty annoying that Pod::To::BigPage still has that MAST::Frame issue. Doesn't seem to even install with --force anymore :/ 16:26
16:28 mcmillhj left
unmatched} Oh it did install, but you get Mast::Frame error when pod2onepage runs 16:28
16:29 mcmillhj joined
unmatched} Seems `make html-nohighlight` avoids the issue 16:29
16:30 awwaiid left 16:31 awwaiid joined
kyclark Is there an easy way to see where a module is installed, e.g., the “CSV::Parser” I just used “panda” to install? 16:36
timotimo you can make it cause an exception in the code 16:37
like, give it bogus parameters or something
other than that, grab yourself a sub or method object from the module and grab its file 16:38
m: say &say.filename
camelia rakudo-moar b08527: OUTPUT«Method 'filename' not found for invocant of class 'Sub'␤ in block <unit> at <tmp> line 1␤␤»
timotimo m: say &say.^methods
camelia rakudo-moar b08527: OUTPUT«(<anon> <anon> <anon> soft <anon> <anon> yada perl <anon> onlystar candidates unwrap wrap <anon> <anon> package leave <anon> <anon> cando <anon> <anon> <anon> <anon> multi <anon> <anon> add_phaser has-phaser phasers assuming WHY set_why perl of <anon> retu…»
timotimo m: say &say.^methods.grep(*.name ne '<anon>')
camelia rakudo-moar b08527: OUTPUT«(soft yada perl onlystar candidates unwrap wrap package leave cando multi add_phaser has-phaser phasers assuming WHY set_why perl of returns fire_phasers has-phasers count line perl file of ACCEPTS signature Str arity returns new outer static_id)␤»
timotimo m: say &say.file
camelia rakudo-moar b08527: OUTPUT«gen/moar/m-CORE.setting␤»
timotimo hm. i wonder if that gives the right file name for installed stuff
16:39 harovali joined
timotimo star-m: use JSON::Tiny; say &to-json.file 16:39
camelia star-m 2016.04: OUTPUT«sources/9B467EEF9267A777BB53BAA2F19BE2C9D756BEED (JSON::Tiny)␤»
timotimo ah, yeah
unmatched} m: $*REPO.^methods.say 16:40
camelia rakudo-moar b08527: OUTPUT«(BUILD writeable-path can-install name upgrade-repository install uninstall files resolve need resource id short-id loaded installed precomp-store precomp-repository path-spec prefix load source-file repo-chain new perl gist Str WHICH next-repo)␤»
timotimo wellll, i don't know anything about $*REPO. which is dumb, because it's pretty awesome and nine has been doing some impressive work
but i was the one who wrote the code to make .file and .line work on subs and such, so ... :P 16:41
nine gist.github.com/niner/06792102587a79940294 16:42
unmatched} Is there some proper way to link to references in our docs? The L«C<todo>|/language/testing#index-entry-todo-todo($reason,_$count_=_1)» looks awfully fragile
16:42 TEttinger left
unmatched} huggable: module source :is: This script shows module source: gist.github.com/niner/06792102587a79940294 16:42
huggable unmatched}, Added module source as This script shows module source: gist.github.com/niner/06792102587a79940294
nine m: say $*REPO.need(CompUnit::DependencySpecification.new(:short-name('Test'))).prefix;
camelia rakudo-moar b08527: OUTPUT«Method 'prefix' not found for invocant of class 'CompUnit'␤ in block <unit> at <tmp> line 1␤␤»
nine m: say $*REPO.need(CompUnit::DependencySpecification.new(:short-name('Test'))).repo.prefix; 16:43
camelia rakudo-moar b08527: OUTPUT«"/home/camelia/rakudo-m-inst-2/share/perl6".IO␤»
16:49 grondilu left 16:50 zakharyas left 16:51 hankache left 16:52 MilkmanDan left 16:54 TEttinger joined 16:56 acrussell joined
gfldex unmatched}: you have to provide an empty X<|symbolic-name> with a symbolic name for the target 16:58
17:00 brrt joined
unmatched} gfldex: like L«C<todo>|X<|todo>» ? 17:01
unmatched} tries
17:02 MilkmanDan joined
gfldex i would pull the X<> out and put it in from of the paragraph 17:02
that way you avoid having a sentence cut in halve and force the reader to scroll
17:02 sno left
gfldex depends on context ofc 17:02
unmatched} That just makes it /type/X$LESS-THAN_SIGN$VERTICAL_LINEtodo$GREATER-THAN_SIGN 17:03
gfldex what are you trying to link to? 17:07
unmatched} I want to link from elsehwere to here: docs.perl6.org/language/testing#in...t_%3D_1%29
(it's a "Reference" link)
17:08 prammer joined 17:09 firstdayonthejob joined
gfldex then you put X<|todo (testing)> in from of the paragraph. That creates a link called /language/testing#test_(testing). 17:10
err /language/testing#todo_(testing) 17:11
17:13 brrt left, brrt joined
unmatched} Doesn't that create the anchor point so I could make a link elsewhere to link to this point, where X|todo (testing)> is defined? I don't want to create an anchor, I want to create an <a href="...."> except without writing stuff like L«C<throws-like>|/language/testing#index-entry-throws-like-throws-like(%24code%2C_%24expected-exception%2C_%24description%3F%2C_*%2525matcher)» 17:13
gfldex if you don't like the lenthy anchor your will have to create a short one 17:15
17:17 cyphase left 17:23 cyphase joined
dalek c: 4706f6e | (Zoffix Znet)++ | / (2 files):
Colourise a > code as a link

Otherwise you can't tell that it's a link at all, as it's coloured same as plain <code>
17:25
17:28 cpage_ left
dalek c: b6cb311 | (Zoffix Znet)++ | doc/Language/testing.pod6:
Add Test.pm6 routine reference for easier navigation

Fixes #737
17:29
17:35 canopus left
dalek c: 3ae95b0 | (Trey Harris)++ | doc/Language/functions.pod6:
Fix typo in functions.pod6

The typo causes the example code block to not be formatted.
17:37
c: 02447b3 | Altai-man++ | doc/Language/functions.pod6:
Merge pull request #840 from treyharris/typo-fix

Fix a typo in functions.pod6
17:37 smls left
[Coke] Could we theoretically construct a list of core devs? Is it just "people who have committed to rakudo/nqp/moarvm" in the past <timeperiod> ? 17:38
17:39 zakharyas joined
[Coke] asking for tail end of github.com/perl6/doc/issues/835 17:39
17:40 harovali1 joined 17:41 parabolize left, canopus joined, prammer left 17:43 harovali left
unmatched} You mean programmatically? You can probably just steal code from github.com/rakudo/rakudo/blob/nom/...butors.pl6 17:43
If you make it ignore commits that were merged in, you'll get just the people with the commit bit (I believe)
[Coke] I'm asking if that's the right list to answer the question on the ticket. 17:45
17:47 brrt left 17:50 brrt joined 17:51 bpmedley left
unmatched} No idea. If the context of making spec decisions, I wouldn't want to be on the list: (a) I don't know anything, (b) I don't want people randomly come up to me and ask questions, just 'cause they see me awake 17:51
s/If/In/; 17:52
So maybe the target should be #perl6-dev or RT *shrug*
jdv79 how can anyone see you awake? 17:54
17:54 cpage_ joined, rindolf left
unmatched} jdv79: because I'd be talking 17:55
17:56 MilkmanDan left 18:01 bpmedley joined
nine Does anyone know a dist with a somewhat largish lib/ directory? I.e. many modules? 18:03
18:04 awwaiid left 18:05 awwaiid joined
unmatched} If you clone github.com/moritz/perl6-all-modules there's probably some clever grep | sort combination that'll let you find one 18:05
jnthn nine: github.com/perl6/gtk-simple/tree/m...GTK/Simple may be big enough? 18:06
18:07 n1lp7r left
unmatched} supernovus/perl6-timezone seems to standout 18:07
nine jnthn: yep, GTK::Simple looks like a good benchmark :) 18:08
unmatched} There's a gazillion of modules: github.com/supernovus/perl6-timezo...eZone/Zone
18:10 prammer joined, rindolf joined, awwaiid left 18:11 awwaiid joined
nine A quarter of a second to hash all of GTK::Simple's lib. That's better than I expected. I wonder if it's good enough. 18:12
18:13 mvorg left
dalek c: 4cc1280 | (Zoffix Znet)++ | doc/Language/testing.pod6:
Simplify index entry for throws-like

The anchor URL for the complex version does not work in Firefox.
Fixes #736
18:14
18:16 prammer left 18:17 prammer joined
jnthn nine: When do we need to do it? 18:20
(or "would we need to do it", given you're pondering something... :)) 18:23
nine jnthn: once for every FileSystem repository as soon as the first module is loaded. I need to know whether I have to re-check dependencies since the last time we did. Installation repos get their identity from the installed dist for that purpose. 18:24
Oh it's actually only 0.085 seconds when measured with now - INIT now instead of time perl6
18:25 sno joined
jnthn nine: Only affects -Ilib? 18:25
nine yes 18:26
So usually you'll only pay for the dist you're developing
jnthn *nod* 18:27
nine One of these days I should really start *using* Perl 6 on a larger scale. Some real world testcases would make things much simpler at times :) 18:28
18:29 kjs_ joined 18:34 TheLemonMan left
jnthn has spent his day mostly fixing things from a larger scale test case :) 18:34
dalek c: d81e5a7 | (Zoffix Znet)++ | doc/Language/testing.pod6:
Minor grammar corrections
18:37
18:38 mcmillhj_ joined 18:40 mcmillhj left
kyclark Reading perl6advent.wordpress.com/2014/12/...of-perl6/, he talks about accidentally find a StrDistance object. Can I create one (intentionally) — how? 18:42
timotimo m: say StrDistance
camelia rakudo-moar b08527: OUTPUT«(StrDistance)␤»
timotimo s: StrDistance new
SourceBaby timotimo, Something's wrong: ␤ERR: ===SORRY!=== Error while compiling -e␤Unable to parse expression in argument list; couldn't find final ')' ␤at -e:6␤------> put sourcery( StrDistance⏏ new )[1];␤ expecting any of:␤ infix␤ infix stopper␤
timotimo how do i use this again ...
s: StrDistance, new
SourceBaby timotimo, Something's wrong: ␤ERR: ===SORRY!=== Error while compiling -e␤Undeclared routine:␤ new used at line 6 (in Perl 6 please use method call syntax instead)␤␤
timotimo s: StrDistance, "new"
SourceBaby timotimo, Sauce is at github.com/rakudo/rakudo/blob/b085.../Mu.pm#L80
timotimo well, not quite :) 18:43
s: StrDistance
SourceBaby timotimo, Something's wrong: ␤ERR: Cannot resolve caller sourcery(StrDistance); 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␤␤
timotimo ...
github.com/rakudo/rakudo/blob/nom/...istance.pm - there we go
all you have to do is give it a :before and an :after
m: my $d = StrDistance("hello", "world"); say $d; say +$d; 18:44
camelia rakudo-moar b08527: OUTPUT«Cannot find method 'StrDistance' on object of type List␤ in block <unit> at <tmp> line 1␤␤»
timotimo m: my $d = StrDistance.new("hello", "world"); say $d; say +$d;
camelia rakudo-moar b08527: OUTPUT«Default constructor for 'StrDistance' only takes named arguments␤ in block <unit> at <tmp> line 1␤␤»
18:44 brrt left
timotimo m: my $d = StrDistance.new(:before<hello>, :after<world>); say $d; say +$d; 18:44
camelia rakudo-moar b08527: OUTPUT«StrDistance.new(before => "hello", after => "world")␤4␤»
unmatched} s: StrDistance, "new"
SourceBaby unmatched}, Sauce is at github.com/rakudo/rakudo/blob/b085.../Mu.pm#L80
timotimo what's wrong with my brain now ...
unmatched} s: StrDistance, "new", \()
SourceBaby unmatched}, Sauce is at github.com/rakudo/rakudo/blob/b085.../Mu.pm#L81
timotimo unmatched}: it doesn't declare its own constructor
unmatched} timotimo: what did you want to see the source of? 18:45
timotimo i wanted to get the source for the class itself
unmatched} Ah, it don't do that
kyclark Very cool! Thanks.
18:46 cdg left
unmatched} s: StrDistance, "BUILD" 18:48
SourceBaby unmatched}, Sauce is at github.com/rakudo/rakudo/blob/b085...ance.pm#L6
unmatched} tehe... hax :)
18:49 TheLemonMan joined 18:56 zacts joined 18:59 kjs_ left 19:01 khw joined 19:10 jdoege joined 19:19 harovali1 left 19:21 darutoko left 19:22 ItayAlmog joined
jdoege given: my @keys = < 'a' 'b' 'c' >; my @values = < 1, 2, 3 >; then my %hash{@keys} = @values; throws an error: Invalid hash shape; type expected, while my %hash; %hash{@keys} = @values; works as expected. Reason? 19:24
unmatched} jdoege: the < ... > operator splits on whitespace, that's probably not what you meant 19:25
m: my @keys = < 'a' 'b' 'c' >; dd @keys
camelia rakudo-moar 739d1a: OUTPUT«Array @keys = ["'a'", "'b'", "'c'"]␤»
unmatched} m: my @values = < 1, 2, 3 >; dd @values 19:26
camelia rakudo-moar 739d1a: OUTPUT«Array @values = ["1,", "2,", IntStr.new(3, "3")]␤»
harmil_wk My eyes want to read ["'a'", "'b'", "'c'"] as a list of three single-letter strings, so badly!
jdoege sorry, I mistakenly typed commas in my values list. Issue remains.
unmatched} jdoege: and my %hash{...} sets the type of keys. And you're trying to pass it a list 19:27
jdoege restated: given: my @keys = < 'a' 'b' 'c' >; my @values = < 1 2 3 >; then my %hash{@keys} = @values; throws an error: Invalid hash shape; type expected, while my %hash; %hash{@keys} = @values; works as expected. Reason?
[Coke] you can't do "my %hash{%keys}"
you want my %hash; %hash{@keys} =
you're my'ing the container there. 19:28
jdoege I didn't I did %hash{@keys} which in perl 5 was called a hash slice.
unmatched} m: my @keys = < 'a' 'b' 'c' >; my @values = < 1 2 3 >; my %hash = @keys Z=> @values
camelia ( no output )
unmatched} m: my @keys = < 'a' 'b' 'c' >; my @values = < 1 2 3 >; my %hash = @keys Z=> @values; dd %hash
camelia rakudo-moar 739d1a: OUTPUT«Hash %hash = {"'a'" => IntStr.new(1, "1"), "'b'" => IntStr.new(2, "2"), "'c'" => IntStr.new(3, "3")}␤»
[Coke] jdoege: "this ain't perl 5"
but I can see where you'd expect that to keep working; pretty sure it does not. you can still do the slice, you just can't my it.
m: my @keys = < 'a' 'b' 'c' >; my @values = < 1 2 3 >; my %hash; %hash{@keys} = @values; 19:29
camelia ( no output )
unmatched} jdoege: you can still do the slice, but just as in Perl 5 you have to declare the hash first, so you do in Perl 6. The only difference in Perl 6 you can have keys to be other than strings, so the my %hash{something} syntax is the way to set that
[Coke] m: my @keys = < 'a' 'b' 'c' >; my @values = < 1 2 3 >; my %hash; %hash{@keys} = @values; dd %hash
camelia rakudo-moar 739d1a: OUTPUT«Hash %hash = {"'a'" => IntStr.new(1, "1"), "'b'" => IntStr.new(2, "2"), "'c'" => IntStr.new(3, "3")}␤»
jdoege I think my point may be missed. %hash{@keys} = @values; works just fine, but not as an initializer.
unmatched} jdoege: and you're attempting to set it not to a type, but to something nonsensical
harmil_wk Still re-quoting those letters
m: my %hash; %hash{<a b c>} = <1 2 3>; say %hash.perl
camelia rakudo-moar 739d1a: OUTPUT«{:a(IntStr.new(1, "1")), :b(IntStr.new(2, "2")), :c(IntStr.new(3, "3"))}␤»
19:29 MilkmanDan joined
[Coke] jdoege: you can't my that expression. right. 19:29
jdoege I see. 19:30
19:30 prammer left
jdoege Is there a language reason for that? It seems like a nice way to initialize a hash. 19:30
unmatched} jdoege: yes, there is. I've just explained it 19:31
jdoege I'll try to understand what you wrote.
19:32 pduh joined
nine ugexe: the -Ilib issue cat298 reported should be fixed now 19:32
harmil_wk jdoege: I think the key problem is that you're thinking of "my %hash{@slice}" as meaning a slice operation. Perl 6 is trying to understand what kind of data type you're defining.
ugexe m: my @a = <a b c d>; my @b = (1,2,3,4); my %c andthen {.{@a} = @b}; say %c.perl
camelia rakudo-moar 848add: OUTPUT«{:a(1), :b(2), :c(3), :d(4)}␤»
19:32 ufobat left
unmatched} m: my %hash-typed{Int} = 42 => 43; %hash-typed.keys[0].WHAT.say 19:33
camelia rakudo-moar 848add: OUTPUT«(Int)␤»
harmil_wk ugexe: I've seen andthen a dozen times and never understood what the heck it was supposed to be for. Thank you!
unmatched} jdoege: ^ by default hashes stringify their keys, but above, I told it to use Int type instead
[Coke] that syntax means something else in six; so even if we wanted to use it to allow init by slice, we can't.
19:34 telex left
unmatched} m: class Foo { method Str {'meow'} }; my %h; my $obj1 = Foo.new; my $obj2 = Foo.new; %h{$obj1, $obj2} = 42, 72; say %h{$obj1} 19:35
camelia rakudo-moar 848add: OUTPUT«72␤»
19:35 mniip left, mniip joined
unmatched} m: class Foo { method Str {'meow'} }; my %h{Foo}; my $obj1 = Foo.new; my $obj2 = Foo.new; %h{$obj1, $obj2} = 42, 72; say %h{$obj1} 19:35
camelia rakudo-moar 848add: OUTPUT«42␤»
jdoege unmatched: thanks. I'm beginning to understand. 19:36
unmatched} jdoege: ^ and here I'm using a custom object that always stringifies to the same value. So I got two of such objects and if I can use a typed hash to use those objects as keys
s/if I can/I can/;
19:36 telex joined 19:38 MilkmanDan left
AlexDaniel m: say @::"" 19:38
camelia rakudo-moar 848add: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '@' is not declared␤at <tmp>:1␤------> 3say 7⏏5@::""␤»
19:39 Wiertek joined
AlexDaniel m: my @ = 42; say @ 19:39
camelia rakudo-moar 848add: OUTPUT«[]␤»
AlexDaniel m: my @; say @::"" 19:40
camelia rakudo-moar 848add: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '@' is not declared␤at <tmp>:1␤------> 3my @; say 7⏏5@::""␤»
AlexDaniel how can I declare it? :D 19:41
Wiertek my @:: ; say @:: 19:44
m: my @:: ; say @::
camelia rakudo-moar 848add: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '@' is not declared␤at <tmp>:1␤------> 3my @:: ; say 7⏏5@::␤»
19:48 kjs_ joined
ItayAlmog Hey! So after writing some native compilers I decided to be naive and attempt to write a native compiler for Perl 6, But I have problem finding a reference to the lexical structure of the language :\ Does anyone know where I can find it? 19:52
unmatched} ItayAlmog: we have an Internals Course: edumentab.github.io/rakudo-and-nqp-...ls-course/
That's the only reference I know
ItayAlmog Thanks! I will take a look at it :) 19:53
19:53 wamba joined
Wiertek maybe You will find useful Desing Synopsis: design.perl6.org/ 19:53
[Coke] that's not a reference for the Perl 6 language. If you want to know the syntax of the language, your best bet is github.com/rakudo/rakudo/blob/nom/...rammar.nqp
(that's not) (either the design OR the internals course)
github.com/rakudo/rakudo/blob/nom/...r.nqp#L416 is probably a slightly better URL 19:54
Are you trying to make a perl 6 compiler that compiles down to machine code? That will be very challenging. 19:55
ItayAlmog Yes I am :) I know that, This is why I am trying to do it
harmil_wk [Coke]: Your definition of "very challenging" is either very dry humor or absurd understatement. :) 19:56
[Coke] harmil_wk: ¿porque no los dos?
best of luck.
ItayAlmog Thanks. I will update here once I will have something which works :D 19:57
harmil_wk [Coke]: Both is an acceptable answer 19:58
perlpilot ItayAlmog: you might want to update us on your progress before that ;)
[Coke] Do you have a goal here other than academic curiosity?
ItayAlmog yeah probably xD
[Coke] (we might have other suggestions on stuff to hack on if you're looking for just "faster" or "native executables") 19:59
19:59 Wiertek_ joined
ItayAlmog Not really, I just need something to do on my free time (I am still in high school so I have alot of free time :D) 20:00
20:00 Wiertek left
perlpilot ItayAlmog: you know ... we have an implementation called niecza that could use some love. Maybe you could work on that instead? 20:01
20:02 cdg joined
ItayAlmog I think I will start with making the compiler and see how it goes, If I will see it turns to be too complicated for me to handle I might Go ahead and work on that instead :) 20:03
perlpilot ItayAlmog: what technology will you use for your compiler?
(programming language, tools, whatever)
ItayAlmog For right now I will probably use Java to generate an assembly file and will compile it to an executable using NASM and GCC on Ubuntu computer 20:04
This is how I wrote the other smaller compilers I made
But if I will ever get it working I will probably rewrite it in perl 6 and use it to compile the Perl 6 version :D 20:05
harmil_wk ItayAlmog: If you want to understand why people are hedging so much, look into docs.perl6.org/language/functions#..._Operators for just a taste of the dynamic lexical analysis needed for Perl 6 20:06
perlpilot ItayAlmog: Well, good luck and most importantly, have fun! :)
harmil_wk Also what perlpilot said
So, along the lines of overly ambitious, I was looking at macros... So, I'm trying to dig around in the guts of a parameter I got in a macro... 20:08
20:08 zacts left
harmil_wk It's an AST, so great, I augmented AST to show me its innards, but I don't even know how to start unpeeling what's in a past because it's not actually Perl that I can introspect. 20:08
ItayAlmog Thanks! Yeah, I think I will start from the basics, Maybe I will get to the point of implementing the Object Oriented part
harmil_wk Is there a way to introspect a past from Perl, or do I have to use NQP primitives for that? 20:09
20:10 AlexDaniel left
nine harmil_wk: you actually should be able to use at least some of Perl 6's introspection on it 20:10
harmil_wk For example:
nine harmil_wk: though I usually find it quicker to just read the class files in NQP's source code
harmil_wk m: use experimental :macros; use MONKEY-TYPING; augment class AST { method past { $!past } }; macro foo($a, $b) { dd $a.past; quasi { {{{$a}}} + {{{$b}}} } }; say foo(1,2)
camelia rakudo-moar 848add: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Method 'dispatch:<.?>' not found for invocant of class 'QAST::Op'␤at <tmp>:1␤»
20:13 grondilu joined
harmil_wk I guess the meta-question I'm asking is, "can a macro that does anything non-trivial be backend-agnostic right now?" 20:15
nine I think so 20:18
20:22 Sgeo joined 20:27 TEttinger left 20:28 rindolf left
masak did someone say macros? :) 20:32
20:32 TEttinger joined
masak they've bit-rotted a wee bit in Rakudo, I know 20:32
but yes, they could do a few things that were not entirely useless 20:33
I think strangelyconsistent.org/blog/macros...-d2-merged remains the most accurate compilation on what works and what doesn't 20:34
harmil_wk masak: In Lisp, for example, one very common desire is to introspect the parameters to a macro, see if any of them are simple constants that can be factored out and produce the resulting simpler expression. 20:39
Is there a way to ask, "is this parameter a simple constant" without getting backend-specific? 20:40
20:41 jdoege left, TheLemonMan left
perlpilot harmil_wk++ (so ... you're going to help masak with macros from now on, right? ;-) 20:42
masak harmil_wk: I'm glad you ask
20:42 edehont joined
masak harmil_wk: could we get specific here? is -42 a simple constant? 20:42
20:42 zakharyas left
masak (let's assume it's the original, un-overridden infix:<->) 20:43
harmil_wk Yes, I would think so. I'm thinking of something like "macro foo($a, $b) { quasi { {{{$a}}} + {{{$b}}} } }; foo(1,0);" where that zero could be dropped entirely if we could tell it's there.
masak er, prefix:<->
harmil_wk: maybe it'd be feasible to has an API surface to compile-time constant folding 20:44
have*
harmil_wk Okay, cool. I was just making sure I wasn 20:46
wasn't missing something that was obvious. 20:47
masak no, it's a good point
20:48 CIAvash left
masak the reason I bring up -42 is that it's already been messing with some of My least Surprise in Perl 6 now and then 20:48
m: multi foo(0) { say "zero" }; multi foo(-1) { say "minus one" }; foo 0; foo -1
camelia rakudo-moar 848add: OUTPUT«zero␤minus one␤»
masak ...that used to not work, because `-1` was not considered a numeric constant 20:49
I'm glad it works now
jnthn++, probably :)
20:59 mvorg joined 21:02 skids left
masak harmil_wk: another possible answer is that, in the end, it might not matter, because JIT might detect that 0 and discard it. 21:03
harmil_wk: since JIT is completely downstream of code gen, which is downstream of macros
21:10 mniip left 21:12 mcmillhj_ left
harmil_wk masak: That's absolutely true, and the example was poor in that respect, but a good example would be more difficult to IRCify. Imagine that "+" was replaced with an arbitrary function for which the interesting constant was, say 10, not 0. 21:14
or "apple" 21:15
A good example of this is where you define a tree with number of children as a parameter. you probably want to special-case 2 as a parameter because you can take advantage of some algorithmic shortcuts in that case. 21:16
Lisp does this ALL OVER the place, or at least that's as I recall. My last CL exposure was about 10 years ago. 21:17
jnthn masak: Wouldn't you just be able to look at the QTree of the parameter to the macro and see it's a literal, in the stuff you're planning? 21:20
21:20 dha joined
jnthn You can't really constant fold at that time though 21:20
masak jnthn: that's why I brought up -42, because "look to see if literal" isn't really enough in that case 21:21
21:21 labster joined
jnthn Yeah. Thanks to post-declaration of subs, you can't in general constant fold until after the whole compilation unit has been seen. 21:22
masak good point
heh, this thing *in Perl 6* surprised me while I was developing 007: 21:23
m: say 4 + 5; sub infix:<+>($, $) { "OH NOES" }
camelia rakudo-moar 7d8046: OUTPUT«OH NOES␤»
masak :)
(you can post-declare already-declared operators, and they will be called)
jnthn yup 21:24
You can get yourself into some bizzare situations if you post-modify precedence though :P
21:24 edehont left
masak wiat, what? that's insane :) 21:25
wait*
jnthn No doubt!
21:25 niceperl joined
masak hm, yes, you *can* do that... 21:25
jnthn You "can", but the parser doesn't time travel. :)
dha Is that a bug or a feature? 21:26
[Coke] decommutes
jnthn That the parser doesn't time travel? I think you'll have to check in with physics on that :)
masak I'm not sure it falls on the bug/feature axis at all :P
dha: oh, my eval above? it's correct
dha No, the fact that the parser doesn't time travel. :-) 21:27
masak feature, I'd say
it'd violate one-pass parsing, which we take rather seriously
jnthn Perl 6 is rather strongly into one-pass parsing, so it's nothing but consistent :)
21:27 mohae_ joined
jnthn heh, masak beat me to it ;) 21:27
masak didn't even need to time travel to do it :P 21:28
21:30 mohae left, TEttinger left
masak 'night, #perl6 21:31
jnthn 'night, masak
harmil_wk Night masak
21:32 TEttinger joined 21:34 mcmillhj joined, iH2O joined, niceperl left 21:35 jverce joined
harmil_wk I think this is a macro bug or I'm not understanding AST.Str: 21:37
m: use experimental :macros; macro foo($a, $b) { say ~$a; quasi { {{{$a}}} + {{{$b}}} } }; say foo(1, 2)
camelia rakudo-moar 7d8046: OUTPUT«(1, 2)␤3␤» 21:38
21:38 iH2O left
harmil_wk "(1,2)" is not the first parameter to my function... 21:38
21:39 mcmillhj left
harmil_wk *s/function/macro/ 21:39
m: use experimental :macros; macro foo($a, $b) { say $a.WHAT; quasi { {{{$a}}} + {{{$b}}} } }; say foo(1, 2)
camelia rakudo-moar 7d8046: OUTPUT«(AST)␤3␤»
21:40 jverce left, cyphase left, kjs_ left, mcmillhj joined 21:44 cyphase joined 21:46 wamba left 21:47 acrussell left 21:50 lichtkind_ left 21:52 kjs_ joined, nilptr joined, nilptr is now known as n1lp7r
geekosaur harmil_wk, I think it's going wrong in ~. both $a and $b appear to stringify as that 21:54
harmil_wk I feel I'm doing something wrong as soon as my code starts with "use nqp; use experimental :macros; use MONKEY-TYPING;"
geekosaur so likely something wrong with AST.Str
harmil_wk geekosaur: yeah 21:55
I'm now digging in the NQP to try to figure out what
geekosaur and, well, you're supposed to feel like something is wrong when you do that :)
21:55 mcmillhj left
harmil_wk geekosaur: probably fair given that my very next operation is "augment class AST {...}" ;-) 21:56
geekosaur backs away slowly...
harmil_wk It's okay, as we discussed earlier, there's no time-travel...
21:59 Wiertek_ left, ptolemarch left 22:02 adu joined
El_Che Hi, I migrated my vim-syntastic fork with perl6 support to a plugin so it can be used with the regular syntastic install in the meanwhile (send a PR): github.com/nxadm/syntastic-perl6 22:05
22:07 adu left, adu joined
El_Che It will easier to test/use it for people that already use vim-syntastic for other languages (like perl 5) 22:11
jnthn El_Che: Nice. :) Been getting myself into Vim recently, may give that a go. :) 22:12
dha El_Che - If I'm using Pathogen, can I just clone that into my bundle directory or do I have to shove it somewhere under syntastic itself? 22:13
(I note that the install instructions in that repository says to clone github.com/scrooloose/syntastic-perl6, which doesn't actually exist.) 22:14
22:17 kjs_ left
ItayAlmog why does Perl6 has both int and Int? 22:18
(one with uppercase I and one with lowercase I)
jnthn int is machine native integer, Int is an object and infinite precision 22:19
m: say 2 ** 1000
camelia rakudo-moar 7d8046: OUTPUT«1071508607186267320948425049060001810561404811705533607443750388370351051124936122493198378815695858127594672917553146825187145285692314043598457757469857480393456777482423098542107460506237114187795418215304647498358194126739876755916554394607706291457119…»
22:19 pmurias left
ItayAlmog ok, thanks! 22:19
jnthn Generally, all types with a lowercase name are "native" in some sense 22:20
22:21 stmuk_ joined 22:22 stmuk left, perlpilot left
El_Che dha: just clone it in bundle. I use pathogen myself 22:22
dha *nod*
22:23 perlpilot joined, bjz left
El_Che jnthn: I have spent time using intellij for go and perl. But I wanted to find a good perl6 env, and the best I found was atom and it was very lacking. Hence the usual suspect vim again :) 22:23
22:24 cdg_ joined
El_Che I plan to post a small howto of other useful plugins for a good perl 6 env setup (autocomplete, statusbar, align text, etc) 22:24
22:24 committable6 left
El_Che made note during my setup :) 22:24
22:25 cdg left
El_Che (this wifi connection is crapy) 22:30
jnthn: what are you using nowadays? 22:31
harmil_wk m: use nqp; use experimental :macros; use MONKEY-TYPING; augment class AST { method past { $!past } }; macro foo($a, $b) { my @onto; $b.past.dump_children(0,@onto); dd @onto; Nil; } }; say foo(1, 2) 22:32
camelia rakudo-moar a23c39: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unexpected closing bracket␤at <tmp>:1␤------> 3ump_children(0,@onto); dd @onto; Nil; } 7⏏5}; say foo(1, 2)␤»
harmil_wk m: use nqp; use experimental :macros; use MONKEY-TYPING; augment class AST { method past { $!past } }; macro foo($a, $b) { my @onto; $b.past.dump_children(0,@onto); dd @onto; Nil; }; say foo(1, 2)
camelia rakudo-moar a23c39: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤This type (Array) does not support positional operations␤at <tmp>:1␤»
22:32 Zoffix joined
Zoffix If I have a file with `unit module Foo; sub bar {}` is there any way to use it from outside that file? 22:33
harmil_wk That seems to blow up in dump_children. What do I need to do to get a result from that?
jnthn El_Che: Been giving Atom a go. It's likeable in various ways, but its handling of big files is...well, it doesn't. After a couple of decades with Windows as my primary environment, I'm gradually transitioning away...so working out what I'd like my dev environment to look like. :) 22:38
22:39 RabidGravy left 22:40 adu_ joined
El_Che jnthn: I hear you. It would be nice to have an Intellij plugin though. I also tried Komodo Edit (also for perl 5) and it didn't suit me 22:40
22:40 TEttinger left, prammer joined 22:41 TEttinger joined
jnthn El_Che: Yeah. :) I've done IntelliJ plugins in the past, though not for Perl 6...darn HUGE Java API they got going there. 22:41
22:41 adu left, adu_ is now known as adu
jnthn Complete with all the obligatory factories. :P 22:42
El_Che hehe 22:43
22:43 firstdayonthejob left
El_Che I have tried the perl5 plugin and it turned out to be grat 22:43
great
tailgate m: my @i=((0,1)); my $repeat=3 say @i[0] xx $repeat; say (@i ==> map {@_ xx $repeat});
camelia rakudo-moar a23c39: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3my @i=((0,1)); my $repeat=37⏏5 say @i[0] xx $repeat; say (@i ==> map ␤ expecting any of:␤ infix␤ infix stopper␤ postfix␤ …»
jnthn Yeah, IntelliJ is a well designed platform and you can build good stuff on it.
El_Che the author wanted to do a perl6 one as well, but sticks now with perl 5 becasue of the work of 1 plugin was pretty high 22:44
jnthn: yes and no
tailgate m: my @i=((0,1),); my $repeat=3; say @i[0] xx $repeat; say (@i ==> map {@_ xx $repeat});
camelia rakudo-moar a23c39: OUTPUT«((0 1) (0 1) (0 1))␤(([(0 1)] [(0 1)] [(0 1)]))␤»
jnthn I can fully understand that. While it's decent it's...time consuming.
El_Che jnthn: the go and perl5 plugins I used (I hardly open a java view) are fine. Although very alien, with in most menus references to java stuff
tailgate I don't understand what's diffrent about the two statements - what's going on? 22:45
22:45 prammer left
tailgate why is one of the nested lists [] rather than () 22:47
jnthn tailgate: Probably because using @_ in a block is a bit like having written it more like `-> *@_ { @_ xx repeat }` or so 22:48
22:49 prammer joined
jnthn sleep time; 'night, #perl6 22:50
Zoffix night 22:51
22:51 Zoffix left 22:53 pduh left 22:54 prammer left 22:55 rkazak joined
ItayAlmog Rakudo uses NQP for compiling Perl6 to JVM / MoarVM right? 22:59
23:04 skids joined
unmatched} ItayAlmog: right 23:11
(FWIW, we also have #perl6-dev channel) 23:12
ItayAlmog Oh ok, thanks :)
23:16 bjz joined, prammer joined 23:23 prammer left 23:25 MilkmanDan joined
dj_goku s: Int, 'abs' 23:26
SourceBaby dj_goku, Sauce is at github.com/rakudo/rakudo/blob/1c7c...Int.pm#L48
dj_goku s: [[]], 'eqv', [[]] 23:27
SourceBaby dj_goku, Something's wrong: ␤ERR: Cannot resolve caller sourcery(Array, Str, Array); 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␤␤
dj_goku s: [[]], 'eqv'
SourceBaby dj_goku, Something's wrong: ␤ERR: Type check failed in binding to &code; expected Callable but got Nil (Nil)␤ in sub do-sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 42␤ in sub sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 33␤ in block <unit> at -e line 6␤␤
23:27 bjz left 23:28 bjz joined
dalek c: 367202a | (Zoffix Znet)++ | doc/ (2 files):
Document PERL6_TEST_DIE_ON_FAIL

Added today in github.com/rakudo/rakudo/commit/1c7ca5e13b
23:28
unmatched} s: &infix:[eqv] 23:29
SourceBaby unmatched}, Something's wrong: ␤ERR: ===SORRY!===␤Cannot invoke this object (REPR: Null; VMNull)␤
unmatched} :o
s: &infix:<eqv>
SourceBaby unmatched}, Sauce is at github.com/rakudo/rakudo/blob/1c7c...Mu.pm#L819
unmatched} dj_goku: ^
SourceBaby: help
SourceBaby unmatched}, Use s: trigger with args to give to sourcery sub. e.g. s: Int, 'base'. See modules.perl6.org/dist/CoreHackers::Sourcery
23:30 bjz left 23:33 LegalResale left
dj_goku unmatched}: thanks! 23:33
23:33 MilkmanDan left
ItayAlmog In perl 6 every method inside a class is Global (Can be accessed without having an instance of the class)? 23:33
unmatched} ItayAlmog: you can call methods on the call without instantiating it, but no, methods live inside classes 23:34
ItayAlmog: we do have functions same-named as some class methods, for people who want to use functional programming rather than OO 23:35
m: say sort <a b c>
camelia rakudo-moar e97fb7: OUTPUT«(a b c)␤»
unmatched} m: <a b c>.sort.say 23:36
camelia rakudo-moar e97fb7: OUTPUT«(a b c)␤»
ItayAlmog ok, thanks!
unmatched} s: &sort, \(<abc>)
SourceBaby unmatched}, Sauce is at github.com/rakudo/rakudo/blob/1c7c...s.pm#L2100
unmatched} s: &say, \(<abc>)
SourceBaby unmatched}, Sauce is at github.com/rakudo/rakudo/blob/1c7c...ors.pm#L22
unmatched} s: <abc>, "sort", \()
SourceBaby unmatched}, Something's wrong: ␤ERR: Type check failed in binding to &code; expected Callable but got Method+{<anon|42627280>} (Method+{<anon|4262728...)␤ in sub do-sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 42␤ in sub sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 29␤ in block <unit> at -e li
unmatched} bah
s: <abc>, "say", \() 23:37
SourceBaby unmatched}, Sauce is at github.com/rakudo/rakudo/blob/1c7c...Mu.pm#L451
23:37 kyclark left
unmatched} *call methods on a the class... I meant 23:39
ItayAlmog Yeah, I understood it :) I am right now thinking how The classes definitions are going to get represented in memory, I think I have an idea but i dunno, Also I have to think about this defined method.... 23:40
unmatched} m: my $awesome-int = 42 but role { method is-even { self %% 2 } }; 42.is-even.say; 23:42
camelia rakudo-moar e97fb7: OUTPUT«Method 'is-even' not found for invocant of class 'Int'␤ in block <unit> at <tmp> line 1␤␤»
unmatched} orly
bisect: m: my $awesome-int = 42 but role { method is-even { self %% 2 } }; 42.is-even.say;
bisectable unmatched}: On both starting points (good=2015.12 bad=7d80466) the exit code is 1 and the output is identical as well
unmatched}: Output on both points: Method 'is-even' not found for invocant of class 'Int'␤ in block <unit> at /tmp/JRXI1zgB9o line 1␤
unmatched} weird. I could've swore that worked before.
bisect: class WorkingInt is Int {}; my $awesome-int = WorkingInt.new(42) but role { method is-even { self %% 2 } }; 42.is-even.say; 23:43
bisectable unmatched}: On both starting points (good=2015.12 bad=7d80466) the exit code is 1 and the output is identical as well
unmatched}: Output on both points: Method 'is-even' not found for invocant of class 'Int'␤ in block <unit> at /tmp/jgyWGl7RDk line 1␤
unmatched} oops
Ohh... good god. I need some sleep
m: my $awesome-int = 42 but role { method is-even { self %% 2 } }; $awesome-int.is-even.say; 23:44
camelia rakudo-moar e97fb7: OUTPUT«True␤»
dj_goku m: my @b[2;2] = ([1, 2], [3,4]); say @b;
camelia rakudo-moar e97fb7: OUTPUT«[[1 2] [3 4]]␤»
dj_goku m: my @b[2;2] = ([1, 2], [3,4]); dd @b;
camelia rakudo-moar e97fb7: OUTPUT«Array.new(:shape(2, 2), [1, 2], [3, 4])␤»
unmatched} :) Anyway, the point I was trying to make is objects/classes can be altered at runtime
23:44 AndyBotwin joined
unmatched} m: use MONKEY-TYPING; augment class Int { method is-even { self %% 2 } }; 42.is-even.say; 23:45
camelia rakudo-moar e97fb7: OUTPUT«True␤»
unmatched} m: use MONKEY-TYPING; say 42.^can('is-even'); EVAL 'augment class Int { method is-even { self %% 2 } }'; 42.is-even.say;
camelia rakudo-moar e97fb7: OUTPUT«()␤5===SORRY!5=== Error while compiling /home/camelia/EVAL_0␤augment not allowed without 'use MONKEY-TYPING'␤at /home/camelia/EVAL_0:1␤------> 3augment class Int7⏏5 { method is-even { self %% 2 } }␤ expecting any of:␤ generi…»
unmatched} m: say 42.^can('is-even'); EVAL 'use MONKEY-TYPING; augment class Int { method is-even { self %% 2 } }'; 42.is-even.say;
camelia rakudo-moar e97fb7: OUTPUT«()␤True␤»
unmatched} there we go
unmatched} & 23:46
dj_goku so on my local machine the REPL is messed up some how. I create a new array like above but when I try to print it I get: Variable '@b' is not declared ------> say ⏏@b
23:47 cdg_ left, cdg joined, LegalResale joined
unmatched} oh damn. yeah, it's borked 23:48
This is a release blocker too IMO.
dj_goku++
Seems to have been opened 10 hours ago: rt.perl.org/Ticket/Display.html?id=128973 23:49
23:50 adu left 23:53 cdg left, phifisher joined 23:54 adu joined 23:55 phifisher left
dj_goku unmatched}: :( 23:55
23:55 phifisher joined
dj_goku I rebuilt thinking it would fix it. 23:55
phifisher I want learn perl 6, where I searched a videos about? youtube? 23:56
Good night.
dj_goku unmatched}: that is what i get for bleeding edge 23:57
unmatched} huggable: beginners
huggable unmatched}, nothing found
unmatched} huggable: beginner
huggable unmatched}, nothing found
dj_goku newbs 23:58
unmatched} huggable: newcomers
huggable unmatched}, nothing found
unmatched} huggable: newcomer
huggable unmatched}, nothing found
unmatched} stupid robot
phifisher yes, I am new
hehe
unmatched} phifisher: check the 'New Comers' section on perl6.org/documentation/ perl6intro.com/ and there's also perl6.party/
No idea about videos.
phifisher unmatched}, thx man 23:59
=)