»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
00:00 cibs joined 00:04 bjz joined 00:06 pyrimidine joined 00:12 wamba left 00:14 pyrimidine left, ssotka left
El_Che Going to bed. But if someone uses vim, try out the new syntax checking support using the JSON error handling: github.com/nxadm/syntastic-perl6/ . Pointers on how to configure vim as a perl6 IDE: nxadm.wordpress.com/2016/08/21/vim...-6-editor/ 00:15
IOninja \o/ 00:20
gfldex .tell El_Che you may want to link to gfldex.wordpress.com/2016/08/31/on...ingertips/ 00:24
yoleaux gfldex: I'll pass your message to El_Che.
00:27 jeffythedragonsl joined 00:30 yqt left, BenGoldberg joined 00:33 cdg_ joined
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]␤»
IOninja Managed to repro <4/2> Rat 00:34
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
and src/core/Rat.pm . compile and voila :)
00:36 cdg left
TimToady yes, that's the lazy optimization that lets you add a column of dollars and cents without reducing after every addition 00:37
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
As in: github.com/rakudo/rakudo/commit/6372417035
00:38 cdg_ left
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
IOninja Sure
TimToady so, yes, you need to reduce before you determine whole numberness 00:40
IOninja OK
then s/Interim//; in the commit title :) 00:41
TimToady or at least see if the modulus comes out to 0
I don't know what the relative price of a % over a reduction is
IOninja I'll bench and use the cheaper one.
TimToady seems like there should be a fast way to determine %% 00:42
00:43 llfourn joined
TimToady certainly for a denominator of 2, it's easy :) 00:43
IOninja :) 00:44
samcv how fast is the +& operator? 00:47
00:48 llfourn left
TimToady probably faster than any kind of division 00:50
otoh, the majority of denominators are not a power of two, and figuring that out has opportunity cost anyway 00:51
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␤»
IOninja m: use nqp; my $r = <1/2> + <3/2>; for ^100_000 { $ = $r.REDUCE-ME }; say now - INIT now
camelia rakudo-moar 637241: OUTPUT«0.184058655␤»
IOninja seems .REDUCE-ME is much faster
samcv it's not any faster at least for 1 and 2 00:53
but maybe will be bigger when you choose larger numbers
yeah %% is even faster for large numbers 00:54
i guess because it doesn't have to convert the whole number to some other format
00:55 cpage_ left
timotimo IOninja: the link in your tweet for nxadm's blog post got b0rked 01:00
and it 404s
IOninja Fixed thanks 01:02
01:02 aborazmeh joined, aborazmeh left, aborazmeh joined
timotimo np 01:09
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
m: use NativeCall; use MONKEY-TYPING; augment class Signal { method raise() is native { * } }; SIGUSR1.raise;
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…»
BenGoldberg Were sugar for this:
m: use NativeCall; Signal.^add_method('raise', sub raise(int32) is native { * }); Signal.^compose; SIGSYS.raise;
camelia rakudo-moar 637241: OUTPUT«(signal USR2)»
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:12
01:16 cyphase left
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
01:18 gdonald left
IOninja for invocant vs rest of args 01:18
01:18 gdonald joined
timotimo BenGoldberg: um, NativeCall already lets you put in "is native" methods 01:18
IOninja :o
BenGoldberg Why doesn't github.com/timo/cairo-p6/blob/mast.../Cairo.pm6 do that, then? 01:19
timotimo how else do you imagine we make cpp work?
dunno. pull request :)
IOninja m: use NativeCall; use MONKEY-TYPING; augment class Signal { method raise() is native { * } }; SRSYS.raise
camelia rakudo-moar 637241: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared name:␤ SRSYS used at line 1␤␤»
IOninja m: use NativeCall; use MONKEY-TYPING; augment class Signal { method raise() is native { * } }; SIGSYS.raise
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…»
IOninja m: use NativeCall; use MONKEY-TYPING; augment class Signal { method raise() is native { * } }; SIGSYS.raise(SIGSYS)
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…»
timotimo if you think you can make it prettier than it is at the moment
IOninja: it's complaining because the class Signal isn't something you can pass to a native call 01:20
don't forget the invocant being passed
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
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;
camelia rakudo-moar 637241: OUTPUT«===SORRY!===␤Cannot unbox a type object (int32) to a str.␤»
IOninja m: use NativeCall; use MONKEY-TYPING; augment class Signal { method raise(int32:) is native { * } }; SIGSYS.raise(SIGSYS)
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…»
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)»
BenGoldberg Ooh
IOninja++
timotimo int32 isn't a repr, because you give all reprs as strings (their name)
but even then "int32" isn't a repr, either
i think the repr is called P6int
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
El_Che: would you put the vimrc config snippets into blockquotes or something?
it looks really strange to have " at the beginning of every other line, and then never have closing ones 01:24
01:24 pyrimidine joined
timotimo until you realize it's vimscript 01:24
01:28 pyrimidine left 01:36 pyrimidine joined
samcv how do i declare a sigil variable raw 01:36
i know I can do `my \var = 'foo'` but how can i do `my $var is raw = 'foo'` or something
timotimo might only work with parameters
if you just consistently := to the variable, it ought to have the same effect 01:37
samcv kk 01:38
ah yeah it seems to work if i initialize it like i have to do for \sigil things
timotimo mhm
01:40 pyrimidine left 01:41 cale2 joined 01:45 llfourn joined 01:48 bjz left 01:49 llfourn left
BenGoldberg m: my enum <zero one>; say so zero; 01:55
camelia rakudo-moar 79553d: OUTPUT«False␤»
01:58 ssotka joined, ssotka left 02:07 BenGoldberg left 02:08 jeffythedragonsl left 02:10 BenGoldberg joined 02:27 jeffythedragonsl joined
jeffythedragonsl almost there having trouble with git again... 02:28
timotimo how can we help?
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:29
probably wasn't the best idea to give the new branch the same name... 02:30
think I got it now 02:33
timotimo actually, i really should go sleep soon
jeffythedragonsl travis build in progress 02:34
ttyl
02:35 jeffythedragonsl left
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:38 BenGoldberg left 02:39 BenGoldberg joined
BenGoldberg What does that error message mean? 02:39
Oh, nevermind. 02:40
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;
camelia rakudo-moar 79553d: OUTPUT«0␤0␤»
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;
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␤»
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:43 aborazmeh left
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:45
camelia rakudo-moar 79553d: OUTPUT«0␤00␤»
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␤------> 0364 $.tv_usec; method gettimeofday(T:self7⏏5, OpaquePointer $tz?) returns int64 is n␤»
02:46 llfourn joined
cale2 Does p6 have tuples? 02:46
Or would you just use a list? 02:47
02:48 obfusk joined
BenGoldberg We've 2-tuples ;) 02:48
Generally, yeah, just use a list. 02:49
02:51 llfourn left 02:54 llfourn joined
cale2 github.com/perl6/doc/issues/1189 02:57
Am I just confused on this?
BenGoldberg m: proto foo { }; 03:00
camelia ( no output )
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:01
AlexDaniel what the f 03:04
not sure if I like this dark header on github… 03:05
IOninja Join the club :)
cale2 m: class Thing { multi hello('test'){say 'test'}; multi hello('name'){say 'name'}; } 03:07
camelia ( no output )
cale2 so subs and methods are interchangeable then 03:08
because those defaulted to `multi sub`
inside a class...
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:09
AlexDaniel I don't mind if they turn the whole thing dark. But this half-assed contrast jump hurts my eyes 03:10
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'?␤␤»
BenGoldberg m: class Think { multi hello('test') {'test'}; multi hello('name') {'name'} }; say Think.hello('test');
camelia rakudo-moar 79553d: OUTPUT«No such method 'hello' for invocant of type 'Think'␤ in block <unit> at <tmp> line 1␤␤»
BenGoldberg m: class Think { multi method hello('test') {'test'}; multi method hello('name') {'name'} }; say Think.hello('test');
camelia rakudo-moar 79553d: OUTPUT«test␤»
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:12
cale2 I don't understand the benefit of omitting sub 03:13
BenGoldberg Less typing?
cale2 At the cost of losing grep-ability
AlexDaniel (sub|multi) ? 03:14
BenGoldberg Perhaps.
cale2 nope
try again
AlexDaniel (sub|multi) ?
BenGoldberg wonders what would break if we made 'sub' nonoptional there. 03:15
cale2 AlexDaniel: that doesn't account for `multi sub myfunc`
AlexDaniel it pretty much does
cale2 AlexDaniel: It would capture the word sub as if that's your function name
BenGoldberg The command line grep tool will print the entire line having the match.
cale2 I'm thinking specifically of "jump to definition" tools 03:16
BenGoldberg You shoulda said that.
AlexDaniel "jump to definition" should be smarter than that
cale2 How so?
geekosaur also there's grep -o for gnu grep
AlexDaniel and there's also -P for some greps :P 03:17
(which, for example, supports \K)
03:18 agentzh left
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
my $foo = '
sub test';
:P
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
but I get what you mean
It's an atom package. Not exactly Visual Studio
BenGoldberg thinks geekosaur would have better luck with ctags. 03:20
geekosaur yesm, ctags would be easier 03:25
it gets me the definition. not the use sites, and not the other stuff cscope can do 03:26
IOninja (sub|multi) will also catch all the multi methods and multi submethods 03:27
samcv cale2, what is this jump to definition again 03:28
idk i would look at what atom-language-perl6 uses for its regex ;)
i remember it being complex
but it's a place to start to make sure you cover all the bases
cale2 samcv: It's the fork of goto-definition. Because I suspect that package is not being maintained anymore 03:29
samcv ah yeah
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
samcv cloning now. i will look at it
do you know what regex engine goto-definition uses? is it JS?
cale2 so it should look for sub, then method, then multi sub, then multi, etc
not sure
samcv or does it use onigumura like first-mate uses to find tokens 03:30
i'm guessing probably javascript cause that's what the nav-marker-plus one does
03:30 pyrimidine joined
samcv installing it now 03:31
ok how do i use this cale2 03:32
03:32 agentzh joined, zacts joined
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
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
it says in the readme 03:33
IOninja stuff I use to find all routines
samcv no i just installed ony your package
it depends on atom-space-pen-views but idk what that package is or can't find it 03:34
so says package.json at least
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, pyrimidine left
cale2 samcv: My fork isn't ready to be installed really. I only changed a couple things 03:38
samcv oh lol
cale2 yeah, ideally I'd submit a PR and add perl6 to the official one. but PRs aren't going through there 03:39
03:41 noganex_ joined 03:44 noganex left 04:09 cale2 left 04:28 AlexDaniel left 04:32 agentzh left 04:34 khw left 04:36 Cabanoss- joined 04:37 labster left 04:40 Cabanossi left, Cabanoss- is now known as Cabanossi 04:43 xtreak joined 04:46 pyrimidi_ left, labster joined 04:58 Actualeyes left 05:04 guestie_ joined 05:10 guestie_ left 05:15 araraloren left 05:21 bwisti left 05:22 jraglin joined 05:35 pyrimidine joined 05:40 pyrimidine left 05:42 xtreak left 05:54 bpmedley left
Geth doc: ecca932ca7 | (Samantha McVey)++ | .travis.yml
Try and fix Travis CI on OS X

On Linux we have to export CXX=g++-4.8 or it will use Travis's super old g++ and Oniguruma regex engine used by the highlighter won't build. Try and detect if there is a g++-4.8 binary and if not, fall back to just plain g++
06:39
06:40 yeltzooo left 06:46 CIAvash joined 06:51 aborazmeh joined, aborazmeh left, aborazmeh joined
Geth doc: 456e63b0b7 | (Samantha McVey)++ | htmlify.p6
Fix parallel builds. await now works properly. --parallel=10 works
07:01
samcv \o/
parallel builds on the docs now work 07:02
it builds usually fine, though sometimes will build and get Use of uninitialized value $node of type Any in string context 07:06
but looks like jnthn changes were def needed, but this allows it to build without failing about broken promises
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:07
07:10 pyrimidine joined 07:15 pyrimidine left 07:30 darutoko joined
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:31
ok only got one this time. very nice, though the build stops when riting per-syntax files ... 07:33
....No such method 'contents' for invocant of type 'Any'
probably from the warning further up
07:35 pyrimidine joined 07:40 pyrimidine left 07:42 bjz joined 07:43 ufobat joined, rindolf joined 07:46 Tonik joined 07:52 rindolf left 07:56 llfourn left 07:58 cpage_ joined 08:03 aborazmeh left 08:07 BenGoldberg left 08:08 bjz left 08:09 wamba joined, rindolf joined 08:16 xinming joined 08:30 agentzh joined 08:36 agentzh left, pyrimidine joined 08:40 parv joined 08:41 pyrimidine left 08:50 bjz joined 08:52 llfourn joined 08:57 llfourn left 09:08 RabidGravy joined 09:09 Actualeyes joined 09:20 mr-foobar joined
RabidGravy Moo 09:29
samcv Moo! 09:32
09:32 elisdg joined 09:33 elisdg left
ufobat IOninja++ 09:33
09:35 wamba left 09:37 pyrimidine joined
samcv .tell cale2 Added a section on EditorConfig to Atom-as-a-Perl6-IDE github.com/perl6/Atom-as-a-Perl6-I...itorconfig 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 09:53 llfourn joined
samcv Unhandled exception in code scheduled on thread 16 09:56
at 1: can't parse objects starting in b yet (context: olew w)
weird error lol
09:56 Tonik left 09:58 llfourn left
ufobat i've got a question regarding rules in grammars, why does whitespaces in the end match but not in the beginngin? 10:03
m: grammar D {rule TOP { a b }}; say D.parse("a b ")
camelia rakudo-moar 79553d: OUTPUT«「a b 」␤»
ufobat m: grammar D {rule TOP { a b }}; say D.parse(" a b")
camelia rakudo-moar 79553d: OUTPUT«Nil␤»
ufobat i could do this 10:04
m: grammar D {rule TOP { a b }}; say D.parse("^^ a b")
camelia rakudo-moar 79553d: OUTPUT«Nil␤»
10:04 parv left
ufobat m: grammar D {rule TOP { ^^ a b }}; say D.parse("a b") 10:04
camelia rakudo-moar 79553d: OUTPUT«「a b」␤»
ufobat m: grammar D {rule TOP { ^^ a b }}; say D.parse(" a b")
camelia rakudo-moar 79553d: OUTPUT«「 a b」␤»
ufobat but i am wondering why it behaves differently
samcv oh ufobat 10:05
you talking about with sigspace on?
ufobat yes
samcv yeah i noticed that too
10:05 parv joined
ufobat btw, some "code boxes" have propper coloring some dont: docs.perl6.org/language/regexes#Sigspace 10:06
samcv i had an rt open
need to find it
ufobat :D okay 10:07
samcv but ufobat basically that is intentional, no matching in front because for /:i blah/
and TimToady said that all of perl 6 would come crashing down if it didn't match trailing whitespace with sigspace on
not sure i _may_ have updated roast to test those instances
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
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, jjido left
ufobat *nod* 10:10
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
rt.perl.org/Ticket/Display.html?id=130045
variable interpolation in regex ignores leading whitespace too
which is a little weird. i'm not 100% sure. but you can do my $string = ":i blah" m:s/<$blah>/ 10:14
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
wonder if we will ever get allsigspace lol
ufobat hehe :D
10:19 bpmedley joined
samcv ugh javascript is so weird to program in 10:21
i can't even put a sleep in there without having to call a function after the sleep 10:22
there's no async sleep or anything
well i guess i can just set it to try 100001 times to see if the file is there 10:27
which takes about 0.7 secs on my computer
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
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
not gonna commit that test though, since it needs to i guess signal with a promise it's written the file
maybe pass a Pair object with filename in one spot and promise as the value
10:30 jjido joined
samcv would be nice if it could watch a given file, but you can only watch files that already exist 10:31
10:33 agentzh joined 10:39 agentzh left
ufobat i've more problems 10:40
according to the documentation a rule with { <foo> * } applies the <.ws> between each reoccuring <foo> 10:41
but it isnt working for <foo> * % ',' for example
samcv this is with sigspace right? 10:42
ufobat wait a bit :/
10:42 eroux joined
ufobat yeah 10:43
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
ufobat vs 10:44
m: grammar D { rule TOP { <foo> *}; token foo {"foo"}}; say D.parse("foo foo")
camelia rakudo-moar 79553d: OUTPUT«「foo foo」␤ foo => 「foo」␤ foo => 「foo」␤»
samcv wait where in the docs does it say that? 10:46
ufobat So, foo + becomes [ foo <.ws> ]+.
docs.perl6.org/language/regexes#Sigspace 10:47
samcv i don't see you using the sigspace tho?
ufobat ach! its because i have "foo, foo" and not "foo ,foo"
me whitespace is just after foo before the comma 10:48
s/me/my/
samcv ah yeah rules have sigspace on right?
ufobat rules have sigspaces on, yeah
samcv ye 10:49
m: say 'a ' ~~ m:s/a /
camelia rakudo-moar 79553d: OUTPUT«「a 」␤»
samcv m: say ('a ' ~~ m:s/a /).chars
camelia rakudo-moar 79553d: OUTPUT«3␤»
samcv sigspace is weird
cause it matches more spaces than you designate
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
samcv, Output on both points: 04===SORRY!04=== Error while compiling /tmp/sLFu3w0Owj␤Bogus statement␤at /tmp/sLFu3w0Owj:1␤------> 03:08⏏04 say ('a ' ~~ m:s/a /).chars␤ expecting any of:␤ colon pair
samcv bisectable6, say ('a ' ~~ m:s/a /).chars
bisectable6 samcv, On both starting points (old=2015.12 new=79553d0) the exit code is 0 and the output is identical as well
samcv, Output on both points: 3
ufobat i think a space in your regex becomes <ws> and that matches quite a lot
samcv yes exactly
it has greedy matching
i edited the <ws> thing recently
to make it a tiny bit faster and it's sorta odd. even weirder is <ws> for the perl 6 grammar 10:51
which is pretty complex
basically whitespace #→ end of line, or #`{ or pod… and uh
probably some other things
10:52 llfourn joined
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
bisectable6 samcv, On both starting points (old=2015.12 new=79553d0) the exit code is 0 and the output is identical as well
samcv, Output on both points: 4
samcv bisectable6, say ('a b' ~~ m:s/a b/)
bisectable6 samcv, On both starting points (old=2015.12 new=79553d0) the exit code is 0 and the output is identical as well
samcv, Output on both points: 「a b」
samcv m: say ('a b' ~~ m:s/a b/)
camelia rakudo-moar 79553d: OUTPUT«「a b」␤»
samcv yeah super odd. one space matches more than one. so i guess you can space it out or whatever 10:53
and you are supposed to quote it otherwise
if they're literal spaces
m: say ' a b c' ~~ /<:ws>/
camelia rakudo-moar 79553d: OUTPUT«「 」␤»
ufobat what does the : mean? 10:54
samcv m: say "\t" ~~ /<:ws>/
camelia rakudo-moar 79553d: OUTPUT«Nil␤»
samcv that's unicode properties
so that's the White_Space unicode property
m: say "\t blah" ~~ /<+:ws +[\t\r\n]>/ 10:55
camelia rakudo-moar 79553d: OUTPUT«「 」␤»
samcv m: say "blah19404503\\/._" ~~ m:g/<:Latin>/
camelia rakudo-moar 79553d: OUTPUT«(「b」 「l」 「a」 「h」)␤»
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」 「\」 「/」 「.」 「_」)␤»
samcv m: say "🐧blah19404503\\/._" ~~ m:g/<+:Common +:Latin>/
camelia rakudo-moar 79553d: OUTPUT«(「🐧」 「b」 「l」 「a」 「h」 「1」 「9」 「4」 「0」 「4」 「5」 「0」 「3」 「\」 「/」 「.」 「_」)␤»
samcv hmm i guess emoji are common script
10:56 llfourn left 10:58 jjido left
Geth doc: cfb60e385a | (Samantha McVey)++ | highlights/highlight-filename-from-stdin.coffee
Add some more fallback for the Highlights runner

If the file we are passed doesn't exist, we check back to see if it is then created. We give an error regardless if we don't find the file the first time, but this makes it a little more fault tolerant.
10:59
11:08 labster left 11:09 patrickz joined 11:12 patrickz left 11:21 espadrine joined
moritz &?ROUTINE is mean to be the inner-most outer lexical Routine, right? 11:21
m: sub f($x) { sub { if True {say &?ROUTINE.name } } }.(42)() 11:22
camelia rakudo-moar 79553d: OUTPUT«f␤»
moritz :sadface
m: sub f($x) { sub { say &?ROUTINE.name } }.(42)() 11:23
camelia rakudo-moar 79553d: OUTPUT«␤»
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 11:32 cdg joined 11:34 rightfold left 11:35 eroux left 11:42 FROGGS joined 11:47 jjido left 11:48 jjido joined 11:53 llfourn joined 11:54 TEttinger left 11:56 CIAvash left 12:02 jjido left 12:08 parv left 12:15 cdg left
El_Che lo 12:33
yoleaux 00:24Z <gfldex> El_Che: you may want to link to gfldex.wordpress.com/2016/08/31/on...ingertips/
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 12:39 cdg joined 12:40 parv joined, cdg left 12:41 cdg joined, agentzh left, gdonald left 12:42 gdonald joined 12:44 AlexDaniel joined 12:45 ChoHag joined, parv left
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, pyrimidine left, gregf_ left 13:10 cdg_ joined 13:12 cdg left 13:15 Wanderer68 joined 13:28 baest left 13:29 ufobat left 13:33 baest joined 13:50 sena_kun left 13:53 bjz left 14:00 espadrine left 14:11 baest left 14:12 sena_kun joined, colomon joined 14:15 wamba joined, baest joined
SmokeMachine Is there any perl6 http/2 client? 14:27
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
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:30 wamba left
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 14:56 espadrine joined 15:01 llfourn left 15:08 espadrine left 15:09 aindilis left 15:11 llfourn joined 15:12 ChoHag left 15:13 ChoHag joined 15:18 ChoHag left 15:21 wamba joined, ufobat left 15:23 cibs left 15:25 cibs joined, khw joined
moritz fwiw it's not just &?ROUTINE.name that's wrong 15:28
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
oh you mean &?REOUTINE is all wrong 15:30
moritz yes
tbrowder good day, #perl6 15:32
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
tbrowder thanks!
my quest has been slowed somewhat by trying to get letsencrypt automatically providing my certs... 15:36
El_Che tbrowder: look a squirrel... 15:37
:)
moritz tbrowder: not hard if you let your frontend server serve static files, and have separate document roots for each vhost 15:38
tbrowder roger 15:39
15:39 eroux joined 15:44 eroux left, raiph joined
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」␤»
raiph .tell ufobat you didn't have a space after "," in your regex; see irclog.perlgeek.de/perl6/2017-02-11#i_14084426 15:47
yoleaux raiph: I'll pass your message to ufobat.
15:47 MilkmanDan joined 15:48 AlexDaniel left 15:49 eroux joined 16:01 bjz joined 16:09 ChoHag joined 16:10 espadrine joined 16:12 bjz left 16:18 gdonald left 16:19 gdonald joined 16:23 ufobat joined
ufobat m: say "abc".trans("aba" => "bcX", :delete) 16:24
camelia rakudo-moar 266f34: OUTPUT«Xcc␤»
yoleaux 15:47Z <raiph> ufobat: you didn't have a space after "," in your regex; see irclog.perlgeek.de/perl6/2017-02-11#i_14084426
ufobat m: say "abc".trans("aba" => "bcX")
camelia rakudo-moar 266f34: OUTPUT«bcc␤»
ufobat is this the desired behaviour?
16:26 ChoHag left
IOninja IIRC yes 16:26
m: say "abc".trans(["aba"] => ["bcX"])
camelia rakudo-moar 266f34: OUTPUT«abc␤»
IOninja m: say "abc".trans(["abc"] => ["bcX"]) 16:27
camelia rakudo-moar 266f34: OUTPUT«bcX␤»
ufobat raiph, ahh! thx!
IOninja ufobat: "this" is what? using the first given replacement instead of... throwing?
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
without :delete the first a is used
with :delete the 2nd occurance of a is used
IOninja Oh, I didn't notice your first eval
ufobat np :) 16:29
IOninja Don't know anything about .trans, but it does look surprising 16:30
So, I'd say it's worth reporting
16:30 FROGGS left
IOninja m: say "abc".trans(<a b v> => <b c X>, :delete) 16:30
camelia rakudo-moar 266f34: OUTPUT«bcc␤»
IOninja m: say "abc".trans(<a b a> => <b c X>, :delete)
camelia rakudo-moar 266f34: OUTPUT«Xcc␤»
IOninja m: say "abc".trans(<a b a X> => <b c X>, :delete) 16:31
camelia rakudo-moar 266f34: OUTPUT«Xcc␤»
IOninja m: say "abc".trans(<a b a a> => <b c X>, :delete)
camelia rakudo-moar 266f34: OUTPUT«cc␤»
IOninja m: say "abc".trans(<a b a a a> => <b c X>, :delete)
camelia rakudo-moar 266f34: OUTPUT«cc␤»
IOninja m: say "abc".trans(<a b a a a> => <b c X Y Z>, :delete)
camelia rakudo-moar 266f34: OUTPUT«Zcc␤»
IOninja m: say "abc".trans(<a b a a> => <b c X Y Z>, :delete)
camelia rakudo-moar 266f34: OUTPUT«Ycc␤»
IOninja ¯\_(ツ)_/¯
oh, wait 16:32
m: say "abc".trans(<a b c> => <X Y Z>, :delete)
camelia rakudo-moar 266f34: OUTPUT«XYZ␤»
IOninja m: say "abc".trans("abc" => "XYZ", :delete)
camelia rakudo-moar 266f34: OUTPUT«XYZ␤»
IOninja m: say "abc".trans("aba" => "XYZ", :delete) 16:33
camelia rakudo-moar 266f34: OUTPUT«ZYc␤»
IOninja m: say "abc".trans("aba" => "XYZ")
camelia rakudo-moar 266f34: OUTPUT«XYc␤»
IOninja Yeah, tis weird
s: "abc", 'trans', \("aba" => "XYZ") 16:34
SourceBaby IOninja, Sauce is at github.com/rakudo/rakudo/blob/266f...r.pm#L2192
16:35 alimon joined, pyrimidi_ left, pyrimidine joined
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␤»
IOninja m: say "abc".trans("abc" => "XYZ", :meows) 16:36
camelia rakudo-moar 266f34: OUTPUT«XYZ␤»
IOninja m: say "abc".trans("aba" => "XYZ", :meows)
camelia rakudo-moar 266f34: OUTPUT«ZYc␤»
IOninja m: say "abc".trans("aba" => "XYZ")
camelia rakudo-moar 266f34: OUTPUT«XYc␤»
ufobat ha :) 16:37
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
ufobat i will :) 16:40
16:40 eroux left
IOninja Too late rt.perl.org/Ticket/Display.html?id=130762 16:40
ufobat :D
i mean i wont send one!! :D
thanks IOninja :) 16:41
16:43 agentzh left 16:56 itcharlie1 joined 17:01 Herby_ joined
Herby_ o/ 17:04
timotimo heyo herby
17:07 dmaestro joined
tony-o timotimo: two of those issues you posted on modules.zef.pm should be resolved 17:16
timotimo cool :)
tony-o the one where it should show an image rather than the image data when viewing that file
the other where it wasn't escaping < > in the code 17:17
taking a look at the README issue now too
timotimo yeah, i imagined the readme-with-images thing might warrant a bit more thought
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
kalkin- hi #perl6 17:18
timotimo heyo
kalkin- yoleaux: .seen DrForr 17:19
timotimo i think you use it without a name in front
kalkin- .seen DrForr
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.
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
This does what I expect:
m: my @letters = 'A' .. 'E' ; :{ 1 => 2, @letters.pairs }.perl.say
camelia rakudo-moar 266f34: OUTPUT«:{0 => "A", 1 => "B", 2 => "C", 3 => "D", 4 => "E"}␤»
tony-o timotimo: i'm looking at how feasible it is to rewrite the url data
i think that's what i'm going to do but i don't know how maintainable that's going to be long term
dmaestro m: my @letters = 'A' .. 'E' ; :{ @letters.pairs }.perl.say 17:24
camelia rakudo-moar 266f34: OUTPUT«-> ;; $_? is raw { #`(Block|82088664) ... }␤»
timotimo m: my @letters = 'A' .. 'E' ; :{ @letters.pairs, }.perl.say
camelia rakudo-moar 266f34: OUTPUT«-> ;; $_? is raw { #`(Block|60768440) ... }␤»
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?
yoleaux kalkin-: I'll pass your message to DrForr.
timotimo interesting.
dmaestro But this does not ... am I missing something, or is this a bug?
timotimo i'm not sure we have any reason for :{ ... } to ever be a code block
dmaestro ;-)
timotimo you should be able to get the hash from a list with Hash[Any].new( ... ) i guess 17:26
m: my @letters = 'A' .. 'E' ; Hash[Any].new(@letters.pairs).perl.say
camelia rakudo-moar 266f34: OUTPUT«(my Any % = "0" => "A", "1" => "B", "2" => "C", "3" => "D", "4" => "E")␤»
timotimo oh, huh
m: my @letters = 'A' .. 'E' ; Hash[Any, Any].new(@letters.pairs).perl.say
camelia rakudo-moar 266f34: OUTPUT«(my Any %{Any} = 0 => "A", 1 => "B", 2 => "C", 3 => "D", 4 => "E")␤»
timotimo that's how
dmaestro @timotimo Thanks, that's helpful. Any ideas what's happening with the other syntax? 17:28
timotimo yeah 17:29
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
tony-o modules.zef.pm/modules/Timo%20Pauls...umentation
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
oh, i should make it handle .md files properly also
17:33 raiph left
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.
timotimo cool! 17:37
tony-o can pod inline images?
sena_kun titsuki, ping. 17:40
17:46 ChoHag joined
tony-o timotimo: okay, all of those bugs should be ready if you want to verify they work as expected 17:49
17:52 ChoHag left 17:55 cale2 joined 17:56 alimon left 18:03 lizmat joined 18:04 geekosaur left 18:05 geekosaur joined 18:06 dmaestro left, cdg_ left, cdg joined
timotimo tony-o: is the repo browser supposed to always show below the documentation? 18:07
right now it's kind of weird 18:08
when you click on something in the repo browser, you see only the repo browser
then you click on "documentation" and you see both
and you click on "repo browser" and you see both, but it jumps down on the page for you
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:10
modules.zef.pm/modules/Timo%20Pauls....p6#source - here's a somewhat short file that has a sub declared in it 18:11
18:12 mrdside joined 18:26 wamba left 18:28 mrdside left 18:29 labster joined, lizmat left
Geth ecosystem: fc959710c7 | Altai-man++ | META.list
Add Slang::Kazu to the ecosystem

See github.com/Altai-man/Slang-Kazu
18:32
sena_kun SmokeMachine, ping.
18:37 hartenfels joined 18:43 itcharlie1 left 18:44 jervo joined
[Coke] stares at the pages of config for his AWS IOT button. Coke thought he was smaht, whoops. 18:45
18:46 setty1 joined
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 github.com/perl6/Atom-as-a-Perl6-I...itorconfig Editor agnostic per project/filetype management of indentation level, line ending and indentation type and more.
sena_kun cale2, ? What instances of '-' and '::' you meant? 18:50
cale2 `use Slang::Kazu` vs `slang-kazu` on github 18:51
Oh wait, you're just writing `::` format in the export
sena_kun cale2, AFAIK, nothing is converted, it is just me. :) 18:52
cale2, the actual data is taken from META6.json files, not from repository names, I think. 18:53
SmokeMachine sena_kun: pong 18:54
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? :)
sena_kun SmokeMachine, github.com/Altai-man/Slang-Kazu 18:56
SmokeMachine sena_kun: do you plan to make it work on regex?
sena_kun And I admit it took me more than 2-3 days to get there. (: 18:57
SmokeMachine, who knows. I just stea... I mean, I was inspired by Slang::Roman.
If needs patching of MAIN grammar, so... 18:58
sjn \o 18:59
r: say "acdef".comb.WHAT 19:00
camelia rakudo-moar 266f34, rakudo-jvm fb4f16: OUTPUT«(Seq)␤»
sjn docs say that comb returns List:D
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...
ah, no, there wasn't such a ticket... Let's dig into the sources...
SmokeMachine, have fun. :) 19:02
sjn, indeed, it returns Seq. Can you point me where in the docs it says that the return type is List:D? 19:05
19:05 ufobat left 19:06 Tonik joined, telex joined
gfldex tony-o: pod6 itself can't inline images, we tend to use ASCII for that. You can provide raw html tags tho. 19:09
sjn sena_kun: docs.perl6.org/routine/comb#(Cool)_routine_comb 19:10
19:11 cale2 left
IOninja is reminded of metacpan.org/pod/Dist::Zilla::Plug...od::Spiffy :) 19:11
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
IOninja It was a List pre-2015.09 and I think temporarily somewhere in 2016.09-2016.11 commits I think 19:13
sena_kun IOninja, thanks, I've looked github history for Str.pm, but not to the bottom. :) 19:15
should be fixed anyway...
19:16 lizmat joined
Geth doc: 566bdd91a0 | Altai-man++ | doc/Type/Cool.pod6
Fix return type of comb; sjn++
19:17
19:17 benjibenjibenji joined
sena_kun sjn, fixed, thanks for contribution. 19:18
19:18 TEttinger joined 19:20 darutoko left
Geth doc/master: 6 commits pushed by Altai-man++ 19:31
19:34 wamba joined 19:36 cyphase left 19:41 cyphase joined 19:42 yqt joined 19:45 jjido joined 19:46 bjz joined
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!
timotimo had good sleep, samcv?
samcv yep
timotimo cool 20:02
samcv .tell dmaestro you're welcome!
yoleaux samcv: I'll pass your message to dmaestro.
sena_kun samcv, 0/ 20:03
20:12 beatdown joined 20:16 cdg left 20:17 cdg joined 20:19 dmaestro joined, jjido left 20:22 rindolf left 20:26 ocbtec left 20:28 jjido joined 20:29 resol joined, rindolf joined
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 github.com/Demayl/perl6-Net-SSH but don't know how to "install" it? 20:31
20:33 jjido left
sena_kun resol, you can clone a repo and do "zef install ." in the cloned directory? 20:33
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
sena_kun sorry, already going to rest. 'night, #perl6.
20:34 sena_kun left 20:36 Actualeyes left, gdonald left
resol Thanks very much! A small step in the learning process ... I appreciate the help! 20:37
20:37 wamba left 20:38 Tonik left, espadrine left 20:40 jjido joined 20:43 agentzh joined 20:47 agentzh left
benjibenjibenji Will the creation of a stand alone executable ever be a feature w/ rakudo 20:47
20:49 baest left 20:50 jeffythedragonsl joined
samcv gets back to working on Unicode Collation Algorithm 20:55
20:55 baest joined 20:57 agentzh joined, labster left 21:07 ocbtec joined
colomon has made a lot of minor improvements to the ABC module in the last few days. :) 21:10
21:11 bjz left 21:12 bjz joined 21:22 labster joined 21:25 user9 left
Geth Pod-To-HTML/coke/html-test: 09d6fb3fa7 | (Will "Coke" Coleda)++ | lib/Pod/To/HTML.pm
Don't manipulate html/xhtml pod sections

Pass it through unchanged.
21:25
21:25 jjido left 21:28 user9 joined
samcv this collation is getting complicated rather quickly 21:29
as æ needs to sort with ae even though they are different numbers of codepoints :)
should be interesting
losing my mind :)
TEttinger samcv: you haven't even gotten to DZ and Dz digraphs being different! 21:30
title case craziness
samcv well that will be fixed with what i'm doing atm too
do any programming languages even implement UCA? 21:31
looks like java doesn't says unicode
21:31 jjido joined
samcv though i thought they had some locale specific thing, but it must just be a half assed UCA 21:31
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
or we wouldn't have a collation wought
oh found it 21:34
00E6 ; [.1C47.0020.0004][.0000.0110.0004][.1CAA.0020.0004] # LATIN SMALL LETTER AE
jeffythedragonsl attempt #3 github.com/MoarVM/MoarVM/pull/532/...475d086fec
21:35 jjido left
samcv i'm getting a book on c data structures today that should hopefully help with implementing this 21:36
TEttinger, so you see how æ has three collation arrays? 21:37
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
jeffythedragonsl samcv: I've implemented a lot of data structures in C if you need help 21:38
samcv thanks
variable length arrays please :) 21:39
let me count all the codepoints that have multiple collation keys :P
ok looks like 4721 do 21:41
guess that could be worse
jeffythedragonsl samcv: like dynamic arrays with malloc and free? 21:43
samcv 4721 with 2+, 905 with 3+, 243 with 4+, 37 with 5+, 21 with 6+ 21:44
no these are static
but maybe that too
but i have done dynamic ones before
talking about how these static properties are stored in mvm
i can just have an array index stored for the characters though that would take up 13 extra bits per codepoint 21:45
since there's 4721 of them 21:46
jeffythedragonsl ya this stuff is why I learned c++ lol 21:48
samcv how does c++ help
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
i have 4721 codepoints that need to store indexes
so i need to figure out how to most efficiently do that 21:51
jeffythedragonsl where's the code for this?
samcv for which
what we currently have?
jeffythedragonsl yeah 21:52
samcv i mean the code right now just only stores collation weights for single codepoints, it doesn't store multiple
which 4721 codepoints have
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
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
samcv yes
better to store some kind of reference to a new data structure i have yet to make
21:54 AlexDaniel joined
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:54
21:55 obfusk left 21:56 obfusk joined
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
samcv but that doesn't change number of bytes much
argh
jeffythedragonsl so basically you're trying to make things compare equal that are different sizes? 21:57
samcv what?
21:57 sjn joined
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
but yes that's the final result
and 14bits attached to every codepoint will make it a lot bigger
well i guess they're not every codepoint since it's deduped 21:58
meh so it might not increase it that much. i should check actually
see how many rows we have in the bitfield
jeffythedragonsl I think I'd need to familiarize myself with the codebase a bit more to help
samcv ok we have 28922 * 9 MVMuint32 in the props bitfield 21:59
wow that's big
well 260KB 22:00
but 28922 rows
so i would add 50KB more in side
22:01 rindolf left 22:07 hartenfels left, cdg left 22:09 bjz left 22:11 bjz joined 22:17 bjz left 22:19 salv0 left 22:30 jeffythedragonsl left 22:36 cyphase left 22:37 RabidGravy left 22:40 cyphase joined 22:44 pyrimidi_ joined, pyrimidine left
TEttinger samcv: maybe look into concise data structures or even compressed data structures, depending on speed/size tradeoffs 22:53
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:55
samcv yeah 22:58
i got a book on data structures that should hopefully be here tonight
to help me brainstorm
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 pyrimidi_ left
TEttinger so there's, if I understand this right, a non-fixed quantity of bits used per codepoint? 22:58
22:59 pyrimidine joined
samcv for what? the bitfield or for the collation weights 22:59
TEttinger in the bitfield
samcv oh no they are all the same, but they're deduplicated
there's about 20,000 rows
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"
it seems like storing this info in locales would save the most space
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
camelia rakudo-moar 266f34: OUTPUT«Set $foo = set("2016.01","2016.01.1")␤»
samcv similar to how we have an array of decomposition mappings that are just pointed to in the bitfield
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
AlexDaniel is “$” the only reasonable sigil for sets? 23:03
samcv TEttinger, different languages sometimes have different collation arrays
TEttinger yep
samcv but implementing expansions æ maps to multiple collation arrays for example
TEttinger but I mean Latin alphabet doesn't need to know tifinagh or tamil scripts
samcv will allow me to implement langauage specific sorting as well
since they mostly require the same things
like ch in spanish sorts as its own letter or whatever 23:04
TEttinger heh, in older dictionaries I think yes
AlexDaniel samcv: I'm a bit late to the party, but is there any possibility to make it lazy?
samcv what?
make what lazy
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 :)
samcv oh 23:06
no the problem is storing it initially
in the best way for space
and there's 4721 special codepoints/sequences that map to multiple collation weight arrays (arrays having primary, secondary, tertiary) 23:07
arays also having special characteristics like marked for punctuation and such
so we can ignore punctuation if we wish as well (someday)
but that is not needed to say you have implemented UCA
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
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
we're at 1.7MB just for the names only atm. plus everything else :) 23:09
uhm looks like it's about 4.1M atm :)
hehe
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
mostly the same, mostly just i have more info now that i did a month ago
23:22 Actualeyes joined 23:23 ocbtec left 23:32 lep-delete left 23:35 lep-delete joined 23:52 ssotka joined