Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-07-09

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 ren1us anyone feel like helping me golf down a segfault?  i found the line that pitches a fit, but it just makes no sense that it would be causing a problem (line: $.age++;)
00:02 ren1us segfault in parrot*
00:09 hoverboard joined #perl6
00:12 timotimo ren1us: can you try --optimize=off?
00:17 atroxaper joined #perl6
00:18 carlin m: use Test;loop {my @a=1;@a=?(@a.pick eq any 1);my $x=().pick;my @b=@a;@b.pick(2);@b.pick(4);@a.pick(*).sort.Str;@a=1..9;my @v;push @v,@a.pick(*) for ^9;@a xx 9;ok ?(~[1].pick eq any(*));ok ?(~[9].pick eq '1'|'4');@a=1..100;@b=pick(*,@a);is @b.elems,100;is ~@b.sort, ~(1..100);is ~@b.grep(Int).elems,100;sub w($f){my %s;%s{$_}=1 for (1..$f*100).pick(50);is %s.keys.elems,50,$f;ok (so 1 <= all(%s.keys) <= 100),'';};w(1);w(3);w(1);w(1000)}
00:18 camelia rakudo-moar 41574a: OUTPUT«(signal )not ok 1 - ␤not ok 2 - ␤ok 3 - ␤ok 4 - ␤ok 5 - ␤ok 6 - 1␤ok 7 - ␤ok 8 - 3␤not ok 9 - ␤ok 10 - 1␤ok 11 - ␤ok 12 - 1000␤not ok 13 - ␤»
00:19 carlin that's a golf of the S32-list/pick.t explosion
00:19 Mouq carlin++
00:20 ren1us timotimo: still segfaults
00:22 timotimo i'm not to blame in that case :3
00:22 ren1us lol.
00:23 ren1us i want to report it but i feel like i need something a little more specific than a project a few hundred lines long that takes 3 minutes just to get to the segfault
00:24 timotimo golfing is a high art :(
00:24 ren1us and i'm no tiger woods
00:24 ren1us nor have i had as much success with girls as tiger woods, but that's a different problem
00:26 BenGoldberg joined #perl6
00:27 Mouq lue: https://github.com/perl6/Pod-To-HTML/commit/e6549f616
00:28 Mouq ren1us: Success with girls is a higher art :P
00:29 Mouq depending on how you go about it..
00:30 Mouq ..or rather, one's definition of 'success' :P
00:30 jack_rabbit joined #perl6
00:32 ren1us Mouq: I define success as falling for someone who doesn't look at me as 'just friends'
00:32 ren1us at this point i'd be thrilled to fall for one who hates me, the whole 'just friends' thing is getting kinda boring
00:33 ren1us and any pointers on golfing?  i actually keep bumping into things that i try to pinpoint the problem in, but can't.  memory leaks in moar, segfaults in parrot, etc etc
00:36 Mouq ren1us: I'm sorry, been there many times :/
00:36 Mouq hugme hug ren1us
00:36 * hugme hugs ren1us
00:37 ren1us ._. thanks hugme.  not gonna question it.
00:38 Mouq .oO( Actually, every time except twice, and one she said she just wated to be friends but stopped talking to me once she got back with her ex 9_9 )
00:40 Mouq Aaanyway, I'm going to try torturing my Pod::To::HTML refactor until it works
00:41 dayangkun joined #perl6
00:45 _slade joined #perl6
00:45 ren1us actually, someone tell me i'm not crazy: for %.hash.keys { # stuff # }; <--- once this loop completes an iteration, assuming no variables outside the loop are changed, all objects defined inside the loop should be garbage collected, right?
00:50 gtodd "completes an iteration" or "completes" ...
00:51 ren1us completes an iteration
00:54 ren1us so if i did something like for 0..9 { my $a = A.new; doSomething(); }; where doSomething defines a gazillion objects and such, it's not going to wait until the entire loop is finished before garbage collecting $a and everything created by doSomething()
00:54 Akagi201 joined #perl6
01:05 jnap1 left #perl6
01:12 Mouq std: class :: { has $.foo }.new
01:12 camelia std 0f2049c: OUTPUT«ok 00:01 124m␤»
01:12 Mouq m: class :: { has $.foo }.new
01:12 camelia rakudo-moar 41574a: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/VE6vnpQXbWâ�¤Two terms in a rowâ�¤at /tmp/VE6vnpQXbW:1â�¤------> [32mclass :: { has $.foo }[33mâ��[31m.new[0mâ�¤    expecting any of:â�¤        scoped declaratorâ�¤        constraintâ�¤        p…»
01:12 Mouq Hmm
01:27 wamiks left #perl6
01:45 klapperl joined #perl6
01:52 chenryn joined #perl6
01:55 Akagi201 joined #perl6
01:55 Akagi201 joined #perl6
01:58 FROGGS joined #perl6
02:01 Akagi201 joined #perl6
02:05 dalek roast/S26-WHY: 1a417fe | (Rob Hoelz)++ | S26-documentation/why- (2 files):
02:05 dalek roast/S26-WHY: Stop skipping test that now no longer segfaults
02:05 dalek roast/S26-WHY: review: https://github.com/perl6/roast/commit/1a417feebd
02:05 dalek roast/S26-WHY: 87aa7e3 | (Rob Hoelz)++ | S26-TODO:
02:05 dalek roast/S26-WHY: More things TODO for S26...
02:05 dalek roast/S26-WHY: review: https://github.com/perl6/roast/commit/87aa7e36f2
02:12 lue Mouq: cool, just know that instead of "does Pod::Walker", it should really be "is Walker::Callees" :)
02:15 * lue decides to finally add Pod::Walker to ecosystem
02:15 noganex_ joined #perl6
02:17 dalek ecosystem: 8a01b34 | lue++ | META.list:
02:17 dalek ecosystem: Add Pod::Walker
02:17 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/8a01b348d3
02:18 Mouq lue: https://github.com/Mouq/pod-walker/commit/b32599c03a560283d3a660ddf540714b06f4b112
02:20 Mouq lue: I wouldn't be surprised if that's the completely wrong approach
02:20 Mouq lue: But I'm close to having a copy of Pod::To::HTML that runs locally with that, even if incorrectly in many places
02:21 Mouq s/runs/compiles :P
02:22 lue Any particular reason you want to stuff the subs in the role too, ooc?
02:23 Mouq Mmm, no reason in particular, though I want to be able to add a multi-candidate to pw-recurse in PTH and I guess putting them in the role made me feel that it was more likely to work :P
02:24 lue Are classes a necessity for a Pod::To:: module anyway, or would your role-based solution suddenly force its user to make a class? :)
02:26 Mouq They're not necessary but it sure cleans things up. Right now my hackity solution is to have method render (PTH :U: |a) call self.new.render(|a)
02:27 Mouq Which means that leakage between documents shouldn't be the problem it has been in the past
02:28 Mouq But perhaps a class is needed for the documents, and PTH should really just be a collection of subs
02:30 Mouq Or maybe it'll just die with "Bytecode validation error at offset 136, instruction 23: truncated stream"
02:31 lue My idea is that you'd have an object to hold all of your functions in, and then a collection of multi subs in the module to help you use it. Still feels more classy than roley to me, but I can't say I know for sure what's best :)
02:33 Mouq lue: Classy would work too :) The main issue I'm haven't gotten around to addressing is that P2H switches between an 'html', 'inline', and 'raw or html-escaped text' mode
02:34 Mouq The only difference I can see about inline, though, is that Paras aren't rendered with <p>s
02:35 Mouq (Note that this is an issue regardless or sub/role/class structure of Pod::Walker)
02:35 Mouq *of
02:36 * lue wonders if he should put everything under  module Pod::Walker;  so  Pod::Walker::Callees.new(),  Pod::Walker::pod-walk() ...
02:37 lue Mouq: yeah, that sounds like you need a ~slightly~ more structured object than a plain string;  something like class PodString { Str $.text; EnumTypeThing $.txtstate }, where $.txtstate lets you know whether its "html" or "inline" or...
02:39 Mouq lue: The issue is that the things that need to be processed as 'inline' are processed before they're known to need to be processed as inline. And sometimes a single function needs to process them as 'inline' or 'rawtext'
02:40 xenoterracide__ joined #perl6
02:40 lue How's that able to work at all? O_o
02:41 Mouq lue: Well, that's what'll need to be resolved once I get it running. The way it used to work was because you manually called node2inline or whatever, but here the preprocessed text is handed to you. Which I still think is a good idea
02:43 ren1us joined #perl6
02:43 lue Mouq++ for working on it (and make sure to "lose" the enforced stylesheet while you're in there, eh? :P)
02:44 isBEKaml joined #perl6
02:44 Mouq lue: Haha, what stylesheet? I have no clue what you're talking about
02:44 lue Yeah, sorry. Don't know what I was thinking there. :)
02:46 xenoterracide__ joined #perl6
02:48 Mouq I really hate that the 'Cannot call X, none of these signatures match:' doesn't show the capture its matching against
02:49 Mouq At the same time, a .perl of an arbitrary call can be crazy verbose, so..
02:49 lue I also don't like how warning messages won't show a backtrace on -j and -m like it does on -p, meaning every UVOTA just stands to infuriate you. I looked at it earlier, and I don't immediately see how to change that, though :/
02:49 Mouq That too :|
02:52 Mouq Ahh, I see
02:52 cooper joined #perl6
02:52 cooper joined #perl6
02:52 Mouq The problem is that my multi sub pw-recurse isn't getting called. Which is kind of expected
02:53 Akagi201_ joined #perl6
02:53 hoelzro so I'm working on getting S26 working correctly with Rakudo, and I came across this:
02:53 hoelzro https://github.com/rakudo/rakudo/blob/nom/src/Perl6/Actions.nqp#L2302
02:53 hoelzro does anyone know why var traits are NYI?
02:53 rGeoffrey joined #perl6
02:56 Mouq m: my $x is docs("abcd");
02:56 camelia rakudo-moar 41574a: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/llQmo5kGXqâ�¤Can't use unknown trait 'is docs' in a variable declaration.â�¤at /tmp/llQmo5kGXq:1â�¤------> [32mmy $x is docs("abcd")[33mâ��[31m;[0mâ�¤    expecting any of:â�¤        TypeObject…»
02:56 Akagi201 joined #perl6
02:57 lue hoelzro: what do you mean by "getting S26 working correctly"? Just making the parsing more correct, I assume?
02:57 Mouq m: my $x; trait_mod:<is>($x, :docs<xyz>)
02:57 camelia rakudo-moar 41574a: OUTPUT«No such method 'set_docee' for invocant of type 'Str'␤  in sub trait_mod:<is> at src/gen/m-CORE.setting:275␤  in block  at /tmp/TUc9ZSHTei:1␤␤»
02:57 hoelzro well, for example, the current impl uses #= for leading comments, rather than the correct #|
02:58 lue hoelzro: aren't they both valid forms though?
02:58 hoelzro trailing comments are NYI
02:58 hoelzro they are
02:58 hoelzro but #| is leading
02:58 hoelzro and #= is trailing
02:58 Mouq hoelzro++
02:58 hoelzro #= is currently treated as leading
02:58 lue Oh, didn't know there was a distinction. Glad to hear that some better sense has been made there then :)
02:59 Mouq Should we deprecation cycle that? I know there's a lot of code that wrongly uses #=
02:59 Mouq .oO( Does a deprecation cycle even make sense here? )
02:59 btyler joined #perl6
02:59 * lue could see #^ for leading and #$ for trailing instead of the current ones :P
02:59 isBEKaml hoelzro: maybe I'm missing something here. What's the distinction between leading and trailing comments?
03:00 isBEKaml Are they separated by where they are placed? That is, above or below a sub/method?
03:00 hoelzro someone thought of #< and #>
03:00 hoelzro isBEKaml: correct
03:00 hoelzro hang on
03:00 hoelzro isBEKaml: https://github.com/perl6/roast/blob/S26-WHY/S26-documentation/why-both.t
03:01 Akagi201 joined #perl6
03:02 hoelzro I wish it would be #< and #>, or even #↑ and #↓
03:02 hoelzro I've been working on this for nearly a week and I still get them mixed up =/
03:02 lue hoelzro: #^ and #$ would offer some correlation with regexes :)
03:02 hoelzro lue: oh, true
03:02 hoelzro Mouq: I would be happy to start filing PRs against "broken" modules
03:03 hoelzro at least this change shouldn't alter behavior (unless someone's depending on WHY)
03:03 lue hoelzro: different symbols would make "deprecating" sooo much easier too. How do you know when #= is being deprecatingly used as a leading comment, anyway?
03:03 isBEKaml hoelzro: I can understand #| as a leading comment. Other languages such as Scala and Haskell use it for setting fixed spacing in doc strings.
03:03 hoelzro interesting, I didn't know that
03:03 isBEKaml hoelzro: I believe it's similar to python's """
03:04 lue r: my $a = #`"""testing embedded""" 5; say $a;
03:04 camelia rakudo-jvm 41574a: OUTPUT«(timeout)»
03:04 camelia ..rakudo-{parrot,moar} 41574a: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Malformed initializerâ�¤at /tmp/tmpfile:1â�¤------> [32m$a = #`"""testing embedded""" 5; say $a;[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        scoped declaratorâ�¤     …»
03:04 Akagi201 joined #perl6
03:04 lue boo.
03:05 isBEKaml hoelzro: though not the exact #|, the | is used for setting fixed spacing. Haskell uses "--|", scala "/**" and pipes in every subsequent line.
03:05 Mouq It ran! Woo!
03:05 lue I personally think we're but a few steps away from a "comment" sublanguage by this point :P
03:06 cooper_ joined #perl6
03:06 hoelzro lue: isn't that POD? =P
03:06 hoelzro isBEKaml: I never knew about --|
03:06 isBEKaml lue: too bad we can't turn into .lp6. :D
03:06 hoelzro that's not new, is it?
03:07 hoelzro isBEKaml: hmm...a custom grammar for literate Perl 6?
03:07 lue hoelzro: no silly, that's the Pod sublanguage, not the comment sublanguage :)
03:07 hoelzro interesting idea
03:07 hoelzro lue: heh
03:07 isBEKaml hoelzro: yep, haddock does it.
03:09 isBEKaml hoelzro: I'm not sure how far we can push .lp6. With separate comment formats like this one, I don't think we can see any literate forms - like lue said, at best it's a comment sublanguage. :D
03:09 hoelzro I suppose
03:10 hoelzro still, it's an interesting idea
03:10 lue isBEKaml: not that you couldn't write a Literate slang to do that (once we know what it would look like to work in that realm of madness, that is ☺)
03:11 isBEKaml Currently, comments are read in tandem with code. With these forms, it'll feel like reading two books at once. :P
03:11 _slade joined #perl6
03:11 isBEKaml lue: exactly - let's see where that descends into madness. :-)
03:12 isBEKaml Frankly speaking, a lot of ideas in Perl6 spec feel like moonshots.
03:12 lue I think it's called "extensible programming", though I don't much like that name, particularly considering how much of P6 you can extend already. The ultimate goal is to change what the compiler is doing. Perhaps "cooperative programming"? :P
03:15 isBEKaml lue: hmm, isn't that what "extensible" stands for?
03:15 * isBEKaml doesn't like to see it in non-lisp languages *ducks*
03:16 lue Yeah, though I really think manipulating the grammar and ASTs and whatnot of the language is far different from the *other* extensible aspects of Perl 6 that are implemented already, hence the desire for a distinct name :)
03:18 lue isBEKaml: the nice thing about a non-Lisp language is that it should be easier to tell what stuff is modifying the compiler's behavior :)
03:19 Mouq lue: Lookie what I made https://gist.github.com/Mouq/b04e9408cd0e83cf62bc
03:19 lue Lisp's macros and such have a nasty habit of not looking different, which on the one hand is the point of Lisp's syntax, and on the other hand makes it bleeding impossible to know what the distinction of a macro is.
03:19 Mouq (some obvious bugs)
03:19 * Mouq really likes Rust's macros
03:19 lue Mouq++
03:20 isBEKaml lue: Right, it stands out in non-lisp languages. But if you read through a wide swath, it's easy to pick macros in lisp too. I just count defmacros, progns and some quirky naming conventions for macros in lisp.
03:20 lue Mouq: yes, I remember finding a (I think) Rust doc on macros that was quite interesting. Need to look at them more, 'cos they are quite possibly the only non-lisp language to have done Proper Macros™ thus far.
03:21 lue isBEKaml: my point is that it's kinda hard to tell what a (defmacro) does different from a (defun), because the code tends to look really similar. I remember reading some elisp documentation on it once, and although it did explain the difference, it was hard to believe that it's a necessary one.
03:21 Mouq http://doc.rust-lang.org/guide-macros.html
03:22 isBEKaml lue: I should have added this: Otherwise, I agree. :D
03:22 atroxaper joined #perl6
03:30 lue Mouq: looks nice, makes me think our macros should really be some sort of grammar/action rule pair that gets injected into the current language. Still needs some sort of ast manipulation thing though.
03:31 kaleem joined #perl6
03:44 zengargoyle hrm, #| comments the thing below and #= comments the thing the left made perfect sense to me...
03:44 zengargoyle #^ seems like it should comment the thing above.
03:46 zengargoyle what i'm not sure i get is how documents like MyModule::Cookbook.pod would work out
03:47 zengargoyle is there supposed to be an empty CompilationUnit holding nothing but doc?
03:53 Mouq zengargoyle: p6doc is currently just searches through @*INC. It's not particularly sophisticated
03:53 Mouq zengargoyle: https://github.com/perl6/doc/blob/master/bin/p6doc
03:55 zengargoyle maybe it's changed by now.  i thought @*INC was moving to using CompUnitRepoLocal things.
03:55 Mouq zengargoyle: It is, but it can (apparently) still be used the old fashioned way
03:56 Akagi201_ joined #perl6
03:56 zengargoyle which does more of looking up and loading modules rather than just a list of paths things.  (at least last i looked CURL didn't have a .path type method.)
03:57 Mouq m: say @*INC[0].WHAT
03:57 camelia rakudo-moar 41574a: OUTPUT«CompUnitRepo::Local::File␤»
03:57 Mouq m: say @*INC[0].WHAT.Str
03:57 camelia rakudo-moar 41574a: OUTPUT«Nil␤»
03:57 Mouq m: use lib <abcd>; say @*INC[0].WHAT.Str
03:57 camelia rakudo-moar 41574a: OUTPUT«Nil␤»
03:57 Mouq Huh
03:57 zengargoyle with the idea that maybe eventually the modules would be stored in a db or zip or such rather than files on the filesytem
03:58 Mouq m: say @*INC.WHAT
03:58 camelia rakudo-moar 41574a: OUTPUT«(Array)␤»
03:58 zengargoyle due to all of the use Module:ver<x.y.z>:author<zengargoyle> type of capabilities
03:58 Mouq zengargoyle: I no very little about this :)
03:58 Mouq *know
03:59 Mouq .oO( I also no vary litle abot speling )
04:00 zengargoyle me neither.  just remembering when CURL came about and made p6doc not work for a while because @*INC entries no longer strinified to paths...
04:01 anaeem1 joined #perl6
04:04 zengargoyle and if there's a MyModule:ver<1> and MyModule:ver<2> then the cookbook type pod needs the same sort of versioning info..  MyModule::Cookbook:ver<1> MyModuleCookbook:ver<2>
04:04 zengargoyle and i'm all fuzzy on how that's eventually supposed to work. :)
04:04 R0b0t1 Are there any plans for perl6 to support sentience?
04:05 Mouq R0b0t1: There's no date set but I believe it's in the spec somewhere
04:06 zengargoyle probably NYI like all the other good parts.
04:07 R0b0t1 :D
04:07 hoelzro the amount of Perl 6 that's NYI is getting pretty low
04:07 hoelzro at least for the stuff I care about
04:07 hoelzro =
04:07 hoelzro =)
04:09 isBEKaml Funny, the guy was looking for himself in asking for sentient support in Perl6. :-)
04:12 kaare_ joined #perl6
04:15 Akagi201 joined #perl6
04:20 hoelzro bed time for me
04:20 hoelzro 'night #perl6
04:25 xenoterracide__ joined #perl6
04:33 robinsmidsrod joined #perl6
04:37 thou joined #perl6
04:39 dalek roast/S26-WHY: 202f49a | (Rob Hoelz)++ | S26-documentation/why-preceding.t:
04:39 dalek roast/S26-WHY: Fix attribute lookup test
04:39 dalek roast/S26-WHY: review: https://github.com/perl6/roast/commit/202f49a336
04:48 gfldex joined #perl6
04:59 chenryn joined #perl6
05:18 hoverboard joined #perl6
05:36 chenryn joined #perl6
05:41 dayangkun joined #perl6
05:42 sqirrel joined #perl6
05:55 uniejo joined #perl6
05:59 dayangkun_ joined #perl6
06:07 ivanshmakov joined #perl6
06:09 bcode_ joined #perl6
06:10 flussence joined #perl6
06:18 dayangkun joined #perl6
06:29 ivanshmakov joined #perl6
06:31 sergot morning o/
06:33 rurban1 joined #perl6
06:41 Bucciarati joined #perl6
06:42 ilogger2 joined #perl6
06:48 atroxaper sergot: morning o/
06:48 yoleaux 8 Jul 2014 19:23Z <lue> atroxaper: just so you know, I've already followed that hint in Pod::To::HTML (here it is: https://github.com/lue/pod-walker), and AFAIK Mouq is using it to reimplement Pod::To::HTML too. I'll be interested in seeing what your solution to that hint is! :)
06:48 nhayashi joined #perl6
06:48 mtj_ joined #perl6
06:49 anaeem1 joined #perl6
06:50 mtj joined #perl6
06:50 telex joined #perl6
06:56 dayangkun joined #perl6
06:57 anaeem1 joined #perl6
06:58 anaeem1 joined #perl6
06:59 anaeem1_ joined #perl6
07:05 igorsutton joined #perl6
07:07 darutoko joined #perl6
07:10 [particle] joined #perl6
07:11 SamuraiJack_ joined #perl6
07:14 kaleem joined #perl6
07:22 vinian joined #perl6
07:23 vinian joined #perl6
07:25 Alina-malina joined #perl6
07:28 FROGGS joined #perl6
07:32 chenryn joined #perl6
07:33 dmol joined #perl6
07:34 rurban1 joined #perl6
07:36 chenryn_ joined #perl6
07:44 Akagi201 joined #perl6
07:50 Akagi201_ joined #perl6
07:53 dayangkun_ joined #perl6
07:55 Akagi201 joined #perl6
08:02 atroxaper lue: ping
08:03 atroxaper How can I live a message for lue? I mean witch command for yoleaux?
08:03 moritz .tell atroxaper like this
08:03 yoleaux moritz: I'll pass your message to atroxaper.
08:03 atroxaper moritz: Thanks!
08:03 yoleaux 08:03Z <moritz> atroxaper: like this
08:04 atroxaper Works))
08:04 atroxaper .tell lue hello, my not finished yet solution is https://github.com/atroxaper/Pod-SAX. You can see Pod::SAX::Reformer class and its test. Main feature that my Callees makes a calls for start of Pod object, end of Pod object, and 'in' Pod object that trigger if .content has not Pod object like String. And for each Pod type we can make many callbacks for many cases. Like only for L<> but not for C<>, I think it is more flexible and maintenanc[fu
08:04 atroxaper l] :) And you can share some storage with data between callbacks. And when we have start, in, and stop calls then we have something like Automata (http://en.wikipedia.org/wiki/Automata_theory) with states. And one more think. System of Anchors (i'm not sure with name yet) that objects contains a code that should be executed after all work and push its result to result represenation (like HTML). It can be used for crossrefs of many other things
08:04 atroxaper .
08:04 yoleaux atroxaper: I'll pass your message to lue.
08:05 jack_rabbit I have my $arr = (1,2,3,4). How do I get that interpreted as an array rather than a scalar, say, in for $arr -> $x { say "hello, ", $x; }
08:05 jack_rabbit Obviously I could just declare my @arr = ..., but that's not the point.
08:06 atroxaper r: my @arr = (1,2,3,4); say $_ for $arr.list
08:07 camelia rakudo-{parrot,jvm,moar} 41574a: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Variable '$arr' is not declared. Did you mean '@arr'?â�¤at /tmp/tmpfile:1â�¤------> [32my @arr = (1,2,3,4); say $_ for $arr.list[33mâ��[31m<EOL>[0mâ�¤    expecting any of:…»
08:07 atroxaper r: my $arr = (1,2,3,4); say $_ for $arr.list
08:07 camelia rakudo-{parrot,jvm,moar} 41574a: OUTPUT«1␤2␤3␤4␤»
08:07 jack_rabbit r: my $arr = (1,2,3,4); for $arr.list -> $x { say "hello, ", $x; };
08:08 camelia rakudo-{parrot,jvm,moar} 41574a: OUTPUT«hello, 1␤hello, 2␤hello, 3␤hello, 4␤»
08:08 jack_rabbit thanks.
08:08 atroxaper Wow, it is my first contributed answer on #perl6 !
08:09 atroxaper jack_rabbit: wellcome!
08:09 jack_rabbit $atroxaper++;
08:09 moritz also
08:09 moritz m: my $arr = [1..4]; .say for @$arr
08:09 camelia rakudo-moar 41574a: OUTPUT«1␤2␤3␤4␤»
08:10 jack_rabbit ooh, very nice.
08:11 atroxaper moritz: because [1..4] is Array and (,) is a Parcel?
08:12 atroxaper r: my $arr = (1,2,3,4); say $_ for @$arr # it works to...
08:12 chenryn_ joined #perl6
08:12 camelia rakudo-{parrot,jvm,moar} 41574a: OUTPUT«1␤2␤3␤4␤»
08:12 Timbus @$ would work on both, it's just @() is shorthand for .list
08:13 Timbus the sigils provide context
08:13 atroxaper Timbus: yes. I see already :)
08:14 brrt joined #perl6
08:17 jack_rabbit I'm reading docs that say parcels are immutable, but can contain mutable containers, so my $x = 1; my $parc = (0, $x, 2); $parc[1] = 3; works, but $parc[0] is immutable.
08:18 jack_rabbit How can I put the *value* of $x into the parcel to make the second element immutable, rather than putting the container itself?
08:18 moritz jack_rabbit: with binding
08:19 moritz wait
08:19 moritz uhm
08:19 chenryn_ joined #perl6
08:19 moritz m: my $x = 42; my $p = (0, $x, 2); $p[1] := $x; $p[1] = 23; say $p
08:19 camelia rakudo-moar 41574a: OUTPUT«No such method 'bind_pos' for invocant of type 'Parcel'␤  in sub postcircumfix:<[ ]> at src/gen/m-CORE.setting:2469␤  in block  at /tmp/5bNDxercIn:1␤␤»
08:20 FROGGS m: my $arr = [1..4]; .say for $arr[]
08:20 moritz m: my $x = 42; my $p = (0, nqp::decont($x), 42); $p[1] = 23; say $p
08:20 camelia rakudo-moar 41574a: OUTPUT«1␤2␤3␤4␤»
08:20 camelia rakudo-moar 41574a: OUTPUT«Cannot modify an immutable Int␤  in method assign_pos at src/gen/m-CORE.setting:1772␤  in sub postcircumfix:<[ ]> at src/gen/m-CORE.setting:2465␤  in block  at /tmp/wTj7zUmDLI:1␤␤»
08:20 moritz jack_rabbit: I don't think there's a perl 6 level primitive for decontainering :(
08:21 jack_rabbit :/ disappointing.
08:21 jack_rabbit my first disappointment. Perl 6 has otherwise been pretty impressive.
08:21 moritz well
08:22 FROGGS m: my $x = 42; my $p = (0, $x.VAR, 42); $p[1] = 23; say $p
08:22 camelia rakudo-moar 41574a: OUTPUT«Cannot assign to a readonly variable or a value␤  in method assign_pos at src/gen/m-CORE.setting:1772␤  in sub postcircumfix:<[ ]> at src/gen/m-CORE.setting:2465␤  in block  at /tmp/cX4zKEfCmw:1␤␤»
08:22 FROGGS m: my $x = 42; say $x.VAR
08:22 camelia rakudo-moar 41574a: OUTPUT«42␤»
08:22 FROGGS is that what I think it is?
08:22 moritz m: my $x := 42; my $p = (0, $x); $p[0] = 42
08:22 camelia rakudo-moar 41574a: OUTPUT«Cannot modify an immutable Int␤  in method assign_pos at src/gen/m-CORE.setting:1772␤  in sub postcircumfix:<[ ]> at src/gen/m-CORE.setting:2465␤  in block  at /tmp/05_lBSdIVu:1␤␤»
08:22 moritz m: my $x = 42; say $x.VAR.^name
08:22 camelia rakudo-moar 41574a: OUTPUT«Int␤»
08:22 jack_rabbit r: my $x = 42; my $p = (0, $x.VAR, 43); say $p;
08:22 camelia rakudo-{parrot,jvm,moar} 41574a: OUTPUT«0 42 43␤»
08:23 jack_rabbit Cool, that seems to work.
08:23 moritz FROGGS: if it is, it's totally uninituitive
08:23 moritz m: my $x = 42; say $x.VAR.name
08:23 camelia rakudo-moar 41574a: OUTPUT«$x␤»
08:23 moritz because .VAR returns the variable object :-)
08:23 moritz m: my $x = 42; say $x.VAR.^name
08:23 camelia rakudo-moar 41574a: OUTPUT«Int␤»
08:23 moritz eeks
08:23 sergot m: class A { method new(Int $sth?, Bool :$a = False) { say $a; self.bless } }; A.new(:a);
08:23 camelia rakudo-moar 41574a: OUTPUT«True␤»
08:24 jack_rabbit So what exactly is the variable object?
08:24 jack_rabbit similar to .HOW?
08:25 [Sno] joined #perl6
08:25 moritz jack_rabbit: it's an object that lets you introspect the variable; but it also behaves transparently in most cases, and acts as if it were the value inside the variable
08:25 jack_rabbit well that sounds like exactly what I want. It looks like it's immutable, though, right?
08:26 jack_rabbit r: my $x = 2; my $y = $x.VAR; say $x, " ", $y;
08:26 camelia rakudo-{parrot,jvm,moar} 41574a: OUTPUT«2 2␤»
08:26 jack_rabbit r: my $x = 2; $x.VAR = 4; say $x;
08:26 camelia rakudo-{parrot,jvm,moar} 41574a: OUTPUT«Cannot assign to a readonly variable or a value␤  in block  at /tmp/tmpfile:1␤␤»
08:27 FROGGS I grepped in rakudo/src... the is nothing Perl 6ish that provides nqp::decont
08:28 jack_rabbit bummer. I would think that'll be added eventually?
08:32 moritz maybe we need an unitem() function
08:32 moritz oh
08:32 moritz m: my $x = 42; my $p = (0, $x.list, 43); say $p; $p[1] = 23;
08:32 camelia rakudo-moar 41574a: OUTPUT«0 42 43␤Cannot modify an immutable Int␤  in method assign_pos at src/gen/m-CORE.setting:1772␤  in sub postcircumfix:<[ ]> at src/gen/m-CORE.setting:2465␤  in block  at /tmp/BOT6rxSe97:1␤␤»
08:32 moritz jack_rabbit: .list is what you want
08:33 moritz jack_rabbit: a bit unintuitive at first, but it does remove scalar containers
08:33 jack_rabbit interesting.
08:33 jack_rabbit would .VAR be bad practice? Are there implications of using that method?
08:34 rurban1 joined #perl6
08:34 moritz IMHO .VAR is just wrong for that use case
08:35 moritz I don't understand why it works, so I wouldn't use it
08:35 jack_rabbit sure.
08:36 jack_rabbit m: my $x = 2; say $x.VAR.^name;
08:36 camelia rakudo-moar 41574a: OUTPUT«Int␤»
08:36 jack_rabbit m: my $x = 2; say $x.VAR.^mro;
08:36 camelia rakudo-moar 41574a: OUTPUT«(Int) (Cool) (Any) (Mu)␤»
08:43 Alina-malina joined #perl6
08:47 chenryn_ joined #perl6
08:49 rindolf joined #perl6
08:49 jack_rabbit Also, what is this thing: ␤
08:50 jack_rabbit I think it might not be showing right (probably bad encoding on my end)
08:50 atroxaper new line.
08:50 jack_rabbit ahh
08:51 atroxaper Is I understand it is for better visibility for irc
08:51 jack_rabbit makes sense.
08:51 FROGGS perl6-m -e 'say uniname("␤")'
08:52 FROGGS SYMBOL FOR NEWLINE
08:52 dakkar joined #perl6
08:52 FROGGS and the perl6 bot here converts it to proper newlines
08:52 mr-foobar joined #perl6
08:52 FROGGS so you can feed it multi line code in a single line :o)
08:52 FROGGS m: say uniname("␤")
08:52 camelia rakudo-moar 41574a: OUTPUT«LINE FEED (LF)␤»
08:53 jack_rabbit ho ho! fancy.
08:55 FROGGS m: my %a = a => 1; my %b = b => 2; %a<b> = %b; %b = %a<b>
08:55 camelia rakudo-moar 41574a: OUTPUT«Saw 1 call to deprecated code during execution.␤================================================================================␤%b = { ... } called at:␤  /tmp/MhDSfkwxKc, line 1␤Please use %b = ... instead.␤--------------------------------------…»
08:55 atroxaper FROGGS: btw, I read some first Perl6 Advent and saw >> operator by in one symbol. And author said that it better for him. How can i write that symbols as fast as just >> ? :)
08:55 FROGGS .tell lizmat that feels weird: m: my %a = a => 1; my %b = b => 2; %a<b> = %b; %b = %a<b>
08:55 yoleaux FROGGS: I'll pass your message to lizmat.
08:56 FROGGS it is right alt + y on my keyboard
08:57 atroxaper FROGGS: is it comfortable?))
08:57 FROGGS atroxaper: maybe it is equally comfortable, but » looks nicer :o)
08:58 atroxaper FROGGS: I've tried to find exactly that sybbol, but there are about 5 >> with different names. Which of that versions is >>
08:58 FROGGS m: say uniname('»')
08:58 camelia rakudo-moar 41574a: OUTPUT«RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK␤»
08:59 FROGGS m: say '»'.ord
08:59 camelia rakudo-moar 41574a: OUTPUT«187␤»
08:59 FROGGS m: say '»'.ord.fmt('%#x')
08:59 camelia rakudo-moar 41574a: OUTPUT«0xbb␤»
08:59 atroxaper FROGGS: nice!
08:59 FROGGS :o)
09:01 atroxaper FROGGS: my wife likes runes. I'm going to write some program for her mostly consisting of Runes :-)
09:02 FROGGS atroxaper: ohh, that sounds very nice indeed :o)
09:02 [Sno] joined #perl6
09:02 FROGGS I dunno why but that makes me think of http://rosettacode.org/wiki/Draw_a_clock#Perl_6
09:03 nwc10 .tell jnthn I made you a test case (slightly smaller): http://paste.scsys.co.uk/407345
09:03 yoleaux nwc10: I'll pass your message to jnthn.
09:04 atroxaper FROGGS: Cool! Nice clock!
09:04 FROGGS TimToady++ for that
09:08 PotatoGim joined #perl6
09:19 lizmat good *, #perl6
09:19 yoleaux 08:55Z <FROGGS> lizmat: that feels weird: m: my %a = a => 1; my %b = b => 2; %a<b> = %b; %b = %a<b>
09:20 lizmat FROGGS: weird because it generates a deprecated warning?
09:20 lizmat the alternative would be fail (as we decided to not allow %h = {}
09:20 lizmat )
09:23 denis_boyun_ joined #perl6
09:27 denis_boyun_ joined #perl6
09:28 jack_rabbit What is the function of 'X-' here: my @x = DateTime.now.Str.substr(11,8).ords X- ord('0');
09:31 broquaint joined #perl6
09:35 atroxaper jack_rabbit: I think http://perlcabal.org/syn/S03.html#List_infix_precedence infix:<X>
09:35 rurban1 joined #perl6
09:37 jack_rabbit weird. That looks like what it's doing.
09:38 jack_rabbit r: my @x = DateTime.now.Str.substr(11,8).ords X- ord('0');
09:38 camelia rakudo-{parrot,jvm,moar} 41574a: ( no output )
09:39 jack_rabbit m: my @x = map { $_ - ord('0') }, DateTime.now.Str.substr(11,8).ords; say $x;
09:39 camelia rakudo-moar 41574a: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/R_XHeIxnAfâ�¤Variable '$x' is not declared. Did you mean '@x'?â�¤at /tmp/R_XHeIxnAf:1â�¤------> [32mteTime.now.Str.substr(11,8).ords; say $x[33mâ��[31m;[0mâ�¤    expecting any of:â�¤        post…»
09:39 spider-mario joined #perl6
09:39 jack_rabbit m: my @x = map { $_ - ord('0') }, DateTime.now.Str.substr(11,8).ords; say @x;
09:39 camelia rakudo-moar 41574a: OUTPUT«0 9 10 3 9 10 2 5␤»
09:40 FROGGS lizmat: yes, feels weird because of that message, but I guess one must get used to it
09:41 FROGGS and I guess this behaviour was the reason to explicitly allow %h = {}
09:41 lizmat I'm open to suggestions to improve the message  :-)
09:42 lizmat you could argue that %a<b> = %b should also be disallowed
09:42 lizmat it should be %a<b> = $%b
09:43 lizmat it's the automatic itemizing that's making it a unclear
09:43 jnthn It's not surprising if you stop to think for a moment
09:43 yoleaux 09:03Z <nwc10> jnthn: I made you a test case (slightly smaller): http://paste.scsys.co.uk/407345
09:43 jnthn %h<a> is clearly a scalar
09:44 jnthn And so provided you know what $s = %h does, %h<a> = %h2 follows fairly natural
09:45 lizmat ok, so from wider to narrower, we will allow transparently ($ = %), but narrower to wider is / will be an error (% = $)
09:45 lizmat is that something we can put in the spec ?
09:46 jnthn Doesn't hold up for @a = $b though
09:46 lizmat indeed
09:46 lizmat :-(
09:46 jnthn I think this particular case just has to be understood in terms of hashes
09:47 lizmat yup, indeed
09:48 lizmat regarding a shortcut / sugar for nqp::decont, I was playing with:
09:48 lizmat m: sub prefix:<=>(\x) { x.VAR }; my $x = 42; =$x = 43
09:48 camelia rakudo-moar 41574a: OUTPUT«Cannot assign to a readonly variable or a value␤  in block  at /tmp/MK6ifdXLUe:1␤␤»
09:48 jnthn x.VAR doesn't decont, it returns a Scalar...
09:49 jnthn m: my $a; say $a.VAR.WHAT
09:49 camelia rakudo-moar 41574a: OUTPUT«(Scalar)␤»
09:49 lizmat m: sub prefix:<=>(\x) { nqp::decont(x) }; my $x = 42; (1,2,=$x,4).say  # improved?
09:49 camelia rakudo-moar 41574a: OUTPUT«Cannot modify an immutable Int␤  in block  at src/gen/m-CORE.setting:17319␤  in block  at /tmp/wG4gcS070I:1␤␤»
09:50 lizmat but with using decont this way, why doesn't this work?
09:51 jnthn ,= is a longer token?
09:51 lizmat std: sub prefix:<=>(\x) { nqp::decont(x) }; my $x = 42; (1,2,=$x,4).say  # improved?
09:51 camelia std 0f2049c: OUTPUT«[31m===[0mSORRY![31m===[0m�Undeclared routine:� 'nqp::decont' used at line 1�Check failed�FAILED 00:01 138m�»
09:51 lizmat yup, that's it
09:51 lizmat m: sub prefix:<=>(\x) { nqp::decont(x) }; my $x = 42; (1,2, =$x,4).say  # improved?
09:51 camelia rakudo-moar 41574a: OUTPUT«1 2 42 4␤»
09:52 jnthn We had a prefix:<=> for something else entirely once. I was in the meeting where we killed it. :)
09:53 masak good noon, #perl6
09:53 fhelmberger joined #perl6
09:54 lizmat r: 'sub prefix:<±>(\x) { nqp::decont(x) }; my $x = 42;my $p = (1,2,±$x,4); say $p; $p[2] = 23
09:54 camelia rakudo-{parrot,jvm,moar} 41574a: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Unable to parse expression in single quotes; couldn't find final "'" â�¤at /tmp/tmpfile:1â�¤------> [32m;my $p = (1,2,±$x,4); say $p; $p[2] = 23[33mâ��[31m<EOL>[0mâ�¤    â€¦Â»
09:54 lizmat r: sub prefix:<±>(\x) { nqp::decont(x) }; my $x = 42;my $p = (1,2,±$x,4); say $p; $p[2] = 23
09:54 camelia rakudo-jvm 41574a: OUTPUT«1 2 42 4␤Cannot modify an immutable value␤  in method assign_pos at gen/jvm/CORE.setting:1772␤  in sub postcircumfix:<[ ]> at gen/jvm/CORE.setting:2465␤  in block  at /tmp/tmpfile:1␤␤»
09:54 camelia ..rakudo-moar 41574a: OUTPUT«1 2 42 4␤Cannot modify an immutable Int␤  in method assign_pos at src/gen/m-CORE.setting:1772␤  in sub postcircumfix:<[ ]> at src/gen/m-CORE.setting:2465␤  in block  at /tmp/tmpfile:1␤␤»
09:54 camelia ..rakudo-parrot 41574a: OUTPUT«1 2 42 4␤Cannot modify an immutable value␤  in method assign_pos at gen/parrot/CORE.setting:1776␤  in method assign_pos at gen/parrot/CORE.setting:1774␤  in sub postcircumfix:<[ ]> at gen/parrot/CORE.setting:2469␤  in sub postcircumfix:<[ ]> at…»
09:56 jnthn Also, I think a method or sub would fit better than an operator
09:56 jnthn Dunno what to call it, though :)
09:57 lizmat im() ?
09:57 lizmat short for immutable?
09:58 lizmat or maybe Parcel creation should decont automatically ?
09:59 lizmat I guess not: S07:56
09:59 synopsebot Link: http://perlcabal.org/syn/S07.html#line_56
09:59 jnthn oh, no, then you could never write a list assignment :P
10:00 lizmat indeed..
10:00 * lizmat headdesks
10:01 jnthn What was the actual use case?
10:01 lizmat well, making sure that a Parcel only contained immutables
10:01 lizmat while initializing it from variables
10:03 brrt left #perl6
10:03 donghongbo joined #perl6
10:04 cognominal joined #perl6
10:08 lizmat re deprecation message for %h = {}:
10:08 lizmat FROGGS, jnthn: is this better:
10:08 lizmat $ 6 'my %h = {}'
10:08 lizmat Saw 1 call to deprecated code during execution.
10:08 lizmat ================================================================================
10:08 lizmat %h = itemized hash called at:
10:08 lizmat -e, line 1
10:08 lizmat Please use %h = %(itemized hash) instead.
10:09 xinming_ joined #perl6
10:10 sjn_ joined #perl6
10:11 timotimo whoa, so much backscroll
10:12 jnthn lizmat: Seems OK
10:13 dalek rakudo/nom: 9a8470c | (Elizabeth Mattijsen)++ | src/core/Hash.pm:
10:13 dalek rakudo/nom: Alter %h = {} deprecation message
10:13 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9a8470cc00
10:17 dalek roast: 32730f7 | (Elizabeth Mattijsen)++ | S02-types/deprecations.t:
10:17 dalek roast: Adapt test for %h = {} deprecation message
10:17 dalek roast: review: https://github.com/perl6/roast/commit/32730f7793
10:19 sjn_ joined #perl6
10:25 atroxaper How can I describe a regex 'any but not a something' ? like any but not ':' I need to get scheme of url :)
10:26 jnthn <-[:]>
10:26 lizmat re: immutability in parcels:
10:26 jnthn <-[:]>+ for many
10:26 lizmat m: my $x = 42; my $p = (1,2,+"$x",4); say $p; say $p[2].WHAT; $p[2] = 43
10:26 camelia rakudo-moar 41574a: OUTPUT«1 2 42 4␤(Int)␤Cannot modify an immutable Int␤  in method assign_pos at src/gen/m-CORE.setting:1772␤  in sub postcircumfix:<[ ]> at src/gen/m-CORE.setting:2465␤  in block  at /tmp/7njPnv8eJ3:1␤␤»
10:26 lizmat so +"$x"
10:26 lizmat if it is a Num, just "$x" if it is a Str
10:27 atroxaper jnthn: yes! Thanks. I forgot about it again :-)
10:31 timotimo FROGGS: are you here right now?
10:31 timotimo what's the status regarding NativeCast and function pointers?
10:31 timotimo is it in our reach now or can it actually already be done?
10:31 atroxaper timotimo: there is like weekly scram :)
10:32 atroxaper timotimo: btw many Thanks for your weekly post about current status of Perl 6. I read it every time.
10:33 timotimo thank you! :)
10:34 kurahaupo joined #perl6
10:36 rurban1 joined #perl6
10:40 sjn_ joined #perl6
10:45 sjn_ joined #perl6
10:46 FROGGS timotimo: I am
10:46 timotimo hey :)
10:47 FROGGS timotimo: NativeCall exports a sub nativecast which works on all backends
10:47 timotimo Mouq, atroxaper: which of you is working on which part of the Pod::Walker and Pod::To::HTML based on the walker?
10:47 teodozjan joined #perl6
10:47 timotimo FROGGS: i got that much
10:47 FROGGS and also OpaquePointer is extended to let you do math
10:47 timotimo i've got that, too
10:47 FROGGS okay
10:47 timotimo i'm only missing information about the state of function pointers
10:47 FROGGS ahh, sorry
10:48 sjn_ joined #perl6
10:48 FROGGS we need to fix 'has &.bar:(Int)' in Perl 6 actions, it already is parsed correctly
10:48 FROGGS then we can hook it up
10:48 timotimo ah, good
10:48 FROGGS but I guess it will take like three weeks or more until we have i
10:48 FROGGS t
10:49 timotimo will the return type be put inside the (..) with a -->?
10:50 FROGGS I think so
10:50 timotimo OK
10:50 FROGGS errm, we could also allow trait 'returns' on methods without much fuzz I guess
10:50 FROGGS err attributes
10:51 timotimo all right
10:57 rGeoffrey_ joined #perl6
10:59 atroxaper timotimo: Mouq works on Pod::Walker and Pod::To::HTML as I understand.
11:00 timotimo OK
11:00 timotimo raiph wrote that you're working on the walker, that's probably just read from the wrong row in the irclog or something?
11:02 atroxaper timotimo: yes, I think so. I'm working on 'another' walker for Pod. [Coke] proposed Pod::SAX name :)
11:02 chenryn_ joined #perl6
11:03 timotimo ah!
11:03 timotimo thanks
11:03 atroxaper timotimo: ;)
11:07 atroxaper joined #perl6
11:13 timotimo http://wp.me/p4kqoE-35
11:15 lizmat timotimo: I actually reverted the method is cached
11:15 lizmat because it was unclear what semantics to be used for self
11:17 lizmat otherwise timotimo++
11:18 FROGGS timotimo: perhaps you can state that rakudo@parrot is finally in a good shape again (due to jnthn and me), it failed 1800 spectests until recently
11:19 jnthn "jnthn has started working on making MoarVM’s bytecode specializer throw away guards" - it actually does this by now :)
11:22 FROGGS wow, how time flies :P
11:24 FROGGS m: say DateTime:FormatMySQL("2014-07-09T13:24:00") # sport the error
11:24 camelia rakudo-moar 41574a: OUTPUT«(DateTime)␤»
11:25 FROGGS that's horrible
11:25 lizmat :++ ?
11:25 FROGGS sergot had that also (he found it already), here: https://github.com/sergot/openssl/blob/master/lib/OpenSSL.pm6#L43
11:25 FROGGS lizmat: yeah
11:26 FROGGS hard to spot
11:26 lizmat I think this is one more reason not to be silent about eating named params that we don't know what to do with
11:26 FROGGS good that this only can be caused by our scoped subs
11:26 FROGGS lizmat: +1
11:27 FROGGS at least a type object should not eat them
11:27 lizmat hmmm....  isn't it the say that eats them?
11:27 FROGGS m: Int:blarg(1)
11:27 camelia rakudo-moar 41574a: ( no output )
11:28 FROGGS I dunno
11:29 FROGGS m: sub foo(*@p, *%h) { say %h }; foo Int:blarg(1)
11:29 camelia rakudo-moar 41574a: OUTPUT«().hash␤»
11:30 FROGGS so the type gets it
11:30 Ven joined #perl6
11:30 FROGGS m: sub foo(*@p, *%h) { say @p }; foo Int:blarg(1)
11:30 camelia rakudo-moar 41574a: OUTPUT«(Int)␤»
11:30 FROGGS yeah
11:31 Ven https://gist.github.com/Nami-Doc/f45190f52fcbbb183fd6 < C++ is the next Perl 6, y'know
11:31 donghongbo joined #perl6
11:31 FROGGS Ven: :P
11:32 Ven (text macros :'(.)
11:33 lizmat m: class A { has $.a = "a"; method b { "aaa".subst(/$!a/,"b") }}; say A.new.a; say A.new.b  # why isn't the .subst working ?
11:33 camelia rakudo-moar 41574a: OUTPUT«a␤aaa␤»
11:34 lizmat m: class A { has $.a = "a"; method b { my $x = $!a; "aaa".subst(/$x/,"b") }}; say A.new.b  # putting it into a lexical first works
11:34 camelia rakudo-moar 41574a: OUTPUT«baa␤»
11:34 lizmat rakudobug?
11:35 lizmat FROGGS, jnthn: ^^^
11:36 jnthn m: /$!foo/
11:36 camelia rakudo-moar 41574a: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/GrGGxT5ir_�Variable $!foo used where no 'self' is available�at /tmp/GrGGxT5ir_:1�------> [32m/$!foo[33m�[31m/[0m�»
11:36 FROGGS m: class A { has $.a = "a"; method b { "aaa".subst(/"$!a"/,"b") }}; say A.new.a; say A.new.b
11:36 camelia rakudo-moar 41574a: OUTPUT«a␤use of uninitialized value of type Any in string context␤baaa␤»
11:37 FROGGS that seems to be the runtime lexpad problem thingy masak++ had described in his blög
11:37 jnthn Um
11:37 Ven class variables are in lexpads ?
11:37 jnthn Wait...a regex is method-ish, and has its own self...
11:37 rurban1 joined #perl6
11:37 FROGGS eww
11:38 FROGGS m: class A { has $.a = "a"; method b { "aaa".subst($!a,"b") }}; say A.new.a; say A.new.b
11:38 lizmat aha... the plot thickens... rakudobug it ?
11:38 camelia rakudo-moar 41574a: OUTPUT«a␤baa␤»
11:38 FROGGS yeah
11:38 FROGGS jnthn: is right
11:38 jnthn lizmat: Um, at this point all we  have is "it looks odd" rather than "it should do X"
11:38 FROGGS m: class A { has $.a = "a"; method b { "aaa".subst(/{say self}/,"b") }}; say A.new.a; say A.new.b
11:39 camelia rakudo-moar 41574a: OUTPUT«a␤A.new(a => "a")␤baaa␤»
11:39 FROGGS I have no idea
11:39 FROGGS m: class A { has $.a = "a"; method b { "aaa".subst(/"{say self}"/,"b") }}; say A.new.a; say A.new.b
11:39 camelia rakudo-moar 41574a: OUTPUT«a␤A.new(a => "a")␤A.new(a => "a")␤A.new(a => "a")␤A.new(a => "a")␤aaa␤»
11:40 jnthn m: class A { has $.a = "a"; method b { "aaa".subst(/:my $ = say $!a; ./, b') } }; A.new.b
11:40 camelia rakudo-moar 41574a: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/TCkwyckpg_â�¤Unable to parse expression in argument list; couldn't find final ')' â�¤at /tmp/TCkwyckpg_:1â�¤------> [32m b { "aaa".subst(/:my $ = say $!a; ./, b[33mâ��[31m') } }; A.new.b[0mâ�¤  â€¦Â»
11:40 jnthn m: class A { has $.a = "a"; method b { "aaa".subst(/:my $ = say $!a; ./, 'b') } }; A.new.b
11:40 camelia rakudo-moar 41574a: OUTPUT«(Any)␤»
11:40 lizmat m: say "aaa".subst(/a$/,"b")  # the reason I ran into this
11:40 camelia rakudo-moar 41574a: OUTPUT«aab␤»
11:40 jnthn m: class A { has $.a = "a"; method b { "aaa".subst(/:my $ = say self.WHICH; ./, 'b') } }; A.new.b
11:40 camelia rakudo-moar 41574a: OUTPUT«Cursor|139834212483800␤»
11:42 jnthn m: class A { has $.a = "a"; method b { "aaa".subst(/:my $ = say self.WHICH, $!a; ./, 'b') } }; A.new.b
11:42 camelia rakudo-moar 41574a: OUTPUT«Cursor|139900812459976(Any)␤»
11:42 jnthn m: class A { has $.a = "a"; method b { "aaa".subst(/:my $ = say self.WHICH, $!pos; ./, 'b') } }; A.new.b
11:42 camelia rakudo-moar 41574a: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/DBWEyB7Zo2â�¤Attribute $!pos not declared in class Aâ�¤at /tmp/DBWEyB7Zo2:1â�¤------> [32m $ = say self.WHICH, $!pos; ./, 'b') } }[33mâ��[31m; A.new.b[0mâ�¤    expecting any of:â�¤        postfi…»
11:42 molaf joined #perl6
11:42 jnthn m: class A { has $!dummy; has $.a = "a"; method b { "aaa".subst(/:my $ = say self.WHICH, $!a; ./, 'b') } }; A.new.b
11:42 camelia rakudo-moar 41574a: OUTPUT«Cursor|140307760568368Cursor|140307760671904No such method 'gist' for invocant of type 'ParseShared'␤  in sub say at src/gen/m-CORE.setting:13805␤  in method match at src/gen/m-CORE.setting:6280␤  in method subst at src/gen/m-CORE.setting:6355␤  in…»
11:42 jnthn Wow.
11:43 jnthn Yes, that's quite a mis-compile.
11:43 jnthn I know what it's doing.
11:43 donghongbo joined #perl6
11:43 jnthn I don't know we can make it DWLM though...
11:43 jnthn Because self in a /.../ thing really is Cursor
11:44 FROGGS L is for lizmat? :o)
11:44 jnthn Yes.
11:44 FROGGS true... and in a code somebody might really want the Cursor
11:44 jnthn Right
11:44 lizmat ok
11:44 jnthn Well, it's clearer with tokens and so forth.
11:44 jnthn All the same, we shouldn't compile it to stuff that looks up a random attribute on the wrong object. :)
11:45 lizmat I guess it should at least complain about it being an attribute that doesn't exist on the Regex ?
11:45 jnthn lizmat: Yeah.
11:45 lizmat so rakudobug it ?
11:45 jnthn Should just not compile
11:46 jnthn Yes, now we know the expected behavior, it's a resolvable ticket :)
11:46 jnthn So go for it :)
11:49 lizmat m: class A { has $.a = "a"; method b { "aaa".subst(/$.a/,"b") }}; say A.new.b   # using the $.a form is much clearer
11:49 camelia rakudo-moar 41574a: OUTPUT«No such method 'a' for invocant of type 'Cursor'␤  in method match at src/gen/m-CORE.setting:6280␤  in method subst at src/gen/m-CORE.setting:6355␤  in method subst at src/gen/m-CORE.setting:3713␤  in method b at /tmp/NMYRHZsulC:1␤  in block  at …»
11:49 hoelzro morning #perl6
11:49 lizmat hoelzro o/
11:49 lizmat anyway: #122253
11:49 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=122253
11:51 lizmat still it feels wrong: I mean, you can interpolate attributes in strings, and those are Str objects
11:52 lizmat (yes, I know it works differently underneath, but from a language point of view it feels weird)
11:52 lizmat I guess it is just another way of finding out that regexen are code, and not strings
11:54 hoelzro I've been working on improving declarator docs, so I've been doing some digging around in src/core/traits.pm.  It made me wonder: why are docs implemented by applying an anonymous role against the object?
11:54 hoelzro Not trying to be critical, just curious =)
11:55 hoelzro also I want to know if I should preserve that or if I can change it if I feel I have a better solution
11:56 igorsutton_ joined #perl6
12:01 lizmat hoelzro: I see what you mean: especially since the mixing roles for Routine and Mu are the same ?
12:01 hoelzro right, that's part of it
12:01 hoelzro the other part is with what I'm working on, where a docee can have either leading or trailing docs, or both
12:02 hoelzro also, a docee can have *multiple* leading/trailing docs, which should be concatenated
12:02 timotimo jnthn: does throwing away guards cause great improvements yet? :)
12:02 lizmat well, git blame points to me for the Routine version, but I'm pretty sure that I didn't think up that  :-)
12:03 lizmat seems like tadzik and jnthn are the other suspects for this code
12:04 lizmat heolzro: I have no particular opinion: if you think you can make it better, I would say: go for it
12:04 lizmat hoelzro rather  :-) ^^^
12:04 jnthn timotimo: It was another meassurable bit off a benchmark I tried...
12:04 timotimo \o/
12:04 igorsutton_ joined #perl6
12:04 atroxaper joined #perl6
12:04 hoelzro lizmat: well, I'll certainly try =)
12:07 R0b0t1 joined #perl6
12:11 cognominal joined #perl6
12:15 vinian left #perl6
12:18 rGeoffrey The OSCON lightning talks are going to be with the State of the Onion on Wednesday night. If you will be there, do you want to speak about something?  Any chance someone here is in a position to offer up the State of Perl6 (from a more hands on view than Larry's)?
12:20 lizmat well, I'll be at the OSCON, and willing to give a lightning talk
12:21 lizmat but to give a handson State of Perl6 ...  wow, I would have to think about that (a lot)
12:22 jnap joined #perl6
12:24 lelf joined #perl6
12:29 rGeoffrey lizmat, thanks.  If you want to focus a bit, remember what Larry spoke of at YAPC.  So some updates on where the project is from a "can I use it yet" point of view would be good.  And I expect it will be hard to hold woolfy back from giving one.
12:29 lizmat jnthn: is it possible to obtain the original extension from a precompiled module?
12:30 SamuraiJack joined #perl6
12:30 lizmat fwiw, woolfy thinks lightning talks at OSCON should be about Perl, not about marketing or finding jobs
12:31 sqirrel joined #perl6
12:31 lizmat jnthn: in other words: if I load a precompiled module, can I find out the original path of the module?
12:32 atroxaper joined #perl6
12:32 rGeoffrey I have to work with what I have.  Last year there was only 3 days from when OSCON said we would to the lightning talks and them happening.  This year they gave me 3 weeks notice.  Some year they will actually accept them on time and I will have 3 months to twist arms.
12:34 brrt joined #perl6
12:38 dalek roast/S26-WHY: adf0914 | (Rob Hoelz)++ | S26-documentation/why-following.t:
12:38 dalek roast/S26-WHY: Fix why-following attribute comment test
12:38 dalek roast/S26-WHY: review: https://github.com/perl6/roast/commit/adf0914718
12:38 rurban1 joined #perl6
12:38 dalek rakudo/nom: 9044339 | (Elizabeth Mattijsen)++ | src/core/CompUnit.pm:
12:38 dalek rakudo/nom: Add crappy CompUnit.compile
12:38 dalek rakudo/nom:
12:38 dalek rakudo/nom: And some assorted support methods
12:38 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9044339c0a
12:42 woolfy I really would like to see TimToady or jnthn give a talk about the state of Perl 6.  But Larry is already doing the state of Perl in general...  And I am afraid jnthn has other plans.
12:43 SamuraiJack joined #perl6
12:43 woolfy lizmat would be a good choice too, but she is hesitant, since she thinks she does not know enough...  :-)
12:43 woolfy (hiding now)
12:43 * lizmat wonders where woolfy went
12:44 woolfy :-)
12:44 nwc10 have you checked behind the sofa?
12:45 woolfy o0O(sitting next to lizmat, in plain sight, so she does not see me)...
12:45 * lizmat looks under the desk
12:45 rGeoffrey There are two weeks to the big event, and 209 people 'reading' this.  It may take a whole village, but I am sure enough words can be put onto someone's slides, even if the speaker thinks she does not know enough.
12:45 cognominal joined #perl6
12:46 woolfy Ehm, I am afraid my 200x "Perl 6 is awesome and can be used already for many things" would not help much.
12:48 lizmat signal(SIGINT).tap( {die} ); { LEAVE "say left"; END say "ENDed"; 1 while 1 }  # press Ctrl-C to exit
12:48 lizmat will say "ENDed", but not "left"
12:48 dalek rakudo-star-daily: 8b178b8 | coke++ | log/ (14 files):
12:48 dalek rakudo-star-daily: today (automated commit)
12:48 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/8b178b89de
12:49 lizmat jnthn: I would have thought it would also need to say "left"., or am I wong?
12:50 lizmat signal(SIGINT).tap( {die} ); { LEAVE say "left"; END say "ENDed"; 1 while 1 }  # fixed "" oops
12:51 FROGGS :o)
12:51 lizmat still not working though :-(
12:52 SamuraiJack joined #perl6
12:52 anaeem1 joined #perl6
12:52 lelf Is Str.graphs not implemented anywhere or is it no longer here?
12:53 [Coke] r: say "barf".graphs
12:53 camelia rakudo-jvm 9a8470: OUTPUT«(timeout)»
12:53 camelia ..rakudo-{parrot,moar} 9a8470: OUTPUT«No such method 'graphs' for invocant of type 'Str'␤  in block  at /tmp/tmpfile:1␤␤»
12:54 [Coke] can't really tell between removed and NYI, but I think NYI.
12:54 ggoebel111117 joined #perl6
12:54 FROGGS lelf: NYI
12:55 FROGGS since we do not yet grapheme level strings
12:55 FROGGS have*
12:56 jnthn lizmat: I can't think of a way to do that off hand.
12:57 jnthn lizmat: Unless UNIT already gets a $?FILE installed
12:58 jnthn lizmat: And making it do so is probably the right solution
12:58 jnthn m: say $?FILE
12:58 camelia rakudo-moar 9a8470: OUTPUT«/tmp/GdqDYdE0nl␤»
12:58 jnthn m: say UNIT::.keys
12:58 camelia rakudo-moar 9a8470: OUTPUT«$! $/ $_ GLOBALish EXPORT $?PACKAGE ::?PACKAGE $=pod !UNIT_MARKER␤»
12:58 jnthn Hm, wonder where $?FILE comes from :)
12:59 dalek roast/S26-WHY: 934073d | (Rob Hoelz)++ | S26-TODO:
12:59 dalek roast/S26-WHY: Document more edge cases for S26
12:59 dalek roast/S26-WHY: review: https://github.com/perl6/roast/commit/934073deee
13:00 jnthn lizmat: Anyway, does that give you enough hints how to make it available?
13:01 guru joined #perl6
13:04 SamuraiJack joined #perl6
13:07 sergot timotimo++ # new p6weekly post
13:15 rurban1 joined #perl6
13:16 [Coke] m: say EVAL("'møp'".encode('UTF-8'))
13:16 camelia rakudo-moar 9a8470: OUTPUT«Cannot call 'EVAL'; none of these signatures match:␤:(Str $code, Any :lang($lang) = { ... }, PseudoStash :context($context))␤  in block  at /tmp/BnX2LIfssT:1␤␤»
13:18 * [Coke] finds that spec where EVAL is defined as taking a Str|Buf. Ah well.
13:19 lizmat [Coke]: LHF ?
13:19 [Coke] maybe? " If $code is of type Buf, the same decoding techniques are applied as a compiler for $lang would usually do to input files."
13:20 [Coke] That seems like the tricky bit.
13:20 [particle] joined #perl6
13:20 jnthn [Coke]: Well, we try to treat them as utf-8, I think... :)
13:21 [Coke] test is in S29-context/eval.t if that's LHF for ya.
13:22 lizmat m: say EVAL("'møp'".encode('UTF-8').Str)  # could be as simple as this ?
13:22 camelia rakudo-moar 9a8470: OUTPUT«møp␤»
13:23 [Coke] oh, even easier, it's defined as a multi sub (spec says it's a macro)
13:23 [Coke] can we remove 'eval' now, also? it's been a while.
13:25 bluescreen10 joined #perl6
13:25 timotimo sergot++ # gsoc work :)
13:26 [Coke] -> meetings
13:28 raiph joined #perl6
14:11 ilbot3 joined #perl6
14:11 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:,  niecza:, std:, or /msg camelia perl6: ... | irclog: http://irc.perl6.org | UTF-8 is our friend!
14:11 moritz FROGGS: see above :-)
14:12 FROGGS moritz: confirmed :o)
14:13 [Coke] m: say EVAL(88);
14:13 camelia rakudo-moar 904433: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/liQsKGEJ5Wâ�¤Calling 'EVAL' will never work with argument types (int)â�¤    Expected any of:     :(Str $code, Any :lang($lang) = { ... }, PseudoStash :context($context))â�¤at /tmp/liQsKGEJ5W:1â�¤---…»
14:13 [Coke] Also in a spectest - Should EVAL be spec'd to take a Cool in that case?
14:14 lizmat maybe we need an EVAL(Any x) { EVAL x.Str } ?
14:14 [Coke] Isn't that what Cool is for?
14:14 [Coke] so, s/Any/Cool/ in your example.
14:14 lizmat does Cool include Buffer ?
14:15 synopsebot joined #perl6
14:15 [Coke] r: say Str ~~ Cool;
14:15 FROGGS m: say Buf ~~ Cool
14:16 camelia rakudo-jvm 904433: OUTPUT«(timeout)»
14:16 camelia ..rakudo-{parrot,moar} 904433: OUTPUT«True␤»
14:16 camelia rakudo-moar 904433: OUTPUT«True␤»
14:16 [Coke] I suspect Buf shouldn't be in Cool these days.
14:17 moritz is back from the dead.
14:18 silug joined #perl6
14:18 [Coke] the EVAL(88) test was added by FROGGS++ 5 months ago.
14:19 FROGGS O.o
14:19 FROGGS are you sure?
14:22 chenryn joined #perl6
14:22 [Coke] no. :)
14:22 [Coke] 5bab36fd (Tobias Leich       2014-01-01 22:37:33 +0100  69)     is EVAL(88), 88,
14:23 [Coke] ah, no, just eval/EVAL
14:23 guru joined #perl6
14:24 FROGGS see :o)
14:24 masak_grr there should be a version of git-blame which asks "who *added* this code" rather than "who last *changed* this code"
14:24 masak_grr also, grr!
14:24 lizmat [Coke]: so are you saying we should remove eval() ?
14:24 lizmat is 6 months enough for a deprecation cycle ?
14:25 dalek rakudo/nom: b764567 | jnthn++ | src/Perl6/Grammar.nqp:
14:25 dalek rakudo/nom: Restructure infixish to be more in line with STD.
14:25 dalek rakudo/nom:
14:25 dalek rakudo/nom: This just aids parsing; the now-enabled extra cases will need some AST
14:25 dalek rakudo/nom: generation improvements too.
14:25 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b764567242
14:26 brrt joined #perl6
14:26 masak_grr m: sub foo(&mystery) { &mystery q[say "OH HAI"] }; foo(&EVAL)
14:26 camelia rakudo-moar 904433: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/juEAcZku3Lâ�¤Two terms in a rowâ�¤at /tmp/juEAcZku3L:1â�¤------> [32msub foo(&mystery) { &mystery [33mâ��[31mq[say "OH HAI"] }; foo(&EVAL)[0mâ�¤    expecting any of:â�¤        postfixâ�¤        â€¦Â»
14:26 masak_grr m: sub foo(&mystery) { &mystery(q[say "OH HAI"]) }; foo(&EVAL)
14:27 camelia rakudo-moar 904433: OUTPUT«OH HAI␤»
14:27 [Coke] lizmat: (eval) yes, we need to remove it eventually. Doesn't have to be today, but needs to happen before 6.0
14:27 [Coke] original "eval numbers should work" was added Tue Jul 21 17:33:37 2009 by kyle
14:27 carlin joined #perl6
14:28 [Coke] Given current spec, I wouldn't expect it to work.
14:29 masak_grr m: sub foo(&mystery) { my $x = 42; &mystery(q[$x = "escape analysis, pfah!"]); say $x }; foo(&EVAL)
14:29 camelia rakudo-moar 904433: OUTPUT«escape analysis, pfah!␤»
14:30 carlin https://github.com/perl6/roast/commit/62f3b9305ece is where that test was first added
14:31 [Coke] carlin: yes, that one.
14:31 carlin https://github.com/perl6/roast/commit/ea4d235761b#diff-256590739906b3d00d4c9fe8a30f5374R1
14:31 carlin that's where it was changed
14:32 masak_grr I just read http://shop.oreilly.com/product/9780596101992.do a bit more carefully, and it says "eval() in JavaScript should have been a keyword -- that would have solved so many static analysis headaches"
14:32 [Coke] masak_grr: any thoughts on EVAL being a macro as per spec? (right now it's a multi)
14:34 masak_grr [Coke]: EVAL being a macro sounds odd -- what compile-time effects is it trying to have? EVAL has *runtime* effects.
14:35 [Coke] Iunno. Spec says macro, 'sall.
14:35 moritz masak_grr: it has weird scoping
14:35 jnthn I think it's only macro in so far as the compiler is specially aware of it
14:35 jnthn Already the optimizer looks for the name EVAL to show up
14:35 masak_grr moritz: so do attributes, and they're not macros.
14:35 jnthn And if it doesn't, goes optimizing.
14:36 masak_grr jnthn: did you see the evaluation I did above? any opinions on that?
14:36 jnthn I think passing EVAL around is erroneous.
14:37 jnthn Unless we make it a macro
14:37 masak_grr I wonder if EVAL shouldn't be a statement prefix, then.
14:37 jnthn In which case it *can* work, 'cus the macro can replace it with some primitive that is not first class, but still optimizer recognizable. :)
14:37 jnthn But oh, it'd not know it was a macro
14:37 jnthn So back to square one :)
14:37 masak_grr yep.
14:38 jnthn I'll stick with "erroneous, on your own head be it" :)
14:38 Alina-malina joined #perl6
14:38 masak_grr I can accept/agree with that.
14:39 masak_grr I just wonder if instead of the useless capitalization, we should actually limit the power of EVAL somehow.
14:39 masak_grr for example by making it a keyword.
14:39 masak_grr then you *can't* assign it.
14:39 jnthn True :)
14:39 locsmif joined #perl6
14:40 jnthn So far as escape analysis goes, anything in a lexical must be considered as escaping in absence of proof otherwise.
14:41 masak_grr well, my point was that anything might go on inside of the EVAL, and we don't even know it's an EVAL.
14:41 masak_grr I'd much rather the language have a "nope" attitude to bad stuff, than an "on your head be it" attitude.
14:42 masak_grr the *only* use case I can think of for assigning/rebinding &EVAL to other things, is to mess up static analysis.
14:43 btyler joined #perl6
14:47 bowtie joined #perl6
14:47 FROGGS timotimo: what happened to that? http://irclog.perlgeek.de/moarvm/2014-05-11#i_8709334
14:47 FROGGS I get that right now :o(
14:48 lestrrat joined #perl6
14:48 timotimo that's with my spesh dump sorting thingie?
14:49 FROGGS eww, shutting down my windows vm helps >.<
14:50 timotimo yeesh :\
14:50 FROGGS this virtualbox tends to make trouble on my box... :/
14:50 timotimo i'm afraid the current state of the spesh-diff script may not reflect the actual contents of the spesh output any more
14:52 FROGGS timotimo: I'm not using that script, I'm just using shell()
14:52 timotimo oh, ok
14:59 bluescreen10 joined #perl6
15:00 sqirrel joined #perl6
15:03 atroxaper I have a difficult question... If a have 'my $a = 1; sub b() {say $a;}; $a = 5; b()' than i will have '5'. What should i do to have '1'? I mean how can i customize a sub while its definition?
15:04 atroxaper I know that in JavaScript I will get '1' in that case.
15:04 nwc10 I see "moar" in the filename of the failing thing t/spec/S06-advanced/wrap.rakudo.moar
15:05 masak_grr atroxaper: first off, no you won't.
15:05 nwc10 is there an analagous JVM and Parrot failing thing?
15:06 masak_grr atroxaper: > var a = 1; function b() { console.log(a) }; a = 5; b()
15:06 masak_grr atroxaper: 5
15:06 masak_grr atroxaper: secondly, the way 5 comes out is pretty sane and the semantics you suggest doesn't make much sense at all.
15:06 atroxaper masak_grr: ok. It's my mistake :)
15:07 timotimo m: my $a = 5; sub b($a = $a) { say $a }; $a = 1; b();
15:07 camelia rakudo-moar 904433: OUTPUT«Type check failed in binding $a; expected 'Any' but got 'Mu'␤  in sub b at /tmp/zuz521jt7_:1␤  in block  at /tmp/zuz521jt7_:1␤␤»
15:07 timotimo huh, what?
15:07 timotimo m: my $a = 5; sub b($ia = $a) { say $ia }; $a = 1; b();
15:07 camelia rakudo-moar 904433: OUTPUT«1␤»
15:07 timotimo hm.
15:08 masak_grr Perl 6 isn't Python.
15:08 timotimo oh, you caught me! :)
15:08 masak_grr that is, that default param isn't evaluated once at function definition time.
15:08 atroxaper masak_grr: my example is bad i know. I want to pass a sub as argument to another sub. And i'm not sure will it works or not)
15:08 masak_grr atroxaper: oh, that bit works.
15:08 masak_grr atroxaper: but you didn't do that :0
15:09 masak_grr m: sub twice(&action) { &action() for ^2 }; twice( sub { say "OH HAI" } )
15:09 camelia rakudo-moar 904433: OUTPUT«OH HAI␤OH HAI␤»
15:09 atroxaper masak_grr: but what if "OH HAI' is some $var
15:10 masak_grr atroxaper: talk about an XY problem! you want to pass a sub to another sub, and you end up asking about crazy lexical behaviors?! was there a missing step in the middle that you omitted? :P
15:10 masak_grr atroxaper: then that var will be evaluated in the context of the passed sub.
15:10 masak_grr the anonymous one, in this case.
15:11 masak_grr m: my $greeting = "mblhf!"; sub twice(&action) { &action() for ^2 }; $greeting = "yo"; twice( sub { say $greeting } )
15:11 camelia rakudo-moar 904433: OUTPUT«yo␤yo␤»
15:11 masak_grr m: my $greeting = "mblhf!"; sub twice(&action) { &action() for ^2 }; $greeting = "yo"; twice( sub { say $greeting; $greeting = "you rock, bot!" } )
15:11 camelia rakudo-moar 904433: OUTPUT«yo␤you rock, bot!␤»
15:12 [Coke] m: my $grt; say $grt; $grt = "hi";
15:12 camelia rakudo-moar 904433: OUTPUT«(Any)␤»
15:13 [Coke] so why does that say Any, but your two examples give the value that was set after the variable was used?
15:13 [Coke] er, your -first- example.
15:13 masak_grr which example? could you re-run the one you mean?
15:14 [Coke] ... nevermind. the set to "yo" happens outside the def of twice, so it's all fine. would be less confusing with newlines. :)
15:14 atroxaper masak_grr: ok. Thank you. I'll try to review my code :)
15:14 * masak stopped being _grr :)
15:15 masak atroxaper: no prob. lexical scoping and closures fascinate me.
15:15 masak I find them very beautiful.
15:15 pdcawley joined #perl6
15:16 dalek roast: fa5ded7 | coke++ | S29-context/eval.t:
15:16 dalek roast: Refer to ticket.
15:16 dalek roast: review: https://github.com/perl6/roast/commit/fa5ded7dfd
15:16 atroxaper masak: yes. If i'm not mistaken you wrote a post about that recently :)
15:17 dalek rakudo/nom: 57d8f39 | jnthn++ | src/Perl6/Actions.nqp:
15:17 dalek rakudo/nom: Re-arrange infixish actions to support [[*]]= etc.
15:17 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/57d8f393da
15:17 masak atroxaper: maybe http://strangelyconsistent.org/blog/lexpads-and-why-roles-need-fixups ?
15:18 atroxaper masak: yes!
15:18 masak atroxaper: I also wrote about closures as far back as 2008: http://strangelyconsistent.org/blog/ill-call-you-back
15:18 [Coke] j: eval "1"
15:18 camelia rakudo-jvm 904433: OUTPUT«Saw 1 call to deprecated code during execution.␤================================================================================␤Sub eval (from GLOBAL) called at:␤  /tmp/elsrZKJenB, line 1␤Please use 'EVAL' instead.␤-------------------------------…»
15:18 jnthn masak: Aww, you didn't make it "call be back maybe"? :P
15:19 masak jnthn: too early? 2008?
15:19 jnthn m: my @foo = [>>+<<] ([1..3],[1..3],[1..3]); say @foo
15:19 camelia rakudo-moar 904433: OUTPUT«Type check failed in binding op; expected 'Any' but got 'Mu'␤  in sub METAOP_REDUCE_LEFT at src/gen/m-CORE.setting:17409␤  in block  at /tmp/DK_JtE0jH_:1␤␤»
15:19 jnthn Neato, I accidentally fixed that too. :)
15:19 [Coke] ^^ that might mean it's safe to remove these skips: #?rakudo.jvm skip 'tracebacks in deprecations'
15:20 SamuraiJack joined #perl6
15:20 dalek roast: a47a750 | jnthn++ | S03-metaops/reduce.t:
15:20 dalek roast: Untodo a now-passing [>>+<<] test for Rakudo.
15:20 dalek roast: review: https://github.com/perl6/roast/commit/a47a75064f
15:22 Rotwang joined #perl6
15:22 hoverboard joined #perl6
15:24 raiph Does http://host07.perl6.com:8080/report use Rakudo / NQP / MoarVM HEADs ?
15:25 shabble joined #perl6
15:26 dalek roast: 11b5f96 | jnthn++ | S03-operators/assign.t:
15:26 dalek roast: Add tests for [+]=, [[+]]=.
15:26 dalek roast: review: https://github.com/perl6/roast/commit/11b5f96ae5
15:33 jnthn m: my $s = set(1,2); $s (|)= set(1, 3); say $s;
15:33 camelia rakudo-moar 904433: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/UtwRbEaxBIâ�¤Two terms in a rowâ�¤at /tmp/UtwRbEaxBI:1â�¤------> [32mmy $s = set(1,2); $s [33mâ��[31m(|)= set(1, 3); say $s;[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix stopper…»
15:35 brrt nqp revision is wrong
15:35 jnthn ?
15:36 brrt that was cryptic, i'm sorry, i'll explain; i can't build nqp master on moar-jit, because moar-jit misses nativecallcast
15:36 brrt but configure.pl thinks moarvm is recent enough
15:36 jnthn Uh, yeah
15:36 jnthn That's the trouble with the incrementing number :)
15:36 jnthn It's merging...it's merging time!
15:36 brrt oh, ok, this is expected :-)
15:37 jnthn > my $s = set(1,2); $s (|)= set(1, 3); say $s;
15:37 jnthn set(1, 2, 3)
15:37 jnthn Well, that works if I just delete stuff... :)
15:38 jnthn Now let's spectest and see if said stuff had a raisan d'etre...
15:38 jnthn Uh, raison...but the mental image was pretty good as I had it... :)
15:39 rurban rakudo p+m spectests: https://gist.github.com/rurban/d05e77ae0369a53861d6
15:40 anaeem1_ joined #perl6
15:44 FROGGS rurban: the passed todo's are due to RELEASE_6_5_0-12-gb1b4b87?
15:45 masak by the way, this is what it was like programming on Rakudo in 2008: http://strangelyconsistent.org/blog/rakudo-good-cool-awesome-bad-ugly-weird
15:45 FROGGS rurban: that seems to be a regression perhaps: https://gist.github.com/rurban/d05e77ae0369a53861d6#file-gistfile1-txt-L28
15:45 FROGGS rurban: at least when I compare to: https://github.com/coke/perl6-roast-data/blob/master/log/rakudo.parrot_summary.out#L2905
15:45 * masak smiles at his younger self rejoicing at the 'given' keyword but sorrowfully wishing he could do list assignment
15:46 masak you young'uns don't know how good you have it.
15:46 FROGGS A good deal of basic things that you as a Perl 5 user might expect to work, mostly do. This includes $_, my declarations, if/while/for, sub, scalars, arrays[...]
15:46 FROGGS that sounds a bit like my posts about v5 :o)
15:47 FROGGS masak: when I think about my first patches to rakudo/nqp it gets really funny :o)
15:47 kaleem joined #perl6
15:47 FROGGS like that when you had a grammar and you matches something in an outer token, the inner tokens kept the captures :o)
15:47 FROGGS stuff like that
15:47 masak oh ouch
15:48 FROGGS or that our scoped vars could not be initialized when you declare them
15:48 FROGGS and, that was just about 1.5 years ago I think
15:49 dalek rakudo/nom: 178c8e7 | jnthn++ | src/Perl6/Grammar.nqp:
15:49 dalek rakudo/nom: Remove hack that kept (|)= & co from working.
15:49 dalek rakudo/nom:
15:49 dalek rakudo/nom: It's not clear why these <!before ...>s were there; perhaps they were
15:49 dalek rakudo/nom: to work around a historical bug. Removing them causes no new spectest
15:49 dalek rakudo/nom: fails, and makes (|)=, (&)= and so forth work.
15:49 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/178c8e7795
15:50 jnthn Anybody wants to volunteer to find the RT about this and mark it testneeded, or better, turn it into a test or two? :)
15:51 * masak
15:51 masak er, I volunteer to the "find" part, because I'm good at that
15:52 jnthn Surely you can write two tests? :)
15:52 masak (and because I wrote 50% of the subject lines of open tickets in RT)
15:52 jnthn my $s = set(1,2); $s (|)= set(1, 3); # there, that's half of one ;)
15:53 masak I'll find the RT ticket for you, and then we'll see :)
15:53 masak knowing myself, I generally don't get as far as actually producing the tests.
15:54 masak it's not so much "I don't wanna" and more "these are the things I do well"
15:54 FROGGS[mobile] joined #perl6
15:55 jnthn Aye, I guess you're still learning testing, given how much time you spend in TDD courses... ;)
15:55 masak :P
15:55 denis_boyun joined #perl6
15:57 jnthn r: class C { my $.x = 42; }; C.x.say
15:57 camelia rakudo-{parrot,jvm} b76456: OUTPUT«42␤»
15:57 camelia ..rakudo-moar b76456: OUTPUT«(Any)␤»
15:59 masak jnthn: https://rt.perl.org/Ticket/Display.html?id=117103
16:00 * masak marks it "testsneeded"
16:00 denis_boyun___ joined #perl6
16:02 masak RT++ # in the end, I found it by searching for '(|)' in RT
16:03 timotimo jnthn: way cool!
16:03 atroxaper joined #perl6
16:13 ajr joined #perl6
16:13 FROGGS joined #perl6
16:16 denis_boyun joined #perl6
16:22 cognominal joined #perl6
16:23 colomon_ Has anyone heard more from TimToady?
16:23 dalek rakudo/nom: 95f540d | jnthn++ | src/Perl6/Actions.nqp:
16:23 dalek rakudo/nom: Fix class A { my $.x = 42 } scoping on MoarVM.
16:23 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/95f540d5ed
16:23 dalek rakudo/nom: 7b27642 | jnthn++ | src/Perl6/Actions.nqp:
16:23 dalek rakudo/nom: Fix install_method to look at scope consistently.
16:23 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7b276426fe
16:25 timotimo oh, huh?
16:25 timotimo how was that broken?
16:28 dalek roast: 030b17a | jnthn++ | S12-attributes/class.t:
16:28 dalek roast: Add test for RT#122087.
16:28 dalek roast: review: https://github.com/perl6/roast/commit/030b17ab25
16:28 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=122087
16:28 jnthn cd ..
16:28 jnthn tssk
16:33 carlin how many people actually run the full S32-temporal/local.t test? It looks like it might have been wrong for a while and few noticed it
16:33 carlin because it unless your /etc/timezone is America/New_York most of the tests are skipped
16:34 carlin eg. coke's autoroasting skips them
16:37 dalek rakudo/nom: 31404a4 | (Elizabeth Mattijsen)++ | src/core/CompUnit.pm:
16:37 dalek rakudo/nom: Default from is 'Perl6' nowadays
16:37 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/31404a4a3d
16:38 _slade joined #perl6
16:47 dalek roast: 89c59e3 | (Elizabeth Mattijsen)++ | S22-package-format/localfile/NanooNanoo.pm:
16:47 dalek roast: Create necessary source files while testing
16:47 dalek roast: review: https://github.com/perl6/roast/commit/89c59e333c
16:47 dalek roast: 16320f1 | (Elizabeth Mattijsen)++ | S (4 files):
16:47 dalek roast: Merge branch 'master' of https://github.com/perl6/roast
16:47 dalek roast: review: https://github.com/perl6/roast/commit/16320f128d
16:47 dalek roast: 62446ba | (Elizabeth Mattijsen)++ | S22-package-format/local.t:
16:47 dalek roast: Some more CompUnit testing
16:47 dalek roast: review: https://github.com/perl6/roast/commit/62446ba9f0
17:03 guru joined #perl6
17:14 lelf joined #perl6
17:15 lelf joined #perl6
17:15 dalek roast: 6429cf8 | (Elizabeth Mattijsen)++ | S06-advanced/wrap.t:
17:15 dalek roast: De-tab and get indenting right
17:15 dalek roast: review: https://github.com/perl6/roast/commit/6429cf85e9
17:18 rurban1 joined #perl6
17:19 itz_ joined #perl6
17:23 [Coke] carlin: happy to take a mini patch for: https://github.com/coke/perl6-roast-data/blob/master/bin/rakudo.parrot.sh#L19  and friends to add env vars that are needed.
17:23 [Coke] good catch.
17:25 itz__ joined #perl6
17:28 dalek perl6-roast-data: d9915a5 | coke++ | / (6 files):
17:28 dalek perl6-roast-data: today (automated commit)
17:28 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/d9915a5954
17:34 brrt joined #perl6
17:34 xusia joined #perl6
17:34 atroxaper joined #perl6
17:45 xusia joined #perl6
17:47 kaleem joined #perl6
17:48 dalek roast: d9f950a | (Elizabeth Mattijsen)++ | S06-advanced/wrap.t:
17:48 dalek roast: Fudge tests for RT #122259
17:48 dalek roast: review: https://github.com/perl6/roast/commit/d9f950ad8c
17:48 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=122259
17:51 [Sno] joined #perl6
17:53 Sqirrel joined #perl6
17:56 guru joined #perl6
17:57 carlin m: $*TZ / 60 / 60
17:57 camelia rakudo-moar 31404a: ( no output )
17:57 carlin m: say $*TZ / 60 / 60
17:58 camelia rakudo-moar 31404a: OUTPUT«0␤»
17:58 carlin m: say $*TZ
17:58 camelia rakudo-moar 31404a: OUTPUT«0␤»
17:58 woolfy1 joined #perl6
17:59 carlin those tests in S32-temporal/local.t seem to rely on .local being able to convert to DST based on the date
18:00 carlin is that supposed to work?
18:01 dalek rakudo/nom: 3bd00dd | (Elizabeth Mattijsen)++ | src/core/control.pm:
18:01 dalek rakudo/nom: eval() is no more, long live EVAL()
18:01 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3bd00dd3de
18:01 flussence > say $*TZ / 60 / 60␤1
18:01 flussence guess the p6eval server is in UTC.
18:01 carlin yeah
18:05 atroxaper joined #perl6
18:22 dalek rakudo/nom: 95e3ca4 | (Elizabeth Mattijsen)++ | src/core/ (2 files):
18:22 dalek rakudo/nom: Make EVAL() and .EVAL really Cool
18:22 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/95e3ca4be3
18:23 carlin if I do `DateTime.new("2014-02-01T10:00:00").local` is it really supposed to know I was in DST in February and adjust the timezone accordingly?
18:24 anaeem1 joined #perl6
18:24 dalek roast: 6e71b0b | (Elizabeth Mattijsen)++ | S (2 files):
18:24 dalek roast: Track disappearence of Cool.eval and eval()
18:24 dalek roast: review: https://github.com/perl6/roast/commit/6e71b0b275
18:26 dalek rakudo/nom: e9fad62 | (Elizabeth Mattijsen)++ | docs/ChangeLog:
18:26 dalek rakudo/nom: Note that Cool.eval and eval() are now gone
18:26 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e9fad625cb
18:26 vendethiel wow, that's a hell of a busy week ...
18:27 jnthn so progress...
18:28 timotimo vendethiel: hm?
18:29 timotimo hm. it occurs to me that i didn't mention anything ven did in my weekly; what did i miss?
18:30 vendethiel "<masak_grr> Perl 6 isn't Python." <- oh, I must've misread the channel name :-P
18:31 jnthn NO LOL
18:33 timotimo NO EULOL
18:34 masak NO PROJECT EULER
18:35 vendethiel timotimo: I started working on my beginner tutorial and on a learnXinYminutes.
18:35 vendethiel (sadly, I got caught up by time, as last week was <IRL> in full caps, and I have med appointments for the whole week, but I'll try to get stuff done :).)
18:36 dalek roast: 4af01d7 | (Elizabeth Mattijsen)++ | S29-context/eval.t:
18:36 dalek roast: Unfudge now passing EVAL tests (and add .EVAL)
18:36 dalek roast: review: https://github.com/perl6/roast/commit/4af01d7897
18:36 timotimo oke
18:36 timotimo looking forward to report on some nice stuff in the future :)
18:36 vendethiel I'll change the way I did the learnXinYminutes tho, because starting with the operators is ... hehe :P
18:37 itz__ joined #perl6
18:37 timotimo well, perl is an operator-driven language or how did that quote go?
18:40 vendethiel It is. That's why I should try and not show it directly ...
18:40 FROGGS operator-rich is the right term I think
18:41 lizmat FROGGS: regarding 'perl6' and 'Perl6'
18:41 lizmat if I change the default language of EVAL to 'Perl6'
18:41 lizmat I get: No compiler available for language 'Perl6'
18:41 timotimo lizmat: aye, it needs a corresponding nqp::regcomp call somewhere
18:41 FROGGS yeah, rakudo/nqp use 'perl6' internally
18:42 lizmat having them differently, is asking for problems in the future, I would say
18:42 FROGGS true
18:42 lizmat so shall we try to standardize on 'perl6' or 'Perl6' ?
18:42 FROGGS I'd like to see Perl6
18:43 lizmat jnthn: do you have an opinion?  ^^^
18:43 FROGGS we talked about this when the JVM bindings were made
18:44 FROGGS and IIRC I "won" that time
18:44 FROGGS (writing that language name correctly, that is)
18:44 FROGGS because :from and friends are about a language, not about a compiler or interpreter
18:45 jnthn I think as far as regcomp goes it may be a bit of a hodge podge already
18:45 FROGGS and c or jvm feels odd
18:45 jnthn I'm pretty srue it's QAST not qast :)
18:46 lizmat ok, I'll try to get it changed to Perl6 then ?
18:46 * jnthn doesn't feel strongly on it
18:46 jnthn I think let what you put in :from<...> drive it.
18:47 FROGGS exactly what I think, yes
18:47 vendethiel FROGGS: yeah, but I don't want the whole tutorial to be about nq, ff and friends :P
18:48 FROGGS vendethiel: yeah :o)
18:48 vendethiel .oO( nq - "not quite" operator )
18:58 isBEKaml joined #perl6
18:58 [Coke] lizmat++
18:58 [Coke] as long as it isn't Perl<nonbreakingspace>6
18:59 jnthn Uh, yes, don't do that. :)
18:59 vendethiel which reminds me ... isn't [>>+<<] a hyper²-operator ?
19:00 [Coke] so, my strategy of "flip randomly to a skipped test in roast" seems to make other people quite effective. :)
19:00 [Coke] I call it the Cartman operator.
19:00 btyler_ joined #perl6
19:02 vendethiel should I explain operator categories early on ? (ie infix etc)
19:02 vendethiel and right/left/non-associativity
19:03 FROGGS categories perhaps yes, associativity maybe not so
19:05 hummeleB1 joined #perl6
19:05 vendethiel well, it's still learnXinYminutes, so ... but yeah
19:13 dalek roast: 320794d | (Elizabeth Mattijsen)++ | S29-context/eval.t:
19:13 dalek roast: Add test for Buf.EVAL
19:13 dalek roast: review: https://github.com/perl6/roast/commit/320794d600
19:17 brrt left #perl6
19:17 dalek nqp: 346e6e9 | jnthn++ | src/vm/moar/QAST/QASTOperationsMAST.nqp:
19:17 dalek nqp: Use a fresh register for decont'd callee.
19:17 dalek nqp: review: https://github.com/perl6/nqp/commit/346e6e90f1
19:40 [particle] joined #perl6
19:42 itz__ joined #perl6
19:46 treehug88 joined #perl6
19:51 ren1us joined #perl6
19:52 [particle] joined #perl6
19:53 ren1us in keeping with my unfortunate tradition of being truly useless other than breaking everything, quick operator question:
19:54 masak :)
19:54 FROGGS hehe
19:54 masak ren1us++ # breaking everything
19:54 vendethiel (recognizing breaking stuff is good)++
19:54 ren1us m: multi sub infix:<<|>>(Any $lhs, Any $rhs) { say $lhs; }; 5<|>2;
19:54 timotimo you cannot learn from nonfailure, can you?
19:54 camelia rakudo-moar e9fad6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/qULQipLfXbâ�¤Two terms in a rowâ�¤at /tmp/qULQipLfXb:1â�¤------> [32m(Any $lhs, Any $rhs) { say $lhs; }; 5<|>[33mâ��[31m2;[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix stopperâ�¤â€¦Â»
19:54 vendethiel well, breaking what's broken but we don't know it's (yet)
19:54 timotimo m: multi sub infix:['<|>'](Any $lhs, Any $rhs) { say $lhs }; 5 <|> 2;
19:54 camelia rakudo-moar e9fad6: OUTPUT«===SORRY!===␤Cannot find method 'ast'␤»
19:55 masak ren1us: if you don't do whitespace after the 5, it's not an infix, it's a postfix.
19:55 timotimo m: multi sub infix:<< <|> >>(Any $lhs, Any $rhs) { say $lhs }; 5 <|> 2;
19:55 camelia rakudo-moar e9fad6: OUTPUT«5␤»
19:55 timotimo i think infix:<<|>> still refers to only |
19:55 vendethiel yea
19:55 ren1us timotimo: yeah, that's what i was fighting with
19:55 vendethiel it's just << and >> (interpolating <>)
19:55 timotimo infix:<< ... >> doesn't interpolate actually
19:55 FROGGS m: multi sub infix:('<|>')(Any $lhs, Any $rhs) { say $lhs; }; 5<|>2;
19:55 camelia rakudo-moar e9fad6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tkwb_4wMbeâ�¤Two terms in a rowâ�¤at /tmp/tkwb_4wMbe:1â�¤------> [32m(Any $lhs, Any $rhs) { say $lhs; }; 5<|>[33mâ��[31m2;[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix stopperâ�¤â€¦Â»
19:56 FROGGS m: multi sub infix:('<|>')(Any $lhs, Any $rhs) { say $lhs; }; 5 <|> 2;
19:56 camelia rakudo-moar e9fad6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/LHjAbEZgbN�Preceding context expects a term, but found infix | instead�at /tmp/LHjAbEZgbN:1�------> [32m(Any $lhs, Any $rhs) { say $lhs; }; 5 <|[33m�[31m> 2;[0m�»
19:56 timotimo i'm not sure why infix:['...'] doesn't work at the moment
19:56 timotimo i *think* it used to work at some point
19:56 itz_ joined #perl6
19:56 FROGGS m: multi sub infix:«<|>»(Any $lhs, Any $rhs) { say $lhs; }; 5 <|> 2;
19:56 camelia rakudo-moar e9fad6: OUTPUT«5␤»
19:56 vendethiel m: my %a = foo => 2; my $b = 'foo'; say %a<<$b>>;
19:56 camelia rakudo-moar e9fad6: OUTPUT«2␤»
19:56 vendethiel timotimo: ^ ?
19:57 vendethiel oh, you mean infix:<< stuff here >> to declare an op.
19:57 kivutar joined #perl6
19:57 timotimo vendethiel: that's a different << >>
19:57 timotimo :)
19:58 ren1us so there's just a whole pile of symbols that can be used to enclose the actual operator, and it doesn't really matter which pair i use as long as it's not the same as the symbol in the actual op?
19:59 timotimo well, the closer must'nt be part of the operator
19:59 xfix Well, there is infix['[\'><«»]'] for declaring insane operators.
19:59 xfix Not that you will ever need it.
20:00 xfix (seriously, why anyone would want ['><«»] operator?)
20:03 xfix rn: sub infix:<perl 6 is best language ever, it allows defining new operators>($a, $b) { say "$a this works$b" }; "Well," perl 6 is best language ever, it allows defining new operators "..."
20:04 camelia rakudo-{parrot,jvm,moar} e9fad6, niecza v24-109-g48a8de3: OUTPUT«Well, this works...␤»
20:04 xfix rn: sub infix:<perl 6 is best language ever, it allows defining new operators>($a, $b) { say "$a this works$b" }; "Well," perl           6 is best            language ever, it                 allows defining new operators "..."
20:04 camelia rakudo-{parrot,jvm,moar} e9fad6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Two terms in a rowâ�¤at /tmp/tmpfile:1â�¤------> [32m $b) { say "$a this works$b" }; "Well," [33mâ��[31mperl           6 is best            lang[0mâ�¤    expecting any of:…»
20:04 camelia ..niecza v24-109-g48a8de3: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Confused at /tmp/tmpfile line 1:â�¤------> [32mis works$b" }; "Well," perl           6 [33mâ��[31mis best            language ever, it    [0mâ�¤â�¤Parse failedâ�¤â�¤Â»
20:04 xfix I'm almost sure it once worked.
20:04 xfix Well, whatever.
20:04 xfix Also, perlcabal.org is lagging...
20:05 xfix Not anymore.
20:06 xfix Well, it seems there are multiple tests running using 100% of CPU total. They are all stuck on t/01-file-find.t.
20:07 atroxaper joined #perl6
20:07 xfix https://gist.github.com/xfix/e39d7a8baf31f0ea45e5
20:07 xfix Sure something went wrong.
20:08 araujo joined #perl6
20:10 ren1us huh.  pasting in « and » has a tendency to break the moar repl, it seems.  hooray for utf-8.
20:11 FROGGS :/
20:12 ren1us whatever, i'm just using the repl for fiddling anyway.
20:14 FROGGS I never use it
20:15 vendethiel unicode-- # unicode hater !
20:15 ren1us i like using it on the side as i write my actual code in another window, just because i often need to do some fiddling to get the syntax right
20:15 vendethiel unicode++ #it's cool, though
20:16 ren1us vendethiel: i like widescale unicode support as a concept, but i'd like it more if it didn't imply the need to memorize character codes
20:21 psch joined #perl6
20:23 psch evening #perl6 o/
20:24 khisanth_ joined #perl6
20:24 * perigrin didn't realize that #perl6 was uneven ... should have though  ... knowing how many people in here are odd.
20:24 masak ahoj psch
20:24 * psch successfully un-broke the "missing OUTER on jvm"-thingy in the debugger just now o/
20:24 psch now for "doing it properly"... :)
20:25 lue ren1us: it doesn't, there are codepoint-less input methods. I use compose keys, for example :)
20:25 yoleaux 08:04Z <atroxaper> lue: hello, my not finished yet solution is https://github.com/atroxaper/Pod-SAX. You can see Pod::SAX::Reformer class and its test. Main feature that my Callees makes a calls for start of Pod object, end of Pod object, and 'in' Pod object that trigger if .content has not Pod object like String. And for each Pod type we can make many callbacks for many cases. Like only for L<> but not for C<>, I think it is more  …
20:25 yoleaux flexible and maintenanc[fu
20:25 psch hey masak :)
20:25 rurban1 joined #perl6
20:26 FROGGS psch++ # \o/
20:27 ren1us lue: ah, that works too.
20:28 lue « is just <Multi> + < + < , and ☃ is just <Multi> + & + s + n + o + w, and... :)
20:29 lue (there's also the OSX-y solution of setting up third/fourth/etc. levels for your keyboard)
20:31 ren1us m: multi sub circumfix:<? ?>($in) { say $in; }; ?5?; # is this just breaking because there are prefix/postfix operators taking higher precedence?  also lue++
20:31 camelia rakudo-moar e9fad6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tRLsq8dntmâ�¤Two terms in a rowâ�¤at /tmp/tRLsq8dntm:1â�¤------> [32mub circumfix:<? ?>($in) { say $in; }; ?5[33mâ��[31m?; # is this just breaking because there[0mâ�¤    expecting any of:â�¤    â€¦Â»
20:31 lue m: multi sub circumfix:<☃ ☄>($in) { say $in; }; ☃5☄;
20:31 camelia rakudo-moar e9fad6: OUTPUT«5␤»
20:32 lue ren1us: seems like it.
20:34 ren1us i almost feel like circumfix should have the highest precedence, since it's the least likely to be triggered and most likely to trigger false positives on other prefix or postfix captures
20:34 jnthn Yes, termish is prefix* term postfix*, roughly.
20:34 jnthn And a circumfix is a kind of term
20:34 jnthn It's not that they compete, it's that the circumfix doesn't even get a chance.
20:35 teodozjan joined #perl6
20:37 virtualsue joined #perl6
20:55 mathw joined #perl6
20:59 Guest4485 joined #perl6
20:59 Guest4485 joined #perl6
21:02 teodozjan joined #perl6
21:12 telex joined #perl6
21:22 ivanshma` joined #perl6
21:31 SevenWolf joined #perl6
21:40 Mouq p: say await start { 1 + 1 }
21:40 camelia rakudo-parrot e9fad6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/uSyZHa_ZZuâ�¤Undeclared routines:â�¤    await used at line 1â�¤    start used at line 1. Did you mean 'spurt', 'sqrt', 'sort'?â�¤â�¤Â»
21:40 PerlJam q!
21:41 Mouq I kinda wish they were defined syncronously for Parrot, so you could write code for all three compilers
21:49 rje_ joined #perl6
21:49 rje_ perl6: say "hello, world!"
21:49 camelia rakudo-{parrot,jvm,moar} e9fad6, niecza v24-109-g48a8de3: OUTPUT«hello, world!␤»
21:55 BenGoldberg joined #perl6
22:08 atroxaper joined #perl6
22:20 _slade joined #perl6
22:32 jnap joined #perl6
22:46 * [Coke] fixed feather.
22:50 [Coke] looks like I had the rakudo-star-daily process still running there, and the last few weeks it was hanging on that test file. probably been getting slower for a while. killed the cronjob, killed all procs running.
22:52 dalek rakudo/lex2loc2: f4fc6d4 | jnthn++ | src/vm/moar/Perl6/Ops.nqp:
22:52 dalek rakudo/lex2loc2: Fix a .DEFINITE code-gen bug.
22:52 dalek rakudo/lex2loc2:
22:52 dalek rakudo/lex2loc2: Should not blindly re-use registers that may belong to locals.
22:52 dalek rakudo/lex2loc2: review: https://github.com/rakudo/rakudo/commit/f4fc6d433e
22:53 dalek joined #perl6
22:58 lizmat Mouq: well volunteered  :-)
23:02 Mouq lizmat: Would that be acceptable behavior though?
23:02 Mouq p: Channel.new
23:02 camelia rakudo-parrot e9fad6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/M8sdlq9p_Vâ�¤Undeclared name:â�¤    Channel used at line 1â�¤â�¤Â»
23:02 Mouq m: Channel.new
23:02 camelia rakudo-moar e9fad6: ( no output )
23:03 lizmat maybe the CurrentThreadScheduler could provide some inspiration?
23:11 lizmat well, that was disappointing  :-(
23:11 PZt joined #perl6
23:11 lizmat 4-2  :-(
23:11 jnthn Yeah :/
23:12 lizmat on the brighter side: more time for hacking now  :-)
23:17 jnthn yay :)
23:19 jnthn The lex2loc branch build agaisnt latest Moar master seems clean to me. Testing welcome.
23:19 cooper_ joined #perl6
23:19 jnthn Will bump revisions and merge it tomorrow evening, if all looks good.
23:20 * lizmat looks at s/perl6/Perl6/ and decides to sleep on it
23:21 lizmat gnight, #perl6!
23:21 Mouq 'night lizmat!
23:22 * jnthn sleeps also
23:22 jnthn 'night all
23:25 dalek roast: af01013 | coke++ | integration/advent2013-day14.t:
23:25 dalek roast: this test is marked as requiring concurrency
23:25 dalek roast:
23:25 dalek roast: ... so parrot won't even try to run it now.
23:25 dalek roast: review: https://github.com/perl6/roast/commit/af010133d1
23:25 dalek rakudo/nom: 4cad54f | coke++ | t/spectest.data:
23:25 dalek rakudo/nom: Mark this test as requiring concurrency
23:25 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4cad54fe97
23:28 woolfy1 lizmat does not fully realise that the Dutch team still has to play one more game, against Brazil, this Saturday.  And if the Dutch lose that, they're real losers.  Grr.
23:28 woolfy1 bedtime
23:32 rindolf joined #perl6
23:32 Mouq 'night jnthn, woolfy
23:33 dalek roast: 58c8aea | coke++ | S17-channel/winner.t:
23:33 dalek roast: this test is marked as requiring concurrency
23:33 dalek roast:
23:33 dalek roast: ... so parrot won't even try to run it now.
23:33 dalek roast: review: https://github.com/perl6/roast/commit/58c8aea058
23:37 cognominal woolfy1: the real loosers are the brazilians citizens. That circus costs a lot of money and any money made goes in already deep pockets.
23:46 ren1us joined #perl6
23:47 xragnar_ joined #perl6
23:48 [Coke] we have a uniname that takes an int, but it's not spec'd.
23:48 [Coke] also: uninames is NYI, and that looks like LHF.
23:52 dalek roast: 3c9bf20 | coke++ | S (2 files):
23:52 dalek roast: use standard "NYI" text
23:52 dalek roast: review: https://github.com/perl6/roast/commit/3c9bf207e9
23:53 [Coke] down to 906 rakudo fudges that aren't ticketed or marked NYI
23:53 [Coke] .tell lizmat is S03-metaops/hyper.t:659:#?rakudo skip 'EVAL(Buf)' easily fixable? (I tried unskipping it, no love)
23:53 yoleaux [Coke]: I'll pass your message to lizmat.
23:55 Mouq [Coke]++
23:58 retupmoca m: my $s = Supply.new; my $m = $s.grep({ $_ == 1}).map({ say $_; (x => $_).hash }); $m.tap({say 'a'}); $m.tap({say 'b'}); $s.more(1)
23:58 camelia rakudo-moar e9fad6: OUTPUT«1␤a␤b␤1␤a␤b␤1␤a␤b␤1␤a␤b␤»
23:58 retupmoca ^ if that is correct, then I really don't understand supplies

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

Perl 6 | Reference Documentation | Rakudo