Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-04-01

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:01 SomeStrangeTest alright thanks for the help folks, off to get some dinner
00:08 ugexe if you want a trail just do like i mentioned
00:08 ugexe panda look module::name
00:08 ugexe then you can modify the code or whatever before you do panda install .
00:37 prime joined #perl6
00:37 prime joined #perl6
00:46 tinyblak joined #perl6
00:51 tinyblak_ joined #perl6
00:56 laouji joined #perl6
01:08 prime joined #perl6
01:08 prime joined #perl6
01:15 timotimo there's a pull request for giving template-mojo a "provides" section now
01:15 timotimo tadzik: ^
01:16 timotimo oh
01:16 timotimo zoffx already made a pull request way before i did
01:16 timotimo tadzik: ^
01:18 timotimo masak: Adventure::Engine still says "Actual illucidating example coming soon. Watch this spot." :)
01:18 Zoffix I only added provides though; not all the other stuff you added
01:19 timotimo right, but i don't know if the other stuff is even necessary
01:19 aborazmeh joined #perl6
01:19 aborazmeh joined #perl6
01:19 timotimo masak: and if you're looking at that, might as well add a "provides" section like panda gen-meta suggests :)
01:20 dalek rakudo-star-daily: 7f490c6 | coke++ | log/ (2 files):
01:20 dalek rakudo-star-daily: today (automated commit)
01:20 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/7f490c614b
01:21 Zoffix Ah OK. so it's the missing 'provides' that was causing those errors, SomeStrangeTest
01:21 Zoffix simple \o/
01:23 genio left #perl6
01:28 timotimo yeah, we just merged the change that makes the provides section necessary a few days ago
01:35 Zoffix 128 modules on http://modules.perl6.org/ that don't got that...
01:35 ugexe well, he did mention specifically the 'provides' error :P
01:35 Zoffix http://grog-blog.com/wp-content/uploads/2014/02/barney-stinson-challenge-accepted.jpeg
01:36 ugexe although maybe it should be more explicit about it not working
01:36 Zoffix It's actually just a warning and it says "Successfully installed" but ... nothing's installed
01:38 ugexe successfully installed <- would be something to change in panda
01:39 Zoffix Just bail out after issuing warning maybe?
01:40 ugexe nah, cause you still want to install other modules you explicity told it to install
01:40 ugexe panda Fail::Module Success::Module <- i would expect it to install Success::Module even though Fail::Module fails
01:42 ugexe panda just needs to throw an exception in that circumstance and it would get handled properly
01:45 adu joined #perl6
01:46 dj_goku joined #perl6
02:02 uvb joined #perl6
02:04 aborazmeh joined #perl6
02:04 aborazmeh joined #perl6
02:15 SomeStrangeTest so that last error I had looks like a exception thrown by rakudo c code
02:15 SomeStrangeTest :        MVM_exception_throw_adhoc(tc, "No STable at index %d", idx);
02:16 SomeStrangeTest this is in sc.c, which I gather is serialization context
02:16 jack_rabbit joined #perl6
02:16 SomeStrangeTest but grabbing Bailador from git and copying the libs in results in a working Bailador so I'm not sure what Panda is doing differently
02:18 SomeStrangeTest anyway, it's not a problem for me, but thought I'd mention it in case somebody wants to track down the bug
02:18 noganex joined #perl6
02:26 kaare_ joined #perl6
02:28 dj_goku nine_: you around?
02:30 raiph joined #perl6
02:52 vendethiel- joined #perl6
03:02 Zoffix Looks like I finally made an almost-fully-automated script to create PRs to add "provides" to META for the ~120 dists that are missing it. Gonna submit them all tomorrow, after work.
03:02 Zoffix https://xkcd.com/1319/
03:09 raiph joined #perl6
03:16 aborazmeh joined #perl6
03:16 aborazmeh joined #perl6
03:21 tinyblak joined #perl6
04:17 adu joined #perl6
04:27 adu joined #perl6
04:37 laouji joined #perl6
04:51 fhelmberger joined #perl6
04:57 tinyblak_ joined #perl6
05:28 Woodi joined #perl6
05:29 adu joined #perl6
05:46 telex joined #perl6
05:50 kurahaupo joined #perl6
05:52 yeahnoob joined #perl6
05:53 danaj joined #perl6
06:03 kurahaupo TimToady: I noted your recent commit for the R meta-op, so that the generated op has the opposite associativity of the original operator. That seems sensible, but keeping the same precedence seems a bit crazy. Would anything break if the precedence of generated operators differed minimally from the original operator? My gut feeling is longer-name and/or more letters implies lower precedence, but there could be good arguments either way.
06:05 TimToady why make the user remember more rules?
06:06 TimToady there are meta-operators where the valence of the arguments changes from item to list, and there it makes sense to change the precedence, but the shape of the arguments stays the same for R
06:07 TimToady so it seems to fit more with the meta-ops that are transparent to precedence
06:09 kurahaupo TimToady: okay, but then how does one parse ( $x - $y R- $z ) ? I would have thought it saner to entirely forbid equal precedence with differing associativity
06:10 TimToady well, there's probably an argument to be made for pickiness there; we do, after all, complain on mixed list infixes
06:11 TimToady otoh, R is a lot rarer than X or Y or ..., so it seemed more like a DIHWIDT to me
06:15 chenryn joined #perl6
06:15 TimToady I should look at EXPR and see how costly such a check would be on very normal operators like +/-
06:28 TimToady there would be some cost to it; currently it uses the associativity of the new incoming operator rather than the old one on the operator stack; looking up the latter would involve saying something like ~@opstack[+@opstack-1]<OPER><O><assoc> // 'left', whereas the existing approach merely has to look up nqp::atkey(%inO, 'assoc')
06:31 TimToady so currently the opp will assume that $x - $y R- $z is right associative based on the righthand R- operator, which is handier to look up than the - on the left
06:33 rindolf joined #perl6
06:33 [Tux] .msg FROGGS would you be so kind to have another look at excluding reserved words like if/for/while/.. in Slang::Tuxic?
06:33 yoleaux [Tux]: Sorry, this command is admin-only.
06:34 [Tux] .tell FROGGS would you be so kind to have another look at excluding reserved words like if/for/while/.. in Slang::Tuxic?
06:34 yoleaux [Tux]: I'll pass your message to FROGGS.
06:49 [Tux] m: my$x=\"1,2\n3,4\n";$x.gist.say
06:49 camelia rakudo-moar f65ba9: OUTPUT«\(1,2␤3,4␤)␤»
06:49 [Tux] m: my$x=\"1,2\n3,4\n";$x.perl.say
06:49 camelia rakudo-moar f65ba9: OUTPUT«Capture.new(list => ("1,2\n3,4\n",))␤»
06:50 [Tux] is there a method in between, that returns "1,2\n3,4\n"
06:51 fhelmberger joined #perl6
06:54 brrt joined #perl6
06:54 moritz I'm not aware of any
06:55 [Tux] my $s-in = $in.gist; $s-in ~~ s:g{\n} = "\\n";
06:55 [Tux] that works for me for now
06:55 [Tux] used in generating test messages
06:56 fhelmberger joined #perl6
06:57 moritz why do you deal with captures in the first place?
06:57 [Tux] because I can? :)
06:58 [Tux] I am trying to find out WHAT I should deal with and HOW
06:58 [Tux] like testing with Supply's is really hard
07:00 [Tux] I first want to experiment with the complete scala of possibilities and *then* decide what is sane to support (if at all)
07:00 Ven joined #perl6
07:00 [Tux] so many people, so many users, so many points of view
07:01 moritz understood
07:01 Vlavv_ joined #perl6
07:02 [Tux] currently I am thinking that an Array of strings is *way* more logical than a single capture (string reference), as it does not conflict with whatever is already investigated
07:03 kurahaupo joined #perl6
07:05 tinyblak joined #perl6
07:05 prime joined #perl6
07:05 prime joined #perl6
07:07 [Tux] ok, Array of strings done. that was easy :)
07:14 eli-se joined #perl6
07:16 tinyblak_ joined #perl6
07:17 mr-foobar joined #perl6
07:23 brrt joined #perl6
07:25 [Tux] I really would like to see IO from Str (not needing a tem file)
07:26 [Tux] makes testing so much easier
07:26 moritz then write a module that does it
07:26 moritz shouldn't be all that hard
07:27 * [Tux] opens a drawer to look for more free time …
07:27 moritz I mean, the typical IO API just consists of get, lines, print, say, close
07:28 [Tux] you are right, but I knoiw that will be a Yak-shaving experience
07:33 espadrine joined #perl6
07:35 [particle] joined #perl6
07:36 nwc10 um, surely, strictly IO from Buf?
07:37 nwc10 actually, you can do IO from either. If the IO system is smart enough to know when it's dealing in octets, and when in characters
07:47 RabidGravy joined #perl6
07:54 eli-se joined #perl6
07:58 kjs_ joined #perl6
08:01 Rounin joined #perl6
08:02 rurban_ joined #perl6
08:03 zakharyas joined #perl6
08:11 darutoko joined #perl6
08:14 pdcawley joined #perl6
08:23 gfldex joined #perl6
08:30 abraxxa joined #perl6
08:35 dakkar joined #perl6
08:36 yqt joined #perl6
08:55 FROGGS joined #perl6
08:59 espadrine joined #perl6
09:05 kjs_ joined #perl6
09:11 eli-se joined #perl6
09:11 eli-se good evening
09:12 Ven \o eli-se
09:15 eli-se I want to write a videogame in Perl.
09:16 Ven eli-se: text-based or with graphics?
09:16 eli-se text-based, of course
09:16 eli-se I'm not a masochist.
09:17 Ven we have both :)
09:17 Ven eli-se: timotimo++ made https://github.com/timo/gtk_cairo_shooter
09:17 eli-se Unicode art.
09:17 Ven and for text based, we had some module, but no unicode art, only "exploratory" text-based games
09:18 Ven eli-se: https://github.com/masak/Adventure-Engine/
09:18 Ven eli-se: and as unicode art, https://github.com/masak/druid/
09:23 timotimo Ven: yesterday i found out that gtk_cairo_shooter segfaults with my latest changes to cairo (turning it into a module Cairo; and tweaking gtk_cairo_shooter to use the new imports) and i didn't have time yet to debug it
09:23 Ven timotimo: well, I never managed to get it to run anyhow.. :)
09:24 Ven (not sure how turning it into a module can make it segfault, tho)
09:28 slavik joined #perl6
09:29 pecastro joined #perl6
09:30 brrt joined #perl6
09:35 eli-se I want lenses in Perl 6.
09:35 eli-se they should make game development more pleasant
09:36 timotimo i don't really know what those "lenses" you speak of are :(
09:36 eli-se they're a way to manipulate nested data structures
09:37 eli-se basically
09:37 timotimo oh
09:37 timotimo isn't that what this one person talked about during one of the recent conferences
09:37 timotimo oh, those were "zippers"
09:37 eli-se here's a lens type: https://gist.github.com/rightfold/1798a0994bc2d663a1a6
09:38 eli-se they can be composed to form paths into nested data structures
09:39 DrForr I've done soemthing very similar in perl5 when I was playing with destructuring.
09:39 aborazmeh joined #perl6
09:39 aborazmeh joined #perl6
09:41 Ven joined #perl6
09:49 Ven joined #perl6
10:03 cschwenz joined #perl6
10:03 coffee` joined #perl6
10:09 eli-se joined #perl6
10:10 eli-se Why are lols special?
10:11 Ven eli-se: "special"?
10:11 eli-se yes
10:11 eli-se there's all sorts of documents on them
10:12 eli-se and there's a lol method
10:12 eli-se so they must be special in some way
10:12 eli-se I fail to see, however, how a list of lists would be any different from a list of integers.
10:13 eli-se and a LoL class
10:15 eli-se I can see why in Perl 5 arrays of arrays deserve special mention, since arrays can store only scalars.
10:23 pdcawley joined #perl6
10:29 moritz eli-se: iirc they offer both a flat and a nested view
10:41 rurban_ joined #perl6
10:42 Zoffix They aren't really arrays of arrays, but arrays of *arrayrefs*
10:43 Zoffix my @a = ( 'foo', 'bar', [ 'meow', 'mer', [ 'zer', 'ber' ] ] );
10:49 FROGGS joined #perl6
10:51 xfix joined #perl6
10:51 xfix left #perl6
10:57 eli-se joined #perl6
10:58 pecastro joined #perl6
11:04 eli-se joined #perl6
11:09 chenryn joined #perl6
11:11 azawawi joined #perl6
11:11 azawawi hi
11:11 yoleaux 31 Mar 2015 22:49Z <timotimo> azawawi: for some reason i had this change locally: $file-name .= subst('~', %*ENV<HOME>); → $file-name ~~ s/'~'/{%*ENV<HOME>}/;   inside method open-file in Editor.pm6
11:13 azawawi quick question, are we moving into removing the actual panda installed modules files and using an MANIFEST to extract their names?
11:13 azawawi so now instead of directly reading the file, i need to query a service to the file that belongs to my module...
11:13 azawawi any reason behind this big change
11:13 azawawi ?
11:14 FROGGS umm what? I dont understand the question
11:14 yoleaux 06:34Z <[Tux]> FROGGS: would you be so kind to have another look at excluding reserved words like if/for/while/.. in Slang::Tuxic?
11:14 FROGGS [Tux]: I can do that but I cannot promise it will happen today or tomorrow :S
11:14 azawawi FROGGS: C:\rakudo\share\perl6\site\0..n files now instead of actual module name installed files
11:14 |Tux| sure
11:15 azawawi FROGGS: C:\rakudo\share\perl6\site\MANIFEST now contains a json file to the actual file numbers
11:15 eli-se joined #perl6
11:15 |Tux| but now code like «my @in = gather while ($in.list) -> $x { take $x }» looks really awkward and horrific
11:15 FROGGS azawawi: correct, because storing Foo::Bar as lib/Foo/Bar.pm makes it impossible to install several same named versions of a module
11:16 FROGGS azawawi: so to allow the installation of Foo::Bar v1 and Foo::Bar v1.2 and Foo::Bar made by someone else we need a more database thing to install to, instead of just putting everything under lib/Foo/Bar.pm
11:16 azawawi FROGGS: so we're moving to a database-like structure for installed module names to be filesystem agonistic?
11:16 FROGGS azawawi: aye
11:17 azawawi FROGGS: cool
11:17 FROGGS azawawi: this also allows us to uninstall modules more easily, or recompile modules that depend on something you just changed etc
11:17 * azawawi cools down a bit
11:18 azawawi FROGGS: and later move to be database-based (aka SQLite) if needed (e.g. for fast module queries)?
11:19 FROGGS azawawi: this explains why/how we do that: https://perl6advent.wordpress.com/2013/12/11/day-11-installing-modules/
11:19 FROGGS might be outdated here or there, since it is from 2013
11:19 FROGGS azawawi: that's up to the 'module installation backend' (aka CompUnitRepo::*) you are using
11:20 azawawi so basically multiple module versions living in the same perl6 module ecosystem database?
11:20 FROGGS currently we have a CompUnitRepo::Local::Installation, but one can easily plug in a CompUnitRepo::Local::SQLite
11:20 azawawi and i can depend on a specific version for my module
11:20 FROGGS exactly
11:20 azawawi cool
11:21 * azawawi drooling... :)
11:21 FROGGS or you say "I trust jnthn, but I dont care about the version", then you'd do: use Foo:auth<jnthn>
11:21 Ven joined #perl6
11:21 azawawi module time/space? :)
11:23 * azawawi remembers NTFS Longhorn project... http://en.wikipedia.org/wiki/WinFS
11:23 brrt joined #perl6
11:24 KCL joined #perl6
11:24 azawawi so basically with this i can make module database and make a dump of it to be shared by the team... cool :)
11:25 azawawi revolutionary thinking
11:25 rurban_ joined #perl6
11:26 FROGGS as long as precompilation is not involved you can share such a thing, yes, I think so
11:26 Ven m: role S[::T]{...}; role S[Int]{ constant mzero = 0; }; role M[::T] { constant mzero = S[T].mzero; }; say M[Int].mzero;
11:26 camelia rakudo-moar f65ba9: OUTPUT«===SORRY!===␤No appropriate parametric role variant available for 'S'␤»
11:27 Ven m: role S[::T]{...}; role S[Int]{ constant mzero = 0; }; role M[::T, _S = S[T]] { constant mzero = _S.mzero; }; say M[Int].mzero;
11:27 camelia rakudo-moar f65ba9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/uEZEvWpykc␤Invalid typename '_S' in parameter declaration.␤at /tmp/uEZEvWpykc:1␤------> 3]{ constant mzero = 0; }; role M[::T, _S7⏏5 = S[T]] { constant mzero = _S.mzero; };␤»
11:29 Ven m: role S[::T]{...}; role S[Int]{ constant mzero = 0; }; role M[::T, $S2 = S[T].mzero] { constant mzero = $S2; }; say M[Int].mzero;
11:29 camelia rakudo-moar f65ba9: OUTPUT«Could not instantiate role 'M':␤No appropriate parametric role variant available for 'S'␤  in any specialize at src/gen/m-Metamodel.nqp:2244␤  in any specialize at src/gen/m-Metamodel.nqp:2441␤  in any specialize at src/gen/m-Metamodel.nqp:2022␤ …»
11:29 eli-se joined #perl6
11:30 chenryn_ joined #perl6
11:41 azawawi FROGGS: i see. Thanks for explaining it
11:43 araujo joined #perl6
11:43 araujo joined #perl6
11:46 eli-se joined #perl6
11:46 araujo joined #perl6
11:47 eli-se s/feather will/feather has/
11:47 eli-se what was feather?
11:48 * DrForr wonders about ( $a, $b ) <==> ( $.name<first>, $.name<last> ) for lens-ish syntax.
11:50 araujo joined #perl6
11:51 DrForr Mm, obviously I've misrememebered.
11:58 eli-se With Visual Perl 6 for Applications we can take over the world.
11:59 raiph joined #perl6
11:59 bartolin_ m-star: say 1 ?? Str.new :value("foo") !! "omg"
12:00 abraxxa I just helped a coworker with a php webshop rouding problem. If Perl 6 gets a webshop it will take over the world for the next few years
12:01 bartolin_ star-m: say 1 ?? Str.new :value("foo") !! "omg"
12:01 camelia star-m 2015.02: OUTPUT«foo␤»
12:01 bartolin_ m: say 1 ?? Str.new :value("foo") !! "omg"
12:01 camelia rakudo-moar f65ba9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Uc8QdH4Sjp␤Please use !! rather than :␤at /tmp/Uc8QdH4Sjp:1␤------> 3say 1 ?? Str.new :value("foo"7⏏5) !! "omg"␤    expecting any of:␤        statement end␤        statement modifier␤       …»
12:02 bartolin_ is that supposed to work? it does not with commit 225a7e3
12:03 FROGGS eli-se: +1 for a VP6
12:05 eli-se joined #perl6
12:05 bartolin_ it works with <EXPR('i=')> but not with <EXPR('j=')> in Grammar.nqp https://github.com/rakudo/rakudo/blob/nom/src/Perl6/Grammar.nqp#L4239
12:06 bartolin_ timotimo++ found that yesterday: http://irclog.perlgeek.de/perl6/2015-03-31#i_10372090
12:08 eli-se joined #perl6
12:10 sirdancealot joined #perl6
12:15 dalek rakudo/nom: bc7e480 | peschwa++ | t/02-rakudo/repl.t:
12:15 dalek rakudo/nom: Add a few moreinput related tests.
12:15 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/bc7e480774
12:19 konsolebox joined #perl6
12:27 Ven m: lines; say lines
12:27 camelia rakudo-moar f65ba9: OUTPUT«Failed to seek in filehandle: 9␤  in method eof at src/gen/m-CORE.setting:17691␤  in method get at src/gen/m-CORE.setting:17695␤  in method get at src/gen/m-CORE.setting:18969␤  in code  at src/gen/m-CORE.setting:18983␤  in block  at src/gen/m-CO…»
12:28 st_iron joined #perl6
12:29 psch oh meh
12:29 st_iron hey
12:29 psch i fudged those tests wrong i think
12:29 psch hi st_iron
12:29 dalek rakudo/nom: cbbeff8 | peschwa++ | t/02-rakudo/repl.t:
12:29 dalek rakudo/nom: Correct fudging.
12:29 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/cbbeff8d90
12:33 dalek rakudo/nom: 6caf1d4 | peschwa++ | t/02-rakudo/repl.t:
12:33 dalek rakudo/nom: Actually correctly correct fudging.
12:33 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6caf1d4e4e
12:36 Ven is lue++'s p6mode the one mod to use for emacs?
12:38 * Ven found what he was looking for on perl6.org/whatever
12:38 Ven actually, that one's from 2010. probably should be removed from perl6.org
12:39 Ven Ah, no,it's just an incorrect branch. uh-oh
12:39 rmgk_ joined #perl6
12:40 dalek perl6.org: 981b7e0 | ven++ | source/whatever/index.html:
12:40 dalek perl6.org: Link to the master branch of cperl-mode
12:40 dalek perl6.org:
12:40 dalek perl6.org: I don't see any reason to link to the 2010 branch
12:40 dalek perl6.org: review: https://github.com/perl6/perl6.org/commit/981b7e0fec
12:40 Ven Ohhh.. That was supposed to be a PR again...
12:47 * Ven switches back to vim
12:49 eli-se joined #perl6
12:51 [particle] joined #perl6
12:53 azawawi FROGGS: ping
13:02 FROGGS azawawi: pong
13:02 Ven `use ADT "data Tree";` is "still" not possible, right? just checking
13:03 Ven (as in, custom EXPORT arguments)
13:04 moritz it is, afaict
13:08 Ven oooh
13:08 Ven yes, yes, that's what jnthn++ demonstrated in his presentation, even!
13:09 * Ven clones timotimo++'s ADT.p6
13:10 azawawi FROGGS: so how do i quickly find an asset inside lib/Foo/Bar/assets/ using the new CompUnitRepo::Local::Installation?
13:11 Rounin joined #perl6
13:11 azawawi FROGGS: best i could find is @binaries[0]<files>.keys.grep({ $_.IO.basename eq 'farabi.js' });
13:12 lucasb joined #perl6
13:13 Ven m: class A{method !x is export{}; };
13:13 camelia rakudo-moar 6caf1d: OUTPUT«===SORRY!===␤Cannot find method 'has_compile_time_value'␤»
13:13 Ven m: class A{method !x is export {}; };
13:13 camelia rakudo-moar 6caf1d: ( no output )
13:13 Ven should that error out? :P
13:15 Ven m: module F {}; need F;
13:15 camelia rakudo-moar 6caf1d: OUTPUT«===SORRY!===␤Could not find F in any of: /home/camelia/.perl6/2015.03-136-g6caf1d4/lib, /home/camelia/.perl6/2015.03-136-g6caf1d4, /home/camelia/rakudo-inst-1/share/perl6/lib, /home/camelia/rakudo-inst-1/share/perl6/vendor/lib, /home/camelia/rakudo-inst-…»
13:19 FROGGS azawawi: @*INC.files('bin/farabi.js') (in case it is in bin/ in the dist)
13:19 * Ven still doesn't get how the module system really works. what imports names, what doesn't, when to put `use` inside of declarations, when to put them outside, how to import unqualified class names...
13:19 yqt joined #perl6
13:22 lucasb Hello. The Any class has some deprecated methods in the middle of the code. Would you mind if I move all of them to the very end of the class or do you prefer them to keep sitting next to their relative current methods? I wanted to do this just as a file editing exercise to get acquainted with the process. :)
13:22 Ven m: 'a' ~~ /a/; say $/<foo>?.made;
13:22 camelia rakudo-moar 6caf1d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/BGTNTbeDAy␤Two terms in a row␤at /tmp/BGTNTbeDAy:1␤------> 3'a' ~~ /a/; say $/<foo>7⏏5?.made;␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement en…»
13:22 moritz lucasb: don't do editing for the sake of editing
13:23 Ven m: my $a = 'heyy'; $a?.made;
13:23 camelia rakudo-moar 6caf1d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/yEwFs10EQl␤Two terms in a row␤at /tmp/yEwFs10EQl:1␤------> 3my $a = 'heyy'; $a7⏏5?.made;␤    expecting any of:␤        infix␤        infix stopper␤        statement end␤        statement m…»
13:23 moritz lucasb: it makes it harder to track methods in the git history
13:23 Ven ehh
13:24 moritz Ven: $var.?made
13:24 Ven moritz: it used to be the other way around, tho ._.
13:25 moritz Ven: I won't believe that unless you have some kind of proof for that
13:25 Ven my module worked with the other version
13:25 moritz Ven: the ? or + or * are quantifies, just like in regexes
13:25 moritz that's... a very vague statement
13:25 psch maybe it used that one slang?
13:26 Ven definitely didn't :)
13:27 Ven wh.... what the heck happened. Why isn't this file in git!?
13:27 lucasb moritz: They are just deprecated methods anyway, but ok, understood. thanks.
13:29 Ven why doesn't "use A::B::C;" allow me to use "C" unqualified?..
13:31 huf hmm?
13:31 huf there's no C in that use line
13:31 huf there's just A::B::C
13:31 huf just like the words rumble and crumble are unrelated, so is A::B::C and C
13:31 Ven yes. and I expect to be able to use "C" to talk about "A::B::C" from this declaration on
13:31 psch you can if A exports B and B exports C
13:31 huf oh shit this is the other channel. fuck me.
13:32 Ven psch: heh?
13:32 moritz Ven: you can do a   use C:name<A::B::C> or so
13:32 psch Ven: not?  maybe my understanding is also flawed :)
13:33 Ven psch: not, I definitely don't understand
13:33 Ven but I find perl6's module system very difficult to understand and not particularly practical
13:33 psch sorry for misinformation then
13:35 Ven I mean -- I'm the one at loss here
13:42 Perl6_newbee joined #perl6
13:43 moritz Ven: there's no automatic aliasing. When you use A::B::C, then you can use the symbol A::B::C
13:43 moritz it's actually quite simple :-)
13:43 Ven how do I get automatic aliasing?
13:44 moritz you don't
13:44 moritz well, maybe with macros, some day
13:48 Ven I'm definitely used to "prior art"... But it seems really, really annoying in the long run to me
13:53 moritz it's OK
13:53 moritz same as p5
13:53 Ven that and having to -I lib/ or "use lib 'lib/'"; all over the place, under some rules I don't understand
13:53 * Ven doesn't know p5
13:53 moritz if you want, there's always explicit aliasing
13:53 moritz Ven: that's not hard either; if your modules aren't in the search path, you must extend the search path
13:54 moritz Ven: and -Ilib and 'use lib "lib"' are two options to do taht
13:54 Ven moritz: I'd definitely expect "something else"... I mean, from "src/Foo/Bar.pm", to be able to `use Foo::Baz;` and have the module found without having to "use lib..".
13:54 Ven or even being able to relative-require
13:55 huf actually, neither of those options works for perl5
13:55 moritz Ven: you don't have to put a "use lib ..." into a module
13:55 huf use lib 'lib/'; will be cwd-relative which is pointless
13:55 moritz Ven: because the script or module that loaded your module in the first place must have set up the search path already
13:56 moritz otherwise it couldn't have been "use"d
13:56 huf use File::Basename qw/dirname/; use lib dirname(__FILE__).'/lib'; # or something
13:56 Ven moritz: well, from a MAIN sub, I still need to add a relative-use-lib-thing
13:57 moritz Ven: yes, but not from modules
13:57 moritz Ven: and you only have to do that for development
13:57 moritz Ven: for production, you simply install the modules
13:58 moritz Ven: so it might more sense to leave it out of the script, and set PERL6LIB env for developing, or using -Ilib
13:58 Ven moritz: how do I install a module with a MAIN?
13:58 moritz Ven: same as any other module, really
13:58 Ven (also, please don't mention me on every single line, it beeps loudly :P)
13:59 moritz stop the beeping, then :-). That's how IRC works.
13:59 Ven I want the beeping, the one time I get mentioned first -- for the 3 following lines, sent 10 seconds later, chances are I havn't read / am still reading :P
14:00 nwc10 is this like: <purl> Hey Schwern! honk, honk, honk, honk, honk, honk, honk, honk,
14:00 nwc10 honk, honk, honk, honk, honk, honk, honk, honk, honk, honk, honk,
14:00 nwc10 honk, honk, honk, honk, honk, honk, honk, honk, honk, honk, honk,
14:00 nwc10 honk, honk, honk, honk, honk, honk, honk, honk, honk, honk, honk,
14:00 nwc10 honk, honk, honk, honk, honk, honk, honk, honk, honk, honk!
14:00 nwc10 (but on one line)
14:00 skids joined #perl6
14:00 DrForr That was because Schwern had a text-to-speech translator :)
14:01 * [Coke] glares at irc blearily over morning coffee.
14:01 tadzik text-to-speech is quite a hilarity with twitch livestreamers
14:02 Ven tadzik: &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
14:03 tadzik doubleu doubleu doubleu doubleu
14:06 rindolf joined #perl6
14:07 pecastro joined #perl6
14:10 Ven m: module M{}; module M::X {}; module M::X::Y { constant A = 1; }; constant Y = M::X::Y; say Y::A;
14:10 camelia rakudo-moar 6caf1d: OUTPUT«1␤»
14:10 Ven I guess... I guess I'll use that for now..
14:11 Ven can I export another module "as myself"?
14:12 Ven I can I should just override EXPORT as well
14:13 eli-se joined #perl6
14:13 Ven I guess*, erm.
14:14 eli-se Don't guess
14:14 eli-se Know
14:20 telex joined #perl6
14:32 araujo joined #perl6
14:33 lucasb At the beginning of S02, in the section Lexical Conventions/Bracketing Characters, some unicode codepoints are mentioned. Do you think it would be nicer to read if the literal character was added after the number? Like this for example: U+301D ("), U+301E (#), U+301F (#)
14:34 xfix joined #perl6
14:34 lucasb Well, the characters didn't show correctly here, sorry. :)
14:37 FROGGS hmmm, if we dont run intro trouble when adding these characters then I'd say +1
14:40 lucasb FROGGS: Well, the files are in utf-8, so I would edit it correctly, hopefully. Thanks!
14:42 PerlJam +1 from me too
14:42 xfix left #perl6
14:43 PerlJam (I never remember what those code points are and have to look them up each I time)
14:43 cschwenz left #perl6
14:43 PerlJam s:2nd/I//
14:44 PerlJam lucasb: maybe include their long name as well?
14:44 lucasb .u U+301E
14:44 yoleaux U+301E DOUBLE PRIME QUOTATION MARK [Pe] (〞)
14:45 lucasb PerlJam: I guess the long name would be too long for the text, don't they?
14:45 FROGGS that woule be a bit too much
14:45 FROGGS would*
14:49 tinyblak joined #perl6
14:53 Ven joined #perl6
14:53 Ven does Panda titlecase its module names? FooO::Bar; won't work (symbol not found)
14:54 moritz you mean there's a FooO::Bar in the ecosystem, and you can't install it?
14:54 tadzik "its" module names?
14:55 tadzik I think panda has a "did you mean some other module with a different casing" thing though, doesn't it?
14:55 Ven say I have a `lib/FooO/Bar.pm`, I can't `use FooO::Bar;`, it just won't work. If I change both "FooO" to "Fooo", it works.
14:55 tadzik resolve stage failed for Term::AnsiColor: Project Term::AnsiColor not found in the ecosystem. Maybe you meant Term::ANSIColor?
14:55 tadzik contributors++
14:55 Ven sorry, that wasn't clear, that's totally not related to panda. ugh
14:56 moritz Ven: if that is indeed the case, it's a bug in rakudo
14:56 tadzik your issue is pretty weird though :o
14:56 moritz considering that all-caps names like SVG work, that's pretty surprising
14:56 Ven moritz: a friend of mine wanted to try perl6 and hit it, I reproduced it locally as well. he's on windows, I'm on osx with a <1week-old rakudo
14:56 PerlJam Ven: probably a FS casing issue.
14:56 FROGGS Ven: that veeeeery unlikely
14:57 Ven PerlJam: yeah, that's what I thought of first as well
14:57 FROGGS Ven: what s the error message ooc?
14:57 PerlJam Ven: got a transcript of what you did and what happened?
14:57 Ven I'm running a case-insensitive os x, apparently :)
14:57 PerlJam I just tried it locally and had no difficulty
14:57 PerlJam (I'm on ubuntu though)
14:58 * Ven thought os x had a case-sensitive FS ....
14:58 FROGGS Ven: a case-insensitive would make module lookup more lax, not strict/weird
14:58 moritz Ven: it's case-preserving by default, just like Windows
14:58 Ven FROGGS: Could not find symbol '&Frontend'
14:58 FROGGS Ven: that is something else
14:58 Ven moritz: oh, can you configure windows not to be? Or did I interpret your comment wrongly
14:58 moritz Ven: you did
14:58 FROGGS so it found and loaded lib/FooO/Bar.pm
14:58 Ven alright
14:59 moritz Ven: the OS X default is just like windows works
14:59 psch windows has special directory names that are equivalent, i recently discovered
14:59 psch creating a directory "Program Files" on C:\ wants to merge it into "Programme"
14:59 psch which made me feel a bit uneasy
15:00 FROGGS Ven: can you gist the module?
15:00 Ven FROGGS: wait, apparently it freezes on some cases on windows. ugh
15:00 Ven I'll ask for a gist
15:00 nwc10 I think that I shall call my module Aux.pm, and see what hilarity follows...
15:01 moritz or Con
15:01 PerlJam nwc10: you have the con
15:01 PerlJam :)
15:01 FROGGS Nil
15:02 nwc10 I shall store all my PRN in it
15:02 dalek specs: c34d281 | (Lucas Buchala)++ | S02-bits.pod:
15:02 dalek specs: Add literal unicode chars in S02/Bracketing Characters
15:02 dalek specs: review: https://github.com/perl6/specs/commit/c34d2814ff
15:02 dalek specs: 008870f | (Zoffix Znet)++ | S02-bits.pod:
15:02 dalek specs: Merge pull request #91 from lucasbuchala/unicode1
15:02 dalek specs:
15:02 dalek specs: Add literal unicode chars in S02/Bracketing Characters
15:02 dalek specs: review: https://github.com/perl6/specs/commit/008870f240
15:12 raiph joined #perl6
15:12 Ven FROGGS: https://gist.github.com/wryk/e04068009417edc798b5
15:14 Ven FROGGS: (updated with the command)
15:15 fhelmberger joined #perl6
15:16 PerlJam Ven: does Client.pm really only contain that text?
15:16 coffee` joined #perl6
15:16 Ven PerlJam: yes
15:17 wryk joined #perl6
15:18 FROGGS m: say LoL
15:18 camelia rakudo-moar 6caf1d: OUTPUT«(LoL)␤»
15:18 FROGGS >.<
15:18 PerlJam FROGGS++
15:18 FROGGS Ven: that's your issue
15:19 Ven FROGGS: ?
15:19 FROGGS btw, I get:
15:19 FROGGS perl6 --ll-exception -Ilib t/00-basic.t
15:19 FROGGS This representation (Null) does not support associative access
15:19 FROGGS at src/Perl6/World.nqp:523  (/home/froggs/dev/nqp/install/share/nqp/lib/Perl6/World.moarvm:install_package:172)
15:19 FROGGS m: class LoL::Meh
15:19 camelia rakudo-moar 6caf1d: OUTPUT«===SORRY!===␤This representation (Null) does not support associative access␤»
15:19 FROGGS m: class Int::Meh
15:19 camelia rakudo-moar 6caf1d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Begq7NWGKV␤Unable to parse class definition␤at /tmp/Begq7NWGKV:1␤------> 3class Int::Meh7⏏5<EOL>␤    expecting any of:␤        generic role␤»
15:19 FROGGS m: class Parcel::Meh
15:19 camelia rakudo-moar 6caf1d: OUTPUT«===SORRY!===␤This representation (Null) does not support associative access␤»
15:19 moritz wtf.
15:19 moritz oh
15:19 Ven FROGGS: he gets that as well, I think
15:20 Ven FROGGS: and without the "API" layer, he told me it freezes...
15:20 FROGGS Ven: LoL already is something, so for the moment avoid that namespace :o)
15:20 Ven Ahhh
15:20 FROGGS (and rakudobug it)
15:20 Ven indeeeeed.
15:21 sirdancealot joined #perl6
15:22 FROGGS .tell lizmat We need to talk about CUR::Installation and the way that non-existent dirs trigger that CURs do not appear in @*INC... (I "fixed" it in a rather scary way and want to fix it properly)
15:22 yoleaux FROGGS: I'll pass your message to lizmat.
15:29 nine_ dj_goku: not at 4 in the morning, but I do backlog
15:29 Ven .oO( I only sleep when my perl6 is recompiling )
15:29 Ven .oO( I used to sleep nicely, but this last year has been horrible )
15:29 FROGGS :o)
15:29 tadzik haha
15:30 nine_ I wonder how all this CompUnitRepo stuff fits together with distribution package managers
15:30 FROGGS nine_: very nicely hopefully
15:31 FROGGS at least, we always had packagers in mind when designing it
15:31 nine_ FROGGS: but it sounds like simply copying files will no longer be enough to install
15:31 FROGGS nine_: correct, they need an install hook in some way
15:32 PerlJam nine_: and this is a feature!  :)
15:32 moritz and I hope that installing a file is an API method in Perl 6 then
15:32 FROGGS nine_: ahh btw, they dont have to do that... they can install copy files around and provide either a CompUnitRepo::Local::Files or a CompUnitRepo::Vendor::Debian or so
15:33 FROGGS moritz: it already is
15:33 FROGGS (for CUR::Installation)
15:33 [Coke] Anyone here going to yapc::na in Utah?
15:33 FROGGS me isnt
15:33 tadzik hmm
15:33 tadzik I still have my visa valid
15:34 tadzik the cost is pretty insane though
15:35 tadzik otoh it's probably similar to what it always is in NA
15:36 pecastro joined #perl6
15:36 tadzik ah, I'd be on the other side of the globe then
15:53 rmgk_ joined #perl6
15:54 geever joined #perl6
15:56 coffee` joined #perl6
15:56 eli-se joined #perl6
15:56 tinyblak joined #perl6
15:58 eli-se hi there!!!!
15:58 PerlJam eli-se: greetings!  :)
16:09 itz some nice p6 talks at NLPW
16:09 lucasb m: module A::B {}; say A.HOW.WHAT  # A gets autovivified into a package, right?
16:09 eli-se http://isocpp.org/blog/2015/04/the-c-languages-merge
16:09 camelia rakudo-moar 6caf1d: OUTPUT«(Perl6::Metamodel::PackageHOW)␤»
16:10 eli-se nice
16:10 lucasb m: module A::B {}; constant A = 42  # Ok, A already existed
16:10 camelia rakudo-moar 6caf1d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/PlrZX66lq3␤Redeclaration of symbol A␤at /tmp/PlrZX66lq3:1␤------> 3constant A = 42  # Ok, A already existed7⏏5<EOL>␤»
16:10 eli-se maybe we should merge with Python?
16:10 lucasb m: constant A = 42; module A::B {}; say A  # Does B gets inserted into A (an Int) somehow?
16:10 camelia rakudo-moar 6caf1d: OUTPUT«42␤»
16:10 lucasb ^^^ Does it make any sense what I wrote?
16:13 FROGGS m: constant A = 42; class A::B {}; say A::B
16:13 camelia rakudo-moar 6caf1d: OUTPUT«(A::B)␤»
16:13 FROGGS m: constant A = 42; class A::B {}; say A
16:13 camelia rakudo-moar 6caf1d: OUTPUT«42␤»
16:13 moritz lucasb: you must distinguish A from A:: (its symbol table)
16:13 FROGGS since the A namespace in A::B is just a stub it just happens to work here
16:14 moritz m: constant A = 42; say A::.^name
16:14 camelia rakudo-moar 6caf1d: OUTPUT«Stash␤»
16:14 psch m: module A { module B { } }; constant A = 42; say A::B # this breaks
16:14 camelia rakudo-moar 6caf1d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/9of3H8RsQg␤Redeclaration of symbol A␤at /tmp/9of3H8RsQg:1␤------> 3dule A { module B { } }; constant A = 427⏏5; say A::B # this breaks␤»
16:14 psch so stubbing of packages doesn't set something it should?
16:14 lucasb So, constants and packages/modules live in separate namespaces, right?
16:15 brrt joined #perl6
16:17 spider-mario joined #perl6
16:20 albert_ joined #perl6
16:22 moritz no
16:22 moritz psch: I don't see the stubbing
16:23 lucasb I'm sorry; correct: constants and packages/modules *share* the same namespace
16:23 lucasb m: constant A = 42; my \B = 42; say A::.WHAT, B::.WHAT
16:23 camelia rakudo-moar 6caf1d: OUTPUT«(Stash)(Stash)␤»
16:24 lucasb But why does simple scalar values have a stash?
16:24 PerlJam "have a stash"?
16:24 psch moritz: http://design.perl6.org/S10.html#Package_nesting speaks of "empty packages".  i'm not sure that's the same as stubbing here
16:24 psch ah
16:25 psch but constants are package-like objects
16:25 psch which is allowed, according to a bit later in that link
16:25 psch so it works as designed, if i don't misunderstand something
16:33 lucasb By "have a stash" I mean new names be appended (with ::) to the original name. Even if the original value was not a package-like/package-variant like S10/"Package nesting" says. For example, the Int values above declared as constant and sigilless.
16:34 FROGGS <psch> but constants are package-like objects
16:34 FROGGS m: my Int $a = 42; say $a::
16:34 camelia rakudo-moar 6caf1d: OUTPUT«42␤»
16:34 FROGGS m: my Int $a = 42; say $a::.WHAT
16:34 camelia rakudo-moar 6caf1d: OUTPUT«(Int)␤»
16:36 lucasb Anyways, I'm just not thinking clearly, so sorry for any confusion. Thanks for the help everybody.
16:36 lucasb m: my Int \a = 42; say a::.WHAT
16:36 camelia rakudo-moar 6caf1d: OUTPUT«(Stash)␤»
16:36 moritz m: say 4::.WHAT
16:36 camelia rakudo-moar 6caf1d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/n6off3KmSR␤Confused␤at /tmp/n6off3KmSR:1␤------> 3say 4:7⏏5:.WHAT␤    expecting any of:␤        colon pair␤»
16:36 moritz m: say 4.WHO.^name
16:36 camelia rakudo-moar 6caf1d: OUTPUT«Stash␤»
16:46 masak evening, #perl6
16:46 timotimo #perl6, masak
16:47 spider-mario joined #perl6
16:47 timotimo did you see my highlights for some of your modules not having "provides" sections in their META.info?
16:48 masak no, haven't gotten that far.
16:48 masak will have a look soonish.
16:48 timotimo that's nice :)
16:48 timotimo although someone said they'll have a fully automated script that'll build pull requests for all ~120 modules lacking that section
16:48 timotimo so maybe wait for that first :)
16:52 arnsholt Version 0.5 of $work webapp done \o/
16:52 arnsholt Time to go get dinner!
16:53 colomon Time to cook some lunch!
16:59 Psyche^ joined #perl6
17:00 zakharyas joined #perl6
17:05 FROGGS joined #perl6
17:09 ZoffixWork joined #perl6
17:09 ZoffixWork "although someone said they'll have a fully automated script that'll build pull requests for all ~120 modules lacking that section"
17:09 ZoffixWork Yeah, I'll do it in about 7 hours, when I get home :) it's not 100% automated script, but it does most of the work, so I should be done pretty quick :)
17:11 ZoffixWork BTW, I spotted a few docs that say "provides" section is optional. Should those be updated to say it's mandatory?
17:12 timotimo yeah
17:12 ZoffixWork \o/
17:12 timotimo feel free to share links to the sources that say that
17:14 flussence I'm not sure why the module installer can't just infer sane defaults for missing metadata, like ufo used to do for you...
17:14 timotimo that's what "panda gen-meta" does
17:16 flussence that's my point: if it can figure it out on its own, why the need to update everything in the ecosystem?
17:37 raiph joined #perl6
17:37 Patterner joined #perl6
17:40 FROGGS flussence: because gen-meta is not always right...
17:41 FROGGS also because it looks for appearing symbols when modules get loaded instead of just turning filenames into namespaces
17:42 flussence ah, fine then.
17:43 muraiki joined #perl6
17:49 FROGGS and the reason for that was to decouple symbols and filenames/paths
17:53 RabidGravy joined #perl6
17:56 Sqirrel joined #perl6
18:05 dalek perl6-roast-data: 68f44a4 | coke++ | / (9 files):
18:05 dalek perl6-roast-data: today (automated commit)
18:05 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/68f44a49eb
18:14 grondilu joined #perl6
18:18 firefish5000 joined #perl6
18:21 eli-se joined #perl6
18:22 pecastro joined #perl6
18:35 Sqirrel joined #perl6
19:02 raiph joined #perl6
19:08 yqt joined #perl6
19:12 brrt joined #perl6
19:20 beastd joined #perl6
19:21 noganex joined #perl6
19:25 [Tux] https://gist.github.com/Tux/8ebe8af1949c2aced18b <= is this overly optimistic as implementation (before I test and fuck up)
19:25 spebern joined #perl6
19:31 [Tux] apart from the typo, that just fricking works :)
19:35 dsm joined #perl6
19:35 masak looks good.
19:36 masak my only stylistic comment is that I wouldn't re-use the same variable $fh for a different file handle on line 9.
19:36 masak but that's just my SSA acting up, I'm sure.
19:36 telex joined #perl6
19:37 [Tux] return open $filename, :r, chomp => False;
19:38 * [Tux] changes
19:38 [Tux] FWIW, I want that in core in memory :)
19:42 ShimmerFairy joined #perl6
19:44 _edwin joined #perl6
19:45 TimToady m: my \FH = 41; my \FH = 42;
19:45 camelia rakudo-moar 6caf1d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/xpdYk1dCch␤Redeclaration of symbol FH␤at /tmp/xpdYk1dCch:1␤------> 3my \FH = 41; my \FH = 427⏏5;␤»
19:45 [Tux] m: (my $a, my $b) = (1,2);$a.say
19:45 camelia rakudo-moar 6caf1d: OUTPUT«1␤»
19:45 [Tux] m: class C { has Int $!x; method foo { ($!x, my $b) = (1,2);}};C.foo
19:45 camelia rakudo-moar 6caf1d: OUTPUT«Cannot look up attributes in a type object␤  in method foo at /tmp/ClfFVoH4FZ:1␤  in block <unit> at /tmp/ClfFVoH4FZ:1␤␤»
19:45 [Tux] is that explainable?
19:47 masak you're calling C.foo, the .foo method on the type object C
19:47 masak the type object doesn't really properly have an $!x
19:47 masak m: class C { has Int $!x; method foo { ($!x, my $b) = (1,2);}}; C.new.foo
19:47 camelia rakudo-moar 6caf1d: ( no output )
19:47 masak that works.
19:47 Juerd |Tux|: my Int $x, use a regular variable...
19:47 masak Juerd: depends what scoping he wants, surely.
19:48 masak Juerd: 'my' scopes it to the whole class. 'has' scopes it per instance.
19:48 nine_ Does nextsame create a new callframe?
19:48 [Tux] Juerd, I was working back from a line where I wanted ($!attr, my $xxx) = function (params)
19:48 Juerd masak: Per instance clearly can't work with C.foo :)
19:48 masak nine_: surely it creates a new one, question is more whether it ousts the old one ;)
19:49 masak Juerd: well, we're each fixing one of the two things that don't work together in his code.
19:49 TimToady "Cannot look up attributes in a type object" is an implementor-centric error message, not a user-centric one
19:49 [Tux] and I want an auto-correct on IO::Hanlde to IO::Handle
19:49 masak TimToady: actually, that error message could fail statically in this case.
19:49 Juerd TimToady: "Instance attribute used in non-instance method call"? :)
19:49 masak since C is already resolved at compile time.
19:50 masak no need to make it survive until runtime and then fail.
19:50 TimToady Juerd: that would be an improvement
19:51 nine_ masak: when it creates a new callframe, this callframe gets its own $*DISPATCHER lexical. So a nextsame in the new callframe has a different dispatcher that does not share state with the other one and thus comes to the same conclusion on hitting another nextsame. Leading to RT #123989
19:51 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=123989
19:54 nine_ Juerd: who's at fault? The caller or the callee? Your message implies the latter while it's entirely possible that the caller mistakenly called an object method as a class method.
19:55 eli-se joined #perl6
19:56 Juerd nine_: Hard to tell. It's the callers fault that the method is used on the type object OR it's the callee's fault that it tries to use an instance thingy, but I think the compiler can't know the difference.
19:57 nine_ Juerd: so the error message should imply neither or both.
19:57 PerlJam It could mention both options.
19:57 Juerd I'm not convinced that all possible explanations need to be listed.
19:57 PerlJam and name the attribute in question
19:58 PerlJam Juerd: if it's just two, listing them only helps the programmer figure out what happened and how to fix it.
19:58 Juerd "Instance variable $!x used in a method called on a non-instance"
19:59 PerlJam I supposed the type object could be named as well
19:59 Juerd "Instance variable $!x used in method foo called on non-instance (type object) C"
19:59 Juerd But... if you take that approach, which line number should be reported? :P
19:59 PerlJam both!  ;)
20:00 Juerd "Instance variable $!x used in method foo in foo.pl line 123 called on non-instance (type object) C in foo.pl line 456"
20:00 Juerd Whoa.
20:00 Juerd Good luck, implementors :)
20:01 masak no-one else liked the idea of statically erroring out with "call will never work" for the C.foo case where C is already statically resolved?
20:01 Juerd Of course, this calls for two separate stack traces, both equal except that one is 1 call shorter
20:02 nine_ masak: I do
20:02 Juerd masak: Could work, but can't methods be marked as instance-only?
20:02 nine_ masak: the earlier errors are reported the better
20:02 PerlJam masak: How does the compiler decide that it will never work? and when?
20:02 Juerd Because then, any use of $!foo could simply mark the method as instance-only
20:03 Juerd And the error message could be simpler.
20:03 dalek rakudo-star-daily: 2f6d5ed | coke++ | log/ (2 files):
20:03 dalek rakudo-star-daily: today (automated commit)
20:03 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/2f6d5edc34
20:03 Juerd "Method foo can only be called on an instance of C, not on C itself."
20:03 PerlJam (compiler hints)++ if we can reasonably have them.
20:04 PerlJam I guess, if you declare the sig right, all the info is easy to get at.  But without that, it seems like a bit of guessing for the compiler to do it.
20:06 masak PerlJam: compiler sees the call C.foo, and has already set a flag that the foo method in class C accesses an attribute. boom.
20:06 * masak rabmits sukudobug
20:07 Juerd "Method foo can only be called on an instance of C, not on C itself, because C.foo accesses instance attribute $!x."
20:07 masak neat. +1
20:08 PerlJam masak: flagging methods like that seems like quite a bit of bookkeeping for marginal benefit.
20:08 masak really? seems worth it to me...
20:08 masak it's a small hash somewhere in the compiler.
20:08 masak %accattr<C.foo> = True;
20:08 [Tux] IO::String cause 50 more tests to pass
20:09 * [Tux] is quite happy with that
20:09 masak [Tux]: \o/
20:09 Juerd It could be a boolean flag (instance-only) and an array of further explanations
20:09 nine_ PerlJam: it would have prevented panda from being broken by rakudo (fixed with rakudo commit 011c3ec704f1b6014eb704071ce5f92cb4ef7fe6)
20:09 masak nine_: are you sure? the call needs to be *statically* detectable.
20:10 Juerd I've always found it a bit weird that Perl's object methods are class methods AND instance methods at the same time. Lots of Perl 5 modules break in interesting ways if you don't use them right.
20:10 [Coke] I find myself missing the java declaration of "this method is static (defaulting to instance if you don't say anything)"
20:10 PerlJam I'm not saying it's not a good idea.  I'm just saying that the bang/buck ratio seems off to me.   (I could be entirely wrong though :)
20:10 Juerd [Coke]: "static" is such a weird and overused word...
20:11 Juerd How many meanings does it have, even in programming alone?
20:11 PerlJam [Coke]: method foo(:D: ...) # that's "static"  :)
20:11 nine_ masak: ok, I retract. It may have prevented
20:11 [Tux] https://gist.github.com/Tux/02832c29dc18b3c6a5e0
20:11 PerlJam (assuming that we allow to elide the invocant's name)
20:12 masak to be clear, a static check would catch `C.foo` but not `$obj.foo` where $obj happens to contain a type object.
20:12 [Coke] I'm not saying I miss the particular word, just the ability to declare what's what.
20:13 Juerd [Coke]: I get that. Just saying it, hoping that if something like that is added, it won't be "static" :)
20:14 [Coke] Juerd++
20:14 _edwin joined #perl6
20:15 [Coke] masak: I think you mean a compile-time static check, not a static static check. ;)
20:16 Juerd A check
20:16 Juerd s/.*//
20:17 mohij joined #perl6
20:18 masak [Coke]: yes. thank you. I meant... that, what you said.
20:31 ShimmerFairy joined #perl6
20:32 firefish5000 joined #perl6
20:45 brrt joined #perl6
20:46 kjs_ joined #perl6
20:53 kjs_ joined #perl6
20:57 dalek doc: a1aeb93 | (Steve Mynott)++ | lib/ (6 files):
20:57 dalek doc: typos
20:57 dalek doc: review: https://github.com/perl6/doc/commit/a1aeb936e2
21:12 lucasb joined #perl6
21:17 lucasb Can you update a single line of comment in rakudo? This one:
21:17 lucasb https://github.com/rakudo/rakudo/blob/nom/src/core/HashIter.pm#L5
21:17 lucasb IIUC, it should be "pair = 0, kv = 1, k = 2, v = 3, anti = 4, invert = 5"
21:22 PerlJam lucasb: you could submit a PR for that change :)
21:22 lichtkind joined #perl6
21:23 lucasb PerlJam: It's just a single tiny line :D
21:28 PerlJam seems right to me ...
21:28 dalek rakudo/nom: b247cab | PerlJam++ | src/core/ (2 files):
21:28 dalek rakudo/nom: update comment on HashIter mode
21:28 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b247cabfc7
21:30 lucasb PerlJam++, thanks
21:31 dalek rakudo/nom: e88467b | PerlJam++ | src/core/HashIter.pm:
21:31 dalek rakudo/nom: update comment on HashIter mode
21:31 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e88467bc72
21:31 lucasb src/core/core
21:31 PerlJam Apparently I accidentally committed an extra file, so I'm asking for that forgiveness we're always talking about
21:32 PerlJam :)
21:32 lucasb PerlJam: :)
21:33 nwc10 what's a little file between friends? :-)
21:33 travis-ci joined #perl6
21:33 travis-ci Rakudo build errored. Jonathan Scott Duff 'update comment on HashIter mode'
21:33 travis-ci http://travis-ci.org/rakudo/rakudo/builds/56792856 https://github.com/rakudo/rakudo/compare/6caf1d4e4e29...b247cabfc7e7
21:33 travis-ci left #perl6
21:34 espadrine joined #perl6
21:40 khisanth_ joined #perl6
21:55 kjs_ joined #perl6
22:29 japhb .ask nine_ I seem to recall someone (you, I think?) mentioning that there was something unsafe about running multiple Python interpreters in a single process as a way of working around the unsafe/poorly scaling threading.  Can you give specifics?
22:29 yoleaux japhb: I'll pass your message to nine_.
22:30 qntm_ joined #perl6
22:32 * japhb is wondering if he can stop shelling out to multiple Python programs for some complex client code and just run a pile of Python interpreters with Inline::Python instead.
22:33 japhb ... thus allowing a pile of per-query startup costs to be amortized over many queries.
22:35 yqt joined #perl6
22:52 qntm_ Is camelia running the latest and greatest Perl 6 interpreter because I think I found a bug
22:53 TimToady it's usually within an hour of real time
22:54 qntm_ right then here goes
22:54 qntm_ rakudo: my @arr = (1, 2); say @arr.length;
22:54 camelia rakudo-moar e88467: OUTPUT«No such method 'length' for invocant of type 'Array'␤Did you mean 'elems', 'chars', 'graphs' or 'codes'?␤  in block <unit> at /tmp/tmpfile:1␤␤»
22:54 qntm_ rakudo: my @arr = (1, 2); say @arr.graphs;
22:54 camelia rakudo-moar e88467: OUTPUT«No such method 'graphs' for invocant of type 'Array'␤  in block <unit> at /tmp/tmpfile:1␤␤»
22:54 qntm_ in the first error message Perl 6 suggests a method which doesn't exist
22:55 BenGoldberg joined #perl6
22:55 TimToady .graphs and .codes are not yet implemented, but they will be, so we'll probably leave the message for now
22:56 qntm_ Hmm, .codes did work for me
22:56 TimToady m: my @arr = (1, 2); say @arr.codes
22:56 camelia rakudo-moar e88467: OUTPUT«3␤»
22:56 qntm_ By the way I imagine people have had this discussion a bunch of times before but you can add me to the pile of people who think the method for getting an array's length should be .length
22:56 TimToady hmm, one could argue it should be 2 instead, but it's counting the psace
22:56 TimToady *space
22:57 qntm_ yeah "3" is quite a surprising result there
22:59 TimToady it's all very well if you come from a language where only lists are measured in "length", but for people coming from languages where "length" is about strings instead, the lack of proper units is very confusing in the age of unicode, so we banned that term
22:59 TimToady not everyone has the same background as you
22:59 qntm_ do perl 6 strings inherit from arrays?
23:00 TimToady besides, .elems is shorter :)
23:00 TimToady no
23:00 qntm_ .len is shorter still, if you really care about that
23:00 TimToady and a BASIC programmer would certainly expect that to be a string length :)
23:00 qntm_ so they only have .graphs, .codes and .chars?
23:00 TimToady .elems is quite unambiguous
23:01 qntm_ well, I disagree on that as well actually
23:01 qntm_ to me .elems sounds like it might create a shallow copy of the array, or return a generator for its elements, or something
23:02 qntm_ like maybe arr.elems[0] is how you access the first element
23:02 qntm_ but anyway if strings only have .graphs, .codes and .chars then they don't have a simple "length" method so you're fine
23:05 TimToady nevertheless, specifying units is better than a nebulous concept, long term, and people will get used to it, so we're just not gonna use length; you can alias it if you really like
23:06 qntm_ I think people are going to get tripped up by this
23:06 TimToady no doubt, but all language design is tradeoffs
23:06 qntm_ everybody's going to get used to it very quickly, but that doesn't change the fact that every single new Perl 6 programmer is going to trip over it
23:07 TimToady hence, the message, flawed though it may be :)
23:07 qntm_ why not just return the array length
23:07 TimToady because they might not be thinking of $random-variable as an array
23:08 qntm_ well if it's a string then the error message would make more sense
23:08 TimToady clarity must take a back seat to custom here
23:08 qntm_ "length is not well-defined for strings, try .chars, .codes or .graphs"
23:09 TimToady m: say 42.elems
23:09 camelia rakudo-moar e88467: OUTPUT«1␤»
23:09 qntm_ say "abcdef".elems
23:09 qntm_ rakudo: say "abcdef".elems
23:09 camelia rakudo-moar e88467: OUTPUT«1␤»
23:09 qntm_ haha what
23:10 TimToady m: say "abcdef"[0]
23:10 camelia rakudo-moar e88467: OUTPUT«abcdef␤»
23:10 qntm_ so string doesn't inherit from array but it implements elems
23:10 TimToady not really
23:11 TimToady but anything that is not a list can be considered a list of 1 element
23:11 b2gills The elems method you get on a Str is probably from Any
23:12 qntm_ why
23:12 TimToady because this is Perl
23:12 TimToady which is all about tagmemics
23:12 qntm_ why is a string considered to be a single-element array
23:12 TimToady why can you use a noun as a verb?
23:12 qntm_ does "tagmemics" stand for something
23:13 qntm_ are nouns and verbs Perl 6 language concepts?
23:13 TimToady certainly, though we use noun markers so you can tell 'em apart
23:13 b2gills Perl is all about automatic conversion where it is obvious what is meant
23:13 b2gills m: say "3" + "3"
23:13 camelia rakudo-moar e88467: OUTPUT«6␤»
23:14 qntm_ so if I call .elems on a string it is obvious that what I mean is to get the number of elements in the string
23:14 qntm_ which is obviously 1
23:14 qntm_ regardless of string content
23:14 TimToady m: my $verb = &max;  say $verb(5,4,3)
23:14 b2gills It can be considered a single element list
23:14 camelia rakudo-moar e88467: OUTPUT«5␤»
23:15 japhb .oO( &nouning a $verb )
23:15 qntm_ why is a string considered to be a single-element array?
23:15 japhb qntm_: Not just a string.  Any scalar thing
23:16 qntm_ that strikes me as very surprising behaviour
23:16 TimToady because that's what most people want most of the time
23:16 jdv79 if i want to stuff an "undef" in an array slot its Mu now?
23:16 TimToady jdv79: you probably want Any
23:16 qntm_ if I wanted a single-element array can't I do ("string") instead of "string"
23:16 japhb jdv79: We have typed undef now, so Mu is saying "absolutely any type" as well as undefined
23:16 japhb ... but what TimToady said as well
23:16 qntm_ again, I think that's going to trip lots and lots of people up
23:17 TimToady qntm_: I'm not gonna recapitulate the whole design for you
23:17 Zoffix What should "provides" in META.info be for files in bin/ ?
23:17 b2gills The only other thing it could do is be an error
23:17 qntm_ I think the decision to conflate strings with single-element arrays is going to confuse a lot of people
23:18 qntm_ sorry, conflate scalars
23:18 b2gills It doesn't conflate strings an arrays, at least not like C does
23:19 b2gills If it didn't you would probably always end up calling `$var.list.[0]` just to prevent it from failing
23:19 b2gills which is far worse
23:20 Zoffix bin: "Any file inside this directory, will be installed as a callable shell application.".... I guess it shan't be in "provides" at all, since we can't do multiple versions of the same name.
23:23 qntm_ I would be totally okay with completely separating strings and arrays as concepts
23:25 KCL_ joined #perl6
23:47 Zoffix \o/ sent pulls to all the modules that weren't S11-compliant :)
23:47 Zoffix Except a couple that didn't have META.info (marked as [old]) and v5, which I've no idea what it's supposed to have for "provides" :)
23:50 Zoffix Or I should have... but somehow I'm showing just 38 PRs, yet 118 non-S11 dists  :S
23:57 Zoffix Oh, my scriptastic automation program failed me and skipped a ton of modules when I tried to restart it mid-point... Oh well, MOAR PRs \o/

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

Perl 6 | Reference Documentation | Rakudo