Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-12-31

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:01 clasclin Hi, I have some trouble with actions in grammars. The perl6 version is 2016.11 on ubuntu 16.04 x86_64
00:01 clasclin The error is: This type cannot unbox to a native integer: P6opaque, Failure
00:01 clasclin Here is some code I'm working http://pastebin.com/V2QycXMj
00:02 clasclin It's not pretty, sorry for that
00:02 notviki eh
00:02 notviki clasclin: can you run it with --ll-exception switch and pastebin the output?
00:02 notviki perl6 --ll-exception the-file-with-code.p6
00:03 notviki I guess unlike Perl 5 we don't immediatelly shout about parsing HTML with regexes? :P
00:04 notviki s/Perl5/#perl/;
00:05 notviki Ahhh
00:05 notviki haha
00:05 notviki clasclin: I have a hint of what it is
00:06 notviki m: say grammar { token TOP { <head> }; token head { .+ } }.parse: "xxxx", :actions(class {})
00:06 camelia rakudo-moar 87fefa: OUTPUT«Cannot resolve caller head(<anon|57551216>: Match); none of these signatures match:␤    (Any:D $: *%_)␤    (Any:D $: Cool $n, *%_)␤  in any !reduce at /home/camelia/rakudo-m-inst-1/share/nqp/lib/QRegex.moarvm line 1␤  in regex head at <tmp> line 1…»
00:06 notviki hm, no, fails with different error
00:06 notviki m: Any.^lookup('link').say
00:06 camelia rakudo-moar 87fefa: OUTPUT«(Mu)␤»
00:07 notviki m: Any.^lookup('div').say
00:07 camelia rakudo-moar 87fefa: OUTPUT«(Mu)␤»
00:07 clasclin Here is the output http://pastebin.com/KMV63RR4
00:07 notviki oh heh, I *did* guess it right!
00:08 notviki cognominal: 2016.11 say grammar { token TOP { <head> }; token head { .+ } }.parse: "xxxx", :actions(class {})
00:08 notviki cognominal: sorry
00:08 notviki committable6: 2016.11 say grammar { token TOP { <head> }; token head { .+ } }.parse: "xxxx", :actions(class {})
00:08 committable6 notviki, https://gist.github.com/56cf80a12f3b3799f01affefa251add0
00:09 notviki m: say Match ~~ Cool
00:09 camelia rakudo-moar 87fefa: OUTPUT«True␤»
00:09 clasclin well I also try with perl6-debug-m and it just stop in the '</head>' part of my code but don't know what that means
00:09 notviki m: say grammar { token TOP { <head> }; token head { .+ } }.parse: "xxxx", :actions(class { method head ($) {} })
00:09 camelia rakudo-moar 87fefa: OUTPUT«「xxxx」␤ head => 「xxxx」␤»
00:10 notviki clasclin: basically all classes inherit from Any and Mu. This means your Actions class has all of these "extra" methods by default. One of them is .head() and because it's absent in your Actions class definition it's handled by Any.head()
00:10 notviki for the <head> token, because there's .head() method
00:11 notviki clasclin: so just add method head($) {} into your actions class as a no-op or define a proper actions method for that token
00:11 notviki m: class {}.^methods(:all)».name.sort.say
00:11 camelia rakudo-moar 87fefa: OUTPUT«(ACCEPTS ACCEPTS ASSIGN-KEY ASSIGN-POS AT-KEY AT-POS Array BIND-KEY BIND-POS BUILDALL BUILD_LEAST_DERIVED Bag BagHash Bool CREATE Capture DELETE-KEY DELETE-POS DUMP DUMP-OBJECT-ATTRS DUMP-PIECES EXISTS-KEY EXISTS-POS FLATTENABLE_HASH FLATTENABLE_LIST Hash …»
00:11 notviki ^ if you run that you'll see all the methods that would conflict like that
00:12 notviki m: class {}.^methods(:all).elems.say
00:12 camelia rakudo-moar 87fefa: OUTPUT«137␤»
00:12 notviki sheesh
00:13 notviki clasclin: that's also a gotcha even when you don't specify an Actions class, because then you end up with Mu as "default" actions and that still has a few methods
00:13 notviki m: Mu.^methods(:all).elems.say
00:13 camelia rakudo-moar 87fefa: OUTPUT«52␤»
00:13 notviki Or "few" I should say
00:15 notviki m: say grammar { token TOP { <head> }; token head { .+ } }.parse: "xxxx", :actions(class { BEGIN { ?::CLASS.^method_add(.name, {}) for Any.^methods(:all) }})
00:15 camelia rakudo-moar 87fefa: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤No such symbol 'CLASS'␤at <tmp>:1␤------> 3xxxx", :actions(class { BEGIN { ?::CLASS7⏏5.^method_add(.name, {}) for Any.^methods␤»
00:15 pierre_ joined #perl6
00:15 notviki m: say grammar { token TOP { <head> }; token head { .+ } }.parse: "xxxx", :actions(class { BEGIN { ::?CLASS.^method_add(.name, {}) for Any.^methods(:all) }})
00:15 camelia rakudo-moar 87fefa: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤An exception occurred while evaluating a BEGIN␤at <tmp>:1␤Exception details:␤  No such method 'method_add' for invocant of type 'Perl6::Metamodel::ClassHOW'␤    in block  at <tmp> line 1␤␤»
00:15 notviki m: say grammar { token TOP { <head> }; token head { .+ } }.parse: "xxxx", :actions(class { BEGIN { ::?CLASS.^add_method(.name, {}) for Any.^methods(:all) }})
00:15 camelia rakudo-moar 87fefa: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤An exception occurred while evaluating a BEGIN␤at <tmp>:1␤Exception details:␤  5===SORRY!5=== Error while compiling ␤  Package '<anon|60644224>' already has a hash 'ACCEPTS' (did you mean to decl…»
00:15 notviki screw you, robot
00:18 clasclin Let me see if I get ir right. So what if I just change the token head for other name it still will conflict with Mu or Any ?
00:19 notviki clasclin: yeah, you can just change the name of the token to some other name that isn't the same as the name of the Any/Mu methods
00:21 mscha joined #perl6
00:21 clasclin Oh I see. I will try any of your suggestions, the ^methods and everything else. Sorry for the bad english and thanks for the help :)
00:22 mscha Quick question: what is the Perl 6 equivalent of Perl 5's grep(!/foo/, @list)?
00:22 mscha @list.grep(* !~~ /foo/) works, but is there a more elegant way?
00:25 notviki well, ({!/foo/})
00:25 mscha OK, that works.  Thanks.
00:33 mscha Interesting: @list.grep({!/foo/}) is much slower than @list.grep(* !~~ /foo/) ...
00:34 notviki m: say &infix:<!~~>
00:34 camelia rakudo-moar 87fefa: OUTPUT«sub infix:<!~~> (Mu \topic, Mu \matcher) { #`(Sub|47056368) ... }␤»
00:34 notviki mscha: I guess it has shortcuruiting for when it knows it won't be able to match
00:35 notviki FWIW, if it *is* just a simple string, use grep(*.contains('foo').not)
00:35 notviki prolly be much faster still
00:35 kurahaupo joined #perl6
00:41 kalkin- joined #perl6
01:12 aborazmeh joined #perl6
01:12 aborazmeh joined #perl6
01:15 njmurphy_ joined #perl6
01:16 njmurphy joined #perl6
01:17 samcv heh. on the unicode mailing list. some people having a hearty discussion on what character to use for an unknown numerical character
01:17 samcv for use in transcribing historical documents
01:17 samcv cause you have to put something down to properly transcibe it
01:18 samcv most of the stuff people post about isn't really relevant to perl 6 implementation, but there seems to be lots of things people need to properly transcribe things
01:18 notviki .oO( clearly it'd be a ZWS sequence with the shrug emoji )
01:20 samcv heh
01:20 samcv curious what the properties of � (replacement character) is
01:20 samcv the visual of that character is undefined but for me renders as a ? and box
01:20 samcv but it has no actual meaning other than replacement character
01:20 notviki for me a ? in a diamond
01:21 samcv One Unicode character specifically for this purpose is U+3013 GETA MARK. It
01:21 samcv is a Japanese symbol used to replace characters that cannot be read during
01:21 samcv transcription of manuscripts (source: Japanese Wikipedia). It looks like a
01:21 samcv bold equals sign: 〓.
01:21 samcv wow that is pretty neat
01:22 samcv doesn't really look like an euals sign though, more like just two thick horizontal bars
01:23 geekosaur depends on the font
01:23 geekosaur (it does here)
01:24 samcv u: INVISIBLE LETTER
01:24 unicodable6 samcv, Found nothing!
01:24 samcv sad!
01:24 samcv well it's only proposed
01:24 samcv invisible letter
01:25 samcv and you can put combining marks on it
01:25 samcv cause combining marks have to go on something
01:25 samcv u: U+2427
01:25 unicodable6 samcv, U+2427 <reserved> [Cn] (␧)
01:28 samcv Could not read all of this word: Able〓r〓t
01:28 samcv kinda nice
01:32 kalkin- What does the word docee—used by p6doc—mean? Is it somehow defined? Because as far as i see it can bee a module, an method/routine or even be a Type::Str.foo form
01:32 kalkin- or is it just short for documentation entry?
01:33 notviki a wild guess would be a.. umm.. documentable item... Like chatter/chattee, and other nouns formed that way
01:36 AlexDaniel [Coke]: shouldn't we turn it into NYI ticket instead?
01:42 dalek doc: e88d06f | rightfold++ | doc/Language/list.pod6:
01:42 dalek doc: Remove pre-GLR @-sigil LoL assignment note
01:42 dalek doc: review: https://github.com/perl6/doc/commit/e88d06ff22
01:42 dalek doc: 87a2e59 | (Zoffix Znet)++ | doc/Language/list.pod6:
01:42 dalek doc: Merge pull request #1080 from rightfold/patch-1
01:42 dalek doc:
01:42 synopsebot6 Link: http://doc.perl6.org/language/list
01:42 synopsebot6 Link: http://doc.perl6.org/language/list
01:42 dalek doc: Remove pre-GLR @-sigil LoL assignment note
01:42 dalek doc: review: https://github.com/perl6/doc/commit/87a2e59e6f
01:42 notviki There are seem to be some unreviewed doc PRs: https://github.com/perl6/doc/pulls
01:52 dalek doc: b334ef7 | coke++ | doc/Language/regexes.pod6:
01:52 dalek doc: Remove docs for non-existent feature.
01:52 dalek doc:
01:52 dalek doc: Closes #1093
01:52 dalek doc: review: https://github.com/perl6/doc/commit/b334ef7d9f
01:52 dalek doc: bb8e1eb | coke++ | xt/words.pws:
01:52 dalek doc: learn new words
01:52 dalek doc: review: https://github.com/perl6/doc/commit/bb8e1eb29f
01:52 synopsebot6 Link: http://doc.perl6.org/language/regexes
01:56 cibs joined #perl6
01:56 [Coke] .
01:57 notviki :
02:03 AlexDaniel
02:06 cibs joined #perl6
02:11 pyrimidi_ joined #perl6
02:16 facetious
02:16 tailgate joined #perl6
02:21 curt_ joined #perl6
02:40 kalkin-_ 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 pyrimidine joined #perl6
02:48 [Coke] AlexDaniel: turn which? bdf's RT?
02:48 [Coke] about regex char classes?
02:48 AlexDaniel yea
02:49 [Coke] no. there's no intent to implement it.
02:51 AlexDaniel why does the book depend on this shit by the way
02:57 curt_ If I want to make my own multi sub infix:<eqv>() and have others who don't use my module call it when eqv-ing my objects, how do I make it 'global'
02:59 notviki curt_: you can't make it global, but you can mark is as `is export` to export it into the scope of the used module
03:00 notviki m: package Foo { multi sub infix:<eqv>(Bar, Bar) is export { say "hi" } }; import Foo; class Bar {}; Bar eqv Bar
03:00 camelia rakudo-moar 73182d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Invalid typename 'Bar' in parameter declaration. Did you mean 'Bag'?␤at <tmp>:1␤------> 3package Foo { multi sub infix:<eqv>(Bar7⏏5, Bar) is export { say "hi" } }; import ␤»
03:00 notviki m: package Foo { class Bar {…}; multi sub infix:<eqv>(Bar, Bar) is export { say "hi" } }; import Foo; class Bar {}; Bar eqv Bar
03:00 camelia rakudo-moar 73182d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤The following packages were stubbed but not defined:␤    Foo::Bar␤at <tmp>:1␤------> 3}; import Foo; class Bar {}; Bar eqv Bar7⏏5<EOL>␤    expecting any of:␤        statement end␤        st…»
03:00 * notviki sighs
03:01 pyrimidine joined #perl6
03:01 notviki m: package Foo { class Bar {}; multi sub infix:<eqv>(Bar, Bar) is export { say "hi" } }; import Foo; Bar eqv Bar
03:01 camelia rakudo-moar 73182d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared name:␤    Bar used at line 1. Did you mean 'Bag'?␤Undeclared routine:␤    eqv used at line 1␤␤»
03:01 notviki Well, you get the idea
03:04 [Coke] AlexDaniel: ? he noticed an issue and reported it.
03:04 AlexDaniel [Coke]: I was referring to the ticket that depends on this issue, but nevermind…
03:05 dalek doc: 1a9df19 | (Zoffix Znet)++ | doc/Language/variables.pod6:
03:05 dalek doc: Unset $*HOME is `Any`, not `Nil`
03:05 dalek doc: review: https://github.com/perl6/doc/commit/1a9df196a9
03:05 synopsebot6 Link: http://doc.perl6.org/language/variables
03:08 curt_ Yeah, I did that.  If I export, then $a eqv $b will call my eqv, but if I @alist = ($a), @blist = ($b), then @alist eqv @blist, it won't call my eqv
03:09 xinming joined #perl6
03:09 notviki curt_: yeah, because that'll use the eqv for comparing Arrays that isn't in scope of your exported candidate
03:09 curt_ I'm really trying to make Test is-deeply() eqv compare my objects deep inside another class use my eqv for that class
03:10 notviki * I mean the Array multi will descend and compare guts with eqv and yours isn't in scope
03:10 curt_ right, how can I export mine so it will get found by others
03:16 noganex joined #perl6
03:17 notviki Don't know.
03:17 notviki Let me know if you find out.
03:20 curt_ notviki: it seems like the default for sub is lexical scope, but perhaps I could "our" it?  If "our multi sub infix:<eqv>...", I get Cannot use 'our' with individual multi candidates. Please declare an our-scoped proto instead.  I tried some "our proto infix:<eqv> ..." but couldn't get it to work
03:20 notviki our is also lexical
03:21 curt_ I thought our would add it to the symbol table where others would find mine
03:21 zacts joined #perl6
03:24 notviki m: class Bar {}; our proto infix:<eqv> (|) {*}; multi infix:<eqv> (Bar, Bar) { say "hi" }; multi infix:<eqv> (|c) { &CORE::infix:<eqv>(|c) }; Bar eqv Bar; say 42 eqv 5
03:24 camelia rakudo-moar 73182d: OUTPUT«hi␤False␤»
03:24 notviki m: class Bar {}; our proto infix:<eqv> (|) {*}; multi infix:<eqv> (Bar, Bar) { say "hi" }; multi infix:<eqv> (|c) { &CORE::infix:<eqv>(|c) }; Bar eqv Bar; say 42 eqv 42
03:24 camelia rakudo-moar 73182d: OUTPUT«hi␤True␤»
03:24 notviki curt_: try with that ^ but I doubt it will work
03:25 notviki I guess I can try with the bot
03:25 notviki m: use Test; class Bar {}; our proto infix:<eqv> (|) {*}; multi infix:<eqv> (Bar, Bar) { say "hi" }; multi infix:<eqv> (|c) { &CORE::infix:<eqv>(|c) }; is-deeply Bar, Bar;
03:25 camelia rakudo-moar 73182d: OUTPUT«ok 1 - ␤»
03:25 notviki m: use Test; class Bar {}; our proto infix:<eqv> (|) {*}; multi infix:<eqv> (Bar, Bar) { say "hi" }; multi infix:<eqv> (|c) { &CORE::infix:<eqv>(|c) }; is-deeply Bar.new, Bar.new;
03:25 camelia rakudo-moar 73182d: OUTPUT«ok 1 - ␤»
03:25 dugword Should I be able to separate sub signature parameters with semi-colons?
03:25 dugword m: sub ($bar;$baz){say "$bar;$baz"}("bar","baz")
03:25 camelia rakudo-moar 73182d: OUTPUT«bar;baz␤»
03:26 notviki Yeah, doesn't work.
03:26 dugword That does work
03:27 notviki I meant eqv thing
03:27 dugword oh, :)
03:27 notviki dugword: well, `;;` is to demarkate stuf you don't want to be considered for MMD. No idea what one ; is
03:27 dugword I saw ;; in the docs, but nothing about ';'
03:28 dugword it was a typo in my code, but I noticed it still worked
03:28 notviki Was gonna try --target=parse on it but it hangs >_<
03:29 notviki hm, don't see anything for it in token signature :S
03:29 notviki oh
03:30 notviki weird
03:30 notviki m: sub ($bar:$baz){say "$bar;$baz"}("bar","baz")
03:30 camelia rakudo-moar 73182d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Can only use the : invocant marker in the signature for a method␤at <tmp>:1␤------> 3sub ($bar:$baz7⏏5){say "$bar;$baz"}("bar","baz")␤    expecting any of:␤        constraint␤»
03:30 notviki m: sub ($bar:$baz:$ber){say "$bar;$baz"}("bar","baz", 42)
03:30 camelia rakudo-moar 73182d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Can only use the : invocant marker in the signature for a method␤at <tmp>:1␤------> 3sub ($bar:$baz:$ber7⏏5){say "$bar;$baz"}("bar","baz", 42)␤    expecting any of:␤        constraint␤»
03:31 notviki dugword: from what I see in the grammar it's just an alternative to `,` param separator :S
03:33 dugword Interesting. Thanks!
03:36 dugword m: sub ($bar;$baz){say "$bar;$baz"}("bar";"baz")
03:36 camelia rakudo-moar 73182d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in argument list; couldn't find final ')' ␤at <tmp>:1␤------> 3sub ($bar;$baz){say "$bar;$baz"}("bar"7⏏5;"baz")␤»
03:43 dalek doc: b60bd51 | (Zoffix Znet)++ | doc/Type/Rational.pod6:
03:43 dalek doc: Document Rational.isNaN
03:43 dalek doc:
03:43 dalek doc: Implemented in Rakudo in
03:43 dalek doc: https://github.com/rakudo/rakudo/commit/7434a8f73e
03:43 synopsebot6 Link: http://doc.perl6.org/type/Rational
03:43 dalek doc:
03:43 dalek doc: Tests in https://github.com/perl6/roast/commit/fea29a3902
03:43 dalek doc: review: https://github.com/perl6/doc/commit/b60bd515c8
03:44 dalek doc: f4aa4a2 | kalkin++ | bin/p6doc:
03:44 dalek doc: p6doc -h|--help shows a useful USAGE message
03:44 dalek doc: review: https://github.com/perl6/doc/commit/f4aa4a2ff2
03:44 dalek doc: 3dc045c | kalkin++ | bin/p6doc:
03:44 dalek doc: p6doc add local file usage example
03:44 dalek doc: review: https://github.com/perl6/doc/commit/3dc045c242
03:44 dalek doc: 54cdd80 | (Will Coleda)++ | bin/p6doc:
03:44 dalek doc: Merge pull request #1094 from kalkin/master
03:44 dalek doc:
03:44 dalek doc: Unify output of p6doc & p6doc -h
03:44 dalek doc: review: https://github.com/perl6/doc/commit/54cdd80b9f
03:45 dalek doc: 9a963ae | (Nic Q)++ | doc/Type/Sub.pod6:
03:45 dalek doc: Document `is deafult` for Subs
03:45 dalek doc: Added explinations and examples to document what `is default` does
03:45 dalek doc: for Subs.
03:45 dalek doc: review: https://github.com/perl6/doc/commit/9a963ae968
03:45 dalek doc: fe8f130 | (Will Coleda)++ | doc/Type/Sub.pod6:
03:45 dalek doc: Merge pull request #1052 from nicqrocks/master
03:45 synopsebot6 Link: http://doc.perl6.org/type/Sub
03:45 synopsebot6 Link: http://doc.perl6.org/type/Sub
03:45 dalek doc:
03:45 dalek doc: Document `is deafult` for Subs
03:45 dalek doc: review: https://github.com/perl6/doc/commit/fe8f13046e
03:48 lichtkind_ joined #perl6
03:54 Sgeo joined #perl6
03:57 Actualeyes1 joined #perl6
04:08 bjz joined #perl6
04:12 pyrimidine joined #perl6
04:16 notviki woot... #freenode-newyears is open. Let the party begin \o/
04:22 HNYBot joined #perl6
04:23 HNYBot joined #perl6
04:26 HNYBot joined #perl6
04:27 Zoffix_ joined #perl6
04:29 HNYBot joined #perl6
04:30 HNYBot joined #perl6
04:34 Woodi it's 24h long party ? :)
04:39 bjz_ joined #perl6
04:40 HNYBot joined #perl6
04:40 HNYBot joined #perl6
04:42 notviki Woodi: more, I think it's like 28-hour
04:42 notviki or 26
04:42 notviki HNYBot: hny Samoa
04:43 HNYBot notviki, New Year will happen in Samoa in 5 hours, 16 minutes, and 51 seconds
04:47 xinming joined #perl6
04:52 HNYBot joined #perl6
04:55 xinming joined #perl6
05:04 holli joined #perl6
05:08 kaare_ joined #perl6
05:12 pyrimidine joined #perl6
05:27 notviki whoa... fire in the adjacent building :o
05:47 Woodi that's always not nice...
05:48 Woodi not good even...
05:53 bjz joined #perl6
05:54 forkbomb joined #perl6
05:58 Cabanossi joined #perl6
06:09 shayan_ joined #perl6
06:14 rburkholder joined #perl6
06:20 xinming joined #perl6
06:27 xinming joined #perl6
06:37 Wanderer68 joined #perl6
06:52 pyrimidine joined #perl6
07:07 labster joined #perl6
07:11 darutoko joined #perl6
07:27 CIAvash joined #perl6
07:37 bjz joined #perl6
07:44 domidumont joined #perl6
07:49 domidumont joined #perl6
07:54 ggoebel joined #perl6
07:55 Tonik joined #perl6
08:04 petrutrimbitas joined #perl6
08:06 thalunil joined #perl6
08:07 bjz joined #perl6
08:11 labster joined #perl6
08:16 bjz joined #perl6
08:22 xiaomiao joined #perl6
08:42 rindolf joined #perl6
08:52 grondilu_ joined #perl6
08:58 RabidGravy joined #perl6
09:06 xinming_ joined #perl6
09:13 hartenfels joined #perl6
09:17 hartenfels1 joined #perl6
09:25 pyrimidine joined #perl6
09:41 wamba joined #perl6
09:50 hankache joined #perl6
09:53 RabidGravy joined #perl6
10:06 labster joined #perl6
10:33 rindolf joined #perl6
10:33 FROGGS joined #perl6
10:50 rburkholder joined #perl6
11:01 espadrine joined #perl6
11:14 pmurias joined #perl6
11:27 Actualeyes joined #perl6
11:35 pyrimidine joined #perl6
12:03 small-wolf joined #perl6
12:16 susmus joined #perl6
12:21 cdg joined #perl6
12:22 petrutrimbitas joined #perl6
12:46 pyrimidi_ joined #perl6
12:50 lukaramu joined #perl6
12:52 Actualeyes joined #perl6
13:13 aborazmeh joined #perl6
13:13 aborazmeh joined #perl6
13:14 dalek json: d8b3e13 | moritz++ | / (4 files):
13:14 dalek json: Fix parsing of string literals with a leading combining character.
13:14 dalek json:
13:14 dalek json: Closes #25.
13:14 dalek json: review: https://github.com/moritz/json/commit/d8b3e130f9
13:14 moritz finally. That one was hard work.
13:31 bjz joined #perl6
13:32 effbiai joined #perl6
13:32 effbiai joined #perl6
13:36 Tonik joined #perl6
13:37 Ven joined #perl6
13:43 petrutrimbitas joined #perl6
13:44 xinming joined #perl6
13:51 pyrimidine joined #perl6
14:00 xinming joined #perl6
14:12 MasterDukeLaptop joined #perl6
14:15 Zoffix joined #perl6
14:16 Zoffix \o
14:16 yoleaux 20 Dec 2016 06:35Z <nige1> Zoffix: thanks for the tip to turn on JSON output for perl6 -> RAKUDO_EXCEPTION_HANDLER=JSON
14:16 yoleaux 20 Dec 2016 06:36Z <nige1> Zoffix: I've update the code to use JSON instead https://github.com/nige123/perl6fix/blob/master/perl6fix
14:16 yoleaux 20 Dec 2016 06:54Z <nige1> Zoffix: also fixed the advent entry on fixing flow https://perl6advent.wordpress.com/2016/12/19/fixing-flow/ to use JSON instead
14:25 effbiai joined #perl6
14:25 effbiai joined #perl6
14:36 Zoffix left #perl6
14:39 dalek joined #perl6
14:41 AlexDaniel joined #perl6
14:41 AlexDaniel !hny *
14:41 HNYBot AlexDaniel, New Year will happen in Brampton, ON L6Y in 14 hours, 18 minutes, and 13 seconds
14:43 small-wolf joined #perl6
14:43 tojo joined #perl6
14:45 hartenfels fg
14:49 notviki bg
14:56 pyrimidine joined #perl6
15:00 Actualeyes joined #perl6
15:00 AlexDaniel !hny UGT
15:00 HNYBot AlexDaniel, Never heard of that place…
15:01 AlexDaniel !hny EST
15:01 HNYBot AlexDaniel, New Year will happen in Eastern Time in 13 hours, 58 minutes, and 45 seconds
15:01 AlexDaniel notviki: why UGT not supported??
15:02 AlexDaniel !hny
15:02 AlexDaniel HNYBot: hny
15:02 notviki AlexDaniel: 'cause google: https://www.google.ca/#q=time+in+ugt
15:02 AlexDaniel just slap it on top!
15:03 notviki Slap what on top?
15:03 notviki The bot uses google to find the time
15:03 AlexDaniel I mean check for UGT before passing it to google
15:03 notviki meh
15:05 notviki New result from searching for tickets matching /\btest.*need|\bneed.*test\b/i 113: https://gist.github.com/zoffixznet/3232918e1e1c16f4f26a92640a5adb0e
15:06 notviki better than 500+ for just "test"
15:06 AlexDaniel notviki: wait, why?
15:06 AlexDaniel if there's a tag for this
15:07 AlexDaniel buggable: tag testneeded
15:07 buggable AlexDaniel, There are 13 tickets tagged with TESTNEEDED; See http://perl6.fail/t/TESTNEEDED for details
15:07 notviki AlexDaniel: because not all of them are tagged
15:07 AlexDaniel :/
15:08 notviki 2 out of 5 so far weren't tagged.
15:09 notviki 3 out of 6
15:09 notviki Looks like this heuristic will do
15:09 moritz m: "7\x[308]".NFD ~~ /^ \d+ $/
15:09 camelia rakudo-moar 1dc0c0: ( no output )
15:09 moritz m: say so "7\x[308]".NFD ~~ /^ \d+ $/
15:09 camelia rakudo-moar 1dc0c0: OUTPUT«True␤»
15:10 AlexDaniel m: say "7\x[308]".NFD ~~ /^ \d+ $/
15:10 camelia rakudo-moar 1dc0c0: OUTPUT«「7̈」␤»
15:10 AlexDaniel m: say "7\x[308]".NFD ~~ m/^ \d+ $/
15:10 camelia rakudo-moar 1dc0c0: OUTPUT«Cannot resolve caller match(NFD: Regex); none of these signatures match:␤    (Any:U $: | is raw)␤  in block <unit> at <tmp> line 1␤␤»
15:10 AlexDaniel :o
15:10 notviki god
15:10 pyrimidine joined #perl6
15:10 AlexDaniel it's not the first time I see this
15:10 * notviki wishes people would /msg with all these combiners
15:10 AlexDaniel notviki: fix… your… client! ;)
15:11 notviki I couldn't even backlog this morning the terminal was so messed up
15:11 AlexDaniel does anybody know if this difference between m// and // should exist?
15:11 moritz AlexDaniel: sounds like a bug to me
15:11 moritz notviki: you can backlog using the public logs
15:12 AlexDaniel or using a better irc client that does not blow up on combiners…
15:12 notviki moritz: but there I don't see highlights
15:13 moritz notviki: can't your browser hilight for you (ctrl+f, show all matches)
15:17 AlexDaniel u: { (‘a’ ~ .char).NFC.elems == 0 }
15:17 unicodable6 AlexDaniel, https://gist.github.com/3c4b480638ae17ebbae4d686f1cbede0
15:17 AlexDaniel oops
15:17 AlexDaniel u: { (‘a’ ~ .chr).NFC.elems == 1 }
15:17 unicodable6 AlexDaniel, U+0300 COMBINING GRAVE ACCENT [Mn] (◌̀)
15:17 unicodable6 AlexDaniel, U+0301 COMBINING ACUTE ACCENT [Mn] (◌́)
15:17 unicodable6 AlexDaniel, U+0302 COMBINING CIRCUMFLEX ACCENT [Mn] (◌̂)
15:18 unicodable6 AlexDaniel, https://gist.github.com/dce8f95aa8a7d93abeb45c25fdc26727
15:19 AlexDaniel u: { (‘"’ ~ .chr).NFC.elems == 1 }
15:19 unicodable6 AlexDaniel, Found nothing!
15:19 AlexDaniel ok
15:20 notviki "<ilbelkyr> Zoffix, mniip: see, that's what i like about Perl 6 - when someone says "but that could be better", the reaction is actually "hmm, will consider it!" instead of immediately going "yeah but that wouldn't fit in ...""
15:25 bwisti joined #perl6
15:26 notviki right. this got boring fast. Still 84 to review to see if they need the testneeded tag: https://gist.github.com/zoffixznet/6563435c1f08e090e33167e8d0453c10
15:26 * notviki goes for a Pod parsing bug
15:32 AlexDaniel notviki: 70-84 are ok
15:32 AlexDaniel added two tags I think
15:33 notviki the bottom ones, right?
15:33 AlexDaniel yes
15:33 notviki k
15:33 AlexDaniel m: say  3 !=3
15:33 camelia rakudo-moar 1dc0c0: OUTPUT«Cannot modify an immutable Int␤  in block <unit> at <tmp> line 1␤␤»
15:33 AlexDaniel :o
15:33 AlexDaniel bwahahahahaha
15:34 moritz four testneeded down
15:34 notviki moritz++
15:34 AlexDaniel m: my $x = 3; say  $x !=3; say $x
15:34 camelia rakudo-moar 1dc0c0: OUTPUT«False␤3␤»
15:35 notviki it's $x += 3, except with ! metaop instead of +
15:36 notviki .oO( I think... )
15:40 small-wolf joined #perl6
15:41 arnsholt notviki: No, != is special-cased to !==, isn't it?
15:42 AlexDaniel notviki: 50 and down are ok I think
15:42 arnsholt Still a metaop involved, but IIRC it's special to keep the expected not-equals operator
15:43 notviki arnsholt: I'm talking about the buggy version above
15:43 arnsholt Yeah, it's a bit odd
15:43 arnsholt Moo,
15:43 arnsholt David Kalnischkies, Metatron of the Cow
15:43 arnsholt Bah, fat-finger
15:43 arnsholt Yeah, it's weird. My initial guess was something weird going on in the metaoping
15:44 domidumont joined #perl6
15:44 arnsholt But your intuition of a parse-fail is perhaps a better guess, I agree
15:44 notviki infix_prefix_meta_operator: !=
15:44 notviki - sym: !
15:46 AlexDaniel notviki: okay, I haven't touche 1-39, this is indeed boring
15:46 notviki So... who's David? :)
15:46 notviki AlexDaniel: :) OK thanks
15:46 arnsholt notviki: Author of an email that was linked to on HN =)
15:46 moritz notviki: run aptitude moo
15:46 arnsholt apt moo, no
15:46 moritz notviki: and then add -v, -vv etc.
15:46 arnsholt (According to HN at least)
15:46 arnsholt ?
15:47 notviki It says "There are no Easter Eggs in this program."
15:47 moritz arnsholt: aptitude moo is better :-)
15:47 notviki haha
15:47 notviki moritz++
15:47 moritz apt moo just prints the cow, with no changes when you add -v
15:48 notviki perl -Moo  is a similar egg
15:48 notviki If you got Moo.pm installed
15:48 notviki And perl -Mew
15:48 notviki https://gist.github.com/zoffixznet/911098139e31d893db761d7e17cd32ff
15:53 geekosaur joined #perl6
15:55 rightfold Is ack with Perl 6 regexes a thing?
15:56 rightfold m: subset ℕ of Int where * ≥ 0;
15:56 camelia rakudo-moar 1dc0c0: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Confused␤at <tmp>:1␤------> 3subset ℕ of Int where *7⏏5 ≥ 0;␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        statement modifi…»
15:56 moritz not that I'm aware of
15:58 rightfold m: subset ℕ of Int where * >= 0;
15:58 camelia rakudo-moar 1dc0c0: ( no output )
15:59 rightfold Aww
16:02 rightfold How does Perl 6 decide that $x >= $y shouldn't be $x = $x > $y?
16:04 moritz longest token matching
16:04 moritz >= is the a longer native token than >
16:05 moritz and the = meta-op is parsed so that it doesn't contribute as much to the "longest token" check
16:06 BenGoldberg joined #perl6
16:07 rightfold Ok
16:08 rightfold m: sub infixl:<+=>($x, $y) { 42 }; my $x = 1; say($x += 5); say $x
16:08 camelia rakudo-moar 1dc0c0: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot add tokens of category 'infixl'␤at <tmp>:1␤------> 3sub infixl:<+=>7⏏5($x, $y) { 42 }; my $x = 1; say($x += 5)␤»
16:08 rightfold m: sub infix:<+=>($x, $y) { 42 }; my $x = 1; say($x += 5); say $x
16:08 camelia rakudo-moar 1dc0c0: OUTPUT«42␤1␤»
16:08 rightfold Interesting
16:11 pyrimidine joined #perl6
16:11 notviki m: my \term:<ℕ> = UInt; say 42 ~~ ℕ
16:11 camelia rakudo-moar 1dc0c0: OUTPUT«True␤»
16:11 notviki m: my \term:<ℕ> = UInt; say -42 ~~ ℕ
16:11 camelia rakudo-moar 1dc0c0: OUTPUT«False␤»
16:13 moritz m: constant ℕ = UInt; for 42, -42 -> $x { say $x ~~ ℕ }
16:13 camelia rakudo-moar 1dc0c0: OUTPUT«True␤False␤»
16:13 notviki rofl inflood of new partiers in #freenode-newyears :D
16:17 dugword joined #perl6
16:20 rightfold TIL UInt
16:20 rightfold m: say UInt
16:20 camelia rakudo-moar 1dc0c0: OUTPUT«(UInt)␤»
16:22 notviki rightfold: it's just a subset of Int
16:22 notviki literally
16:23 notviki And we also have UInt64
16:23 notviki my Int $UINT64_UPPER = nqp::pow_I(2, 64, Num, Int);
16:23 notviki subset UInt64 of Int where { 0 <= $_ < $UINT64_UPPER }
16:26 rightfold Top kek
16:39 ufobat joined #perl6
16:40 ufobat hey ho :)
16:40 ufobat m: say grammar {rule TOP {<A>}; rule A { "F"+ % ","} }.parse("F,F")
16:40 camelia rakudo-moar 1dc0c0: OUTPUT«「F,F」␤ A => 「F,F」␤»
16:40 ufobat m: say grammar {rule TOP {<A>}; rule A { "F"+ % ","} }.parse("F, F")
16:40 camelia rakudo-moar 1dc0c0: OUTPUT«Nil␤»
16:40 ufobat shoudn't that work?
16:41 notviki ufobat: no, because you're not letting it have whitespace
16:41 notviki m: say grammar {rule TOP {<A>}; rule A { ["F" ]+ % ","} }.parse("F, F")
16:41 camelia rakudo-moar 1dc0c0: OUTPUT«Nil␤»
16:42 notviki hm
16:42 notviki m: say grammar {rule TOP {<A>}; rule A { [ "F" ]+ % ","} }.parse("F, F")
16:42 camelia rakudo-moar 1dc0c0: OUTPUT«Nil␤»
16:42 notviki m: say grammar {rule TOP {<A>}; rule A { [ "F"]+ % ","} }.parse("F, F")
16:42 camelia rakudo-moar 1dc0c0: OUTPUT«Nil␤»
16:42 ufobat but isn't that whitespacey thing because of the rule (vs token)
16:42 * notviki cringes
16:43 notviki ufobat: rule doesn't ignore whitespace it inserts <ws> token into places where there's whitespace in the rule (except for ^\s+)
16:43 ufobat oh!
16:44 ufobat thank you :)
16:44 notviki no idea why it's failing to match with ["F" ]
16:45 ufobat m: say grammar {rule TOP {<A>}; rule A { [ "F"]+ % ","} }.parse(" F, F")
16:45 camelia rakudo-moar 1dc0c0: OUTPUT«Nil␤»
16:45 domidumont joined #perl6
16:45 notviki m: say grammar {rule TOP {<A>}; rule A { "F"+ % [ "," ]} }.parse("F, F")
16:45 camelia rakudo-moar 1dc0c0: OUTPUT«「F, F」␤ A => 「F, F」␤»
16:45 notviki m: say grammar {rule TOP {<A>}; rule A { "F"+ % [ "," ]} }.parse("F , F")
16:45 camelia rakudo-moar 1dc0c0: OUTPUT«Nil␤»
16:46 notviki weird that doesn't match now
16:46 notviki m: say grammar {rule TOP {<A>}; rule A { "F"+ % [ \s* "," ]} }.parse("F , F")
16:46 camelia rakudo-moar 1dc0c0: OUTPUT«「F , F」␤ A => 「F , F」␤»
16:46 notviki :S
16:49 ufobat is this say grammar {rule TOP {<A>}; rule A { "F"+ % [ "," ]} }.parse("F , F") a bug or not?
16:49 ufobat bisectable6, help
16:49 bisectable6 ufobat, Like this: bisectable6: old=2015.12 new=HEAD exit 1 if (^∞).grep({ last })[5] // 0 == 4 # RT128181
16:49 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=128181
16:50 ufobat bisectable6: old=2015.10 new=HEAD say grammar {rule TOP {<A>}; rule A { "F"+ % [ "," ]} }.parse("F , F")
16:50 bisectable6 ufobat, Problem with 8ec578e commit: Commit exists, but a perl6 executable could not be built for it
16:50 ufobat bisectable6: old=2015.12 new=HEAD say grammar {rule TOP {<A>}; rule A { "F"+ % [ "," ]} }.parse("F , F")
16:50 bisectable6 ufobat, Problem with 8ec578e commit: Commit exists, but a perl6 executable could not be built for it
16:51 ufobat uhm ./
16:54 HNYBot joined #perl6
16:56 ggoebel joined #perl6
17:01 Lee_ joined #perl6
17:02 AlexDaniel old=2015.12 new=HEAD~10 say grammar {rule TOP {<A>}; rule A { "F"+ % [ "," ]} }.parse("F , F")
17:02 AlexDaniel bisect:old=2015.12 new=HEAD~10 say grammar {rule TOP {<A>}; rule A { "F"+ % [ "," ]} }.parse("F , F")
17:02 bisectable6 AlexDaniel, On both starting points (old=2015.12 new=HEAD~10) the exit code is 0 and the output is identical as well
17:02 bisectable6 AlexDaniel, Output on both points: Nil
17:02 AlexDaniel ufobat: ↑
17:02 leejo hihi, what's the perl6 equivalent to: use overload '""' => sub { shift->foo }
17:02 AlexDaniel I'm not sure why it's broken on HEAD
17:03 AlexDaniel bisect:old=2015.12 new=HEAD say grammar {rule TOP {<A>}; rule A { "F"+ % [ "," ]} }.parse("F , F")
17:03 bisectable6 AlexDaniel, On both starting points (old=2015.12 new=d7cd5df) the exit code is 0 and the output is identical as well
17:03 bisectable6 AlexDaniel, Output on both points: Nil
17:03 AlexDaniel ufobat: ah, it's fine
17:06 petrutrimbitas joined #perl6
17:08 notviki leejo: method Str { $.foo }
17:11 leejo notviki: ta!
17:34 shayan_ joined #perl6
17:35 Wanderer68 joined #perl6
17:39 pyrimidine joined #perl6
17:41 cibs joined #perl6
17:43 petrutrimbitas joined #perl6
17:50 dugword joined #perl6
17:52 itcharlie_linux joined #perl6
17:52 cibs joined #perl6
17:54 mr_ron joined #perl6
17:56 small-wolf joined #perl6
18:01 bjz joined #perl6
18:09 mr_ron Just to warn about using ℕ symbol for Int >= 0 ... the inclusion (or exclusion) of 0 from Natural Numbers seems disputed http://mathworld.wolfram.com/NaturalNumber.html.  Maybe ℕ0 for UInt and ℕ1 for positive?  Can try to explain more if anyone is interested.
18:12 wamba joined #perl6
18:18 Ven joined #perl6
18:22 mst huh. when I did my degree I don't recall encountering anything using the term that didn't start them at 1
18:24 itcharlie_linux left #perl6
18:25 pierre_ joined #perl6
18:27 tojo joined #perl6
18:30 notviki Heh...
18:30 notviki # and this is the worst hack of them all.
18:30 notviki # Hide your kids, hide your wife!
18:30 notviki Rakudo's Pod parser :P
18:31 labster joined #perl6
18:31 Vynce joined #perl6
18:45 kyan joined #perl6
18:48 TimToady m: say grammar {rule TOP {<A>}; rule A { "F" +% "," } }.parse("F , F")
18:48 camelia rakudo-moar d7cd5d: OUTPUT«「F , F」␤ A => 「F , F」␤»
18:48 TimToady you guys are making it too hard
18:49 TimToady just pretend that +% is the combinator
18:50 TimToady that is, + does not require an absence of whitespace before it
18:50 TimToady (in P6 regex)
18:51 notviki m: say grammar {rule TOP {<A>}; rule A { "F" % [ "," ] } }.parse("F , F")
18:51 camelia rakudo-moar d7cd5d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing quantifier on the left argument of %␤at <tmp>:1␤------> 3 grammar {rule TOP {<A>}; rule A { "F" %7⏏5 [ "," ] } }.parse("F , F")␤»
18:51 notviki m: say grammar {rule TOP {<A>}; rule A { "F"+ % [ "," ] } }.parse("F , F")
18:51 camelia rakudo-moar d7cd5d: OUTPUT«Nil␤»
18:51 notviki TimToady: ^ how come that doesn't work?
18:52 AlexDaniel why would it?
18:52 notviki AlexDaniel: that's not helpful
18:53 AlexDaniel ok let me put it this way
18:53 AlexDaniel m: say grammar {rule TOP { <A> }; rule A { ‘abc’ } }.parse("abc")
18:53 camelia rakudo-moar d7cd5d: OUTPUT«「abc」␤ A => 「abc」␤»
18:53 AlexDaniel m: say grammar {rule TOP { <A> }; rule A { ‘abc’ } }.parse(" abc")
18:53 camelia rakudo-moar d7cd5d: OUTPUT«Nil␤»
18:53 AlexDaniel m: say grammar {rule TOP { <A> }; rule A { ‘abc’ } }.parse("abc ")
18:53 camelia rakudo-moar d7cd5d: OUTPUT«「abc 」␤ A => 「abc 」␤»
18:54 TimToady okay, the other thing you're missing is the the fact that <ws> is only inserted *after* matchers
18:54 TimToady [ is not a matcher
18:54 notviki TimToady: thanks.
18:55 TimToady this is force by the fact that we don't want to do transitive LTM with optional whitespacey stuff on the front
18:55 TimToady we need to sync all the alternatives up on the actual token boundaries
18:55 TimToady *forced
18:56 TimToady this is why, in a TOP rule, if you want to match leading whitespace, you need a ^
18:56 TimToady m: say grammar {rule TOP {<A>}; rule A { "F" +% "," } }.parse(" F , F")
18:56 camelia rakudo-moar d7cd5d: OUTPUT«Nil␤»
18:56 TimToady m: say grammar {rule TOP {^ <A>}; rule A { "F" +% "," } }.parse(" F , F")
18:56 camelia rakudo-moar d7cd5d: OUTPUT«「 F , F」␤ A => 「F , F」␤»
18:56 TimToady like that
18:57 TimToady m: say grammar {rule TOP { <A>}; rule A { "F" +% "," } }.parse(" F , F")
18:57 camelia rakudo-moar d7cd5d: OUTPUT«Nil␤»
18:57 samcv o/ morning
18:57 notviki \o
18:57 TimToady samcv++ # just on general speculation :)
18:58 masak things like "we don't want to do transitive LTM with optional whitespacey stuff on the front" -- I really hope we get to codify all these little parser pro tips at some point in a book or something :)
18:58 samcv what it being morning?
18:58 cdg joined #perl6
18:58 samcv LTM?
18:58 notviki Longest Token Match
18:59 samcv oh yeah that
19:00 samcv TimToady, in sigspace regex, the synopsis states that leading whitespace is ignored to allow for adverbs, but none of the examples or the tests say what happens with trailing space
19:00 samcv all the examples have no trailing space though
19:00 samcv what _should_ it actually do? ignore leading AND trailing space both? or just the trailing?
19:01 stallix joined #perl6
19:01 samcv m: say 'a b c ' ~~ m:s/b c /;
19:01 camelia rakudo-moar d7cd5d: OUTPUT«「b c 」␤»
19:02 Rogbro joined #perl6
19:02 samcv m: say "a " ~~ m:s/a /
19:02 camelia rakudo-moar d7cd5d: OUTPUT«「a 」␤»
19:02 samcv huh.
19:02 samcv bisectable6, say "a " ~~ m:s/a /
19:02 bisectable6 samcv, On both starting points (old=2015.12 new=d7cd5df) the exit code is 0 and the output is identical as well
19:02 bisectable6 samcv, Output on both points: 「a 」
19:03 TimToady that's how it's supposed to work
19:03 samcv oh yeah, duh. not awake enough. the thing is trailing white space is not defined, i forgot what currently happens, currently it does match. but i wanted to know if that is intended, and if it is to codify
19:03 samcv ok TimToady i will add spectests and update spec
19:03 samcv since we don't test any examples of it
19:03 samcv for whatever reason no tests have trailing space
19:04 TimToady the entire Perl 6 grammar would come crashing down if sigspace didn't work that way, which is a test of sorts :)
19:04 samcv would it?
19:05 samcv could you not just quote it?
19:07 pierre_ joined #perl6
19:10 dugword joined #perl6
19:11 Tonik joined #perl6
19:14 tadzik hehe, today on reddit is brian d foy with "indir"
19:15 tadzik which is available as part of rakudo since 2014.11
19:15 tadzik and is something I wrote for panda in feb 2011 saying "there should be a better place for this" in the commit message :P
19:17 khw joined #perl6
19:18 notviki ugh
19:18 notviki Jesus
19:18 notviki AlexDaniel: totally called that one: https://www.learningperl6.com/2016/12/30/indir-changes-the-directory-just-for-its-block/
19:19 AlexDaniel well, it's not one of the quick tips!
19:20 tojo joined #perl6
19:20 AlexDaniel and it does say that it is not tested, so… okay…
19:21 TimToady maybe we should put it a warning for "deceptively divergent closing brace style" or so, and make people who want to allow that brace style declare it :)
19:22 TimToady *put in
19:22 notviki AlexDaniel: no, it invites someone to document and test it.
19:23 notviki AlexDaniel: and I bet someone will go ahead and do it.
19:23 AlexDaniel no
19:24 AlexDaniel it won't get documented unless there are tests, and nobody is going to write tests, so…
19:24 dalek doc: 8cb91e8 | samcv++ | util/trigger-rebuild.txt:
19:24 dalek doc: Add dedicated file to alter to trigger rebuilds
19:24 dalek doc:
19:24 dalek doc: This will make it easier to tell the change that was made by keeping it
19:24 dalek doc: all in one file.
19:24 dalek doc: review: https://github.com/perl6/doc/commit/8cb91e88f6
19:25 samcv added assignment operator to perl 6 highlighter notviki
19:27 Ben_Goldberg joined #perl6
19:33 Ven joined #perl6
19:34 notviki AlexDaniel: but it's evidently making it into LP6
19:34 notviki As I bet many other routines.
19:35 small-wolf joined #perl6
19:35 AlexDaniel notviki: It is planned for sure, but I hope that he will get rid of stuff like this in the end
19:36 AlexDaniel a good idea of what's going to go into the book is this ticket: https://rt.perl.org/Public/Bug/Display.html?id=129926
19:44 petrutrimbitas joined #perl6
19:44 notviki start { indir '/tmp', { dir».unlink } }; chdir '/'
19:45 pmurias m: sub foo(Str:D $arg) { say(VAR($arg).^name) }; foo('str'); sub bar($arg) {say(VAR($arg).^name)}; bar('str')
19:45 camelia rakudo-moar d7cd5d: OUTPUT«Str␤Scalar␤»
19:45 pmurias ^^ is the Str:D deconting correct?
19:47 RabidGravy what's the matter with indir such that it shouldn't be tested and documented?
19:48 mst "not officially part of 6.c" ?
19:48 RabidGravy I don't think I've felt the need to use it myself
19:50 notviki RabidGravy: well, the above race condition is one. It taking tests as predefined strings like 'r w'. Which ultimatelly is an issue with chdir and our IO in general, which needs an improvement, so it doesn't make any sense to lock into the current, unwanted API, just because some author decided to include it in his book.
19:51 AlexDaniel I did use something like this in whateverables: https://github.com/perl6/whateverable/blob/master/Whateverable.pm6#L163-L164
19:52 notviki RabidGravy: giving test as 'r w x' will work, but if you give it as 'w r x', or any other combination, it'll silently fail.
19:53 AlexDaniel which is probably a bad idea but git does not always allow you to do stuff from another directory… I guess I'll have to review this code one day
19:53 notviki (and yes, I know we can add an `else` clause that will throw, but that doesn't fix the original poor API0
19:53 Ven joined #perl6
19:56 notviki Time to make a map of all our routines....
19:58 notviki to have a picture of what calling form we use and how we fail.
20:08 samcv can somebody respond to what i said in #perl6-dev? really need your guys input
20:11 * pmurias is not qualified to have an opinion on unicody stuff
20:13 Ven joined #perl6
20:15 jonadab I have an opinion on unicody stuff.  My opinion is, unicody stuff can be unnervingly complicated.
20:17 tailgate Does anyone find unicode simple?
20:18 geekosaur nope
20:18 geekosaur but then, it's trying to solve a Really Hard Problem
20:19 geekosaur there *aren't* any simple solutions
20:19 tailgate An effort I admire, sure. An important technology, sure. But human language isn't simple either
20:19 tailgate unless we want to be a finite state automata or turing machines
20:20 zakharyas joined #perl6
20:20 RabidGravy notviki, fair enough, I guess that those things are probably fixable, might it not be slap an 'experimental' on it for the timebeing?
20:22 notviki RabidGravy: just as a solution to brian lauding features that don't exist in Perl 6 language? I don't get the point
20:23 notviki RabidGravy: actually, that's a good idea. Since the function exists in Rakudo and now many people will likely use it.
20:25 RabidGravy well my point was more that someone presumably put it in there for a reason, so it is being used somewhere
20:26 RabidGravy the only place I've seen it is in panda however
20:26 notviki RabidGravy: it's part of the speculations.
20:26 notviki that "somewhere" is nowhere in Rakudo or Roast
20:28 notviki And if someone is using it, they're using an undocumented feature that's literally nor part of Perl 6 language.
20:28 pmurias tailgate: I would be surprised if we as humans weren't turing equivalent ;)
20:30 tailgate Sometimes, I wonder if I'm turing equivlent after I spend 10 minutes looking for my phone when I'm holding it
20:32 samcv i kind of like the korean Hangul characters the script they use. seems really neat
20:32 samcv neat as in tidy not as in like neat, but that too i guess
20:33 samcv each character is a syllable and depending on the marks in it, basically determines which consonents and vowels
20:33 samcv and you just put them together, and visually vowels and other things are easily distinguishable from consonants and shapes depending on the type of sound
20:34 Ven joined #perl6
20:34 samcv or something like that. some emporor or king or whatever ordered it to be designed and had a bunch of scholars design a new written text and then had them continue to study it afterward becuase he wanted to improve literacy
20:35 samcv since before that there only existed korean written in chinese characters
20:35 samcv i think that's super awesome
20:49 shayan_ joined #perl6
20:53 Ven joined #perl6
20:53 petrutrimbitas joined #perl6
20:59 rindolf Happy new year all!
21:01 pyrimidine joined #perl6
21:02 shayan_ joined #perl6
21:04 petrutrimbitas joined #perl6
21:12 azertus joined #perl6
21:13 Ven joined #perl6
21:14 pmurias any opinions if adding a Str:D on an argument should decontainerize?
21:15 tbrowder ref docs: i dont see operator ~= in search or scanning docs...i will create issue unless someone points me to it in docs
21:15 pmurias m: sub foo(Str $arg) { say(VAR($arg).^name) }; foo('str'); sub bar($arg) {say(VAR($arg).^name)}; bar('str')
21:15 camelia rakudo-moar d7cd5d: OUTPUT«Str␤Scalar␤»
21:16 pmurias tbrowder: do we document autogenerated operators?
21:18 bjz joined #perl6
21:25 kalkin-_ How does perl6 or zef plan to encode the information mapping a version and to it's corresponding source code. like 0.3 → https://github/foo.0.3.tar.gz, 0.4 → git:023241
21:25 pyrimidine joined #perl6
21:26 kalkin-_ Currently zef can only parse the latest version from git:HEAD:./META6.json
21:30 dduncan joined #perl6
21:31 masak happy new year, people
21:31 dduncan Question, is there going to be a Rakudo Star distribution for December, or are we skipping from November to January?
21:31 dduncan Or in other words, when is the next Rakudo Star?
21:33 pmurias the new years eve doesn't seem like a good day for doing a release
21:35 dduncan A Dec 17 post on rakudo.org says the next compiler release is in January.  Personally what I’m looking forward to most is the release with the Lexical Module Loading Bug Fix.  Might this be released early January since December was skipped, or would it wait until late January?
21:39 pyrimidi_ joined #perl6
21:40 TEttinger joined #perl6
21:41 tojo joined #perl6
21:45 tbrowder pmurias: i dont't understand the question, because i use the operator for strings in p6 code and thus expect it to be documented.
21:53 Ven joined #perl6
21:54 AlexDaniel tbrowder: ok, it's not a bad idea to create a section about autogenerated ops and make most common ones point to it
21:54 AlexDaniel tbrowder: oh, here it is: https://docs.perl6.org/language/operators#Assignment_Operators
21:56 AlexDaniel tbrowder: so just add a couple of search items that would point to that link, that's it
21:56 AlexDaniel !hny Tallinn
21:56 AlexDaniel no bot!
21:57 masak what does `!hny` do, anyway?
21:58 AlexDaniel masak: tells how much time is left for the new year in the specified timezone
21:58 AlexDaniel city/country whatever
21:59 AlexDaniel but the bot is dead so… :P
21:59 AlexDaniel 55 seconds here anyway
21:59 masak exciting!
21:59 masak AlexDaniel: you in Tallinn?
21:59 AlexDaniel yup
21:59 masak I've been there once. nice capital.
22:01 AlexDaniel I guess so. Personally I don't like the idea of keeping the Old Town :PP let's build skyscrapers instead!
22:02 masak you monster :P
22:02 tbrowder AlexDaniel: so '~=' is a method that looks like an operator? I can add it as an example there, but how many other such items are there undocumented?
22:03 * masak .oO( such talks merits a Kiek in de Kök )
22:03 AlexDaniel tbrowder: uh? No
22:03 masak tbrowder: "method that looks like an operator" sounds wrong to me
22:03 masak tbrowder: operators are subs, not methods
22:03 masak tbrowder: maybe you mean that the sub delegates to a method?
22:04 AlexDaniel tbrowder: “Infix operators can be combined with the assignment operator to modify a value and apply the result to a container in one go”
22:04 AlexDaniel tbrowder: meaning that any infix operator can be used like this
22:04 AlexDaniel tbrowder: it's not like we have to document every single case
22:05 AlexDaniel m: my $x = 15; $x gcd= 9; say $x
22:05 camelia rakudo-moar d7cd5d: OUTPUT«3␤»
22:05 tbrowder i'm just a user trying to find where ~= is, or should be, documented.
22:06 AlexDaniel tbrowder: it should be searchable, and the search item should point to https://docs.perl6.org/language/operators#Assignment_Operators
22:08 geekosaur I think I am understanding tbrowder saying that yes, every single autogenerated operator must be documented so a user can find it
22:08 masak the search should in some sense strip away the `=` and redirect to the `~`, yes
22:09 geekosaur tbrowder, does this also include Rop? other meta-operators?
22:09 masak maybe with some comment or link to the `=` metaoperator bit
22:09 masak I think it's a neat idea. there aren't that many metaoperators
22:09 masak and they're not all that hard to parse
22:11 * masak .oO( retweet this is you've ever had to use the `[]` disambiguation syntax on complex enough operators )
22:13 Ven joined #perl6
22:13 tbrowder AlexDaniel: i'm not sure thats a complete fix. try searching for others like += and you wind up with !=.
22:14 tbrowder this is all probably just part of the task of having a list of all operators (may be too hard to do for my skills and knowledge)
22:15 BenGoldberg m: my $x = True; $x .= not; dd $x
22:15 camelia rakudo-moar d7cd5d: OUTPUT«Bool $x = Bool::False␤»
22:15 AlexDaniel we don't want to list autogenerated ops
22:15 BenGoldberg m: my $x = True; [!=] $x; dd $x
22:15 camelia rakudo-moar d7cd5d: OUTPUT«Bool $x = Bool::True␤»
22:15 masak even "autogenerated" is slightly the wrong way to view them, IMHO
22:15 masak given that there's literally infinitely many of them
22:15 * BenGoldberg wonders how he would deliberatly force != to be negation+assignment.
22:16 petrutrimbitas joined #perl6
22:16 masak BenGoldberg: it's not negation+assignment. it's the opposite of `==`
22:16 masak BenGoldberg: `!` would have to be an infix operator for `!=` to mean that.
22:16 BenGoldberg I know that, and you know that, but ...
22:17 BenGoldberg Aren't many of the mutating assignment operators auto generated?
22:17 masak I maintain that "autogenerated" is not the way to think about it... :)
22:17 masak "inferred" is perhaps a more appropriate term
22:24 shayan_ joined #perl6
22:25 pmurias j: sub foo(Str $arg) { say(VAR($arg).^name) }; foo('str'); sub bar($arg) {say(VAR($arg).^name)}; bar('str')
22:25 camelia rakudo-jvm 8ca367: OUTPUT«Str␤Scalar␤»
22:28 * pmurias really dislikes the giantic Perl 6 op periodic tables with all the "autogenerated" metaops
22:29 kalkin- left #perl6
22:29 kalkin- joined #perl6
22:30 dduncan left #perl6
22:33 Ven joined #perl6
22:34 dalek doc: 76d9da6 | (Tom Browder)++ | doc/Language/operators.pod6:
22:34 dalek doc: add examples
22:34 dalek doc: review: https://github.com/perl6/doc/commit/76d9da663c
22:34 synopsebot6 Link: http://doc.perl6.org/language/operators
22:48 lichtkind joined #perl6
22:49 bjz joined #perl6
22:53 Ven joined #perl6
22:55 itcharlie_linux joined #perl6
22:59 lichtkind ahhh
22:59 lichtkind is ther eplanned a perl 6 d?
23:03 moritz happy new year to everyone in UTC+1 or earlier!
23:04 Vynce joined #perl6
23:04 lichtkind cheers
23:09 AlexDaniel lichtkind: not really, but we are writing down the proposals
23:11 lichtkind any repo for that?
23:11 AlexDaniel huggable: 6d
23:11 huggable AlexDaniel, nothing found
23:11 AlexDaniel huggable: 6.d
23:11 huggable AlexDaniel, Proposals for 6.d language: https://github.com/perl6/specs/blob/master/v6d.pod
23:11 lichtkind thanks didnt know huggable
23:13 Ven joined #perl6
23:14 newbie1 joined #perl6
23:20 BenGoldberg lichtkind, huggable is the perl6 factoid bot.
23:21 lichtkind with added niceness? :)
23:21 * BenGoldberg hugs huggable
23:21 BenGoldberg :)
23:21 japhb huggable: hug me
23:21 * huggable hugs japhb
23:21 japhb Yay!  It still works.  :-)
23:21 moritz huggable: hug lichtkind, twice
23:21 * huggable hugs lichtkind, twice
23:22 BenGoldberg Some.  Actually, he's a bit dumber than perlbot, since he doesn't have code evaluation built into him.
23:22 lichtkind q: say 5
23:22 BenGoldberg q?
23:23 BenGoldberg camelia, help
23:23 camelia BenGoldberg: Usage: <(prof-m|nqp-jvm|nqp-js|star-m|rakudo-moar|debug-cat|p5-to-p6|rakudo-jvm|nqp-moarvm|nqp-m|m|j|r-jvm|nqp|r-j|r|rakudo|star|nqp-mvm|sm|r-m|p56|nom|rm|p6|nqp-q|rj|perl6)(?^::\s(?!OUTPUT)) $perl6_program>
23:23 moritz quantum Perl 6!
23:23 lichtkind it was once eval command in chat
23:23 BenGoldberg In which chat?  #perl6?
23:23 moritz my #perl6 memories only go back to 2007 or so, but during that time, I'm pretty sure there was no q
23:24 AlexDaniel well, we can add q, but what does it mean?
23:24 bjz joined #perl6
23:25 moritz rakudo-js
23:25 japhb John de Lancie quotes?
23:26 lichtkind i trust you moritz but it was at least in the response of the evalbot
23:29 AlexDaniel don't worry, we have a lot more commands now!
23:30 AlexDaniel 6c: say 42
23:30 committable6 AlexDaniel, ¦«2015.12,2016.02,2016.03,2016.04,2016.05,2016.06,2016.07.1,2016.08.1,2016.09,2016.10,2016.11,2016.12,HEAD»: 42
23:32 Ven joined #perl6
23:33 BenGoldberg m: my $sub = do { my proto fac(Int) { * }; my multi fac(0) { 1 }; my multi fac(\n) { n * fac(n-1) }; &fac }; $sub(20).say;
23:33 camelia rakudo-moar d7cd5d: OUTPUT«2432902008176640000␤»
23:34 BenGoldberg If I wanted to do that without the do {...}, how would I do it?
23:34 geekosaur just dug out ancient logs and see no usage message with a bare q
23:35 moritz BenGoldberg: you want an anonymous multi?
23:35 BenGoldberg Basicaly, yes.
23:47 webstrand I'm getting segfaults when entering a literal tab in perl6 only when linenoise is installed. What kind of stuff should I include in the bug report?
23:48 dalek doc: b93aca3 | (Tom Browder)++ | doc/Language/operators.pod6:
23:48 dalek doc: make  searchable
23:48 dalek doc: review: https://github.com/perl6/doc/commit/b93aca3111
23:48 synopsebot6 Link: http://doc.perl6.org/language/operators
23:50 moritz webstrand: ideally you start perl6-gdb-m and try to get a gdb-level backtrace
23:51 moritz webstrand: apart from that: OS, rakudo version, platform, compiler version
23:51 webstrand Would I submit the bug to the package maintainer or rakudo?
23:52 moritz to rakudo, via email to rakudobug@perl.org
23:52 kalkin- webstrand: if this error doesn't happen when you use Readline then it's probably linenoise issue
23:52 Ven joined #perl6
23:52 webstrand No issue with Readline
23:52 kalkin- try to do zef install Readline; zef uninstall Linenoise and then do what ever crashes the repl(?)
23:53 kalkin- ok then I think opening an issue @github for Linenoise would be the better way
23:54 kalkin- This reminds me I wanted to patch completion for the repl when using Readline

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

Perl 6 | Reference Documentation | Rakudo