»ö« 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:05 pmurias left 00:19 Guest24175 left 00:23 wamba left, skids joined 00:32 evalable6 joined, coverable6 joined, bloatable6 joined, greppable6 joined, committable6 joined, ChanServ sets mode: +v evalable6, ChanServ sets mode: +v coverable6, ChanServ sets mode: +v bloatable6, ChanServ sets mode: +v greppable6, ChanServ sets mode: +v committable6, unicodable6 joined, ChanServ sets mode: +v unicodable6, bisectable6 joined, ChanServ sets mode: +v bisectable6, quotable6 joined, ChanServ sets mode: +v quotable6, benchable6 joined, ChanServ sets mode: +v benchable6, statisfiable6 joined, ChanServ sets mode: +v statisfiable6 00:35 AlexDaniel left 00:47 Cabanossi left 00:48 stan joined, AlexDaniel joined 00:49 stan is now known as Guest41107 00:50 Cabanossi joined, Guest41107 left, johnybravo joined, johnybravo left 00:56 gdonald left 01:09 gdonald joined 01:18 Cabanossi left 01:20 Cabanossi joined 01:29 cpage_ left 01:33 cpage_ joined 01:39 reino4477 joined
reino4477 how can I use generics? I've not found anything in the doc-ion. 01:39
01:40 TimToady left 01:42 TimToady joined, MasterDuke joined 01:44 reino44771 joined 01:45 reino4477 left, reino44771 left, reino44771 joined 01:46 ilbot3 left
timotimo it looks like this: 01:47
m: role GenericRole[::Type, $value] { has Type $.foo; method do-the-thing { say $value; say $.foo.^name; say Type.^name } }; class A does GenericRole[Str, 99] { }; A.new(foo => "yo").do-the-thing() 01:48
camelia 99
Str
Str
reino44771 how about a class?
timotimo nope, only roles
01:48 ilbot3 joined, ChanServ sets mode: +v ilbot3
timotimo but you can use roles as if they were classes in something we call "punning" 01:48
m: role GenericRole[::Type, $value] { has Type $.foo; method do-the-thing { say $value; say $.foo.^name; say Type.^name } }; GenericRole[Str, "fooooo"].new(foo => "yo").do-the-thing() 01:49
camelia fooooo
Str
Str
timotimo ^- no class any more
reino44771 thx
timotimo using a role like that acts the same way as if you had written class :: does TheRole[the, arguments] {}, i.e. it mixes the role into an empty class and gives you that class
01:50 reino44771 left 02:03 tamva joined 02:05 noganex joined 02:07 noganex_ left 02:08 cpage_ left 02:12 cpage_ joined
BenGoldberg m: sub foo {...}; role R[$s] { method s{$s} }; constant C = R[&foo.signature]; dd C.s; 02:24
camelia Signature $s = :()
BenGoldberg m: sub foo {...}; role R[$s] { method s{$s} }; constant C = R[:()]; dd C.s; 02:25
camelia ===SORRY!===
QAST::Block with cuid 7 has not appeared
BenGoldberg wonders, why 7?
02:25 BenGoldberg left 02:48 Vitaliy_ joined 02:53 cpage_ left 03:00 epony left 03:02 cpage_ joined 03:16 epony joined 03:18 Cabanossi left 03:20 Cabanossi joined 03:34 tamva left 03:46 Cabanossi left 03:48 Cabanossi joined 04:04 kaare_ joined 04:14 zoll joined 04:31 Cabanossi left 04:32 skids left 04:33 Cabanossi joined 04:39 khw left 04:44 mr-fooba_ left 05:00 Todd__ joined, Cabanossi left
Todd__ Hi All, I just got clipped by github.com/retupmoca/P6-Net-SMTP/issues/16 05:01
# perl6 -v This is Rakudo version 2017.06 built on MoarVM version 2017.06 implementing Perl 6.c.
Is there an newer RPM out there somewhere for Fedora? I do I have to compile from scratch?
zoll Todd__: could you not use zef to update only Net::SMTP? 05:03
Todd__ Did not think of that. I will try
05:03 Cabanossi joined
llfourn Todd__: didn't we establish the bug isn't in Net::SMTP? 05:03
NeuralAnomaly: status 05:04
NeuralAnomaly llfourn, [✘] Next release is today. Since last release, there are 23 new still-open tickets (0 unreviewed and 0 blockers) and 61 unreviewed commits. See perl6.fail/release/stats for details
Todd__ I am already at the latest version. Timo said the issue was in Rakudo and that he had fixed it.
zoll BTW, Todd__, timo mentions a simple fix by editing the file.
Todd__ I was not smart enough to know what he meant 05:05
llfourn Todd__: The next release should be soon, someone will release new rpms after that I guess. 05:06
zoll change "$self.conn.nl-in = "\r\n";" to "$self.conn.nl-in = ("\r\n");"
05:06 setty1 joined
zoll <-- untested 05:06
llfourn $self.conn.nl-in = "\r\n",; # this actually 05:07
Todd__ I am trying to download the clone from git
zoll ah. thank you, llfourn
Todd__ Poop! Type check failed in binding to parameter '@seps'; expected Positional but got Str ("\r\n") 05:11
Any words of wisdom?
ugexe ["\r\n"] 05:12
otherwise probably ("\r\n",)
llfourn Todd__: did you make the change?
Todd__ llfourn. Any idea on the time table for the next release so I can inform my customer? (Should I add a couple of weeks just in case?) 05:13
Do you want me to change it to `["\r\n"]` or `("\r\n",)`
llfourn either should work 05:14
Todd__ I changed it to ("\r\n") without the comma
llfourn that won't work
Todd__ Do yo have a preference? 05:15
llfourn ("\r\n",)
ugexe++ # what I said initially was wrong too 05:16
Todd__ It looks like it worked. I have to check something
It worked. Thank you! What did I do? 05:17
05:19 zoll-tester joined
ugexe you sent a pr with the changes 05:20
but rakudo now takes a list of line separators and not a single string. 05:22
m: say "\r\n".WHAT; say ("\r\n",).WHAT 05:23
camelia (Str)
(List)
llfourn Todd__: btw I don't know when rpms get release after there is a release. It seems to be pretty fast. 05:24
zoll (...,).WHAT produces better output for someone who is learning perl6 than $x.WHAT (given $x = (...,)) 05:25
ugh, never mind. that also produces same output 05:27
I used .perl instead of .WHAT
05:29 zoll-tester left 05:33 Cabanossi left, Cabanossi joined
ugexe if you need something slightly more verbose... `perl6 --target=ast -e '("\r\n",)'` 05:34
Todd__ At the risk of bing laughed off this form, I can only find perl5 examples on google. 05:35
What am I doing wrong here. I want the result to be "ghi". I am trying to do a "greedy" subsitution. 05:36
perl6 -e 'my $x="abc/def/ghi"; $x ~~ s{*./}{}; say $x'
Quantifier quantifies nothing
llfourn perl6 -e 'my $x="abc/def/ghi"; $x ~~ s:g!.*"/"!!; say $x' 05:38
zoll Why is "()" is a list but (3) is Int-but-not-list per rakudo? Yet "(,)" is a syntax error and "(3,)" is a list?
05:38 kerframil left
Todd__ thank you! 05:39
llfourn Todd__: you'll have to add s:g:i etc to get ignorecase etc too 05:40
Todd__ Is there a way to do it with {} brackets?
zoll llfourn: why does "/" need to be quoted? 05:41
Todd__ perl6 -e 'my $x="abc/def/ghi"; $x ~~ s/.*\///; say $x'
llfourn because Todd__ wants to match it literally
Todd__ saves the back slash and gets you out of \\\/\/\/\\\/ hell
ugexe m: say "hello " ~ (1 ?? 2 !! 3); # because parens arent just used for positional 05:42
camelia hello 2
Todd__ s is subsitute. g is global? i is case insensitive?
llfourn in p6 regex non-metacharaters have to be quoted
Todd__: yep
zoll ok. "/" is a metacharacter.
llfourn you have to quote it either way 05:43
timotimo yo
llfourn I don't think "/" is used for anything
timotimo need me for something?
llfourn you can still leave alphanumeric characters as non-quoted 05:44
Todd__ If I am "greedy", is ther a reason to use 'g'? 05:45
llfourn g is for global? 05:46
Todd__ perl6 -e 'my $x="abc/afg/ahi"; $x ~~ s:g/a/r/; say $x' rbc/rfg/rhi 05:47
seems to be global
perl6 -e 'my $x="abc/Afg/ahi"; $x ~~ s:g:i/a/r/; say $x' rbc/rfg/rhi
timotimo m: my $a = "abc/afg/ahi"; say $a.substr($a.rindex("/")) 05:48
camelia /ahi
timotimo m: my $a = "abc/afg/ahi"; say $a.substr($a.rindex("/") + 1)
camelia ahi
timotimo ^- do it without regex, it'll be a few hundred times faster
alternatively you can do a match instead of a substitution and match "the other thing" 05:49
05:49 greppable6 left
timotimo m: my $x = "abc/afg/ahi"; $x ~~ m/.* \/ <( .* /; say $/.Str 05:49
camelia ahi
timotimo alternatively, use split
m: my $x = "abc/afg/ahi"; say $x.split("/").tail 05:50
camelia ahi
Todd__ Are {} out in Perl6 (I use them a lot in Perl 5)
timotimo you'll want to consider what happens when there are no / in there at all, btw
05:50 greppable6 joined, ChanServ sets mode: +v greppable6
timotimo m: my $x = "foobarbaz"; say $x.substr($x.rindex("/") + 1) 05:51
camelia Use of Nil in numeric context
in block <unit> at <tmp> line 1
oobarbaz
timotimo this is problematic
my example with the m/ / will also not work if there's no / in there
05:51 ufobat joined
timotimo m: my $x = "foobarbax"; say $x.split("/").tail 05:51
camelia foobarbax
05:51 zoll-tester joined
timotimo this however works 05:52
05:52 zoll-tester left
llfourn I'm not sure if you can use {} to do something like s{foo}{bar} 05:54
If I try it tells me to use assignment syntax 05:55
zoll timotimo: can you explain why "xy".split( '' ) returns two empty strings before & after each letter?
timotimo sure
AlexDaniel m: $_ = ‘abcdefg’; s{cd} = ‘OH’; .say
camelia abOHefg
timotimo there's an empty string at the beginning and at the end of "xy"
AlexDaniel llfourn: ↑
timotimo it's a generalization from what you get when your split characters are at the beginning and end of the string 05:56
m: "axaya".split("a").perl.say
camelia ("", "x", "y", "").Seq
timotimo if that were not the case, you wouldn't get the same thing back when you join it again
llfourn AlexDaniel: thanks
AlexDaniel llfourn: this looks so weird though :) 05:57
llfourn it is pretty weird 05:58
given that I'm not assigning anything
but trying to to string replacement
AlexDaniel hm… that's an interesting point :)
timotimo it feels a bit like an assignment to me
the weird thing about it is that it's thunky
m: $_ = "whoa dude what"; s{" ") = <! ? , . : ;>.pick; say $_ 05:59
camelia 5===SORRY!5=== Error while compiling <tmp>
Couldn't find terminator }
at <tmp>:1
------> 3$_ = "whoa dude what"; s{" "7⏏5) = <! ? , . : ;>.pick; say $_
expecting any of:
double quotes
infix stopper
timotimo m: $_ = "whoa dude what"; s{" "} = <! ? , . : ;>.pick; say $_
camelia whoa;dude what
timotimo m: $_ = "whoa dude what"; s{" "} = <! ? , . : ;>.pick; say $_
camelia whoa:dude what
timotimo m: $_ = "whoa dude what"; s{" "} = <! ? , . : ;>.pick; say $_
camelia whoa;dude what
timotimo oh, forgot the :g
m: $_ = "whoa dude what is happening"; s:g{" "} = <! ? , . : ;>.pick; say $_
camelia whoa.dude,what:is?happening
timotimo m: $_ = "whoa dude what is happening"; s:g{" "} = <! ? , . : ;>.pick; say $_
camelia whoa!dude;what,is.happening
AlexDaniel I like this also: 06:00
timotimo m: $_ = "whoa dude what is happening"; s:g{" "} = $/.target; say $_
camelia whoawhoa dude what is happeningdudewhoa dude what is happeningwhatwhoa dude what is happeningiswhoa dude what is happeninghappening
AlexDaniel m: my $x = ‘abcdefg’; $x ~~ s「cd」 = ‘OH’; $x.say
camelia abOHefg
llfourn ohh
so you can actually use it without $_ being set 06:01
timotimo yeah because ~~ sets $_ for you
llfourn ^ I don't always find the above to be the case
AlexDaniel well, I guess so… it just felt like it should work, and turns out it does :)
06:01 Cabanossi left
llfourn m: my $a = "foo"; say $a ~~ .uc 06:02
camelia False
llfourn m: my $a = "foo"; say $a.uc ~~ .uc
camelia True
llfourn nvm I guess I got confused somewhere
timotimo i'm not sure we're actually helping Todd__ at all :) 06:03
06:03 Cabanossi joined
llfourn Todd__: in conclusion you can do. my $x = "foo"; $x ~~ s{foo} = "bar". Which is like s/foo/bar. 06:04
AlexDaniel looking at it again, I think the assignment syntax is much clearer
llfourn I like it now that I know you can do it on stuff other than $_ 06:05
(well know I know that ~~ actually sets $_ consistently) 06:06
Todd__ I understand. Thank you! 06:09
06:15 andrzejku joined
Todd__ bye bye 06:29
06:29 Todd__ left 06:35 konsolebox left 06:41 konsolebox joined 06:44 mcmillhj joined, epony left 06:48 mcmillhj left 06:54 nadim joined 06:55 AlexDaniel left 07:06 espadrine joined 07:24 wamba joined 07:35 darutoko joined 07:47 Cabanossi left 07:48 Cabanossi joined 07:51 ufobat left 08:00 kurahaupo joined 08:03 itaipu joined 08:06 mr-foobar joined 08:07 ufobat joined
nadim Good morning, what's the role of the 'provides' section in META6.json ? 08:23
08:23 rindolf joined
stmuk_ I see the go people are arguing about their language naming on twitter 08:32
zoll Go got nothing on Perl 6, I say.
stmuk_: got a link?
tyil[m] zoll: they got popularity 08:33
and speed :'3
zoll my point was about the name.
stmuk_ zoll: see rob poke's thread 08:34
errr rob pike even
08:46 Cabanossi left 08:49 Cabanossi joined 08:52 zoll left 08:55 rindolf left 08:58 Gothmog_ joined
nadim m: my $s = 1 ; my $s2 = 2 ; $s := $s2 if $s2.defined ; say $s 09:08
camelia 2
nadim m: my $s = 1 ; my $s2 = 2 ; $s = $s2 if $s2.defined ; say $s
camelia 2
nadim m: my $s = 1 ; my $s2 = 2 ; $s [R//]= $s2 ; say $s
camelia 2
nadim m: my $s = 1 ; my $s2 = 2 ; $s [R//]:= $s2 ; say $s 09:09
camelia 5===SORRY!5=== Error while compiling <tmp>
Preceding context expects a term, but found infix := instead
at <tmp>:1
------> 3my $s = 1 ; my $s2 = 2 ; $s [R//]:=7⏏5 $s2 ; say $s
nadim isn't it possible to use [R//] with := ?
09:17 parv joined 09:22 itaipu left 09:31 parv left 09:55 wowee joined 09:59 wowee left 10:01 Cabanossi left 10:04 Cabanossi joined 10:17 Ven joined, Ven left 10:20 eliasr joined 10:25 ufobat left 10:26 TEttinger left 10:29 Cabanossi left 10:30 Cabanossi joined
Geth doc: 1b8b5bc028 | (Elizabeth Mattijsen)++ | doc/Language/setbagmix.pod6
Fix 2 typos
10:37
lizmat looking at the documentation in docs.perl6.org/language/setbagmix , I would want to write a lot there, but this would need more community feedback 10:38
that we won't be able to get before the R* release
so afaiac , I won't be touching doc anymore until after the R* release
afk& 10:39
10:40 Morfent left 10:45 notbenh left 10:48 notbenh joined 10:52 |oLa| left 11:27 rindolf joined 11:38 robertle joined 11:40 Ven joined, Ven is now known as Guest52311 11:42 titsuki joined 11:46 TimToady left 11:48 TimToady joined 11:51 BenGoldberg joined 12:03 szabgab joined 12:06 szabgab left 12:31 kaare_ left 12:47 Cabanossi left 12:48 Cabanossi joined 12:50 cpage_ left 12:53 cpage_ joined 12:59 espadrine left
geekosaur wonders if there's somewhere in the documentation to put the description of how process groups work; it's not strictly perl 6 and it's unix specific but I think this is the second time someone's been confused by it 13:00
also it's amazing how many people don't get the idea that a multitasking system has more than one process running at the same time 13:02
13:03 |oLa| joined 13:04 lizmat left 13:07 ctilmes left 13:12 zakame joined 13:13 zakame left 13:15 lizmat joined, lucasb joined 13:16 zakame joined, zakame left, zakame joined
BenGoldberg geekosaur, Multitasking is just an illusion. 13:18
13:22 zakame left
geekosaur that's exactly what people think... 13:27
your computer would never work at all if it worked the way everyone thinks it does
(there was also a time when that was literally true, but computers have had multiple CPU cores for how long now?) 13:28
13:29 zakame joined 13:30 zakame left 13:31 zakame joined
geekosaur and even when it was true because the computer only had one CPU, what process was current on the CPU changed by the millisecond. trust me, humans do not track what process is current by the millisecond 13:32
most of them would insist the other processes are not current even though they're on the cpu; the "current process" is whatever they are interacting with on the terminal and somehow that process knows to keep all the others running or stop them if it receives a signal or etc. 13:33
if computers actually worked that way, *every* programmer would get it wrong.
timotimo so, if we open our source files and set \n=finish\n as separator, we could totally accept perl6 source files that end in a binary blob 13:36
geekosaur it's the return of __END__!
13:40 zakame left 13:42 zakame joined, pmurias joined 13:50 zakame left 13:51 zakame joined 13:56 zakame left
timotimo the END is back 14:00
14:08 zakame joined 14:09 araraloren joined
araraloren evening 14:10
14:11 zakame left
araraloren I know use grammar we can define a recursive regex, is there any other way can do this? 14:11
Such like my regex A { 1 | <&A> }; 14:12
Oh I know
my regex A { 1 <&A>? }; can do this, sorry 14:13
14:15 Guest52311 left, Ven joined, Ven left 14:16 zakame joined 14:17 Cabanossi left 14:18 Cabanossi joined 14:19 zakame left, zakame joined, zakame left, zakame joined 14:20 zakame left, zakame joined 14:21 zakame left, zakame joined, nhywyll joined
timotimo does somebody want to make "my ($a, $b, $c);" faster? :) 14:22
14:23 zakame left, zakame joined 14:24 mvr707 left 14:28 ufobat joined, zakame left 14:29 zakame joined 14:30 zakame left 14:31 zakame joined 14:38 zakame left 14:39 zakame joined 14:40 gdonald left, kaare_ joined 14:42 zakame left 14:43 khw joined 14:45 kaare_ left 14:46 kaare_ joined, Cabanossi left 14:47 zakharyas joined 14:49 Cabanossi joined 14:52 gdonald joined 14:54 BenGoldberg left 14:57 kaare_ left 15:00 kerframil joined 15:03 espadrine joined, ggoebel left 15:04 kaare_ joined 15:10 domidumont joined 15:15 domidumont left, leont_ left, ggoebel joined 15:16 domidumont joined 15:17 spreadLink joined, leont_ joined
spreadLink hello~ 15:17
15:20 Ven joined, Ven is now known as Guest99595
nadim Hi, I am going to make a change to my favorite module (Data::Dump::Tree) as it has now three different environments, Termina, terminal with NCurses and HTML, of course they don't handle color the same way which forces me to stop dealing with Str but have some ColorStr type. i wonder if by, a very unlikely chance someon has seen such a class somewhere. Not difficult to write but I rather no re-invent. 15:26
araraloren Terminal color ? 15:30
Do you mean Terminal::ANSIColor ? 15:31
nadim No, I mean a Str class that also caaries color attributes with it 15:32
lizmat role HasColor { has $.color }; my $a = "foo" but HasColor ? 15:33
nadim a bunch of them and they shall concatenate while keeping the color, and, let's dream, can render itself in multiple environments 15:34
but that was a good idea for a single string.
lizmat m: role Color[$color] { method color { $color } }; my $a = "foo" but Color["red"]; dd $a.color # using parameterized roles 15:35
camelia Str $color = "red"
nadim I guess I should also have an operator to create them, ColorStr.new: :color(...), :str<...> ; is going to be tiresome very quickly
lizmat: I like the approach 15:36
15:38 cpage_ left 15:41 Morfent joined
colomon Is there a Windows MSI out there for a recent Rakudo? All I’ve found so far are Rakudo Stars from April or earlier. 15:42
colomon is building a new Windows 10 VM beause his old one blew up :\
aha! rakudo.org/downloads/rakudo/ 15:46
oh, wait, those aren’t MSIs
perl6.org 15:47
colomon grumpily gives up and installs R* 2017.04 15:48
Morfent can you compile rakudo on windows? 15:50
colomon I don’t know that I can — especially with most of my development tools not installed yet — but somebody can, obviously.
jnthn still develops on Windows as far as I know. 15:51
Morfent ah
compiling it takes hardly any time to do, so if you can't find the msis it's not a problem after getting the dependencies installed 15:54
araraloren Yeah, you can I make a MyStr has a terminal width 15:55
nadim, you can inherit from Str 15:56
16:05 domidumont left, domidumont joined 16:06 cpage_ joined 16:13 Guest99595 left 16:14 Ven joined 16:15 Ven is now known as Guest27471 16:16 Guest27471 left 16:30 zakharyas left
MasterDuke colomon: the next R* is going to be based on 2017.07, which should be released today, so there should be a new R* sometime after 16:33
colomon ooooo 16:34
MasterDuke i think stmuk_ usually waits a week or so 16:35
16:40 zakharyas joined 16:41 kaare_ left 16:46 kaare_ joined 16:47 Cabanossi left 16:48 Cabanossi joined 16:51 mr-fooba_ joined 16:53 mr-foobar left 17:02 zakharyas left 17:03 zakharyas joined
ugexe i use rakudobrew on windows, but yeah you need a compiler and perl installed 17:04
17:05 zengargoyle left, zengargoyle joined
Voldenet Is it a good idea to subtype "Stringy:D" for its every use case and then move constraint checking into a type? 17:06
I'm sure it's very elegant and tidy, but wouldn't it kill performance to re-check this a lot?
17:07 Ven_ joined
Voldenet m: subset S of Stringy:D where { .chars > 0 }; Str $t = "some text"; (sub (S $a) { $a.say })($a); 17:09
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3S of Stringy:D where { .chars > 0 }; Str7⏏5 $t = "some text"; (sub (S $a) { $a.say
expecting any of:
infix
infix stopper
Voldenet m: subset S of Stringy:D where { .chars > 0 }; my Str $t = "some text"; (sub (S $a) { $a.say })($a);
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$a' is not declared
at <tmp>:1
------> 3 = "some text"; (sub (S $a) { $a.say })(7⏏5$a);
Voldenet m: subset S of Stringy:D where { .chars > 0 }; my Str $t = "some text"; (sub (S $a) { $a.say })($t);
camelia some text
Voldenet m: subset S of Stringy:D where { .chars > 0 }; my Str $t = ""; (sub (S $a) { $a.say })($t);
camelia Constraint type check failed in binding to parameter '$a'; expected S but got Str ("")
in sub at <tmp> line 1
in block <unit> at <tmp> line 1
ugexe where *.chars 17:10
still flawed though 17:12
m: my $buf = "x".encode; say $buf ~~ Stringy; say $buf.chars
camelia True
Cannot use a Buf as a string, but you called the chars method on it
in block <unit> at <tmp> line 1
ugexe m: my $buf = "x".encode; say $buf ~~ Stringy; say $buf.?chars # I feel like this *should* work but it doesnt
camelia True
Cannot use a Buf as a string, but you called the chars method on it
in block <unit> at <tmp> line 1
Voldenet m: subset S of Stringy:D where *.chars; my Str $a = "a"; sub b(S $a) { $a }; for ^10000 { b($a) }; (now - BEGIN now).say 17:14
camelia 0.0762509
Voldenet m: subset S of Stringy:D where *.chars; my S $a = "a"; sub b(S $a) { $a }; for ^10000 { b($a) }; (now - BEGIN now).say
camelia 0.07377091
Voldenet doesn't look like a smashing difference
ugexe m: my $buf = "x".encode; say $buf ~~ Stringy; say $buf.Stringy; # cause this doesn't really make sense 17:16
camelia True
x
ugexe er that wasnt what i thought it was gonna say
yes it did 17:17
17:17 Ven_ left, Cabanossi left 17:18 Cabanossi joined
Voldenet m: "".encode.Stringy.chars.say 17:18
camelia 0
Voldenet m: "ó".encode.Stringy.chars.say 17:19
camelia 1
17:19 BenGoldberg joined
ugexe m: my $buf = "x".encode; my $buf2 = Buf.new($buf); say $buf.perl; say $buf2.perl; say $buf ~~ Stringy; say $buf2 ~~ Stringy; say $buf.Stringy; say $buf2.Stringy 17:21
camelia utf8.new(120)
Buf.new(120)
True
True
x
Cannot use a Buf as a string, but you called the Stringy method on it
in block <unit> at <tmp> line 1
ugexe that doesn't make sense though 17:22
Voldenet Huh... that's quite magical 17:24
ugexe well i guess it sort of does since the former you *know* its utf8 but the later is just known to be a Buf
Voldenet m: say "x".encode.WHAT 17:25
camelia (utf8)
Voldenet m: say Buf.new("x".encode).WHAT
camelia (Buf)
geekosaur yes, utf8 is a Buf[uint8] with extra abilities
Voldenet Well, it makes sense now. Not all "Buf" objects can be used as a string
m: say Buf.new("x".encode).Stringy 17:26
camelia Cannot use a Buf as a string, but you called the Stringy method on it
in block <unit> at <tmp> line 1
Voldenet m: say Buf.new("x".encode).decode.Stringy
camelia x
ugexe seems like Buf.Stringy should be calling something like { self."{::T}"::Stringy }
17:39 Mrofnet joined 17:41 Moronnt joined 17:42 Morfent left 17:44 Mrofnet left 17:46 al2o3-cr joined
al2o3-cr p6: say "hello perl"; 17:47
camelia hello perl
nine colomon: jnthn usually develops on Linux, too these days. 17:48
AFAIK we don't have anyone doing development on Windows regularily. 17:49
17:49 Moronnt is now known as Morfent 17:55 zakharyas left 18:01 al2o3-cr left 18:02 Cabanossi left 18:03 Cabanossi joined 18:04 karlsson joined
karlsson p6: $_ = '① ② ③ ④ ⑤ ⑥ ⑦ ⑧ ⑨ ⑩ ⑪ ⑫ ⑬ ⑭ ⑮ ⑯ ⑰ ⑱ ⑲ ⑳'; s:nth(4,8,12...*)/(.)/$0,/; .say 18:05
camelia ① ② ,③ ④ ,⑤ ⑥ ,⑦ ⑧ ,⑨ ⑩ ,⑪ ⑫ ,⑬ ⑭ ,⑮ ⑯ ,⑰ ⑱ ,⑲ ⑳
karlsson Is this error? 18:07
lucasb m: $_ = '(1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) (12) (13) (14) (15) (16) (17) (18) (19) (20)'; s:nth(4,8,12...*)/(.)/$0,/; .say 18:10
camelia (1) ,(2) ,(3) ,(4) ,(5) ,(6) ,(7) ,(8) ,(9) ,(10), (11,) (1,2) (,13) ,(14), (15,) (1,6) (,17) ,(18), (19,) (2,0)
lucasb idk why the output changed between evaluations
oh, sorry. I copy and pasted in the terminal... 18:11
didn't know those were unicodey 18:12
18:13 karlsson left 18:30 zengargoyle left 18:31 zengargoyle joined 18:34 zakharyas joined 18:47 Cabanossi left 18:48 Cabanossi joined 18:52 nadim left 18:57 domidumont left 19:00 domidumont joined 19:05 nadim joined 19:09 domidumont left 19:10 nhywyll left 19:12 gdonald left 19:15 Ven joined 19:16 Ven is now known as Guest59775 19:19 ufobat left 19:24 gdonald joined 19:26 Guest59775 left, epony joined 19:30 darutoko left 19:32 MilkmanDan left, MilkmanDan joined 19:36 TEttinger joined 19:41 nadim left 20:06 cono left 20:19 lucasb left 20:20 Ven joined, Ven is now known as Guest16543 20:23 mr-fooba_ left 20:24 mr-foobar joined 20:33 Morfent left 20:34 NeuralAnomaly left 20:35 NeuralAnomaly joined, ChanServ sets mode: +v NeuralAnomaly, NeuralAnomaly left 20:36 NeuralAnomaly joined, ChanServ sets mode: +v NeuralAnomaly 20:37 NeuralAnomaly left 20:38 NeuralAnomaly joined, ChanServ sets mode: +v NeuralAnomaly 20:40 pecastro left 20:41 Celelibi left 20:45 aindilis left 20:48 eliasr left 20:51 epony left 20:55 epony joined, mr-foobar left, karlsson joined 20:56 mr-foobar joined 21:13 ufobat joined 21:17 Cabanossi left 21:18 Cabanossi joined 21:20 zakharyas left 21:23 ctilmes joined 21:25 mr-foobar left 21:27 NeuralAnomaly left, NeuralAnomaly joined, ChanServ sets mode: +v NeuralAnomaly 21:28 NeuralAnomaly left, NeuralAnomaly joined, ChanServ sets mode: +v NeuralAnomaly 21:29 mr-foobar joined, andrzejku left, setty1 left 21:30 NeuralAnomaly left, NeuralAnomaly joined, ChanServ sets mode: +v NeuralAnomaly 21:40 NeuralAnomaly left 21:41 NeuralAnomaly joined, ChanServ sets mode: +v NeuralAnomaly 21:44 Manifest0 joined 21:54 mr-foobar left 21:56 spreadLink left 21:57 rindolf left 21:58 mr-foobar joined 22:00 ptolemarch left 22:01 ptolemarch joined, Cabanossi left 22:03 Cabanossi joined, Guest16543 left 22:24 mr-foobar left 22:25 geekosaur left 22:27 geekosaur joined 22:28 mr-foobar joined 22:41 Morfent joined 22:43 Ven joined, Ven is now known as Guest72659 22:45 Morfent left 22:52 TreyHarris left 22:54 mr-foobar left 22:57 Morfent joined 22:59 mr-foobar joined, Mrofnet joined, Morfent left 23:04 Mrofnet left 23:07 Morfent joined 23:09 vadz joined, Morfent left 23:13 vadz left 23:21 wamba left
samcv how do i create a channel using stdin 23:21
zengargoyle echo -e "foo\nbar\n" | perl6 -e '$*IN.Supply.tap(*.say)' 23:30
^^ seems to do something.. :)
23:34 karlsson left 23:35 atta joined
zengargoyle m: $*IN.lines.map: *.say; 23:36
camelia »Wann treffen wir drei wieder zusamm?«
»Um die siebente Stund‘, am Brückendamm.«
»Am Mittelpfeiler.«
»Ich lösche die Flamm.«
»Ich mit«

»Ich komme vom Norden her.«
»Und ich vom Süden.«…
zengargoyle m: $*IN.lines.Supply.tap: *.uc.say; 23:37
camelia »WANN TREFFEN WIR DREI WIEDER ZUSAMM?«
»UM DIE SIEBENTE STUND‘, AM BRÜCKENDAMM.«
»AM MITTELPFEILER.«
»ICH LÖSCHE DIE FLAMM.«
»ICH MIT«

»ICH KOMME VOM NORDEN HER.«
»UND ICH VOM SÜDEN.«…
zengargoyle m: $*IN.lines.Supply.Channel
camelia ( no output )
zengargoyle m: $*IN.lines.Supply.Channel.perl.say
camelia Channel.new
23:43 kyan left
samcv hm 23:46
23:49 Guest72659 left
timotimo m: my $chan = Channel.new; start { $chan.send($_) for $*IN.lines }; react { whenever $chan { say "received $_" } } 23:55
m: my $chan = Channel.new; start { $chan.send($_) for $*IN.lines; $chan.close() }; react { whenever $chan { say "received $_" } }
23:55 mr-foobar left
camelia (timeout)received »Wann treffen wir drei wieder zusamm?«
received »Um die siebente Stund‘, am Brückendamm.«
received »Am Mittelpfeiler.«
received »Ich lösche die Flamm.«
received »Ich mit«
received
received …
23:55
received »Wann treffen wir drei wieder zusamm?«
received »Um die siebente Stund‘, am Brückendamm.«
received »Am Mittelpfeiler.«
received »Ich lösche die Flamm.«
received »Ich mit«
received
received »…
23:57 mr-foobar joined