»ö« 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:02 sufrostico joined 00:03 TEttinger left 00:05 dalek joined, ChanServ sets mode: +v dalek, margeas left 00:22 aindilis joined 00:31 Actualeyes joined 00:42 mcmillhj left 00:49 pierre_ joined 00:50 aries_liuxueyang joined 00:52 cpage_ left 00:53 cpage_ joined 00:56 lambd0x joined
lambd0x Hi everyone! 00:56
m: say 'ye' if 'properly' ~~ m/ perl /; 00:57
camelia rakudo-moar 3af93c: OUTPUT«ye␤»
lambd0x m: say 'ye' if 'properly' ~~ /perl/;
camelia rakudo-moar 3af93c: OUTPUT«ye␤»
lambd0x for what m/ stands for?
skids m: given "properly" { m/(perl)/; $0.say } 00:59
camelia rakudo-moar 3af93c: OUTPUT«「perl」␤»
skids m: given "properly" { /(perl)/; $0.say } 01:00
camelia rakudo-moar 3af93c: OUTPUT«「perl」␤»
skids hrmf.
01:00 cpage_ left, mcmillhj joined
lambd0x skids: interesting though. 01:01
01:01 cpage_ joined 01:04 mcmillhj left 01:05 cpage_ left 01:06 cpage_ joined
skids Well, I guess at least it provides something to anchor adverbs that cannot be inside the //. Like m:g// 01:11
m: ("foofoofoo" ~~ m:g/foo/).say
camelia rakudo-moar 3af93c: OUTPUT«(「foo」 「foo」 「foo」)␤»
skids m: ("foofoofoo" ~~ m/:g foo/).say 01:12
camelia rakudo-moar 3af93c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unrecognized regex modifier :g␤at <tmp>:1␤------> 3("foofoofoo" ~~ m/:7⏏5g foo/).say␤»
lambd0x skids: well, at least it's there, right? :P 01:13
01:13 BenGoldberg joined 01:17 labster left 01:20 mcmillhj joined 01:23 canopus left 01:25 mcmillhj left 01:29 canopus joined 01:35 telex joined 01:43 Ben_Goldberg joined 01:45 BenGoldberg left 01:46 mcmillhj joined, sili joined 01:50 mcmillhj left 01:54 pierre_ left 01:56 lambd0x left 01:57 sufrostico left 02:02 sufrostico joined 02:03 pierre_ joined, pierre_ left 02:04 pierre_ joined 02:05 cpage_ left 02:08 noganex joined 02:15 NSGFK joined
NSGFK Can I compile perl6 to exe? 02:15
:S
jdv79 not yet
NSGFK Any idea when 02:16
Also will I require a .dll with it?
bioduds I have a perl6 that runs by shell another perl6, im trying to fetch the say result in a var 02:17
im getting this: Proc<62046800>
I dont understand 02:18
MasterDuke bioduds: sounds like you're getting the .perl of thing you're running (or maybe its default stringification), not its output 02:21
bioduds any ideas how should I proceed? 02:22
I basically want to run another perl6 script with shell and load the say result from it in my var
MasterDuke are you passing :out to shell? 02:24
geekosaur the result of shell is not the command output; use the :out adverb
02:24 Dunearhp joined 02:25 Dunearhp left
bioduds let me try the :out 02:26
geekosaur "The return value is of type Proc."
bioduds where should it go? shell "perl6 myperl.pl":out ?
geekosaur docs.perl6.org/type/Proc 02:27
my $cmd = shell shell "perl6 myperl.pl", :out; my $res = $cmd.out.slurp-rest; 02:28
MasterDuke m: my $p = shell q|perl6 -e "say 5"|, :out; say $p.out.slurp-rest
camelia rakudo-moar 3af93c: OUTPUT«shell is disallowed in restricted setting␤ in sub restricted at src/RESTRICTED.setting line 1␤ in sub shell at src/RESTRICTED.setting line 15␤ in block <unit> at <tmp> line 1␤␤»
bioduds worked 02:29
great
thanks
btw
i also got it with QX("perl6 myperl.pl") 02:30
though i don't know what QX is
MasterDuke welcome
bioduds steep curve Perl6 :)
MasterDuke docs.perl6.org/syntax/qx 02:31
slightly modified from Perl 5
02:32 MilkmanDan left 02:33 wamba joined, mcmillhj joined
bioduds I was interested in the adverb term 02:34
02:35 MilkmanDan joined
MasterDuke which adverb term? of what? 02:36
jdv79 NSGFK: i have no idea. in general i don't believe its a priority at all. 02:37
02:37 AndyBotwin joined 02:38 mcmillhj left
bioduds man, simple thing Im not being able to do, simple split into an array 02:40
wouldnt it be my @array = $val.split( " " );
ops, my bad 02:43
never mind that
dalek ateverable: 86f44b6 | (Aleks-Daniel Jakimenko-Aleksejev)++ | / (5 files):
Bye-bye Perl 5 bots

We strive to increase the amount of dog food in our diet, so Perl 5 variants of the bots have to go. 65c5f4a | (Aleks-Daniel Jakimenko-Aleksejev)++ | build.p6: Misplaced comment
02:48
02:48 dalek left
AlexDaniel dalek :P 02:49
02:49 dalek joined, ChanServ sets mode: +v dalek, mcmillhj joined 02:50 nicq20 joined 02:53 dj_goku joined, cpage_ joined
NSGFK /j #security 02:53
02:54 mcmillhj left
bioduds anyone knows how to create a set from a string? 02:55
i want my $set = set < $myString >; 02:56
$myString would be "one two three" 02:58
03:00 rkazak joined
_slade_ my $set = set($myString.words); 03:00
MasterDuke m: my $a = "a b c"; my $set = set <<$a>>; say $set
camelia rakudo-moar 3af93c: OUTPUT«set(a, c, b)␤»
ateverable: d28bc62 | (Aleks-Daniel Jakimenko-Aleksejev)++ | build.p6:
build.p6 should probably have a license notice too

Same license as the rest of the project. If you need this code to come under something less restrictive, contact me and we will figure it out.
bioduds cool MasterDuke, you're The Man! thanks 03:03
03:04 mcmillhj joined
AlexDaniel m: my $x = ‘hello world’; dd «$x» 03:04
camelia rakudo-moar 3af93c: OUTPUT«slip("hello", "world")␤»
MasterDuke np, glad to help
AlexDaniel m: my $x = ‘hello world’; dd <$x>
camelia rakudo-moar 3af93c: OUTPUT«"\$x"␤»
AlexDaniel m: my $x = ‘hello world’; dd «"$x"»
camelia rakudo-moar 3af93c: OUTPUT«"hello world"␤»
AlexDaniel right
03:07 TEttinger joined 03:09 mcmillhj left 03:15 nicq20 left 03:16 mcmillhj joined 03:18 pierre_ left 03:21 mcmillhj left 03:22 pdcawley_ joined, pierre_ joined 03:40 harmil joined
harmil m: class A { multi method new($a) { say "positional" } }; class B is A { multi method new($a) { nextsame $a } }; say B.new(1) 03:41
camelia rakudo-moar 3af93c: OUTPUT«Too many positionals passed; expected 0 arguments but got 1␤ in method new at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
harmil Isn't that supposed to work? 03:42
AlexDaniel m: class A { multi method new($a) { say "positional" } }; class B is A { multi method new($a) { nextsame } }; say B.new(1) 03:45
camelia rakudo-moar 3af93c: OUTPUT«positional␤True␤»
AlexDaniel m: class A { multi method new($a) { say "positional" } }; class B is A { multi method new($a) { nextwith $a } }; say B.new(1)
camelia rakudo-moar 3af93c: OUTPUT«positional␤True␤»
harmil Ah, that makes more sense. 03:47
03:48 mcmillhj joined, pierre_ left, wamba left 03:52 mcmillhj left 03:55 cyphase joined 03:57 pierre_ joined 04:00 pierre_ left, pierre_ joined 04:06 mcmillhj joined 04:11 mcmillhj left 04:15 tadzik joined, Ben_Goldberg is now known as BenGoldberg, Cabanossi joined 04:17 woodruffw joined, woodruffw left 04:18 woodruffw joined, woodruffw left, woodruffw joined, woodruffw left 04:19 woodruffw joined 04:20 skids left, Guest61205 left, ilbelkyr joined 04:27 cibs left 04:29 cibs joined 04:37 cibs left 04:39 cibs joined
nine Good morning #perl6! 04:41
nine is on his way and very much looking forward to Cluj 04:42
dalek osystem: 332f7ba | (Sterling Hanenkamp)++ | META.list:
Add DOM::Tiny to the ecosystem
04:51
04:58 mcmillhj joined 05:02 mcmillhj left
Xliff \o nine 05:07
Xliff is bored again.
.seen moritz
yoleaux I saw moritz 22 Aug 2016 18:12Z in #perl6: <moritz> just like .comb(regex) looks for matches of the regex
05:08 pierre_ left
Xliff .seen FROGGS 05:09
yoleaux I saw FROGGS 31 Jul 2016 18:32Z in #perl6: <FROGGS> if you click on the Perl 6 caption you can look at other examples
05:09 faubi joined 05:20 M-Illandan joined, Matthew[m] joined 05:23 lizmat left 05:25 BenGoldberg left 05:28 inokenty joined 05:29 mcmillhj joined 05:34 mcmillhj left
harmil Well, it's still VERY much a work in progress, and I don't have the panda metadata yet, but my numeric sequences module is now on github: github.com/ajs/perl6-Math-Sequence...er.pm#L136 05:35
I have to admit that being able to say "@A000040 is export = lazy ℕ.grep: {.is-prime};" was pretty nifty. 05:37
05:39 [Sno] left
harmil Well, I'm off to bed. Night all 05:45
05:46 harmil left 05:47 mcmillhj joined 05:49 lizmat joined 05:51 mcmillhj left
lizmat clickbaits p6weekly.wordpress.com/2016/08/22/...from-cluj/ 05:51
lizmat waves from act.yapc.eu/ye2016/training-jeff.html 05:54
05:59 sufrostico left 06:06 ufobat joined 06:09 nadim_ joined, pdcawley_ left 06:12 woolfy joined 06:17 bioduds left 06:30 firstdayonthejob joined 06:34 mcmillhj joined 06:36 neuron joined
neuron Hi 06:37
06:37 CIAvash joined
neuron p6: grammar X { rule TOP { <bit>* }; rule bit { . } }; say so X.parse('abc'); 06:37
camelia rakudo-moar 3af93c: OUTPUT«False␤»
neuron hmmm 06:38
p6: "grammar X { rule TOP { <bit>* }; rule bit { . } }; say so X.parse('abc');"
camelia rakudo-moar 3af93c: OUTPUT«Potential difficulties:␤ Useless declaration of a has-scoped method in mainline (did you mean 'my rule TOP'?)␤ at <tmp>:1␤ ------> 3"grammar X { rule 7⏏5TOP { <bit>* }; rule bit { . } }; say so␤ Useless declaration of a has-scoped…»
neuron Anyway, that says False and I can't find out why :)
It has to be something stupid but I don't see it
p6: grammar X { rule TOP { <bit>* }; rule bit { . } }; say so X.parse('abc'); 06:39
camelia rakudo-moar 3af93c: OUTPUT«False␤»
06:39 mcmillhj left
lizmat m: grammar X { rule TOP { <bit>* }; rule bit { . } }; say X.parse('abc'); 06:39
camelia rakudo-moar 3af93c: OUTPUT«Nil␤»
neuron If I use 'token bit { . }' it seems to work 06:40
lizmat then use that :-) seriously, I'm still not really up to speed with grammars yet :-(
neuron The documentation says that difference between token and rule is the use of 'sigspace'
no problems lizmat, you are not obliged to give me answer :) 06:41
06:43 firstdayonthejob left
CIAvash m: grammar X { rule TOP { <bit>* }; rule bit { .} }; say so X.parse('abc'); 06:46
camelia rakudo-moar 3af93c: OUTPUT«True␤»
06:46 mcmillhj joined
CIAvash neuron: ↑ read this section docs.perl6.org/language/regexes.html#Sigspace 06:48
neuron Ah! There's space beyond the dot!
That didn't occure to me, thanks! 06:49
CIAvash++
06:49 domidumont joined 06:51 mcmillhj left 06:54 domidumont left, domidumont joined
lizmat TIL CIAvash++ 06:57
07:05 rkazak left 07:07 NSGFK left, mcmillhj joined
CIAvash lizmat++ # weekly 07:08
07:12 mcmillhj left 07:13 neuron left 07:15 darutoko joined 07:25 mcmillhj joined 07:27 rindolf joined 07:29 mcmillhj left 07:35 mcmillhj joined 07:39 sno joined 07:40 mcmillhj left 07:44 g4 joined 07:47 zakharyas joined 07:48 bob777 joined 07:52 _slade_ left 07:56 smls joined
smls tried a code golf: codegolf.stackexchange.com/a/90748/14880 08:00
a bit shorter than Python, but can't compete with the dedicated code golf languages... :)
moritz \o
smls hi moritz 08:01
08:01 bjz joined 08:06 Actualeyes left 08:07 mcmillhj joined, cognominal left
nadim_ ugexe: nice detective work 08:11
08:11 mcmillhj left 08:13 TheLemonMan joined, bob777 left 08:15 bob777 joined 08:22 mcmillhj joined
Xliff \o moritz 08:22
Think I have a working implementation of Bubble Plots for SVG::Plot
moritz \o/ 08:23
08:23 Actualeyes joined
Xliff Yeah, so just glance over the PRs or I can just merge 'em. Wanted to make sure the code looked right before I started pushing to origin/master of someone else's repository. =) 08:24
moritz Xliff: please just push. Forgiveness > Permission, Working Code > Pretty Code :-) 08:25
08:27 mcmillhj left
ufobat hi moritz 08:34
moritz \o ufobat 08:36
08:37 auoeuau joined, auoeuau left
nebuchadnezzar hello, back from holidays, I saw that rakudo 2016.07.1 does not build on arm64, I don't have direct access to this kind of machine, do you have any idea about “Makefile:502: recipe for target 'm-coretest5' failed” (buildd.debian.org/status/fetch.php...469459065) 08:37
domidumont: hello 08:39
08:49 st_iron joined
st_iron hey 08:49
08:52 sno left
moritz nebuchadnezzar: hm, it says E: Caught signal ‘Terminated’: terminating immediately 08:53
no idea where that signal comes from
the output from the tests looks fine
08:55 espadrine joined, mcmillhj joined 09:00 mcmillhj left 09:08 jonas1 joined 09:26 lizmat_ joined, dalek left, lizmat left
Xliff moritz: I'll remember you said that. Remember: You are on record. Mu-ahahahahahahahahaha! ]8-) 09:26
09:26 dalek joined, ChanServ sets mode: +v dalek 09:27 pierre_ joined
timotimo Build killed with signal TERM after 150 minutes of inactivity 09:28
that seems to have caused that signal?
09:29 xdbr joined 09:30 zakharyas left 09:32 bjz_ joined 09:33 bjz left 09:34 mcmillhj joined
nebuchadnezzar ok, maybe some test are too long or a command is hanging, then the build process kill it after a timeout 09:35
timotimo probably
09:36 TEttinger left
nebuchadnezzar thanks, I did not realize it 09:36
09:37 skrshn joined
skrshn Newbie here. I wrote one of my first perl6 code here (gist.github.com/skrisna/dcd9ee962f...704a7dfa). Am I following the right perl6 idioms? 09:38
09:39 mcmillhj left, pierre_ left
timotimo your usage of "when" is a bit different from what the idiom would be 09:40
"when 1234" is more like "if $_ ~~ 1234"
so you're ending up testing $_ against True or False each time
that does work, because a smart match against True always succeeds and a smart match against False always fails 09:41
but it's strange in general
the solution would be to use $_ instead of $p, or to use if instead of when.
actually, i wouldn't recommend using $_ + when here at all, because you're checking $p[0] and $p[1] and such
skrshn But $p is an array
timotimo: thanks 09:42
timotimo oh, you could also write "for @hyp Z @ref -> ($left, $right) { ... } and use $left and $right instead of $p[0] and $p[1]
nebuchadnezzar timotimo: doesn't the “when” stop at first match? 09:43
timotimo that's right
there'd have to either be "elsif"s or "succeed" in the curlies
skrshn I like the ($left, $right) a lot. 09:44
smls thinks using `when` is fine even with expressions that don't operate, if the short-circuiting behavior is what you want 09:45
*operate on $_
In fact, isn't that the whole reason why True always smart-matches positively? 09:46
skrshn In this case, I guess that was what I wanted
09:46 mcmillhj joined
timotimo smls: you're probably right 09:46
09:46 RabidGravy joined
smls What irks me more are the `.get()` instead of `.get` 09:47
;)
timotimo to me, that's "maximum *shrug*" ;)
jnthn Alternatively, you might be able to do it like: for @hyp Z @ref { when ('*', Any) { }; when (Any, '*') { }; when [eq] .[0,1] { }; default { } } 09:48
or even [eq] .[] would work I guess :) 09:49
timotimo aye
skrshn I updated the script
timotimo the + on either side of the == between @hyp and @ref is redundant, but it can be helpful to show the reader what is meant 09:50
09:50 mcmillhj left
skrshn jnthn: I don't follow what you said 09:51
Xliff Good night #perl6.
o7
gregf_ >> say [eq] [1,3] 09:52
m: say [eq] [1,3]
camelia rakudo-moar 2181f7: OUTPUT«False␤»
skrshn Xliff_zzz: In "for @hyp Z @ref { when ('*', Any) { };..." what does when('*',Any) do? 09:53
gregf_ m: @a = [1..4]; +@A.say
camelia rakudo-moar 2181f7: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '@a' is not declared␤at <tmp>:1␤------> 3<BOL>7⏏5@a = [1..4]; +@A.say␤»
jnthn $_ will contain a 2-element array (something from @hyp, something from @ref). And it just pattern matches against the array 09:54
when ('*', Any) { } means "When the first element is a * and the second element is anything"
skrshn wow 09:55
got it. thanks
09:56 cibs left
skrshn How would I interpret this: when [eq] .[0,1] ? 09:56
moritz when .[0] eq .[1] 09:57
gregf_ m: my @a = [4,4..10]; say [eq] .[0,1] #
camelia rakudo-moar 2181f7: OUTPUT«Use of uninitialized value $v 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␤Use of uninitialized value $v of type Any in string context.␤Meth…»
skrshn I guess this is easier for me: when $_[0] eq $_[1]
Ok. thakns
moritz m: $_ = [4,4..10]; say [eq] .[0,1]
camelia rakudo-moar 2181f7: OUTPUT«False␤»
moritz m: $_ = [4,flat 4..10]; say [eq] .[0,1] 09:58
camelia rakudo-moar 2181f7: OUTPUT«False␤»
09:58 cibs joined
moritz m: $_ = [flat 4, 4..10]; say [eq] .[0,1] 09:58
camelia rakudo-moar 2181f7: OUTPUT«True␤»
skrshn Ok. Updated the script. 09:59
nebuchadnezzar Is this the good way to define “$_” in a sub or method: sub test(Str $_) { when "*" { say "match"; } } ? 10:01
skrshn thanks for all your help. I am happy with this script.
timotimo yeah, that's fine
skrshn: glad to hear it :)
jnthn nebuchadnezzar: You can do that, sure 10:02
timotimo you can put all variable definitions into the signature, give them a default value, and a constraint that makes them explode if the user of your sub supplies anything :D
10:07 ufobat left 10:10 gnull` joined 10:14 jonas1 left
skrshn Q: Is "+@hyp == +@ref or die;" the best idiom or is there something comparable to "assert(+@hyp, +@ref)" ? 10:16
10:16 nadim_ left 10:17 nadim_ joined
timotimo that's fine, though a message to go with the "die" would be helpful usually 10:17
skrshn yes. I would normally have one too. 10:18
tx
timotimo np
10:21 nadim_ left
moritz skrshn: often enough you get around using such assertion by putting it as a type constraint in a routine you call 10:22
skrshn If I were to process @hyp and @ref out of the method/subroutine, how would I add this constraint? 10:24
moritz sub munge(@hyp, @ref where { @ref.elems == @hyp.elems }) { ... } 10:25
skrshn ok
CIAvash skrshn: You can probably replace the while loop with this: for 'data.txt'.IO.lines.grep(*.so) -> $id, $hyp, $ref { $acc.add($hyp, $ref); }
skrshn so the where is referring to @ref correct?
nice! 10:26
10:28 jonas1 joined
skrshn what does the grep(*.so) do ? 10:30
10:30 margeas joined
moritz exclude values that are False in boolean context 10:31
skrshn updated the script
moritz so, empty lines
skrshn oh.. I knew that!
I hadn't seen *.so getting used like this before 10:32
I am still wrapping my head around how *.so works. I saw in some talk that it effectively is like a method or something 10:33
moritz *.so is basically the same as { $_.so } 10:34
so a code block that calls the "so" method on the argument you pass to it
skrshn moritz: tx
jnthn .grep(* ne '') may be more easy to understand than *.so 10:36
*easier
moritz or .grep(*.elems)
erm, *.chars 10:37
or *.chars > 0
literal .grep(?*) 10:46
moritz m: say ?* 10:47
camelia rakudo-moar 2181f7: OUTPUT«{ ... }␤»
literal m: say <foo 0 baz>.grep(?*)
camelia rakudo-moar 2181f7: OUTPUT«(foo baz)␤»
literal m: say <foo 0 baz>.grep(!*)
camelia rakudo-moar 2181f7: OUTPUT«(0)␤»
10:51 lambd0x joined
lambd0x Hello everyone! 10:51
timotimo greetings lambd0x
10:52 woolfy left
lambd0x timotimo: \o/. U don't sleep man haha 10:52
timotimo but i do
some would say i sleep too much :)
10:52 woolfy joined, woolfy left
lambd0x timotimo: 'nd I would say you don't, As much as I'm in #perl6 you're always there :P 10:53
timotimo i blame time zones
lambd0x timotimo: You're from Portugal. right? 10:54
timotimo nope, germany
lambd0x hm...
10:54 woolfy joined
lambd0x Then I agree with ya. 10:54
10:54 woolfy left 10:55 woolfy joined, woolfy left 10:58 pierre_ joined, skrshn left
lambd0x why seems that () have more meaning than {} for the ternary op.? 10:58
timotimo huh? 11:00
11:00 mephinet_ joined
lambd0x m: my a$ = 1, my $b = 2; $max != 0 ?? ($a += 1) !! ($b -= b); 11:00
camelia rakudo-moar 2181f7: OUTPUT«5===SORRY!5===␤Type 'a' is not declared␤at <tmp>:1␤------> 3my a7⏏5$ = 1, my $b = 2; $max != 0 ?? ($a += 1)␤Malformed my␤at <tmp>:1␤------> 3my7⏏5 a$ = 1, my $b = 2; $max != 0 ?? ($a += ␤␤»
lambd0x m: my a$ = 1, my $b = 2; $max != 0 ?? ($a += 1) !! ($b -= 1);
camelia rakudo-moar 2181f7: OUTPUT«5===SORRY!5===␤Type 'a' is not declared␤at <tmp>:1␤------> 3my a7⏏5$ = 1, my $b = 2; $max != 0 ?? ($a += 1)␤Malformed my␤at <tmp>:1␤------> 3my7⏏5 a$ = 1, my $b = 2; $max != 0 ?? ($a += ␤␤»
lambd0x m: my a$ = 1, my $b = 2; $a != 0 ?? ($a += 1) !! ($b -= 1);
camelia rakudo-moar 2181f7: OUTPUT«5===SORRY!5===␤Type 'a' is not declared␤at <tmp>:1␤------> 3my a7⏏5$ = 1, my $b = 2; $a != 0 ?? ($a += 1) !␤Malformed my␤at <tmp>:1␤------> 3my7⏏5 a$ = 1, my $b = 2; $a != 0 ?? ($a += 1)␤␤»
TimToady a$ ?
lambd0x hahah
TimToady BASIC
lambd0x m: my $a = 1, my $b = 2; $a != 0 ?? ($a += 1) !! ($b -= 1); 11:01
camelia ( no output )
lambd0x any way...
In my code I just used a ternary ope. with {} for each condition action and it rathered to have () 11:02
TimToady well, a bare closure inside an expression doesn't run
lambd0x in fact, it didn't work in other way.
TimToady m: my $x = { say "doesn't run" }
camelia ( no output )
11:03 mephinet_ left
lambd0x TimToady: timotimo's nick gets preference over your nick for the first three chars hahah 11:03
TimToady: I just asked about it because usually if there's a conditional and for that condition you want more operations to be performed you would use {} 11:05
It's nice to know though.
TimToady nap & 11:06
lambd0x ? 11:07
timotimo he says he's going to take a nap 11:08
11:08 pierre_ left
lambd0x timotimo: I'm using IRC for 2 months now, so I'm still learning a ton of abrvs. :P 11:09
thanks 11:10
timotimo no problem; the "something &" thing comes from unix shells, though
where you'd start something with an & at the end to "run it in the background"
lambd0x timotimo: nice 11:12
multi declaration in front of a sub means it can have more than one scope depending whether its signature is matched for one or the other, if appliable? 11:15
I was reading about optional args for subs and was thinking if apart from recursive subs, since there's the option to make optional a parameter and therefore matching different signs., the first would have other uses ... 11:17
lizmat_ m: multi a(Int $a) { say "Int" }; multi a(Str $a) { say "Str" }; a 42; a "foo" # lambd0x: does this answer your question? 11:20
camelia rakudo-moar 2181f7: OUTPUT«Int␤Str␤»
11:20 lizmat_ is now known as lizmat
lizmat $ RAKUDO_ERRORS_AS_JSON=1 6 'die "foo"' 11:21
{
"X::AdHoc" : {
"payload" : "foo"
}
}
El_Che: ^^^ is that what you wanted in errors as JSON ?
lambd0x lizmat: ye, thanks. 11:22
11:34 Actualeyes left 11:37 Actualeyes joined 11:39 mcmillhj joined
dalek c: b9e4c2a | (Tom Browder)++ | / (3 files):
Changes to files:

doc/Type/IO/Handle.pod6
   + add brief description of 'printf'; reference
   format details in 'doc/Type/Str.pod6'
doc/Type/Str.pod6
   + move 'printf' format details to 'sprintf'
   + remove 'printf' function and move it to 'doc/Type/IO/Handle.pod6'
xt/trailing-whitespace.t
   + add line number for the affected file
11:41
c: 44d7b22 | (Tom Browder)++ | / (3 files):
Merge pull request #855 from tbrowder/sprintf

Changes to files:
11:42 pmurias joined 11:43 mcmillhj left 11:45 Actualeyes left 11:52 mcmillhj joined 11:55 smls left 11:56 cyphase left 11:57 mcmillhj left 11:59 nadim_ joined 12:00 Roamer` joined 12:01 prammer joined, cyphase joined
Roamer` hmm, is there some gather/take-related weirdness when you map() within a map() ? 12:02
like this... a single-level map:
m: use v6.c; my %data = :a(1), :b(2); my $res = gather { %data.keys.map(-> $k { take [$k, %data{$k}] }) }; dd $res;
camelia rakudo-moar 2181f7: OUTPUT«Seq $res = (["a", 1], ["b", 2]).Seq␤»
Roamer` two levels, but only one map: 12:03
m: use v6.c; my %data = :foo({:a(1), :b(2)}); my $res = gather { for %data.keys -> $section { %data{$section}.keys.map(-> $k { take [$section, $k, %data{$section}{$k}] }) } }; dd $res;
camelia rakudo-moar 2181f7: OUTPUT«Seq $res = (["foo", "a", 1], ["foo", "b", 2]).Seq␤»
Roamer` and now for a two-level map... why does this not work?
m: use v6.c; my %data = :foo({:a(1), :b(2)}); my $res = gather { %data.keys.map(-> $section { %data{$section}.keys.map(-> $k { take [$section, $k, %data{$section}{$k}] }) }) }; dd $res;
camelia rakudo-moar 2181f7: OUTPUT«Seq $res = ().Seq␤»
12:04 prammer left
jnthn The outer map is producing sequence of sequences, and sinking that won't magically evaluate the inner sequences 12:05
Roamer` (and yes, I know I can do this with just for and pointy blocks, and I can almost do it just with a nested map, but I wonder why it doesn't work this way)
12:05 grey-panther joined
Roamer` jnthn, ahhh, right. That makes sense. 12:05
jnthn Whle a for at statement list level would enforce the sinking
*while
A well-placed eager should do it 12:06
Roamer` right, an eager before the inner map() does it 12:07
El_Che lizmat: wow 12:10
lizmat: if you have the info -> error: or warning: (or the like), line nr, column nr
the more the better
lizmat: I was looking how to use that info in a intellij plugin
lizmat: so far, hello world from the docs :) 12:11
lizmat: but the vim plugin could have 100% coverage like that indeed
12:12 prammer joined
El_Che lizmat: "if you have the info -> error: or warning: (or the like), line nr, column nr (or place to match regex) 12:12
lizmat looking at that, and also make it more general like Zoffix wanted
12:14 zhmylove joined 12:24 mcmillhj joined
nine will be headed for indigorestaurant.ro/ soon 12:25
12:28 mcmillhj left 12:34 g4 left
lizmat El_Che: it's in now: compilation errors have the right info inside the exception object already 12:36
El_Che: for reference: github.com/rakudo/rakudo/commit/aaf7c3c
runtime errors would need to get that info from the backtrace 12:37
looking at that now
12:38 mcmillhj joined 12:39 patrickz joined, Actualeyes joined 12:40 iH2O joined
patrickz moritz: s/smother/smoother/ in line 5 in CONTRIBUTING.md 12:40
grey-panther hi all 12:41
I just submitted a PR with some basic documentation about Perl 6 for exercism.io: github.com/exercism/xperl6/pull/37 - happy to get any feedback since I'm a Perl 6 n00b.
exercism.io/ is a "learn programming by solving small problems" site with the added twist that you can see other's solution and give/get feedback about your solution (besides just "it passes all the tests").
moritz patrickz: thanks, fixing
12:41 zakharyas joined 12:43 mcmillhj left 12:44 zakharyas1 joined 12:46 zakharyas left 12:47 iH2O left 12:55 zakharyas1 left 12:57 nadim_ left, AlexDaniel joined 12:58 pierre_ joined 13:02 ptolemarch joined, gabiruh left 13:04 Khisanth joined 13:07 pi____ joined 13:11 cdg joined 13:12 n1lp7r joined
pi____ philosophical question: I'm past being a beginner programmer, and am looking for a language to really learn well. I don't program professionally, but I have a job in tech and would like to make my own tools. Should i work on mastering python for now, or should I learn Perl6 right away? 13:13
El_Che you should learn both 13:14
and go
and perl 5
and java
and ruby
moritz and Haskell, and Rust, and Javascript
AlexDaniel hold on hold on…
El_Che you'll meet them all
moritz :-)
pi____: IMHO Perl 6 is the better language, but python has more documentation and books available
gregf_ and scala!
moritz and Brainfuck! 13:15
pi____ I have spent at least a few weeks on each, looking for the "perfect language"
well, not brainfuck, lol
gregf_ ooh.. and PHP!
El_Che pi____: there is often a practical reason to learn a language. An specific project or product. I learnt (some) Ruby specially for extending Puppet
moritz pi____: there is perfect language, just good enough languages for some purposes
El_Che (and Java pre-Moose because I disliked perl5 OO)
moritz *no perfect language
not even "perfect"
pi____ what do you actually enjoy coding in though? 13:16
El_Che pi____: perl6 is a good addition as you can see it evolve and grow. It's very fresh
AlexDaniel pi____: I'd say start with perl 6, it will broaden your mind. But most likely you will have to use other tools sometimes (e.g. for performance reasons)
pi____ I was heavy into haskell for a while, but hit a wall when the entire language turned upside down dealing with state 13:17
actually .. i guess i hit a wall on every language i tried for .. reasons. 13:18
AlexDaniel pi____: it is a bit sad to say this, but the only language I actually enjoy now is perl 6. … sure, I enjoyed java and python and other stuff years ago, but once I really started using perl 6, other languages feel like they don't play well together with my brain… 13:19
moritz pi____: I guess then my main advise is to stick with a language you've already tried, and get past the hit-the-wall point 13:20
pi____ haha that's good advice, except every issue i had with every language I've tried is fixed in perl6 lol 13:21
El_Che pi____: then there you have your answer
pi____: but, beware 13:22
pi____ ...
13:22 Sgeo_ left
El_Che pi____: there will be dragons :) 13:22
AlexDaniel El_Che: evolve? Well, I don't see it much these days (after Christmas). I mean, sure, lots of bug fixes and performance improvements, but that's maintanence, not evolution. Am I wrong?
El_Che (although I must say some of us are closer to dinosaurs than dragons :) )
13:22 rkazak joined
El_Che AlexDaniel: ecosystem 13:23
pi____ is there a project I can work on? anyone looking for some extra help, such as it is?
El_Che brb
coffee
let's make that a coke
too damn hot
moritz pi____: what kind of projects are you looking for?
AlexDaniel pi____: you can help with Rakudo ;) 13:24
moritz pi____: there are lots of modules that could use contributors, the compiler needs more hands, docs need to be written
AlexDaniel pi____: it is mainly written in perl 6, so…
pi____ anything really, a game, web app, porting something from perl5 to 6...
AlexDaniel pi____: perhaps take a look at this: github.com/perl6/perl6-most-wanted...ost-wanted 13:25
pi____ really i want to trade code for mentorship, if that's possible. 13:26
moritz isn't masak++ developing a web app game at the moment?
13:26 skids joined
moritz github.com/masak/nex/blob/master/README.md 13:26
13:26 canopus left
moritz pi____: if I were you, that's where I'd start sending patches. masak is very thoughtful in his feedback, and also very kind 13:27
(disclaimer: I'm biased, considering myself a friend of masak)
arnsholt Yeah, I think I got my first commitbit on a masak-repo 13:29
pi____ should I contact him first, or just jump right in?
13:30 st_iron left
moritz whatever you prefer 13:30
he certainly accepts pull-requests without prior asking for permission 13:31
arnsholt Yeah, don't feel obliged to ask first
13:31 wamba joined
arnsholt Of course, asking about things that are weird or you don't understand isn't a problem either 13:32
pi____ thanks, this is great
if I asks later which one of you inflicted me on him, I won't name names, promise 13:33
*he
arnsholt \o/
AlexDaniel pi____: but also feel free to work on your own project. If you have any questions, you can ask them here.
moritz pi____: there public logs of this channel, you know :-) 13:34
pi____ damn
13:36 canopus joined, st_iron joined 13:38 ingy^ joined, ingy^ left 13:47 leont joined
leont Can someone remind me how I could implement conditionals in a rule? 13:47
13:48 grey-panther left
timotimo "conditionals" is what way? 13:50
you can have <{ some code that returns a true or false }>
or does it have to be <?{ ... }>?
13:53 woolfy joined 13:55 st_iron left
jnthn <?{...}> or <!{...}> 13:58
timotimo right, so <{ .. }> probably uses the result of the code block as a regex to be interpolated? 14:02
14:03 MilkmanDan left
jnthn aye 14:03
14:04 MilkmanDan joined, cognominal joined
leont Yeah that could work 14:05
Though it feels like an overkill, it's really more A or B
timotimo well, then you do it like this: [ <?{ $condition }> "foo bar baz" || "bloop foop doop" ] 14:06
14:06 lizmat left
timotimo regex interpolation is sloooooooow 14:07
14:07 smls joined
smls b2gills: In codegolf.stackexchange.com/a/90617/14880 you can replace 1..$x with 1..* to save one character 14:09
14:09 woolfy left
smls Since it always stops anyway when it reaches $x 14:09
leont Ah, yeah, that looks like what I want 14:10
14:11 noreem joined
leont Also, have higher commits (:: ::: and <commit>) been invented in recent months? 14:13
TimToady nach nicht 14:16
14:23 pierre_ left 14:25 canopus left 14:27 cognominal left 14:28 prammer left 14:31 jonas1 left 14:32 canopus joined
noreem Hi guys! What tools do you use for developing Perl6 ? 14:39
tadzik vim :)
noreem No Emacs love? 14:40
Joking aside whatś your typical workflow?
Debugging, code navigation, etc. 14:41
[Coke] everyone does their own thing.
we have mac/windows/linux people, each with their own preferred tools.
mspo www.youtube.com/watch?v=9u6O0dLuqhI damian conway using vim with perl 14:42
just getting perl -c into quickfix window is a biggie 14:43
El_Che noreem: nxadm.wordpress.com/2016/08/21/vim...-6-editor/ (posted that a few days ago)
mspo: and for syntax checking nxadm.wordpress.com/2016/08/20/ple...x-checker/
noreem Thanks for the link, that looks awesome
AlexDaniel perl6-mode in emacs also works just fine 14:44
El_Che now having a look at adding language support to IntelliJ, but that will take time (too busy atm)
14:45 mcmillhj joined
noreem I tried perl6-mode, but beyond simple syntax coloring 14:45
I guess the tooling is in it's infancy 14:47
I would love to help on that, though learning perl6 by developing tooling is a bit backwards 14:48
El_Che noreem: the vim plugin I wrote 'works for me now (TM/famous last words)' and I have some PR's to integrate from syntastic upstream. When liz integrates json error output, it will be a lot more future proof (JSON datastructures instead of error parsing)
noreem: that's the thing
vim plugin: vim-script
intellij: java 14:49
not much perl6 coding there :)
noreem: I have a cool perl6 project for you too relating to tooling AND in perl6
14:49 leont left
noreem Awesome, I would love to take a look at it 14:49
El_Che a client-server autocompleter
a rest server that answer request for an api to the vim/emacs/intellij client 14:50
14:50 dogbert17 joined
El_Che eg, valloric.github.io/YouCompleteMe/ uses this for go github.com/nsf/gocode 14:51
14:51 pmurias left
El_Che we need something like that for perl6 14:51
in the howto I posted we only have fuzzy matching autocomplete, not semantic yet, but that's the way to go 14:52
noreem Something like Omnisharp for C#
El_Che indeed
however, I don't know if we have a rock solid minimal and fast http implementation 14:53
(it must be fast)
noreem I agree that's nedeed
timotimo you know that autocomplete stuff (client-server like) is also part of Jupyter?
El_Che I had a look at the go code and it seems pretty ij
ok
noreem Maybe it's fast enough :) 14:54
timotimo: Sorry? 14:55
timotimo jupyter is something else perl6 could get that - in my opinion - would be more beneficial than an autocompleter thingie
but it's quite a bit different
and the code for that is actually written in perl6
noreem Oh ok
timotimo i'll ... show myself out :)
noreem Jupyter integration would be nice 14:56
I don't know exactly how the protocol works
I think it used something like ZeroMQ for messaging 14:57
timotimo github.com/timo/iperl6kernel - we have a tiny bit of a head start
14:57 rkazak left
El_Che inokenty: I agree it's important, but isn't it more urgent to get basic tooling for perl6 programmers in the hope they will be then motivated to work on things like Jupyter? 14:58
14:58 pmurias joined
mspo what's jupyter? 14:59
El_Che (that question could be an aswer to my question :) )
noreem mspo: jupyter.org/ The "new" IPython notebook 15:00
El_Che: I agree that basic functionality at the moment is nedeed more, at least I need it :) 15:01
timotimo i didn't mean to tell you what to do, i used the totally wrong tone :S 15:03
El_Che timotimo: I don't think you suggestion was badly received at all (at least I didn't read it in negative terms) 15:04
timotimo it didn't come out the way i had hoped, that's bad enough for me :)
15:06 MilkmanDan left 15:08 mcmillhj left
noreem Guys, I have to get home. Later! 15:11
El_Che noreem: see you
15:11 noreem left 15:13 MilkmanDan joined
mspo that jupyter thing looks like a fairly specific/small audience 15:17
timotimo huh, really? 15:20
mspo at least I have no use case for it :) 15:21
timotimo ipython.org/ipython-doc/3/interact...nsole.html - you also get this for free
mspo and as I represent everyone I know who would use perl6...
15:22 Dunearhp joined
mspo doesn't julia do all of that stuff? 15:22
15:22 Dunearhp left
timotimo yeah 15:23
15:23 mcmillhj joined
mspo so this is the web app/choose your own language julia 15:26
probably bigger in the academic space
timotimo huh? 15:27
no, julia uses jupyter
at least in part
mspo oh okay
timotimo well, "julia uses" doesn't make much sense; you can run julia code completely without a REPL of course
grondilu can't help but thinking "beer" when he reads this word
15:28 DmZDsfZoQv joined
[Coke] which one? 15:28
grondilu (which beer? Jupyler of course) 15:29
15:29 lambd0x left
[Coke] which word. but your answer handled that too, thanks. :) 15:33
15:34 pi____ left
moritz Juniper! 15:35
15:35 domidumont left 15:37 skids left, skids joined 15:38 bob777 left
grondilu (I got the spelling wrong, though. The brand name is "Jupiler", not "Jupyler". 15:38
)
15:38 cinch joined 15:40 lambd0x joined 15:41 cinch left 15:42 lostinfog joined 15:43 dsds joined 15:44 ssm joined 15:48 dsds left 15:50 MilkmanDan left 15:52 nadim_ joined 15:53 MilkmanDan joined 15:57 mcmillhj left 16:04 ufobat joined, nadim joined 16:05 nadim left, nadim__ joined 16:08 nadim_ left, nadim__ left 16:10 domidumont joined 16:11 nadim joined 16:20 pi____ joined, nadim left, margeas is now known as mvorg, heatsink joined 16:27 raiph left
dalek c: 5da5f71 | (Tom Browder)++ | doc/Language/variables.pod6:
add missing '>'
16:28
c: 74abc4a | (Tom Browder)++ | doc/Type/Str.pod6:
add format details lifted (with some mods) from perl.org docs
c: 6e413b8 | (Tom Browder)++ | doc/ (2 files):
Merge pull request #856 from tbrowder/sprintf-format

Add more details of function sprintf formatting
tailgate If I have sub zip_longest($fillvalue=Nil, **@iterables), can I switch the order of the arguments? What's the difference between **@iterables and *@iterables? 16:29
16:30 skrshn joined
[Coke] unless your args are declared with :, they are positional and the order matters 16:31
moritz tailgate: you acn't have arguments after a slurpy
tailgate: and the difference is that * flattens, and ** preserves structure
16:32 heatsink left
moritz m: sub f(*@a) { dd @a }; sub g(**@a) { dd @a }; f 1, (2, 3); g 1, (2, 3); 16:32
camelia rakudo-moar 998e2b: OUTPUT«[1, 2, 3]␤[1, (2, 3)]␤»
moritz tailgate: but it looks like you should make $fillvalue a named parameter 16:33
tailgate what's the syntax for that?
16:34 zengargoyle joined
moritz sub zip_longest(**@iterables, :$fillvalue = None) { ... } 16:34
tailgate thanks 16:35
moritz though named params are optional by default, so you don't need a default value
and s/None/Nil/ of course # me too pythonic :-)
tailgate And you call it with zip_longest, ((,)...) :$fillvalue="0"); 16:36
16:36 zacts_pi joined
dalek c: cf9680d | (Tom Browder)++ | doc/Type/IO/Handle.pod6:
use correct funcs and methods
16:36
c: e16e241 | (Tom Browder)++ | doc/Type/IO/Handle.pod6:
Merge pull request #857 from tbrowder/io-fix

use correct funcs and methods
tailgate rather zip_longest((,)...), :$fillvalue="0");
moritz no, with :fillvalue(0) or fillvalue => 0 16:37
16:37 zacts_pi left, patrickz left
tailgate ah 16:37
moritz though I'd call it fill or fillwith
16:37 zacts_pi joined
tailgate is fillvalue in the namespace already? 16:37
moritz no, but "value" is generally not useful as a parameter name 16:38
tailgate I'm imitating the python itertools library
moritz it adds zero information
don't copy their crappy naming :-)
16:40 skrshn left 16:41 khw joined 16:43 rkazak joined 16:44 zacts_pi left 16:46 zacts joined 16:47 brrt joined 16:55 perlawhirl joined 16:56 mcmillhj joined 16:58 perlawhirl left 17:00 gregf_ joined 17:05 rkazak left 17:07 hobbs joined 17:08 dataangel joined
dataangel m: sub test() { say "Hello world!"; }; say &test.perl; 17:09
camelia rakudo-moar 998e2b: OUTPUT«sub test () { #`(Sub|63872768) ... }␤»
dataangel Damn I was hoping that it would give the source code
17:10 mcmillhj left 17:12 zacts left
[Coke] I think that would be a nice to have. I don't think anyone has said "it's impossible" yet 17:13
17:14 firstdayonthejob joined
[Coke] I don't think there's an RT for it yet, though. (there is a similar one for Regex) 17:14
dataangel [Coke]: what I really want is the ability to check between runs if the code of the function is changed, which I could do with that feature, except I also want to know if any functions that that function calls have changed, which would be harder even with this feature... 17:15
[Coke]: I assume I would have to parse the result from .perl, find all the function calls, and recursively repeat the process. Since Perl six parses itself I assume it's theoretically possible I don't know how easy it is... 17:16
[Coke] while it would be nice to know that... why do you need to know that? 17:17
dataangel Making a build system where I want to rebuild if the recipe to build a target has changed. I want finer granularity than just detecting if the file is changed 17:18
[Coke] m: sub barf() {...}; sub barf() {...;}
camelia ( no output )
dataangel ? 17:19
[Coke] m: sub barf() {3}; barf; sub barf() {4}; barf;
camelia rakudo-moar 998e2b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Redeclaration of routine barf␤at <tmp>:1␤------> 3sub barf() {3}; barf; sub barf() {4}7⏏5; barf;␤ expecting any of:␤ horizontal whitespace␤ statement end␤ statement …»
[Coke] ^^
you can't swap out a sub, at least. 17:20
dataangel [Coke]: this would be between runs, you run your build script using my library, then change your script source code, then run again
As it is I can workaround it by requiring users to put each recipe in a separate source file, but that's not quite as neat ;) 17:21
17:23 cognominal joined 17:24 domidumont1 joined 17:25 Deep_Thought joined
[Coke] if it's between runs, how do you compare against the old version? This sounds like a job for qx/diff/, maybe. 17:25
17:26 mcmillhj joined
[Coke] er, I assume you mean not between but "during a later run, compare against the old". if it's really between, just diff? 17:26
(or keep track of sha1 versions of the source, etc.)
dataangel [Coke]: I'd save a hash to the side each run
Beat me to it ;)
17:28 domidumont left 17:29 espadrine left
TheLemonMan m: say Str(Any) ~~ Str 17:30
camelia rakudo-moar 998e2b: OUTPUT«False␤»
TheLemonMan that should be True, no ?
hoelzro m: say Str(Any) 17:31
camelia rakudo-moar 998e2b: OUTPUT«(Str(Any))␤»
hoelzro hmm 17:32
[Coke] m: say ~Str(Any)
camelia rakudo-moar 998e2b: OUTPUT«Use of uninitialized value of type Str(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␤␤»
tony-o m: 1..5000..4; 17:34
camelia rakudo-moar 998e2b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Operators '..' and '..' are non-associative and require parentheses␤at <tmp>:1␤------> 031..5000.7⏏5.4;␤»
tony-o m: (1..5000)..4;
camelia rakudo-moar 998e2b: OUTPUT«WARNINGS for <tmp>:␤Useless use of ".." in expression "(1..5000)..4" in sink context (line 1)␤Range objects are not valid endpoints for Ranges␤ in block <unit> at <tmp> line 1␤␤»
dalek osystem: 76bc571 | (Armand Halbert)++ | META.list:
Added python::itertools to ecosystem

See github.com/ahalbert/perl6-itertools
17:35
osystem: bec2a3e | (Zoffix Znet)++ | META.list:
Merge pull request #240 from ahalbert/master

Added python::itertools to ecosystem
tony-o m: m: 17:36
camelia rakudo-moar 998e2b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Colons may not be used to delimit quoting constructs␤at <tmp>:1␤------> 3m:7⏏5<EOL>␤ expecting any of:␤ colon pair (restricted)␤»
tony-o m: <m:>;
camelia rakudo-moar 998e2b: OUTPUT«WARNINGS for <tmp>:␤Useless use of constant value m: in sink context (line 1)␤»
tony-o m: <m::>;
camelia rakudo-moar 998e2b: OUTPUT«WARNINGS for <tmp>:␤Useless use of constant value m:: in sink context (line 1)␤»
ugexe m: 1 17:37
camelia rakudo-moar 998e2b: OUTPUT«WARNINGS for <tmp>:␤Useless use of constant integer 1 in sink context (line 1)␤»
dalek c: 08c1b36 | (Zoffix Znet)++ | doc/Language/concurrency.pod6:
Clarify that whenever uses .act, not .tap

  ...and so its block is executed just one at a time.
  smls++ for pointing that out.
17:39
17:40 wamba left
tony-o m: return 1; 17:40
camelia rakudo-moar 998e2b: OUTPUT«Attempt to return outside of any Routine␤ in block <unit> at <tmp> line 1␤␤»
tony-o m: sub $barf {}; $barf;
camelia rakudo-moar 998e2b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3sub7⏏5 $barf {}; $barf;␤ expecting any of:␤ new name to be defined␤» 17:41
tony-o m: sub \$barf {}; $barf;
camelia rakudo-moar 998e2b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3sub7⏏5 \$barf {}; $barf;␤ expecting any of:␤ new name to be defined␤»
17:41 pi____ left 17:42 telex left 17:44 brrt left, brrt joined, telex joined 17:46 cognominal left
TheLemonMan m: say Str(Any) ~~ Str(Int); say Any ~~ Int; 17:49
camelia rakudo-moar 998e2b: OUTPUT«False␤False␤»
TheLemonMan m: say Int ~~ Any;
camelia rakudo-moar 998e2b: OUTPUT«True␤»
TheLemonMan ~~ isn't commutative ? 17:50
timotimo definitely not
TheLemonMan huh, TIL 17:51
jnthn iirc, the earliest designs of ~~ were, and it didn't work out so well
timotimo m: say 1..10 ~~ 5; say 5 ~~ 1..10
camelia rakudo-moar 998e2b: OUTPUT«False␤True␤»
timotimo m: say "Hello" ~~ Str; say Str ~~ "Hello" 17:52
camelia rakudo-moar 998e2b: OUTPUT«True␤False␤»
brrt what's the mental model for ~~ anyway 17:54
'is kind of like'
or 'contains'
17:54 espadrine joined
jnthn "can be considered like" perhaps 17:55
ugexe ACCEPTS
jnthn Right, it compiles into rhs.ACCEPTS(lhs)
So it's the rhs that does the considering
Or sets the rules
AlexDaniel "just compare it please” ? :)
jnthn So anything ~~ 3 will always try to do numeric comparison
timotimo "does it fit?" 17:57
17:57 mvorg left, firstdayonthejob left
AlexDaniel “I'm Feeling Lucky” 17:57
18:00 n1lp7r left
brrt lol 18:00
but, seriously 18:01
i'm kind of having the feeling that it is in there because "smart matching is cool"
or that's the fear at least
smls m: multi f ($a) {}; say &f.count
camelia rakudo-moar 998e2b: OUTPUT«Inf␤»
smls ^^ Why does a multi with one parameter think its parameter count is Inf?
Prints one if I use sub instead of multi. 18:02
s/one/1/
brrt hmmm maybe because instead of the multi a disptaching prototype is installed, which is what you get if you take a reference to &f
AlexDaniel smls: what should it say then?
I agree that Inf is weird, but I wonder what would be the right answer 18:03
timotimo yup, you'd have to give it a prototype to influence that number
brrt m: multi f($a) { 8437; }; say &f.WHAT;
camelia rakudo-moar 998e2b: OUTPUT«(Sub)␤»
18:03 canopus left
timotimo because after you say that count, another multi candidate could be installed and the number could become wrong 18:03
smls timotimo: But at runtime it should know what candidates there are
brrt m: proto f($a) {....}; multi f($a) { 42; }; say f(10); 18:04
camelia rakudo-moar 998e2b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed postfix call␤at <tmp>:1␤------> 3proto f($a) {....7⏏5}; multi f($a) { 42; }; say f(10);␤»
brrt and special case a one-variable, or find the largest number?
smls arity=smallest, count=largest, no? 18:05
timotimo smls: are you sure? :)
smls eh, other way around
or not :) 18:06
timotimo hm, well
candidates are also lexically scoped
so yeah, you're right indeed
but you're asking the proto about this information and the proto doesn't know what lexical scope you're in
... perhaps?
smls In any case, I tried to have 2 multi candidates that both take one argument (for argument destructuring), and .count==Inf means I can't pass it as the transform callback to .sort 18:07
brrt wait, timo, wait
m: proto foo(|) {....};
camelia rakudo-moar 998e2b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed postfix call␤at <tmp>:1␤------> 3proto foo(|) {....7⏏5};␤»
brrt alright, how does one declare the default proto
ugexe {*} 18:08
brrt m: proto foo($a) {*}; multi foo($a) { $a * 2; }; say foo(4); say &foo.count; 18:09
camelia rakudo-moar 998e2b: OUTPUT«8␤1␤»
brrt thereyougo
18:09 canopus joined
smls ok 18:09
brrt m: proto foo($a) {*}; { multi foo($a) { $a * 2; }; say foo(5); }; multi foo($a) { $a + 7; }; say foo(5); 18:10
camelia rakudo-moar 998e2b: OUTPUT«10␤12␤»
brrt ow
that has got to be painful for performance
18:12 brrt left
timotimo nah, it's just a compile-time known thing, i believe 18:13
18:16 raoulvdberge joined 18:18 Actualeyes left 18:19 Deep_Thought left 18:21 Actualeyes joined
[Coke] m: my token infix:sym<--\>> { "$^a -> $^b\n" }; [~] 'a' X[-->] <b c> # RT #126238 18:28
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=126238
camelia rakudo-moar 998e2b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Prefix -- requires an argument, but no valid term found␤at <tmp>:1␤------> 3m<--\>> { "$^a -> $^b\n" }; [~] 'a' X[--7⏏5>] <b c> # RT #126238␤ expecting any of:␤ prefix␤»
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=126238
[Coke] synopsebot6: maybe you should not emit the same link within 10s of last emitting it. 18:29
m: sub infix:sym<--\>> { "$^a -> $^b\n" }; [~] 'a' X[-->] <b c> # RT #126238 18:30
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=126238
camelia rakudo-moar 998e2b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Prefix -- requires an argument, but no valid term found␤at <tmp>:1␤------> 3m<--\>> { "$^a -> $^b\n" }; [~] 'a' X[--7⏏5>] <b c> # RT #126238␤ expecting any of:␤ prefix␤»
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=126238
18:31 cdg left
[Coke] m: callsframe 18:34
camelia rakudo-moar 998e2b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤ callsframe used at line 1. Did you mean 'callframe', 'callsame'?␤␤»
[Coke] m: callframe
camelia ( no output )
[Coke] m: say callframe.file; say $?FILE
camelia rakudo-moar 998e2b: OUTPUT«<tmp>␤<tmp>␤»
18:34 CIAvash left 18:39 domidumont joined 18:43 domidumont1 left
masak oh, nice discussion with pi____ earlier today 18:48
hi, #perl6
[Coke] hio
18:51 setty1 joined 18:56 _slade_ joined 18:59 juniofreitas joined
[Coke] m: constant B::b = 666; # RT 128610 18:59
camelia rakudo-moar 998e2b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing initializer on constant declaration␤at <tmp>:1␤------> 3constant B:7⏏5:b = 666; # RT 128610␤»
19:01 firstdayonthejob joined 19:03 acrussell joined 19:05 zacts joined 19:08 gnull` left
ChoHag I ran bootstrap.pl in panda and it's put nothing in the directory it told me to add to PATH. 19:09
I have version 3.30 of TAP::Harness on perl 5.20.1. 19:10
ugexe is there anything in $PATH/../resources ? 19:11
ChoHag Nope.
I do have a .panda.work and moar.core in my panda source directory.
ugexe what about $PATH/../dist
ChoHag dist's empty too. 19:12
ugexe hmm, its either installing somewhere else or not at all
ChoHag bootstrap.pl exited with code 0 after Installing File::Find then the PATH.
The core suggests maybe it didn't install but something swallowed the error.
The core dump along with the empty directories. 19:13
ugexe you could try installing something with zef, and if that fails too it can be assumed its rakudo 19:14
19:14 Possum joined
ChoHag I don't have a zef. 19:15
ugexe `rakudobrew build zef` or `git clone github.com/ugexe/zef && cd zef && perl6 -Ilib bin/zef --debug install .`
19:17 cpage_ left 19:21 noreem joined 19:26 noreem left, zacts left, noreem joined 19:27 RabidGravy left, darutoko left 19:30 domidumont left 19:31 zacts joined 19:35 RabidGravy joined 19:40 juniofreitas left
dalek osystem/MARTIMM-patch-1: 28da1d5 | (Marcel Timmerman)++ | META.list:
Authentication methods using SCRAM

Partly implemented (client side) Salted Challenge Response Authentication Mechanism
   (SCRAM) according to rfc5802.
19:42
osystem: 28da1d5 | (Marcel Timmerman)++ | META.list:
Authentication methods using SCRAM

Partly implemented (client side) Salted Challenge Response Authentication Mechanism
   (SCRAM) according to rfc5802.
19:46
osystem: 4efb5e1 | Altai-man++ | META.list:
Merge pull request #241 from perl6/MARTIMM-patch-1

Authentication methods using SCRAM
19:46 sjoshi joined, TheLemonMan left 19:47 zacts_pi joined, sjoshi left 19:50 zacts left, zacts_ joined, noreem left 19:52 zacts_pi left 19:53 kentnl joined, kentnl left, kentnl joined, zacts__ joined 19:55 kent\n left, zacts joined, zacts_ left 19:58 acrussell left 19:59 zacts__ left 20:04 pmurias left 20:15 Ven joined, cdg joined, bioduds joined
bioduds hey everyone 20:15
20:16 Ven left
bioduds anyone working with NoSQL in Perl6? memcached? concurrency? I'm planning on building a NoSQL system with P6 20:16
20:17 zacts left, zacts joined 20:19 MilkmanDan left 20:20 cpage_ joined 20:21 cpage__ joined 20:22 kurahaupo joined
perlpilot bioduds: I /think/ I saw someone start on a MongoDB thing, but I'm not sure. 20:23
bioduds: check modules.perl6.org 20:24
tony-o bioduds: a backend nosql ?
20:24 cpage_ left, cpage__ is now known as cpage_
bioduds yep, there is actually a MongoDB module already there :) 20:24
tony-o or writing modules to use those nosqls 20:25
20:27 rindolf left 20:30 zacts left 20:35 rindolf joined, TEttinger joined 20:36 MilkmanDan joined 20:37 ItayAlmog joined 20:41 bbkr joined, xnrand joined 20:43 cognominal joined 20:52 acrussell joined 21:00 TheLemonMan joined 21:02 skids left 21:03 nadim joined 21:06 cognominal left
bioduds what is the diff between use v6 and use v6.c ? :D tx in advance 21:10
geekosaur use v6 just catches you handing your script to perl 5 by mistake. v6.c specifies the language level (6.c being the first official release; the next one will be 6.d) 21:12
21:13 benji_ joined, benji_ is now known as benjikins 21:14 mvorg joined 21:16 mcmillhj left
[Coke] you can do both if you want both the nice p5 warning and the p6 strictures. 21:24
mst: any chance we could patch perl5 so that 'use v6.c' gave the same warning as 'use v6' ? 21:25
(I assume it would be too painful and/or break something in 5)
21:27 lizmat joined
El_Che lizmat: wow, the error thing is looking good! thx 21:28
lizmat: that will make every syntax checker out there rock solid! 21:29
[Coke] El_Che: I would consider it experimental for a bit - we might want to change the format. 21:31
El_Che [Coke]: naturally
21:35 ufobat left
El_Che [Coke]: getting it right is indeed important 21:35
lizmat The number of lines added was quite small, to my amazement :-) 21:36
El_Che lizmat being lizmat will it get at least 30% smaller :)
lizmat no, but maybe faster :-) 21:37
El_Che hehe
lizmat well, actually most of the code I made faster, definitely did not become smaller :-) 21:38
21:39 acrussell left 21:41 espadrine left
El_Che lizmat: impressive work that speeding up by the way 21:43
21:45 acrussell joined
lizmat :-) 21:45
21:46 gnull joined 21:49 acrussell left 21:50 cognominal joined
gnull Hello everyone! What is the most perl6ish way to iterate an array infinitely? I want a loop to start from the beginning of the array when it reaches the end. 21:51
21:51 Actualeyes left
gnull m: .say for [1,2,3] 21:51
camelia rakudo-moar 998e2b: OUTPUT«1␤2␤3␤»
gnull I want it to run over 1,2,3,1,2,3,1,2... 21:52
avuserow_ m: my @a = 1, 2, 3; for |@a xx * -> $i {say $i} # <-- gnull 21:54
camelia rakudo-moar 998e2b: OUTPUT«(timeout)1␤2␤3␤1␤2␤3␤1␤2␤3␤1␤2␤3␤1␤2␤3␤1␤2␤3␤1␤2␤3␤1␤2␤3␤1␤2␤3␤1␤2␤3␤1␤2␤3␤1␤2␤3␤1␤2␤3␤1␤2␤3␤1␤2␤3␤1␤2␤3␤1␤2␤3␤1␤2␤3␤1␤2␤3␤1␤2␤3␤1␤2…»
hobbs there we go. I had the xx *, but I was struggling to flatten it
21:55 ItayAlmog left
lizmat m: my @a = |(1..3) xx *; say @a[^10] # my solution :-) 21:56
camelia rakudo-moar 998e2b: OUTPUT«(1 2 3 1 2 3 1 2 3 1)␤»
lizmat good night, #prl6!
*perl6
:-)
El_Che bye liz! 21:57
avuserow_ o/
gnull lizmat: good night
22:00 woolfy joined
gnull hobbs: Hmm, what about performance of this solution? Will the perl6 free those elements of the infinite list that were already iterated? Is it legal for the compiler to do so? 22:01
hobbs I bet lizmat knows ;)
avuserow_ gnull: memory usage of that looked flat in my limited testing, so it seems to do the right thing 22:02
22:03 n1lp7r joined
gnull m: say (|[1,2,3] xx 3).WHAT 22:04
camelia rakudo-moar 998e2b: OUTPUT«(List)␤»
22:04 zacts joined 22:05 Actualeyes joined
gnull Thank you! 22:06
hobbs if it were to be a problem, this should work:
m: supply { loop { for 1, 2, 3 { emit($_) } } }.tap({ .say })
just plug in the list in place of 1, 2, 3 22:07
camelia rakudo-moar 998e2b: OUTPUT«(timeout)1␤2␤3␤1␤2␤3␤1␤2␤3␤1␤2␤3␤1␤2␤3␤1␤2␤3␤1␤2␤3␤1␤2␤3␤1␤2␤3␤1␤2␤3␤1␤2␤3␤1␤2␤3␤1␤2␤3␤1␤2␤3␤1␤2␤3␤1␤2␤3␤1␤2␤3␤1␤2␤3␤1␤2␤3␤1␤2␤3␤1␤2…»
22:08 TheLemonMan left
El_Che isn't avuserow_'s solution lazy, while liz stuffs everything in memory first? 22:09
gnull El_Che: don't think so. Infinite list is still lazy if saved to an array 22:11
hobbs yeah, infinite lists are lazy enough 22:12
22:12 Sgeo_ joined
hobbs the question was whether they have remember their past, when they don't need to :) 22:12
s/have //
22:13 cognominal left
avuserow_ lizmat's solution does seem to gradually use more memory over time though... not sure why that would be. 22:13
22:14 nadim left
gnull firstly i do: rates over the elements of the invocant list, feeding each element in turn to the code reference, and assembling the return values from these invocations in a result list. 22:16
sorry for that. wrong paste(
El_Che gnull: just tried it with 1 000 000 elements. 1ste solution keeps printing them, 2nd wait's until it fills the array
gnull m: my @a = |(1..3) xx *; for @a {say $_} 22:17
22:18 smls left
camelia rakudo-moar 998e2b: OUTPUT«(timeout)1␤2␤3␤1␤2␤3␤1␤2␤3␤1␤2␤3␤1␤2␤3␤1␤2␤3␤1␤2␤3␤1␤2␤3␤1␤2␤3␤1␤2␤3␤1␤2␤3␤1␤2␤3␤1␤2␤3␤1␤2␤3␤1␤2␤3␤1␤2␤3␤1␤2␤3␤1␤2␤3␤1␤2␤3␤1␤2␤3␤1␤2…» 22:18
22:20 zacts left 22:22 firstdayonthejob left
gnull If I'm not mistaken the documentation states that lazy list evaluates each of its elements only once and stores it. And it isn't allowed to generate elements sequentialy like Seq, Supply or some kind of iterator, is it? 22:22
so in my last example the compiler can't free those elements while iterating because it isn't sure that I will not use the @a after for 22:24
those elements == already iterated elements
El_Che I see 22:25
hobbs I mean, it can be sure that you won't use the @a after for if it's clever enough
but that doesn't mean that it is :)
gnull Anyway, we could make an example where we explicitly use @a after the for loop. In this case it can't be sure 22:27
22:27 skids joined
gnull It is ok for the last example to consume memory infinitely 22:28
22:28 RabidGravy left
hobbs agreed 22:29
22:29 lostinfog left 22:31 Sgeo_ left
gnull It seems strange that avuserow_'s solution doesn't do the same. 22:31
m: say (|@a xx *).WHAT 22:32
camelia rakudo-moar 998e2b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '@a' is not declared␤at <tmp>:1␤------> 3say (|7⏏5@a xx *).WHAT␤»
gnull m: @a = [1,2,3]; say (|@a xx *).WHAT
camelia rakudo-moar 998e2b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '@a' is not declared␤at <tmp>:1␤------> 3<BOL>7⏏5@a = [1,2,3]; say (|@a xx *).WHAT␤»
gnull m: my @a = [1,2,3]; say (|@a xx *).WHAT
camelia rakudo-moar 998e2b: OUTPUT«(Seq)␤»
gnull OK, got it)
it is Seq 22:33
so it generates its elements one by one without storing them
benjikins does anyone have any idea about how to make a pseudo terminal 22:34
gnull m: my @a = |(1..3) xx *; say @a.WHAT
camelia rakudo-moar 998e2b: OUTPUT«(Array)␤»
benjikins so that I can record a terminal session
22:36 Sgeo joined
gnull benjikins: try the utility called `script`. it saves all the communications between user and terminal to a file 22:37
22:37 firstdayonthejob joined
gnull m: my $a = |(1..3) xx *; say $a.WHAT 22:37
camelia rakudo-moar 998e2b: OUTPUT«(Seq)␤»
22:37 Sgeo left 22:38 Sgeo joined
gnull benjikins: no idea how to easily do this in perl6 22:38
benjikins I've seen where things like asciinema uses weird pseudoterminal stuff 22:39
I just have no idea about how to do it
I mean a recording that you can replay and actually see the time between commands 22:41
gnull At lower level there are syscalls provided to you by an operating system. These allow you to create your own pseudoterminals and interact with ones created by others. 22:42
22:43 rindolf left 22:44 zengargoyle left 22:46 zengargoyle joined
gnull Fox example you could create a new pty and spawn a shell for user in it. At the same time being connected to the original pty that you were started in. Then you can receive user input in pty that you've created and pass it unchanged to the original pty. In the same way pass too user the output that you get from your original pty. 22:47
22:47 ptolemarch left
benjikins any ideas about how I would accomplish this in perl6 though? 22:49
gnull rachid.koucha.free.fr/tech_corner/pty_pdip.html <-- this tutorial may be helpful to understand how pty emulators can be implemented in C 22:52
I haven't seen any perl6 modules doing that
You can call C functions from perl6 using NativeCall module 22:54
benjikins alright, thanks a bunch
I'll look at this
22:57 kurahaupo left
gnull Good bye everyone. 23:00
benjikins bye 23:02
mst [Coke]: honestly, I see no reason why not off the top of my head 23:03
[Coke]: we should chase this up and see if it's because nobody ever asked ('we' meaning 'please harass me to help with this')
timotimo gnull: i'm not sure if somebody already explained it, but the Seq type we have (but haven't had for terribly long now) is the right thing for making sure elements don't stick around and clog up memory. your |(1, 2, 3) xx * should be fine. 23:05
23:06 rkazak joined
timotimo ah, looks like somebody did actually explain that 23:06
23:16 zengargoyle left 23:18 zengargoyle joined 23:19 aindilis left, aindilis joined 23:21 setty1 left 23:28 TimToady joined 23:35 mvorg left
tbrowder [Coke]: I have been checking--I see no failures on my side. 23:40
23:42 djbkd joined 23:44 n1lp7r left 23:53 MilkmanDan left