Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-02-17

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:08 LeCamarade joined #perl6
00:13 AlexDaniel m: my %h is default(%h<foo>)
00:13 camelia rakudo-moar 67aeef: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot use variable %h in declaration to initialize itself␤at <tmp>:1␤------> 3my %h is default(%7⏏5h<foo>)␤    expecting any of:␤        term␤»
00:15 AlexDaniel okay, so what's up with RT #121807
00:15 synopsebot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=121807
00:16 AlexDaniel I'm staring at that bug report and it makes no sense
00:16 AlexDaniel m: my %z; %z<foo> = 42; my %h is default(%z<foo>); say %h<abc>
00:16 camelia rakudo-moar 67aeef: OUTPUT«(Any)␤»
00:17 AlexDaniel the whole idea of putting something complex in default(…) is insane considering how is default works
00:18 AlexDaniel so it's not that %h<foo> doesn't work, nothing works there
00:18 AlexDaniel or am I missing something?
00:19 AlexDaniel and arguably previous error message made more sense
00:19 geekosaur likely needs to be compile time
00:20 geekosaur m: BEGIN my %z; BEGIN %z<foo> = 42; my %h is default(%z<foo>); say %h<abc>
00:20 camelia rakudo-moar 67aeef: OUTPUT«42␤»
00:20 AlexDaniel yea, that works, sure
00:20 AlexDaniel but the ticket talks about putting %h there
00:21 AlexDaniel which is not going to work ever
00:21 AlexDaniel well, with the current functionality at least
00:21 llfourn joined #perl6
00:21 AlexDaniel thing is, I'm half way through reverting the results of RT #125371
00:21 synopsebot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=125371
00:21 AlexDaniel and now this!
00:22 geekosaur the ticket is complaining that "Variable not declared" is LTA for the user, who can see it right there and does not consider compile vs. run time
00:22 AlexDaniel okay, then we can probably reopen it, yes
00:23 AlexDaniel perhaps the error message can say that 「is default(…)」 is for compile-time stuff only
00:23 geekosaur yes, that was my thought, the message should at least indicate that the name and value needs to be known *at compile time*
00:24 geekosaur but even that is arguably a little unclear because without thinking deeply one would expect a `my` to have a compile time effect
00:24 jraglin joined #perl6
00:24 geekosaur so explaining what's actually up succinctly might prove ... interesting
00:25 AlexDaniel yea… definitely some room for improvement :)
00:37 Actualeyes joined #perl6
00:39 aborazmeh joined #perl6
00:39 aborazmeh joined #perl6
00:40 Sgeo joined #perl6
00:51 BenGoldberg joined #perl6
00:51 pyrimidine joined #perl6
00:57 cdg joined #perl6
01:11 samcv AlexDaniel++ on that
01:11 samcv making the error mention compile time
01:11 samcv like make sure all variables used exist before compile time by putting them in a BEGIN block
01:11 samcv or something
01:17 AlexDaniel well, it's RT #121807 now, feel free to work on it
01:17 synopsebot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=121807
01:17 AlexDaniel I don't know from the top of my head where this error message should go
01:18 samcv idk maybe in the optimizer
01:19 samcv but i'm not an expert. but the optimizer checks if the symbol exists, then could also check whether it was is default or something
01:19 samcv or uhm maybe it's in the place that handles the `is` things
01:26 samcv though looking at optimizer i see this comment
01:26 samcv nless $!symbols.is_lexical_declared($op.name) {
01:26 samcv # Shouldn't be able to hit this due to checks done in the parse
01:26 samcv # phase, but this will catch anything that sneaks past it.
01:27 samcv so idk 1569 in Optimizer.nqp could always try pkutting something in there and see if it ends up getting there. otherwise check out the other place
01:47 timotimo RFC: we should agree on one kind of "speed improvement of 2x" in commit messages and such
01:47 timotimo i.e. there's a line in the changelog that says "between 0.1x [...] faster"
01:47 timotimo whereas i believe some other lines mean the actual number rather than the number + 1.0
01:48 timotimo and now i'm going to bed :)
01:48 AlexDaniel yes
01:49 timotimo i wish our measurement stuff was a bit more automized, such that we can always point to some place (maybe even a gist in a specific file-layout?) where you can see the difference
01:49 timotimo maybe benchable is the key here
01:50 timotimo though sometimes you need a bit more than just a single irc line
01:51 AlexDaniel well, one of the issues is that the code for measurements is not published
01:51 timotimo yup
01:51 timotimo we always just time perl6 -e '...' a bunch of times
01:52 timotimo and then discard the results after we extract an approximate "n times faster" number
01:53 timotimo good night!
01:53 AlexDaniel night!
01:55 obfusk_ joined #perl6
02:00 astj_ joined #perl6
02:02 samcv i agre timotimo
02:13 Ben_Goldberg joined #perl6
02:28 AlexDaniel OK I'll finish this thing tomorrow…
02:35 ggoebel joined #perl6
02:38 pyrimidine joined #perl6
02:41 gdonald joined #perl6
02:43 agentzh joined #perl6
02:48 ilbot3 joined #perl6
02:48 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
02:50 Ben_Goldberg joined #perl6
03:01 mls joined #perl6
03:03 bwisti joined #perl6
03:25 lizmat joined #perl6
03:30 deepbook5broo joined #perl6
03:30 deepbook5broo left #perl6
03:34 noganex_ joined #perl6
03:37 pyrimidine joined #perl6
03:44 ssotka joined #perl6
04:04 adu joined #perl6
04:06 jraglin joined #perl6
04:07 pyrimidine joined #perl6
04:15 cdg joined #perl6
04:18 labster joined #perl6
04:21 falafel joined #perl6
04:28 astj joined #perl6
04:28 lowecase joined #perl6
04:29 Cabanoss- joined #perl6
04:30 lowecase joined #perl6
04:39 MasterDuke joined #perl6
04:44 cpage_ joined #perl6
05:00 astj joined #perl6
05:07 parv joined #perl6
05:31 wamba joined #perl6
05:39 xtreak joined #perl6
06:09 pyrimidine joined #perl6
06:18 cpage__ joined #perl6
06:32 llfourn joined #perl6
06:38 pyrimidine joined #perl6
06:38 Ben_Goldberg joined #perl6
06:47 eroux joined #perl6
06:50 RabidGravy joined #perl6
06:53 ufobat joined #perl6
06:56 darutoko joined #perl6
07:09 Ben_Goldberg joined #perl6
07:15 pyrimidine joined #perl6
07:48 bjz joined #perl6
07:51 abraxxa joined #perl6
08:14 abraxxa joined #perl6
08:22 wamba joined #perl6
08:31 brrt joined #perl6
08:39 zakharyas joined #perl6
08:49 xtreak joined #perl6
09:14 lukaramu joined #perl6
09:15 petercommand joined #perl6
09:16 pyrimidine joined #perl6
09:24 rindolf joined #perl6
09:32 geekosaur joined #perl6
09:42 ChoHag joined #perl6
10:21 wamba joined #perl6
10:29 wamba joined #perl6
10:34 geekosaur joined #perl6
10:43 brrt why are things so awefully quiet up here
10:45 jnthn Friday. Everyone too tired to even type. :P
10:47 DrForr Everyone's partying down.
10:47 jnthn Bah, I'm writing Java. That's a lot of typing and a lot of typing. :P
10:47 jnthn And doens't feel like partying at all P
10:47 jnthn :P
10:51 ilmari java code is 60% class names by volume
10:53 * jnthn looks at the code and suspects that might actually be right
10:55 jnthn Thankfully, the large codebase I need to deal with is well designed/implemented.
10:55 jnthn So it's not a particularly painful experience. :)
11:03 pyrimidine joined #perl6
11:06 bjz joined #perl6
11:08 arnsholt jnthn: Incidentally, I the Java sixmodel implementation is my go-to example of Java code that is not riddled with MethodInvocationBeanFactory and the like =)
11:14 geekosaur joined #perl6
11:22 Ven joined #perl6
11:24 gdonald joined #perl6
11:24 bjz_ joined #perl6
11:50 Ven joined #perl6
11:53 AlexDaniel joined #perl6
11:56 eliasr joined #perl6
12:06 geekosaur joined #perl6
12:09 AlexDaniel ahhhhhhh dang it!!
12:09 AlexDaniel RT #87034
12:09 synopsebot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=87034
12:10 timotimo 2011 :D
12:11 AlexDaniel “this is what I expect”
12:12 AlexDaniel 「my @foo = 42, @foo; say @foo」 is ok
12:13 AlexDaniel but 「my @foo := 42, @foo; say @foo」 ?
12:14 AlexDaniel locally I get (42 (Mu)) for the last one
12:15 timotimo this is a good-ol' can of worms :)
12:16 pyrimidine joined #perl6
12:17 faraco joined #perl6
12:19 bjz joined #perl6
12:20 itaipu joined #perl6
12:23 Geth ¦ doc: 6ca40de9c7 | (Tom Browder)++ | doc/Language/control.pod6
12:23 Geth ¦ doc: improve wording
12:23 Geth ¦ doc: review: https://github.com/perl6/doc/commit/6ca40de9c7
12:25 ilmari tbrowder: freudian slip? "execunted"
12:26 tbrowder ugh...
12:28 AlexDaniel c: 3754356d8e^ my @foo := 1..3, (@foo Z+ 100)
12:28 committable6 AlexDaniel, ¦«3754356d8e^»:
12:28 AlexDaniel c: 3754356d8e^ my @foo := 1..3, (@foo Z+ 100); say @foo
12:28 AlexDaniel oops…
12:28 Geth ¦ doc: 3a81880c72 | (Tom Browder)++ | doc/Language/control.pod6
12:28 Geth ¦ doc: fix typo
12:28 Geth ¦ doc: review: https://github.com/perl6/doc/commit/3a81880c72
12:29 xtreak joined #perl6
12:30 committable6 joined #perl6
12:30 tbrowder ilmari: ++, you are first person i've heard from since that changed yesterday
12:31 ilmari tbrowder: eh? it was in that commit Geth just reported (3a81880c72)
12:31 ilmari uh, 6ca40de9c7
12:31 tbrowder but that whole when chunk still needs more love
12:33 AlexDaniel c: 3754356d8e^ my @foo := 1..3, (@foo Z+ 100); say @foo[^10]
12:33 committable6 AlexDaniel, ¦«3754356d8e^»: Use of Nil in numeric context  in block <unit> at /tmp/MouvyRrLde:1␤1 2 3 100 Nil Nil
12:33 AlexDaniel c: 3754356d8e my @foo := 1..3, (@foo Z+ 100); say @foo[^10]
12:33 committable6 AlexDaniel, https://gist.github.com/2eb6​627efe055a7cc3a3ea044eb4c0bb
12:33 AlexDaniel c: 3754356d8e my @foo := 1..3, (@::foo Z+ 100); say @foo[^10]
12:33 committable6 AlexDaniel, ¦«3754356»: Use of Nil in numeric context  in block <unit> at /tmp/UcqDtnL1KH:1␤1 2 3 100 Nil Nil
12:33 AlexDaniel c: HEAD my @foo := 1..3, (@::foo Z+ 100); say @foo[^10]
12:33 bjz joined #perl6
12:33 committable6 AlexDaniel, ¦«HEAD»: No such method 'iterator' for invocant of type 'Mu'␤  in block <unit> at /tmp/AHeiPmn2aA line 1␤ «exit code = 1»
12:33 timotimo tbrowder: do you think it'd be wise to mention "smart matching" in the "default use of $_" part about when?
12:34 AlexDaniel c: HEAD my @foo := @::foo; say @foo[^10]
12:34 committable6 AlexDaniel, ¦«HEAD»: Type check failed in binding; expected Positional but got Mu (Mu)␤  in block <unit> at /tmp/tXA40ekPBu line 1␤ «exit code = 1»
12:34 AlexDaniel c: HEAD my @foo := 42, @::foo; say @foo[^10]
12:34 committable6 AlexDaniel, ¦«HEAD»: (42 (Mu) Nil Nil Nil Nil Nil Nil Nil Nil)
12:35 tbrowder ach! ilmari: you're correct--i did those few changes online with an ipad and that kind of side error is easy to back due to slow feedback
12:36 tbrowder AlexDaniel: that was suggested by gfldex and i think it does belong there, but i want to move it to a better place
12:36 AlexDaniel ?
12:37 AlexDaniel me?
12:38 tbrowder i'm not sure that feature is clearly stated anywhere else
12:38 tbrowder sorry, AD, i meant timotimo:
12:38 araraloren joined #perl6
12:39 timotimo it hopefully is!
12:39 timotimo it's very powerful and it's everywhere
12:40 timotimo hm. it has a very short section in language/operators
12:41 tbrowder well, a reference to that for the when discussion would be useful, maybe in addition to the few wordss...
12:42 sena_kun joined #perl6
12:42 andrzejku joined #perl6
12:43 tbrowder maybe treat the X in the examples with some words about "boolean context"
12:46 tbrowder for instance i noticed while experimenting that a standalone when block with an undefined $_ requires a complete boolean expresssion:
12:47 timotimo https://docs.perl6.org/syntax/default%20when.html - wait, is this the text you wrote?
12:47 timotimo it doesn't match up with what i remember from the commits/diffs
12:48 timotimo huh
12:48 timotimo there has already been a section on when before you started writing it?
12:48 timotimo that's weird
12:49 tbrowder m: my $a=1; when $a {say 'a'}; when so $a {say 'a'}
12:49 camelia rakudo-moar c2349d: OUTPUT«a␤»
12:50 timotimo m: say 1 ~~ Any
12:50 camelia rakudo-moar c2349d: OUTPUT«True␤»
12:50 timotimo m: say Any ~~ 1
12:50 camelia rakudo-moar c2349d: OUTPUT«False␤»
12:50 timotimo m: say Any ~~ True
12:50 camelia rakudo-moar c2349d: OUTPUT«Potential difficulties:␤    Smartmatch against True always matches; if you mean to test the topic for truthiness, use :so or *.so or ?* instead␤    at <tmp>:1␤    ------> 3say Any ~~ 7⏏5True␤True␤»
12:50 tbrowder timotimo: i made a large change yesterday including moving the when chunk
12:50 timotimo right
12:51 timotimo the page i was looking at was already built from your commit 27 minutes ago
12:51 timotimo the one before the "fix typo" one
12:51 timotimo do you see the other section about "when" on that page?
12:51 andrzejku today I supported Perl6 :D
12:52 brrt by the way, ugexe++ for zef
12:52 brrt it works pretty well
12:52 timotimo yeah, it's good
12:52 tbrowder m: my $a=1; when $a {say 'a'}
12:52 camelia rakudo-moar c2349d: ( no output )
12:53 DrForr andrzejku: Yay, what did you do?
12:53 tbrowder timotimo: see above, that needs explaining imho
12:54 andrzejku DrForr, bought moritz book :P
12:54 moritz andrzejku: thanks!
12:54 andrzejku good source to learn :)
12:54 moritz I already got an email from leanpub telling me it was purchased, but of course not by whom
12:55 andrzejku moritz, are you planning to add more exercises when book would be finished?
12:55 andrzejku that's only 7 exercises now and 40% book
12:55 andrzejku so
12:55 andrzejku 14 in all?
12:55 moritz andrzejku: more suggestions for exploration than excerises
12:55 moritz and yes, I can add more if there's interest
12:56 andrzejku nice, I would read it soon after work
12:56 andrzejku keep writing :)
12:59 moritz speakinig of which, I could publish the next chapter
12:59 AlexDaniel m: Test; is-deeply (42, Mu), (42, Mu)
12:59 camelia rakudo-moar c2349d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared name:␤    Test used at line 1␤Undeclared routine:␤    is-deeply used at line 1␤␤»
12:59 AlexDaniel m: use Test; is-deeply (42, Mu), (42, Mu)
12:59 camelia rakudo-moar c2349d: OUTPUT«Type check failed in binding to <anon>; expected Any but got Mu (Mu)␤  in sub _is_deeply at /home/camelia/rakudo-m-inst-1/share/perl6/sou​rces/C712FE6969F786C9380D643DF17E85D06868219E (Test) line 579␤  in sub is-deeply at /home/camelia/rakudo-m-inst-1/s…»
12:59 AlexDaniel mc: use Test; is-deeply (42, Mu), (42, Mu)
12:59 committable6 AlexDaniel, https://gist.github.com/ecdd​8eeba58c233a68aa08788a499952
13:00 AlexDaniel so how do I test it then?
13:00 AlexDaniel is it a bug?
13:01 timotimo tbrowder: you mean the thing where you can put "so" in front of something? yeah, a few words would be good for that. the mechanism is that smart match against True will always succeed and smart match against False will always afil
13:01 timotimo fail*
13:01 timotimo so by putting something after the "when" that will evaluate to True or to False, you can trigger that specific block when you want it
13:03 MARTIMM joined #perl6
13:05 tbrowder m: when Any {.say}
13:05 camelia rakudo-moar c2349d: OUTPUT«(Any)␤»
13:06 tbrowder when 0 {.say}
13:06 timotimo m: when _:U { .say }
13:06 camelia rakudo-moar c2349d: OUTPUT«5===SORRY!5===␤Function '_:U' needs parens to avoid gobbling block␤at <tmp>:1␤------> 3when _:U { .say }7⏏5<EOL>␤Missing block (apparently claimed by '_:U')␤at <tmp>:1␤------> 3when _:U { .say }7⏏5<EOL>␤␤»
13:06 timotimo hah
13:06 timotimo how do you spell that %)
13:06 timotimo i guess Mu:U or Any:U would be correct
13:06 moritz Mu:U
13:07 IOninja Depends on what you wanted to spell :)
13:07 IOninja m: with Mu|Mu { when Any:U { .say } }
13:07 camelia rakudo-moar c2349d: ( no output )
13:08 IOninja m: without Mu|Mu { when Any:U { .say } }
13:08 camelia rakudo-moar c2349d: ( no output )
13:08 AlexDaniel m: use Test; is-deeply (42, Mu), (42, Mu)
13:08 camelia rakudo-moar c2349d: OUTPUT«Type check failed in binding to <anon>; expected Any but got Mu (Mu)␤  in sub _is_deeply at /home/camelia/rakudo-m-inst-1/share/perl6/sou​rces/C712FE6969F786C9380D643DF17E85D06868219E (Test) line 579␤  in sub is-deeply at /home/camelia/rakudo-m-inst-1/s…»
13:08 AlexDaniel any comment on this? ↑
13:08 faraco joined #perl6
13:08 IOninja Use `is`
13:08 AlexDaniel m: use Test; is (42, Mu), (42, Mu)
13:08 camelia rakudo-moar c2349d: OUTPUT«Use of uninitialized value of type Mu in string context.␤Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.␤  in block  at /home/camelia/rakudo-m-inst-1/share/perl6/sour​ces/C712FE6969F786C9380D643DF17E85D06868219…»
13:08 IOninja haha
13:09 moritz AlexDaniel: it's an unfortunate side effect of the decision that === and eqv should autothread, thus they can't compare Mu
13:09 IOninja Why do you have a Mu?
13:09 AlexDaniel m: my @foo := 42, @::foo
13:09 camelia rakudo-moar c2349d: ( no output )
13:09 AlexDaniel m: my @foo := 42, @::foo; say @foo
13:09 camelia rakudo-moar c2349d: OUTPUT«(42 (Mu))␤»
13:09 IOninja And you want a roast test that would test for that Mu?
13:09 moritz please don't test this as desired outcome
13:09 IOninja Yes.
13:10 AlexDaniel what's the desired output then?
13:10 IOninja I'd say currently undefined.
13:10 AlexDaniel OK
13:10 IOninja And hence no test
13:10 AlexDaniel I'm fine with that
13:10 IOninja 'cause Mu there doesn't feel overly useful and if we add a test we lock ourselfs into having Mu there
13:10 * jnthn wonders if a compile-time error would be the best thing...
13:11 IOninja m: my @foo := 42, @foo; say @foo
13:11 camelia rakudo-moar c2349d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot use variable @foo in declaration to initialize itself␤at <tmp>:1␤------> 3my @foo := 42, @7⏏5foo; say @foo␤    expecting any of:␤        term␤»
13:11 jnthn m: my @a = 1,2; say @::a
13:11 camelia rakudo-moar c2349d: OUTPUT«[1 2]␤»
13:11 moritz jnthn: we already have one for the normal case, and the @::foo is a workaround against that :-)
13:11 AlexDaniel yea, I don't mind if there was a proper compile-time error
13:12 moritz but is that something you'd write accidentally?
13:12 AlexDaniel no
13:12 moritz then what's the point?
13:12 Actualeyes joined #perl6
13:12 IOninja We plan to remove that error
13:13 IOninja m: my @foo = 42, @::foo; say @foo
13:13 camelia rakudo-moar c2349d: OUTPUT«(\Array_64468560 = [42 Array_64468560])␤»
13:13 IOninja ^ cause that works for example
13:13 moritz but that doesn't work for binding, right?
13:13 AlexDaniel yes
13:13 IOninja Right
13:13 moritz so we should keep the error in the case of binding
13:13 AlexDaniel it's only binding that is an actual issue
13:13 AlexDaniel … no
13:13 moritz why not?
13:13 IOninja Why no?
13:14 AlexDaniel because you just get Mu, what's so horrible about it?
13:14 AlexDaniel DIHWIDT
13:14 IOninja Because the user likely didn't want a Mu there
13:14 AlexDaniel what did they want then?
13:15 IOninja Possibly a circular array
13:15 moritz AlexDaniel: they likely made a wrong assumption
13:15 IOninja Same with cases that end up with VMNull or whatever it was
13:15 moritz AlexDaniel: which is why we should catch the behavior that is a likely error, and undefined behavior anyway
13:15 IOninja m: my \a = a; say a.^name
13:15 camelia rakudo-moar c2349d: OUTPUT«VMNull␤»
13:15 AlexDaniel yea, feel free to implement a proper error
13:15 IOninja m: my $a := $a; say $a.^name
13:15 camelia rakudo-moar c2349d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot use variable $a in declaration to initialize itself␤at <tmp>:1␤------> 3my $a := $7⏏5a; say $a.^name␤    expecting any of:␤        term␤»
13:15 IOninja m: my $a := $::a; say $a.^name
13:15 camelia rakudo-moar c2349d: OUTPUT«VMNull␤»
13:16 AlexDaniel that catches more wrong assumptions and doesn't prevent proper code to work
13:17 pyrimidine joined #perl6
13:17 newbie1 joined #perl6
13:31 lukiramu joined #perl6
13:32 espadrine_ joined #perl6
13:33 MARTIMM m: my @s=1,2,3; for @s { my $line = $^line; say "->> $line"; }
13:33 camelia rakudo-moar c2349d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Redeclaration of symbol '$^line' as a placeholder parameter␤at <tmp>:1␤------> 3my @s=1,2,3; for @s { my $line = $^line7⏏5; say "->> $line"; }␤»
13:33 * [Coke] yawns.
13:34 AlexDaniel m: my @s=1,2,3; for @s { say "->> $^line"; }
13:34 camelia rakudo-moar c2349d: OUTPUT«->> 1␤->> 2␤->> 3␤»
13:34 IOninja m: my @s=1,2,3; for @s { $ = $^line; say "->> $line"; }
13:34 camelia rakudo-moar c2349d: OUTPUT«->> 1␤->> 2␤->> 3␤»
13:35 IOninja MARTIMM: that's normal. $line can be used instead of $^line once the signature has been figured out, hence its complaint about you trying to declare $line
13:35 AlexDaniel m: my @s=1,2,3; for @s -> $line { say "->> $line"; }
13:35 camelia rakudo-moar c2349d: OUTPUT«->> 1␤->> 2␤->> 3␤»
13:35 IOninja lets you use these variables inside inner blocks
13:36 MARTIMM Ok, so after using $^line once it is possible to use $line in this case
13:36 IOninja Yes.
13:36 MARTIMM thanks, bye
13:36 AlexDaniel bye :)
13:37 IOninja bye... baby 🎶🎶
13:39 wamba joined #perl6
13:44 newbie1 joined #perl6
13:46 newbie1 joined #perl6
13:47 newbie12 joined #perl6
13:47 itaipu joined #perl6
13:54 user9 joined #perl6
13:56 xtreak joined #perl6
13:59 brrt joined #perl6
14:01 mr_ron joined #perl6
14:03 Geth ¦ doc: 73f6e6f910 | (Will "Coke" Coleda)++ | 2 files
14:03 Geth ¦ doc: Test doc/Language/haskell-to-p6.pod6 examples
14:03 Geth ¦ doc:
14:03 Geth ¦ doc: Closes #1199
14:03 Geth ¦ doc: review: https://github.com/perl6/doc/commit/73f6e6f910
14:03 Geth ¦ doc: be0e9fb797 | (Will "Coke" Coleda)++ | doc/Language/haskell-to-p6.pod6
14:03 Geth ¦ doc: Fix spelling of Perl 6
14:03 Geth ¦ doc: review: https://github.com/perl6/doc/commit/be0e9fb797
14:07 newbie1 joined #perl6
14:08 yqt joined #perl6
14:12 Actualeyes joined #perl6
14:25 kurahaupo__ joined #perl6
14:25 yqt joined #perl6
14:33 yqt joined #perl6
14:35 yqt joined #perl6
14:35 yqt joined #perl6
14:36 yqt joined #perl6
14:37 yqt joined #perl6
14:38 pmurias joined #perl6
14:42 duncan_dmg joined #perl6
14:49 skids joined #perl6
14:52 girafe joined #perl6
14:57 Geth ¦ doc: 11c89a09f8 | Cale++ | doc/Type/Str.pod6
14:57 Geth ¦ doc: Add two more examples to comb
14:57 Geth ¦ doc:
14:57 Geth ¦ doc: Just to make the "chunking" ability more obvious to newcomers.
14:57 Geth ¦ doc: review: https://github.com/perl6/doc/commit/11c89a09f8
15:03 yqt joined #perl6
15:05 jonas2 joined #perl6
15:06 rumble joined #perl6
15:06 sunnavy joined #perl6
15:10 awwaiid joined #perl6
15:10 sammers joined #perl6
15:13 ufobat joined #perl6
15:14 newbie1 joined #perl6
15:18 pyrimidine joined #perl6
15:28 itaipu joined #perl6
15:34 raiph joined #perl6
15:38 brrt joined #perl6
15:38 wamba joined #perl6
15:39 rblackwe joined #perl6
15:40 avuserow joined #perl6
15:46 * stmuk_ reads a certain blog post from yesterday and grrs a bit
15:47 IOninja Which one?
15:48 IOninja "Deception in tests considered harmful"?
15:49 stmuk_ yes
15:49 IOninja That guy just loves quoting me, eh? :)
15:50 IOninja Pretty annoying to have your words taken in bits out of context.
15:51 stmuk_ anyway there was useful technical input even if the tone (and use of "deception" was a bit hostile
15:51 jnthn "Handling different EOL conventions is straightforward"...heh, heh...except the first thing that happened when we introduced what he proposed was somebody asking for a way to *not* have that happen.
15:52 jnthn While I agree it's the right default for Proc::Async, you can't just blanket do it; it's be the wrong thing for socket I/O
15:52 jonas2 joined #perl6
15:52 jnthn *it'd
15:52 IOninja "When I write about flaws and problems I observe in Perl 6, people call me names and claim I am mocking Perl 6, lying about its stability etc. In truth, I want to be enthusiastic about Perl 6, but I am disappointed more often than not."
15:53 IOninja heh
15:53 stmuk_ "hard things in being difficult" shock
15:53 brrt i'm not familiar with the perl6 community being mean, so i'm somewhat surprised by that assertion
15:54 IOninja brrt: you clearly missed his famous thesis whose conclusion is Perl 6 Developers Are Racist.
15:54 brrt who is this him
15:55 brrt and why
15:55 IOninja The guts of which were rebuked with "you never reported a single issue with Perl 6"; so now he has a bunch.
15:55 Geth ¦ doc: 159f1ef02e | (Tom Browder)++ | doc/Language/control.pod6
15:55 Geth ¦ doc: a little more word-smithing
15:55 Geth ¦ doc:
15:55 Geth ¦ doc: attempt at clarity--please change or comment
15:55 Geth ¦ doc: review: https://github.com/perl6/doc/commit/159f1ef02e
15:55 IOninja brrt: no idea who he is. A blog author who writes for clicks?
15:55 * IOninja shrugs
15:55 jnthn IOninja: Yes, and the reports are actually useful, though more abrasive than necesary.
15:55 brrt if this is on twitter, then, i hate to say, you brought this on yourselves and should've known better
15:55 brrt :-P
15:55 [Coke] tbrowder: why did you quote "statement modifier form" ?
15:56 IOninja jnthn: yes, I found the ticket on the \r\n thing useful. Not sure why it warranted a blog post.
15:56 tbrowder because it's that way in the if description
15:56 [Coke] ... ok. I'd probably have normalized it the other way, but consistency is a good reason. :)
15:56 stmuk_ my favourite from reddit was "By the way, this is open source. I brought the problem to the attention of a broader group of people. Someone else can also fix those tests."
15:56 stmuk_ open source isn't "someone else can do it!"
15:57 IOninja I won't make the mistake of reading reddit comments this time :)
15:57 tbrowder i agree, without quotes in both cases seems better to me
15:58 sunnavy joined #perl6
15:58 [Coke] tbrowder: are you editing via a git repo or the UI?
15:59 IOninja I guess "look at how broken this shit is" garners more clicks than showing something cool about the language. Just as in news all they report about is murders and roberries.
15:59 tbrowder on-line via chrome browser
15:59 IOninja m: say "\r\n".chars; say "\n" eq "\r\n"
15:59 camelia rakudo-moar c2349d: OUTPUT«1␤False␤»
16:00 IOninja So it's one grapheme but it's not the same thing as just \n
16:00 jnthn Right
16:00 [Coke] tbrowder: ok. (your commits lately have been failng 'make xtest', but if you're doing it via the UI, that's why) no wrroies.
16:00 IOninja Eh. Will figure it all out eventually :)
16:00 jnthn Transformation is done at the point of "I/O" (except not really, it's done at the point of string decoding)
16:00 IOninja *We'll
16:01 [Coke] who just added examples to Str?
16:01 jnthn We "just" need to enable that for Proc::Async
16:01 [Coke] is cale here?
16:01 tbrowder if that's a problem i can go back to my repo, but it's so much easier via browser for much stuff
16:02 tbrowder are we getting bad line endings or ending spaces or munged chars?
16:05 Geth ¦ doc: 0f03767624 | (Tom Browder)++ | doc/Language/control.pod6
16:05 Geth ¦ doc: put closing quote in same place as if block's use
16:05 Geth ¦ doc: review: https://github.com/perl6/doc/commit/0f03767624
16:14 cdg joined #perl6
16:18 Geth ¦ doc: 1122a88012 | (Tom Browder)++ | doc/Language/control.pod6
16:18 Geth ¦ doc: add format chars
16:18 Geth ¦ doc: review: https://github.com/perl6/doc/commit/1122a88012
16:20 pyrimidine joined #perl6
16:23 AlexDaniel c: all say "\n" eq "\r\n"
16:23 committable6 AlexDaniel, https://gist.github.com/89de​8c3f251dc31b4a3402d9bc1823cc
16:23 cdg_ joined #perl6
16:24 gdonald joined #perl6
16:25 lostinfog joined #perl6
16:28 ssotka joined #perl6
16:47 AlexDaniel “Low competitive keyword selection, leading to poor search engine rankings”
16:47 AlexDaniel “Last but not the least your online marketing methods are not directed as per latest guideline”
16:47 AlexDaniel :D
16:48 AlexDaniel RT spam that actually sounds like a valid bug report xD
16:52 Geth ¦ doc: 72d3a7b4b7 | (Will "Coke" Coleda)++ | doc/Language/control.pod6
16:52 Geth ¦ doc: remove trailing whitespace
16:52 Geth ¦ doc: review: https://github.com/perl6/doc/commit/72d3a7b4b7
16:52 Geth ¦ doc: a92b7604d1 | (Will "Coke" Coleda)++ | xt/code.pws
16:52 Geth ¦ doc: learn new code words
16:52 Geth ¦ doc: review: https://github.com/perl6/doc/commit/a92b7604d1
16:52 Geth ¦ doc: 99aa1b7065 | (Will "Coke" Coleda)++ | doc/Type/Str.pod6
16:52 Geth ¦ doc: fix examples
16:52 Geth ¦ doc: review: https://github.com/perl6/doc/commit/99aa1b7065
16:53 [Coke] (docs) How do people feel about making the examples test part of 'make test' so bad examples break the build?
16:54 perlpilot [Coke]: Are there any bad examples that are that way on purpose?
16:54 sena_kun perlpilot, there are, but they are properly skipped. We can compile and check all "valid" examples as for now.
16:55 perlpilot then +1 from me.
16:55 sena_kun I'm personally +1 for this feature, but not until I(or someone quickier) do better error reporting.
16:56 [Coke] perlpilot: I just went through some effort to make sure the test passes. :)
17:01 [Coke] sena_kun: are you excited about working on that test file? I am happy to do it, and will have time tomorrow.
17:02 [Coke] (much less frustrating than some of my other doc efforts atm.)
17:02 sena_kun [Coke], did you mean the test script or some specific doc file?
17:03 [Coke] xt/examples*
17:03 [Coke] there's 2 bits left there, I think: removing each skip, and converting the test elements to be per-example rather than per-file.
17:03 [Coke] I was talking about the latter.
17:04 devmikey joined #perl6
17:06 sena_kun Hmm, let's see. I can/plan to do some improvements(for example, do not throw err to /dev/null), but not so much. I'm still worse at Perl 6 than at doc-related digging. :) So I can't disagree with your effort to do the latter.
17:06 itcharlie1 joined #perl6
17:08 sena_kun This weekend will be quite busy anyway. But I'm very happy that this work recieves any attention, firstly I thought that it was harmful or redundant.
17:11 khw joined #perl6
17:16 duncan_dmg left #perl6
17:18 itaipu joined #perl6
17:42 eroux joined #perl6
17:58 * IOninja is really irked by nanis's post
17:59 jraglin joined #perl6
17:59 IOninja Most annoying is I wasted time like an idiot explaining him how to run the stresstest.
18:06 IOninja m: note (Nil andthen "foo" orelse Nil orelse "bar");
18:06 camelia rakudo-moar c2349d: OUTPUT«-> ;; $_ is raw { #`(Block|81627504) ... }␤»
18:06 IOninja m: note (Nil andthen "foo" orelse Nil orelse "bar")()
18:06 camelia rakudo-moar c2349d: OUTPUT«Too few positionals passed; expected 1 argument but got 0␤  in block <unit> at <tmp> line 1␤␤»
18:06 IOninja m: note (Nil andthen "foo" orelse Nil orelse "bar")(Nil)
18:06 camelia rakudo-moar c2349d: OUTPUT«Nil␤»
18:06 IOninja m: note (Nil andthen "foo" orelse Nil orelse "bar")("meow")
18:06 camelia rakudo-moar c2349d: OUTPUT«Nil␤»
18:07 IOninja Don't really know how to detect an Empty given to `orelse` :/ https://github.com/rakudo/rakudo/blob/c​2349d1/src/core/operators.pm#L658-L684
18:07 IOninja The +a slurpy destroys it
18:08 IOninja Feels like `andthen` returning an Empty is a bad idea.
18:11 IOninja ...or maybe don't need to detect it; just execute anything Callable before returning it?
18:11 IOninja m: note (Nil andthen "foo" orelse Int orelse "bar")("meow")
18:11 camelia rakudo-moar c2349d: OUTPUT«(Int)␤»
18:11 IOninja seems it isn't the only issue heh
18:11 zakharyas joined #perl6
18:17 itaipu joined #perl6
18:18 gfldex [Coke], sena_kun I spend some time on thinking about how to run the tests. Firstly each test should be EVALed (that's what EVAL is for). 2ndly they should be sha1ed so we can cache them easily. We can keep a list of sha1s of tests around that we are fine to fail as a flat file, what allows to remove the skiptest mark in the .pod6 files.
18:20 sena_kun gfldex, the idea looks smart for me. though it requires some work, but it can be automated easily.
18:22 gfldex be chomping each test we got a good chance to cache examples that pop up in more then one .pod6
18:25 [Coke] we don't need to cache them,.
18:25 sena_kun why?
18:26 [Coke] because it's fast enough
18:26 [Coke] so why expend extra coding effort and complexity?
18:27 gfldex fun
18:29 [Coke] and we technically only need to insure they compile, so EVAL might be overkill. (we're not checking results or that the runtime works)
18:29 gfldex there could be BEGIN magic
18:29 [Coke] (but if that's faster than perl6 -c and works, that's fine.)
18:30 [Coke] gfldex: sure, BEGIN hits us either way. (and it's why we can't easily test the phasers file ATM)
18:34 brrt joined #perl6
18:39 espadrine joined #perl6
18:40 hankache joined #perl6
18:40 hankache hello #perl6
18:40 yoleaux 14 Feb 2017 18:24Z <IOninja> hankache: Your perl6intro site tells users to use untested development commits by building them with rakudobrew: http://perl6intro.com/#_installing_perl_6 We generally avoid suggesting rakudobrew since users aren't skilled enough to fix any issues with it and users should be using properly tested user releases, not whatever commit ended up being HEAD when they build perl6
18:42 rindolf joined #perl6
18:43 [Coke] 'allo
18:44 IOninja \o
18:50 agentzh joined #perl6
18:50 tony-o m: class a { method l($x) { "$x".say; }; }; sub b(Callable $x){ $x.(50); }; my a $a .=new; b(&{$b.l});
18:50 camelia rakudo-moar c2349d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '$b' is not declared. Did you mean '&b'?␤at <tmp>:1␤------> 3ble $x){ $x.(50); }; my a $a .=new; b(&{7⏏5$b.l});␤»
18:50 tony-o m: class a { method l($x) { "$x".say; }; }; sub b(Callable $x){ $x.(50); }; my a $a .=new; b(&{$a.l});
18:50 camelia rakudo-moar c2349d: OUTPUT«Too few positionals passed; expected 2 arguments but got 1␤  in method l at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
18:51 tony-o did that break or change somewhere in the last year?
18:51 IOninja that is what?
18:52 IOninja $a.l is missing the $x arg
18:52 tony-o $x arg should be the $b.l
18:52 IOninja c: 2014.02 m: class a { method l($x) { "$x".say; }; }; sub b(Callable $x){ $x.(50); }; my a $a .=new; b(&{$a.l});
18:52 committable6 IOninja, ¦«2014.02»: ===SORRY!=== Error while compiling /tmp/8LeieoGJpX␤Unsupported use of &{$a.l}; in Perl 6 please use &($a.l)␤at /tmp/8LeieoGJpX:1␤------> x){ $x.(50); }; my a $a .=new; b(&{$a.l}⏏); «exit code = 1»
18:53 tony-o that worked more than a year ago, it may have changed - just don't recall seeing anything
18:53 tony-o m: class a { method l($x) { "$x".say; }; }; sub b(Callable $x){ $x.(50); }; my a $a .=new; b(&($a.l));
18:53 camelia rakudo-moar c2349d: OUTPUT«Too few positionals passed; expected 2 arguments but got 1␤  in method l at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
18:53 IOninja Never sen &($a.l) to be a lookup of a method callable
18:53 IOninja m: class a { method l($x) { "$x".say; }; }; sub b(Callable $x){ $x.(a, 50); }; my a $a .=new; b(&($a.l));
18:53 camelia rakudo-moar c2349d: OUTPUT«Too few positionals passed; expected 2 arguments but got 1␤  in method l at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
18:54 IOninja m: class a { method l($x) { "$x".say; }; }; sub b(Callable $x){ $x.(50); }; my a $a .=new; b($a.^lookup: "l"));
18:54 camelia rakudo-moar c2349d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unexpected closing bracket␤at <tmp>:1␤------> 0); }; my a $a .=new; b($a.^lookup: "l")7⏏5);␤»
18:54 IOninja m: class a { method l($x) { "$x".say; }; }; sub b(Callable $x){ $x.(50); }; my a $a .=new; b($a.^lookup: "l");
18:54 camelia rakudo-moar c2349d: OUTPUT«Too few positionals passed; expected 2 arguments but got 1␤  in method l at <tmp> line 1␤  in sub b at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
18:54 IOninja bah
18:54 IOninja m: class a { method l($x) { "$x".say; }; }; sub b(Callable $x){ $x.(a, 50); }; my a $a .=new; b($a.^lookup: "l");
18:54 camelia rakudo-moar c2349d: OUTPUT«50␤»
18:55 tony-o hm, that seems unnecessarily complicated..it may not always be an 'a'
18:55 IOninja m: class a { method l($x) { "$x".say; }; }; sub b(Callable $x){ $x.(50); }; my a $a .=new; b({$a.^lookup("l").($a, $^arg));
18:55 camelia rakudo-moar c2349d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3$a .=new; b({$a.^lookup("l").($a, $^arg)7⏏5);␤    expecting any of:␤        statement end␤        statement modifier␤        statement modifier loop␤»
18:55 IOninja m: class a { method l($x) { "$x".say; }; }; sub b(Callable $x){ $x.(50); }; my a $a .=new; b({$a.^lookup("l").($a, $^arg)});
18:55 camelia rakudo-moar c2349d: OUTPUT«50␤»
18:55 IOninja m: say &(42.abs)
18:55 camelia rakudo-moar c2349d: OUTPUT«42␤»
18:55 IOninja c: all say &(42.abs)
18:56 committable6 IOninja, https://gist.github.com/0871​64dadfe6c96d91d5429ddcec9534
18:56 tony-o https://github.com/perl6/perl6-http-server-asy​nc/blob/master/lib/HTTP/Server/Async.pm6#L168
18:56 IOninja yeah, but what's $m?
18:56 tony-o that's calling a method that could come from anywhere and the order matters
18:57 tony-o m is a method or sub as specified by the developer
18:57 tony-o could be both depending on what is pushed into the middleware stack of H:S:A
18:58 hankache IOninja: is there something in rakudobrew that points to the latest release? something like: rakudobrew build moar release?
18:59 AlexDaniel hankache: I guess the idea is not to use rakudobrew
18:59 tony-o rakudobrew build moar-nom
18:59 IOninja hankache: we actively avoid recommending rakudobrew to users. So IMO it's unfortunate your popular website directly opposes that effort
18:59 tony-o hankache: ^
19:00 hankache aha ok
19:00 IOninja 'cause then they have all sorts of issues and all of a sudden they think Perl 6 sucks when in reality they, for example, forgot to run rakudobrew rehash or something similar
19:01 hankache I didn't know we were avoiding rakudobrew.
19:01 hankache cool then, what should I recommend?
19:01 IOninja Rakudo Star
19:01 tony-o IOninja: i'm not going to publish a module that requires an end user to use that syntax to allow something to call their method
19:02 tony-o that seems silly.
19:02 IOninja It's a tested release, both during the compiler release and during Rakudo Star release that includes all the bells and whistles a typical user would need.
19:03 IOninja tony-o: so don't?
19:03 IOninja m: class a { method l($x) { "$x".say; }; }; sub b(Callable $x){ $x.(50); }; my a $a .=new; b({$a.l: |@_});
19:03 camelia rakudo-moar c2349d: OUTPUT«50␤»
19:04 IOninja m: class a { method l($x) { "$x".say; }; }; sub b(Callable $x){ $x.(50); }; my a $a .=new; b({$a.l: $_});
19:04 camelia rakudo-moar c2349d: OUTPUT«50␤»
19:04 hankache_ joined #perl6
19:04 tony-o if i looked at module docs that showed me that syntax to push my middleware into their server stack i'd find another solution
19:04 tony-o because that's dumb.
19:05 hankache_ joined #perl6
19:05 IOninja It's 2 characters longer than the original solution you thought was the right syntax.
19:06 tony-o it's unecessarily obscure
19:06 IOninja heh
19:07 hankache_ joined #perl6
19:07 tony-o my first thought wouldn't be "i'll wrap my method with a block that calls my method with all of the args!"
19:07 hankache_ IOninja ok i'll update it
19:08 tony-o again, it's not a solution - it's a workaround at best
19:08 IOninja tony-o: but it would be "I'll use an imaginary syntax that magically passes my invocant along with the callable"?
19:09 tony-o it worked over a year ago, i didn't ask for the solution.  i asked if something changed and broke or if it was planned.
19:10 IOninja c: all class a { method l($x) { "$x".say; }; }; sub b(Callable $x){ $x.(50); }; my a $a .=new; b(&{$a.l});
19:10 tony-o so yes.  you can call it imaginary if you'd like, but you're missing the point of the actual question.
19:10 committable6 IOninja, https://gist.github.com/7a88​d848424564e5e1d370bdefc3775c
19:11 IOninja I called it imaginary because commitable showed say &(42.abs)  never returned a callable
19:11 IOninja And based on the above results your original syntax never worked.
19:12 tony-o it did work, timo or jnthn used it to hijack http connections but thanks for all of the peanut gallery help
19:13 hankache joined #perl6
19:14 IOninja Umm... You're welcome? Don't let the evidence interfere.
19:14 tony-o i think the words you're looking for are "I don't know but I enjoy arguing."
19:15 El_Che hankache: I use my own debs/rpms in my Docker images in case you're in Linux and you want prebuilt binaries
19:15 El_Che hankache: https://github.com/nxadm/rakud​o-pkg/releases/tag/2017.01_02
19:15 IOninja No, the words I was looking for is "The bot ran your code against all releases for the past 3 years and one none of them the code you think worked in the past worked. Here are three alternative solutions that do work, but feel free to ignore the evidence if you want to be a dick about it"
19:16 tony-o lol.
19:17 hankache El_Che++
19:18 AlexDaniel well, I like the way it sounds. Perhaps we can include it in committable…
19:18 El_Che hankache: of course for a Regular user, Rakudo::Star may be more applicable. But I don't have the patience to wait until the compiling is done
19:19 El_Che hankache: specially when building Docker images, in my case
19:21 El_Che hankache: the packages are just an artifact of the project meant to easily create your own packages
19:21 hankache El_Che indeed, for the sake of perl6intro.com I'll recommend R*. But I'll personally try your docker images.
19:23 El_Che hankache: the docker images is for creating the packages. But you can use the packages in reelase if you don't want to do any compiling
19:23 stmuk_ I had a PR for rakudobrew to build the last release but it was never merged and doesn't apply anymore
19:24 stmuk_ it would probably be fairly easy to fix it if anyone is interested
19:26 labster joined #perl6
19:27 hankache stmuk_ it would have, but apparently rakudobrew all together is not recommended anymore (I don't know why though). I'll just replace it with steps to install R* if this is what we recommend now.
19:33 IOninja hankache: because we found users frequently have problems with it and don't know enough about Perl 6 internals or rakudobrew itself to resolve them.
19:34 IOninja Or build dev commits
19:36 IOninja hankache: a common example is users don't know they need to run `rakudobrew rehash` when installing scripts.
19:36 IOninja So they go and mess up their $PATH trying to make the scripts visible when it's not the right solution.
19:36 tony-o IOninja++ ^ that gets filed as a bug fairly regularly
19:37 itcharlie1 left #perl6
19:37 El_Che the confusion is pretty understable. Rakudobrew was the easiest way to get perl 6.
19:38 El_Che als on rakudo page
19:39 IOninja Yeah, there's a ticket to update that page... but not enough hands to do it.
19:39 cognominal joined #perl6
19:39 El_Che IOninja: I find the non SSL donwload thing worse (I volunteered to help but no response)
19:40 moritz do we want to host the dowloads on rakudo.perl6.org instead?
19:40 IOninja +1
19:40 moritz I can easily get SSL certs for that domain
19:41 El_Che It would be great to at least mirror npq, rakudo, moarvm
19:41 tony-o i have a stable server that can mirror moritz .
19:41 El_Che everything you need to build rakudo
19:41 sanctusgray joined #perl6
19:43 Unavowed_ joined #perl6
19:45 drrho joined #perl6
19:46 hankache +1 for rakudo.perl6.org
19:49 hankache_ joined #perl6
20:00 girafe joined #perl6
20:03 hankache joined #perl6
20:06 hankache IOninja http://perl6intro.com/#_installing_perl_6 ok now?
20:10 IOninja hankache++ thanks. FWIW we have special URLs that always point to latest release, e.g. http://rakudo.org/downloads/s​tar/rakudo-star-latest.tar.gz
20:10 IOninja (though I guess they'll change if we're doing the rakudo.perl6.org thing?)
20:11 hankache i guess
20:11 andrzejku_ joined #perl6
20:13 moritz I'm populating http://rakudo.perl6.org/downloads/source/ as we speak
20:14 IOninja \o/
20:17 moritz ... now with TLS: https://rakudo.perl6.org/downloads/source/
20:17 moritz ... and complete data, if rsync is to be trusted
20:17 IOninja moritz++
20:18 hankache moritz++
20:19 hankache but I wish someone could take care of rakudo.org
20:20 hankache :(
20:22 ssotka left #perl6
20:24 El_Che thx moritz
20:25 tony-o what do you mean by take care of hankache ?
20:26 hankache tony-o enable https
20:26 moritz get an SSL cert, update wordpress to something non-ancient
20:26 hankache update wordpress erc.
20:26 rindolf joined #perl6
20:26 hankache etc.
20:26 IOninja update php
20:27 IOninja update downloads page ( https://rt.perl.org/Ticket/Displ​ay.html?id=130500#ticket-history )
20:27 El_Che moritz: can you add moarvm as well?
20:28 bjz joined #perl6
20:28 IOninja For MoarVM we can do it properly on moarvm.com no?
20:29 moritz I'd like to talk to jnthn++ first about moarvm
20:29 El_Che No SSL
20:29 IOninja El_Che: I mean here we have contact with the person who's got root to the stie
20:29 IOninja *site
20:30 El_Che (and it would be great to have everything in one place, even if source/moarvm was a redirect to a moarvm ssl page
20:30 moritz I just realize that we upload binaries for star as well
20:30 moritz maybe I should remove source/ from the URL
20:30 tony-o ah -
20:30 IOninja Sounds good. Less to type too
20:30 tony-o do you just need a CC to get an SSL cert for it or do you need the config done?
20:31 dwarring joined #perl6
20:32 hankache can't we get hold of the rakudo .org domain/
20:32 hankache ?
20:32 El_Che moritz: step 2 is hashes and/or signing
20:33 IOninja .seen pmichaud
20:33 yoleaux I saw pmichaud 15 Sep 2016 01:34Z in #perl6: <pmichaud> m: my $input = '(\d\d\d)';  my $m = 'a 123' ~~ /$0=<$input>/; say $m
20:33 hankache we can then redirect it to rakudo.perl6.org and build a new wordpress etc.
20:34 moritz we won't run a wordpress on the same host as *.perl6.org
20:34 moritz for security reasons
20:34 moritz it may run on a different host, with a proxy or something
20:35 moritz but running wordpress on the same host as where our code dowloads are is just asking for trouble
20:35 hankache moritz ok
20:35 moritz I've removed the source/ part of the URL
20:37 hankache moritz thanks
20:37 nicq20 joined #perl6
20:37 hankache i'll update perl6intro.com and perl6.org/downloads
20:37 moritz thanks ++hankache
20:37 hankache to point to the new url
20:38 dwarring r: my $r := do 42 with Nil; say $r.perl;
20:38 camelia rakudo-moar a162c4: OUTPUT«Empty␤»
20:38 camelia ..rakudo-jvm fb4f16: OUTPUT«slip()␤»
20:38 dwarring r: my $r := do 42 with Empty; say $r.perl;
20:38 camelia rakudo-moar a162c4: OUTPUT«-> ;; $_ is raw { #`(Block|81724200) ... }␤»
20:38 camelia ..rakudo-jvm fb4f16: OUTPUT«-> ;; $_ is raw { #`(Block|277551034) ... }␤»
20:39 IOninja aw shit
20:39 wamba joined #perl6
20:39 IOninja dwarring: you could add those cases to https://rt.perl.org/Ticket/Displ​ay.html?id=130798#ticket-history
20:39 IOninja (with compiles to andthen)
20:40 dwarring IOninja: will do
20:41 jnthn moritz: You wanted to talk to me? :)
20:43 moritz jnthn: yes. I'm mirroring the rakudo, nqp and star downloads on https://rakudo.perl6.org/
20:43 moritz jnthn: because we've got a valid SSL cert for that, but not for rakudo.org
20:43 jnthn moritz: Ah, OK
20:43 moritz jnthn: now people have asked for MoarVM stuff to be there too
20:44 moritz jnthn: would you mind that? and/or get an ssl cert for moarvm.org /moarvm.com?
20:44 timotimo i didn't even realize moarvm.org/.com were ssl-cert-less
20:44 jnthn moritz: Lets Encrypt lets me get free certs, yes?
20:44 moritz jnthn: yes
20:44 jnthn OK
20:44 jnthn Do you recommend the CertBot path?
20:44 moritz jnthn: and you can set up a cron to renew them automatically
20:45 moritz jnthn: that's what I use for perl6.org; painless, if a tad heavy on dependencies
20:45 timotimo moritz: do we want to put a README into rakudobrew's home folder to explain under what circumstances updates should happen?
20:46 moritz timotimo: on hack?
20:46 timotimo yup
20:46 timotimo i recently did a rebuild, and also added a module to the MODULES that was needed for doc.perl6.org
20:46 moritz timotimo: the conditions are "whenever somebody reminds moritz to do it, or whenever somebody else does it" :-)
20:46 timotimo i think the rebuild was necessary for it to work with newer Inline::Perl5 versions
20:47 timotimo oh, OK
20:47 Tonik joined #perl6
20:47 moritz timotimo: feel free to document that if you feel it's valuable
20:47 timotimo i was wondering if we wanted to guarantee some kind of version stability or so
20:47 timotimo not so important :P
20:47 moritz timotimo: and thanks for updating! :-)
20:47 timotimo sure thing!
20:47 timotimo those kinds of thing are easy to do even for me! :P
20:47 timotimo the cron job for testers.perl6.org is annoying the F out of me
20:47 timotimo i think i want to make it happen 1/3rd as often
20:48 timotimo ideally at some point it'd actually signal if there has been any changes since the last rsync
20:48 timotimo there's still some system submitting test reports
20:49 moritz timotimo: you might want to look at the perl6/doc script util/update-and-sync
20:49 timotimo but all reports have been marked NA because something somewhere changed and we didn't track the change somewhere else
20:50 moritz it does the git pull + checking if something changed in a quite reliable manner
20:52 jnthn moritz: OK, will give it a go
20:53 jnthn moritz: If you know: certbot-auto will enable (not mandate) HTTPS?
20:54 jnthn (If I just let it go to work)
20:54 IOninja Is there a way to tell if a Callable is a thunk that was automagically made?
20:55 jnthn IOninja: .WHAT === Code
20:55 IOninja Simple. Cool. Thanks.
20:55 TEttinger joined #perl6
20:58 jnthn Aww, certbot-auto somehow didn't work out
20:58 jnthn (Hasn't broken anything)
20:58 timotimo moritz: but this is about the generated html files it build, not the git codebase
20:59 kent\n joined #perl6
21:01 jnthn moritz: No worries, it asks that later, and it worked after manually restarting apache
21:01 jnthn https://www.moarvm.org/ :-)
21:02 Geth ¦ perl6.org: hankache++ created pull request #76: s/ http://rakudo.org / https://rakudo.perl6.org
21:02 Geth ¦ perl6.org: review: https://github.com/perl6/perl6.org/pull/76
21:03 timotimo oh, so we're not mirroring the wordpress instance?
21:04 moritz jnthn++
21:05 jnthn moritz++ # nudging me to do it :)
21:05 jnthn It was a lot easier than I expected :)
21:05 moritz yes, let's encrypt makes stuff really easy
21:06 moritz and with 90 days validity basically forces you to automate renewal
21:07 IOninja Wow you did it already?
21:07 IOninja Maybe I should do it on perl6.party and perl6.fail then...
21:08 jnthn Yeah, and set up the cronjob for auto-renewal already :)
21:08 El_Che who's pgp signing the rakudo releases? could he/she also sign the moarvm release?
21:08 El_Che jnthn++
21:09 moritz El_Che: whoever cuts the releases
21:09 moritz IOninja: do it, it's not hard!
21:09 El_Che moritz: so everytime it's signed by an other key?
21:09 El_Che (that would be bad)
21:09 moritz El_Che: currently yes
21:10 kaare_ joined #perl6
21:10 IOninja El_Che: well, the releases are cut by different teams on different boxes
21:11 El_Che moritz: it should be predictabe in the future, so people will bother verifying the key in automated processes
21:11 El_Che IOninja: I get that. I am looking it from the other side
21:11 IOninja El_Che: also rakudo's key is the same on all releases.
21:11 nicq20 left #perl6
21:11 IOninja El_Che: well, since some point in the past and *is* currently predictable for future releases.
21:12 El_Che 3 unique keys could work, yes
21:12 moritz El_Che: I agree, we might want to have an official signing key, and a process for doing it
21:12 AlexDaniel I didn't do anything to automate the renewal of letsencrypt certs… I wonder what does it…
21:12 moritz El_Che: but that's an automation I'm not yet willing to build
21:12 El_Che (although 1 makes more sense for the packager/user)
21:12 moritz El_Che: but I still plan to create .deb repo with a consistent signing key
21:14 El_Che moritz: automation? signing could be a 1 liner for the release manager
21:14 moritz El_Che: but then the release manager needs access to the private key, and we have potentially lots of release managers
21:15 El_Che moritz: ah, your thiking of things like Hashicorp's Vault and the like
21:16 agentzh joined #perl6
21:16 moritz El_Che: more like debian's infra where there's a keyring of developers who can all upload to a certain repo
21:16 El_Che ic
21:16 moritz El_Che: and then some automation kicks in, verifies the signature, and then signs with the official key
21:16 hankache moritz can you merge https://github.com/perl6/perl6.org/pull/76 ? thanks
21:17 Geth ¦ perl6.org: 258664bdf5 | (Naoum Hankache)++ | source/downloads/index.html
21:17 Geth ¦ perl6.org: s/ http://rakudo.org / https://rakudo.perl6.org
21:17 Geth ¦ perl6.org:
21:17 Geth ¦ perl6.org: moritz++
21:17 Geth ¦ perl6.org: review: https://github.com/perl6/p​erl6.org/commit/258664bdf5
21:17 moritz hankache: sure, done
21:17 IOninja hankache: you should have perms to merge yourself.
21:18 hankache moritz thanks
21:18 hankache IOninja unfortunately i don't
21:18 zakharyas joined #perl6
21:18 IOninja hankache: sent an invite.
21:20 El_Che Adapted the rakudo-pkg to use the SSL download links. Thx moritz++ and jnthn++
21:20 hankache IOninja thanks
21:21 faraco joined #perl6
21:21 faraco Do anyone here an experience making a compiler?
21:21 IOninja :)
21:22 IOninja Yes, several people have. Why?
21:25 faraco Just want to know...how difficult are they to implement? I want to learn to make one, but it seems I'm stuck at parsing. I do not really understand the lexical analysis and the syntax analysis very well. Even if I did understand it, I'm not sure making your own parser is a good idea for learning, and I'm thinking on using mpc parser combinator for a start (i have a bit experience making weird lisp interpreter with it)
21:26 perlpilot faraco: "how difficult" totally depends on how difficult you make it :)
21:26 IOninja faraco: you could try the Rakudo Internals Course: http://edumentab.github.io/rak​udo-and-nqp-internals-course/
21:26 faraco and the most magical part to me is, the object code generation (where you can target assembly or virtual machine code, if I'm not mistaken)
21:26 moritz lol, I accidentally synchronized the rakudo/nqp etc downloads through my mobile phone
21:27 moritz had forgotten I had tethering enabled
21:27 IOninja faraco: I built a small language in a couple of days with it: https://github.com/perl7/perl7
21:27 IOninja moritz: ouch
21:27 faraco IOninja, that is really coool!
21:27 IOninja I hope you have a better data plan than I do....
21:27 moritz 2.5gb in <1h.
21:27 moritz IOninja: yes, much more than I need, (employer pays)
21:27 IOninja phew :)
21:28 moritz faraco: in some sense, compilers are among the simplest programs, because they just receive a text file as input and output some text or binary data
21:28 faraco perpilot: I want to make it easy by using the parsinh combinator, but I have this feelinh where I'm afraid if 'skipped' the essential part on making a compiler.
21:28 moritz doesn't need to be parallel/concurrent/async/whatever
21:29 sena_kun faraco, I did(just a little bit, though). If you know any functional language, you can try Peyton Jones tutorial. "How difficult" is mostly depend on how fast/well-featured compiler(and base language) you want to have. Some simple language can be written very easily, but if you need something harder... It will be harder.
21:29 moritz faraco: you can always go back later and implement a different parser
21:29 cpage joined #perl6
21:29 moritz faraco: but it's also good not to have too many moving parts in the beginning
21:30 jnthn Writing an interpreter is also a good stepping stone
21:30 moritz faraco: btw the thing that made compiler building "click" for me was http://compilers.iecc.com/crenshaw/
21:30 faraco moritz: moving parts? for example?
21:30 sena_kun Parsing is a cool part, but not essential, I think. Code-generation(or writing your own evaluator) is where the fun is.
21:30 moritz faraco: parts that you don't know how to approach
21:30 moritz http://compilers.iecc.com/crenshaw/ is really old-fashioned, but a *very* simple and straight-forward approach to build a compiler
21:31 faraco sena_kun: glad to hear that :)
21:31 timotimo probably the most important thing to know for compilers is things that are structured in trees
21:31 * hobbs thinks parsing is fun :)
21:31 * perlpilot too
21:32 * sena_kun too
21:32 perlpilot timotimo: you mean lists  ;>
21:32 gdonald joined #perl6
21:33 moritz and soon you'll find out that dynamic scoping in the compiler corresponds to lexical scoping in the program you're compiling
21:33 agentzh joined #perl6
21:34 faraco timotimo: taking that as a note :D
21:35 perlpilot faraco: another important thing is that parsing happens in one direction, but you often need to pass information in the other direction.   The tree-nature helps in this regard.
21:35 faraco moritz: that is fascinating. I'm actually do no really understand the real deal with lexical scoping (even some already explained it to me), hoping by making this compiler helps me reveal the mysteries about programming languages in general.
21:37 pyrimidi_ joined #perl6
21:38 timotimo nested lists!
21:38 moritz faraco: that's actually a good approach to learn it
21:38 perlpilot faraco: when I was younger I had the Dragon book and Compiler Design in C and a few others.  Each book approached the problem from a different perspective.  Some theoretical, some pragmatic.   It helps you put things together when you can look at the same problem from different sides.
21:39 moritz faraco: oh, and I highly recommend you write your compiler in Perl 6, and use Perl 6's awesome grammars for parsing
21:39 lizmat joined #perl6
21:39 faraco perlpilot: hmm, maybe I need to research more about AST and the tree parsing part before using a parser combinator. I read that in the second chapter in the dragon book, where if I'm not mistaken, the postfix tree is like backward lisp.
21:42 * moritz puts "Writing a Compiler in Perl 6" on his lists of books to write
21:43 faraco moritz: I have a thought in using Perl 6 too, I'm very sure it is good at these stuff when I saw the grammar parsing example (in the docs I believe).
21:43 perlpilot moritz: that would be a great book!
21:43 moritz perlpilot: with maybe 5 readers world wide! :-)
21:44 faraco the first reader will be me :D
21:46 perlpilot In the late 1980s there was some tutorial on compiler writing that I downloaded from a BBS.  I don't remember the name of the tutorial, but that was the first time I tried making my own compiler.  I have fond memories of trying to make a compiler in Pascal then.  (I was so young!)
21:47 wamba joined #perl6
21:47 bjz joined #perl6
21:52 perlpilot moritz: if you could somehow couple it with "How to modify the Perl 6 language"  or "Writing a DSL in Perl 6" or something related, you could have way more than 5 readers :)
21:53 moritz perlpilot: yes, 10
21:53 moritz perlpilot: of which 5 are beta readers :-)
21:54 * moritz should temper his sarcasm
21:54 tbrowder jnthn: which client did you use for Letsencrypt cert automation?
21:54 moritz tbrowder: it seems he used certbot
21:54 jnthn Yes, certbot
21:55 jnthn Just followed the instructions on that page
21:55 wamba joined #perl6
21:55 jnthn https://certbot.eff.org/
21:56 moritz I used to use simp_le, but it stopped working some months ago
22:01 sena_kun faraco, I can be late, but it is hard for me to advice Dragon book. Of course, I don't have decades of experience, but when I tried to read it, it was really hard for me to wrap my head around, especially with parsing part. I'm sure there are simplier tutorials(not a large book) around. Dragon book can be good if you have some foundation already.
22:06 faraco sena_kun: I too admit that I feel the book is a bit more advanced than I expected. It seems it was targeted for CS major undergraduates. Before the dragon book, I also have tried the Let's make a compiler book. Unfortunately it is in Pascal (I'm hoping for C), that I touched for a couple of times, so far with freepascal (I don't remember if the first program is compilef and working)
22:13 tbrowder jnthn: moritz: thanks. the problem i've been having is automation when you have a new domain without an active server, seems to need standalone certification. certbot can't handle it, and client acme.sh has done the best for me.  documentation of behind-the-scenes stuff is awkward but i think i have a solution and am well on the way to having a working p6
22:13 tbrowder specialized client wrapper to do what i need. basically i use acme.sh driven by my wrapper to always do an original issue only when needed and use my wrapper to do the cron job, etc.  the standalone method requires me to shutdown apache for a few minutes and i choose about 0300 local time, and only once per day.  when i check the certs at cron time, i read
22:13 tbrowder the expiration date of all certs, then issue ones needed, and copy new files into place. then restart apache and check that all is well--cron job finished. life would be easier with a dns registrar with a better API to do direct domain validation, but namecheap doesn't have a fine-grained API yet (although i just sent them a feature request this morning).
22:16 bjz_ joined #perl6
22:17 sena_kun faraco, is this "Let's make a compiler" a Wirth's book? I tried it too and it was a lot more compact comparing to Dragon book, but yes, Pascal somewhat complicated things. As I wrote before, you can "mostly" safely skip parsing part, since there are many different concepts that are importaint to reason about how languages work. But in my opinion, when you for a half of night debug infinite loops because of a buggy reduction strategy it is
22:17 sena_kun worse than when you work with a parser. :) Anyway, good luck with it! It's time to go to bed already~ 'night, #perl6.
22:19 faraco sena-kun: ty for the advice. later.
22:39 IOninja oh, totally forgot I ran updater script for perl6.wtf a few days back... Seems the coverage script is still busted. Says everything's uncovered.
22:41 IOninja "Use of uninitialized value of type Any in numeric context" in nqp/MoarVM/tools/parse_coverage_report.p6 lines 88, 91, and 168
22:46 timotimo did the update to the moar pr work? i force-pushed it so maybe you have to git reset --hard into/onto it
22:47 romrador joined #perl6
22:47 IOninja I think it did. My script fresh-clones everything.
22:48 timotimo ok
22:51 IOninja wow, https://certbot.eff.org/ is sure painless.
22:51 IOninja https://perl6.party https://perl6.fail https://perl6.wtf all set up with a single run :)
22:52 moritz IOninja++
22:54 timotimo nice
23:09 IOninja heh... I hope this person on TPM's mailing list knows what the latest game in town is :) http://mail.pm.org/pipermail/toro​nto-pm/2017-February/003917.html
23:09 * IOninja will never understand the appeal of Monty Python stuff...
23:10 diakopter IOninja: that post seems like a troll/joke post
23:10 timotimo a bit, yeah
23:10 IOninja :)
23:23 tbrowder certbot may be painless for a "standard" server set up, but try it with a virgin domain (no server) and custom httpd.conf--i would love to hear cookbook details.
23:24 IOninja I started with a plain Debian install.
23:25 b7j0c joined #perl6
23:26 b7j0c constant V = 'x'; my %h = V => 'a';
23:26 IOninja m: constant V = 'x'; my %h = V => 'a';
23:26 camelia rakudo-moar ffae3f: ( no output )
23:26 IOninja m: constant V = 'x'; my %h = V => 'a'; say %h
23:26 camelia rakudo-moar ffae3f: OUTPUT«{V => a}␤»
23:26 IOninja m: constant V = 'x'; my %h = V => 'a'; say %h.keys
23:26 camelia rakudo-moar ffae3f: OUTPUT«(V)␤»
23:26 b7j0c hashes and constants seem to confuse each other
23:26 AlexDaniel wtf
23:26 AlexDaniel m: constant V = 'x'; my %h = V => 'a'; say %h.keys[0].WHAT
23:26 camelia rakudo-moar ffae3f: OUTPUT«(Str)␤»
23:27 AlexDaniel m: constant V = 'x'; my %h = V => 'a'; dd %h.keys[0]
23:27 camelia rakudo-moar ffae3f: OUTPUT«"V"␤»
23:27 AlexDaniel riiiiight
23:27 IOninja That's not the only place even.
23:27 IOninja m: sub e { 42 }; say e + 2
23:27 camelia rakudo-moar ffae3f: OUTPUT«4.71828182845905␤»
23:27 geekosaur => still retains some fraction of perl 5's autoquote behavior
23:27 IOninja mhm
23:27 AlexDaniel m: constant V = 'x'; my %h = (V) => 'a'; dd %h
23:27 camelia rakudo-moar ffae3f: OUTPUT«Hash %h = {:x("a")}␤»
23:27 IOninja m: constant V = 'x'; my %h = V, 'a'; say %h
23:27 camelia rakudo-moar ffae3f: OUTPUT«{x => a}␤»
23:27 AlexDaniel m: constant V = 'x'; my %h = $V => 'a'; dd %h
23:27 camelia rakudo-moar ffae3f: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '$V' is not declared␤at <tmp>:1␤------> 3constant V = 'x'; my %h = 7⏏5$V => 'a'; dd %h␤»
23:28 b7j0c but %h{VV} = 'a' works
23:28 geekosaur m: constant V = 'x'; my %h = +V => 'a'; dd %h.keys[0]
23:28 camelia rakudo-moar ffae3f: OUTPUT«Cannot resolve caller Numeric(Pair: ); none of these signatures match:␤    (Mu:U \v: *%_)␤  in block <unit> at <tmp> line 1␤␤»
23:28 geekosaur whoops
23:28 AlexDaniel m: constant V = 'x'; my %h = ~V => 'a'; dd %h
23:28 camelia rakudo-moar ffae3f: OUTPUT«Odd number of elements found where hash initializer expected:␤Only saw: "V\ta"␤  in block <unit> at <tmp> line 1␤␤»
23:28 IOninja heh
23:28 geekosaur m: constant V = 'x'; my %h = ~V => 'a'; dd %h.keys[0]
23:28 camelia rakudo-moar ffae3f: OUTPUT«Odd number of elements found where hash initializer expected:␤Only saw: "V\ta"␤  in block <unit> at <tmp> line 1␤␤»
23:28 geekosaur just because one p5ism works doesn;t mean they all do... feh
23:28 AlexDaniel but that's an interesting gotcha
23:29 b7j0c this bugs me....if i say V is a constant, i should get the constant back where i use 'V' or get perl6 telling me i am a bad boy
23:29 IOninja heh
23:29 b7j0c weird silent fail
23:29 IOninja b7j0c: well, => auto-quotes. So it just auto-quoted your V
23:29 IOninja There's no silent fail.
23:29 TimToady m: say pi => 3
23:29 camelia rakudo-moar ffae3f: OUTPUT«Unexpected named argument 'pi' passed␤  in block <unit> at <tmp> line 1␤␤»
23:29 IOninja Just ambiguity.
23:29 * geekosaur is not sure => should autoquote any more, tbh. also precedence of unary ~ is evidently wrong for breaking the autoquote
23:30 b7j0c it isn't even consistent though...if i use the hash differently, it replaces the constant like i want
23:30 jnthn It's a purely syntactic distinction. An identifier before => autoquotes.
23:30 b7j0c perl6 silently uses a different key in two supported methods for setting a hash value
23:30 IOninja b7j0c: but it's not about the hash at all, it's about `=>` operator. In the places where it works you're not using `=>`
23:30 AlexDaniel https://github.com/perl6/doc/issues/1201
23:31 AlexDaniel we can talk about it on my favorite page :)
23:31 AlexDaniel https://docs.perl6.org/language/traps
23:31 IOninja heh
23:31 b7j0c i'm not feeling the TMTOWTDI moment here, more like "dude where's my car"
23:31 IOninja AlexDaniel: PS on your PR: I'd want more devs to comment on it.
23:32 AlexDaniel IOninja: sure thing
23:32 IOninja b7j0c: well, put another way. my %h = a => 42, b => 42, e => 72; would break if it willy-nilly used the constants.
23:32 IOninja Because core has `e` as a constant
23:33 IOninja b7j0c: use (V) if you meant the V. Or better still, use a proper sigil with your constant
23:33 AlexDaniel it saddens me a bit that just because some tiny wrong change was overlooked before Christmas we now have to jump through all of the hoops to get it fixed… but that's understandable
23:34 IOninja b7j0c: it's basically an ambiguity. IMO universally assuming the programmer meant a string there is less surprising.
23:34 jnthn This partiuclar one was discussed to death well before that.
23:34 b7j0c yeah i will use a sigil....but i still feel perl6 silently proceeding here is wrong....the constant without a sigil is also supported
23:34 TimToady it is working as designed
23:34 IOninja jnthn: I think AlexDaniel refers to the PR about removing @a = 42, @a; error
23:35 IOninja which is blocked by a roast test
23:35 jnthn IOninja: Ah, that one needs more thought. I wasn't entirely sold on that idea when it went it.
23:35 Guest89748 joined #perl6
23:36 lep-delete joined #perl6
23:36 AlexDaniel we definitely need something to prevent VMNulls from appearing there
23:36 AlexDaniel oh wait, VMNulls are actually not related to that PR…
23:36 AlexDaniel but still
23:37 IOninja m: constant V = 'x'; dd [ ::V => 42 ]
23:37 camelia rakudo-moar ffae3f: OUTPUT«[:x(42)]␤»
23:37 IOninja b7j0c: another variant ^ to tell it you meant the constant
23:39 kurahaupo__ joined #perl6
23:39 IOninja m: constant V = 'x'; dd [ Pair.new(V, 42) ]
23:39 camelia rakudo-moar ffae3f: OUTPUT«[:x(42)]␤»
23:39 IOninja m: constant V = 'x'; dd [ (V) => 42 ]
23:39 camelia rakudo-moar ffae3f: OUTPUT«[:x(42)]␤»
23:39 IOninja m: constant V = 'x'; dd [ V.self => 42 ]
23:39 camelia rakudo-moar ffae3f: OUTPUT«[:x(42)]␤»
23:41 TimToady m: constant V = 'x'; dd [ V [=>] 42 ]
23:41 camelia rakudo-moar ffae3f: OUTPUT«[:x(42)]␤»
23:41 IOninja :o
23:41 IOninja TimToady++
23:41 TimToady m: constant V = 'x'; dd [ V Z=> 42 ]
23:41 camelia rakudo-moar ffae3f: OUTPUT«[:x(42)]␤»
23:41 AlexDaniel m: constant V = ‘x’; my %h = 42 R=> V; say %h
23:41 camelia rakudo-moar ffae3f: OUTPUT«{x => 42}␤»
23:41 AlexDaniel :P
23:41 IOninja hah
23:41 TimToady m: constant V = 'x'; dd [ V RR=> 42 ]
23:41 camelia rakudo-moar ffae3f: OUTPUT«[:x(42)]␤»
23:41 AlexDaniel right!
23:41 AlexDaniel haha :D
23:43 AlexDaniel by the way
23:44 AlexDaniel m: constant V = ‘x’; my %h = ~V => 42
23:44 b7j0c is there anything like "gofmt" for perl6? i always wonder if my layout is idiomatic
23:44 camelia rakudo-moar ffae3f: OUTPUT«Odd number of elements found where hash initializer expected:␤Only saw: "V\t42"␤  in block <unit> at <tmp> line 1␤␤»
23:44 AlexDaniel what is this error message talking about?
23:44 AlexDaniel What's “V\t42”?
23:44 AlexDaniel V and 42 I can see, but \t ?
23:44 TimToady pairs stringify with a tab
23:45 AlexDaniel b7j0c: not sure, perhaps check out https://github.com/jaffa4/perl6format ?
23:46 b7j0c oh cool, i'll check that out
23:47 AlexDaniel TimToady: right! Indeed
23:48 geekosaur which is why I mentioned precedence wrt the ~
23:48 TimToady m: constant V = 'x'; dd [ V<> => 42 ]
23:48 camelia rakudo-moar ffae3f: OUTPUT«[:x(42)]␤»
23:49 AlexDaniel m: put (V => 42).gist
23:49 camelia rakudo-moar ffae3f: OUTPUT«V => 42␤»
23:49 AlexDaniel m: put (V => 42).Str
23:49 camelia rakudo-moar ffae3f: OUTPUT«V    42␤»
23:49 AlexDaniel m: put (V => 42).perl
23:49 camelia rakudo-moar ffae3f: OUTPUT«:V(42)␤»
23:50 AlexDaniel ah, I stringified it myself
23:50 * AlexDaniel hides
23:52 jnthn 'night, #perl6
23:52 IOninja night

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

Perl 6 | Reference Documentation | Rakudo