Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-07-18

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:00 AlexDaniel parv: like, I have no designer degree, I have no idea if that is going to make things better or worse :)
00:02 parv AlexDaniel: neither do i (have design degree). i could try in GIMP but that is not vector based software. is there other vector based software to run on FreeBSD or CentoS 6.8  which would install without hassle?
00:03 AlexDaniel parv: inkscape
00:03 MasterDuke krita maybe if you use kde
00:03 yoleaux 17 Jul 2017 15:44Z <AlexDaniel> MasterDuke: Malformed UTF-8 issue does not seem to be CATCH-able. I didn't really dive into this, but I guess if it happens in Proc::Async somewhere then you won't be able to handle it (as it is in a different thread)?
00:03 yoleaux 17 Jul 2017 16:49Z <AlexDaniel> MasterDuke: nevermind. It's just that I'm an idiot: https://irclog.perlgeek.de/perl6-dev/2017-07-17#i_14882744
00:03 AlexDaniel MasterDuke: do they have proper svg support nowadays?
00:03 Zoffix TEttinger: comb is because you "comb for stuff" with it
00:03 parv AlexDaniel: i will see (but please be pessimistic).
00:04 AlexDaniel parv: don't worry, I am… :)
00:04 parv he he he
00:05 parv MasterDuke: i avoid kde & gnome system wherever i can (... but just may be work 'puter ... )
00:07 Sgeo joined #perl6
00:10 timotimo AlexDaniel, MasterDuke, krita is getting a full vector graphics overhaul at the moment
00:11 timotimo you can get a dev build for krita 4 which already has the svg stuff
00:11 timotimo before that krita used ODG vector stuff internally
00:12 MasterDuke odg?
00:13 parv openoffice thing?
00:14 timotimo yup
00:15 timotimo open document graphic?
00:16 * parv remembers the file suffix used by (open|libre)office but had forgotten the origin
00:19 mr-foobar joined #perl6
00:23 Morfent joined #perl6
00:27 Morfent joined #perl6
00:29 lookatme joined #perl6
00:36 Geth_ ¦ whateverable: fae0078848 | (Aleks-Daniel Jakimenko-Aleksejev)++ | 2 files
00:36 Geth_ ¦ whateverable: Move markdown escaping to Misc.pm6
00:36 Geth_ ¦ whateverable:
00:36 Geth_ ¦ whateverable: Because this way we will be able to reuse this terrible hack later.
00:36 Geth_ ¦ whateverable: review: https://github.com/perl6/whateverable/commit/fae0078848
00:41 lookatme morning
00:42 dudz morning
00:49 mr-foobar joined #perl6
01:03 lizmat joined #perl6
01:07 nicq20 joined #perl6
01:16 Cabanossi joined #perl6
01:17 Morfent joined #perl6
01:17 mr-foobar joined #perl6
01:28 mniip joined #perl6
01:33 lizmat joined #perl6
01:35 nicq20 Why is there no `add_method` for role HOWs?
01:38 mcmillhj joined #perl6
01:48 lookatme nicq20, there no document about role HOW.
01:48 lookatme :(
01:52 nicq20 Err sorry, should have been more descriptive. I'm mostly curious as to why the `add_method` method does not work with roles.
01:53 seatek i'm pretty sure that role are immutable
01:53 seatek that's what lets them get 'substituted' in so easily into classes
01:59 wamba joined #perl6
02:05 cdg joined #perl6
02:09 jnthn_ joined #perl6
02:09 nowan_ joined #perl6
02:13 stux|RC joined #perl6
02:14 gugod joined #perl6
02:14 timotimo joined #perl6
02:16 zengargoyle joined #perl6
02:19 ribasushi joined #perl6
02:25 mr-foobar joined #perl6
02:28 ugexe m: role Foo { .^add_method("foo", { say 1 }) }; class Bar does Foo { }; Bar.foo; # but it can look like it does
02:28 camelia rakudo-moar 91be8b: OUTPUT: «1␤»
02:50 cdg joined #perl6
02:53 evanm joined #perl6
02:57 pm5 joined #perl6
02:57 ingy joined #perl6
03:00 BenGoldberg m: role Foo { dd .HOW };
03:00 camelia rakudo-moar 91be8b: ( no output )
03:00 BenGoldberg m: role Foo { dd .HOW }; Foo.new;
03:00 camelia rakudo-moar 91be8b: OUTPUT: «Perl6::Metamodel::ClassHOW.new␤»
03:00 BenGoldberg m: role Foo { dd .HOW }; class Bar does Foo {};
03:00 camelia rakudo-moar 91be8b: OUTPUT: «Perl6::Metamodel::ClassHOW.new␤»
03:01 BenGoldberg m: role Foo { dd .HOW }; class Bar does Foo {}; class Baz does Foo {};
03:01 camelia rakudo-moar 91be8b: OUTPUT: «Perl6::Metamodel::ClassHOW.new␤Perl6::Metamodel::ClassHOW.new␤»
03:01 Cabanossi joined #perl6
03:03 BenGoldberg Oooh, I see.  The role's body block is executed at *class* composition time.  Specifically, every time any class which does the role is composed.  Neat.
03:11 noganex joined #perl6
03:20 tony-o joined #perl6
03:22 evanm joined #perl6
03:26 evanm Hi, can someone explain the following discrepancy to me?
03:26 evanm m:  my int @ints = (1, 2, 3); say @ints[0].WHERE == @ints[0].WHERE
03:26 camelia rakudo-moar 91be8b: OUTPUT: «True␤»
03:26 evanm m:  my num @blarg = (1e0, 2e0, 3e0); say @blarg[0].WHERE == @blarg[0].WHERE
03:26 camelia rakudo-moar 91be8b: OUTPUT: «False␤»
03:34 lizmat joined #perl6
03:34 lookatme evanm, it coercion 1e0 to num, so everytime access it produce a temporary value
03:34 lookatme I guess
03:35 geekosaur more likely from num to Num but in this situation that is arguably a bug
03:36 lookatme m:  my num32 @blarg = (1e0, 2e0, 3e0); say @blarg[0].WHERE == @blarg[0].WHERE
03:36 camelia rakudo-moar 91be8b: OUTPUT: «False␤»
03:36 lookatme m:  my @blarg = (1e0, 2e0, 3e0); say @blarg[0].WHERE; say @blarg[0].WHERE
03:36 camelia rakudo-moar 91be8b: OUTPUT: «140147420120160␤140147420120160␤»
03:36 geekosaur I think int used to have the same issue, and it's not really fixed properly, just hacked around until someone figures out how to do it properly
03:36 geekosaur that is, it's boxing it on retrieval
03:36 lookatme Oh
03:37 lookatme But we should not write code depend on .WHERE, right ?
03:38 Xliff joined #perl6
03:38 evanm Thanks, that explains it at least
03:39 geekosaur right
03:39 geekosaur but autoboxing like that can cause unexpected performance issues
03:39 lookatme yeah, I know
03:39 geekosaur and you kinda want something like .WHERE to not give you the address of a box that you told it not to make
03:40 lookatme Hmm
03:40 geekosaur so: this is a bug but it may be difficult to fix because natives still behave a bit oddly with respect to picking candidate methods iirc
03:41 geekosaur there's a hack in place for int/Int but not sure it will work for num/Num
03:45 Cabanossi joined #perl6
03:46 evanm Someone said earlier that native shaped arrays are guaranteed contiguous storage; is there a way to see that somehow (maybe with WHERE)?
03:49 geekosaur probably not; the array itself has a .WHERE, for native arrays there are no separate containers with their own .WHERE
03:49 geekosaur I think
03:51 evanm m:  my int @ints = (1, 2, 3); say @ints[0].WHERE; say @ints[1].WHERE
03:51 camelia rakudo-moar 91be8b: OUTPUT: «140580465117080␤140580465117120␤»
03:52 evanm m: my int @ints = (1, 2, 3); say @ints[1].WHERE - @ints[0].WHERE
03:52 camelia rakudo-moar 91be8b: OUTPUT: «40␤»
03:52 evanm What am I looking at here? Does the 40 byte offset mean anything in particular?
03:53 geekosaur I think at this point you need to talk to jnthn or someone else who knows how the memory management works
03:53 geekosaur I know only up to a point, and we're past it :/
03:55 evanm geekosaur: ok, thanks. Well I don't want to bother people who are busy, just trying to get a handle on things
03:56 hobbs 40 wouldn't seem very contiguous
03:56 hobbs and on my build (which is around a month old, granted) I get -40 :)
03:57 geekosaur right, one question I am not sure of here is whether native arrays have containers or not; if they do, the containers may be contiguous but their contents likely are not
03:57 geekosaur but I just don't know
04:00 evanm All right, well I have another headscratcher
04:01 evanm m:  my $v1 = 10; my $v2 = 20; ($v2, $v1) = (30, 40); say $v2
04:01 camelia rakudo-moar 91be8b: OUTPUT: «30␤»
04:02 evanm my $v1 = 10; my $v2 = 20; my $v3 = 30; (($v2, $v1), $v3) = ((40, 50), 60); say $v2;
04:02 evanm m: my $v1 = 10; my $v2 = 20; my $v3 = 30; (($v2, $v1), $v3) = ((30, 40), 60); say $v
04:02 camelia rakudo-moar 91be8b: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Variable '$v' is not declared␤at <tmp>:1␤------> 3(($v2, $v1), $v3) = ((30, 40), 60); say 7⏏5$v␤»
04:02 evanm m: my $v1 = 10; my $v2 = 20; my $v3 = 30; (($v2, $v1), $v3) = ((30, 40), 60); say $v2
04:02 camelia rakudo-moar 91be8b: OUTPUT: «(30 40)␤»
04:03 evanm I.e. why are the semantics of assigning to (($v2, $v1), $v3) apparently different from assigning to just ($v2, $v1)
04:04 w4and0er96 joined #perl6
04:04 evanm In the case of (($v2, $v1), $v3), $v2 gets a List when I'd expect it to get a value
04:06 El_Che joined #perl6
04:07 mcmillhj joined #perl6
04:16 epony joined #perl6
04:26 tony-o i'd expect that if you assigned did (($v2, $v1), $v3) = (|(1, 2), 3);
04:26 tony-o m: my $v1 = 10; my $v2 = 20; my $v3 = 30; (($v2, $v1), $v3) = (|(30, 40), 60); say $v2;
04:26 camelia rakudo-moar 91be8b: OUTPUT: «30␤»
04:27 tony-o the left is "flattened", the right isn't
04:27 evanm Why the difference wrt flattening? Seems to screw up destructuring assignment
04:29 tony-o on the left you can't assign to an arbitrary sequence, on the right you're assigning a sequence to whatever is on the left.  i'm not sure i'm saying that in correct p6y terms
04:29 tony-o if you flatten the Seq with the pipe, it assigns as expected
04:31 evanm Right, I'm just curious why this design decision was made
04:33 evanm It seems like a nested lvalue should either mimic the structure of the rvalue or else produce an error
04:34 evanm I see how to work around it with the pipe but I'm not sure I understand the motivation for flattening the lvalue
04:42 lookatme m: my $v1 = 10; my $v2 = 20; my $v3 = 30; (($v2, $v1), $v3) := ((30, 40), 60); say $v2
04:42 camelia rakudo-moar 91be8b: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Cannot use bind operator with this left-hand side␤at <tmp>:1␤------> 3 30; (($v2, $v1), $v3) := ((30, 40), 60)7⏏5; say $v2␤»
04:44 xtreak joined #perl6
04:46 evanm I'll ask again in the morning!
04:49 kurahaupo_ joined #perl6
04:53 mcmillhj joined #perl6
05:16 faraco joined #perl6
05:17 mr-foobar joined #perl6
05:18 kurahaupo joined #perl6
05:19 kurahaupo joined #perl6
05:19 kurahaupo joined #perl6
05:21 skids joined #perl6
05:21 kurahaupo joined #perl6
05:23 Sgeo joined #perl6
05:34 Morfent joined #perl6
05:45 Cabanossi joined #perl6
05:45 mr-foobar joined #perl6
05:54 Sgeo joined #perl6
06:02 Sgeo joined #perl6
06:04 Sgeo joined #perl6
06:09 lookatme joined #perl6
06:16 lookatme joined #perl6
06:16 mr-foobar joined #perl6
06:22 domidumont joined #perl6
06:29 domidumont joined #perl6
06:35 xtreak_ joined #perl6
06:39 wamba joined #perl6
06:46 lowbro joined #perl6
06:46 lowbro joined #perl6
06:47 gdonald joined #perl6
06:48 nadim joined #perl6
06:50 Xliff joined #perl6
06:52 xtreak joined #perl6
06:52 darutoko joined #perl6
06:52 Manifest0 joined #perl6
07:01 domidumont joined #perl6
07:06 xtreak joined #perl6
07:07 abraxxa joined #perl6
07:11 espadrine joined #perl6
07:13 ufobat joined #perl6
07:15 parvx joined #perl6
07:15 mr-foobar joined #perl6
07:27 dakkar joined #perl6
07:41 Geth_ ¦ whateverable: b03eb154ba | (Aleks-Daniel Jakimenko-Aleksejev)++ | t/committable.t
07:41 Geth_ ¦ whateverable: Increase timeouts in committable tests
07:41 Geth_ ¦ whateverable:
07:41 Geth_ ¦ whateverable: More releases = more time it takes to run something on all releases.
07:41 Geth_ ¦ whateverable: review: https://github.com/perl6/whateverable/commit/b03eb154ba
07:41 Geth_ ¦ whateverable: dc4ac484d0 | (Aleks-Daniel Jakimenko-Aleksejev)++ | 4 files
07:41 Geth_ ¦ whateverable: Gist exceptions (resolves issue #106)
07:41 Geth_ ¦ whateverable:
07:41 Geth_ ¦ whateverable: Whenever some exception was thrown, bots used to simply ignore what
07:41 Geth_ ¦ whateverable: happened and not report back with anything. With this commit not only
07:41 Geth_ ¦ whateverable: we catch exceptions, but also:
07:41 Geth_ ¦ whateverable: * Gist them and provide a link.
07:41 Geth_ ¦ whateverable: * Notify maintainers on #whateverable channel.
07:41 Geth_ ¦ whateverable: <…commit message has 42 more lines…>
07:41 Geth_ ¦ whateverable: review: https://github.com/perl6/whateverable/commit/dc4ac484d0
07:41 AlexDaniel 42 more lines xD
07:47 moritz AlexDaniel++
07:47 yoleaux 17 Jul 2017 21:51Z <Zoffix> moritz: so I talked to people in #maria and one of the suggestions was to change ilbot/blob/master/lib/Ilbot/Backend/SQL.pm:40 to $_[0]->do( 'set names utf8' ); instead of the mysql-specific thing there. Is that code used to store data from IRC too tho? I popped open the db and done `select * from ilbot_lines where id = 14879831 limit 50;` and there's garbage up in there even if I do set names utf8 in the
07:47 yoleaux 17 Jul 2017 21:52Z <Zoffix> moritz: client. So perhaps we need the set names utf8 thing some other place too?
07:48 mr-foobar joined #perl6
07:49 moritz Zoffix: we must conserve the same format that the old 1.5M lines of logged data use, even if that looks like garbage
07:50 zakharyas joined #perl6
07:50 committable6 joined #perl6
07:51 unicodable6 joined #perl6
07:51 bisectable6 joined #perl6
07:51 coverable6 joined #perl6
07:51 quotable6 joined #perl6
07:51 evalable6 joined #perl6
07:51 greppable6 joined #perl6
07:51 bloatable6 joined #perl6
07:51 benchable6 joined #perl6
07:51 statisfiable6 joined #perl6
07:54 lizmat joined #perl6
07:58 rindolf joined #perl6
08:00 Cabanossi joined #perl6
08:03 * lizmat clickbaits https://p6weekly.wordpress.com/2017/07/17/2017-29-zoffix-released/
08:05 |oLa| joined #perl6
08:05 * llfourn takes the bait
08:06 lookatme lizmat++
08:11 nadim joined #perl6
08:14 mr-foobar joined #perl6
08:38 Sgeo_ joined #perl6
08:40 lizmat joined #perl6
08:42 nine How can I influence the sort order of objects of my class?
08:42 wamba joined #perl6
08:46 xerx joined #perl6
08:49 mr-foobar joined #perl6
09:10 moritz you can write an infix:<cmp> multi for it
09:10 lizmat joined #perl6
09:10 lookatme nine, overload some compare operator
09:11 abraxxa I can reproduce the test failure of DOM::Tiny
09:11 abraxxa zostay: if you want me to check it now
09:12 abraxxa zostay: http://paste.scsys.co.uk/564629
09:12 xtreak joined #perl6
09:19 mr-foobar joined #perl6
09:19 kyan joined #perl6
09:24 jsimonet p6: my $a = 3.3; say $a.WHAT; ($a / 0).say;
09:24 camelia rakudo-moar 91be8b: OUTPUT: «(Rat)␤Attempt to divide 33 by zero using div␤  in block <unit> at <tmp> line 1␤␤»
09:29 jsimonet 33 !% 3.3
09:29 jsimonet 33 != 3.3
09:30 nine m: class Foo { has $.bar }; multi infix:<cmp>(Foo $a, Foo $b) { say "cmp $a $b"; $a.bar cmp $b.bar }; my @a = Foo.new(:bar<b>), Foo.new(:bar<a>); @a.sort.say
09:30 camelia rakudo-moar 91be8b: OUTPUT: «(Foo.new(bar => "b") Foo.new(bar => "a"))␤»
09:30 nine moritz: ^^^ the multi doesn't get picked apparently
09:31 nine Presumably because it's not in method sort's lexical scope
09:33 xtreak joined #perl6
09:36 jnthn :by(&infix:<cmp>) iirc
09:37 jnthn Oh, actually just .sort(&infix:<cmp>)
09:37 jnthn To give it the version in scope
09:39 nine Oh god damnit, &by is a positional. I tried it as a named, thought that maybe it's not "by" at all, looked in the docs, saw "by" and didn't notice that it's just not a named
09:41 nine Btw. how do I get out of a react {} loop from a whenever block? return gives a "MoarVM panic: Internal error: Unwound entire stack and missed handler". last doesn't do anything
09:42 nine And in a whenever signal(SIGINT) { } I can't call .done because I don't have a reference to the Supply
09:43 jnthn done
09:43 nine Ah, so close again :) Thanks jnthn++
09:44 jnthn It's a control exception; after done it tears down all of the other subscriptions you may have and nothing will run in that react block instance again.
09:45 nine Shouldn't we err... react to a "return" in just the same way?
09:47 nine At least we shouldn't have MoarVM panic I guess :)
09:47 mr-foobar joined #perl6
09:47 jnthn Yeah, that's a bit surprising in that I'd have expected us to report "return outside of routine"
09:48 jnthn Not sure we should overload return with double-meanings...
09:49 domidumont joined #perl6
10:10 Zoffix moritz: I'm not following.
10:11 Zoffix moritz: the encoding is broken in the database itself. Even old, pre-upgrade entries are brokne.
10:14 gregf_ joined #perl6
10:15 Geth ¦ doc: 6136eaabb6 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/Any.pod6
10:16 Geth ¦ doc: s/&by/&custom-routine-to-use/
10:16 Geth ¦ doc:
10:16 Geth ¦ doc: To avoid people thinking it's a named arg.
10:16 Geth ¦ doc: review: https://github.com/perl6/doc/commit/6136eaabb6
10:19 mr-foobar joined #perl6
10:20 Geth ¦ doc: 04aaed60ab | (Zoffix Znet)++ | 2 files
10:20 Geth ¦ doc: s/&by/&custom-routine-to-use/
10:20 Geth ¦ doc:
10:20 Geth ¦ doc: To avoid people thinking it's a named arg.
10:20 Geth ¦ doc: review: https://github.com/perl6/doc/commit/04aaed60ab
10:24 TreyHarris joined #perl6
10:29 zakharyas joined #perl6
10:31 Ulti I know this is a contentious issue but could someone explain specifically what problem the rename "Rakudo Perl 6" or "Pumpkin Perl 5" is meant to solve? Feels like the number issue is there and the confusion with what's "perl" when someone say comes to /r/perl or #perl
10:32 Ulti is it simply to just add some level of they're different dont expect continuous perl'ness?
10:33 Ulti because Im not sure it really does much to add to that and in a lot of ways makes things even more confusing by adding two made up words to the front of a recognisable one
10:37 Ulti feels like anyone who knows what Pumpkin or Rakudo is meant to be all about would have a good idea of what Perl 6 is with respect to Perl 5 already everyone else is just left even more confused
10:38 Zoffix Ulti: https://rakudo.party/post/The-Hot-New-Language-Named-Rakudo#fo6.dforthought
10:38 Zoffix In a perfect world, it wouldn't have "Perl" anything in the name, but some core memebers think it does good.
10:40 moritz Zoffix: yes, and that means we can't just change the code to write in a different format to it
10:40 moritz Zoffix: either the whole database has to be recoded, or the code that reads from the database needs to deal with the brokenness
10:42 nadim morning, when using dd to dump data, what's the difference between ('', '') and $('', '') ? IE what does the $ denote?
10:42 Zoffix nadim: scalar container
10:42 Zoffix m: (('', ''), 42).flat.say
10:42 camelia rakudo-moar 91be8b: OUTPUT: «(  42)␤»
10:42 Zoffix m: ($('', ''), 42).flat.say
10:42 camelia rakudo-moar 91be8b: OUTPUT: «(( ) 42)␤»
10:43 Juerd It feels like 'say' rarely dwim :(
10:44 Juerd It's too structured/decorated for output to end users, but not detailed enough for myself when debugging.
10:44 * Juerd liked it when it was still just print with a newline
10:44 jnthn Juerd: There's "put" for that
10:45 nadim Juerd: a single "\n" makes your data too structured/details and not detailled enough when you don't use it?!
10:45 Juerd jnthn: Oh, wow, I didn't know. Thanks :)
10:45 nadim m: print "hello" ;
10:45 camelia rakudo-moar 91be8b: OUTPUT: «hello»
10:46 Juerd nadim: The () make it not very useful for output for humans, and as a programmer I want more detail (separators)
10:46 Juerd Separators that aren't whitespace, specifically
10:47 nadim m: (1, 2, 3).perl
10:47 camelia rakudo-moar 91be8b: ( no output )
10:47 nadim m: (1, 2, 3).perl.say
10:47 camelia rakudo-moar 91be8b: OUTPUT: «(1, 2, 3)␤»
10:47 Ulti Zoffix kind of tempted to create a massive practical joke on Hacker News... create a shiny looking single page site advertising a great new language "Rakudo" point at some forked repos with any mention of Perl 6 removed and see if everyone starts going nuts. Then just time it out so it just phases everything back to Perl 6 once you have mindshare.
10:47 Juerd Yep, I use dd and .perl for debugging
10:47 Juerd I'm not complaining about the lack of options, I'm just noting that I fail to see a good use case for 'say'.
10:48 Juerd But it seems to be the most used printing operator somehow :)
10:49 Zoffix Ulti: people won't magically start going nuts over a language just because you changed the name.
10:49 Ulti could even copy over every commit scrubbed of mentions to Perl 6 and see how long it takes anyone to notice the same authors commit to Perl 6
10:49 Ulti Zoffix I think you'd be surprised just how many people dismiss anything Perl
10:49 nadim I have difficulties with dd and .perl. works fine with a few wlwmnts then may brain needs more clarity
10:49 Zoffix It doesn't mean they want to go nuts over some unheard name.
10:50 Ulti no but they might over the actual functionality of Perl 6 thats kind of my point
10:50 Zoffix My point is just changing the name won't magically make Rakudo a #1 sought after language.
10:50 nadim Juerd: there is Data::Dump ; Data::Pretty::Print, and Data::Dump::Tree,
10:50 Ulti the whole issue of marketing is people dont get to the point of even checking it out
10:50 nadim Juerd: my preference going to the last one because I eat my own dog food
10:50 Juerd nadim: Again, I was not complaining about a lack of options.
10:50 nadim :)
10:51 Ulti Zoffix my point is hide the provenance of the language to see if that does affect peoples opinion just publishing a post about the difference in attention would be quite interesting and a good critique of how stupid trends in programming have become
10:51 nadim I have opted for showing structured data even to the end user, adn now and then "say" something
10:52 Zoffix :|
10:52 Ulti I remember when someone first showed me some FORTRAN when I didnt know it was FORTRAN I couldnt work out what this elegant compiled language was.... it got a bad rep from all the shit code written in the 70s
10:52 Ulti the same is true of Perl in the 90s
10:52 Ulti the least favourite feature for new people sigil variance has been removed in Perl 6
10:55 Zoffix left #perl6
10:57 Juerd Ulti: That's only the least favourite feature they know is going on
10:57 Ulti hah true
10:57 Juerd Ulti: I think context is the feature that bites newbies most.
10:58 Ulti though they are getting rid of one of my other complaints for teaching Perl 5 to newbs that hashes in scalar context dont just return the number of keys
10:58 Juerd Ulti: It's not uncommon for Perl 5 programmers to first learn the concept of context after a frustrating first year, sometimes few years, of using the language.
10:58 Ulti or at least I remember seeing mention they might on a mailing list a while ago
10:58 Juerd I personally love the sigil variance and context, but I can understand why they're hard :)
10:59 Ulti I think it works but is stretched in places and jumping between references vs not and context is where it becomes frustrating
11:00 Juerd Ulti: The only thing that bites me there is that you can't return a hash in Perl 5, only a hash reference or a k/v list. One requires ugly deref syntax, the other is inefficient because you're building another hash then.
11:00 Juerd Ulti: So in code that defines a my %foo, and also gets a hash from a sub, one hash will be %foo and the other might be %$foo, and then it gets ugly.
11:01 Ulti take a slice of a hashref ;P I always screw that up and I've been programming Perl 5 for 13 years daily
11:01 Juerd This confused me, even though I've used Perl 5 since 1999 or so: https://juerd.nl/i/2c0430ca4d291947976ea5a60eda8aea.png
11:01 Juerd (Written last week)
11:02 Juerd (And yes, that project uses Dutch identifiers)
11:03 Juerd And this asymmetry: https://juerd.nl/i/f35e26b7933b9c69cb7e5d430efc1bed.png :(
11:03 Juerd Although in this case it aligns, so that compensates a little :D
11:04 Ulti I get what that code is doing but its a bit nutty
11:04 Ulti Id probably just keep lists of keys to a full datastructure
11:05 Juerd timtowtdi :)
11:05 rindolf joined #perl6
11:05 Juerd I need all of those structures later on
11:05 Ulti yeah if you need a copy to work on fair enough
11:06 Juerd Well, most of this is being set up for passing to a template for reporting.
11:06 Ulti but yeah thats the other thing you tend to do all those sorts of weird things with hashes because you are sort of treating them like sets and want intersections and unions
11:06 sirhalos joined #perl6
11:06 Ulti which is why I really love Perl 6
11:06 Ulti set operations are incredibly useful and common in bioinformatics
11:07 Juerd I haven't used those features yet in Rakudo and I feel very comfortable abusing hashes for it, but once I can use Rakudo for production work, I'll probably encounter the use cases where sets are great to have.
11:07 Ulti give me all the things from this file which intersect on some key in this other file i.e. it should all be in a database but you cant for *reasons*
11:08 Juerd Heh, this code does a diff between a mysql database and an xml file :(
11:08 Ulti sounds like Perl :D
11:08 Juerd Yes, I would be very annoyed if I had to write that in another language :)
11:08 Ulti thats the other reason Perl is feared it tends to be used to do incredibly powerful but questionably wise things :3
11:09 Ulti there are some scary things I've left littered around the place that would keep me up at night if I had to maintain them :D
11:09 Juerd Sounds familiar
11:10 Juerd Last year I got an email about code I wrote in 1999 when I had just learned Perl 5
11:10 Juerd Apparently that had been in production ever since
11:11 Ulti because it works
11:11 Juerd No, because it stopped working :P
11:12 Juerd Apparently "." is no longer in @INC :)
11:12 Ulti you mean the universe stopped working not the perl
11:12 Juerd Well, they did do a backwards incompatible change for security reasons
11:12 Juerd I wish they'd do that more often. (<> operator, :utf8)
11:13 Ulti Rakudo at the moment does include . by default I think?
11:13 Juerd I don't know
11:14 Juerd Have to go; afk
11:17 timotimo it shouldn't
11:19 mr-foobar joined #perl6
11:21 gdonald joined #perl6
11:26 araraloren joined #perl6
11:32 nine Juerd: no, take a slice of a hashref you got from a method call. Now that looks funny
11:33 nine Ulti: no, wen don't look in . for modules
11:34 nine m: say $*REPO.repo-chain.map: *.Str
11:34 camelia rakudo-moar 91be8b: OUTPUT: «(/home/camelia/.perl6 /home/camelia/rakudo-m-inst-1/share/perl6/site /home/camelia/rakudo-m-inst-1/share/perl6/vendor /home/camelia/rakudo-m-inst-1/share/perl6 CompUnit::Repository::AbsolutePath<59158496> CompUnit::Repository::NQP<60476360> CompUnit::Rep…»
11:34 mst I had memories of rakudo looking in . for moarvm bits or something
11:34 mst but not the repo chain
11:34 * mst remembers managing to build a 'perl6' that worked from the build dir but not if you chdir-ed elsewhere
11:34 nine mst: I fixed that. Should look there only during the build but not after installation
11:35 mst nine: excellent, I was hoping somebody've done that
11:35 mst now you've done all this work I need to get around to getting back to my dists
11:35 mst but other things keep intervening
11:42 El_Che dbix? :)
11:43 El_Che I saw some twitter drama :)
11:47 xtreak joined #perl6
11:50 mr-foobar joined #perl6
11:54 leah2_ joined #perl6
11:57 Ulti nine++ thanks
12:14 evanm joined #perl6
12:20 mr-foobar joined #perl6
12:25 evanm Good morning, can someone explain why nested-list lvalues don't destructure?
12:25 evanm m:  my $v1=1; my $v2=2; my $v3=3; (($v1, $v2), $v3) = ((4, 5), 6); say $v1; say $v2; say $v3;
12:25 camelia rakudo-moar 91be8b: OUTPUT: «(4 5)␤6␤(Any)␤»
12:26 lucasb joined #perl6
12:26 evanm I'd expect the code semantics to be equivalent to $v1 = 4, $v2 = 5, $v2 = 6
12:26 evanm *$v3 = 6
12:30 jnthn Because that's just doing a list assignment, not destructuring
12:30 timotimo m: my ($a, $b, $c); :(($a, $b), $c) := ((1, 2), 3); dd $a, $b, $c;
12:30 camelia rakudo-moar 91be8b: OUTPUT: «Int $a = 1␤Int $b = 2␤Int $c = 3␤»
12:33 mcmillhj joined #perl6
12:35 evanm Hmm ok, thanks. It's confusing to me that the lvalue just steamrolls the list structure in the assignment, I guess I'd expect an error there
12:38 sufrostico joined #perl6
12:40 lizmat joined #perl6
12:42 lucasb m: sub f($x) { :($x) := (10,); say $x }; f(20)    # is this ok?
12:42 camelia rakudo-moar 91be8b: OUTPUT: «20␤»
12:43 jnthn lucasb: Well, it's right that $x - which is readonly - can't be rebound. It'd be better if that were an error
12:43 timotimo yeah, ought to err out
12:44 lucasb thanks, yes, expecting error there too :)
12:51 mr-foobar joined #perl6
13:00 Cabanossi joined #perl6
13:11 robertle joined #perl6
13:25 devmikey joined #perl6
13:32 skids joined #perl6
13:33 Exodist joined #perl6
13:42 andrzejku hey people
13:42 andrzejku I remind that someone wrote me that C++ binding to Perl6 is impossible
13:42 andrzejku so I want to say no it is not
13:44 imcsk8 joined #perl6
13:45 Cabanossi joined #perl6
13:46 mr-foobar joined #perl6
13:57 raschipi joined #perl6
14:02 devmikey joined #perl6
14:12 raschipi andrzejku: How was the problem with discovering which symbol name the compiler gave to the functions solved?
14:13 zakharyas joined #perl6
14:13 nine raschipi: do you mean this? https://github.com/rakudo/rakudo/blob/nom/lib/NativeCall/Compiler/GNU.pm6
14:14 raschipi Yes, that. It needs to include compiler specific code, then?
14:15 Cabanossi joined #perl6
14:18 mr-foobar joined #perl6
14:18 pmichaud joined #perl6
14:19 pmichaud Good morning, #perl6
14:19 yoleaux 24 Oct 2016 21:43Z <viki> pmichaud: any updates on HTTPS for rakudo.org ( RT#128423 )? Do you need any help?
14:19 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=128423
14:19 yoleaux 29 Nov 2016 17:12Z <viki> pmichaud: would be sweet if you could drop the .ai of Rakudo logo into https://github.com/perl6/marketing/tree/master/LOGOs if you get a chance
14:19 yoleaux 30 Nov 2016 17:13Z <babydrop> pmichaud: any way we could touch base on rakudo.org maintenance? Could a person be given a sudo or something along those lines? We need HTTPs, upgraded Wordpress, and upgraded `php` + upgraded something else too, I'm sure
14:20 pmichaud Just dropping a note here that I find https://docs.perl6.org/language/traps#Quotes_and_interpolation very confusing -- especially the examples.
14:22 raschipi Do you want help understanding it or just letting us know we need to make it clearer in the future?
14:22 kurahaupo joined #perl6
14:22 moritz raschipi: probably the latter :-)
14:23 nine very much so :)
14:23 moritz pmichaud used to be the main Rakudo developer for quite a few years
14:23 raschipi That's what I thought, but wanted to make sure.
14:23 pmichaud The first example says:   "$foo<html></html>" # Perl 6 understands that as:
14:24 pmichaud $foo<html> ~ '</html>'
14:24 ufobat joined #perl6
14:24 moritz it's $foo{"html"}{"/html"}, no?
14:24 pmichaud .... say what?!?   No, it understands it as being   $foo<html></html>, which is also  $foo{'html'}{'/html'}
14:24 pmichaud right.
14:24 pmichaud similarly the next example is also wrong
14:24 raschipi It only makes sense to someone who already knows the trap.
14:25 pmichaud > my $foo = { .say }
14:25 pmichaud > say "$foo(" ~ @args ~ ")" ~ @args ~
14:25 pmichaud True
14:25 pmichaud sorry
14:25 pmichaud lost  alinebreak there
14:25 pmichaud > say "$foo(" ~ @args ~ ")"
14:25 pmichaud ~ @args ~
14:26 pmichaud Okay, I can see how this example is a trap... but the example text gets the answer wrong
14:27 pmichaud Perl 6 understands that as being  "$foo(' ~ @args ~ ')"
14:28 pmichaud I suspect I can do a pull request there.
14:28 andrzejku moritz, whats  happend with your book?
14:34 Celelibi joined #perl6
14:35 ChristopherBotto joined #perl6
14:37 rindolf joined #perl6
14:40 araraloren so I intend use {} in string for interpolation
14:42 Geth ¦ doc: pmichaud++ created pull request #1418: Correct Perl 6 interpretation of trap examples.
14:42 Geth ¦ doc: review: https://github.com/perl6/doc/pull/1418
14:42 araraloren andrzejku, I have add some impl of toolchain, have not much time work on it :)
14:45 moritz andrzejku: good question, should ask my project manager
14:45 pmichaud I'm afk again -- see ya'll around.
14:45 moritz I've completed the final proof; it's now in the publisher's hands
14:45 pmichaud (Wishing I could get to Amsterdam this year for #yapceu)
14:47 ChristopherBotto How do I report installation issues with Rakudo Star 2017.07-RC0? It seems to install fine except that zef gives me the error "===SORRY!=== Function 'BEFORE' needs parens to avoid gobbling block at /path/to/rakudo-star-2017.07-RC0/home#sources/A9948E7371E0EB9AFDF1EEEB07B52A1B75537C31 (Zef::CLI):565"
14:49 raschipi joined #perl6
14:52 ChristopherBotto This was also an issue with rakudo-star-2017.04 for me. This is on CentOS Linux release 7.3.1611 (Core).
14:54 araraloren Work fine on fedora 25, every release
14:55 Juerd nine: Yep, both ways look funny.
14:56 Juerd nine: But ->$#* is worse :)
14:56 konsolebox joined #perl6
14:57 melezhik joined #perl6
14:57 melezhik HI!
14:59 melezhik Hi jnthn: ! for some reasons "whenever IO::Notification.watch-path($root)"  stopped triggered when I add new directories ... - https://github.com/melezhik/sparky/blob/master/bin/sparkyd#L38
14:59 melezhik any hints?
15:00 melezhik btw I'm running sparky inside docker container, maybe this has impact to ...
15:00 melezhik once I restart sparkd it sees new directories and starts handling then ...
15:00 melezhik then -> them
15:06 jnthn melezhik: Dunno if it's exactly the issue you face but sleeping inside of a whenever will block processing of any other messages in the react block until after the sleep
15:06 jnthn Write it as whenever Promise.in($timeout) { run-project ... }
15:11 melezhik jnthn: will try, thanks. the fact that concerns me, that that worked before, but probably I just missed some code changes ...
15:13 konsolebox joined #perl6
15:20 mr-foobar joined #perl6
15:22 ChristopherBotto Thanks araraloren. I guess I will create an issue at the github repository for zef.
15:22 araraloren ..
15:27 melezhik jnthn: looks like I was wrong in my assumptions. indeed triggering does happen, just not that fast as I expected, I see new directories get handled by sparkyd ...
15:28 melezhik anyway, thanks. I need to investigate more  if it's really the issue ...
15:29 kurahaupo joined #perl6
15:37 ugexe thats not a zef issue, that seems like a precomp issue
15:37 jnthn melezhik: I could easily imagine the sleep causing a delay
15:38 melezhik I have applied your suggestion to my code
15:38 melezhik but I need to check more  ...
15:44 zakharyas joined #perl6
15:45 wamba joined #perl6
15:47 ChoHag joined #perl6
15:50 mr-foobar joined #perl6
15:57 Geth ¦ doc: cc2632ace8 | (Patrick R. Michaud)++ (committed by timo) | doc/Language/traps.pod6
15:57 Geth ¦ doc: Correct Perl 6 interpretation of trap examples. (#1418)
15:57 Geth ¦ doc: review: https://github.com/perl6/doc/commit/cc2632ace8
15:58 raschipi Now it makes even less sense to someone who isn't aware of the trap already.
16:00 nadim m: my @l = 1, (), (), () ; my ($a, $b, $c, $d) = @l ; dd ($a, $b, $c, $d) ;
16:00 camelia rakudo-moar 91be8b: OUTPUT: «(1, $( ), $( ), $( ))␤»
16:00 nadim m: my @l = 1, (a,2), (), () ; my ($a, $b, $c, $d) = @l ; dd ($a, $b, $c, $d) ;
16:00 camelia rakudo-moar 91be8b: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    a used at line 1␤␤»
16:00 nadim m: my @l = 1, (1,2), (), () ; my ($a, $b, $c, $d) = @l ; dd ($a, $b, $c, $d) ;
16:00 camelia rakudo-moar 91be8b: OUTPUT: «(1, $(1, 2), $( ), $( ))␤»
16:01 st_elmo joined #perl6
16:01 cdg joined #perl6
16:02 nadim and how do I get a list list?
16:02 nadim so $l is a list, it contains a list (1,2) but when I put that in $a, I get wat, a list in scalar content?
16:03 timotimo there is no $l in there, only @l, can you clarify?
16:03 nadim m: my $l = (1, (1,2), (), ()) ; my ($a, $b, $c, $d) = @l ; dd ($a, $b, $c, $d) ;
16:03 camelia rakudo-moar 91be8b: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Variable '@l' is not declared. Did you mean '$l'?␤at <tmp>:1␤------> 3 (1,2), (), ()) ; my ($a, $b, $c, $d) = 7⏏5@l ; dd ($a, $b, $c, $d) ;␤»
16:03 nadim m: my $l = (1, (1,2), (), ()) ; my ($a, $b, $c, $d) = $l ; dd ($a, $b, $c, $d) ;
16:03 camelia rakudo-moar 91be8b: OUTPUT: «(1, $(1, 2), $( ), $( ))␤»
16:03 cdg_ joined #perl6
16:04 nadim timotimo: indeed, I wrote a @l example
16:04 tony-o you get a sequence, iirc
16:04 khw joined #perl6
16:04 nadim m: my $l = (1, (1,2), (), ()).List ; my ($a, $b, $c, $d) = $l ; dd ($a, $b, $c, $d) ;
16:04 camelia rakudo-moar 91be8b: OUTPUT: «(1, $(1, 2), $( ), $( ))␤»
16:04 tony-o m: my $l = (1, (1,2), (), ()) ; my ($a, $b, $c, $d) = $l ; $b.WHAT.say
16:04 camelia rakudo-moar 91be8b: OUTPUT: «(List)␤»
16:04 tony-o nvm
16:05 nadim do $(...) flatten differently from ( ...) ?
16:06 nadim actually, I think I misunderstand $() and the difference with (), explanaitions welcome
16:10 mcmillhj joined #perl6
16:10 suman joined #perl6
16:11 suman Hi everyone
16:11 suman Greetings!!
16:11 raschipi hello
16:11 suman I want help on this. Any help? https://stackoverflow.com/questions/45172113/extracting-from-bib-file-with-perl-6
16:12 suman Related with Perl 6. I want to see the perl 6 grammar used to solve this problem. Would be exciting.
16:12 mst post your code so far and explain where you're stuck?
16:13 ugexe m: my @a; @a.append($(1,2)); say @a.perl; my @b; @b.append((1,2)); say @b.perl
16:13 camelia rakudo-moar 91be8b: OUTPUT: «[(1, 2),]␤[1, 2]␤»
16:16 raschipi suman: I think the appropriate way to do it in Perl6 would be to write bindings to bib2x.
16:17 mr-foobar joined #perl6
16:17 nadim suman: there is close to zero chance you will get your work done without you having spend a substantial amount of time trying.
16:18 nadim https://docs.perl6.org/language/grammar_tutorial
16:20 suman nadim I saw grammar documentation. Couldn't make out however! :(
16:22 suman raschipi bib2x I am seeing.
16:22 nadim https://perl6advent.wordpress.com/2009/12/21/day-21-grammars-and-actions/
16:22 moritz suman: I'm working on a book that teaches grammars: https://leanpub.com/perl6regex enjoy!
16:23 nadim moritz++
16:24 moritz (to be fair, so far it "only" discusses regexes; working on the chapter right now that introduces grammars)
16:24 tyil[m] heh
16:25 yht joined #perl6
16:25 moritz and when you buy it, you get the updates for free
16:25 tyil[m] moritz: interesting
16:26 moritz it's lean/agile book writing and selling, basically
16:27 perlpilot suman: I'd look around for a BibTeX grammar in BNF or maybe google for "BibTeX parser" and convert it to Perl 6 if I were you.  It would be a good learning experience in any case.
16:27 mcmillhj joined #perl6
16:28 perlpilot (that's kinda how I taught myself C ages and ages ago -- I knew Pascal, so I tried translating programs from Pascal to C)
16:29 araraloren night
16:30 perlpilot suman: I found https://github.com/aclements/biblib#recognized-grammar with a few seconds of google + clicking on links
16:31 nadim suman: https://tex.stackexchange.com/questions/16490/the-gold-standard-in-bibtex-databases/16492#16492
16:34 robertle dude, the original bibtex source sure is "fun"
16:42 mcmillhj joined #perl6
16:43 tony-o pascal seemed like a cool language
16:43 robertle hmmm, this is also quite a lot of pascal...
16:46 robertle eh? the texlive source tree contains a C implementation as well!
16:49 robertle and *of course* someone had to do #define BEGIN {
16:51 mr-foobar joined #perl6
16:52 suman This my code grammar REST {     token TOP     { '@.*{?' <key> ',\n title={' <title> '}'}     token key { \w+ }     token title { \w+ }  }  my $match = REST.parse('derm.bib'); say $match;
16:52 suman Not working
16:54 Cabanossi joined #perl6
16:56 |oLa| joined #perl6
16:59 mcmillhj joined #perl6
17:00 lostinfog joined #perl6
17:01 domidumont joined #perl6
17:08 beginner joined #perl6
17:08 beginner Is it possible to create object with role as type instead of class
17:09 sufrostico joined #perl6
17:12 Voldenet suman: "derm.bib" is just passed as a string, so it doesn't work
17:12 Voldenet obviously
17:14 beginner is there any syntax difference...bcoz am getting error
17:14 suman Voldenet: This is code. Even after removing quotes not working grammar REST {     token TOP     { '@.*{?' <key> 'title={' <title> '}'}     token key { \w+ }     token title { \w+ }  }  my $match = REST.parse(derm.bib); say $match;
17:15 suman This is the error message : ===SORRY!=== Error while compiling C:\Users\Suman\Desktop\bib.p6 Undeclared routine:     derm used at line 8
17:16 zakharyas joined #perl6
17:17 Voldenet .parse expects a Str
17:17 Voldenet REST.parse("derm.bib".IO.slurp)
17:17 AlexDaniel suman: wait, you want to parse "derm.bib" file? If so, then REST.parse(slurp('derm.bib'))
17:17 mcmillhj joined #perl6
17:18 lucasb joined #perl6
17:20 AndroUser2 joined #perl6
17:20 suman AlexDaniel even after slurping the derm.bib , its not working
17:20 suman Do you find anything wrong in my grammar?
17:20 AlexDaniel suman: what error are you seeing?
17:21 AlexDaniel suman: well, if you can gist your input file then I might take a look
17:21 Voldenet > https://github.com/sumandoc/My-LaTeX-Stuff/blob/master/derm.bib
17:21 suman AlexDaniel Its here https://github.com/sumandoc/My-LaTeX-Stuff/blob/master/derm.bib
17:24 statisfiable6 joined #perl6
17:29 AlexDaniel suman: thinking about it, are you sure you want a grammar?
17:29 AlexDaniel because then you'd probably want to parse everything *properly*
17:30 beginner Is it possible to create object with role as type instead of class...if yes,how?
17:31 suman AlexDaniel: Not necessarily. But you can tell me about basic implementation in Perl 6 too.
17:33 AlexDaniel suman: eh, I don't know… if you want a quick hack job then you can try something like this: my $data = slurp 'derm.bib'; %($data.match(:g, /'@article{'(\w+)/)»[0]».Str Z=> $data.match(:g, /'title={'(<-[}]>+)/)»[0]».Str)
17:34 jdv79 shouldn't it be possible to use a subset type in a has declaration?
17:34 jdv79 oh, nevermind.  typo.
17:35 lucasb beginner: my SomeRole $x = SomeRole.new
17:36 raschipi beginner: https://docs.perl6.org/type/auto-punning
17:38 AlexDaniel suman: something less hacky but still horrible: slurp('derm.bib').match(:g, /'@article{'(\w+)','\s+'title={'(<-[}]>+)/).map({~.[0] => ~.[1]})
17:39 ChristopherBotto joined #perl6
17:39 AlexDaniel looking at this, I think finding something that can parses bibs correctly would be the best solution
17:41 beginner lucasb, rashcipi : Thanks
17:42 beginner raschipi : Thanks
17:44 ingy does this not work in perl6: https://gist.github.com/anonymous/c1ee7fc4b3bb76389aa8ce9c6db0bf9b ?
17:47 AlexDaniel ingy: use v5.10 ?
17:47 geekosaur not sure anyone's tried circular imports
17:48 ingy AlexDaniel: enables 'say'
17:48 AlexDaniel geekosaur: well, there's an error message for this: “Circular module loading detected trying to precompile”
17:48 mr-foobar joined #perl6
17:48 AlexDaniel ingy: but you were talking about perl6?
17:48 mcmillhj joined #perl6
17:49 ingy does this perl5 not translate to perl6: https://gist.github.com/anonymous/c1ee7fc4b3bb76389aa8ce9c6db0bf9b ?
17:49 AlexDaniel ingy: Well, you can use perl5 stuff with Inline::Perl5 https://github.com/niner/Inline-Perl5
17:49 AlexDaniel ingy: but if you want to go with perl6, then it will look a bit different
17:50 ingy AlexDaniel: I'm asking if circular imports work in p6
17:50 AlexDaniel oooh…
17:50 AlexDaniel well, it gives this error if you translate it to perl6: “Circular module loading detected”
17:51 AlexDaniel so it seems like it is not working
17:51 ingy fo me it just hangs
17:51 AlexDaniel what rakudo version you have?
17:51 AlexDaniel also, what do you mean by “it just hangs”? What code exactly hangs?
17:54 ingy AlexDaniel: drop the hand holding. so almost all dynamic langs I know support circular loads. is there a good reason why p6 can't/doesn't?
17:54 nadim joined #perl6
17:54 ingy can type info not be resolved in precomp?
17:56 raschipi ingy: Do they also support lexical loading and want to support loading multiple versions in different contexts in the future?
17:56 AlexDaniel ingy: I think that's a good question, and it would be nice to have a good written answer in any case (good reason or not)
17:56 AlexDaniel ingy: I can't find any ticket unfortunately
17:56 ingy raschipi: I'm not comparing, I'm just trying to figure out if this is an oversight or on purpose, and if so why
17:57 raschipi ingy: Me too. I'm actually interested in the answer, I didn't mean to compare.
17:57 AlexDaniel ingy: in these cases I'd usually submit a ticket. If it is not supposed to work, someone will reject it with some good reasoning. If it's a “bug”, we will have a ticket for it at least :)
17:57 raschipi Or, another way: have those two features been combined before? If so, how?
17:59 AlexDaniel just found this: RT #126688
17:59 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=126688
17:59 ingy AlexDaniel: I appreciate your helping out, but I've been with p6 from day1 :)
17:59 AlexDaniel this is what was linked in this commit (which added this protection): https://github.com/rakudo/rakudo/commit/2126eda519696f4668d46b46eb257a5e26c88bc6
18:01 espadrine joined #perl6
18:01 AlexDaniel ingy: good, then I guess no need to explain how to submit a ticket? ;)
18:03 ingy which was July 18th 2000 iirc
18:03 ingy AlexDaniel: I'll turn it off and back on again. :)
18:04 mcmillhj joined #perl6
18:05 deep-book-gk_ joined #perl6
18:05 jdv79 can i have a public attr and a custom accessor?
18:06 sufrostico joined #perl6
18:06 deep-book-gk_ left #perl6
18:06 perlpilot jdv79: yes
18:07 geekosaur afaik the thing that makes it public is the accessor, which is generated for you with $., so you define it "private" ($!) and then provide your own accessors?
18:08 jdv79 but then you lose out on the constructor checking
18:08 AlexDaniel ingy: maybe this is relevant? https://irclog.perlgeek.de/perl6/2016-05-29#i_12567128
18:08 timotimo you can declare it public and just implement a method with the same name as the attribute
18:09 perlpilot jdv79: exactly as timotimo said
18:09 Cabanossi joined #perl6
18:10 jdv79 i tried that and it seemd to not work
18:10 jdv79 i'll paste it
18:15 AlexDaniel ingy: just created this doc issue: https://github.com/perl6/doc/issues/1419
18:15 perlpilot m: class C { has $.x = 42; method x { 97 }}; C.new.x.say;  # simple example
18:15 camelia rakudo-moar 91be8b: OUTPUT: «97␤»
18:16 jdv79 oh, i need Proxy.  right.  thanks.
18:18 ugexe m: class Foo { has $.x; method x { $!x * 2 } }; say Foo.new(x => 100).x
18:18 camelia rakudo-moar 91be8b: OUTPUT: «200␤»
18:19 jdv79 yeah but i want to set as well
18:20 domidumont joined #perl6
18:22 ingy AlexDaniel: thx
18:23 ugexe m: class Foo { has $.x; method x is rw { say 42; $!x } }; my $foo = Foo.new(x => 100); say $foo.x; $foo.x = 400; say $foo.x
18:23 camelia rakudo-moar 91be8b: OUTPUT: «42␤100␤42␤42␤400␤»
18:24 ugexe i guess you do need a proxy if you want to act according to read or write
18:25 jdv79 yup
18:25 timotimo yup, that's the only way i know of
18:28 mr-foobar joined #perl6
18:30 perlpilot left #perl6
18:30 jdv79 and there's a bug
18:30 jdv79 but it seems easily skirted
18:30 jdv79 https://rt.perl.org/Public/Bug/Display.html?id=126198
18:30 perlpilot joined #perl6
18:31 timotimo yeah, don't put methods in there
18:31 timotimo it can't work, since they are getting invoked on the proxy object
18:31 timotimo and if you have something like $!x in there, it will resolve to an object that doesn't have that attribute
18:32 jdv79 the test still just has that fudged out
18:32 jdv79 weird
18:33 timotimo perhaps Proxy's constructor should complain loudly if you pass objects derived from method in there
18:34 jdv79 it doesn't help that the docs show using methods
18:34 jdv79 but that's in a different context so not sure if that should work or not
18:37 jdv79 and why does FETCH get a postional arg sometimes
18:37 jdv79 ugh
18:38 Geth_ ¦ whateverable: 62eee9ef6f | (Aleks-Daniel Jakimenko-Aleksejev)++ | 5 files
18:38 Geth_ ¦ whateverable: No need to $proc.out.close anymore
18:38 Geth_ ¦ whateverable:
18:38 Geth_ ¦ whateverable: Resolves issue #175. Reverts at least these commits:
18:38 Geth_ ¦ whateverable:
18:38 Geth_ ¦ whateverable: * 96ccddccd804b33e0b9c5ed6580c1c23a91a5737
18:38 Geth_ ¦ whateverable: * 39cde1e3e90bd019a38f51c62221927900b5e01b
18:38 Geth_ ¦ whateverable: * c63ed89d4ea0fb1e7d6d62683d237432e215d29a
18:38 Geth_ ¦ whateverable:
18:38 Geth_ ¦ whateverable: See this Perl 6 doc issue for more info:
18:38 Geth_ ¦ whateverable: https://github.com/perl6/doc/issues/1304
18:38 Geth_ ¦ whateverable: review: https://github.com/perl6/whateverable/commit/62eee9ef6f
18:39 timotimo that's the object you're fetching from, i guess?
18:39 timotimo hm, no, it's probably the proxy itselfs
18:39 Cabanossi joined #perl6
18:41 jdv79 doing $o.a = 1 is fine but say $o.a = 1 seems to give a param to FETCH
18:41 jdv79 idk
18:42 jdv79 or $o.a i what i meant
18:42 timotimo i don't see the difference there?
18:44 AlexDaniel .tell samcv Any chance you have a quick answer for https://github.com/perl6/whateverable/issues/167 ? Unicodable adds ◌ for combiners, but how can I easily know if ◌ should be prepended? Like, is there some property or something? Or is there any other check I can perform? Like “(“◌” ~ $x).chars == 1” or something?
18:44 yoleaux AlexDaniel: I'll pass your message to samcv.
18:50 mr-foobar joined #perl6
18:51 tyil can anyone help me with a probably easy grammar problem? I have http://termbin.com/eimi
18:51 tyil but $m is an (Any), without the match I wanted ("hello", supposed to be in <content>)
18:52 ChoHag joined #perl6
18:52 tyil Grammar::Tracer shows it should match carrectly
18:56 geekosaur as written, that grammar will stop at the second **, notice that ti is not at end of input, and fail.
18:56 geekosaur perhaps you want subparse instead of parse
18:57 tyil heh, that seems to give me the result I was expecting
18:57 tyil thanks geekosaur
19:01 mcmillhj joined #perl6
19:07 domidumont joined #perl6
19:09 Cabanossi joined #perl6
19:10 lizmat joined #perl6
19:13 zakharyas joined #perl6
19:14 st_elmo joined #perl6
19:20 mr-foobar joined #perl6
19:34 kybr are named captures allowed: MAIN(.... where /$<right-here>=..../ ....) ?
19:34 setty1 joined #perl6
19:35 dwarring joined #perl6
19:38 kybr m: sub FOO($ip where /$<first>=\d+ \. \d+ \. \d+ \. \d+/) { say $first }
19:38 camelia rakudo-moar 91be8b: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Variable '$first' is not declared. Did you mean '&first'?␤at <tmp>:1␤------> 3first>=\d+ \. \d+ \. \d+ \. \d+/) { say 7⏏5$first }␤»
19:39 hoelzro joined #perl6
19:39 kybr m: my $s = '192.168.0.1' and $s ~~ /$<first>=\d+ \. \d+ \. \d+ \. \d+/
19:39 camelia rakudo-moar 91be8b: ( no output )
19:39 kybr m: my $s = '192.168.0.1' and $s ~~ /$<first>=\d+ \. \d+ \. \d+ \. \d+/ and say($first)
19:39 camelia rakudo-moar 91be8b: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Variable '$first' is not declared. Did you mean '&first'?␤at <tmp>:1␤------> 3irst>=\d+ \. \d+ \. \d+ \. \d+/ and say(7⏏5$first)␤»
19:40 lizmat joined #perl6
19:40 kybr m: my $s = '192.168.0.1' and $s ~~ /$<first>=\d+ \. \d+ \. \d+ \. \d+/ and say($<first>)
19:40 camelia rakudo-moar 91be8b: OUTPUT: «「192」␤»
19:41 jdv79 is it possible to slip a list into a sig instead of having to construct a hash out of it first?
19:42 * kybr was misunderstanding named captures: say $<capture> # not $capture
19:51 nadim m: my $l = (1,2) ; my @a = 1, $l, $l ; dd @a ;
19:51 camelia rakudo-moar 91be8b: OUTPUT: «Array @a = [1, (1, 2), (1, 2)]␤»
19:51 mr-foobar joined #perl6
19:51 nadim m: my $l = (1,2) ; my @a = 1, $l xx 2 ; dd @a ;
19:51 camelia rakudo-moar 91be8b: OUTPUT: «Array @a = [1, ((1, 2), (1, 2)).Seq]␤»
19:52 nadim m: my $l = (1,2) ; my @a = 1, | $l xx 2 ; dd @a ;
19:52 camelia rakudo-moar 91be8b: OUTPUT: «Array @a = [1, (1, 2, 1, 2).Seq]␤»
19:52 nadim m: my $l = (1,2) ; my @a = 1,  $l x 2 ; dd @a ;
19:52 camelia rakudo-moar 91be8b: OUTPUT: «Array @a = [1, "1 21 2"]␤»
19:52 nadim m: my $l = (1,2) ; my @a = 1, |( $l xx 2) ; dd @a ;
19:52 camelia rakudo-moar 91be8b: OUTPUT: «Array @a = [1, (1, 2), (1, 2)]␤»
19:54 Cabanossi joined #perl6
19:55 sufrostico joined #perl6
19:57 rindolf joined #perl6
20:15 TEttinger joined #perl6
20:18 mr-fooba_ joined #perl6
20:24 kst joined #perl6
20:39 aindilis joined #perl6
20:40 lizmat joined #perl6
20:45 ChristopherBotto ugeze: Thanks for responding about my "zef" issue really being a precompilation issue earlier (https://irclog.perlgeek.de/perl6/2017-07-18#i_14888036). What is the best place to find information about how precompilation works so that I can better debug this situation?
21:01 integral joined #perl6
21:03 pilne joined #perl6
21:10 lizmat joined #perl6
21:13 mcmillhj joined #perl6
21:24 setty1 joined #perl6
21:25 ChristopherBotto ugexe: Thanks for responding about my "zef" issue really being a precompilation issue earlier (https://irclog.perlgeek.de/perl6/2017-07-18#i_14888036). After searching a while, I found out that precompilation is stored under `~/.perl6` and after deleting it, the new Rakudo Star installed fine. Thanks!
21:28 setty1 joined #perl6
21:39 parv left #perl6
21:39 Cabanossi joined #perl6
21:44 ab6tract joined #perl6
21:45 ab6tract m: dd [(^)] ( g => 5 ).Bag, (g => -5 ).Bag;  # :(
21:45 camelia rakudo-moar 91be8b: OUTPUT: «("g"=>5).Bag␤»
21:46 Popov_ joined #perl6
21:47 ab6tract .tell lizmat i'm afraid i do not understand why that is a better answer than the actual distance between the values in these two bags.
21:47 yoleaux ab6tract: I'll pass your message to lizmat.
21:48 ab6tract m: dd [(^)] ( g => 5 ).Bag, (g => -6 ).Bag;  # nothing changes? why?
21:48 camelia rakudo-moar 91be8b: OUTPUT: «("g"=>5).Bag␤»
21:49 ab6tract anyway, good night #perl6
21:59 lizmat joined #perl6
22:00 lizmat .
22:00 yoleaux 21:47Z <ab6tract> lizmat: i'm afraid i do not understand why that is a better answer than the actual distance between the values in these two bags.
22:00 lizmat .tell ab6tract (g => -5).Bag === bag(), that's why, you probably want Mixes ?
22:00 yoleaux lizmat: I'll pass your message to ab6tract.
22:01 lizmat m: dd [(^)] ( g => 5 ).Mix, (g => -5 ).Mix
22:01 camelia rakudo-moar 91be8b: OUTPUT: «("g"=>10).Mix␤»
22:11 cpage_ joined #perl6
22:25 zoll joined #perl6
22:27 Xliff joined #perl6
22:40 unicodable6 joined #perl6
22:53 skids joined #perl6
23:16 mcmillhj joined #perl6
23:30 lizmat joined #perl6
23:32 cdg joined #perl6
23:32 mcmillhj joined #perl6
23:54 MasterDuke joined #perl6

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

Perl 6 | Reference Documentation | Rakudo