Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-06-23

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:04 cpage_ joined #perl6
00:07 awwaiid joined #perl6
00:09 mcmillhj joined #perl6
00:12 Cabanossi joined #perl6
00:13 awwaiid joined #perl6
00:21 BenGoldberg joined #perl6
00:24 BenGoldberg Does anyone know if there is, somewhere in moar, an identity function which takes a void* and returns the same?
00:25 awwaiid joined #perl6
00:31 awwaiid joined #perl6
00:31 BenGoldberg I want to turn a Routine into a Pointer, which can be stored in a CStruct, which would then get passed to a library routine... I'm 99% sure that I can make an identity function dwiw.
00:33 lookatme joined #perl6
00:33 lookatme morning
00:47 awwaiid joined #perl6
00:58 Cabanossi joined #perl6
01:03 klapperl_ joined #perl6
01:07 aborazmeh joined #perl6
01:07 aborazmeh joined #perl6
01:08 awwaiid joined #perl6
01:17 imcsk8 joined #perl6
01:21 awwaiid joined #perl6
01:23 TimToady joined #perl6
01:27 awwaiid joined #perl6
01:27 skids joined #perl6
01:29 raschipi joined #perl6
01:46 TimToady joined #perl6
02:06 awwaiid joined #perl6
02:13 Cabanossi joined #perl6
02:23 noganex joined #perl6
02:27 awwaiid joined #perl6
02:38 awwaiid joined #perl6
02:41 mcmillhj joined #perl6
02:41 MasterDuke joined #perl6
02:44 awwaiid joined #perl6
02:54 awwaiid joined #perl6
02:56 mcmillhj joined #perl6
02:56 rouking_ what's the difference between having a whenever block inside a react block or not?
03:05 awwaiid joined #perl6
03:08 Ben_Goldberg joined #perl6
03:11 awwaiid joined #perl6
03:12 mcmillhj joined #perl6
03:23 awwaiid joined #perl6
03:24 skids joined #perl6
03:29 awwaiid joined #perl6
03:35 ChoHag joined #perl6
03:41 awwaiid joined #perl6
03:42 Cabanossi joined #perl6
03:43 mcmillhj joined #perl6
03:57 awwaiid joined #perl6
04:02 awwaiid joined #perl6
04:03 kaare_ joined #perl6
04:12 Cabanossi joined #perl6
04:14 TimToady joined #perl6
04:15 awwaiid joined #perl6
04:20 awwaiid joined #perl6
04:31 mcmillhj joined #perl6
04:33 astj joined #perl6
04:41 awwaiid joined #perl6
04:46 mcmillhj joined #perl6
04:47 awwaiid joined #perl6
04:49 curan joined #perl6
04:51 |oLa| joined #perl6
04:57 Cabanossi joined #perl6
05:01 astj joined #perl6
05:03 awwaiid joined #perl6
05:11 wamba joined #perl6
05:13 awwaiid joined #perl6
05:20 xtreak joined #perl6
05:29 cpage_ joined #perl6
05:30 rindolf joined #perl6
05:33 domidumont joined #perl6
05:39 domidumont joined #perl6
05:40 prodotiscus joined #perl6
05:40 awwaiid joined #perl6
05:44 TimToady joined #perl6
05:48 moritz lichtkind: pong
05:48 yoleaux 22 Jun 2017 21:07Z <eveo> moritz: do you remember what "not raising with Junctions" means in this commit? We now have a situation that Junction == Numeric results in a Junction, but Junction != Numeric collapses the Junction and returns a Bool. That difference wasn't intended, was it? https://github.com/rakudo/rakudo/commit/4a247b1a34af698ba201070d915ea0d8d88c7774
05:50 moritz .tell eveo the idea was that any(2, 3) != $x is interpreted as !(any(2,3) == $x), because the former is basically never what you want. That's why the != variant returns a Bool and the == a Junction
05:50 yoleaux moritz: I'll pass your message to eveo.
05:51 TimToady_ joined #perl6
05:51 awwaiid joined #perl6
05:57 awwaiid joined #perl6
06:05 domidumont joined #perl6
06:14 awwaiid joined #perl6
06:18 xtreak joined #perl6
06:19 prodotiscus joined #perl6
06:23 TimToady joined #perl6
06:26 Cabanossi joined #perl6
06:30 prodotiscus joined #perl6
06:30 awwaiid joined #perl6
06:32 mcmillhj joined #perl6
06:35 abraxxa joined #perl6
06:46 awwaiid joined #perl6
06:51 scimon joined #perl6
06:52 awwaiid joined #perl6
06:58 awwaiid joined #perl6
07:04 wamba joined #perl6
07:11 awwaiid joined #perl6
07:19 ufobat joined #perl6
07:24 salv0 joined #perl6
07:26 Cabanossi joined #perl6
07:34 TimToady joined #perl6
07:35 prodotiscus joined #perl6
07:39 Sense8 joined #perl6
07:46 awwaiid joined #perl6
07:49 ChoHag joined #perl6
07:51 awwaiid joined #perl6
07:53 zakharyas joined #perl6
08:00 salv0 joined #perl6
08:00 Sgeo_ joined #perl6
08:03 TimToady joined #perl6
08:13 awwaiid joined #perl6
08:17 |oLa| joined #perl6
08:19 awwaiid joined #perl6
08:20 TimToady joined #perl6
08:24 awwaiid joined #perl6
08:31 Sense8 joined #perl6
08:35 awwaiid joined #perl6
08:41 awwaiid joined #perl6
08:45 [ptc] joined #perl6
08:46 awwaiid joined #perl6
08:51 TimToady joined #perl6
08:58 rindolf joined #perl6
09:00 awwaiid joined #perl6
09:06 TimToady joined #perl6
09:11 Cabanossi joined #perl6
09:13 awwaiid joined #perl6
09:17 TimToady joined #perl6
09:23 awwaiid joined #perl6
09:29 TimToady joined #perl6
09:29 awwaiid joined #perl6
09:30 parv joined #perl6
09:40 awwaiid joined #perl6
09:47 awwaiid joined #perl6
09:48 eveo joined #perl6
09:49 eveo moritz: the problem with it is that it's a special case that tries to guess "what I really want". .Bool collapses junctions, but now it's .Bool, or !=, 'cause there it's not really what you want
09:49 eveo moritz: I'd still evaluate 5|6 != 42 in a Bool context, so I'm not really following what I'd not really want :/
09:50 eveo m: say one(5, 6) != 6
09:50 camelia rakudo-moar 4079f7: OUTPUT: «False␤»
09:50 eveo m: say one(5, 6) == 6
09:50 camelia rakudo-moar 4079f7: OUTPUT: «one(False, True)␤»
09:50 eveo m: say so one(5, 6) == 6
09:50 camelia rakudo-moar 4079f7: OUTPUT: «True␤»
09:50 eveo Yeah, and it's wrong too
09:56 TimToady joined #perl6
09:57 Cabanossi joined #perl6
10:03 awwaiid joined #perl6
10:04 Xliff BenGoldbert: Let me know if you ever find an answer to that question.
10:04 Xliff ^^ BenGoldberg
10:05 colomon joined #perl6
10:06 Xliff BenGoldberg: Wouldn't nativecast work, though?
10:11 nhywyll joined #perl6
10:14 prodotiscus joined #perl6
10:18 awwaiid joined #perl6
10:21 TimToady joined #perl6
10:24 awwaiid joined #perl6
10:26 tbrowder hi. #perl6!  is the person responsible for perl6.party present?
10:27 moritz tbrowder: that would be eveo
10:28 moritz eveo: the problem with != and junctions was that people were quite often surprised by the results
10:28 eveo moritz: currently result is wrong
10:28 eveo I'd say that's quite surprising
10:28 moritz eveo: no, it's as designed and tested
10:28 moritz it's not consistent with the rest, which you can count as surprising
10:29 awwaiid joined #perl6
10:30 tbrowder thanks, moritz. i was going to ask about the site details, but i just found the github link WAY at the bottom.  (anyone else not fond of the single-page site format?)
10:30 eveo Make your own site then
10:30 tbrowder but the blog entries look nice.
10:31 moritz eveo: search for "Use of negative operators with junctions" in S03
10:32 eveo m: say one(5, 6, 6) !== 6
10:32 camelia rakudo-moar 4079f7: OUTPUT: «True␤»
10:32 eveo m: say one(5, 6, 6) !=== 6
10:32 camelia rakudo-moar 4079f7: OUTPUT: «True␤»
10:32 eveo S03:00
10:32 synopsebot6 Link: http://design.perl6.org/S03.html#line_00
10:32 tbrowder eveo: maybe i will, that's why i was looking for site construction details.
10:32 moritz S03:3327
10:32 synopsebot6 Link: http://design.perl6.org/S03.html#line_3327
10:33 eveo tbrowder: out of your own articles. The ones on perl6.party are copyrighted.
10:33 tbrowder sure, i understand
10:34 eveo moritz: that section entirely ignores that there's more than one type of junction
10:34 eveo "as designed and tested" for a poorly thought special case
10:35 awwaiid joined #perl6
10:36 itaylor57 joined #perl6
10:37 bhm joined #perl6
10:37 eveo m: say all(5, 6) != 6
10:37 camelia rakudo-moar 4079f7: OUTPUT: «True␤»
10:37 eveo m: say none(5, 6) != 6
10:37 camelia rakudo-moar 4079f7: OUTPUT: «True␤»
10:37 eveo It only works for an `any` junction which coincidentally is the only junction shown in the spec
10:38 tbrowder i've been looking for a good blogging platform and attended Henry Van Styn's Rapi::Blog session at TPC NA 2017.  looks like a good possibility.
10:41 AlexDaniel joined #perl6
10:42 eveo huggable: 6.d
10:42 huggable eveo, Proposals for 6.d language: https://github.com/perl6/specs/blob/master/v6d.pod
10:46 awwaiid joined #perl6
10:50 eveo m: say 2 ne 1 & 2 & 3
10:50 camelia rakudo-moar 4079f7: OUTPUT: «True␤»
10:51 eveo m: say 2 !~~ 1 | 2 | 3
10:51 camelia rakudo-moar 4079f7: OUTPUT: «False␤»
10:51 eveo m: say 2 !== 1 | 2 | 3
10:51 camelia rakudo-moar 4079f7: OUTPUT: «False␤»
10:52 awwaiid joined #perl6
10:55 eveo At least this shit is documented.
10:55 eveo Perl 6 just lost one more piece of my heart due to this.
10:55 eveo Consistently inconsistent.
10:55 eveo left #perl6
11:05 awwaiid joined #perl6
11:11 ggoebel joined #perl6
11:12 Cabanossi joined #perl6
11:16 awwaiid joined #perl6
11:18 TimToady joined #perl6
11:22 awwaiid joined #perl6
11:29 awwaiid joined #perl6
11:43 awwaiid joined #perl6
11:44 [ptc] joined #perl6
11:49 awwaiid joined #perl6
11:54 awwaiid joined #perl6
12:06 awwaiid joined #perl6
12:11 domidumont joined #perl6
12:11 Cabanossi joined #perl6
12:12 awwaiid joined #perl6
12:18 awwaiid joined #perl6
12:20 TimToady joined #perl6
12:24 awwaiid joined #perl6
12:36 awwaiid joined #perl6
12:37 wamba joined #perl6
12:42 awwaiid joined #perl6
12:46 domidumont joined #perl6
12:47 pmurias joined #perl6
12:47 awwaiid joined #perl6
12:49 TimToady joined #perl6
12:49 ZofBot joined #perl6
12:52 mcmillhj joined #perl6
12:53 awwaiid joined #perl6
12:53 setty1 joined #perl6
12:54 setty1 joined #perl6
12:57 Cabanossi joined #perl6
13:01 perlpilot With $obj.can('method'), is there a way to find out where candidates came from without inspecting their signatures?
13:03 lollercopter joined #perl6
13:03 lollercopter perlpilot: yes, .package
13:04 lollercopter m: say "".can("contains")».package
13:04 camelia rakudo-moar b31b15: OUTPUT: «((Str) (Cool))␤»
13:04 perlpilot ah, thanks.  I knew there must've been something.
13:05 perlpilot I even looked at the list of methods and didn't see that one.
13:09 awwaiid joined #perl6
13:12 prodotiscus joined #perl6
13:12 perlpilot Hmm. That doesn't work too well with multi methods.  (or it's making some sort of indictment of my intelligence ...
13:12 perlpilot m: class C  { multi method m() { }; multi method m($a,$b) { } }; C.can('m').[0].package
13:12 camelia rakudo-moar f72c97: ( no output )
13:12 TimToady joined #perl6
13:12 perlpilot m: class C  { multi method m() { }; multi method m($a,$b) { } }; C.can('m').[0].package.say
13:12 camelia rakudo-moar f72c97: OUTPUT: «(Dummy)␤»
13:13 lollercopter You get a proto. You need to get to the actual .candidate you want
13:15 perlpilot sure, but that just means I need to adjust my idea of what .can does.
13:15 perlpilot (I've been thinking of it as returning candidates)
13:15 lollercopter perlpilot: what are you trying to accomplish?
13:15 lollercopter There's .cando method you can use to pick a candidate
13:16 lollercopter (OTOH, it'd need the invocant)
13:17 perlpilot "accomplish" is a strong word.  I'm just playing.  I was hoping for something like  $obj.can('method').classify(*.package.perl) to give me candidates per class
13:20 perlpilot actually, I was imagining that there should be a modifier to .can that does that, but I don't know how useful it would be to the masses.
13:20 lollercopter perlpilot: you just need to classify the candidates themselves
13:20 lollercopter m: class C  { multi method m() { }; multi method m($a,$b) { } }; C.can('m')».candidates.flat.classify(*.package.perl).say
13:20 camelia rakudo-moar f72c97: OUTPUT: «{C => [m m]}␤»
13:21 lollercopter m: class C  { multi method m() { }; multi method m($a,$b) { } }; C.can('m')».candidates.flat.classify(*.package.perl)<C>.head.signature.say
13:21 camelia rakudo-moar f72c97: OUTPUT: «(C $: *%_)␤»
13:21 lollercopter m: class C  { multi method m() { }; multi method m($a,$b) { } }; C.can('m')».candidates.flat.classify(*.package.perl)<C>.tail.signature.say
13:21 camelia rakudo-moar f72c97: OUTPUT: «(C $: $a, $b, *%_)␤»
13:21 lollercopter m: "".can('contains')».candidates.flat.classify(*.package.perl).say
13:21 camelia rakudo-moar f72c97: OUTPUT: «{Cool => [contains], Str => [contains contains contains contains]}␤»
13:22 lollercopter No need for shoving "modifiers" all over the codebase.
13:23 perlpilot yeah, I suppose so.  I just didn't want to type so much ;)
13:27 ChoHag joined #perl6
13:28 xtreak joined #perl6
13:29 lollercopter left #perl6
13:33 aborazmeh joined #perl6
13:33 aborazmeh joined #perl6
13:40 awwaiid joined #perl6
13:44 skids joined #perl6
13:45 ctilmes joined #perl6
13:51 mr-foobar joined #perl6
13:56 Cabanossi joined #perl6
14:02 prodotiscus joined #perl6
14:03 keylet joined #perl6
14:03 araraloren joined #perl6
14:03 araraloren evening
14:04 TimToady joined #perl6
14:13 [Coke] morning.
14:15 prodotiscus joined #perl6
14:16 Geth ¦ ecosystem: 827738a5ef | (Curt Tilmes)++ | META.list
14:16 Geth ¦ ecosystem: Add TCC, Tiny C Compiler, to ecosystem
14:16 Geth ¦ ecosystem:
14:16 Geth ¦ ecosystem: See https://github.com/CurtTilmes/perl6-tcc
14:16 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/827738a5ef
14:16 [Coke] http://coconut-lang.org/
14:18 prodotiscus_ joined #perl6
14:19 prodotiscus_ how to read a variable from STDIN?
14:19 rightfold prodotiscus_: That's a rather vague question.
14:20 rightfold Stdin provides a stream of bytes.
14:20 ctilmes prodotiscus_: Check out https://docs.perl6.org/routine/prompt
14:20 rightfold You can decode the bytes into some data structure.
14:24 raschipi joined #perl6
14:33 prodotiscus_ `Enter your action (,) > Cannot flush handle: Failed to flush filehandle: Invalid argument`
14:34 prodotiscus_ I get this when i try `$action = prompt "Enter your action..";`
14:35 jnthn prodotiscus_: What Rakudo version do you have?
14:35 prodotiscus_ 2017.05-389-g326faed built on MoarVM version 2017.05-71-gad6ab26
14:36 jnthn Ah, not a release version
14:36 prodotiscus_ I use that on my laptop I'm now working now
14:36 prodotiscus_ what version can I use to avoid this?
14:36 jnthn There was a bug that caused that; it never appeared in a release, but there were several days where a HEAD built could get you it
14:37 jnthn The 2017.06 release version was fine in this regard
14:37 prodotiscus_ ok, thank you
14:38 jnthn Or latest if you like to live on the edge :)
14:39 raschipi Living on the edge means one will get things like that from time  to time.
14:47 setty1 joined #perl6
14:49 xzhao joined #perl6
14:50 TimToady joined #perl6
14:54 alimon joined #perl6
14:57 prodotiscus_ m: class A { has Str $!foo is required; method TOP { say "string, $!foo and something else" }; };
14:57 camelia rakudo-moar 10f840: ( no output )
14:57 prodotiscus_ m: class A { has Str $!foo is required; method TOP { say "string, $!foo and something else" }; }; A(foo => "bar");
14:57 camelia rakudo-moar 10f840: OUTPUT: «Cannot coerce to A with named arguments␤  in block <unit> at <tmp> line 1␤␤»
14:57 prodotiscus_ m: class A { has Str $!foo is required; method TOP { say "string, $!foo and something else" }; }; A.new(foo => "bar");
14:57 camelia rakudo-moar 10f840: OUTPUT: «The attribute '$!foo' is required, but you did not provide a value for it.␤  in block <unit> at <tmp> line 1␤␤»
14:58 ctilmes prodotiscus_: Set private attributes with a submethod BUILD()
14:59 ctilmes prodotiscus_: https://docs.perl6.org/language/classtut#Constructors
15:00 prodotiscus_ thank you ctilmes
15:00 prodotiscus_ m: class A { has Str $.foo is required; method TOP { say "string, $.foo and something else" }; }; A.new(foo => "bar");
15:00 camelia rakudo-moar 10f840: ( no output )
15:01 prodotiscus_ that's if I use public variable
15:03 alimon joined #perl6
15:05 |oLa| joined #perl6
15:05 ctilmes prodotiscus_: Right, it works win the public variable
15:06 ctilmes *with
15:08 troys joined #perl6
15:09 cdg joined #perl6
15:10 nightfrog joined #perl6
15:11 Cabanossi joined #perl6
15:18 zapwai joined #perl6
15:18 araujo joined #perl6
15:22 Ven joined #perl6
15:26 cdg joined #perl6
15:27 TimToady joined #perl6
15:30 keylet joined #perl6
15:40 TimToady joined #perl6
15:40 khw joined #perl6
15:51 [ptc] joined #perl6
15:56 TimToady joined #perl6
16:02 cdg_ joined #perl6
16:03 cdg__ joined #perl6
16:09 lichtkind joined #perl6
16:12 Ven_ joined #perl6
16:17 Sgeo__ joined #perl6
16:21 hoelzro joined #perl6
16:25 Cabanossi joined #perl6
16:33 Cabanossi joined #perl6
16:35 Cabanossi joined #perl6
16:36 prodotiscus joined #perl6
16:40 TimToady joined #perl6
16:52 rindolf joined #perl6
16:52 salv0 joined #perl6
17:04 cdg joined #perl6
17:19 Cabanossi joined #perl6
17:23 mr-fooba_ joined #perl6
17:23 domidumont joined #perl6
17:38 TimToady joined #perl6
17:42 Ven joined #perl6
17:45 pilne joined #perl6
18:01 TimToady joined #perl6
18:04 Cabanossi joined #perl6
18:05 mr-foobar joined #perl6
18:07 TimToady joined #perl6
18:12 mr-fooba_ joined #perl6
18:16 timotimo we should probably put TWEAK in there instead of BUILD
18:18 timotimo because if you have a BUILD, no default values or anything like that will be done for you
18:18 timotimo but TWEAK doesn't have that property
18:19 mst hence why I whined until somebody added TWEAK :)
18:20 cdg_ joined #perl6
18:21 cdg joined #perl6
18:23 moritz mst++
18:31 espadrine joined #perl6
18:46 wamba joined #perl6
18:51 nullcone joined #perl6
19:24 colomon_ joined #perl6
19:27 grondilu joined #perl6
19:31 hoelzro joined #perl6
19:36 andrzejku joined #perl6
19:44 mr-foobar joined #perl6
19:46 gfldex-mobil joined #perl6
19:54 DesertJellyfish left #perl6
20:03 AlexDaniel joined #perl6
20:04 Cabanossi joined #perl6
20:06 cpage_ joined #perl6
20:07 TEttinger joined #perl6
20:12 mr-foobar joined #perl6
20:28 samcv my git branch output is so nice now https://comfy.moe/llcmld.png
20:28 samcv :-)
20:28 samcv will provide code if anybody wants their git branch output to look like that :)
20:32 domidumont joined #perl6
20:46 lizmat_ joined #perl6
20:47 sufrostico joined #perl6
20:49 sufrosti1o joined #perl6
20:53 rindolf TimToady: hi
20:53 rindolf lizmat: hi
20:53 lizmat rindolf o/
20:54 rindolf lizmat: sup?
20:54 lizmat not much, with you?
20:55 rindolf lizmat: i closed an old KDE bug today as it was fixeed
20:55 rindolf lizmat: and I fixed a PySol bug that I reported
20:55 lizmat rindolf++
20:56 rindolf lizmat: thanks :-)
20:56 rindolf lizmat: none of these are particularly p6-related
20:57 lizmat it's still early :-)
20:57 ctilmes Some thoughts on eqv() I shared with TimToady et. al. at YAPC: http://curt.tilmes.org/2017-TPC-eqv
21:04 lollercopter joined #perl6
21:04 [ptc] left #perl6
21:04 Cabanossi joined #perl6
21:05 [ptc]_ joined #perl6
21:07 lollercopter ctilmes: +1 on that. The only worry is performance. And if perhaps we should leave the .perl's as is and only do the more expensive per-attribute eqv if the class wants to (e.g. if .eqv method is present but returns Nil)
21:08 [ptc] joined #perl6
21:09 lollercopter ctilmes: and sidenote: is-deeply uses "eqv semantics" not eqv op (it does Seqs differently for example). The propper way to run that test would've been cmp-ok $o1, &[eqv], $o2
21:09 ctilmes Note that .perl iterates over the attributes anyway...
21:10 lollercopter ctilmes: only by default.
21:10 lollercopter ctilmes: and simply making a string out of them is probabpy cheaper than eqv'ing each
21:11 ctilmes I think you could construct scenarios where each was cheaper/more expensive
21:14 lollercopter m: my @a = ^1000; my @b = ^1000; for ^1000 { $ = @a eqv @b }; say now - INIT now
21:14 camelia rakudo-moar 10f840: OUTPUT: «1.32335701␤»
21:14 lollercopter m: my @a = ^1000; my @b = ^1000; for ^1000 { $ = @a eq @b }; say now - INIT now
21:14 camelia rakudo-moar 10f840: OUTPUT: «1.13419479␤»
21:14 mr-foobar joined #perl6
21:15 ctilmes This is how Test runs is-deeply: https://github.com/rakudo/rakudo/blob/nom/lib/Test.pm6#L638
21:15 ctilmes $got eqv $expected
21:16 lollercopter ctilmes: look before that
21:16 ctilmes Yes, I see, but I still maintain most people would expect what I tried to work
21:17 lollercopter ctilmes: also, your example with sets is wrong. The only reason the perls differed is due to a bug in Setty.perl. It's meant to be ordered
21:17 ctilmes There are other scenarios where you pass classes (or subclasses) around, and would expect it to work
21:19 lollercopter ctilmes: I think I'm retracting that +1 now that I think of it. .perl is meant to roundtrip to give the original object back. Doing eqv on attributes is kinda pointless because you don't test any extra information .perl doesn't give you and you still don't solve the problen entirely since the private attributes aren't tested, you can still end up with uneqv eqv objects
21:20 ctilmes What do you think about .eqv as a method, and have the fallback check for that?
21:20 ctilmes (also iterating the attributes and eqv-ing them can short cut on failure, whereas .perl-ing always iterates every attribute)
21:20 lollercopter True
21:21 cpage_ joined #perl6
21:23 lollercopter ctilmes: perhaps .EQV method? something less-likely to exist aacidentally for other reasons
21:23 lollercopter \o
21:23 lollercopter left #perl6
21:23 ctilmes yes, good point
21:25 dha joined #perl6
21:41 mcmillhj joined #perl6
21:42 mr-foobar joined #perl6
21:47 mcmillhj joined #perl6
21:49 Cabanossi joined #perl6
22:01 lizmat joined #perl6
22:02 lizmat joined #perl6
22:12 tbrowder ctilmes: what about the fact that you  can overload "==" and it works?
22:13 jeek joined #perl6
22:13 mr-foobar joined #perl6
22:19 tbrowder it works on your class and least it's a workaround until eqv is fixed (if ever)
22:26 salv0 joined #perl6
22:29 skids joined #perl6
22:32 nebuchadnezzar new official Debian packages will be published soon
22:33 * nebuchadnezzar really need a personal ZofBot ;-)
22:45 mr-foobar joined #perl6
22:45 cog_ joined #perl6
22:49 Cabanossi joined #perl6
22:57 timotimo it's probably open source?
23:22 Voldenet m: { my $x=$0; $x ~~ s:g/<[\ \-]>/_/; $x.say } if "Hostname=This is a-test" ~~ /^Hostname\=(.*)$/
23:22 camelia rakudo-moar 10f840: OUTPUT: «This_is_a_test␤»
23:23 Voldenet is there any faster way to write this?
23:29 BenGoldberg joined #perl6
23:38 mcmillhj joined #perl6
23:48 mr-foobar joined #perl6
23:50 mcmillhj joined #perl6
23:57 lollercopter joined #perl6
23:57 lollercopter Voldenet: yup
23:57 lollercopter m: for ^10000 {  { my $x=$0; $x ~~ s:g/<[\ \-]>/_/;  } if "Hostname=This is a-test" ~~ /^Hostname\=(.*)$/ }; say now - INIT now
23:57 camelia rakudo-moar 10f840: OUTPUT: «2.1162005␤»
23:57 lollercopter m: for ^10000 {  my $v = "Hostname=This is a-test"; if $v.starts-with: 'Hostname=' { my $x = $v.substr(9).subst(' ', '_', :g).subst('-', '_', :g);  }  }; say now - INIT now
23:57 camelia rakudo-moar 10f840: OUTPUT: «0.1612127␤»
23:58 lollercopter m: my $v = "Hostname=This is a-test"; $v.substr(9).subst(' ', '_', :g).subst('-', '_', :g).say if $v.starts-with: 'Hostname='
23:58 camelia rakudo-moar 10f840: OUTPUT: «This_is_a_test␤»
23:58 lollercopter Looks right

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo