Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-09-26

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 TimToady m: class Foo { method foo(--> self) {}}; Foo.new.foo.say
00:00 camelia rakudo-moar de8024: OUTPUT«5===SORRY!5=== Error while compiling /tmp/CerzdjtmP3␤Type 'self' is not declared␤at /tmp/CerzdjtmP3:1␤------> 3class Foo { method foo(--> self7⏏5) {}}; Foo.new.foo.say␤»
00:00 TimToady awww
00:01 TimToady maybe we should special-case that for the people who inexplicably like fluent programming
00:02 TimToady me, I can't stand methods that don't know which way the data is flowing through them
00:03 * TimToady is not particularly interested in making fluent programming easy though, but --> self is pretty good documentation that you've got a mutator
00:05 TimToady I wonder if it's possible to move the declaration of self up a little...
00:05 skids .oO(maybe an alternate method dispatcher to '.')
00:05 TimToady like, say, .=
00:06 TimToady which could probably optimize more if it sees a --> self
00:07 TimToady well, self isn't exactly a compile-time value, so just declaring it earlier won't help, likely
00:09 ShimmerFairy I think chaining mutating method calls is really only useful where you find your self writing a lot of methods that don't return anything, because there you can say "why not return C<self>?". Otherwise, useful return values tend to trump fancy method chaining, I feel :)
00:10 mr_ron left #perl6
00:12 salv0 joined #perl6
00:14 pink_mist well of course if you're returning something else that trumps method chaining ... method chaining is for when you aren't returning something else
00:16 ShimmerFairy TimToady: another issue could be if someone tried  method foo(Class \SELF: $param --> SELF) { ... }  , so the initial impulse to just special-case 'self' there is obviously not adequate :)
00:18 ShimmerFairy m: my @a = 1,2,3; my $s = @a; for $s { say "A" }; $s.map: { say "B" }
00:18 camelia rakudo-moar de8024: OUTPUT«A␤B␤B␤B␤»
00:18 ShimmerFairy huh, I thought single-arg was supposed to fix that :(
00:19 TimToady the GLRR pays attention to $ there
00:20 TimToady so you need @$s or so
00:20 TimToady m: class Foo { method foo(\SELF: --> SELF) {}}; Foo.new.foo.say
00:20 camelia rakudo-moar de8024: OUTPUT«===SORRY!===␤No compile-time value for SELF␤»
00:21 TimToady well, when we get --> $reval that should fall out pretty easily
00:22 ShimmerFairy that's unfortunate. I understand that $ protection was the sanest way to handle the problems people were having, but on the other hand I still think people should've been using  given $s { }  instead, in this one case :)
00:28 kanishka joined #perl6
00:30 TimToady it wasn't just that one case
00:31 TimToady @array.push: $element
00:31 TimToady we're not gonna define two different method names for every method that has the issue
00:33 ShimmerFairy Like I said, making $ protect against single-arg certainly seems like the best solution to the problem. If it means losing perfect  for $s <-> $s.map  equivalence, then oh well :)
00:39 sufrostico joined #perl6
00:44 zostay m: sub f(Pair:D $v) { ++$v.value }; my $x = 10; say f('x' => $x); say f('y' => 42);
00:44 camelia rakudo-moar 0024b0: OUTPUT«11␤Parameter '$a' expected a writable container, but got Int value␤  in sub f at /tmp/kYON57D75i:1␤  in block <unit> at /tmp/kYON57D75i:1␤␤»
00:44 zostay how do i tell if $v.value has been bound to an immutable value or to a variable?
00:47 ShimmerFairy m: sub f(Pair:D $v) { $v.value.VAR.WHAT }; my $x = 10; say f('x' => $x); say f('y' => 42);  # you probably shouldn't check like this, though
00:47 camelia rakudo-moar 0024b0: OUTPUT«(Scalar)␤(Int)␤»
00:49 zostay yeah, that probably doesn't work well... i think i'd catch the failure and react instead
00:50 zostay i'll go with that unless someone has a better answer
00:51 ShimmerFairy zostay: I think the best solution would be to do  { ++$v.value; CATCH { #`(handle error here) } }
01:05 adu joined #perl6
01:06 awwaiid m: use MONKEY-TYPING; augment class List { method first { self[0] } } ; (1, 2, 3).first # muahaha
01:06 camelia rakudo-moar 0024b0: ( no output )
01:06 awwaiid m: use MONKEY-TYPING; augment class List { method first { self[0] } } ; say (1, 2, 3).first # muahaha
01:06 camelia rakudo-moar 0024b0: OUTPUT«1␤»
01:30 vendethiel joined #perl6
01:33 tokuhiro_ joined #perl6
01:46 zostay whoo it even has a nice neat X::Assignment::RO exception to work from ++
02:24 nightfrog joined #perl6
02:33 aborazmeh joined #perl6
02:34 aborazmeh joined #perl6
02:34 tokuhiro_ joined #perl6
02:38 flussence .oO( I see in the backlog I'm not the only one interested in gentoo integration :D )
02:39 ShimmerFairy flussence: I couldn't even begin to actually _do_ it, mind you, but I do think it'd be neat if from the gentoo angle we could say "_our_ module system doesn't make gentoo use an external tool" :P
02:40 noganex_ joined #perl6
02:43 flussence it'd be pretty neat to have a CUR::Local::VDB or something along those lines to make p6 aware of system-installed stuff - but I've no idea where to begin with something like that either.
02:43 JimmyZ .tell lizmat Do we need s/trait_mod/trait-mod/g too? I see a lot of trait_mod:<x> used.
02:43 yoleaux JimmyZ: I'll pass your message to lizmat.
02:46 adu joined #perl6
03:23 Timbus_ is `x` in this case any verb? or are we still limited to is, does, etc
03:41 dalek ecosystem: ce32c76 | (Sterling Hanenkamp)++ | META.list:
03:41 dalek ecosystem: Remove KnottyList from the Perl6 ecosystem
03:41 dalek ecosystem:
03:41 dalek ecosystem: Since Perl 6's own Pair know handles binding, KnottyPair is mostly redundant.
03:41 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/ce32c76173
03:50 dalek doc: 8e3c7d4 | (David Farrell)++ | lib/Type/Iterable.pod:
03:50 dalek doc: fix typos
03:50 dalek doc: review: https://github.com/perl6/doc/commit/8e3c7d465d
03:50 dalek doc: 4801399 | (David Farrell)++ | lib/Type/Iterable.pod:
03:50 dalek doc: Merge pull request #135 from dnmfarrell/master
03:50 dalek doc:
03:50 dalek doc: fix typos
03:50 dalek doc: review: https://github.com/perl6/doc/commit/4801399f79
03:51 zostay joined #perl6
04:02 rurban joined #perl6
04:11 dalek rakudo/nom: c8ec299 | TimToady++ | src/core/Rat (2 files):
04:11 dalek rakudo/nom: speed up Rat addtion by reducing lazily
04:11 dalek rakudo/nom:
04:11 dalek rakudo/nom: About 20% faster when adding a bunch of things with the same denominator.
04:11 dalek rakudo/nom: We do this by being lazy about reducing the fractions till we need them
04:11 dalek rakudo/nom: reduced, that is, when we're about to display them in a way that reveals the
04:11 dalek rakudo/nom: .nude bits, or compare them in a way which needs to know integer status.
04:11 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c8ec2999be
04:31 dalek rakudo/nom: 0132b65 | TimToady++ | src/core/StrDistance.pm:
04:31 dalek rakudo/nom: bit of GLR residue
04:31 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0132b65410
04:36 tokuhiro_ joined #perl6
04:36 telex joined #perl6
04:45 dalek roast: 90c84b8 | skids++ | S02-literals/heredocs.t:
04:45 dalek roast: Add tests for RT#117705
04:45 dalek roast: review: https://github.com/perl6/roast/commit/90c84b8de1
04:52 TimToady couple of mysterious failures with tr/// that might or might not be my fault, though they look susiciously GLRish
04:52 TimToady but backing out various of my patches doesn't seem to fix it, so I dunno...
04:58 jack_rabbit_ joined #perl6
05:09 Sgeo joined #perl6
05:22 Sgeo joined #perl6
05:29 tokuhiro_ joined #perl6
05:34 ShimmerFairy blog post!    https://shimmeryfairy.wordpress.com/2015/09/25/my-rewrite-ish-of-s32stringy-finally-done/
05:34 TEttinger joined #perl6
05:35 JimmyZ oh, long post/gist, ShimmerFairy++
05:40 JimmyZ but, why STRING? not String?
05:41 ShimmerFairy JimmyZ: that just takes advantage of the ::T syntax for using the same type as a constraint later on (as I understand it).
05:41 ShimmerFairy m: sub foo(Real ::R $a, R $b) { say 'OK!' }; foo(1, 2);
05:41 camelia rakudo-moar 0132b6: OUTPUT«OK!␤»
05:41 ShimmerFairy m: sub foo(Real ::R $a, R $b) { say 'OK!' }; foo(1, 2.0);
05:41 camelia rakudo-moar 0132b6: OUTPUT«Type check failed in binding $b; expected Int but got Rat␤  in sub foo at /tmp/CEZJ2A8OTX:1␤  in block <unit> at /tmp/CEZJ2A8OTX:1␤␤»
05:41 JimmyZ oh ,it is a  type.
05:42 JimmyZ *type name
05:42 ShimmerFairy I used all-caps because the single-letter usage does, and because it makes it look like a funny type (so you're not so quick to think it's a "real" type) :)
05:46 ShimmerFairy JimmyZ: basically, I tried being as explicit as possible in writing those function signatures, so a potential implementor reading could see what the function expects to get and what it should return :)
05:50 JimmyZ ShimmerFairy: fair enough :)
06:18 szabgab joined #perl6
06:18 szabgab Good time!
06:18 szabgab rakudo: my %h; say %h{'a'}.elems;
06:18 camelia rakudo-moar 0132b6: OUTPUT«1␤»
06:19 szabgab what did I do there ? Why is that return 1 ?
06:22 szabgab rakudo: my %h; if not %h{'a'}:exists { %h{'a'} = [] }; say %h{'a'}.elems;
06:22 camelia rakudo-moar 0132b6: OUTPUT«0␤»
06:22 szabgab and probably this is what I wanted...
06:25 rindolf joined #perl6
06:26 ShimmerFairy m: my %h; say %h<a>.perl
06:26 camelia rakudo-moar 0132b6: OUTPUT«Any␤»
06:31 helloworldlang joined #perl6
06:33 helloworldlang p6: my $lastval = 4; sub lastval is rw { $lastval }; dd $lastval; lastval() = 5; dd $lastval
06:33 camelia rakudo-moar 0132b6: OUTPUT«Int $lastval = 4␤Int $lastval = 5␤»
06:33 helloworldlang p6: my $lastval = 4; sub lastval is rw { return $lastval }; dd $lastval; lastval() = 5; dd $lastval
06:33 camelia rakudo-moar 0132b6: OUTPUT«Int $lastval = 4␤Cannot assign to a readonly variable or a value␤  in block <unit> at /tmp/tmpfile:1␤␤»
06:38 _mg_ joined #perl6
06:38 ShimmerFairy helloworldlang: you currently need  return-rw  to make the explicit return work right if you want  is rw  (and yes, it's not optimal)
06:40 helloworldlang p6: my $lastval = 4; sub lastval is rw { return-rw $lastval }; dd $lastval; lastval() = 5; dd $lastval
06:40 camelia rakudo-moar 0132b6: OUTPUT«Int $lastval = 4␤Int $lastval = 5␤»
07:20 JimmyZ .tell Timbus_ is/does/of/returns/ etc, see traits.pm
07:20 yoleaux JimmyZ: I'll pass your message to Timbus_.
07:29 darutoko joined #perl6
07:31 tokuhiro_ joined #perl6
07:37 Timbus_ JimmyZ, http://design.perl6.org/S14.html#line_389
07:37 yoleaux 07:20Z <JimmyZ> Timbus_: is/does/of/returns/ etc, see traits.pm
07:38 vendethiel joined #perl6
07:40 Timbus_ 'feels like' it implies anything can be declared, but i guess it doesn't say it.
07:49 araujo joined #perl6
08:06 bjz joined #perl6
08:18 espadrine joined #perl6
08:22 domidumont joined #perl6
08:29 domidumont joined #perl6
09:00 spider-mario joined #perl6
09:12 masak antenoon, #perl6
09:18 DrForr Mere *minutes* after noon here...
09:21 samarkand joined #perl6
09:22 samarkand Hi, how can I add a dependency (third-party library) to my perl 6 project?
09:24 nowan joined #perl6
09:28 moritz samarkand: I don't think non-Perl 6 dependencies are tracked
09:28 moritz samarkand: nor have I heard of a good way to do it yet
09:29 samarkand so if there's a perl 6 library, there's no way to use it in my perl 6 project, is that what you're saying?
09:30 samarkand @moritz
09:31 moritz samarkand: oh no, I misunderstood
09:31 moritz samarkand: sorry, I thought you meant non-Perl6 dependencies by "third-party" :-)
09:31 DrForr Oh, third-party library as in other perl6 library. Isn't that just a dependency line in META.info?
09:31 samarkand only perl 6
09:31 moritz samarkand: you can specify dependencies in your META.info
09:32 moritz see http://doc.perl6.org/language/modules
09:32 samarkand in META.info, is that it? and how to make them actually installed? like in ruby you'd say "bundle install"
09:32 DrForr panda track the dependencies.
09:33 DrForr *tracks
09:33 samarkand thank you, understood.
09:33 moritz https://github.com/tadzik/Bailador/blob/master/META.info for an example
09:33 samarkand thanks.
09:35 samarkand joined #perl6
09:36 samarkand I've forgotten to ask. Is that only modules.perl6.org? How about installing from github?
09:36 samarkand or from CPAN? Possible?
09:38 JimmyZ samarkand: https://github.com/perl6/ecosystem
09:39 samarkand thx
09:41 nowan joined #perl6
09:43 leont joined #perl6
09:47 ShimmerFairy moritz: it's META6.json, not META.info, though
09:55 helloworldlang panda can install module from git://* uri
10:00 helloworldlang can perl6 run faster then perl5 in futrue ?
10:01 DrForr That's the hope...
10:04 AlexDaniel joined #perl6
10:05 xfix joined #perl6
10:05 xfix joined #perl6
10:09 Woodi hi today :)
10:11 Woodi just this hit me - could we define here some small, simple, easy to implement language and name it PerlScript ? ;)
10:13 DrForr Just take JavaScript and add sigils?
10:13 Woodi but about "fluent programming" or APIs... I'm a bit surprised discussions about it do not mention other discusions on "Do not use method chaining!" topic
10:13 Woodi DrForr: I don't know, just idea was flying by ;)
10:15 DrForr The key would be to get it installed in browsers.
10:15 Woodi and looks "fluent APIs" are just method chaining but spirit of it it/quality of API is decided in domain space, not syntax or things like that...
10:16 Woodi maybe I should just learn JavaScript :)
10:17 DrForr That was ovid's talk? I haven't seen the talk, I was ... somewhat occupied.
10:19 Woodi what is purpose of "is raw" or "is Storable", from user perspective ? passing some data-blob via 2+ calls ?
10:23 DrForr Simpler way to serialize attributes?
10:23 Woodi if it helps somehow I think ppls buy 2x more sliced&packed bread ;)
10:24 Woodi DrForr: oops, probably is raw and Storable/is rw are 2 separate things...
10:29 DrForr Yep, 'raw' has no relation to 'rw' as far as I know.
10:31 zakharyas joined #perl6
10:54 timotimo "is raw" causes no re-containerization at all, "is rw" causes no "readonly-recontainerization"
10:56 Woodi timotimo: but why user wants to use .raw ? at least examples needed...
10:57 psch Woodi: "is raw" is the trait-equivalent of using a sigilless parameter
10:57 psch "sub f(\a) { ... }" <=> "sub f($a is raw) { ... } "
10:58 Woodi actually, \a is very sigil-full ;)
10:59 timotimo only in declaration, not in use
10:59 timotimo you use "is raw" if you want to pass something through without imposing anything container-ish on it
11:00 Woodi timotimo: why anything need to be artificially packed in additional container ?
11:01 Woodi I know that it is VM and everything is kind of PMC... but one or the other is strange :)
11:01 jnthn Because $[1,2,3] shouldn't lose its itemization.
11:01 yoleaux 25 Sep 2015 20:29Z <nine> jnthn: the Slang.new failure started appearing in the range 94bc1a9..65129cf
11:01 yoleaux 25 Sep 2015 20:45Z <nine> jnthn: or...not. When I checkout 94bc1a9 and rebuild nqp/Moar I still get "Method 'new' not found for invocant of class '$?CLASS'". But with rakudo from this afternoon it worked.
11:01 yoleaux 25 Sep 2015 22:40Z <lizmat> jnthn: please read https://gist.github.com/lizmat/f3807956c354c14902a3 for first stab at CURLI revival
11:02 Woodi jnthn: ah, to pass something by.
11:04 timotimo scalar containers is kind of how we do things
11:04 jnthn .tell nine Note that 663e71a4e0 and later in Moar require the change done in 44ad04a88 in Rakudo
11:04 yoleaux jnthn: I'll pass your message to nine.
11:08 jdv79 RabidGravy: oddly http://www.punoftheday.com/cgi-bin/todayspun.pl hangs up H::UA
11:08 jdv79 but it finished.  i think after an wait or sommething...
11:08 jdv79 *finishes
11:12 jnthn .tell lizmat Read it, will ponder, thanks. :)
11:12 yoleaux jnthn: I'll pass your message to lizmat.
11:19 lizmat messages!
11:19 yoleaux 25 Sep 2015 23:09Z <tony-o> lizmat: does this mean that i'm open to putting whatever i want in a CURLI manifest file?  how does CURLF store information about multiple modules with :auth and :ver?  how do i handle *not* being able to write to a precomp directory, is that a total failure for installing the module?  this doesn't seem to imply that a CURLF and CURLI should have the same interface, does the loader behave differently depending on
11:19 yoleaux which on
11:19 yoleaux 25 Sep 2015 23:11Z <ShimmerFairy> lizmat: left a comment on your gist, hope it helps! :)
11:19 yoleaux 02:43Z <JimmyZ> lizmat: Do we need s/trait_mod/trait-mod/g too? I see a lot of trait_mod:<x> used.
11:19 yoleaux 11:12Z <jnthn> lizmat: Read it, will ponder, thanks. :)
11:32 nine Surprise: trying to turn Bool into a proper Enumeration is full of bootstrap issues
11:32 yoleaux 11:04Z <jnthn> nine: Note that 663e71a4e0 and later in Moar require the change done in 44ad04a88 in Rakudo
11:33 psch S99:Circularity_saw
11:33 * psch stops snarking
11:34 psch nine: i've poked at that as well, quite some time ago
11:34 nine psch: any pointers at what cannot possibly work?
11:34 tokuhiro_ joined #perl6
11:36 masak "hopefully in a way that the resulting splice will be very difficult for the end-user to notice in day-to-day use." -- I think the general landscape of hope is slightly better than this description implies.
11:37 masak the place where the circularity saw cuts matters a lot to the implementor, but for the user it can usually be made either 100% invisible or very nearly so.
11:37 psch nine: nothing helpful comes to mind, unfortunately
11:37 masak (I liked the rest of http://design.perl6.org/S99.html#circularity_saw -- nicely done, whoever wrote it)
11:43 * lizmat commented on https://gist.github.com/lizmat/f3807956c354c14902a3  ShimmerFairy tony-o nine
11:44 lizmat JimmyZ: I think at least at the Perl 6 level, it would need to be called trait-mod
11:45 lizmat but this is one of the things all the way down into nqp itself
11:45 lizmat jnthn will not be happy with such a change
11:48 lizmat m: say +StrDistance.new(:before("foo"),:after("zoo"))   # shouldn't that just work ?
11:48 camelia rakudo-moar 0132b6: OUTPUT«Cannot make a Block object using .new␤  in block <unit> at /tmp/RPwa8ZBCR8:1␤␤»
11:49 FROGGS joined #perl6
11:49 FROGGS lizmat: will read now
11:49 yoleaux 25 Sep 2015 21:11Z <hoelzro> FROGGS: that S26 example you posted that looked buggy is fine; you need a whitespace between '#|' and your comment
11:50 yoleaux 25 Sep 2015 22:40Z <lizmat> FROGGS: please read https://gist.github.com/lizmat/f3807956c354c14902a3 for first stab at CURLI revival
11:51 FROGGS lizmat: I very much disagree about the statements about CURLF
11:51 * Woodi just found R* 2015.09.tgz ! o/  # impatience-tortures: off :)
11:51 lizmat FROGGS: could you leave it as a comment?
11:52 FROGGS lizmat: and I think we already agreed on a need of an install method of CURLF, which also implies that it should support precomp
11:52 FROGGS lizmat: will do
11:52 lizmat okidoki!  :-)
11:53 [Tux] has RT#124082 been resolved? Really? WOW
11:54 [Tux] This one is new:
11:54 [Tux] Parameter '$self' expected a writable container, but got Str value
11:55 [Tux] $name ~~ s{"-"} = "_";
11:56 psch m: my $n = "foo"; $n ~~ s{"f"} = "F"; say $n
11:56 camelia rakudo-moar 0132b6: OUTPUT«Foo␤»
11:56 psch m: my $n := "foo"; $n ~~ s{"f"} = "F"; say $n
11:56 camelia rakudo-moar 0132b6: OUTPUT«Parameter '$self' expected a writable container, but got Str value␤  in block <unit> at /tmp/ZiVu90D9Gc:1␤␤»
12:09 lizmat afk for a few hours&
12:13 yqt joined #perl6
12:25 FROGGS .tell lizmat I commented: https://gist.github.com/lizmat/f3807956c354c14902a3#gistcomment-1582671
12:25 yoleaux FROGGS: I'll pass your message to lizmat.
12:25 spider-mario joined #perl6
12:31 aristotle joined #perl6
12:35 aristotle TimToady: a thought I had recently is that one day it may become a good idea to remove all the then-formerly helpful error message hints à la “where you trying to write Perl 5 here?”
12:35 aristotle c.f. http://nntp.perl.org/group/perl.perl5.porters/231036
12:37 aristotle (the thread is about a bug in the Perl 5 regexp compiler’s attempt to parse patterns for a POSIX regexp construct solely to warn that it isn’t supported)
12:37 FROGGS moritz: HTTP::Easy needed a fix, which is already in
12:39 FROGGS aristotle: yes, I also think that the P5ism catchers can go away at some point
12:39 ShimmerFairy I don't think they're quite useless just yet, but they definitely aren't meant to be forever :)
12:40 aristotle certainly not useless now
12:40 * FROGGS nods
12:41 moritz fwiw some of the (like for =~, and . for string concatenation) are often useful to me
12:41 moritz because I switch a lot between 5 and 6, and sometimes my brain lags behind
12:42 FROGGS aye
12:42 FROGGS let's just rethink their usefulness in two decades :o)
12:43 ShimmerFairy None of them are useful for me :P
12:43 aristotle as I said, this is about one day someday in the future. Perl 5 is far that point in its cycle; for Perl 6 it’s a long ways off. that’s what I wrote in the post I linked to
12:43 ShimmerFairy The only ones I have an issue with, though, are where they break things out of superstitious worry of P5isms. The thing I'm thinking of:
12:43 ShimmerFairy m: say <>
12:43 camelia rakudo-moar 0132b6: OUTPUT«5===SORRY!5=== Error while compiling /tmp/OSyuRs0jnu␤Unsupported use of <>; in Perl 6 please use lines() to read input, ('') to represent a null string or () to represent an empty list␤at /tmp/OSyuRs0jnu:1␤------> 3say <7⏏5>␤»
12:43 ShimmerFairy m: my %h; say %h<>
12:44 camelia rakudo-moar 0132b6: OUTPUT«␤»
12:44 ShimmerFairy Even better considering the zen slice. I don't see any good reason <> should be more severe than a warning.
12:44 masak nine: re turning Bool into an enumeration: the reason it isn't one this late in the game is that it's been full of bootstrap issues this whole time.
12:44 FROGGS .tell hoelzro I agree that there is whitespace missing afetr the #|, but why does the absence of the #| change anything?
12:44 yoleaux FROGGS: I'll pass your message to hoelzro.
12:45 masak nine: I also don't have any answers, but I will consider the day we succeed in making it one a fairly big watershed moment :)
12:47 aristotle FROGGS: I’m bringing it up because it seems that it hasn’t crossed anybody’s mind when it comes to Perl 5 – or maybe the people who thought of it at the time are longer around –, so those porting aids and their usefulness never did get revisited (/cc TimToady)
12:48 FROGGS yeah, long forgotten probably
12:48 rurban joined #perl6
12:49 [Tux] test             50000    34.845    34.738
12:49 [Tux] test-t           50000    35.543    35.436
12:52 [Tux] RT#124082 looked fixed because the error message changed
12:57 psch m: Num.range.say
12:57 camelia rakudo-moar 0132b6: OUTPUT«Method 'range' not found for invocant of class 'Num'␤  in block <unit> at /tmp/fqWlgOlyDj:1␤␤»
12:57 psch m: Num.Range.say
12:57 camelia rakudo-moar 0132b6: OUTPUT«-Inf..Inf␤»
12:58 mr_ron joined #perl6
12:58 psch [Tux]: unless you're about Inf !~~ Int..?
12:59 psch +talking :l
13:00 [Tux] http://tux.nl/Talks/CSV6/test-t.png
13:01 [Tux] m: my Int $i; $i = Int.Range.max;
13:01 camelia rakudo-moar 0132b6: OUTPUT«Type check failed in assignment to $i; expected Int but got Num␤  in block <unit> at /tmp/I1RROPjblb:1␤␤»
13:02 [Tux] the error changed from "expected 'Int' but got 'Num'" to "expected Int but got Num"
13:02 [Tux] the quotes were dropped
13:02 Begi joined #perl6
13:03 psch [Tux]: so the actual bug is RT #61602, not RT #124082?
13:03 Begi Hey ! What is the easiest way to code a chat application?
13:04 ShimmerFairy Yeah, that's the infamous Inf problem right there (and the Int.Range.max example isn't even that new :P)
13:05 moritz Begi: the easiest way is to use an existing one
13:06 Begi moritz: educational purposes, I'd build my own
13:06 btyler_ Begi: here's a non-blocking TCP chat* server in ~20 lines: https://gist.github.com/kanatohodets/8ffb1a18ff04c80225cc
13:06 [Tux] psch, maybe. That got rejected though
13:06 btyler_ * preferred chat client: telnet
13:07 zakharyas1 joined #perl6
13:07 btyler_ (I hacked that up for a lightning talk at YAPC::EU; you might want to do something more elaborate, like using a real chat protocol instead of bytes on TCP :))
13:07 ShimmerFairy [Tux]: it's a mistake that it's rejected; it's an issue, stalled as it may be
13:08 psch [Tux]: it got moved to the specs github issue, i agree with ShimmerFairy that it shouldn't be outright rejected, but i don't know if RT has "stalled" or something similar
13:08 psch oh
13:08 ShimmerFairy psch: it does, actually. I think it was the only stalled ticket left (or at least one of them) :)
13:08 psch RT has stalled, yeah
13:08 psch i just saw [Coke] changing it from stalled to open to rejected
13:09 [Tux] I had several discussions about it with lizmat and masak and I *do* understand the problem
13:09 [Tux] I'll change the RT number in my bug tester to prevent future confusion
13:10 ShimmerFairy .tell [Coke] I believe it's a mistake for you to reject RT #61602 -- it may not have a solution in the foreseeable future, but rejection should apply to tickets we _know_ are invalid, not tickets about the still-decided. 'stalled' is more appropriate for it, like it was
13:10 yoleaux ShimmerFairy: I'll pass your message to [Coke].
13:17 rurban joined #perl6
13:24 diana_olhovik joined #perl6
13:25 brrt joined #perl6
13:31 masak "The main concern among us Angular developers recently has been the future of our existing Angular 1 apps." -- p5:p6 :: ng1:ng2 -- http://www.codelord.net/2015/09/10/angular-2-migration-path-what-we-know/
13:31 moritz m: https://gist.github.com/moritz/5cda6371ab3cfec3254e
13:31 camelia rakudo-moar 0132b6: OUTPUT«Proxy␤Method␤»
13:32 moritz why does the last line print Method here?
13:32 moritz and not Int?
13:33 masak good question.
13:33 masak does just `$mv.varies` print 6?
13:33 moritz masak: no, it says <anon>
13:34 RabidGravy joined #perl6
13:34 ShimmerFairy moritz: Well, it's because you mapped those keys to Method objects, no?
13:35 masak sounds wrong to me.
13:35 masak ShimmerFairy: isn't that the way you implement a Proxy, though?
13:35 ShimmerFairy masak: I've never seen the method keyword used with it, I don't think. Just plain closures
13:35 masak you give FETCH and STORE a callable each. doesn't mean they get exposed.
13:36 masak ShimmerFairy: the presence of the `method` keyword there is practically irrelevant.
13:36 tokuhiro_ joined #perl6
13:36 moritz ShimmerFairy: the 'method' keyword just means they get an invocant
13:37 masak m: my &c1 = sub ($obj, $x) { say "$obj: $x" }; my &c2 = method ($obj: $x) { say "$obj: $x" }; say c1("OH HAI", 42); say "OH HAI".&c2(42)
13:37 camelia rakudo-moar 0132b6: OUTPUT«OH HAI: 42␤True␤OH HAI: 42␤True␤»
13:37 masak m: my &c1 = sub ($obj, $x) { say "$obj: $x" }; my &c2 = method ($obj: $x) { say "$obj: $x" }; c1("OH HAI", 42); "OH HAI".&c2(42)
13:37 camelia rakudo-moar 0132b6: OUTPUT«OH HAI: 42␤OH HAI: 42␤»
13:37 masak ShimmerFairy: ^
13:37 masak it's only a matter of intent, not a matter of differing semantics.
13:37 moritz huh
13:38 moritz but changing it to a sub instead helps indeed
13:38 moritz wtf?
13:38 masak ok, bug
13:38 * masak submits rakudobug
13:38 masak it's probably special-cased where it oughtn't be
13:38 moritz lib/NativeCall/Types.pm also uses Proxy with method
13:39 jdv79 i think i ran into that a few months ago and just ignored it when someone showed me the working one
13:39 masak let's fix it instead :P
13:39 moritz does that mean the ones in Nativecall::Types are also broken? And why has nobody noticed that, if true?
13:40 masak ++moritz # for finding out
13:58 hoelzro FROGGS: are you talking about your class Foo { method bar { } #= baz␤}; say Foo.^find_method('bar')[0].WHY example?
13:58 yoleaux 12:44Z <FROGGS> hoelzro: I agree that there is whitespace missing afetr the #|, but why does the absence of the #| change anything?
13:58 hoelzro m: class Foo { method bar { } #= baz␤}; say Foo.^find_method('bar')[0].WHY
13:58 camelia rakudo-moar 0132b6: OUTPUT«(Any)␤»
13:58 moritz hoelzro: fwiw a nice syntax would be Foo.WHY('bar')
13:58 hoelzro I don't know why that doesn't work with camelia, but it works on a local Perl 6
13:59 hoelzro moritz: that's not a bad idea
13:59 jdv79 ok, so a .pm file with no use v6 and no modeline
13:59 jdv79 is it acceptable to not consider that p6?
13:59 brrt joined #perl6
13:59 jdv79 Algorithm::Elo for instance
14:00 moritz jdv79: well, I think that's a pretty simple heuristic, but often good enough
14:00 brrt .tell jnthn using nqp i can make a reliable inlined-notinlined pair using a getlex to another frame
14:00 yoleaux brrt: I'll pass your message to jnthn.
14:00 jdv79 i'm asking when its not
14:01 brrt .tell jnthn i can't repeat the issue outside of the compiler yet, and can't see anything obviously wrong with it
14:01 yoleaux brrt: I'll pass your message to jnthn.
14:01 jdv79 context is cpanish things but i think in general its a valid question
14:02 hoelzro jdv79: what's this heuristic for?
14:02 jdv79 determining if a file is p6 pod extractable
14:02 diana_olhovik_ joined #perl6
14:02 jdv79 in this very specific case
14:03 jdv79 but is it a bad thing, i guess i'm asking roudabout, to enforce the simple heuristics
14:03 moritz well, if a repo has a META.info, you could look into is "provides" section
14:04 jdv79 huh?
14:05 hoelzro ah
14:05 hoelzro well, S02 says that use v6 is an indicator, or if the first non-comment non-empty line has /'unit'? ['module' || 'class' || 'grammar' || 'role']/
14:05 hoelzro I think that listing is flexible
14:05 hoelzro if the first non-comment, non-empty line of a file contains a module, class, grammar, or role declaration
14:05 hoelzro you can consider it Perl 6
14:05 jdv79 oh right, forgot about that.  duh.
14:06 jdv79 thanks
14:06 hoelzro np
14:07 moritz jdv79: https://github.com/tadzik/Bailador/blob/master/META.info if you look into "provides", it lists all Perl 6 modules there
14:07 moritz that way you don't need a heuristic at all
14:07 colomon moritz++
14:07 samarkand joined #perl6
14:08 moritz it won't work for separate .pod files, but then the "use v6;" heuristic doesn't work for those either
14:08 moritz also we could add references to documentation files in META.info too
14:08 jdv79 yeah, its just a matter of how certain things poke at files in isolation
14:08 samarkand Hi, how can I do this?
14:08 samarkand $my_template_str = "My string $var1 something";
14:08 samarkand # some stuff.....
14:08 samarkand # and then applying some variable to $my_template_str
14:08 samarkand $var11 = "aaabbb";
14:08 samarkand $my_template_str.apply($var1 => $var11);
14:08 samarkand # => "My string aaabbb something";
14:08 samarkand sorry for the bad formatting
14:08 jdv79 trying to avoid large changes
14:09 moritz samarkand: there's a very simple way: use a subroutine
14:09 hoelzro FROGGS: interestingly enough, a newline between { and method fixes the problem
14:09 samarkand @mortiz, I mean, string interpolation or something
14:09 moritz samarkand: my $template = sub (:$var1) { " string $var1 something" }
14:09 ShimmerFairy moritz: as I understand, it's not called META.info. Or did I miss something?
14:09 moritz samarkand: and then  my $result = $template( var1 => 'abc')
14:09 jdv79 hoelzro: where is that in S02 again?  i'm blind.
14:10 moritz ShimmerFairy: could also be META.json or so
14:10 samarkand thanks, is that the only way?
14:10 hoelzro jdv79: I have misquoted, looking
14:10 ShimmerFairy moritz: I wish we would settle on one name (I thought we had with META6.json). It's kinda annoying, honestly :/
14:10 diana_olhovik joined #perl6
14:10 jnthn m: my $template = { "My string $:var1 something" }; say $template(var1 => 'eats') # another way
14:10 yoleaux 14:00Z <brrt> jnthn: using nqp i can make a reliable inlined-notinlined pair using a getlex to another frame
14:10 camelia rakudo-moar 0132b6: OUTPUT«My string eats something␤»
14:10 yoleaux 14:01Z <brrt> jnthn: i can't repeat the issue outside of the compiler yet, and can't see anything obviously wrong with it
14:10 samarkand jnthn, mortiz - that's it, thx
14:11 jnthn samarkand: That ways (wht $:foo placeholder params) is perhaps the least repetitive way I can think of :)
14:11 moritz ShimmerFairy: aye; though the list in ecosystem points to the file directly, so it's only half bad
14:11 FROGGS_ joined #perl6
14:11 ShimmerFairy moritz: for as long as we use the ecosystem over CPAN, at least :P
14:11 hoelzro jdv79: http://design.perl6.org/S01.html#line_104
14:12 jnthn .tell brrt Ugh...I think we may really have to catch the mis-lookup under the debugger to actually figure this one out, or just dump a crapload of debugging output
14:12 yoleaux jnthn: I'll pass your message to brrt.
14:12 moritz ShimmerFairy: well, there's an easy fix: submit pull requests to all modules to change the name
14:12 jdv79 cpan uses META6.json as specced
14:12 pink_mist jnthn++ that template example was great! awesomely powerful feature of perl6 =)
14:13 jdv79 hoelzro: thanks
14:13 hoelzro sure thing!
14:14 moritz ah yes, the good old $:foo trick
14:14 moritz Math::Model uses that for good measure
14:21 zakharyas joined #perl6
14:26 jdv79 still stuff in the ecosystem that doesn't compile
14:32 diana_olhovik joined #perl6
14:33 jdv79 because of unit i mean
14:33 jdv79 a little surprising
14:34 [Coke] ShimmerFairy: it's a bug in the spec, not a bug in rakudo.
14:34 yoleaux 13:10Z <ShimmerFairy> [Coke]: I believe it's a mistake for you to reject RT #61602 -- it may not have a solution in the foreseeable future, but rejection should apply to tickets we _know_ are invalid, not tickets about the still-decided. 'stalled' is more appropriate for it, like it was
14:34 [Coke] once the spec issues are resolved, if the answer is "yes, we need that", then sure, we reopen the ticket.
14:37 moritz anybody want to discuss the security implications of NFG?
14:38 moritz friends of mine organize a capture-the-flag contest, and I foolishly promised to write an exploitable service for them
14:38 moritz in Perl 6, no less :-)
14:39 moritz so, I thought about having a secret flag in a file that's in a decomposed form, and blacklist that name, but make is accessible via the composed form, or something
14:40 moritz or maybe that the character length of the file name is limited, and in NFG it's shorter than the limit because it's more compactly composed, or something
14:40 moritz anybody have any good ideas on an NFG-exploitable service that looks plausibly secure to somebody not familiar with NFG?
14:43 skids joined #perl6
14:46 diana_olhovik joined #perl6
14:49 samarkand joined #perl6
14:49 samarkand I wonder, what's the default or most popular naming convention?
14:49 samarkand Is it
14:49 samarkand a) my-metho
14:49 samarkand b) my_method
14:49 samarkand It seems it's "a", doesn't it? But I do keep seeing "b"
14:51 khw joined #perl6
14:52 jdv79 there's seems some sort of bent for kebabing
14:53 jdv79 i don't get it - maybe because it can be done
14:53 diana_olhovik_ joined #perl6
14:54 samarkand I wonder, what's the default or most popular naming convention?
14:54 samarkand Is it a) 'my-method' or b) 'my_method'
14:54 samarkand It seems it's "a", doesn't it? But I do keep seeing "b" as well.
14:54 jdv79 a
14:54 jdv79 aka kebab casing
14:54 samarkand ok
14:55 jdv79 http://design.perl6.org/S99.html#kebab_case
14:57 awwaiid yay new rakudo star!
14:57 diana_olhovik joined #perl6
14:58 awwaiid I offered to show rakudo off to some people here at StrangeLoop (all of you should be here, btw), but haven't had takers. I might start tackling people. I REALLY wish I had hit the deadline and had a chance of presenting here... this is definitely a prime target audience
14:59 mn080202 joined #perl6
15:00 mn080202 hey guys can I call methods on action object from lambda inside of grammar?
15:00 mn080202 *or girls
15:01 mn080202 so I want inline action in a grammar to call method on action object when parsing
15:01 mn080202 is that possible
15:01 mn080202 or do I have to have a method on the grammar to do it like <.methodIwanttocall>
15:02 moritz mn080202: iirc the actions object is in $*ACTIONS, so you can just call a method on it
15:03 mn080202 thanks moritz you are the man
15:04 moritz mn080202: you're welcome
15:04 mattprelude joined #perl6
15:05 confuseAcat wouldn't it be cool if http://rakudo.org/how-to-get-rakudo/ reflected the latest release?
15:06 [Coke] RT: 1,024; GLR: 4, WEIRD: 12, LTA: 78; testneeded: 9; xmas: 98
15:06 * [ptc] sometimes wonders if [Coke] is a bot...
15:07 [Coke] That's interesting. Please continue.
15:08 * [ptc] gets eliza flashbacks from the 90's
15:09 diana_olhovik joined #perl6
15:10 [Coke] Why do you think that?
15:11 raydiak good morning, #perl6
15:12 [Coke] regarding stress test chat from the other day - we might want to re-evaluate the stress tests and see if we can pull any into spectest.
15:12 [Coke] given speed improvements, it might be possible for us to get better coverage in the common case.
15:13 felher joined #perl6
15:15 yqt joined #perl6
15:17 diana_olhovik_ joined #perl6
15:17 mn080202 joined #perl6
15:18 pmurias joined #perl6
15:18 pmurias hi
15:18 mn080202 @moritz the thing you showed me before where can one find doc's for it
15:20 hoelzro m: class Foo { method bar { } #= baz␤}; say Foo.WHY
15:20 camelia rakudo-moar 0132b6: OUTPUT«baz␤»
15:20 hoelzro ah ha
15:20 hoelzro it's all clear now
15:21 hoelzro "Declarator blocks that start with #= attach to the declarator declared at the start of the line immediately before them."
15:21 hoelzro it *is* up to spec it seems, but definitely LTA
15:22 [Coke] stresstest failures in t/spec/S02-types/WHICH.t and t/spec/S05-transliteration/trans.t
15:23 nine [Coke]: there are certainly stresstess that are not that stressfull at all
15:27 _mg_ joined #perl6
15:35 pmurias hoelzro: what would be the awesome choice here? warn in such cases?
15:35 [Coke] timtoady, lizmat: t/spec/S16-io/quoting-syntax.t - this appears to be testing something that isn't in the specs any more. might be removable.
15:35 hoelzro pmurias: that's a good question =/
15:36 hoelzro lately, I often find myself divided between warnings in the compiler and having a really nice linter
15:37 tokuhiro_ joined #perl6
15:38 pmurias tools support for Perl 6 is lacking at the moment :(
15:39 dalek roast: 7666314 | moritz++ | S12-attributes/mutators.t:
15:39 dalek roast: Clean up S12-attributes/mutators.t
15:39 dalek roast: review: https://github.com/perl6/roast/commit/766631482c
15:39 kaare__ joined #perl6
15:40 ggoebel joined #perl6
15:43 [Coke] t/spec/S03-operators/shortcuts.t looks dodgy.
15:48 brrt joined #perl6
15:51 zed_ joined #perl6
15:58 masak hoelzro: just to be clear, what is it that's LTA about that formulation? is it the "start of the line" bit?
15:58 masak (and yes, I think I agree. that goes against expectations, and isn't very considerate to one-liners)
16:02 [Coke] how often are you using docs on a one liner?
16:03 diana_olhovik joined #perl6
16:05 TimToady the main thing you're declaring on a line is usually the first thing; otherwise you'll be attaching stuff to the last item in the signature, if it's on the same line
16:08 pmurias joined #perl6
16:17 masak I agree with TimToady, but if I saw such a doc-comment right after a method, I would probably assume it was for the method, not the class. if it was for the class, I'd expect it to occur after the class.
16:17 masak *mumble mumble* Least Surprise
16:18 TimToady maybe #= can't see inside parens?
16:22 zostay m: my %x = foo => 1, bar => 2; baz => 3, qux => 4; dd %x; # DANGER DANGER WILL ROBINSON
16:22 camelia rakudo-moar 0132b6: OUTPUT«Hash %x = {:bar(2), :foo(1)}␤»
16:23 TimToady that oughta warn about Useless use of...something...
16:24 spider-mario joined #perl6
16:26 Begi joined #perl6
16:29 Begi I'm using the simple code of http://doc.perl6.org/type/IO::Socket::INET. I've this error : Failed to connect : connection refused. I don't think this is my firewall. An ideas ? Thanks
16:30 ShimmerFairy joined #perl6
16:30 dalek nqp: 0198475 | (Pawel Murias)++ | src/vm/js/ (9 files):
16:30 dalek nqp: [js] Store the contents of hashes in a separate inner object. Support elems on hashes.
16:30 dalek nqp: review: https://github.com/perl6/nqp/commit/0198475870
16:30 dalek nqp: 7914bf6 | (Pawel Murias)++ | t/nqp/18-associative.t:
16:30 dalek nqp: Test calling nqp::elems on hashes.
16:30 dalek nqp: review: https://github.com/perl6/nqp/commit/7914bf6013
16:34 nine Ok, I successfully created an EnumHOW based Boolean class in BOOTSTRAP that has a gist method. Now if I try to give it a proper multi method gist, things get difficult. If I just do that, the build complains about the missing proto. But I've not found a way to create that proto
16:37 * [Coke] has trouble running the profile html in chrome. keeps asking me if I want to kill it.
16:39 brrt know i know why there are so many germans in #perl and #perl6. in german, there is also more than one way to do it
16:39 yoleaux 14:12Z <jnthn> brrt: Ugh...I think we may really have to catch the mis-lookup under the debugger to actually figure this one out, or just dump a crapload of debugging output
16:40 nine brrt: so you say that Perl is a good fit for a German native brain?
16:40 nine or Germanic probably
16:41 brrt seems like a decent hypothesis
16:41 brrt in translating, i was thinking to myself 'but why didn't they use this other construct for consistency'
16:44 dalek ecosystem: 53f978b | timotimo++ | META.list:
16:44 dalek ecosystem: i've renamed a bunch of META.info to META6.json
16:44 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/53f978ba74
16:44 dalek ecosystem: d54bd92 | timotimo++ | META.list:
16:44 dalek ecosystem: another rename of META.info to META6.json
16:44 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/d54bd92f0a
16:45 * flussence facepalms (no wonder they mysteriously stopped working the first time I tried that in the code repo...)
16:47 dalek gtk-simple: 1aaee2b | timotimo++ | META (2 files):
16:47 dalek gtk-simple: rename META.info -> META6.json
16:47 dalek gtk-simple: review: https://github.com/perl6/gtk-simple/commit/1aaee2bd54
16:48 dalek nqp: b9d9198 | (Pawel Murias)++ | src/vm/js/nqp-runtime/serialization.js:
16:48 dalek nqp: [js] serialize hashes
16:48 dalek nqp: review: https://github.com/perl6/nqp/commit/b9d9198dd3
16:49 [Coke] fired up the profile in firefox, getting a lot of inclusive times of Inf & NaN. :(
16:50 timotimo [Coke]: yes, i've seen things like that, too ... and i don't really have an idea why that happens ;(
16:51 dalek nqp: dc5da29 | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
16:51 dalek nqp: [js] Implement nqp::bindpos_s.
16:51 dalek nqp: review: https://github.com/perl6/nqp/commit/dc5da29a85
16:51 travis-ci joined #perl6
16:51 travis-ci NQP build failed. Pawel Murias '[js] serialize hashes'
16:51 travis-ci https://travis-ci.org/perl6/nqp/builds/82316551 https://github.com/perl6/nqp/compare/7914bf6013b3...b9d9198dd36e
16:51 travis-ci left #perl6
16:51 timotimo 362 META.info, 12 META6.json
16:51 timotimo in the ecosystem META.list
16:54 flussence [Coke]: might be something to do with 32-bit number cutoffs in JS and microseconds? That would cause problems for values around 35 or 70 minutes depending on if it's signed or not
16:54 travis-ci joined #perl6
16:54 travis-ci NQP build failed. Pawel Murias '[js] Implement nqp::bindpos_s.'
16:54 travis-ci https://travis-ci.org/perl6/nqp/builds/82316931 https://github.com/perl6/nqp/compare/b9d9198dd36e...dc5da29a855b
16:54 travis-ci left #perl6
16:56 flussence (that doesn't seem right though, I'm pretty sure JS silently promotes ints to floats on overflow...)
16:58 AlexDaniel how can I "break" multiple loops?
16:59 flussence m: outer: loop { loop { say 1; last outer; } }; say 2
16:59 camelia rakudo-moar 0132b6: OUTPUT«1␤2␤»
16:59 AlexDaniel ok, what about "break 2;" ?
17:01 TimToady why do you want to break things?
17:01 AlexDaniel I mean, it is a frequent problem when you want to break out of multiple loops, and creating a label (or whatever it is called) is too difficult to type!
17:01 AlexDaniel I wish I could just say "break 2" to get out from two loops, that would be great
17:02 TimToady no it wouldn't, what if you miscount?
17:02 AlexDaniel then I'd expect some awesome error message
17:02 TimToady how would it detect that you miscounted?
17:03 flussence .oO( I usually use «return» for that, keeps my subs from growing to insane complexity )
17:03 AlexDaniel I don't know? "torture the implementor on behalf of the user"…
17:03 TimToady and should it count hidden loops in closures and such?
17:03 TimToady does it count the implicit loop in grep and map?
17:04 TimToady labels are really much saner
17:06 AlexDaniel maybe! That being said, I think that I can count up to two… Sometimes I can count up to 3, when I really need that. But that happens tops 1 time in a year…
17:07 AlexDaniel And if it was implemented, I'd expect it not to count anything besides explicit loops that I've typed
17:08 AlexDaniel I don't think that I've ever wanted to jump out of anything like that
17:08 AlexDaniel but jumping out of two of my own explicit loops is pretty frequent
17:13 AlexDaniel m: outer: loop { loop { say 1; last owter; } } say 2;
17:13 camelia rakudo-moar 0132b6: OUTPUT«5===SORRY!5=== Error while compiling /tmp/rWqzRE7lHW␤Strange text after block (missing semicolon or comma?)␤at /tmp/rWqzRE7lHW:1␤------> 3er: loop { loop { say 1; last owter; } }7⏏5 say 2;␤»
17:13 AlexDaniel m: outer: loop { loop { say 1; last owter; } }; say 2;
17:13 camelia rakudo-moar 0132b6: OUTPUT«5===SORRY!5=== Error while compiling /tmp/UQoYbSSvXa␤Undeclared routine:␤    owter used at line 1␤␤»
17:13 AlexDaniel shouldn't it say “undeclared label”?
17:14 masak arguably, yes.
17:15 AlexDaniel m: my $test = 'outer'; outer: loop { loop { say 1; last $test; } } say 2;
17:15 camelia rakudo-moar 0132b6: OUTPUT«5===SORRY!5=== Error while compiling /tmp/_fbuLShMhq␤Strange text after block (missing semicolon or comma?)␤at /tmp/_fbuLShMhq:1␤------> 3er: loop { loop { say 1; last $test; } }7⏏5 say 2;␤»
17:15 masak also, Levenshtein.
17:15 AlexDaniel m: my $test = 'outer'; outer: loop { loop { say 1; last $test; } }; say 2;
17:15 camelia rakudo-moar 0132b6: OUTPUT«1␤Cannot call last(Str); none of these signatures match:␤    ()␤    (Label:D \x)␤  in block <unit> at /tmp/lKSxzLUfcw:1␤␤»
17:17 masak I'm glad that one doesn't work :)
17:20 AlexDaniel m: say Label.Int
17:20 camelia rakudo-moar 0132b6: OUTPUT«46809168␤»
17:20 AlexDaniel m: say Label.Int
17:20 camelia rakudo-moar 0132b6: OUTPUT«68591696␤»
17:22 AlexDaniel m: Label.last
17:22 camelia rakudo-moar 0132b6: OUTPUT«control exception without handler␤  in block <unit> at /tmp/7X8ICvNxsN:1␤␤»
17:24 _mg_ joined #perl6
17:25 brrt joined #perl6
17:26 timotimo arguably, those shouldn't work on undefined labels, eh?
17:26 timotimo m: say Label.defined
17:26 camelia rakudo-moar 0132b6: OUTPUT«False␤»
17:27 rindolf joined #perl6
17:27 AlexDaniel timotimo: I've no idea. This is just so weird…
17:28 AlexDaniel timotimo: I will not submit a report just because I don't get it… :)
17:29 timotimo what exactly is weird to you about this?
17:30 AlexDaniel I mean, Label.Int – what is this and why would anybody want to do that?
17:30 timotimo you'd not really likely want to do that
17:30 timotimo .Int returns the nqp::where of the label
17:32 AlexDaniel should that even be accessible for regular users?
17:32 timotimo well, that's kind of how you differentiate them, i guess?
17:33 timotimo hm
17:33 timotimo well, there's .gist which shows more info
17:34 AlexDaniel m: outer: loop { loop { say 1; last last last last last; } }; say 2;
17:34 AlexDaniel haha
17:34 camelia rakudo-moar 0132b6: OUTPUT«(timeout)1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1…»
17:34 timotimo i don't think "last last" works
17:35 AlexDaniel of course not
17:35 timotimo what does that even do? %)
17:35 timotimo the same as "last" would do?
17:35 AlexDaniel yeah
17:35 timotimo because last returns .. Any?
17:35 timotimo Nil?
17:35 AlexDaniel doesn't really matter?
17:35 timotimo right
17:36 AlexDaniel but that's an interesting question, why would anybody want to use last in non-void context?
17:36 AlexDaniel maybe in ?? !!
17:39 tokuhiro_ joined #perl6
17:46 rindolf joined #perl6
17:48 flussence m: my $r = do loop { loop { last; } }; say $r
17:48 flussence whoops
17:48 flussence m: my $r = outer: do loop { loop { last outer; } }; say $r
17:48 camelia rakudo-moar 0132b6: OUTPUT«(timeout)»
17:48 camelia rakudo-moar 0132b6: OUTPUT«5===SORRY!5=== Error while compiling /tmp/_THUJPl5NB␤Confused␤at /tmp/_THUJPl5NB:1␤------> 3my $r = outer:7⏏5 do loop { loop { last outer; } }; say $␤    expecting any of:␤        colon pair␤»
17:48 flussence well that answers that...
17:55 moritz m: my $r = do { outer: loop { loop { last outer } }; say $r.perl
17:55 camelia rakudo-moar 0132b6: OUTPUT«5===SORRY!5=== Error while compiling /tmp/FF5DUgkj69␤Missing block␤at /tmp/FF5DUgkj69:1␤------> 3oop { loop { last outer } }; say $r.perl7⏏5<EOL>␤    expecting any of:␤        postfix␤        statement end␤        statement modifier…»
17:55 moritz m: my $r = do { outer: loop { loop { last outer } } }; say $r.perl
17:55 camelia rakudo-moar 0132b6: OUTPUT«Label.new␤»
17:58 [Coke] "my $x = last;" kills the REPL.
17:59 moritz it probably last()s the L in repL :-)
18:00 mr_ron moritz:  You revised S12-attributes/mutators.t.  Should I close https://github.com/perl6/roast/issues/71?
18:01 moritz mr_ron: yes please
18:02 mr_ron done
18:03 FROGGS .tell jnthn I try to implement 'my $a; "a" ~~ /$a=[.]/' and fail to do that in P6::A... is that something I should be able to do in the actions?
18:03 yoleaux FROGGS: I'll pass your message to jnthn.
18:05 mr_ron Just a last grumble.  FETCH for the proxy is sort of an accessor method for an attribute.  Normal accessor methods for attributes only get called once to get the value why should we allow the FETCH method to be called multiple times to get the value once?
18:11 brrt .tell jnthn (poor jnthn for all the spam) i've created a gist with dynvar log results: https://gist.github.com/bdw/992dfd5b69b7d42f2239
18:11 yoleaux brrt: I'll pass your message to jnthn.
18:11 brrt i'm pretty sure he's going to see the same interesting thing :-)
18:13 moritz mr_ron: the compiler needs the value for type-checking, for example
18:14 moritz mr_ron: it's not about return values; it's being allowed to read values; and proxies are special in that reading a value can have a side effect
18:16 mr_ron ... checking whether the same could be said for ordinary custom object attr accessors ...
18:19 mr_ron m: class C{has $.a = 0; method a{ return 42 + ++$!a }}; my $o = C.new; say $o.a; say $o.a;
18:19 camelia rakudo-moar 0132b6: OUTPUT«43␤44␤»
18:21 mr_ron m: class C{has Int $.a = 0; method a returns Int { return 42 + ++$!a }}; my $o = C.new; say $o.a; say $o.a;
18:21 camelia rakudo-moar 0132b6: OUTPUT«43␤44␤»
18:32 yqt joined #perl6
18:32 mr_ron It still doesn't make sense to me so maybe I'll do more research on Proxies and take up the question in that context ...
18:46 aristotle left #perl6
18:46 timotimo For more information, see the perl6(1) man page.
18:47 timotimo do we actually have that?
18:49 raydiak mr_ron: I've looked at it like this: a method *returns* a value (in normal use), but a Proxy *is* a value (albeit a special one). If you take an ordinary value and pass it around, ordinary stuff happens. If you take a Proxy and pass it around, it does special stuff for every read or write (even internal to rakudo), because that's what it's designed to do.
18:50 leont joined #perl6
18:54 raydiak mr_ron: iow the difference is that an accessor runs the code once and returns a value that you use, while a Proxy is re-called for every access and (possibly) returns a new value every time
18:55 mr_ron just got back ...
19:00 mr_ron Sort of the heart of the problem I see is that if you want an object attribute mutator you need a Proxy which gives you a FETCH accessor which may now be called more than once to get the value of the attribute once.  A mutator by proxy seems to mean a potentially difficult or broken attr accessor.
19:00 timotimo huh why?
19:01 mr_ron why what?
19:01 psch Seq in a Proxy is something that immediately comes to mind as "weird"
19:02 psch or "from a Proxy"
19:02 timotimo why would that mean "a potentially difficult or broken attr accessor"?
19:02 psch although i'd question the design decision behind putting a Seq into an Attribute
19:03 AlexDaniel timotimo: I don't think that there is a man page, but there is going to be one eventually, I guess
19:03 AlexDaniel timotimo: where can you see that message?
19:03 timotimo perl6 --help
19:03 AlexDaniel timotimo: I mean, is it going to be displayed if you're using for example windows?
19:03 timotimo i was looking for the name of the module debug env var
19:03 AlexDaniel I'm not sure that there is “man” for Windows…
19:04 psch rakudo-specific env vars are terribly underdocumented :/
19:04 psch RAKUDO_ERROR_COLOR is the worst offender, in my opinion
19:04 psch 'cause it checks for "%*ENV<RAKUDO_ERROR_COLOR> // !$is-win;"
19:05 psch which is assigned to $color
19:05 psch which in turn is treated as "do we want color"
19:05 psch so it needs RAKUDO_ERROR_COLOR to exist but be False...
19:05 AlexDaniel “--optimize=[level]   use the given level of optimization (0..3)” – which value is default?
19:06 FROGGS AlexDaniel: 3
19:06 AlexDaniel nice
19:06 FROGGS and 'off' is also a valid level
19:06 timotimo hold on
19:06 timotimo no, 2 is normal, 3 is used for the setting
19:06 FROGGS ahh, interesting
19:06 mr_ron Accessors can have side effects, even ordinary accessor methods.  Ordinary object attr accessor methods only run once to get their results.   The FETCH version may run more than once.
19:06 AlexDaniel hm
19:07 psch mr_ron: auto-generated accessors can have side-effects?
19:07 mr_ron not auto-generated but custom ones yes
19:08 psch oh, yeah custom ones are just methods after all
19:08 mr_ron m: class C{has Int $.a = 0; method a returns Int { return 42 + ++$!a }}; my $o = C.new; say $o.a; say $o.a;
19:08 camelia rakudo-moar 0132b6: OUTPUT«43␤44␤»
19:09 psch i'm not sure i'd still call that an accessor, fwiw
19:09 psch but maybe that's Java-damage, 'cause accessor is pretty much getter for me, which should just return the value
19:09 psch ...which is of course an implicit contract, but seems useful enough to me to assume
19:10 mr_ron An accessor could fetch a web page and have a side effect on the remote web server for example.
19:11 mr_ron I guess we don't actually have working object attr mutators yet and the question isn't urgent.
19:12 raydiak if it's not meant to re-fetch the page every time, you might want to cache the result inside the FETCH, e.g. with a state var
19:12 * raydiak thinks of side-effects in FETCH as falling under the "enough rope to hang yourself" category :)
19:12 psch raydiak: i pretty much agree
19:12 psch an accessor that needs to fetch a remote value isn't an accessor to me
19:13 psch if the object needs the remote value, i'd fetch it in &new or &BUILD
19:13 psch that's of course preference :)
19:16 mr_ron An example that just popped into my head - fetching from a sequence generator in a database ...
19:17 dalek perl6-roast-data: a0d610d | coke++ | / (9 files):
19:17 dalek perl6-roast-data: today (automated commit)
19:17 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/a0d610df81
19:17 psch but that'd be something like "method getNextId { $db.getCurrentId + 1 }", which is not a value inherent to the object
19:18 psch (plus neccessary async precautions etc)
19:18 * psch is probably mostly arguing that accessors *should* be side-effect free by definition
19:19 psch which means the language is not at fault when someone builds something that *has* side-effects and calls it an accessor
19:22 mr_ron What if the accessor needs to access a remote resource that has a limit on the number of accesses per minute/hour etc.
19:22 mr_ron yes you can code around it
19:25 mr_ron It still looks to me like you coded a class with an ordinary custom attribute accessor and then when you recoded for a mutator and put the accessor code in the FETCH method the multiple accesses could cause trouble.
19:25 psch mr_ron: i'm sorry, this looks to me like "if you stuff that it's safe it might be blow up"
19:25 psch mr_ron: that's not saying you can't have a point there
19:25 psch mr_ron: i just don't see it
19:26 psch err
19:26 psch "if you code stuff that isn't safe"
19:26 * psch suspicously eyes the keyboard
19:29 mr_ron In regular Perl accessor methods can have side effects.  I think that's true of most languages.  Give me an example of a major programming language where you can't?
19:31 psch now we're back at semantics.  i'm coming from a Java-POV, where an accessor is a getter, which is a method that accessed and returns a value that's internal to the class
19:31 nowan joined #perl6
19:31 psch if an accessor can have side-effects, it's not a getter
19:31 psch if it's not a getter, none of the things i said apply, because i am working under the assumption that it is a getter
19:31 psch if it is a getter, it can't have side-effects, otherwise it's not a getter
19:32 psch the important phrase here is "internal to the class", i suppose
19:32 psch if you have a method that returns a value that's not internal to the class *i* *personally* wouldn't call that an accessor
19:33 apotheon joined #perl6
19:33 psch wikipedia calls an accessor method a "[method] which returns the value of the private member variable"
19:35 psch to clarify: it's not about "you can't write a method that returns and changes a value" it's about "you can't call a method that changes an accessor"
19:36 psch at least that's where i see the communicative dissonance
19:37 cognominal joined #perl6
19:38 raydiak has $!id; method id { Proxy.new: FETCH => { $!id //= $db.getNextID }, STORE => -> $, $v { $!id = $v } } looks pretty usable to me
19:39 psch raydiak: again, agreed.  i'd struggle to call it an accessor though
19:39 mr_ron Now it looks like you can only get one sequence number from the database for the object ever, which doesn't look right ...
19:40 mr_ron my $first = $obj.id; my $second = $obj.id;
19:41 mr_ron looks like they get the same value which doesn't look right
19:41 raydiak ah I see, thought you meant an id for the object with the id method...then perhaps this is what you want: method id { my $id; Proxy.new: FETCH => { $id //= $db.getNextID }, STORE => -> $, $v { $id = $v } }
19:41 pmurias joined #perl6
19:41 raydiak every call to .id will return a new proxy with it's own $id
19:42 raydiak now, with that said, I do see what you're saying, and it would be nice to have a way to write it without the Proxy/caching complication...have often wished the rval could be part of the signature, myself
19:43 mr_ron I think you may be right about the sequence example but I have to leave for an appointment now.  BBL.
19:43 raydiak np, good luck
19:45 lizmat messages ?
19:45 yoleaux 12:25Z <FROGGS> lizmat: I commented: https://gist.github.com/lizmat/f3807956c354c14902a3#gistcomment-1582671
19:45 raydiak is it too late to add rval(s) to the signature, separated from the normal params list by a '=', complete with multidispatch? :)
19:47 psch ...i'm not sure i can imagine what that's supposed to look like or do
20:06 telex joined #perl6
20:08 moritz raydiak: uhm, you do know that = introduces a default value?
20:14 masak I have jotted down a few notes about macros and the direction I think we should take them in Perl 6. the gist is called "three types of macros": https://gist.github.com/masak/13210c51f034f931af0c
20:15 masak comments are greatly appreciated and warmly welcomed, etc. etc.
20:16 grondilu m: say (1/3).base-repeating
20:16 camelia rakudo-moar 0132b6: OUTPUT«(0. 3)␤»
20:16 masak I still don't have all the answers, but things are becoming much clearer since YAPC::EU.
20:16 lizmat .tell FROGGS I commented on your comment on https://gist.github.com/lizmat/f3807956c354c14902a3
20:16 yoleaux lizmat: I'll pass your message to FROGGS.
20:17 masak m: say (1/7).base-repeating
20:17 camelia rakudo-moar 0132b6: OUTPUT«(0. 142857)␤»
20:17 psch masak: the ordering for "ex1 compute()" seems confusing?
20:17 psch masak: that is, the commented/to-be-expected-output
20:17 masak psch: arguments are evaluated before they are sent to ex1
20:18 psch masak: yes, but &compute doesn't &say
20:18 masak hm, yes.
20:18 masak fixing.
20:18 masak fixed, hopefully: https://gist.github.com/masak/13210c51f034f931af0c
20:19 masak psch++
20:19 psch m: my $x = -> { say "foo" }; $x;
20:19 camelia rakudo-moar 0132b6: OUTPUT«WARNINGS:␤Useless use of variable $x in sink context (line 1)␤»
20:19 psch m: my $x = sub { say "foo" }; $x;
20:19 camelia rakudo-moar 0132b6: OUTPUT«WARNINGS:␤Useless use of variable $x in sink context (line 1)␤»
20:20 psch masak: ^^^ that still kind of throws a wrench in there, i think?
20:20 psch unless macros in SINK always .CALL-ME() (or something like that...)
20:20 masak well, let's work this out.
20:21 masak in the ex1 case, compute() is called in the mainline, so we're fine there.
20:21 psch ah, right
20:21 masak in the ex2 case, `compute()` is *sent* in that form as a Qtree, and then evaluated in the quasi.
20:21 psch and ex2 also calls explicitely
20:21 psch yeah
20:21 masak so we're fine there :)
20:21 psch i didn't pay enough attention to the calls to ex{1,2} there :)
20:21 masak *nod*
20:22 masak talking about macros is confusing by default :)
20:22 psch oh, but
20:22 psch sub ex1($value) { ... $arg; ... }
20:22 masak heh
20:22 masak fixing
20:22 psch :)
20:24 masak fix'd: https://gist.github.com/masak/13210c51f034f931af0c
20:25 psch the "Unhygiene" section is wonderful, masak++
20:25 masak :D
20:26 rurban joined #perl6
20:34 * timotimo likes it, too
20:34 masak maybe I should have a motivating example of unhygiene, too.
20:34 grondilu m: printf "%s(%s)", |(355/113).base-repeating
20:34 camelia rakudo-moar 0132b6: OUTPUT«5===SORRY!5=== Error while compiling /tmp/LGMytANGEQ␤Variable '%s' is not declared␤at /tmp/LGMytANGEQ:1␤------> 3printf "%s(7⏏5%s)", |(355/113).base-repeating␤»
20:34 masak but that's a little bit of uncharted territory, still.
20:34 masak maybe we can find a good example from some other macro-blessed language.
20:34 grondilu m: printf '%s(%s)', |(355/113).base-repeating
20:34 camelia rakudo-moar 0132b6: OUTPUT«3.(1415929203539823008849557522123893805309734513274336283185840707964601769911504424778761061946902654867256637168)»
20:35 timotimo can we do better than to create a Scalar container to hold the capture when we have a method foobar(|args) ?
20:35 masak Common LISP rather than Scheme, I guess...
20:35 tokuhiro_ joined #perl6
20:35 grondilu m: printf '%s(%s)', |(1/30).base-repeating
20:35 camelia rakudo-moar 0132b6: OUTPUT«0.0(3)»
20:36 vendethiel joined #perl6
20:36 psch masak: the last two paragraphs make me want to grasp for "use" and "no" for visitor macros
20:36 psch masak: i'm pretty sure that's a not-so-great idea, but that's what the writing seems to lead to
20:40 psch i like the hint of s-expr that comes through in the whole gist
20:40 psch especially the "Visitor macros" section
20:41 psch as in, with those we'd have predeclarable ways of complete code transformation
20:41 psch which starts at linting/coding-standards and doesn't really stop
20:46 psch that's to say, we'd gain a mechanism that allows code transformation on a level pretty close to what LISPs allow
20:47 psch although i suppose in the end that hangs on the exact Qtree implementation
20:47 psch (i realize that was pretty much the idea behind it, but i've not really paid close attention before, shelving it as something that's probably beyond me...)
20:48 masak yes, Qtrees are the "hidden player" which would make much of this work.
20:49 masak also absent from that gist (but which I know a fair bit more about nowadays) is the distinction between "analytic Qtrees" and "synthetic Qtrees".
20:50 masak that is, the parser can create a Qtree, or you can create a Qtree, and they won't end up being exactly the same.
20:50 masak mainly because the parser has the benefit of parsing thing in a context, and "annotation" its Qtree with that context. (surrounding declarations, etc)
20:51 masak but the Qtrees built node-by-node by the user are "free-floating" until they're actually attached/splied into the program. only then can they get such a context.
20:52 masak specifically, a Qtree that you built with something like `$x = 5;` is never illegal, but it might cause a compilation error when you add it to a part of the program which doesn't have `$x` declared.
20:54 vendethiel psch: I disagree it's a bad idea
20:55 masak vendethiel: did you mean "I disagree, it's a bad idea" or "I disagree that it's a bad idea"? :)
20:55 masak also, what idea?
20:55 vendethiel masak: second. the idea being "enable or disable visitor macros using 'use' and 'no'"
20:56 masak actually, that's how I envisioned they'd be pulled in normally.
20:56 psch i dislike the conflation, mostly
20:56 masak but I'm thinking there might also be a lower-level API for that, something where you register visitors on a given parser.
20:56 psch "use/no" for pragmas, modules, vmacros
20:57 psch seems a bit much to me
20:57 masak they all share a certain goal -- pulling something in from the outside.
20:57 masak I'd much rather have "use/no" than "use-module"/"no-module", "use-pragma"/"no-pragma", "use-vmacro"/"no-vmacro"
20:58 psch i suppose arguing from the alternatives i can't disagree
20:59 psch as in, having distinct keywords for each would be horrible, yes
20:59 * masak .oO( strawman accomplished! ) :P
20:59 psch :P
21:00 mr_ron joined #perl6
21:00 psch i mean, there's no reason why vmacros are the one thing that "do something similar but are imported differently"
21:00 psch compared to pragms and moduels (and slangs)
21:01 masak I see vmacros as pretty similar to routines, actually. they don't get called by the user code, but they *do* get called by the parser that reads the user code.
21:01 lizmat .tell ugexe I hopefull answered your questions in https://gist.github.com/lizmat/f3807956c354c14902a3
21:01 yoleaux lizmat: I'll pass your message to ugexe.
21:01 masak for this reason, they don't really need a name and a place in a lexpad or symbol table. but maybe having a name there helps sometimes.
21:01 psch (fwiw, vmacros and slangs are becoming pretty much TWTDI in my head by now)
21:01 lizmat afk again&
21:02 psch that's not *the* but *two* :)
21:02 masak TWTDI? "The Worst Thursday Double Integral"?
21:03 psch two ways to do it :P
21:03 masak to me it's more like the difference between BUILD and new
21:03 masak you can use BUILD as long as you're fine with just sending positionals to the default .new method -- that is, you're not changing the default interface of the object
21:04 masak similarly, you can keep using macros (in all their flavors) if you're staying reasonably within limits of what the language already does
21:04 masak ramping up, you might reach for `is parsed` or syntax macros or both
21:05 masak but at some point that grows unwieldy, kinda like a bunch of scattered regexes that want to be a grammar
21:05 masak and then you'd consolidate things into a slang (API pending)
21:07 psch the regex :: grammar analogy makes sense to me... :)
21:07 masak sorry for the wonky analogy :) but both `method new` and slangs are for when the things already provided by default are not enough and you need to change things *more*
21:07 psch yeah, that's how i'd order it too
21:08 masak `method new` helps override the default signature of the constructor. (and I meant "nameds" above, not "positionals")
21:08 psch macros can fix a few hickups here and there, while slangs can turn everything into COBOL
21:08 psch just like &new can let you BUILD your god object from a single hash
21:08 masak slangs help put you in a new (sub-)language, either a completely different one or one that's "mostly Perl 6 main" or (like regexes) one where Perl 6 main isn't all that far away.
21:09 masak psch: right, exactly.
21:09 masak it's different steps up the power ladder.
21:09 masak in 9 out of 10 classes, I'm content with defining BUILD.
21:10 awwaiid which will let me make it so I can put whitespace around method invocation and move the --> ReturnType outside of the parens?
21:10 awwaiid (which I think are my top-two warts)
21:11 awwaiid (I should make a personal wart list)
21:11 masak yes, please make a personal wart list.
21:11 mst I'm assuming the perl5 rule of 'if you defined your own new() method you've already gone too far' tends to apply
21:11 masak awwaiid: both of those sound more slang-y to me. since they change syntax.
21:11 awwaiid masak++ # encouraging things
21:12 awwaiid I am also ok if they are fixed in the core language :)
21:12 masak mst: that's a personal rule of mine, yes, which I hadn't really verbalized. but yes.
21:12 mst awwaiid: $foo.bar\n    .baz is my big objection
21:12 awwaiid yes, exactly that
21:12 masak mst: as time goes by, I'm less and less tempted to override .new
21:12 mst awwaiid: I like lining up method calls vertically
21:12 masak good news, awwaiid and mst: there's already a slang for this! :D
21:12 masak it's called Slang::Tuxic
21:12 awwaiid I had a really nic elooking chain going on and it was so beautiful but didn't work
21:12 mst masak: no, it isn't
21:12 awwaiid orly
21:12 mst awwaiid: if you stick a \ on the end of each line ala Tcl it works for the moment
21:13 masak https://github.com/FROGGS/p6-Slang-Tuxic/
21:13 mst Slang::Tuxic does a bunch of whitespace related stuff, most of which is weird
21:13 rurban joined #perl6
21:13 masak heh, no arguments there :)
21:13 awwaiid ah yeah. really it is specifically the one mst mentioned that has hit me a few times
21:13 awwaiid I ended up using several .= because it was prettier
21:13 mst masak: yeah, so please don't say "there's a slang for this"
21:14 masak mst: not really sure I understand your objection, but OK.
21:14 masak mst: Slang::Tuxic does more than you want?
21:14 mst it introduces a bunch of things I actively don't want
21:14 mst like, say, every single other change it makes
21:14 awwaiid yeah. I am totally fine with no-space-allowed between method and param paren
21:15 mst "there is a slang from which what you want could totally be extracted", OTOH, I will absolutely stipulate to
21:15 mst it's just a question of which of the bajillion people annoyed by this gets to it first
21:15 * awwaiid reads source
21:15 awwaiid This is definitely one of those which I would place money on will be Really Annoying for Every New Beginner Ever
21:15 masak I see three things Slang::Tuxic does (though I may have missed things)
21:16 masak (a) allow whitespace in "$obj    .meth"
21:16 masak (b) allow whitespace in "$thing     {'lookup'}"
21:16 masak (c) allow lack of whitespace in "sub(){}", specifically the lack after "sub"
21:17 mst pretty sure it allows 'thing     (<args>);'
21:18 masak yeah -- all those things can go under (b), I guess.
21:18 * awwaiid forks. starts chopping things
21:18 masak basically, postcircumfixes can be preceded by whitespace.
21:18 mst right, but that I actively don't won't
21:18 mst awwaiid++
21:18 masak awwaiid++
21:18 masak awwaiid: looking at an earlier version/commit might help, too.
21:18 awwaiid oh good idea
21:24 BenGoldberg joined #perl6
21:51 pmurias joined #perl6
21:57 vendethiel awwaiid: nice, I'd love to be able to go and nelwine 'em as well :D
22:14 timotimo oh
22:15 timotimo should we set arguments like |args "is raw" by default (or just generate the same code either way?)
22:15 timotimo because i don't really see a reason why |args should be stored inside a scalar container
22:16 vendethiel m: sub foo { $[1, 2, 3] }; sub bar { [1, 2, 3] }; say foo.perl, bar.perl # tell me they're different :o
22:16 camelia rakudo-moar 0132b6: OUTPUT«[1, 2, 3][1, 2, 3]␤»
22:17 timotimo m: sub foo { return $[1, 2, 3] }; say foo.perl
22:17 camelia rakudo-moar 0132b6: OUTPUT«[1, 2, 3]␤»
22:17 timotimo m: sub foo { return [1, 2, 3] }; say foo.perl
22:17 camelia rakudo-moar 0132b6: OUTPUT«[1, 2, 3]␤»
22:17 timotimo m: sub foo { return 1, 2, 3 }; say foo.perl
22:17 camelia rakudo-moar 0132b6: OUTPUT«(1, 2, 3)␤»
22:17 timotimo hum.
22:18 apotheon joined #perl6
22:21 masak 'night, #perl6
22:21 pink_mist good night masak
22:23 TEttinger joined #perl6
22:28 apotheon joined #perl6
22:36 tokuhiro_ joined #perl6
22:45 cognominal joined #perl6
22:51 araujo_ joined #perl6
22:56 mr_ron joined #perl6
23:02 lizmat ugexe: another comment on https://gist.github.com/lizmat/f3807956c354c14902a3
23:20 lizmat enough CURLI ideas for now: https://gist.github.com/lizmat/f3807956c354c14902a3/revisions
23:20 lizmat good night, #perl6!

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

Perl 6 | Reference Documentation | Rakudo