Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-02-11

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 cibs joined #perl6
00:04 bjz joined #perl6
00:06 pyrimidine joined #perl6
00:14 ssotka left #perl6
00:15 El_Che Going to bed. But if someone uses vim, try out the new syntax checking support using the JSON error handling: https://github.com/nxadm/syntastic-perl6/ . Pointers on how to configure vim as a perl6 IDE: https://nxadm.wordpress.com/2016/08/21/vim-as-a-perl-6-editor/
00:20 IOninja \o/
00:24 gfldex .tell El_Che you may want to link to https://gfldex.wordpress.com/2016/08/31/one-line-of-unicode-at-you-fingertips/
00:24 yoleaux gfldex: I'll pass your message to El_Che.
00:27 jeffythedragonsl joined #perl6
00:30 BenGoldberg joined #perl6
00:33 cdg_ joined #perl6
00:33 IOninja m: use nqp; my $r = <1/2> + <3/2>; say [ nqp::getattr(nqp::decont($r), Rat, '$!numerator'), nqp::getattr(nqp::decont($r), Rat, '$!denominator') ]
00:33 camelia rakudo-moar 637241: OUTPUT«[4 2]␤»
00:34 IOninja Managed to repro <4/2> Rat
00:34 IOninja Using a nifty hack to trace calls to it: perl -pi -e 's/(\s*(?:multi\s+)?(method|sub|submethod)\s*([^\s({]+)[^{]+\{)/$1 %*ENV<FOO> and say("\$?FILE:\$?LINE: $2 $3 | " ~ (try {nqp::getattr("self".EVAL, Rat, q|\$!numerator|) ~ " " ~ nqp::getattr("self".EVAL, Rat, q|\$!denominator|) } orelse ""));/g' src/core/Rational.pm
00:34 IOninja and src/core/Rat.pm . compile and voila :)
00:37 TimToady yes, that's the lazy optimization that lets you add a column of dollars and cents without reducing after every addition
00:38 IOninja Is it OK to reduce in Rational.ceiling/.floor? The current logic demands it, but perhaps a different formula should be used instead?
00:38 IOninja As in: https://github.com/rakudo/rakudo/commit/6372417035
00:39 IOninja It checks for 1 denominator and if it isn't 1, assumes we aren't dealing with a whole number
00:39 TimToady well, there's no point in reducing it in addition, or you'd defeat the optimization
00:39 IOninja Sure
00:40 TimToady so, yes, you need to reduce before you determine whole numberness
00:40 IOninja OK
00:41 IOninja then s/Interim//; in the commit title :)
00:41 TimToady or at least see if the modulus comes out to 0
00:41 TimToady I don't know what the relative price of a % over a reduction is
00:41 IOninja I'll bench and use the cheaper one.
00:42 TimToady seems like there should be a fast way to determine %%
00:43 llfourn joined #perl6
00:43 TimToady certainly for a denominator of 2, it's easy :)
00:44 IOninja :)
00:47 samcv how fast is the +& operator?
00:50 TimToady probably faster than any kind of division
00:51 TimToady otoh, the majority of denominators are not a power of two, and figuring that out has opportunity cost anyway
00:52 IOninja m: use nqp; my $r = <1/2> + <3/2>; for ^100_000 { $ = nqp::isfalse($r % 1) }; say now - INIT now
00:52 camelia rakudo-moar 637241: OUTPUT«2.49741729␤»
00:52 IOninja m: use nqp; my $r = <1/2> + <3/2>; for ^100_000 { $ = $r.REDUCE-ME }; say now - INIT now
00:52 camelia rakudo-moar 637241: OUTPUT«0.184058655␤»
00:52 IOninja seems .REDUCE-ME is much faster
00:53 samcv it's not any faster at least for 1 and 2
00:53 samcv but maybe will be bigger when you choose larger numbers
00:54 samcv yeah %% is even faster for large numbers
00:54 samcv i guess because it doesn't have to convert the whole number to some other format
01:00 timotimo IOninja: the link in your tweet for nxadm's blog post got b0rked
01:00 timotimo and it 404s
01:02 IOninja Fixed thanks
01:02 aborazmeh joined #perl6
01:02 aborazmeh joined #perl6
01:09 timotimo np
01:10 BenGoldberg How hard would it be to extend NativeCall so that it could be used to add methods, in addition to subs?  For example, suppose that this:
01:10 BenGoldberg m: use NativeCall; use MONKEY-TYPING; augment class Signal { method raise() is native { * } }; SIGUSR1.raise;
01:10 camelia rakudo-moar 637241: 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-1/sha…»
01:10 BenGoldberg Were sugar for this:
01:10 BenGoldberg m: use NativeCall; Signal.^add_method('raise', sub raise(int32) is native { * }); Signal.^compose; SIGSYS.raise;
01:10 camelia rakudo-moar 637241: OUTPUT«(signal USR2)»
01:12 jeffythedragonsl ok guys just making sure this is correct I'm literally just changing MVMArray.c to VMArray.c and changing the constant in src/6model/reprs.h
01:18 IOninja BenGoldberg: feels like you found a limited case where this looks cute, but as a generic case it's weird: the invocant always ends up as the first arg, yet imported functions don't have any similar semantic distinction
01:18 IOninja for invocant vs rest of args
01:18 gdonald joined #perl6
01:18 timotimo BenGoldberg: um, NativeCall already lets you put in "is native" methods
01:18 IOninja :o
01:19 BenGoldberg Why doesn't https://github.com/timo/cairo-p6/blob/master/lib/Cairo.pm6 do that, then?
01:19 timotimo how else do you imagine we make cpp work?
01:19 timotimo dunno. pull request :)
01:19 IOninja m: use NativeCall; use MONKEY-TYPING; augment class Signal { method raise() is native { * } }; SRSYS.raise
01:19 camelia rakudo-moar 637241: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared name:␤    SRSYS used at line 1␤␤»
01:19 IOninja m: use NativeCall; use MONKEY-TYPING; augment class Signal { method raise() is native { * } }; SIGSYS.raise
01:19 camelia rakudo-moar 637241: 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-1/sha…»
01:19 IOninja m: use NativeCall; use MONKEY-TYPING; augment class Signal { method raise() is native { * } }; SIGSYS.raise(SIGSYS)
01:19 camelia rakudo-moar 637241: 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-1/sha…»
01:19 timotimo if you think you can make it prettier than it is at the moment
01:20 timotimo IOninja: it's complaining because the class Signal isn't something you can pass to a native call
01:20 timotimo don't forget the invocant being passed
01:20 timotimo it says so right in there. if you want to pass a struct, be sute ro use the CStruct or CPPStruct representation
01:21 cyphase joined #perl6
01:21 timotimo BenGoldberg: TBH i don't think the API should change, and thus turning the subs into methods (private ones, at that) wouldn't make it much better
01:21 BenGoldberg m: use NativeCall; class MySig is repr(int32) { method raise() is native { * } }; MySig.new(SIGSYS).raise;
01:21 camelia rakudo-moar 637241: OUTPUT«===SORRY!===␤Cannot unbox a type object (int32) to a str.␤»
01:21 IOninja m: use NativeCall; use MONKEY-TYPING; augment class Signal { method raise(int32:) is native { * } }; SIGSYS.raise(SIGSYS)
01:21 camelia rakudo-moar 637241: OUTPUT«Calling raise(Signal, Signal) will never work with declared signature (int32 $: *%_)␤  in method CALL-ME at /home/camelia/rakudo-m-inst-1/share/perl6/sources/24DD121B5B4774C04A7084827BFAD92199756E03 (NativeCall) line 326␤  in block <unit> at <tmp> line…»
01:22 IOninja m: use NativeCall; use MONKEY-TYPING; augment class Signal { method raise(int32:) is native { * } }; SIGSYS.raise
01:22 camelia rakudo-moar 637241: OUTPUT«(signal USR2)»
01:22 BenGoldberg Ooh
01:22 BenGoldberg IOninja++
01:22 timotimo int32 isn't a repr, because you give all reprs as strings (their name)
01:22 timotimo but even then "int32" isn't a repr, either
01:22 timotimo i think the repr is called P6int
01:23 timotimo but you have to do a bit of voodoo if you want to create a class that has that repr, because it wants bit width and signedness
01:23 timotimo El_Che: would you put the vimrc config snippets into blockquotes or something?
01:24 timotimo it looks really strange to have " at the beginning of every other line, and then never have closing ones
01:24 pyrimidine joined #perl6
01:24 timotimo until you realize it's vimscript
01:36 pyrimidine joined #perl6
01:36 samcv how do i declare a sigil variable raw
01:36 samcv i know I can do `my \var = 'foo'` but how can i do `my $var is raw = 'foo'` or something
01:36 timotimo might only work with parameters
01:37 timotimo if you just consistently := to the variable, it ought to have the same effect
01:38 samcv kk
01:38 samcv ah yeah it seems to work if i initialize it like i have to do for \sigil things
01:38 timotimo mhm
01:41 cale2 joined #perl6
01:45 llfourn joined #perl6
01:55 BenGoldberg m: my enum <zero one>; say so zero;
01:55 camelia rakudo-moar 79553d: OUTPUT«False␤»
01:58 ssotka joined #perl6
01:58 ssotka left #perl6
02:08 jeffythedragonsl left #perl6
02:10 BenGoldberg joined #perl6
02:27 jeffythedragonsl joined #perl6
02:28 jeffythedragonsl almost there having trouble with git again...
02:28 timotimo how can we help?
02:29 jeffythedragonsl There is no tracking information for the current branch. Please specify which branch you want to merge with. See git-pull(1) for details.      git pull <remote> <branch>  If you wish to set tracking information for this branch you can do so with:      git branch --set-upstream-to=origin/<branch> VMArray
02:30 jeffythedragonsl probably wasn't the best idea to give the new branch the same name...
02:33 jeffythedragonsl think I got it now
02:33 timotimo actually, i really should go sleep soon
02:34 jeffythedragonsl travis build in progress
02:34 jeffythedragonsl ttyl
02:37 BenGoldberg m: use NativeCall; class T is repr('CPointer') { has int32 $.tv_sec; has int32 $.tv_usec; method gettimeofday(OpaquePointer) returns int32 is native { * } }; my $time = T.new; say T.gettimeofday(Nil); say $time.tv_sec;
02:37 camelia rakudo-moar 79553d: OUTPUT«0␤This representation (CPointer) does not support attribute storage (for type T)␤  in block <unit> at <tmp> line 1␤␤»
02:39 BenGoldberg joined #perl6
02:39 BenGoldberg What does that error message mean?
02:40 BenGoldberg Oh, nevermind.
02:40 BenGoldberg m: use NativeCall; class T is repr('CStruct') { has int32 $.tv_sec; has int32 $.tv_usec; method gettimeofday(OpaquePointer) returns int32 is native { * } }; my $time = T.new; say T.gettimeofday(Nil); say $time.tv_sec;
02:40 camelia rakudo-moar 79553d: OUTPUT«0␤0␤»
02:40 BenGoldberg m: use NativeCall; class T is repr('CStruct') { has int32 $.tv_sec; has int32 $.tv_usec; method gettimeofday(T:, OpaquePointer) returns int32 is native { * } }; my $time = T.new; say T.gettimeofday(Nil); say $time.tv_sec;
02:40 camelia rakudo-moar 79553d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed parameter␤at <tmp>:1␤------> 3 int32 $.tv_usec; method gettimeofday(T:7⏏5, OpaquePointer) returns int32 is native␤»
02:41 BenGoldberg m: use NativeCall; class T is repr('CStruct') { has int64 $.tv_sec; has int32 $.tv_usec; method gettimeofday(OpaquePointer) returns int32 is native { * } }; my $time = T.new; say T.gettimeofday(Nil); say $time.tv_sec;
02:41 camelia rakudo-moar 79553d: OUTPUT«0␤0␤»
02:46 BenGoldberg m: use NativeCall; class T is repr('CStruct') { has int64 $.tv_sec; has int64 $.tv_usec; method gettimeofday(OpaquePointer $tz?) returns int64 is native { * } }; my $time = T.new; say T.gettimeofday(); say $time.tv_sec, $time.tv_usec;
02:46 camelia rakudo-moar 79553d: OUTPUT«0␤00␤»
02:46 BenGoldberg m: use NativeCall; class T is repr('CStruct') { has int64 $.tv_sec; has int64 $.tv_usec; method gettimeofday(T:self, OpaquePointer $tz?) returns int64 is native { * } }; my $time = T.new; say T.gettimeofday(); say $time.tv_sec, $time.tv_usec;
02:46 camelia rakudo-moar 79553d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Invalid type smiley 'self' used in type name␤at <tmp>:1␤------> 64 $.tv_usec; method gettimeofday(T:self7⏏5, OpaquePointer $tz?) returns int64 is n␤»
02:46 llfourn joined #perl6
02:46 cale2 Does p6 have tuples?
02:47 cale2 Or would you just use a list?
02:48 obfusk joined #perl6
02:48 BenGoldberg We've 2-tuples ;)
02:49 BenGoldberg Generally, yeah, just use a list.
02:54 llfourn joined #perl6
02:57 cale2 https://github.com/perl6/doc/issues/1189
02:57 cale2 Am I just confused on this?
03:00 BenGoldberg m: proto foo { };
03:00 camelia rakudo-moar 79553d: ( no output )
03:01 BenGoldberg After 'proto' and 'multi', you can have either 'sub' or 'method'.  However, if you want, you omit the 'sub' or 'method', and perl will assume you meant 'sub'.
03:04 AlexDaniel what the f
03:05 AlexDaniel not sure if I like this dark header on github…
03:05 IOninja Join the club :)
03:07 cale2 m: class Thing { multi hello('test'){say 'test'}; multi hello('name'){say 'name'}; }
03:07 camelia rakudo-moar 79553d: ( no output )
03:08 cale2 so subs and methods are interchangeable then
03:08 cale2 because those defaulted to `multi sub`
03:08 cale2 inside a class...
03:09 TEttinger AlexDaniel: maybe they're preparing to make the site match the octocat logo. as in, it will only be a video feed of the spliced octopus-cat hybrids they're growing in vats, plus a link to a kickstarter to get your own octocat
03:10 AlexDaniel I don't mind if they turn the whole thing dark. But this half-assed contrast jump hurts my eyes
03:11 BenGoldberg m: class Think { multi hello('test') {'test'}; multi hello('name') {'name'} }; sy Think.hello('test');
03:11 camelia rakudo-moar 79553d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    sy used at line 1. Did you mean 'so'?␤␤»
03:11 BenGoldberg m: class Think { multi hello('test') {'test'}; multi hello('name') {'name'} }; say Think.hello('test');
03:11 camelia rakudo-moar 79553d: OUTPUT«No such method 'hello' for invocant of type 'Think'␤  in block <unit> at <tmp> line 1␤␤»
03:11 BenGoldberg m: class Think { multi method hello('test') {'test'}; multi method hello('name') {'name'} }; say Think.hello('test');
03:11 camelia rakudo-moar 79553d: OUTPUT«test␤»
03:12 BenGoldberg cale2, If you want multi subs, then the word 'sub' is optional.  If you want multi methods, then you have to use the word 'method'.
03:13 cale2 I don't understand the benefit of omitting sub
03:13 BenGoldberg Less typing?
03:13 cale2 At the cost of losing grep-ability
03:14 AlexDaniel (sub|multi) ?
03:14 BenGoldberg Perhaps.
03:14 cale2 nope
03:14 cale2 try again
03:14 AlexDaniel (sub|multi) ?
03:15 * BenGoldberg wonders what would break if we made 'sub' nonoptional there.
03:15 cale2 AlexDaniel: that doesn't account for `multi sub myfunc`
03:15 AlexDaniel it pretty much does
03:15 cale2 AlexDaniel: It would capture the word sub as if that's your function name
03:15 BenGoldberg The command line grep tool will print the entire line having the match.
03:16 cale2 I'm thinking specifically of "jump to definition" tools
03:16 BenGoldberg You shoulda said that.
03:16 AlexDaniel "jump to definition" should be smarter than that
03:16 cale2 How so?
03:16 geekosaur also there's grep -o for gnu grep
03:17 AlexDaniel and there's also -P for some greps :P
03:17 AlexDaniel (which, for example, supports \K)
03:18 AlexDaniel cale2: because if your "jump to definition" does a grep for one word then it is definitely broken in many other cases
03:18 AlexDaniel my $foo = '
03:18 AlexDaniel sub test';
03:18 AlexDaniel :P
03:19 * geekosaur suddenly wonders what it'd take to make cscope work with p6
03:19 cale2 It looks on the start of the line, though
03:19 cale2 but I get what you mean
03:19 cale2 It's an atom package. Not exactly Visual Studio
03:20 * BenGoldberg thinks geekosaur would have better luck with ctags.
03:25 geekosaur yesm, ctags would be easier
03:26 geekosaur it gets me the definition. not the use sites, and not the other stuff cscope can do
03:27 IOninja (sub|multi) will also catch all the multi methods and multi submethods
03:28 samcv cale2, what is this jump to definition again
03:28 samcv idk i would look at what atom-language-perl6 uses for its regex ;)
03:28 samcv i remember it being complex
03:28 samcv but it's a place to start to make sure you cover all the bases
03:29 cale2 samcv: It's the fork of goto-definition. Because I suspect that package is not being maintained anymore
03:29 samcv ah yeah
03:29 cale2 Yeah, there's a lot that needs to be accounted for. But the config for a language is just a cascading list of matches
03:29 samcv cloning now. i will look at it
03:29 samcv do you know what regex engine goto-definition uses? is it JS?
03:29 cale2 so it should look for sub, then method, then multi sub, then multi, etc
03:29 cale2 not sure
03:30 samcv or does it use onigumura like first-mate uses to find tokens
03:30 samcv i'm guessing probably javascript cause that's what the nav-marker-plus one does
03:30 pyrimidine joined #perl6
03:31 samcv installing it now
03:32 samcv ok how do i use this cale2
03:32 agentzh joined #perl6
03:32 zacts joined #perl6
03:32 IOninja huggable: optimizer
03:32 huggable IOninja, perl -pi -e 's/(\s*(?:multi\s+)?(method|sub|submethod)\s*([^\s({]+)[^{]+\{)/$1 nqp::say("$2 $3");/g' src/Perl6/Optimizer.nqp
03:32 cale2 samcv: did you install the goto-definition package? I think you put your cursor on the function of object and press alt+command+shift or something like that
03:33 cale2 it says in the readme
03:33 IOninja stuff I use to find all routines
03:33 samcv no i just installed ony your package
03:34 samcv it depends on atom-space-pen-views but idk what that package is or can't find it
03:34 samcv so says package.json at least
03:35 BenGoldberg m: use NativeCall; class Time is repr('CStruct') { has int32 $.t; method get() returns int32 is native is symbol('time') { * } }; my $time = Time.new; say $time.get; say $time.t; # Success!  Sorta, anyway.
03:35 camelia rakudo-moar 79553d: OUTPUT«1486784130␤1486784130␤»
03:36 pyrimidi_ joined #perl6
03:38 cale2 samcv: My fork isn't ready to be installed really. I only changed a couple things
03:38 samcv oh lol
03:39 cale2 yeah, ideally I'd submit a PR and add perl6 to the official one. but PRs aren't going through there
03:41 noganex_ joined #perl6
04:36 Cabanoss- joined #perl6
04:43 xtreak joined #perl6
04:46 labster joined #perl6
05:04 guestie_ joined #perl6
05:22 jraglin joined #perl6
05:35 pyrimidine joined #perl6
06:39 Geth ¦ doc: ecca932ca7 | (Samantha McVey)++ | .travis.yml
06:39 Geth ¦ doc: Try and fix Travis CI on OS X
06:39 Geth ¦ doc:
06:39 Geth ¦ doc: On Linux we have to export CXX=g++-4.8 or it will use Travis's super old g++
06:39 Geth ¦ doc: and Oniguruma regex engine used by the highlighter won't build. Try and detect if
06:39 Geth ¦ doc: there is a g++-4.8 binary and if not, fall back to just plain g++
06:39 Geth ¦ doc: review: https://github.com/perl6/doc/commit/ecca932ca7
06:46 CIAvash joined #perl6
06:51 aborazmeh joined #perl6
06:51 aborazmeh joined #perl6
07:01 Geth ¦ doc: 456e63b0b7 | (Samantha McVey)++ | htmlify.p6
07:01 Geth ¦ doc: Fix parallel builds. await now works properly. --parallel=10 works
07:01 Geth ¦ doc: review: https://github.com/perl6/doc/commit/456e63b0b7
07:01 samcv \o/
07:02 samcv parallel builds on the docs now work
07:06 samcv it builds usually fine, though sometimes will build and get Use of uninitialized value $node of type Any in string context
07:06 samcv but looks like jnthn changes were def needed, but this allows it to build without failing about broken promises
07:07 samcv without jnthn's changes and applying this fix i get like a page of those uninitialized value warnings, so we are close i think
07:10 pyrimidine joined #perl6
07:30 darutoko joined #perl6
07:31 samcv oh wait looks like those errors showed up on not master, was some commits back. re-running and maybe they will go away, fingers crossed
07:33 samcv ok only got one this time. very nice, though the build stops when riting per-syntax files ...
07:33 samcv ....No such method 'contents' for invocant of type 'Any'
07:33 samcv probably from the warning further up
07:35 pyrimidine joined #perl6
07:42 bjz joined #perl6
07:43 ufobat joined #perl6
07:43 rindolf joined #perl6
07:46 Tonik joined #perl6
07:58 cpage_ joined #perl6
08:09 wamba joined #perl6
08:09 rindolf joined #perl6
08:16 xinming joined #perl6
08:30 agentzh joined #perl6
08:36 pyrimidine joined #perl6
08:40 parv joined #perl6
08:50 bjz joined #perl6
08:52 llfourn joined #perl6
09:08 RabidGravy joined #perl6
09:09 Actualeyes joined #perl6
09:20 mr-foobar joined #perl6
09:29 RabidGravy Moo
09:32 samcv Moo!
09:32 elisdg joined #perl6
09:33 elisdg left #perl6
09:33 ufobat IOninja++
09:37 pyrimidine joined #perl6
09:41 samcv .tell cale2 Added a section on EditorConfig to Atom-as-a-Perl6-IDE https://github.com/perl6/Atom-as-a-Perl6-IDE#editorconfig Editor agnostic per project/filetype management of indentation level, line ending and indentation type and more.
09:41 yoleaux samcv: I'll pass your message to cale2.
09:50 jjido joined #perl6
09:53 llfourn joined #perl6
09:56 samcv Unhandled exception in code scheduled on thread 16
09:56 samcv at 1: can't parse objects starting in b yet (context: olew w)
09:56 samcv weird error lol
10:03 ufobat i've got a question regarding rules in grammars, why does whitespaces in the end match but not in the beginngin?
10:03 ufobat m: grammar D {rule TOP { a b }}; say D.parse("a b ")
10:03 camelia rakudo-moar 79553d: OUTPUT«「a b 」␤»
10:03 ufobat m: grammar D {rule TOP { a b }}; say D.parse(" a b")
10:03 camelia rakudo-moar 79553d: OUTPUT«Nil␤»
10:04 ufobat i could do this
10:04 ufobat m: grammar D {rule TOP { a b }}; say D.parse("^^ a b")
10:04 camelia rakudo-moar 79553d: OUTPUT«Nil␤»
10:04 ufobat m: grammar D {rule TOP { ^^ a b }}; say D.parse("a b")
10:04 camelia rakudo-moar 79553d: OUTPUT«「a b」␤»
10:04 ufobat m: grammar D {rule TOP { ^^ a b }}; say D.parse(" a b")
10:04 camelia rakudo-moar 79553d: OUTPUT«「 a b」␤»
10:04 ufobat but i am wondering why it behaves differently
10:05 samcv oh ufobat
10:05 samcv you talking about with sigspace on?
10:05 ufobat yes
10:05 samcv yeah i noticed that too
10:05 parv joined #perl6
10:06 ufobat btw, some "code boxes" have propper coloring some dont: https://docs.perl6.org/language/regexes#Sigspace
10:06 samcv i had an rt open
10:06 samcv need to find it
10:07 ufobat :D okay
10:07 samcv but ufobat basically that is intentional, no matching in front because for /:i blah/
10:07 samcv and TimToady said that all of perl 6 would come crashing down if it didn't match trailing whitespace with sigspace on
10:07 samcv not sure i _may_ have updated roast to test those instances
10:08 samcv and may or may not have changed the synopsis. because before there were 0 roast tests for whether sigspace did or didn't match trailing whitespace
10:08 samcv and the synopsis was not completely transparent, though it seemed likely this was ok since we allow sigspace following any legal token
10:10 ocbtec joined #perl6
10:10 ufobat *nod*
10:13 ufobat so a TOP rule could look like ^ <something> $ . The $ doesn't mean anything but the ^ is mandatory if you want to parse the whitespaces on both ends
10:13 samcv oh one thing interesting tho ufobat
10:13 samcv https://rt.perl.org/Ticket/Display.html?id=130045
10:13 samcv variable interpolation in regex ignores leading whitespace too
10:14 samcv which is a little weird. i'm not 100% sure. but you can do my $string = ":i blah" m:s/<$blah>/
10:15 samcv i was putting different things in that string and when i head leading spaces it was broken. so i worked around it by just quoting all spaces before passing in throug hto the regex XD
10:15 samcv wonder if we will ever get allsigspace lol
10:15 ufobat hehe :D
10:19 bpmedley joined #perl6
10:21 samcv ugh javascript is so weird to program in
10:22 samcv i can't even put a sleep in there without having to call a function after the sleep
10:22 samcv there's no async sleep or anything
10:27 samcv well i guess i can just set it to try 100001 times to see if the file is there
10:27 samcv which takes about 0.7 secs on my computer
10:29 samcv should at least give us more diagnostic info and make it a little more forgiving as we try and make more things parallel in the doc builder
10:29 samcv since the highlighter is already async, if i make the perl 6 code async it will tell it the filename before it exists
10:30 samcv not gonna commit that test though, since it needs to i guess signal with a promise it's written the file
10:30 samcv maybe pass a Pair object with filename in one spot and promise as the value
10:30 jjido joined #perl6
10:31 samcv would be nice if it could watch a given file, but you can only watch files that already exist
10:33 agentzh joined #perl6
10:40 ufobat i've more problems
10:41 ufobat according to the documentation a rule with { <foo> * } applies the <.ws> between each reoccuring <foo>
10:41 ufobat but it isnt working for <foo> * % ',' for example
10:42 samcv this is with sigspace right?
10:42 ufobat wait a bit :/
10:42 eroux joined #perl6
10:43 ufobat yeah
10:44 ufobat m: grammar D { rule TOP { <foo> * % ","}; token foo {"foo"}}; say D.parse("foo, foo")
10:44 camelia rakudo-moar 79553d: OUTPUT«Nil␤»
10:44 sena_kun joined #perl6
10:44 ufobat vs
10:44 ufobat m: grammar D { rule TOP { <foo> *}; token foo {"foo"}}; say D.parse("foo foo")
10:44 camelia rakudo-moar 79553d: OUTPUT«「foo foo」␤ foo => 「foo」␤ foo => 「foo」␤»
10:46 samcv wait where in the docs does it say that?
10:46 ufobat So, foo + becomes [ foo <.ws> ]+.
10:47 ufobat https://docs.perl6.org/language/regexes#Sigspace
10:47 samcv i don't see you using the sigspace tho?
10:47 ufobat ach! its because i have "foo, foo" and not "foo ,foo"
10:48 ufobat me whitespace is just after foo before the comma
10:48 ufobat s/me/my/
10:48 samcv ah yeah rules have sigspace on right?
10:48 ufobat rules have sigspaces on, yeah
10:49 samcv ye
10:49 samcv m: say 'a  ' ~~ m:s/a /
10:49 camelia rakudo-moar 79553d: OUTPUT«「a  」␤»
10:49 samcv m: say ('a  ' ~~ m:s/a /).chars
10:49 camelia rakudo-moar 79553d: OUTPUT«3␤»
10:49 samcv sigspace is weird
10:49 samcv cause it matches more spaces than you designate
10:50 samcv bisectable6, : say ('a  ' ~~ m:s/a /).chars
10:50 bisectable6 samcv, On both starting points (old=2015.12 new=79553d0) the exit code is 1 and the output is identical as well
10:50 bisectable6 samcv, Output on both points: ===SORRY!=== Error while compiling /tmp/sLFu3w0Owj␤Bogus statement␤at /tmp/sLFu3w0Owj:1␤------> :⏏ say ('a  ' ~~ m:s/a /).chars␤    expecting any of:␤        colon pair
10:50 samcv bisectable6, say ('a  ' ~~ m:s/a /).chars
10:50 bisectable6 samcv, On both starting points (old=2015.12 new=79553d0) the exit code is 0 and the output is identical as well
10:50 bisectable6 samcv, Output on both points: 3
10:50 ufobat i think a space in your regex becomes <ws> and that matches quite a lot
10:50 samcv yes exactly
10:50 samcv it has greedy matching
10:50 samcv i edited the <ws> thing recently
10:51 samcv to make it a tiny bit faster and it's sorta odd. even weirder is <ws> for the perl 6 grammar
10:51 samcv which is pretty complex
10:51 samcv basically whitespace #→ end of line, or #`{ or pod… and uh
10:51 samcv probably some other things
10:52 llfourn joined #perl6
10:52 ufobat :/ i am really unhappy with the starting whitespace behaviour :/ because <foo> * % ',' matches foo ,foo but doesnt foo, foo.
10:52 samcv bisectable6, say ('a  b' ~~ m:s/a b/).chars
10:52 bisectable6 samcv, On both starting points (old=2015.12 new=79553d0) the exit code is 0 and the output is identical as well
10:52 bisectable6 samcv, Output on both points: 4
10:52 samcv bisectable6, say ('a  b' ~~ m:s/a b/)
10:52 bisectable6 samcv, On both starting points (old=2015.12 new=79553d0) the exit code is 0 and the output is identical as well
10:52 bisectable6 samcv, Output on both points: 「a  b」
10:52 samcv m: say ('a  b' ~~ m:s/a b/)
10:52 camelia rakudo-moar 79553d: OUTPUT«「a  b」␤»
10:53 samcv yeah super odd. one space matches more than one. so i guess you can space it out or whatever
10:53 samcv and you are supposed to quote it otherwise
10:53 samcv if they're literal spaces
10:53 samcv m: say ' a b c' ~~ /<:ws>/
10:53 camelia rakudo-moar 79553d: OUTPUT«「 」␤»
10:54 ufobat what does the : mean?
10:54 samcv m: say "\t" ~~ /<:ws>/
10:54 camelia rakudo-moar 79553d: OUTPUT«Nil␤»
10:54 samcv that's unicode properties
10:54 samcv so that's the White_Space unicode property
10:55 samcv m: say "\t blah" ~~ /<+:ws +[\t\r\n]>/
10:55 camelia rakudo-moar 79553d: OUTPUT«「    」␤»
10:55 samcv m: say "blah19404503\\/._" ~~ m:g/<:Latin>/
10:55 camelia rakudo-moar 79553d: OUTPUT«(「b」 「l」 「a」 「h」)␤»
10:56 samcv m: say "blah19404503\\/._" ~~ m:g/<+:Common +:Latin>/
10:56 camelia rakudo-moar 79553d: OUTPUT«(「b」 「l」 「a」 「h」 「1」 「9」 「4」 「0」 「4」 「5」 「0」 「3」 「\」 「/」 「.」 「_」)␤»
10:56 samcv m: say "????blah19404503\\/._" ~~ m:g/<+:Common +:Latin>/
10:56 camelia rakudo-moar 79553d: OUTPUT«(「????」 「b」 「l」 「a」 「h」 「1」 「9」 「4」 「0」 「4」 「5」 「0」 「3」 「\」 「/」 「.」 「_」)␤»
10:56 samcv hmm i guess emoji are common script
10:59 Geth ¦ doc: cfb60e385a | (Samantha McVey)++ | highlights/highlight-filename-from-stdin.coffee
10:59 Geth ¦ doc: Add some more fallback for the Highlights runner
10:59 Geth ¦ doc:
10:59 Geth ¦ doc: If the file we are passed doesn't exist, we check back to see if it is then created.
10:59 Geth ¦ doc: We give an error regardless if we don't find the file the first time, but this makes it
10:59 Geth ¦ doc: a little more fault tolerant.
10:59 Geth ¦ doc: review: https://github.com/perl6/doc/commit/cfb60e385a
11:09 patrickz joined #perl6
11:21 espadrine joined #perl6
11:21 moritz &?ROUTINE is mean to be the inner-most outer lexical Routine, right?
11:22 moritz m: sub f($x) { sub { if True {say &?ROUTINE.name  } } }.(42)()
11:22 camelia rakudo-moar 79553d: OUTPUT«f␤»
11:22 moritz :sadface
11:23 moritz m: sub f($x) { sub { say &?ROUTINE.name  } }.(42)()
11:23 camelia rakudo-moar 79553d: OUTPUT«␤»
11:26 moritz m: sub f($x) { sub g { if True {say &?ROUTINE.name  } } }.(42)()
11:26 camelia rakudo-moar 79553d: OUTPUT«f␤»
11:31 jjido joined #perl6
11:32 cdg joined #perl6
11:34 rightfold left #perl6
11:42 FROGGS joined #perl6
11:48 jjido joined #perl6
11:53 llfourn joined #perl6
12:33 El_Che lo
12:33 yoleaux 00:24Z <gfldex> El_Che: you may want to link to https://gfldex.wordpress.com/2016/08/31/one-line-of-unicode-at-you-fingertips/
12:34 El_Che .tell gfldex thx. Do you know how it can be added to .vimrc?
12:34 yoleaux El_Che: I'll pass your message to gfldex.
12:37 agentzh joined #perl6
12:39 cdg joined #perl6
12:40 parv joined #perl6
12:41 cdg joined #perl6
12:42 gdonald joined #perl6
12:44 AlexDaniel joined #perl6
12:44 ChoHag joined #perl6
13:07 gfldex El_Che: not yet
13:07 yoleaux 12:34Z <El_Che> gfldex: thx. Do you know how it can be added to .vimrc?
13:08 pyrimidi_ joined #perl6
13:10 cdg_ joined #perl6
13:15 Wanderer68 joined #perl6
13:33 baest joined #perl6
14:12 sena_kun joined #perl6
14:12 colomon joined #perl6
14:15 wamba joined #perl6
14:15 baest joined #perl6
14:27 SmokeMachine Is there any perl6 http/2 client?
14:29 sena_kun SmokeMachine, AFAIK, there is not. Though HPACK compressor was implemented by jnthn++ and it can be used to create one.
14:29 IOninja probably can get it via HTTP::Tinyish since it uses curl
14:30 IOninja m: sub f($x) { sub blah { say &?ROUTINE.name  }() }.(42)()
14:30 camelia rakudo-moar 79553d: OUTPUT«blah␤No such method 'CALL-ME' for invocant of type 'Bool'␤  in block <unit> at <tmp> line 1␤␤»
14:31 IOninja m: sub f($x) { sub g { if True {say &?ROUTINE.name  } }() }.(42)
14:31 camelia rakudo-moar 79553d: OUTPUT«f␤»
14:41 ufobat joined #perl6
14:56 espadrine joined #perl6
15:11 llfourn joined #perl6
15:13 ChoHag joined #perl6
15:21 wamba joined #perl6
15:25 cibs joined #perl6
15:25 khw joined #perl6
15:28 moritz fwiw it's not just &?ROUTINE.name that's wrong
15:29 moritz if I try to call it, it'll complain about wrong arguments
15:29 IOninja Like how? I'm calling it above and seems fine
15:30 IOninja oh you mean &?REOUTINE is all wrong
15:30 moritz yes
15:32 tbrowder good day, #perl6
15:35 tbrowder one more question about running Bailador:  I assume if I have two domains (two virtual hosts on the same physical machine) I will have to have two instances of Bailador and two different proxy ports, correct?
15:35 IOninja yes
15:35 tbrowder thanks!
15:36 tbrowder my quest has been slowed somewhat by trying to get letsencrypt automatically providing my certs...
15:37 El_Che tbrowder: look a squirrel...
15:37 El_Che :)
15:38 moritz tbrowder: not hard if you let your frontend server serve static files, and have separate document roots for each vhost
15:39 tbrowder roger
15:39 eroux joined #perl6
15:44 raiph joined #perl6
15:45 raiph m: grammar D { rule TOP { <foo> * % "," }; token foo {"foo"}}; say D.parse("foo, foo") # for ufobat
15:45 camelia rakudo-moar 266f34: OUTPUT«「foo, foo」␤ foo => 「foo」␤ foo => 「foo」␤»
15:47 raiph .tell ufobat you didn't have a space after "," in your regex; see https://irclog.perlgeek.de/perl6/2017-02-11#i_14084426
15:47 yoleaux raiph: I'll pass your message to ufobat.
15:47 MilkmanDan joined #perl6
15:49 eroux joined #perl6
16:01 bjz joined #perl6
16:09 ChoHag joined #perl6
16:10 espadrine joined #perl6
16:19 gdonald joined #perl6
16:23 ufobat joined #perl6
16:24 ufobat m: say "abc".trans("aba" => "bcX", :delete)
16:24 camelia rakudo-moar 266f34: OUTPUT«Xcc␤»
16:24 yoleaux 15:47Z <raiph> ufobat: you didn't have a space after "," in your regex; see https://irclog.perlgeek.de/perl6/2017-02-11#i_14084426
16:24 ufobat m: say "abc".trans("aba" => "bcX")
16:24 camelia rakudo-moar 266f34: OUTPUT«bcc␤»
16:24 ufobat is this the desired behaviour?
16:26 IOninja IIRC yes
16:26 IOninja m: say "abc".trans(["aba"] => ["bcX"])
16:26 camelia rakudo-moar 266f34: OUTPUT«abc␤»
16:27 IOninja m: say "abc".trans(["abc"] => ["bcX"])
16:27 camelia rakudo-moar 266f34: OUTPUT«bcX␤»
16:27 ufobat raiph, ahh! thx!
16:27 IOninja ufobat: "this" is what? using the first given replacement instead of... throwing?
16:28 ufobat no in my example i have a string "abc" and trans() first argument was "aba", so i have the a twice in it
16:28 ufobat without :delete the first a is used
16:28 ufobat with :delete the 2nd occurance of a is used
16:28 IOninja Oh, I didn't notice your first eval
16:29 ufobat np :)
16:30 IOninja Don't know anything about .trans, but it does look surprising
16:30 IOninja So, I'd say it's worth reporting
16:30 IOninja m: say "abc".trans(<a b v> => <b c X>, :delete)
16:30 camelia rakudo-moar 266f34: OUTPUT«bcc␤»
16:30 IOninja m: say "abc".trans(<a b a> => <b c X>, :delete)
16:30 camelia rakudo-moar 266f34: OUTPUT«Xcc␤»
16:31 IOninja m: say "abc".trans(<a b a X> => <b c X>, :delete)
16:31 camelia rakudo-moar 266f34: OUTPUT«Xcc␤»
16:31 IOninja m: say "abc".trans(<a b a a> => <b c X>, :delete)
16:31 camelia rakudo-moar 266f34: OUTPUT«cc␤»
16:31 IOninja m: say "abc".trans(<a b a a a> => <b c X>, :delete)
16:31 camelia rakudo-moar 266f34: OUTPUT«cc␤»
16:31 IOninja m: say "abc".trans(<a b a a a> => <b c X Y Z>, :delete)
16:31 camelia rakudo-moar 266f34: OUTPUT«Zcc␤»
16:31 IOninja m: say "abc".trans(<a b a a> => <b c X Y Z>, :delete)
16:31 camelia rakudo-moar 266f34: OUTPUT«Ycc␤»
16:31 IOninja ¯\_(ツ)_/¯
16:32 IOninja oh, wait
16:32 IOninja m: say "abc".trans(<a b c> => <X Y Z>, :delete)
16:32 camelia rakudo-moar 266f34: OUTPUT«XYZ␤»
16:32 IOninja m: say "abc".trans("abc" => "XYZ", :delete)
16:32 camelia rakudo-moar 266f34: OUTPUT«XYZ␤»
16:33 IOninja m: say "abc".trans("aba" => "XYZ", :delete)
16:33 camelia rakudo-moar 266f34: OUTPUT«ZYc␤»
16:33 IOninja m: say "abc".trans("aba" => "XYZ")
16:33 camelia rakudo-moar 266f34: OUTPUT«XYc␤»
16:33 IOninja Yeah, tis weird
16:34 IOninja s: "abc", 'trans', \("aba" => "XYZ")
16:34 SourceBaby IOninja, Sauce is at https://github.com/rakudo/rakudo/blob/266f345/src/core/Str.pm#L2192
16:35 alimon joined #perl6
16:35 pyrimidine joined #perl6
16:35 sena_kun m: say Nil + 3;
16:35 camelia rakudo-moar 266f34: OUTPUT«Use of Nil in numeric context␤  in block <unit> at <tmp> line 1␤3␤»
16:36 IOninja m: say "abc".trans("abc" => "XYZ", :meows)
16:36 camelia rakudo-moar 266f34: OUTPUT«XYZ␤»
16:36 IOninja m: say "abc".trans("aba" => "XYZ", :meows)
16:36 camelia rakudo-moar 266f34: OUTPUT«ZYc␤»
16:36 IOninja m: say "abc".trans("aba" => "XYZ")
16:36 camelia rakudo-moar 266f34: OUTPUT«XYc␤»
16:37 ufobat ha :)
16:38 IOninja ufobat: looks like indeed a bug (inconsistency) on how duplicates are processed between .trans with named args and without. It follows one codepath without any named args and if there are any, changes the replacement to list form and that apparently uses different path for dups
16:38 ufobat should i, will you create a bug report?
16:39 agentzh joined #perl6
16:39 ufobat i will :)
16:40 IOninja Too late https://rt.perl.org/Ticket/Display.html?id=130762
16:40 ufobat :D
16:40 ufobat i mean i wont send one!! :D
16:41 ufobat thanks IOninja :)
16:56 itcharlie1 joined #perl6
17:01 Herby_ joined #perl6
17:04 Herby_ o/
17:04 timotimo heyo herby
17:07 dmaestro joined #perl6
17:16 tony-o timotimo: two of those issues you posted on modules.zef.pm should be resolved
17:16 timotimo cool :)
17:16 tony-o the one where it should show an image rather than the image data when viewing that file
17:17 tony-o the other where it wasn't escaping < > in the code
17:17 tony-o taking a look at the README issue now too
17:17 timotimo yeah, i imagined the readme-with-images thing might warrant a bit more thought
17:17 timotimo as in, should it work? should the urls that are already there just work, or should it rewrite urls, etc etc
17:18 kalkin- joined #perl6
17:18 kalkin- hi #perl6
17:18 timotimo heyo
17:19 kalkin- yoleaux: .seen DrForr
17:19 timotimo i think you use it without a name in front
17:19 kalkin- .seen DrForr
17:19 yoleaux I saw DrForr 10 Feb 2017 14:25Z in #perl6: <DrForr> Well, there are lots of things I wouldn't expect it to be able to dump, but it's good to know that the circular case is taken care of.
17:23 dmaestro I seem to have stumbled on a corner case of Perl6 syntax. Trying to build a hash from an array, without the "key is a Str" constraint. Using :{}
17:23 dmaestro This does what I expect:
17:23 dmaestro m: my @letters = 'A' .. 'E' ; :{ 1 => 2, @letters.pairs }.perl.say
17:23 camelia rakudo-moar 266f34: OUTPUT«:{0 => "A", 1 => "B", 2 => "C", 3 => "D", 4 => "E"}␤»
17:23 tony-o timotimo: i'm looking at how feasible it is to rewrite the url data
17:23 tony-o i think that's what i'm going to do but i don't know how maintainable that's going to be long term
17:24 dmaestro m: my @letters = 'A' .. 'E' ; :{ @letters.pairs }.perl.say
17:24 camelia rakudo-moar 266f34: OUTPUT«-> ;; $_? is raw { #`(Block|82088664) ... }␤»
17:24 timotimo m: my @letters = 'A' .. 'E' ; :{ @letters.pairs, }.perl.say
17:24 camelia rakudo-moar 266f34: OUTPUT«-> ;; $_? is raw { #`(Block|60768440) ... }␤»
17:24 kalkin- .tell DrForr I would like to change the Perl6::Element constructor to accept just an NqpMatch so it could access the NqpMatch.orig to calculate the actual line-start & line-end. Would you accept such PR?
17:24 yoleaux kalkin-: I'll pass your message to DrForr.
17:24 timotimo interesting.
17:24 dmaestro But this does not ... am I missing something, or is this a bug?
17:24 timotimo i'm not sure we have any reason for :{ ... } to ever be a code block
17:24 dmaestro ;-)
17:26 timotimo you should be able to get the hash from a list with Hash[Any].new( ... ) i guess
17:26 timotimo m: my @letters = 'A' .. 'E' ; Hash[Any].new(@letters.pairs).perl.say
17:26 camelia rakudo-moar 266f34: OUTPUT«(my Any % = "0" => "A", "1" => "B", "2" => "C", "3" => "D", "4" => "E")␤»
17:26 timotimo oh, huh
17:26 timotimo m: my @letters = 'A' .. 'E' ; Hash[Any, Any].new(@letters.pairs).perl.say
17:26 camelia rakudo-moar 266f34: OUTPUT«(my Any %{Any} = 0 => "A", 1 => "B", 2 => "C", 3 => "D", 4 => "E")␤»
17:26 timotimo that's how
17:28 dmaestro @timotimo Thanks, that's helpful. Any ideas what's happening with the other syntax?
17:29 timotimo yeah
17:29 timotimo hash syntax with curly braces is always in a state where we first parse it completely, then figure out if it was meant to be a hash or a code block
17:29 tony-o http://modules.zef.pm/modules/Timo%20Paulssen/SDL2::Raw?file=screenshots/..#documentation
17:30 timotimo neato!
17:30 tony-o surprisingly, that worked on the first attempt so i'm sure it's going to blow up at some point
17:30 tony-o oh, i should make it handle .md files properly also
17:33 dmaestro .tell samcv Thanks for your work on Unicode properties! I've been slowed down working around the prior weaknesses, now it does what I need!
17:33 yoleaux dmaestro: I'll pass your message to samcv.
17:37 timotimo cool!
17:37 tony-o can pod inline images?
17:40 sena_kun titsuki, ping.
17:46 ChoHag joined #perl6
17:49 tony-o timotimo: okay, all of those bugs should be ready if you want to verify they work as expected
17:55 cale2 joined #perl6
18:03 lizmat joined #perl6
18:05 geekosaur joined #perl6
18:06 cdg joined #perl6
18:07 timotimo tony-o: is the repo browser supposed to always show below the documentation?
18:08 timotimo right now it's kind of weird
18:08 timotimo when you click on something in the repo browser, you see only the repo browser
18:08 timotimo then you click on "documentation" and you see both
18:08 timotimo and you click on "repo browser" and you see both, but it jumps down on the page for you
18:10 timotimo tony-o: i find the difference between how subs are highlighted and how methods and classes and enums are highlighted super weird in the source view
18:11 timotimo http://modules.zef.pm/modules/Timo%20Paulssen/SDL2::Raw?file=examples/white_noise.p6#source - here's a somewhat short file that has a sub declared in it
18:12 mrdside joined #perl6
18:28 mrdside left #perl6
18:29 labster joined #perl6
18:32 Geth ¦ ecosystem: fc959710c7 | Altai-man++ | META.list
18:32 Geth ¦ ecosystem: Add Slang::Kazu to the ecosystem
18:32 Geth ¦ ecosystem:
18:32 Geth ¦ ecosystem: See https://github.com/Altai-man/Slang-Kazu
18:32 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/fc959710c7
18:32 sena_kun SmokeMachine, ping.
18:37 hartenfels joined #perl6
18:43 itcharlie1 left #perl6
18:44 jervo joined #perl6
18:45 * [Coke] stares at the pages of config for his AWS IOT button. Coke thought he was smaht, whoops.
18:46 setty1 joined #perl6
18:49 cale2 Does - automatically get translated to :: when you upload a module to the ecosystem?
18:49 yoleaux 09:41Z <samcv> cale2: Added a section on EditorConfig to Atom-as-a-Perl6-IDE https://github.com/perl6/Atom-as-a-Perl6-IDE#editorconfig Editor agnostic per project/filetype management of indentation level, line ending and indentation type and more.
18:50 sena_kun cale2, ? What instances of '-' and '::' you meant?
18:51 cale2 `use Slang::Kazu` vs `slang-kazu` on github
18:51 cale2 Oh wait, you're just writing `::` format in the export
18:52 sena_kun cale2, AFAIK, nothing is converted, it is just me. :)
18:53 sena_kun cale2, the actual data is taken from META6.json files, not from repository names, I think.
18:54 SmokeMachine sena_kun: pong
18:55 sena_kun SmokeMachine, I've implemented some kind of Japanese numerals above, IIRC you can be interested. :) Though it doesn't work in regexes.
18:55 SmokeMachine sena_kun: where can I see that? :)
18:56 sena_kun SmokeMachine, https://github.com/Altai-man/Slang-Kazu
18:56 SmokeMachine sena_kun: do you plan to make it work on regex?
18:57 sena_kun And I admit it took me more than 2-3 days to get there. (:
18:57 sena_kun SmokeMachine, who knows. I just stea... I mean, I was inspired by Slang::Roman.
18:58 sena_kun If needs patching of MAIN grammar, so...
18:59 sjn \o
19:00 sjn r: say "acdef".comb.WHAT
19:00 camelia rakudo-moar 266f34, rakudo-jvm fb4f16: OUTPUT«(Seq)␤»
19:00 sjn docs say that comb returns List:D
19:01 SmokeMachine sena_kun: I'll start to play with that as soon as I get my machine!
19:01 sena_kun sjn, it is complicated. Let me search you a ticket...
19:01 sena_kun ah, no, there wasn't such a ticket... Let's dig into the sources...
19:02 sena_kun SmokeMachine, have fun. :)
19:05 sena_kun sjn, indeed, it returns Seq. Can you point me where in the docs it says that the return type is List:D?
19:06 Tonik joined #perl6
19:06 telex joined #perl6
19:09 gfldex tony-o: pod6 itself can't inline images, we tend  to use ASCII for that. You can provide raw html tags tho.
19:10 sjn sena_kun: https://docs.perl6.org/routine/comb#(Cool)_routine_comb
19:11 * IOninja is reminded of https://metacpan.org/pod/Dist::Zilla::Plugin::Pod::Spiffy :)
19:12 sena_kun sjn, thanks. Indeed, it always was Seq. Thanks for reporting! I'll fix it right away.
19:12 sjn sena_kun: same goes for install/share/perl6/doc/Type/Cool.pod in the repo
19:13 IOninja It was a List pre-2015.09 and I think temporarily somewhere in 2016.09-2016.11 commits I think
19:15 sena_kun IOninja, thanks, I've looked github history for Str.pm, but not to the bottom. :)
19:15 sena_kun should be fixed anyway...
19:16 lizmat joined #perl6
19:17 Geth ¦ doc: 566bdd91a0 | Altai-man++ | doc/Type/Cool.pod6
19:17 Geth ¦ doc: Fix return type of comb; sjn++
19:17 Geth ¦ doc: review: https://github.com/perl6/doc/commit/566bdd91a0
19:17 benjibenjibenji joined #perl6
19:18 sena_kun sjn, fixed, thanks for contribution.
19:18 TEttinger joined #perl6
19:31 Geth ¦ doc/master: 6 commits pushed by Altai-man++
19:31 Geth ¦ doc/master: 08b2fcbb91 | Language/ examples output unification (last part)
19:31 Geth ¦ doc/master: 43cc319e0f | Cleanup some examples
19:31 Geth ¦ doc/master: ba42f1d99b | Fix signatures, skip some examples testing
19:31 Geth ¦ doc/master: e762247204 | Add new items to excluded files list
19:31 Geth ¦ doc/master: e842f77679 | Add new test
19:31 Geth ¦ doc/master: 67b1dfa145 | Merge pull request #1181 from perl6/language-section-examples2
19:31 Geth ¦ doc/master: review: https://github.com/perl6/doc/compare/566bdd91a0...67b1dfa145
19:34 wamba joined #perl6
19:41 cyphase joined #perl6
19:42 yqt joined #perl6
19:45 jjido joined #perl6
19:46 bjz joined #perl6
20:01 samcv morning all
20:01 yoleaux 17:33Z <dmaestro> samcv: Thanks for your work on Unicode properties! I've been slowed down working around the prior weaknesses, now it does what I need!
20:01 timotimo had good sleep, samcv?
20:01 samcv yep
20:02 timotimo cool
20:02 samcv .tell dmaestro you're welcome!
20:02 yoleaux samcv: I'll pass your message to dmaestro.
20:03 sena_kun samcv, 0/
20:12 beatdown joined #perl6
20:17 cdg joined #perl6
20:19 dmaestro joined #perl6
20:28 jjido joined #perl6
20:29 resol joined #perl6
20:29 rindolf joined #perl6
20:31 resol Hello perl6ers, I have what I imagine is a simple question, but for the life of me, I can't seem to figure out the answer.  I can install modules using zef, but if I'd like to try someone else's module, say from any other repository, what's the trick to this?  For example, I wanted to try out Net::Ssh from https://github.com/Demayl/perl6-Net-SSH but don't know how to "install" it?
20:33 sena_kun resol, you can clone a repo and do "zef install ." in the cloned directory?
20:34 moritz resol: if it has the appropriate meta data, you can do what sena_kun said
20:34 resol Aha ...  thanks sena_kun, I'll give that a try.  I knew it had to be simple
20:34 sena_kun sorry, already going to rest. 'night, #perl6.
20:37 resol Thanks very much!  A small step in the learning process ... I appreciate the help!
20:40 jjido joined #perl6
20:43 agentzh joined #perl6
20:47 benjibenjibenji Will the creation of a stand alone executable ever be a feature w/ rakudo
20:50 jeffythedragonsl joined #perl6
20:55 * samcv gets back to working on Unicode Collation Algorithm
20:55 baest joined #perl6
20:57 agentzh joined #perl6
21:07 ocbtec joined #perl6
21:10 * colomon has made a lot of minor improvements to the ABC module in the last few days.  :)
21:12 bjz joined #perl6
21:22 labster joined #perl6
21:25 Geth ¦ Pod-To-HTML/coke/html-test: 09d6fb3fa7 | (Will "Coke" Coleda)++ | lib/Pod/To/HTML.pm
21:25 Geth ¦ Pod-To-HTML/coke/html-test: Don't manipulate html/xhtml pod sections
21:25 Geth ¦ Pod-To-HTML/coke/html-test:
21:25 Geth ¦ Pod-To-HTML/coke/html-test: Pass it through unchanged.
21:25 Geth ¦ Pod-To-HTML/coke/html-test: review: https://github.com/perl6/Pod-To-HTML/commit/09d6fb3fa7
21:28 user9 joined #perl6
21:29 samcv this collation is getting complicated rather quickly
21:29 samcv as æ needs to sort with ae even though they are different numbers of codepoints :)
21:29 samcv should be interesting
21:29 samcv losing my mind :)
21:30 TEttinger samcv: you haven't even gotten to DZ and Dz digraphs being different!
21:30 TEttinger title case craziness
21:30 samcv well that will be fixed with what i'm doing atm too
21:31 samcv do any programming languages even implement UCA?
21:31 samcv looks like java doesn't says unicode
21:31 jjido joined #perl6
21:31 samcv though i thought they had some locale specific thing, but it must just be a half assed UCA
21:33 samcv and i can't find 'æ' in the table but i have it in our unicode database. so it must be in there somewhere
21:33 samcv or we wouldn't have a collation wought
21:34 samcv oh found it
21:34 samcv 00E6  ; [.1C47.0020.0004][.0000.0110.0004][.1CAA.0020.0004] # LATIN SMALL LETTER AE
21:34 jeffythedragonsl attempt #3 https://github.com/MoarVM/MoarVM/pull/532/commits/bf2d419da1414eed3a747b10f8dd02475d086fec
21:36 samcv i'm getting a book on c data structures today that should hopefully help with implementing this
21:37 samcv TEttinger, so you see how æ has three collation arrays?
21:37 samcv if we see ae, we push a's and e's collation weights. if we see æ we push those three, and then first check the primary levels, and ignore the middle one since we're on primary level and it's 0
21:38 jeffythedragonsl samcv: I've implemented a lot of data structures in C if you need help
21:38 samcv thanks
21:39 samcv variable length arrays please :)
21:39 samcv let me count all the codepoints that have multiple collation keys :P
21:41 samcv ok looks like 4721 do
21:41 samcv guess that could be worse
21:43 jeffythedragonsl samcv: like dynamic arrays with malloc and free?
21:44 samcv 4721 with 2+, 905 with 3+, 243 with 4+, 37 with 5+, 21 with 6+
21:44 samcv no these are static
21:44 samcv but maybe that too
21:44 samcv but i have done dynamic ones before
21:44 samcv talking about how these static properties are stored in mvm
21:45 samcv i can just have an array index stored for the characters though that would take up 13 extra bits per codepoint
21:45 samcv since there's 4721 of them
21:48 jeffythedragonsl ya this stuff is why I learned c++ lol
21:48 samcv how does c++ help
21:50 jeffythedragonsl std::vector can change it's size automatically
21:50 samcv well the main problem is storing these indexs to these arrays. forget variable length arrays
21:50 samcv i have 4721 codepoints that need to store indexes
21:51 samcv so i need to figure out how to most efficiently do that
21:51 jeffythedragonsl where's the code for this?
21:51 samcv for which
21:51 samcv what we currently have?
21:52 jeffythedragonsl yeah
21:52 samcv i mean the code right now just only stores collation weights for single codepoints, it doesn't store multiple
21:52 samcv which 4721 codepoints have
21:52 samcv well they're in unicode_db.c is where it's stored. there's a bitfield that stores the character's properties
21:52 avuserow joined #perl6
21:53 samcv but i need to hopefully make that 4721 values smaller. and somehow store it in much less size. or to create my own datastructure but that would probably be wasteful
21:53 jeffythedragonsl this is huge
21:53 samcv yes
21:53 samcv better to store some kind of reference to a new data structure i have yet to make
21:54 AlexDaniel joined #perl6
21:54 IOninja heh, turns out it's trivial to restore normal-looking GitHub. Just need a user script that removed `header-dark` class from one div
21:56 obfusk joined #perl6
21:56 samcv hmm i could store even codepoints in one datastructure and odd in another and cut that to 2350 max value
21:56 AlexDaniel sure
21:56 samcv but that doesn't change number of bytes much
21:56 samcv argh
21:57 jeffythedragonsl so basically you're trying to make things compare equal that are different sizes?
21:57 samcv what?
21:57 sjn joined #perl6
21:57 jeffythedragonsl with the ae symbol for example
21:57 samcv i'm just trying to find a way to store indexes to some data structure that won't be big. because if i add a new field to the bitfield
21:57 samcv but yes that's the final result
21:57 samcv and 14bits attached to every codepoint will make it a lot bigger
21:58 samcv well i guess they're not every codepoint since it's deduped
21:58 samcv meh so it might not increase it that much. i should check actually
21:58 samcv see how many rows we have in the bitfield
21:58 jeffythedragonsl I think I'd need to familiarize myself with the codebase a bit more to help
21:59 samcv ok we have 28922 * 9 MVMuint32 in the props bitfield
21:59 samcv wow that's big
22:00 samcv well 260KB
22:00 samcv but 28922 rows
22:00 samcv so i would add 50KB more in side
22:11 bjz joined #perl6
22:40 cyphase joined #perl6
22:44 pyrimidi_ joined #perl6
22:53 TEttinger samcv: maybe look into concise data structures or even compressed data structures, depending on speed/size tradeoffs
22:55 TEttinger since this is unicode, so it isn't changing at runtime, the main things that matter are lookup cost and size usage, and insert/delete time are irrelevant if I understand it right
22:58 samcv yeah
22:58 samcv i got a book on data structures that should hopefully be here tonight
22:58 samcv to help me brainstorm
22:58 samcv since i plan to *hopefully* rewrite it all, which i've already partially done, it is good to have a plan for everything first :)
22:58 TEttinger so there's, if I understand this right, a non-fixed quantity of bits used per codepoint?
22:59 pyrimidine joined #perl6
22:59 samcv for what? the bitfield or for the collation weights
22:59 TEttinger in the bitfield
22:59 samcv oh no they are all the same, but they're deduplicated
22:59 samcv there's about 20,000 rows
23:01 samcv so there isn't one row for each codepoint
23:01 TEttinger ah, so you want æ to have some information associated with it (or a locale?) that makes it approximately equivalent to "ae"
23:01 TEttinger it seems like storing this info in locales would save the most space
23:02 samcv well exactly it's not gonna be in the bitfield itself
23:02 AlexDaniel m: my $foo = set ‘2016.01’, ‘2016.01.1’; dd $foo
23:02 camelia rakudo-moar 266f34: OUTPUT«Set $foo = set("2016.01","2016.01.1")␤»
23:02 samcv similar to how we have an array of decomposition mappings that are just pointed to in the bitfield
23:02 TEttinger english needs to know that French's e with ` letter is alphabetized the same as Latin letter e, but doesn't need to know anything about the thousands of CJK chars
23:03 AlexDaniel is “$” the only reasonable sigil for sets?
23:03 samcv TEttinger, different languages sometimes have different collation arrays
23:03 TEttinger yep
23:03 samcv but implementing expansions æ maps to multiple collation arrays for example
23:03 TEttinger but I mean Latin alphabet doesn't need to know tifinagh or tamil scripts
23:03 samcv will allow me to implement langauage specific sorting as well
23:03 samcv since they mostly require the same things
23:04 samcv like ch in spanish sorts as its own letter or whatever
23:04 TEttinger heh, in older dictionaries I think yes
23:04 AlexDaniel samcv: I'm a bit late to the party, but is there any possibility to make it lazy?
23:04 samcv what?
23:04 samcv make what lazy
23:05 TEttinger yeah, if unicode collation stuff could be calculated only when needed (when imported maybe?), that would save startup time
23:05 AlexDaniel unicode property table or something? Not sure what it is, I told you I'm late :)
23:06 samcv oh
23:06 samcv no the problem is storing it initially
23:06 samcv in the best way for space
23:07 samcv and there's 4721 special codepoints/sequences that map to multiple collation weight arrays (arrays having primary, secondary, tertiary)
23:07 samcv arays also having special characteristics like marked for punctuation and such
23:07 samcv so we can ignore punctuation if we wish as well (someday)
23:07 samcv but that is not needed to say you have implemented UCA
23:08 AlexDaniel I'm just thinking if there is some code that is not using all this stuff at all (e.g. a short one-liner), perhaps it shouldn't be loaded at all?
23:08 samcv well it's not very big
23:08 samcv well when i have compressed it. i can probably get it down pretty low, like 800K maybe for the whole unicode database is a nice goal
23:09 samcv we're at 1.7MB just for the names only atm. plus everything else :)
23:09 samcv uhm looks like it's about 4.1M atm :)
23:09 samcv hehe
23:10 samcv which is also part of the reasons for my grant. need to update it and resubmit so they have the latest details on what i want to work on
23:10 samcv mostly the same, mostly just i have more info now that i did a month ago
23:22 Actualeyes joined #perl6
23:35 lep-delete joined #perl6
23:52 ssotka joined #perl6

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

Perl 6 | Reference Documentation | Rakudo