Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-02-03

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 brokenchicken Mithaldu: hehehe, so you mean I should be expecting a PR from you soon? :)
00:00 Mithaldu for REPL?
00:00 brokenchicken Yes, we still have postfix if and unless
00:01 Mithaldu doing it as we speak
00:01 Mithaldu excellent
00:01 brokenchicken Mithaldu: yes :)
00:01 brokenchicken Wooo \o/
00:01 Mithaldu what does but do, for dummies?
00:01 brokenchicken Mithaldu: clones the object and mixes in a role into the clone
00:01 Mithaldu oh ok, so it's like a + only on the OO layer
00:01 brokenchicken And if not a role is given, then it makes one with the .^name method returning the thing given
00:02 Mithaldu i.e. return $self but FallbackBehavior; will ALWAYS return
00:02 brokenchicken m: say True but role { method gist { 'tis False' } }
00:02 camelia rakudo-moar f2894d: OUTPUT«tis False␤»
00:02 Mithaldu neat
00:02 brokenchicken m: say True but False; # role got a Bool method which is used for producing .gist
00:02 camelia rakudo-moar f2894d: OUTPUT«False␤»
00:02 brokenchicken Yeah, that'll always return
00:03 Mithaldu excellent
00:03 Mithaldu i'm only tidying it, but i hope it'll be of some use
00:04 Mithaldu ok, reading docs, but wile i do, is there a quick way to negate this check? if %editor-to-mixin{$line-editor} -> $mixin {
00:05 Mithaldu oh i see, negating it would be nonsensical
00:07 brokenchicken You can run `TEST_JOBS=8 make spectest` to run the spectest and ensure your changes don't break anything (if you're unable to do so, mention it on the PR so the person merging it does it)
00:07 * brokenchicken leaves to play video games
00:07 Mithaldu can't run tests, will mention
00:16 BenGoldberg joined #perl6
00:21 Mithaldu brokenchicken: when you feel like having a look: https://github.com/rakudo/rakudo/pull/1011/files?diff=split
00:22 cdg joined #perl6
00:28 pyrimidine joined #perl6
00:33 DarthGandalf joined #perl6
00:35 BenGoldberg . o O (Rakudo Star == 🐫道⋆ ?)
00:41 BenGoldberg joined #perl6
00:43 BenGoldberg m: my @foo; @foo.shift; 'ok'.say;
00:43 camelia rakudo-moar 6e9d08: OUTPUT«Cannot shift from an empty Array␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
00:43 BenGoldberg m: my @foo; @foo.splice(0,1); 'ok'.say;
00:43 camelia rakudo-moar 6e9d08: OUTPUT«ok␤»
00:43 BenGoldberg m: my @foo; @foo.splice(0,10); 'ok'.say;
00:43 camelia rakudo-moar 6e9d08: OUTPUT«ok␤»
00:43 BenGoldberg m: my @foo; dd @foo.splice(0,10); 'ok'.say;
00:44 camelia rakudo-moar 6e9d08: OUTPUT«Array @foo = []␤ok␤»
00:44 * BenGoldberg wonders why it doesn't complain.
01:05 * brokenchicken wonders why .shift complains :P
01:11 brokenchicken Mithaldu++ thanks. Merged. Left some comments on the PR if you ever feel up for that second pass :)
01:12 BenGoldberg It doesn't precisely complain, it returns a failure, which complains.
01:12 brokenchicken heh, looks like GitHub reviews got a bug in 'em. If you edit a comment you made before submitting your review, when you submit it your edit won't make it
01:23 BenGoldberg m: use NativeCall; use MONKEY-TYPING; augment class Signal { method raise() is native { * } }; SIGUSR1.raise;
01:23 camelia rakudo-moar 6e9d08: OUTPUT«Unknown type Signal used in native call.␤If you want to pass a struct, be sure to use the CStruct or␤CPPStruct representation.␤If you want to pass an array, be sure to use the CArray type.␤  in sub type_code_for at /home/camelia/rakudo-m-inst-2/sha…»
01:26 cibs joined #perl6
01:27 BenGoldberg m: use NativeCall; use MONKEY-TYPING; sub raise(Signal) is native { * } }; raise(SIGUSR1);
01:27 camelia rakudo-moar 6e9d08: OUTPUT«5===SORRY!5===␤Unexpected closing bracket␤at <tmp>:1␤------> 3PING; sub raise(Signal) is native { * } 7⏏5}; raise(SIGUSR1);␤Other potential difficulties:␤    In 'raise' routine declaration - Not an accepted NativeCall type for parameter…»
01:27 BenGoldberg m: use NativeCall; use MONKEY-TYPING; sub raise(Signal) is native { * }; raise(SIGUSR1);
01:27 camelia rakudo-moar 6e9d08: OUTPUT«Potential difficulties:␤    In 'raise' routine declaration - Not an accepted NativeCall type for parameter [1]  : Signal␤     --> For Numerical type, use the appropriate int32/int64/num64...␤    at <tmp>:1␤    ------> 3YPING; sub raise(Signal) is …»
01:27 BenGoldberg m: use NativeCall; use MONKEY-TYPING; sub raise((Int)) is native { * }; raise(SIGUSR1);
01:27 camelia rakudo-moar 6e9d08: OUTPUT«Potential difficulties:␤    In 'raise' routine declaration - Not an accepted NativeCall type for parameter [1]  : Any␤     --> For Numerical type, use the appropriate int32/int64/num64...␤    at <tmp>:1␤    ------> 3TYPING; sub raise((Int)) is nat…»
01:27 BenGoldberg m: use NativeCall; use MONKEY-TYPING; sub raise(Int) is native { * }; raise(SIGUSR1);
01:27 camelia rakudo-moar 6e9d08: OUTPUT«(signal PWR)Potential difficulties:␤    In 'raise' routine declaration - Not an accepted NativeCall type for parameter [1]  : Int␤     --> For Numerical type, use the appropriate int32/int64/num64...␤    at <tmp>:1␤    ------> 3Y-TYPING; sub raise…»
01:27 BenGoldberg m: use NativeCall; use MONKEY-TYPING; sub raise(int32) is native { * }; raise(SIGUSR1);
01:27 camelia rakudo-moar 6e9d08: OUTPUT«(signal PWR)»
01:28 gdonald joined #perl6
01:29 BenGoldberg m: use NativeCall; Signal.^add_method('raise', sub raise(int32) is native { * }); Signal.^compose; SIGUSR1.raise;
01:29 camelia rakudo-moar 6e9d08: OUTPUT«(signal PWR)»
01:30 BenGoldberg \o/
01:30 BenGoldberg m: use NativeCall; Signal.^add_method('raise', sub raise(int32) is native { * }); Signal.^compose; SIGUSR2.raise;
01:30 camelia rakudo-moar 6e9d08: OUTPUT«(signal SYS)»
01:30 BenGoldberg native ... methods.
01:31 travis-ci joined #perl6
01:31 travis-ci Doc build passed. Altai-man 'First stage of examples reworking in Language/ directory'
01:31 travis-ci https://travis-ci.org/perl6/doc/builds/197815557 https://github.com/perl6/doc/compare/b729c9650512^...9fc71c30c2b9
01:31 travis-ci left #perl6
01:33 bwisti joined #perl6
01:36 BenGoldberg m: use NativeCall; Signal.^add_method('raise', sub raise(int32) is native { * }); Signal.^compose; dd Signal.^method_table;
01:36 camelia rakudo-moar f24968: OUTPUT«{:ACCEPTS(method ACCEPTS (Mu $: | is raw) { #`(Method|69832168) ... }), :CALL-ME(method CALL-ME (Signal $: | is raw) { #`(Method|69833536) ... }), :Int(method Int (Cool $: | is raw) { #`(Method|69832472) ... }), :Numeric(method Numeric (Mu $: | is raw) { #…»
01:36 BenGoldberg m: use NativeCall; Signal.^add_method('raise', sub raise(int32) is native { * }); Signal.^compose; dd Signal.^method_table<raise>;
01:36 camelia rakudo-moar f24968: OUTPUT«Sub+{NativeCall::Native[Sub,Str]} raise = sub raise (int32 $) { #`(Sub+{NativeCall::Native[Sub,Str]}|82940032) ... }␤»
01:36 BenGoldberg m: use NativeCall; dd sub raise(int32) is native { * };
01:36 camelia rakudo-moar f24968: OUTPUT«Sub+{NativeCall::Native[Sub,Str]} raise = sub raise (int32 $) { #`(Sub+{NativeCall::Native[Sub,Str]}|75562304) ... }␤»
01:38 * BenGoldberg is now wondering why it's spelt method_table instead of method-table.
01:39 moritz all the backend stuff uses _ rather than -
01:39 moritz probably because some of that is implemented in C, which doesn't like - in identifiers
01:40 TimToady we also tend to use it culturally to mean "not really user-facing"
01:40 TimToady .oO(not_really_user_facing)
01:41 BenGoldberg Ok, got it :)
01:49 TimToady m: sub Here_be_dragons:__-ˉˉˉ-__ {}; say Here_be_dragons:__-ˉˉˉ-__
01:49 camelia rakudo-moar f24968: OUTPUT«Nil␤»
01:51 kurahaupo joined #perl6
01:57 brokenchicken 0.o
01:57 brokenchicken m: sub fˉf {}; say fˉf
01:57 camelia rakudo-moar f24968: OUTPUT«Nil␤»
01:57 brokenchicken TIL that's a valid identifier char :S
01:58 f3ew joined #perl6
01:59 TimToady m: constant piˊ = 3;  say piˊ
01:59 camelia rakudo-moar f24968: OUTPUT«3␤»
01:59 skids joined #perl6
02:00 TimToady m: constant piʹ = 3;  say piʹ
02:00 camelia rakudo-moar f24968: OUTPUT«3␤»
02:00 brokenchicken u: ˊ
02:00 unicodable6 brokenchicken, U+02CA MODIFIER LETTER ACUTE ACCENT [Lm] (ˊ)
02:00 astj joined #perl6
02:01 TimToady u: ʹ
02:01 unicodable6 TimToady, U+02B9 MODIFIER LETTER PRIME [Lm] (ʹ)
02:01 TimToady probably more appropriate
02:01 brokenchicken u: modifier
02:01 unicodable6 brokenchicken, U+02B0 MODIFIER LETTER SMALL H [Lm] (ʰ)
02:01 unicodable6 brokenchicken, U+02B1 MODIFIER LETTER SMALL H WITH HOOK [Lm] (ʱ)
02:01 unicodable6 brokenchicken, https://gist.github.com/eea49be7ab92dcfd5e26aaddc8d60188
02:02 TimToady alas, all the mathematical primes are not considered letters
02:03 brokenchicken m: my $xꜜ = 42; say $xꜜ
02:03 camelia rakudo-moar f24968: OUTPUT«42␤»
02:03 brokenchicken muahaha
02:04 brokenchicken m: class { has $!ꜝ = 42 ; method ꜝ { $!ꜝ.say } }.new.ꜝ
02:04 camelia rakudo-moar f24968: OUTPUT«42␤»
02:06 TimToady pity they never read the Cat in the Hat, or there'd be moar of 'em
02:06 Vynce joined #perl6
02:06 brokenchicken m: constant ˮ = 'in the Hat'; say “cat” ~ ˮ
02:06 camelia rakudo-moar f24968: OUTPUT«catin the Hat␤»
02:06 brokenchicken muahaha :D
02:10 pyrimidine joined #perl6
02:10 TimToady .oO("Great fleas have little fleas upon their backs to bite 'em, And little fleas have lesser fleas, and so ad infinitum. And the great fleas themselves, in turn, have greater fleas to go on, While these again have greater still, and greater still, and so on.")
02:11 brokenchicken m: constant ˮ = “ˮ”; say ˮ ~ ˮ
02:11 camelia rakudo-moar f24968: OUTPUT«ˮˮ␤»
02:11 brokenchicken ^_^
02:11 TimToady we realy need recursive characters...
02:12 KDr2 joined #perl6
02:12 cpage_ joined #perl6
02:13 TimToady y'know, we'll probably never have an obfuscated Perl 6 contest, 'cuz with Unicode it's too dang easy :)
02:13 brokenchicken :}
02:13 cpage_ joined #perl6
02:17 TimToady m: !!! !‚’i
02:17 camelia rakudo-moar f24968: OUTPUT«True␤  in block <unit> at <tmp> line 1␤␤»
02:17 labster joined #perl6
02:18 brokenchicken :)
02:19 SmokeMachine m: role R[Any ::T] {has T $.t}; say R[Int].new.clone # shouldn't T be Int? Int has .clone()
02:19 camelia rakudo-moar f24968: OUTPUT«No such method 'perl' for invocant of type 'T'␤  in block <unit> at <tmp> line 1␤␤»
02:19 SmokeMachine m: say 42.perl # I mean: Int has .perl()
02:19 camelia rakudo-moar f24968: OUTPUT«42␤»
02:23 SmokeMachine m: role R[::T] {has T $.t}; say R[Int].new.clone
02:23 camelia rakudo-moar f24968: OUTPUT«No such method 'perl' for invocant of type 'T'␤  in block <unit> at <tmp> line 1␤␤»
02:23 SmokeMachine m: role R[::T] {has T $.t}; say R[Int].new.clone: :42t
02:23 camelia rakudo-moar f24968: OUTPUT«R[Int].new(t => 42)␤»
02:24 SmokeMachine m: role R[::T] {has T $.t}; say R[Int].new.t.perl
02:24 TimToady m: role R[::T] {has T $.t}; say R[Int].new
02:24 camelia rakudo-moar f24968: OUTPUT«No such method 'perl' for invocant of type 'T'␤  in block <unit> at <tmp> line 1␤␤»
02:24 camelia rakudo-moar f24968: OUTPUT«No such method 'perl' for invocant of type 'T'␤  in block <unit> at <tmp> line 1␤␤»
02:24 SmokeMachine twice?
02:24 SmokeMachine m: role R[::T] {has T $.t}; say R[Int].new.t.perl
02:24 camelia rakudo-moar f24968: OUTPUT«No such method 'perl' for invocant of type 'T'␤  in block <unit> at <tmp> line 1␤␤»
02:24 SmokeMachine m: role R[::T] {has T $.t}; say R[Int].new.t
02:24 camelia rakudo-moar f24968: OUTPUT«No such method 'gist' for invocant of type 'T'␤  in block <unit> at <tmp> line 1␤␤»
02:25 SmokeMachine shouldn't it be Int?
02:25 SmokeMachine m: role R[::T] {has T $.t}; say R[42].new.t
02:25 camelia rakudo-moar f24968: OUTPUT«No such method 'gist' for invocant of type 'T'␤  in block <unit> at <tmp> line 1␤␤»
02:25 TimToady yes, it's not rewriting all the generic bits like it should
02:25 TimToady I suspect there's already a bug report for this
02:27 SmokeMachine TimToady: yes... it looks like this one: https://rt.perl.org/Public/Bug/Display.html?id=125200
02:27 SmokeMachine TimToady: Sorry I should had search there before ask that here...
02:27 TimToady obviously we just don't have enough instantiations of the generic jnthn :)
02:29 SmokeMachine TimToady: thanks!
02:29 pyrimidine joined #perl6
02:34 pyrimidine joined #perl6
02:38 adu joined #perl6
02:47 ilbot3 joined #perl6
02:47 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:48 raiph joined #perl6
03:08 Geth ¦ doc/master: 4 commits pushed by Altai-man++, (Wenzel P. P. Peppmeyer)++
03:08 Geth ¦ doc/master: b729c96505 | Make extract-examples script recognize `only` token and add an exclude list for Language/ section…
03:08 Geth ¦ doc/master: 9fc71c30c2 | First stage of examples reworking in Language/ directory…
03:08 Geth ¦ doc/master: 32b2eb8571 | Merge branch 'master' into language-section-examples…
03:08 Geth ¦ doc/master: d110c0e06c | Merge pull request #1176 from perl6/language-section-examples…
03:08 Geth ¦ doc/master: review: https://github.com/perl6/doc/compare/af89aa5b1b...d110c0e06c
03:17 MasterDuke brokenchicken: maybe it's just me, but i find the `…` at the end of the commit messages make me think they're being truncated
03:18 adu joined #perl6
03:27 eater joined #perl6
03:28 kent\n joined #perl6
03:35 pyrimidine joined #perl6
03:36 noganex_ joined #perl6
03:40 cibs joined #perl6
03:44 xtreak joined #perl6
03:55 aindilis joined #perl6
04:02 cibs joined #perl6
04:07 cdg_ joined #perl6
04:17 cdg joined #perl6
04:29 dugword joined #perl6
04:31 labster joined #perl6
04:40 mspo man golang has this editor stuff down
04:40 mspo guru and the other thing
04:41 pyrimidi_ joined #perl6
04:47 adu joined #perl6
04:57 Cabanoss- joined #perl6
05:00 dugword joined #perl6
05:01 astj joined #perl6
05:13 xtreak joined #perl6
05:29 xtreak joined #perl6
05:35 pyrimidi_ joined #perl6
05:42 dj_goku Does anyone have any experience with nativecall and .a files?
05:43 Tonik joined #perl6
05:47 masak dj_goku: I sense a question behind that question that you're waiting to ask if someone says "yes" :)
05:48 masak suggest asking that question to speed things up
05:48 masak meanwhile...
05:48 masak what's a nice, idiomatic way to say "only run this code once" in Perl 6
05:48 masak m: for 1..3 { .say; once { say "OH HAI" } }
05:48 camelia rakudo-moar f24968: OUTPUT«1␤OH HAI␤2␤3␤»
05:48 masak wow :)
05:49 masak m: for 1..3 { .say; once say "OH HAI" }
05:49 camelia rakudo-moar f24968: OUTPUT«1␤OH HAI␤2␤3␤»
05:49 masak m: sub foo { for 1..3 { .say; once say "OH HAI" } }; foo(); foo()
05:49 camelia rakudo-moar f24968: OUTPUT«1␤OH HAI␤2␤3␤1␤OH HAI␤2␤3␤»
05:49 dj_goku masak: haha you are correct.
05:50 masak hm, so it's not once per program, it's once per surrounding invocation of the code?
05:50 masak how do I say once per program? :)
05:51 masak m: sub foo { for 1..3 { .say; say "OH HAI" unless $++ } }; foo(); foo()
05:51 camelia rakudo-moar f24968: OUTPUT«1␤OH HAI␤2␤3␤1␤OH HAI␤2␤3␤»
05:51 masak g'ah :)
06:00 rurban joined #perl6
06:00 aindilis joined #perl6
06:00 cpage_ joined #perl6
06:01 dj_goku masak: I have done some googling/irc log searching, but it doesn't seem to be possible.
06:01 BenGoldberg m: sub foo { for 1..3 { .say; say "OH HAI" unless (state $)++ } }; foo(); foo()
06:01 camelia rakudo-moar f24968: OUTPUT«1␤OH HAI␤2␤3␤1␤OH HAI␤2␤3␤»
06:01 BenGoldberg m: sub foo { for 1..3 { .say; say "OH HAI" unless (state $x)++ } }; foo(); foo()
06:01 camelia rakudo-moar f24968: OUTPUT«1␤OH HAI␤2␤3␤1␤OH HAI␤2␤3␤»
06:01 BenGoldberg m: { my $x; sub foo { for 1..3 { .say; say "OH HAI" unless $x++ } } }; foo(); foo()
06:01 camelia rakudo-moar f24968: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    foo used at line 1␤␤»
06:01 BenGoldberg m: { my $x; our sub foo { for 1..3 { .say; say "OH HAI" unless $x++ } } }; foo(); foo()
06:01 camelia rakudo-moar f24968: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    foo used at line 1␤␤»
06:02 BenGoldberg m: my &foo = { my $x; sub { for 1..3 { .say; say "OH HAI" unless $x++ } } }; foo(); foo()
06:02 camelia rakudo-moar f24968: ( no output )
06:02 * BenGoldberg headscratches.
06:04 samcv this is the proper way to do this right?
06:04 samcv m: sub thing ($first, $second, $third) { say $first }; my @list = 'one', 'two', 'three'; thing(|@list)
06:04 camelia rakudo-moar f24968: OUTPUT«one␤»
06:04 samcv using the `|` operator to to supply an array to a sub
06:09 wamba joined #perl6
06:35 domidumont joined #perl6
06:36 samcv hmm i'm getting Cannot .elems a lazy list
06:36 samcv when trying to do: my $range = Range.new(10, 100).lazy; for $range { }
06:36 samcv weird :\
06:42 domidumont joined #perl6
06:47 samcv also have a weird thing where `%points{$cp_s}{$pname} = $value;` is setting two different $cp_s's
06:48 samcv it's setting two keys instead of just one i have no clue why
06:48 samcv and this only happens if the hash is already populated with about 1 million keys, if the hash has a low number of keys i don't get this issue
06:48 RabidGravy joined #perl6
06:48 samcv :(
07:03 bjz joined #perl6
07:04 samcv oh crap i think what's causing it is i'm assigning the same hash to multiple keys and then changing one of them changes all of them. aha moment
07:04 masak jnthn++ # for allegedly fixing https://github.com/jnthn/grammar-debugger/issues/13 (!)
07:15 domidumont joined #perl6
07:20 domidumont joined #perl6
07:24 domidumont joined #perl6
07:25 labster joined #perl6
07:32 abraxxa joined #perl6
07:35 pyrimidine joined #perl6
07:36 darutoko joined #perl6
07:40 abraxxa joined #perl6
07:43 abraxxa joined #perl6
07:51 domidumont joined #perl6
07:52 abraxxa joined #perl6
07:58 wamba joined #perl6
08:14 xinming joined #perl6
08:21 rindolf joined #perl6
08:27 parv joined #perl6
08:48 parv joined #perl6
09:01 khisanth_ joined #perl6
09:02 xtreak joined #perl6
09:03 ocbtec joined #perl6
09:08 parv joined #perl6
09:11 xtreak joined #perl6
09:21 xtreak joined #perl6
09:22 rurban joined #perl6
09:24 eroux joined #perl6
09:26 koki1 joined #perl6
09:33 cibs joined #perl6
09:54 gregf_ joined #perl6
10:17 xtreak joined #perl6
10:31 bjz joined #perl6
10:36 tonginbox joined #perl6
10:51 xtreak joined #perl6
10:55 nine jnthn: I wonder if you have an opinion on https://rt.perl.org//Public/Bug/Display.html?id=130709
10:58 agentzh joined #perl6
11:04 Geth joined #perl6
11:04 brokenchicken MasterDuke: removed the …
11:11 pyrimidine joined #perl6
11:13 inra joined #perl6
11:16 MasterDuke masak: i think INIT is sometimes used in the core settings to get the effect of `once`, not per surrounding code
11:17 MasterDuke brokenchicken++
11:20 lizmat yeah, we still have a race condition with once, afaik
11:22 Geth ¦ ecosystem: nobodyinperson++ created pull request #295: Add Fortran::Grammar to META.list
11:22 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/pull/295
11:29 Geth ¦ ecosystem: eee75a4bb1 | (Yann Büchau)++ | META.list
11:29 Geth ¦ ecosystem: Add Fortran::Grammar to META.list (#295)
11:29 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/eee75a4bb1
11:34 inra joined #perl6
11:43 Mithaldu where are perl6 builtins documented?
11:43 moritz Mithaldu: https://docs.perl6.org/
11:44 Mithaldu this? https://docs.perl6.org/routine.html
11:44 Mithaldu hm, so there is no reset builtin, correct?
11:44 moritz nope
11:45 Mithaldu cool, thanks
11:45 * moritz finds perl 5's reset EXPR quite amusing
11:45 brokenchicken Mithaldu: that one's declared in that file: https://github.com/rakudo/rakudo/blob/nom/src/core/REPL.pm#L320-L323
11:45 moritz and there are no ?? searches
11:45 nine This must be the strangest error screen I've ever seen: http://niner.name/pentabarf_error_message.png
11:46 Mithaldu brokenchicken: yeah, i was just checking if there were any clashes
11:46 Ulti its impressive how I just read what reset is in perl5 and still dont get what it is
11:46 Ulti I have a feeling my regex fu is not as strong as the average perl person
11:46 moritz nine: pure gold
11:47 nine Ulti: same here :)
11:47 arnsholt WAAAAAT. That's a *horrifying* function...
11:47 samcv @nine, "prosecutors will be transgressicuted" hah
11:47 * arnsholt had never heard of reset before
11:47 brokenchicken In perl 6, it would shadow the core one if one existed, so no clashes.
11:48 arnsholt Smells like pre-Perl 5, though, given the suggestion to use lexicals instead
11:48 Mithaldu brokenchicken: i'd still want to have avoided it
11:48 brokenchicken m: sub say { @_».uc.say }; say "foo"
11:48 camelia rakudo-moar f24968: OUTPUT«[FOO]␤»
11:48 Mithaldu as is, i'll just comment it as being badly named :P
11:49 arnsholt nine: Fun. Also, looks like it's implemented in Smalltalk (Seaside perhaps?)
11:52 arnsholt Ah, sadly not. It's RoR
11:52 Mithaldu pentabarf is not fun to work with
11:52 Mithaldu last time i installed it i learned what dependency hell truly is
11:52 Mithaldu i found myself literally guessing and trying to bisect which versions of its dependencies it would work with
11:53 Vynce joined #perl6
11:54 Mithaldu m: say( 'a', 'b' )
11:54 camelia rakudo-moar f24968: OUTPUT«ab␤»
11:58 Mithaldu would be nice if https://docs.perl6.org/language/control#for contained postfix examples
11:59 brokenchicken Opened an issue: https://github.com/perl6/doc/issues/1178
11:59 Mithaldu <3
12:05 Mithaldu brokenchicken: integrated your feedback (particularly the not one was good as i didn't consider how it would read without code highlighting) and did a little more opinionated run: https://github.com/wchristian/rakudo/commit/5b80f28033f551b2cff66bac8b2241059cc4bf88?diff=split
12:05 Mithaldu i'd like to have your opinions on that before making it a PR though
12:06 Mithaldu (and, if merged, would prefer it squashed with the previous one)
12:06 bjz_ joined #perl6
12:14 Mithaldu also rebased D:
12:14 ambs joined #perl6
12:24 brokenchicken Mithaldu: don't think I'll have the time to review it for the next 27 hours.
12:24 Mithaldu that's fine, i'm in no kind of hurry :)
12:26 cdg joined #perl6
12:26 KDr2 joined #perl6
12:47 grondilu joined #perl6
12:47 grondilu isn't there a builtin regex for floating point literals?
12:47 yoleaux 26 Jan 2017 17:01Z <TimToady> grondilu: the subsig ($a,$b) is always treating pairs as named args, not positionals; perhaps we could distinguish a [$a,$b] subsig to force positional and let the () form turn pairs to nameds
12:50 grondilu m: -> $a, $b { say "$a:$b" }(1, 2)
12:50 camelia rakudo-moar f24968: OUTPUT«1:2␤»
12:50 grondilu m: -> $a, $b { say "$a:$b" }(foo => bar, 2)
12:50 camelia rakudo-moar f24968: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    bar used at line 1. Did you mean 'VAR', 'bag'?␤␤»
12:50 grondilu m: -> $a, $b { say "$a:$b" }(foo => 1, 2)
12:50 camelia rakudo-moar f24968: OUTPUT«Too few positionals passed; expected 2 arguments but got 1␤  in block <unit> at <tmp> line 1␤␤»
12:53 pyrimidine joined #perl6
12:55 pyrimidi_ joined #perl6
12:55 grondilu nevermind that, back to my initial question : isn't there a builtin or a module for parsing numeric literals?
12:56 grondilu I mean I often have to write a regex for that and I feel I'm reinventing the wheel here.
12:58 gfldex "Iteration variables are always lexical, so you don't need to use my to give them the appropriate scope."
12:58 gfldex ^^^ that's kinda wrong
12:58 gfldex there are no iteration variables in a for loop
12:59 * gfldex starts to rethink control#for
12:59 cpage_ joined #perl6
13:02 gfldex m: my &c = { .say }; c($_) for 1..3;
13:02 camelia rakudo-moar f24968: OUTPUT«1␤2␤3␤»
13:02 gfldex m: my &c = { .say }; for 1..3 &c;
13:02 camelia rakudo-moar f24968: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3my &c = { .say }; for 1..3 &c7⏏5;␤    expecting any of:␤        block or pointy block␤»
13:07 stmuk joined #perl6
13:07 rurban joined #perl6
13:07 pyrimidine joined #perl6
13:09 pyrimidine joined #perl6
13:16 wamba joined #perl6
13:16 bjz joined #perl6
13:16 espadrine joined #perl6
13:19 cibs joined #perl6
13:24 gfldex brokenchicken: I wonder if it would be sensible to suggest transfer of ownership to a github group when taking over a module. That may prevent the same problem to pop up again just because one more person was hit by a bus.
13:27 nine Mithaldu: why not use "unless" instead of "if not"?
13:28 Mithaldu nine: unless doesn't exist in that form in all languages and thus doesn't work as smoothly for some non-native english people
13:28 DethronedAngel joined #perl6
13:28 DethronedAngel I'm really liking Radoku.
13:29 Mithaldu for example the translation to german is "when nicht", which is "if not"
13:29 Mithaldu s/when/wenn/
13:31 timotimo ( "was wenn nicht, hä?" )
13:31 Mithaldu haha
13:32 nine Mithaldu: "zurückkehren außer im Fehlerfall" is how I'd read it in German which sounds perfectly well.
13:32 Mithaldu except ausser is except
13:33 Mithaldu plus, you still need that "im" there to get something sensible :P
13:33 jast why do you need to read it in German in the first place? it's English... :P
13:33 nine which is a synonym for "unless". And "außer" is the first German word I thought of when looking for a translation. Given that I'm a native German speaker, I guess I'm not too far off.
13:33 Mithaldu jast: just how the mind works
13:34 nine Mithaldu: return if not error is not exactly sensible English either ;)
13:34 Mithaldu nine: what you have there translates back to
13:34 jast that's awfully generalized. I have no trouble reading English without translating everything to German first.
13:34 Mithaldu "return except if error"
13:34 timotimo there's a "why is this here?", i can tell what it's for, but who knows why it's right there ...
13:34 timotimo oh, the comment below already explains it
13:35 jast and anyway, using "unless" in Perl doesn't always make for a grammatically sound phrase, but that's not the goal anyway
13:35 Mithaldu in any case, that's why i don't use unless
13:35 Mithaldu i can't read it fast
13:35 jast according to English grammar, that is
13:35 Mithaldu and i'm not the only one with that issue
13:35 jast it's a matter of practice, really
13:35 Mithaldu if not is always unambiguously skimmable to anyone i've met
13:35 jast for a while I had trouble reading "unless" constructs, but it's not a big deal anymore
13:35 Mithaldu still a deal tho :v
13:36 jast you could argue the same thing for any unusual piece of syntax in Perl
13:36 gfldex m: sub infix:<es-sei-denn>(&c, $b){ c unless $b }; { say ‚issn?‘ } es-sei-denn (DateTime.now.hour > 18);
13:36 camelia rakudo-moar f24968: OUTPUT«issn?␤»
13:36 Mithaldu gfldex++
13:36 jast in fact many people don't use Perl (5, mainly) because of all the sigils, same reasoning: they find it hard to read
13:37 Mithaldu jast: no you can't argue that i can't read it fast for any unusual piece of syntax since you aren't in my brain
13:37 jast where did I argue that?
13:37 Mithaldu well if you didn't, then your argument was ambiguous :P
13:37 jast quite likely, that's what happens when people use language ;)
13:38 Mithaldu also, to make what i'm saying less ambiguous
13:38 jast natural language, that is. tricky beast.
13:38 Mithaldu i've been at this shit for over 12 years and i've read and written plenty of perl
13:38 Mithaldu unless still has me stumbling when reading
13:38 Mithaldu so that is my answer
13:39 Mithaldu and i'm not particularly interested in philosophizing over it ;)
13:39 jast well you did bring it up and that was my take on it ;)
13:39 gfldex unless works well for me as a postfix
13:39 Mithaldu i didn't :|
13:40 jast I guess that's true
13:40 Mithaldu :P
13:40 jast gfldex: good point, now that you mention it I find it easier to read as a postfix, too
13:40 gfldex m: constant term:<hömma> := &prompt;
13:40 camelia rakudo-moar f24968: ( no output )
13:40 Mithaldu gfldex: "works for me" is not often a useful argument ;)
13:41 Mithaldu haha, hömma, what?
13:41 jast I really only use unless for blocks for straightforward things like: unless (defined $foo) {}
13:41 masak joined #perl6
13:42 brokenchicken That's better written as `without $foo {}` in Perl 6 :)
13:42 gfldex the unless/if not debate is pretty pointless because in Perl 6 you should use with/without most of the time anyways :->
13:42 Mithaldu link?
13:42 jast right... I've not used it at all in Perl 6 so far :)
13:42 brokenchicken :)
13:42 Mithaldu i saw REPL.pm check definedness a few tmes
13:42 brokenchicken Mithaldu: https://docs.perl6.org/syntax/with%20orwith%20without
13:42 Mithaldu cheers
13:42 masak gfldex: I've never used `with`/`without` in my code. I missed the memo says I should use it most of the time ;)
13:43 brokenchicken Mithaldu: with => if defined; without => if not defined; orwith => elsif defined
13:43 gfldex masak: if you do your multies right, you should never get to the point where you would need `without`. :->
13:44 masak I guess what I'm saying is I've so far not gotten to the point where I needed `with`
13:44 Mithaldu so basically this: return if not $line.defined; is better as: return without $line;
13:44 Mithaldu yay :)
13:45 jast hmm, that will take a little getting used to...
13:45 Mithaldu does this also still work?
13:45 Mithaldu return without my $line = $read.readline(prompt);
13:45 masak `return if not $line.defined;` reads a whole lot clearer to me than `return without $line;` :/
13:46 Mithaldu masak: you did mention you've not seen without a lot, yeah?
13:46 masak but oh well -- I'll stick to writing code instead of complainin' :)
13:46 Mithaldu might be a side effect of not being familiar with it yet
13:46 gfldex m: use variables :D; # solved!
13:46 camelia rakudo-moar f24968: ( no output )
13:46 timotimo "without" can read a bit weird sometimes
13:46 masak Mithaldu: I was talking about reading the code aloud and gathering from that what it does
13:47 masak Mithaldu: that's pretty independent of my familiarity with the keyword and its semantics
13:47 * jast nominates 'unwith' as an alias ;)
13:47 Mithaldu m: sub meep { } sub marp { return 1 without my $line = meep; 2 } marp
13:47 camelia rakudo-moar f24968: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Strange text after block (missing semicolon or comma?)␤at <tmp>:1␤------> 3sub meep { }7⏏5 sub marp { return 1 without my $line = ␤    expecting any of:␤        infix␤        infix stopper␤…»
13:47 Mithaldu :<
13:47 timotimo needs semicolons
13:47 gfldex what is the scope of `use variables :D;` ?
13:47 Mithaldu m: sub meep { }; sub marp { return 1 without my $line = meep; 2 }; marp
13:47 camelia rakudo-moar f24968: ( no output )
13:47 Mithaldu m: sub meep { }; sub marp { return 1 without my $line = meep; 2 }; say marp
13:47 camelia rakudo-moar f24968: OUTPUT«1␤»
13:47 Mithaldu word
13:47 masak 'night, #perl6
13:47 timotimo gnite masak
13:47 Mithaldu m: sub meep { 2; }; sub marp { return 1 without my $line = meep; 2 }; say marp
13:47 camelia rakudo-moar f24968: OUTPUT«2␤»
13:48 Mithaldu night masak :)
13:48 cibs joined #perl6
13:48 g4 joined #perl6
13:48 g4 joined #perl6
13:48 Mithaldu masak: see, funnily enough to my mind "raus ohne variable" makes perfect sense :)
13:49 gfldex m: sub foo(\a){ use variables :D; my $b = a; }; my $c = Any; foo $c;
13:49 camelia rakudo-moar f24968: OUTPUT«Type check failed in assignment to $b; expected Any:D but got Any (Any)␤  in sub foo at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
13:53 Mithaldu brokenchicken: another commit :) https://github.com/wchristian/rakudo/commit/7b097b63802e8cc6de2f4dce112fe2d31f7dcb6c?diff=split
13:54 Mithaldu quite liking this without with thing, it cool
13:58 perlpilot Mithaldu++  I was having trouble liking `without`, but that code makes me like it as much as `with` now  :)
13:58 Mithaldu :D
13:58 Mithaldu i've been doing similar constructs in perl 5 for a while now :)
14:03 brokenchicken I'd write that method repl-read {} as just self-update-completions; linenoiseHistoryAdd $_ with linenoise prompt;
14:03 brokenchicken m: say $_ with 'meows'
14:03 camelia rakudo-moar f24968: OUTPUT«meows␤»
14:03 brokenchicken m: say $_ with Any
14:03 camelia rakudo-moar f24968: ( no output )
14:03 brokenchicken linenoise prompt andthen .&linenoiseHistoryAdd
14:04 brokenchicken Oh that won't work without some parens :(
14:04 brokenchicken linenoise prompt() andthen .&linenoiseHistoryAdd
14:05 brokenchicken m: sub foo { 42 }; sub bar { $^z }; sub meows { @_.say }; bar foo andthen .&meows
14:05 camelia rakudo-moar f24968: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    andthen used at line 1␤␤»
14:05 brokenchicken It gobbles and think andthen is a term
14:05 brokenchicken m: sub foo { 42 }; sub bar { $^z }; sub meows { @_.say }; bar foo() andthen .&meows
14:05 camelia rakudo-moar f24968: OUTPUT«[42]␤»
14:05 brokenchicken \o/
14:07 Mithaldu brokenchicken: i'm happy to see you inspired to make it more idiomatic :)
14:10 gfldex m: sub f(\a){ my $b = a // Failure.new('no definy, no runny!'); say $b }; f Any;
14:10 camelia rakudo-moar f24968: OUTPUT«no definy, no runny!␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in sub f at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
14:10 KDr2 Why Int.WHAT is Int? I can understand that `1.WHAT is Int`, but should Int.WHAT be something meta?
14:11 [Coke] Int is slightly META.
14:11 brokenchicken KDr2: .WHAT returns the type object, which for the type object is itself
14:11 moritz KDr2: no, Int is a perfectly fine Int
14:11 [Coke] m: say Int.How
14:11 camelia rakudo-moar f24968: OUTPUT«No such method 'How' for invocant of type 'Int'␤  in block <unit> at <tmp> line 1␤␤»
14:11 moritz KDr2: to get to the meta object, use HOW
14:11 [Coke] m: say Int.HOW
14:11 camelia rakudo-moar f24968: OUTPUT«Perl6::Metamodel::ClassHOW.new␤»
14:11 [Coke] that might be the really meta thing you wanted.
14:12 gfldex KDr2: see https://docs.perl6.org/language/typesystem#Undefinedness
14:12 brokenchicken m: say Int.HOW.WHAT.WHERE.WHY
14:12 camelia rakudo-moar f24968: OUTPUT«(Any)␤»
14:12 brokenchicken :P
14:13 brokenchicken m: sub f(\a where .defined or fail 'no definy, no runny!') {a.say}; f 42
14:13 camelia rakudo-moar f24968: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed parameter␤at <tmp>:1␤------> 3sub f(\a where .defined7⏏5 or fail 'no definy, no runny!') {a.say}␤    expecting any of:␤        constraint␤        infix␤        infix stopper␤»
14:13 brokenchicken m: sub f(\a where .defined || fail 'no definy, no runny!') {a.say}; f 42
14:13 camelia rakudo-moar f24968: OUTPUT«42␤»
14:13 brokenchicken m: sub f(\a where .defined || fail 'no definy, no runny!') {a.say}; f Int
14:13 camelia rakudo-moar f24968: OUTPUT«no definy, no runny!␤  in sub f at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
14:15 brokenchicken BTW, :D is not equivalent to .defined
14:15 brokenchicken m: dd [.defined, $_ ~~ Any:D ] given Failure.new
14:15 camelia rakudo-moar f24968: OUTPUT«[Bool::False, Bool::True]␤»
14:15 brokenchicken m: dd [.defined, $_ ~~ Any:D ] given Nil.new
14:15 camelia rakudo-moar f24968: OUTPUT«[Bool::False, Bool::False]␤»
14:16 brokenchicken m: dd [.defined, .DEFINITE ] given Nil.new
14:16 camelia rakudo-moar f24968: OUTPUT«[Bool::False, Bool::False]␤»
14:16 brokenchicken Of well :) tis true for Failure
14:16 KDr2 thanks guys, I am going to read the type system doc to find out why (a type object).WHAT is itself
14:17 perlpilot KDr2: why wouldn't it be?
14:17 brokenchicken KDr2: otherwise, my Int $x; ..... $x.WHAT would give you different results depending on whether or not it was instantiated to anything.
14:17 perlpilot what brokenchicken said.
14:19 KDr2 I though instance.WHAT is the class of the instance, which in java, class Integer is a instance of class Class
14:19 moritz KDr2: Perl 6 != Java
14:19 moritz Perl 6's MOP is much more inspired by Common Lisp
14:19 [Coke] .ask samcv regarding RT#130710 - same text twice, fails second time? I can't get it to fail here at all.
14:19 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=130710
14:19 yoleaux [Coke]: I'll pass your message to samcv.
14:19 KDr2 yeah, I realize it, I am reading the doc now, thanks
14:19 moritz and "The Art of the Meta Object Protocol"
14:19 brokenchicken KDr2: ah, not in Perl 6. It inherits from Cool, Any, and Mu, but ain't an instance of any of them.
14:20 moritz m: say Int ~~ Int; say 2 ~~ Int; say Int ~~ Int:D; say 2 ~~ Int:D
14:20 camelia rakudo-moar f24968: OUTPUT«True␤True␤False␤True␤»
14:20 samcv m: $_ = ('   a ', '  b  '); $_.».trim.perl.say
14:20 yoleaux 14:19Z <[Coke]> samcv: regarding RT#130710 - same text twice, fails second time? I can't get it to fail here at all.
14:20 camelia rakudo-moar f24968: OUTPUT«$("a", "b")␤»
14:20 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=130710
14:20 samcv err typo
14:20 samcv m: $_ = ('   a ', '  b  '); .».trim.perl.say
14:20 camelia rakudo-moar f24968: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed postfix call (only alphabetic methods may be detached)␤at <tmp>:1␤------> 3$_ = ('   a ', '  b  '); .7⏏5».trim.perl.say␤»
14:21 KDr2 so any type object is not a instance of any type object, right?
14:21 brokenchicken KDr2: right
14:22 brokenchicken KDr2: well, maybe an instance of some metaobject. I'
14:22 brokenchicken KDr2: well, maybe an instance of some metaobject. I've no idea about those parts
14:24 brokenchicken Whatever nqp::newtype() does :)
14:25 brokenchicken Oh, metaobject does nqp::newtype(self.new, 'some repr') so I guess there are instances of metaobjects involved \o/
14:26 koki1 joined #perl6
14:26 brokenchicken And the metaobject's instance's attibutes have what methods a particular type has or parents, etc
14:26 brokenchicken m: Int.HOW.DEFINITE.say
14:26 camelia rakudo-moar f24968: OUTPUT«True␤»
14:28 KDr2 is that the implementation relative, or is in the spec?
14:29 moritz KDr2: it's spec, in the sense that it's tested in our test suite, I believe
14:29 moritz though the actual documents are pretty light on how to do MOP
14:30 cale2 joined #perl6
14:30 cale2 Hey, so I was reading that Fortran grammar. So after you parse Fortran with Perl6 grammars, you get all of the words back in a categorized fashion.
14:31 KDr2 thank you all, I learned a lot
14:31 brokenchicken \o/
14:31 cale2 Is the idea that you then create Perl6 functions for every Fortran function using the Perl6 MOP?
14:31 moritz the MOP can't create functions
14:31 cale2 Then execute the Perl6 and you have a Fortran "pseudo compiler"
14:32 moritz just classes and objects
14:32 bwisti joined #perl6
14:32 cale2 In that case, I'm not sure what good a programming language grammar is
14:32 cale2 if you can't execute what you've grammarized
14:33 moritz there are lots of things you can do with a parse tree
14:33 moritz you could compile it to a different format (like assembler)
14:33 moritz or you can do static analysis on it
14:33 moritz type checking
14:33 moritz linting
14:34 moritz you could interpret the code
14:34 mspo editor stuff!
14:35 cale2 I assume that you can keep things grouped together then. For example, if you are parsing functions, you would get back an array of things that look like:
14:35 cale2 {name => "hello", signature => "Str $s", returns => "Str $s"}
14:37 moritz or create proper objects from those
14:38 moritz class Signature { has @.params: has $.return-type }; class Function { has $.name; has Signature $.signature; has $.body } ....
14:40 inra joined #perl6
14:42 sammers joined #perl6
14:47 skids joined #perl6
14:52 cdg_ joined #perl6
14:53 inra joined #perl6
14:57 gfldex joined #perl6
15:00 pyrimidine joined #perl6
15:00 agentzh joined #perl6
15:01 bjz joined #perl6
15:03 AlexDaniel joined #perl6
15:04 trnh joined #perl6
15:04 trnh joined #perl6
15:09 sena_kun joined #perl6
15:13 pmurias joined #perl6
15:16 cdg joined #perl6
15:19 rindolf joined #perl6
15:20 brokenchicken tbrowder: "tbrowder i'm trying atom again and wonder if there is a package that will show a list of subs, classes, and vars on the menu bar like emacs p6 mode?" Ask samcv. I recall her showing the screenshot with a plugin that does something like that recently.
15:21 tbrowder brokenchicken: thanks!
15:23 tbrowder .tell samcv Can you tell us, please,  what package for atom will show lists of p6 subs, vars, and classes on the menu bar?
15:23 yoleaux tbrowder: I'll pass your message to samcv.
15:25 gdonald joined #perl6
15:26 [Coke] tbrowder: that was answered in backlog for me.
15:27 tbrowder [Coke]: thanks...
15:27 [Coke] tbrowder: you need this file: https://github.com/samcv/dot-files/blob/master/.nav-marker-rules
15:27 [Coke] and that page links to "nav-panel-plus", the plugin you need.
15:28 [Coke] hope that helps.
15:29 domidumont joined #perl6
15:31 tbrowder [Coke]: thanks, that helps a lot!
15:33 rurban joined #perl6
15:34 SmokeMachine m: sub bla(Int $) {say "defined"}; bla Int
15:34 camelia rakudo-moar c98b3a: OUTPUT«defined␤»
15:34 SmokeMachine m: use variables :D; sub bla(Int $) {say "defined"}; bla Int
15:34 camelia rakudo-moar c98b3a: OUTPUT«defined␤»
15:34 SmokeMachine :(
15:35 SmokeMachine m: sub bla(Int:D $) {say "defined"}; bla Int
15:35 camelia rakudo-moar c98b3a: OUTPUT«Parameter '<anon>' requires an instance of type Int, but a type object was passed.  Did you forget a .new?␤  in sub bla at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
15:35 brokenchicken m: use variables :D; sub bla(Int $x) {say "defined"}; bla Int
15:35 camelia rakudo-moar c98b3a: OUTPUT«defined␤»
15:35 SmokeMachine I think I didn't that the use variables :D...
15:35 brokenchicken m: use variables :D; my Int $x;
15:35 camelia rakudo-moar c98b3a: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable definition of type Int:D (implicit :D by pragma) requires an initializer␤at <tmp>:1␤------> 3use variables :D; my Int $x7⏏5;␤    expecting any of:␤        constraint␤»
15:36 brokenchicken m: use variables :U; sub bla(Int $x) {say "defined"}; bla 42
15:36 camelia rakudo-moar c98b3a: OUTPUT«defined␤»
15:36 brokenchicken Don't know much about `use variables` but that feels like a bug
15:37 SmokeMachine m: use variables :U; my Int $x = 42
15:37 camelia rakudo-moar c98b3a: OUTPUT«Type check failed in assignment to $x; expected Int:U but got Int (42)␤  in block <unit> at <tmp> line 1␤␤»
15:37 cdg joined #perl6
15:38 SmokeMachine m: use variables :_; my Int $x; $x  = 42
15:38 camelia rakudo-moar c98b3a: ( no output )
15:38 brokenchicken And ^ that's missing (implict :D...) part that the :D version has
15:38 brokenchicken huggable: 6.d
15:38 huggable brokenchicken, Proposals for 6.d language: https://github.com/perl6/specs/blob/master/v6d.pod
15:38 brokenchicken There's also a 6d proposal to make :D the default
15:39 brokenchicken Wonder how that will work with named args...
15:39 brokenchicken m: sub (Int:D :$foo) {}()
15:39 camelia rakudo-moar c98b3a: OUTPUT«Parameter '$foo' requires an instance of type Int, but a type object was passed.  Did you forget a .new?␤  in sub  at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
15:39 brokenchicken m: use variables :D; sub (Int :$foo) {}()
15:39 camelia rakudo-moar c98b3a: ( no output )
15:39 perlpilot we'd have to change the message
15:39 perlpilot (make it mention the other signature options)
15:40 perlpilot s/have to/should/
15:43 moritz m: use params :D; sub f(Int $) { }; f Int
15:43 camelia rakudo-moar c98b3a: OUTPUT«===SORRY!===␤Could not find params at line 1 in:␤    /home/camelia/.perl6␤    /home/camelia/rakudo-m-inst-2/share/perl6/site␤    /home/camelia/rakudo-m-inst-2/share/perl6/vendor␤    /home/camelia/rakudo-m-inst-2/share/perl6␤    CompUnit::Reposi…»
15:44 moritz m: use parameters :D; sub f(Int $) { }; f Int
15:44 camelia rakudo-moar c98b3a: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤use parameters not yet implemented. Sorry. ␤at <tmp>:1␤------> 3use parameters :D7⏏5; sub f(Int $) { }; f Int␤»
15:45 pyrimidi_ joined #perl6
15:47 brokenchicken Ah
15:52 gfldex joined #perl6
15:55 luiz_lha joined #perl6
15:55 geekosaur joined #perl6
15:55 trnh joined #perl6
15:55 trnh joined #perl6
15:56 wamba joined #perl6
16:01 rindolf joined #perl6
16:02 SourceBaby joined #perl6
16:03 Undercover joined #perl6
16:03 bwisti joined #perl6
16:07 dugword joined #perl6
16:13 gfldex joined #perl6
16:17 hartenfels joined #perl6
16:18 xzhao joined #perl6
16:22 AlexDaniel I've just realized how hard it is without google
16:22 AlexDaniel it has been down for me 50% of the time I tried to access it today and yesterday
16:23 AlexDaniel no gmail, no search :|
16:23 sena_kun AlexDaniel, ddg?
16:23 brokenchicken :)
16:24 AlexDaniel sena_kun: I've been trying to switch to ddg several times, but no… search results are not good enough, for some reason
16:24 brokenchicken AlexDaniel: I've got a present for you.
16:24 AlexDaniel oh! Great
16:25 brokenchicken m: constant ˮ = “ˮ”; say ˮ ~ ˮ
16:25 camelia rakudo-moar c98b3a: OUTPUT«ˮˮ␤»
16:25 AlexDaniel so?
16:25 sena_kun AlexDaniel, they are actually pretty bad(comparing to google), but if you use shebangs to access some sites directly(like wikipedia, github, etc) it can be still useable.
16:25 brokenchicken aww :)
16:26 brokenchicken AlexDaniel: It looks totally trippy on my terminal: http://i.imgur.com/vElsEoG.png . I was hoping to trick you :)
16:26 AlexDaniel yea, these quick access thingies look very nice, but in the end I just want something that will give me a proper top 5 list of results
16:27 robertle joined #perl6
16:27 sena_kun can't help here then. :/
16:27 AlexDaniel brokenchicken: https://files.progarm.org/2017-02-03-182741_295x43_scrot.png
16:28 brokenchicken Ah. heh
16:31 AlexDaniel I hate google so much though. Let's say I managed to search for something, great! But now I can't simply click on some link because it goes through google's redirect. Which is of course down again
16:32 daxim joined #perl6
16:39 xebra joined #perl6
16:40 xebra left #perl6
16:47 domidumont joined #perl6
16:50 nine AlexDaniel: so why don't you use DuckDuckGo instead?
16:51 AlexDaniel already stated above. But yes, perhaps I want too much
16:52 nine AlexDaniel: oh, sorry, just arrived at the hotel and didn't properly backlog
16:52 brokenchicken DDG rarely finds what I want. I'm too spoiled by Google's algorithms that know my every move.
16:53 AlexDaniel yep
16:54 nine Odd... the rate times ddg cannot help me I find that Google doesn't have anything for me either
16:54 rurban joined #perl6
16:55 AlexDaniel maybe I should give it try again
16:56 AlexDaniel a
16:56 rurban1 joined #perl6
16:58 dugword joined #perl6
16:58 * perigrin doesn't find DDGs search results *that* bad compared to google, but does admit to using !g quite a bit
16:59 perigrin DDG is part of my finger flow though becaue it makes !cpan [Something] work like I expect ... bringing up the metacpan docs for [something]
17:00 perigrin well and anymore !wiki for wikipedia
17:00 huf i use !wikt a lot
17:00 huf i hate when i typo is to !wikit
17:03 perigrin I use wikipedia for that more often than not, or !define
17:05 huf eh. doesnt have etymology or IPA
17:05 huf hmm, it has some kind of pronunciation guide and audio, so i guess that's nice
17:05 huf oh etymology too! well now i'm a silly fool
17:07 cdg_ joined #perl6
17:09 perigrin heh
17:09 huf okay, i got one more
17:10 huf i cant click over to the hungarian wiktionary from that thing to see if *they* have more info :)
17:10 perigrin being a sad american monoglot, that wouldn't help me
17:10 perigrin (and is a large part of why I don't use !define that much)
17:10 huf since the hu.wikt is small and sparse, it usually doesnt help me either :)
17:11 perigrin you'd think it'd be ... hungry for information .... YEAAAAA!!
17:11 huf perigrin: hmm? i didnt start using english dictionaries until i was already fluent
17:12 rurban joined #perl6
17:13 perigrin I use them a lot less since I got degree in English ... but I use !ety a lot more since I got the degree
17:13 huf :)
17:13 huf ooooh they have !ety for etymonline? sweet
17:13 perigrin yep :)
17:15 Geth ¦ Inline-Perl5: e307c3599c | (Stefan Seifert)++ | 3 files
17:15 Geth ¦ Inline-Perl5: Implement accessing global Perl 5 variables by name
17:15 Geth ¦ Inline-Perl5:
17:15 Geth ¦ Inline-Perl5: use Data::Dumper:from<Perl5>;
17:15 Geth ¦ Inline-Perl5: say $Data::Dumper::Maxdepth;
17:15 Geth ¦ Inline-Perl5: $Data::Dumper::Maxdepth = 2;
17:15 Geth ¦ Inline-Perl5: say Dumper([[[[[1], 2], 3], 4], 5]);
17:15 Geth ¦ Inline-Perl5: review: https://github.com/niner/Inline-Perl5/commit/e307c3599c
17:15 rurban1 joined #perl6
17:19 girafe joined #perl6
17:46 Geth ¦ doc: a3952cb24d | (Zoffix Znet)++ | doc/Language/operators.pod6
17:46 Geth ¦ doc: Fix incorrect info on capture references in s[] = ...
17:46 Geth ¦ doc: review: https://github.com/perl6/doc/commit/a3952cb24d
17:46 robertle joined #perl6
17:49 dugword joined #perl6
17:56 TheDir joined #perl6
17:56 vcv joined #perl6
17:56 andrewalker joined #perl6
17:56 Grrrr joined #perl6
17:56 BooK joined #perl6
17:56 rblackwe joined #perl6
17:56 zb joined #perl6
17:56 mitchum joined #perl6
17:56 konobi joined #perl6
17:56 perigrin joined #perl6
17:56 DrForr joined #perl6
17:56 Ulti joined #perl6
17:56 ingy joined #perl6
17:56 tailgate joined #perl6
17:56 lucs joined #perl6
17:56 [Coke] joined #perl6
17:56 hahainternet joined #perl6
17:56 risou___ joined #perl6
17:56 Exodist joined #perl6
17:56 garu joined #perl6
17:56 mattp joined #perl6
17:57 emdashcomma joined #perl6
17:57 protium joined #perl6
17:57 clkao joined #perl6
17:57 skaji joined #perl6
17:57 ssm joined #perl6
17:58 sena_kun m: circumfix:«( )»('a', 'b', 'c'); # same as ('a', 'b', 'c')
17:58 camelia rakudo-moar c98b3a: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    circumfix:<( )> used at line 1. Did you mean 'circumfix:<{ }>', 'circumfix:<:{ }>', 'circumfix:<[ ]>'?␤␤»
17:58 dg joined #perl6
17:59 sena_kun It's bad. :/
17:59 Ven joined #perl6
17:59 brokenchicken hm?
17:59 sena_kun The example is broken and I don't know how to fix it.
18:00 sena_kun What kind of circumfix operator can be used to produce such result?
18:00 brokenchicken m: circumfix:«[ ]»('a', 'b', 'c').say
18:00 camelia rakudo-moar c98b3a: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Calling circumfix:<[ ]>(Str, Str, Str) will never work with any of these multi signatures:␤    () ␤    (Iterable:D \iterable) ␤    (Mu \x)␤at <tmp>:1␤------> 3<BOL>7⏏5circumfix:«[ ]»('a', 'b…»
18:00 brokenchicken m: circumfix:«[ ]»(['a', 'b', 'c']).say
18:00 camelia rakudo-moar c98b3a: OUTPUT«[a b c]␤»
18:00 brokenchicken m: circumfix:«[ ]»(['a', 'b', 'c']) === ['a', 'b', 'c']
18:00 camelia rakudo-moar c98b3a: OUTPUT«WARNINGS for <tmp>:␤Useless use of "===" in expression "circumfix:«[ ]»(['a', 'b', 'c']) === ['a', 'b', 'c']" in sink context (line 1)␤»
18:00 brokenchicken m: say circumfix:«[ ]»(['a', 'b', 'c']) === ['a', 'b', 'c']
18:00 camelia rakudo-moar c98b3a: OUTPUT«False␤»
18:00 brokenchicken :(
18:00 brokenchicken m: say circumfix:«[ ]»(['a', 'b', 'c']) eqv ['a', 'b', 'c']
18:00 camelia rakudo-moar c98b3a: OUTPUT«True␤»
18:01 sena_kun Hmm...
18:01 brokenchicken m: say circumfix:«[ ]»($_) === $_ with ['a', 'b', 'c']
18:01 camelia rakudo-moar c98b3a: OUTPUT«False␤»
18:01 arnsholt joined #perl6
18:01 sena_kun I guess [] can be used instead. brokenchicken++
18:02 ggherdov joined #perl6
18:02 brokenchicken wonder if it's existence is just an implementation detail...
18:02 brokenchicken its
18:03 sena_kun "its existence" - '( )' thing?
18:03 cdg joined #perl6
18:03 brokenchicken m: circumfix:«( )»('a', 'b', 'c')
18:03 camelia rakudo-moar c98b3a: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    circumfix:<( )> used at line 1. Did you mean 'circumfix:<{ }>', 'circumfix:<:{ }>', 'circumfix:<[ ]>'?␤␤»
18:03 brokenchicken The circumfix:«[ ]»
18:03 brokenchicken sena_kun: what example is it anyway?
18:04 sena_kun brokenchicken, operators.pod.
18:04 sena_kun https://docs.perl6.org/language/operators.html
18:05 sena_kun The table says we have '.()' operator. :/
18:06 ggherdov joined #perl6
18:06 brokenchicken "Each operator is also available as a subroutine". I wonder if that's actually true.
18:08 brokenchicken Like 2² comes to mind
18:08 brokenchicken Or ».
18:08 brokenchicken m: say &postfix:<».>
18:08 camelia rakudo-moar c98b3a: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed postfix␤at <tmp>:1␤------> 3».7⏏5<EOL>␤    expecting any of:␤        dotty method or postfix␤»
18:09 brokenchicken m: say &postfix:('».')
18:09 camelia rakudo-moar c98b3a: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤You can't adverb ␤at <tmp>:1␤------> 3say &postfix:('».')7⏏5<EOL>␤»
18:09 cdg_ joined #perl6
18:10 lukaramu joined #perl6
18:10 sena_kun brokenchicken, can you file a proper issue against this section?
18:10 * brokenchicken is too lazy
18:11 sena_kun 'kay, I'll do it...
18:11 inra joined #perl6
18:11 brokenchicken sena_kun++
18:12 cale2 Should DateTime be referred to as a "library" a "module" or a "built in type"
18:13 espadrine joined #perl6
18:15 [Coke] m: say DateTime.WHAT
18:15 camelia rakudo-moar c98b3a: OUTPUT«(DateTime)␤»
18:15 [Coke] well, it is a built in type.
18:16 hartenfels It's a class that does Dateish.
18:20 sena_kun s: help
18:20 moritz m: say Class ~ Module
18:20 camelia rakudo-moar c98b3a: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared names:␤    Class used at line 1␤    Module used at line 1␤␤»
18:20 SourceBaby sena_kun, Something's wrong: â�¤ERR: [31m===[0mSORRY![31m===[0m Error while compiling -eâ�¤Undeclared routine:â�¤    help used at line 6â�¤â�¤
18:20 sena_kun s: 5 % 3
18:20 SourceBaby sena_kun, Something's wrong: ␤ERR: Cannot resolve caller sourcery(Int); none of these signatures match:␤    ($thing, Str:D $method, Capture $c)␤    ($thing, Str:D $method)␤    (&code)␤    (&code, Capture $c)␤  in block <unit> at -e line 6␤␤
18:20 cale2 m: say Class ~~ Module
18:20 camelia rakudo-moar c98b3a: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Expected a term, but found either infix ~~ or redundant prefix ~␤  (to suppress this message, please use a space like ~ ~)␤at <tmp>:1␤------> 3say Class ~~7⏏5 Module␤»
18:21 cale2 m: say Class ~~ Module ~~ Library ~~ Package
18:21 camelia rakudo-moar c98b3a: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Expected a term, but found either infix ~~ or redundant prefix ~␤  (to suppress this message, please use a space like ~ ~)␤at <tmp>:1␤------> 3say Class ~~7⏏5 Module ~~ Library ~~ Package␤»
18:21 brokenchicken s: &infix:<%>, \(5, 3)
18:21 SourceBaby brokenchicken, Sauce is at https://github.com/rakudo/rakudo/blob/c98b3a5/src/core/Int.pm#L271
18:21 brokenchicken SourceBaby: help
18:21 SourceBaby brokenchicken, Use s: trigger with args to give to sourcery sub. e.g. s: Int, 'base'. See http://modules.perl6.org/dist/CoreHackers::Sourcery
18:21 sena_kun thanks.
18:22 sena_kun Oh.
18:23 sena_kun m: multi sub infix:<%>($x, $y) return Numeric:D {}
18:23 camelia rakudo-moar c98b3a: OUTPUT«===SORRY!===␤Cannot find method 'has_compile_time_value' on object of type NQPMu␤»
18:23 sena_kun This error message is LTA or it's just me?
18:23 pyrimidine joined #perl6
18:24 sena_kun m: multi sub infix:<%>($x, $y) returns Numeric:D {}
18:24 camelia rakudo-moar c98b3a: ( no output )
18:26 brokenchicken sena_kun: yes, for one it's missing the location of the error
18:27 sena_kun I'll search is it ticketed...
18:28 cale2 Is there a separate Github Repo for examples.perl6.org ?
18:29 cale2 I'd like to request adding an example here, or updating the current one: http://examples.perl6.org/categories/module-management.html
18:29 brokenchicken cale2: it
18:29 brokenchicken cale2: it's listed in the footer of that website
18:30 moritz cale2: yes, https://github.com/perl6/perl6-examples
18:30 sena_kun brokenchicken, https://rt.perl.org/Public/Bug/Display.html?id=130382 - is this can be extended or do we need a new ticket?
18:30 cale2 brokenchicken: thanks. I see that there is some overlap between Examples and the Docs though. For example, there is these two: https://docs.perl6.org/language/modules.html#Distributing_Modules and http://examples.perl6.org/categories/module-management/Fletcher.html
18:31 Geth ¦ Pod-To-HTML/coke/html-test: 36a499bbe9 | (Will "Coke" Coleda)++ | lib/Pod/To/HTML.pm
18:31 Geth ¦ Pod-To-HTML/coke/html-test: Don't manipulate html/xhtml pod sections
18:31 Geth ¦ Pod-To-HTML/coke/html-test:
18:31 Geth ¦ Pod-To-HTML/coke/html-test: Pass it through unchanged.
18:31 Geth ¦ Pod-To-HTML/coke/html-test: review: https://github.com/perl6/Pod-To-HTML/commit/36a499bbe9
18:32 Xhuin joined #perl6
18:32 Xhuin left #perl6
18:32 brokenchicken sena_kun: new ticket. If you run with --ll-exception it gives completely different locations for the two bugs
18:32 sena_kun brokenchicken, noted.
18:40 agentzh joined #perl6
18:42 dugword joined #perl6
18:48 nowan_ joined #perl6
18:52 brokenchicken $/.gist is somewhat tough to understand when it contains a list of Match objects :/
18:52 timotimo because it just puts spaces between each of the match objects?
18:52 timotimo and they end up kind of mushed together at the beginning and end?
18:54 brokenchicken Yeah. Here's the original and my workaround for the LTAness: https://gist.github.com/zoffixznet/98f82d29f6671d57c53374f677141b33
18:55 * brokenchicken vaguely recalls a discussion with AlexDaniel about avoiding literal new lines in Match.gist
18:57 zakharyas joined #perl6
18:59 SmokeMachine m: use params :D; sub f(Int $) { }; f Int
18:59 camelia rakudo-moar c98b3a: OUTPUT«===SORRY!===␤Could not find params at line 1 in:␤    /home/camelia/.perl6␤    /home/camelia/rakudo-m-inst-2/share/perl6/site␤    /home/camelia/rakudo-m-inst-2/share/perl6/vendor␤    /home/camelia/rakudo-m-inst-2/share/perl6␤    CompUnit::Reposi…»
19:01 timotimo yeah, that's kinda bad
19:05 ttttt joined #perl6
19:10 notbenh joined #perl6
19:15 SmokeMachine m: use params :D; class C {Int $.a}; C.new
19:15 camelia rakudo-moar c98b3a: OUTPUT«===SORRY!===␤Could not find params at line 1 in:␤    /home/camelia/.perl6␤    /home/camelia/rakudo-m-inst-2/share/perl6/site␤    /home/camelia/rakudo-m-inst-2/share/perl6/vendor␤    /home/camelia/rakudo-m-inst-2/share/perl6␤    CompUnit::Reposi…»
19:16 SmokeMachine m: use variables :D; class C {Int $.a}; C.new
19:16 camelia rakudo-moar c98b3a: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3use variables :D; class C {Int7⏏5 $.a}; C.new␤    expecting any of:␤        infix␤        infix stopper␤        statement end␤        statement modi…»
19:16 [Coke] "has"
19:16 SmokeMachine m: use variables :D; class C {has Int $.a}; C.new
19:16 camelia rakudo-moar c98b3a: ( no output )
19:17 SmokeMachine m: use attributes :D; class C {has Int $.a}; C.new
19:17 camelia rakudo-moar c98b3a: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable definition of type Int:D (implicit :D by pragma) requires an initializer␤at <tmp>:1␤------> 3use attributes :D; class C {has Int $.a7⏏5}; C.new␤    expecting any of:␤        constraint␤»
19:17 SmokeMachine :)
19:25 rurban1 left #perl6
19:26 zakharyas1 joined #perl6
19:26 setty1 joined #perl6
19:27 notbenh joined #perl6
19:36 plicease joined #perl6
19:38 Geth ¦ doc/operators-reformat: 4d74a9ba14 | Altai-man++ | doc/Language/operators.pod6
19:38 Geth ¦ doc/operators-reformat: We don't need to skip these examples and signatures;
19:38 Geth ¦ doc/operators-reformat:
19:38 Geth ¦ doc/operators-reformat: 'returns' changed to '-->' due to https://github.com/perl6/doc/issues/1024;
19:38 Geth ¦ doc/operators-reformat: review: https://github.com/perl6/doc/commit/4d74a9ba14
19:38 Geth ¦ doc/operators-reformat: 11973c50a9 | Altai-man++ | xt/return-type.t
19:38 Geth ¦ doc/operators-reformat: Check Language/ for return types too
19:38 Geth ¦ doc/operators-reformat: review: https://github.com/perl6/doc/commit/11973c50a9
19:39 SCHAAP137 joined #perl6
19:40 Geth ¦ doc: Altai-man++ created pull request #1180: Operators reformat
19:40 Geth ¦ doc: review: https://github.com/perl6/doc/pull/1180
19:42 perlpilot joined #perl6
19:49 cdg joined #perl6
19:49 gdonald joined #perl6
19:52 dugword joined #perl6
19:55 cdg joined #perl6
20:03 rindolf joined #perl6
20:08 inra joined #perl6
20:10 agentzh in our perl 6 dialect, fanlang, i've made the decision to introduce a builtin class, Actions, which can be the parent of user-defined actions class.
20:10 yoleaux 1 Feb 2017 21:34Z <brokenchicken> agentzh: yeah fanlang licenses for rakudo devs would be sweet. To see if we can steal any ideas.
20:11 perlpilot agentzh: what does the built-in Actions class do?
20:11 agentzh The Actions base class provides the get-line() and get-line-column() methods which can be optimized inside the grammar engine.
20:12 agentzh also, fanlang's grammar engine has automatic error message reporting upon parse failures. something like "expecting a(n) expression but got ...".
20:13 agentzh similar to Damion's Parse::RecDescent parsing module.
20:13 perlpilot I've occasionally wished (before Grammar::Debugger existed) for an auto-generated Actions class that just printed some info about what's matching and where.
20:13 agentzh perlpilot: Grammar::Debugger is for compiler developers, not users :)
20:14 perlpilot There's users and there's *USERS*  Much of #perl6 fall in the latter category  :)
20:14 teatime Are you saying I have a problem?  I can quit any time.
20:14 agentzh perlpilot: fanlang also comes with a builtin grammar tracer, whose output is similar to Pegex. It's much readable for large grammars than p6's Grammar::Trace IMHO :)
20:14 timotimo don't quit during teatime
20:14 perlpilot heh
20:15 agentzh i often got lost while debugging parse failures in my perl 6 parser using the latter.
20:15 agentzh since my grammar is huge.
20:16 agentzh perlpilot: yeah, i mean most #perl6 members' own users.
20:16 agentzh when we write products in perl 6, the products' users do not necessarily know perl 6, or even perl.
20:17 agentzh asking them to use a tracer is too much.
20:17 labster joined #perl6
20:17 agentzh and manually add "traps" to the parser itself to take care of every possible error cases like rakudo does itself is also too much a burden on the parser develoeprs' side.
20:18 agentzh but i agree it still makes sense to generate more user friendly message for common cases using the manual way.
20:18 labster joined #perl6
20:19 agentzh oh well, it never hurts to generate a human readable error message on the parse failure position automatically anyway :)
20:19 FROGGS joined #perl6
20:19 agentzh now i'm hacking on fanlang's support for the Perl 6 packages and modules (compilation units). i'll ensure that it works nicely with make -jN.
20:20 agentzh i spent 2 days getting rakudo to work with make -jN, but it never comes close to the speed of compiling an all-in-one .p6 script merging all the .pm6 files.
20:20 cdg joined #perl6
20:26 cdg joined #perl6
20:27 agentzh brokenchicken: cool! glad you like it :)
20:27 cdg_ joined #perl6
20:28 bjz joined #perl6
20:28 imcsk8 joined #perl6
20:29 agentzh implementing Perl 6 is also so much fun, especially when we have rakudo as a mature reference impl in terms of language features.
20:29 cdg joined #perl6
20:29 agentzh otherwise it would be much harder.
20:30 agentzh it's always great to have something proven to play with.
20:32 iH2O joined #perl6
20:34 bstamour joined #perl6
20:36 brokenchicken agentzh: FWIW, we also have #perl6-devb
20:37 brokenchicken If you want to follow any of design convos :)
20:37 brokenchicken I meant #perl6-dev
20:37 cdg_ joined #perl6
20:37 Tonik joined #perl6
20:38 agentzh brokenchicken: oh, good to know there's another channel.
20:38 agentzh joining
20:38 agentzh brokenchicken: sorry for OT here.
20:38 iH2O left #perl6
20:39 brokenchicken It's fine :) The primary reason for separate channel I think is that this channel has too much traffic for all the devs to backlog :)
20:39 brokenchicken + bot spam
20:41 cale2 agentzh: Are you making a new compiler for NQP?
20:41 Ven joined #perl6
20:43 agentzh cale2: not NQP, but our own perl 6 dialect. our goal is to make it as close to the final perl 6 as possible.
20:43 agentzh and also much faster than perl *5*.
20:44 cale2 agentzh: Are you running it through the official test suite?
20:44 agentzh though we reserve the right to do things differently in the grammar engine since we are not very happy with perl 6's grammar engine design.
20:45 agentzh cale2: not yet. we are preparing our own test suite. since the official one seems to depend on Test.pm6, which is undesired.
20:45 cale2 interesante
20:45 agentzh our test scaffold uses rakudo as the reference impl though.
20:46 cale2 agentzh: Is there a blog post or anything describing the motivation behind the project and where/how it will deviate from Rakudo Perl6?
20:46 agentzh it can automatically generate the output of rakudo feeding the same p6 program.
20:46 agentzh that's mostly how we do comparison in our test suite.
20:47 agentzh cale2: i've been talking alot about fanlang on #perl6 recently. below is the IRC log search: https://irclog.perlgeek.de/perl6/search/?nick=agentzh&amp;q=fanlang
20:47 agentzh but sure we'll write formally about it when it is mature enough.
20:48 agentzh it's just passed its 2 month birthday :)
20:48 agentzh you can see a fanlang example here: https://github.com/agentzh/perl-parsing-library-benchmark
20:48 agentzh with benchmark results compared to perl 5 and rakudo.
20:49 agentzh though that example only exercises a very small part of fanlang's implemented language features.
20:50 agentzh we're porting a real-world DSL compiler from p5 to fanlang this month, about 9K LOC in perl 5.
20:50 agentzh a large beast.
20:50 agentzh cale2: it shares nothing with rakudo in terms of implementation.
20:51 agentzh cale2: it's a from-scratch project targeting openresty and luajit.
20:51 agentzh currently fanlang's compiler is written in perl 5/pegex.
20:51 agentzh it'll soon get rewritten in fanlang itself and complete the bootstrapping process.
20:51 agentzh fanlang generates Lua code for LuaJIT and OpenResty.
20:52 agentzh we may add a JS backend targeting web browsers in the near future :)
20:53 moritz stop taunting us, provide a preview instead!
20:53 El_Che http://claudio.ulyssis.be/var/tmp/images/donaldpl6.gif
20:53 El_Che (zoom in)
20:53 mspo man I really want to use p6 for a website but don't want to write everything from scratch :(
20:53 El_Che someone sent that to me :)
20:54 mspo might end up with.. php
20:54 agentzh moritz: no, no, no, i was not taunting.
20:54 agentzh just sharing and answering questions :)
20:54 agentzh moritz: our company will give free licenses of fanlang to all rakudo developers for noncommercial use soon :)
20:55 agentzh after it gets bootstrapped.
20:55 agentzh mspo: fanlang will be able to write web apps atop the openresty platform.
20:56 agentzh in (kinda) perl 6 :)
20:56 mspo grav looks kind of nice
20:56 agentzh we even have perl's TT2 templating for openresty! :)
20:56 agentzh https://github.com/openresty/lemplate
20:56 mspo it's tough to be in a hurry; I'd even rather try elixir
20:56 agentzh since fanlang targets openresty, all the openresty ecosystem will be available to fanlang as well :)
20:57 El_Che agentzh: what's the ethymology of fanlang?
20:58 sena_kun mspo, try yesod(not ad). :)
20:59 mspo sena_kun: every time I try to do something new I end up getting bogged down in learning new foo and giving up :)
21:00 mspo also how I ended up knowing a little bit of erlang and alittle bit of go
21:00 mspo and even less perl6 ;)
21:00 El_Che mspo: a little bit of go is probably 90% of the language. Pretty small
21:00 daxim stack泛滥
21:01 mspo El_Che: yeah I'm surprised how much of it I do know
21:01 mspo El_Che: like enough to troubleshoot and understand basic stuff
21:01 mspo I've written practically nothing
21:02 El_Che mspo: I wrote a small toy app to learn it and it ended in production. That small :)
21:02 cale2 mspo: yeah, i'm pretty much a perpetual learner too. I learned elixir but OTP feels weird to write. Like each module is it's own process/gen_server. And you're writing functions that respond to messages sent by itself
21:02 cale2 I can't help think, "There's gotta be a better way"
21:02 sena_kun mspo, hmmm... For me it's the opposite. It is hard to learn something to just learn(if it is not CS theory, but some framework or something alike), but if I need to produce some piece of software, it is a good task to learn in progress. The negative point of such approach is that such software is a good target for rewriting from scratch after you actually "learned" how to do this "right". (:
21:02 mspo cale2: erlang is a little nuts
21:03 agentzh have you guys looked at openresty yet?
21:03 mspo but the whole "distributed computer" paradigm is really appealing
21:04 agentzh it's an open source web platform for almost a decade :)
21:04 agentzh https://openresty.org
21:04 cale2 mspo: I agree. But I think if we just sit back and wait, there will be an API that makes it all extremely trivial
21:04 mspo agentzh: a division of my company is using it as a front-door
21:05 agentzh mspo: cool :)
21:05 agentzh we're getting perl 6 run on it, which is fanlang.
21:05 mspo agentzh: I proposed a similar design before finding out about it too
21:05 agentzh at least a perl 6 dialect.
21:05 agentzh we'll open source the unoptimized version of fanlang to the community.
21:05 mspo but I've known about openresty (mostly because it's fast fast fast) for a few years
21:05 yqt joined #perl6
21:06 agentzh yeah, we are serious about performance and C10K.
21:06 mspo El_Che: golang has their shit together with toolings and editor hints and stuff
21:06 mspo agentzh: I feel like it was at the top of that web framework benchmarks thing fo ra while
21:07 cale2 For example, http://unisonweb.org/ aims to make distributed computing quite trivial. The abstraction makes more sense to me than erlang/elixir
21:07 El_Che mspo: yeah. Intellij support is pretty nice (and there is a go standalone ide coming from them). THey versioning is really bad though (as in none). They are working on it (at least they acknowledged)
21:07 agentzh mspo: that's why many busy sites choose us :)
21:08 cale2 mspo: The tooling actually feels quite restricted in practice. I'd rather have `go build` just put the output inside the project directory than into the bin on the gopath
21:08 cale2 the gopath is really annoying
21:08 pyrimidine joined #perl6
21:08 * El_Che bbl
21:09 mspo cale2: I got over that pretty quickly.  I was already beaten into submission by maven's layout requirements :)
21:09 mspo cale2: I'm talking about stuff like guru
21:10 mspo go vet, gofmt
21:11 cale2 mspo: yeah. I actually kind of like the corporate aspect too. It's less pressure on the community. For example, if interest wanes, it doesn't matter because Google is paying people to continue improving it
21:11 lizmat joined #perl6
21:14 bjz joined #perl6
21:37 samcv I have made a page on how to setup Atom as a Perl 6 IDE cale2 https://github.com/samcv/Atom-as-a-Perl6-IDE
21:37 yoleaux 15:23Z <tbrowder> samcv: Can you tell us, please,  what package for atom will show lists of p6 subs, vars, and classes on the menu bar?
21:38 samcv .till tbrowder please see https://github.com/samcv/Atom-as-a-Perl6-IDE I have made a writeup on it :)
21:39 geekosaur "tell"?
21:40 samcv .tell tbrowder please see https://github.com/samcv/Atom-as-a-Perl6-IDE I have made a writeup on it :)
21:40 yoleaux samcv: I'll pass your message to tbrowder.
21:41 El_Che samcv: doest it break perl5 support?
21:41 samcv no
21:41 samcv why would it break perl 5 support
21:42 El_Che it did in the past
21:42 samcv it will use perl 5 highlighting package for .pm and .pl files and use atom-language-perl6 for .pl6, .p6, .pm6, .nqp
21:42 samcv idk i probably fixed that
21:42 samcv i remember something about that, but i forget what I did
21:42 El_Che great to hear!
21:42 samcv :)
21:43 perlpilot samcv++
21:43 samcv i am so in love with nav-panel-plus
21:43 samcv https://github.com/samcv/Atom-as-a-Perl6-IDE/raw/master/images/nav-marker-plus.png
21:43 samcv so glad I found it
21:43 El_Che I ended adding systax error support to vim, but it's outdated. Need to find time to look at that again
21:44 samcv look at what?
21:44 sena_kun m: [while $++ < 2 { 42.say; 43 }].map: *.say;    # says 42 twice then 43 twice
21:44 camelia rakudo-moar c98b3a: OUTPUT«42␤42␤43␤43␤»
21:44 Geth ¦ doc: 9936aa8080 | (Wenzel P. P. Peppmeyer)++ | doc/Language/control.pod6
21:44 Geth ¦ doc: doc postfix form of `for`
21:44 Geth ¦ doc: review: https://github.com/perl6/doc/commit/9936aa8080
21:45 El_Che vim perl6 support now rakudo throws out json errorq
21:45 El_Che s
21:45 samcv wait vim has json errors?
21:45 cale2 samcv is that a draft you're gonna join with the official repo?
21:46 samcv probably
21:46 samcv not sure where to put it
21:46 samcv but for now it's there
21:46 samcv and i have my config for nav-marker-plus
21:46 samcv in that repo
21:47 perlpilot sena_kun: as it should.
21:47 samcv maybe could get them to add my config to the nav-marker-plus repo
21:47 samcv once I get it so it's doing it on based on filetype. it wasn't working when I tried
21:47 El_Che rakodo can be set to output json errors
21:47 samcv but nav-marker-plus has support for it
21:47 samcv oh
21:47 El_Che vim can then mark where the error is and show the message
21:47 sena_kun perlpilot, yep. My 2017.01-144-gf2894d3 does this example wrong.
21:48 El_Che my hack did it as well, but it predates the json thing
21:48 El_Che so regex based and fragile for future releases
21:48 El_Che rakuso json errors fixes that
21:48 El_Che but vimscript was not fun
21:50 samcv vimscript sounds terrifying
21:50 teatime it... could be worse?  :)
21:51 perlpilot samcv: I've only used vimscript sparingly but it's no more terrifying than shell script or tcl or awk or etc.
21:52 cale2 what about https://neovim.io/
21:52 cale2 doesn't that use python or lua?
21:52 perlpilot samcv: it's less trouble than lisp even  :)
21:54 teatime I should give emacs a serious try; evil mode is well-regarded, too.
21:54 cale2 teatime: http://spacemacs.org/
21:58 kyan joined #perl6
22:01 bjz_ joined #perl6
22:01 nowan joined #perl6
22:11 atweiden-air joined #perl6
22:12 travis-ci joined #perl6
22:12 travis-ci Doc build passed. Altai-man 'Check Language/ for return types too'
22:12 travis-ci https://travis-ci.org/perl6/doc/builds/198124782 https://github.com/perl6/doc/compare/4d74a9ba1447^...11973c50a986
22:12 travis-ci left #perl6
22:16 TEttinger joined #perl6
22:16 atweiden-air I'm seeing "Package 'Finn::Parser::Actions' already has an attribute named '$!horizontal-rule'", but Finn::Parser::Actions has no attribute named that
22:17 atweiden-air Actions is using a class ParseTree that has exported roles which do have a $!horizontal-rule attr
22:17 atweiden-air when i rename those attributes, it's still throwing the same error message
22:19 perlpilot atweiden-air: show the code?
22:19 mr-foobar joined #perl6
22:22 atweiden-air the only attributes in Actions are $.file and $.section (https://github.com/atweiden/finn/blob/a79be86b319ad0cf1035300f11a67a64ed27ff79/lib/Finn/Parser/Actions.pm#L49)
22:24 atweiden-air changing this $!horizontal-rule and the other in the same file does nothing (https://github.com/atweiden/finn/blob/a79be86b319ad0cf1035300f11a67a64ed27ff79/lib/Finn/Parser/ParseTree.pm#L152)
22:26 geekosaur joined #perl6
22:26 brokenchicken try nuking .precomp dir?
22:27 perlpilot and turning off precomp while developing
22:27 perlpilot brokenchicken: my gut says that's it.  :)
22:28 brokenchicken my gut says atweiden-air is probably editing the wrong file :)
22:28 perlpilot who knows?
22:28 lucs perlpilot: How do you turn off precomp?
22:29 brokenchicken Man, why does atom suck so much with sshfs -_-
22:29 atweiden-air brokenchicken: did that, does nothing
22:30 brokenchicken atweiden-air: how can we reproduce the issue?
22:30 atweiden-air git clone https://github.com/atweiden/finn ; cd finn ; PERL6LIB=lib perl6 -MFinn::Parser::Actions -e '"hello".say'
22:31 brokenchicken That's an LTA error :/ doesn't tell where the problem is :\
22:32 perlpilot lucs: I was looking for some handy docs to point you at, but I can't find any  :-(   Add "no precompilation;" to the script.
22:32 brokenchicken $ grep -nFR '$.horizontal-rule'
22:32 brokenchicken lib/Finn/Parser/ParseTree.pm:152:    has HorizontalRule:D $.horizontal-rule is required;
22:32 brokenchicken lib/Finn/Parser/ParseTree.pm:544:    has HorizontalRule:D $.horizontal-rule is required;
22:32 brokenchicken Is that the same class?
22:33 atweiden-air i changed both those attributes, but to no effect
22:33 lucs perlpilot: Okay, noted, thanks.
22:33 atweiden-air you can load ParseTree just fine with perl6 -MFinn::Parser::ParseTree
22:33 atweiden-air it's only Actions that fails to compile
22:34 bjz joined #perl6
22:35 brokenchicken hehe, well, I reproed that. Looking deeper
22:35 avalenn joined #perl6
22:37 brokenchicken atweiden-air: that `has` feels misplaced. It is meant to be there? lib/Finn/Parser/Actions.pm:474:    has HorizontalRule:D $horizontal-rule
22:37 brokenchicken There's a bunch more in that file
22:38 pyrimidine joined #perl6
22:38 brokenchicken and that makes a class attribute
22:38 atweiden-air brokenchicken: that would be a likely culprit; yes unintended
22:38 brokenchicken m: class { method meow { has $meows = 'meow' } }.meow.say
22:38 camelia rakudo-moar c98b3a: OUTPUT«Nil␤»
22:39 brokenchicken m: class { method meow { has $meows = 'meow' } }.meows.say
22:39 camelia rakudo-moar c98b3a: OUTPUT«No such method 'meows' for invocant of type '<anon|59760752>'␤  in block <unit> at <tmp> line 1␤␤»
22:39 brokenchicken hm
22:39 brokenchicken m: class { method meow { has $meows = 'meow' }; method meow2 { has $meows = 'meow' } }.meows.say
22:39 atweiden-air yes, that was it
22:39 camelia rakudo-moar c98b3a: OUTPUT«===SORRY!===␤Package '<anon|65733072>' already has an attribute named '$!meows'␤»
22:40 brokenchicken aha
22:40 brokenchicken So seems like it should be complaining about it, but it silently does half a job.
22:40 * brokenchicken will create a ticket
22:41 brokenchicken oh wait, class attribute are my $.foo; the `has $meows` ain't a thing AFAIK
22:41 brokenchicken So it should be throwing
22:43 avalenn joined #perl6
22:44 brokenchicken m: class { has $foo = 42; method bar { $!foo } }.new.bar.say
22:44 camelia rakudo-moar c98b3a: OUTPUT«42␤»
22:45 brokenchicken m: class { has $foo = 42; method bar { $!foo } }.^attributes.say
22:45 camelia rakudo-moar c98b3a: OUTPUT«(Mu $!foo)␤»
22:45 brokenchicken Seems a way to make a private attribute :S
22:46 brokenchicken .ask jnthn is `has $foo` (note, no twigil) supposed to be a working syntax for creating private attributes, as it does now, or should that throw?
22:46 yoleaux brokenchicken: I'll pass your message to jnthn.
22:46 cdg joined #perl6
22:47 brokenchicken Ticket for LTA error: https://rt.perl.org/Ticket/Display.html?id=130714
22:51 dugword joined #perl6
22:52 Geth ¦ doc/language-section-examples2: 08b2fcbb91 | Altai-man++ | 26 files
22:52 Geth ¦ doc/language-section-examples2: Language/ examples output unification (last part)
22:52 Geth ¦ doc/language-section-examples2: review: https://github.com/perl6/doc/commit/08b2fcbb91
22:56 Geth ¦ doc: Altai-man++ created pull request #1181: Unify Language/ examples output style
22:56 Geth ¦ doc: review: https://github.com/perl6/doc/pull/1181
22:56 cdg_ joined #perl6
22:59 pyrimidine joined #perl6
23:07 avalenn joined #perl6
23:07 Technaton joined #perl6
23:11 wamba joined #perl6
23:12 Geth ¦ ecosystem: bf218244e5 | (Wenzel P. P. Peppmeyer)++ | META.list
23:12 Geth ¦ ecosystem: META.info - META6.json
23:12 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/bf218244e5
23:18 rindolf joined #perl6
23:22 cdg joined #perl6
23:25 lep_ joined #perl6
23:26 cdg_ joined #perl6
23:40 skids joined #perl6
23:46 adu joined #perl6
23:49 cibs joined #perl6
23:54 dugword joined #perl6

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

Perl 6 | Reference Documentation | Rakudo