Perl 6 language and compiler development | Logs at colabti.org/irclogger/irclogger_logs/perl6-dev | For toolchain/installation stuff see #perl6-toolchain | For MoarVM see #moarvm
Set by AlexDaniel on 12 June 2018.
buggable 🎺🎺🎺 It's time for the monthly Accidental /win Lottery 😍😍😍 We have 2 ballots submitted by 2 users! DRUM ROLL PLEASE!... 00:00
And the winning number is 10! Congratulations to samcv, nine! You win a roll of duck tape!
00:02 BenGoldberg joined 00:06 stmuk joined 00:08 stmuk_ left 01:14 perlpilot joined 02:07 perlpilot left 02:43 microfed left 03:33 p6lert left, Undercover left, dalek joined, ChanServ sets mode: +v dalek, Geth joined, ChanServ sets mode: +v Geth, p6lert joined, synopsebot joined, ChanServ sets mode: +v synopsebot, SourceBaby left 03:34 SourceBaby joined, ChanServ sets mode: +v SourceBaby, Undercover joined, ChanServ sets mode: +v Undercover 04:50 Zoffix joined
Zoffix Is this the right MoarVM build command when built with auto-genned MoarVM? perl Configure.pl --prefix=../../install/bin & gmake & gmake install 04:50
I'm making changes to code, but they don't show up
geekosaur I would distrust that prefix; make it an absolute path 04:51
otherwise you;'re in trouble if it uses it from a subdirectory 04:52
Zoffix oh no /bin part
Looks like the vast majority of Windows roast failure is due to busted `Test::Util::is_run` 04:53
no, not the /bin part -_- 04:59
Zoffix tries with absolute path
no love 05:03
Now I remember why our Windows support lagging… deving on Windows sucks :) 05:04
looks like the cause was stuck background moar.exe processess that were silently preventing from rebuilt moar.exe from being copied 05:05
05:22 Kaiepi left 05:23 Kaiepi joined
Zoffix :S messing with spawn_setup() that spawns a process breaks `use lib ...` weird 05:47
oh, but only with t\fudgeandrun 05:49
06:15 BenGoldberg left 09:36 robertle joined 09:59 lizmat left
[TuxCM] Rakudo version 2018.06-46-g64bdb3dd7 - MoarVM version 2018.06-34-g411f73fdc
csv-ip5xs0.887 - 0.913
csv-ip5xs-207.317 - 7.490
csv-parser24.421 - 24.879
csv-test-xs-200.444 - 0.465
test8.906 - 9.732
test-t2.320 - 2.413
test-t --race1.030 - 1.044
test-t-2041.537 - 41.799
test-t-20 --race14.345 - 14.443
10:09
10:29 Ven`` joined 10:33 Ven`` left 10:44 lizmat joined 12:02 pmurias joined
lizmat Perl 5.28 ahead of Perl 6: metacpan.org/pod/distribution/perl...detectable 12:12
perhaps we should have some regex attribute and a Str.script method that would give the script of the string if all characters are of the same script, and Nil if they are different ? 12:14
pmurias lizmat: by regex attribute you mean adverb? 13:04
lizmat argh
yes, of course :-)
pmurias lizmat: wouldn't something like <samescript \d+> work? 13:06
lizmat I guess :-) 13:07
Geth rakudo: e0e221d44e | (Elizabeth Mattijsen)++ | src/core/Cool.pm6
Naive implementation of uniscript(Str:D)

Inspired by the work of Karl Williamson on Perl 5 as described in:
   metacpan.org/pod/distribution/perl...detectable
this is a prototype of the basic functionality needed to create this Perl 5 ... (11 more lines)
13:48
nqp/truffle: 4 commits pushed by (Paweł Murias)++ 14:00
14:16 brrt joined 14:27 lizmat left 15:15 lizmat joined
[TuxCM] if $o.WHAT gives "(Array of Hash) [{…}]", what is the cheapest way to check if $o is of that type? 15:37
given $o { when Array-ofHash { … }} sounds like not the right way :) 15:38
if $o ~~ Array && $o[0] ~~ Hash ? 15:39
lizmat m: 'my Hash @a; dd @a ~~ Array && @a.of ~~ Hash
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in single quotes; couldn't find final "'" (corresponding starter was at line 1)
at <tmp>:1
------> 3Hash @a; dd @a ~~ Array && @a.of ~~ Hash7⏏5<EOL>
expecting …
lizmat m: my Hash @a; dd @a ~~ Array && @a.of ~~ Hash 15:40
camelia Bool::True
[TuxCM] my $full-aoh = [{:bar("1"),:baz("2"),:foo("3")},{:bar("2"),:baz("a b"),:foo("")}]; 16:10
How can I build a loop or other construct so that keys $full-aoh is *always* < bar baz foo > (sorted) 16:11
Geth rakudo: lizmat assigned to masak Issue Should we allow identifiers with different scripts? github.com/rakudo/rakudo/issues/2003
lizmat assigned to moritz Issue Should we allow identifiers with different scripts? github.com/rakudo/rakudo/issues/2003

  lizmat assigned to niner Issue Should we allow identifiers with different scripts? github.com/rakudo/rakudo/issues/2003
  lizmat assigned to pmichaud Issue Should we allow identifiers with different scripts? github.com/rakudo/rakudo/issues/2003
  lizmat assigned to jnthn Issue Should we allow identifiers with different scripts? github.com/rakudo/rakudo/issues/2003
  lizmat assigned to TimToady Issue Should we allow identifiers with different scripts? github.com/rakudo/rakudo/issues/2003
  lizmat assigned to ugexe Issue Should we allow identifiers with different scripts? github.com/rakudo/rakudo/issues/2003
105f4db380 | (Elizabeth Mattijsen)++ | src/core/Cool.pm6 Should look at the "Script" property, not the general one
16:20
AlexDaniel m: uniscript ‘f’ 16:40
camelia ( no output )
AlexDaniel m: say uniscript ‘f’
camelia Ll
AlexDaniel unidump: f 16:41
unicodable6 AlexDaniel, gist.github.com/39949ee5f2d3c596bd...75fe36ce65
AlexDaniel unidump: after
unicodable6 AlexDaniel, gist.github.com/c6046915280199325f...c5f22f0ed1
AlexDaniel unidump: аfter 16:42
unicodable6 AlexDaniel, gist.github.com/52130fb00556452cc8...2813031b9b
lizmat hmmm... 16:43
oops, forgot to include "Script" 16:45
lizmat really afk&
16:56 brrt left 16:58 microfed joined
b2gills m: my \A′ = uniscript 'A′'; say A′; 17:00
camelia 5===SORRY!5=== Error while compiling <tmp>
Term definition requires an initializer
at <tmp>:1
------> 3my \A7⏏5′ = uniscript 'A′'; say A′;
b2gills m: my \Aʹ = uniscript 'Aʹ'; say Aʹ; # wrong prime 17:01
camelia Latin
b2gills I mean the first one was the wrong prime
17:04 ExtraCrispy left
AlexDaniel m: say uniscript ‘after’ 17:09
camelia Latin
AlexDaniel m: say uniscript ‘𝚊fter’
camelia Latin
AlexDaniel samcv: looking for a comment from you on R#2003 :) 17:18
synopsebot R#2003 [open]: github.com/rakudo/rakudo/issues/2003 Should we allow identifiers with different scripts?
17:18 Zoffix left
AlexDaniel as I see it, any time a variable is declared it can be matched against other variables based on confusables db 17:19
so if there are two variables that look alike, then it can be a compile-time error
well, same for subs and other stuff 17:20
samcv yeah we could do that
AlexDaniel not only this will not ban identifiers with characters from different scripts
samcv that'd be better than just not allow multiple scripts in the same variable :\
AlexDaniel but it will also help with confusables within ascii range, like hello and heIIo and stuff like that 17:21
samcv what if you want to use english and your native language? since programming uses english in most cases, so like my $NOUN-var so let's say the noun is in your own language but then you end it with something in english
due to english being the language for most named constructs in languages
etc
AlexDaniel I wonder how many existing modules or scripts will stop compiling after the change :) 17:22
but we can tweak the detection to our liking
for example, maybe identifiers that are very short can be exempt from these checks 17:23
or something like that
samcv i will comment in a sec. i just woke up btw
AlexDaniel I actually think that “You have two variables that look alike” is a reasonable thing even without malicious stuff in mind 17:25
if you have two variable names that are indeed, well, confusable, why? 17:26
samcv well most likely it was an accident
heh
i mean should it be an error or a warning. because it's a warning now when you have one variable shadow another 17:27
AlexDaniel we can start with a warning, although Zoffix++ doesn't like those :)
Geth rakudo: JJ++ created pull request #2004:
Some typos and updating of variable names
17:37
17:41 robertle left
Geth rakudo: 54368f1fa0 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | docs/module_management.md
Some typos and updating of variable names

In fact, this would contribute towards solving #1941. It's really helping me, at least.
17:46
synopsebot RAKUDO#1941 [open]: github.com/rakudo/rakudo/issues/1941 Document Rakudo-specific classes to support Perl 6 documentation
Geth rakudo: 82866b72b4 | (Zoffix Znet)++ (committed using GitHub Web editor) | docs/module_management.md
Merge pull request #2004 from JJ/patch-1

Some typos and updating of variable names
17:56 robertle joined 18:17 stephane_ joined 18:19 cog left 18:25 cog joined 18:26 stephane_ left
AlexDaniel lizmat++ I like that ticket :) 18:29
Geth ¦ rakudo: zoffixznet self-assigned [RFC] Implement `:handle-win-shell` arg to `run`, `shell`, and `Proc::Async.new` github.com/rakudo/rakudo/issues/2005 18:32
18:38 brrt joined 18:41 microfed left, Kaiepi left
pmurias having hello and heIIo should be allowed 18:56
AlexDaniel pmurias: because? 18:57
pmurias because banning them is a stylistic decision 18:58
they aren't confusable for some people
who use a different font
AlexDaniel so in other words you're saying that R#2003 is not an issue? 18:59
synopsebot R#2003 [open]: github.com/rakudo/rakudo/issues/2003 Should we allow identifiers with different scripts?
pmurias AlexDaniel: I'm not competent enough in unicode to have a strong opinion on banning characters that look *exactly* the same 19:01
AlexDaniel there's no such thing as “look exactly the same”
any font can have any rendering of any character, l can be rendered as a cow
so if you say l and I are not confusable in my font, and therefore are OK, then same statement can be applied to any pair of characters 19:02
moreover, unicode tends not to introduce characters that look exactly the same, even if the proposed character has different semantics 19:03
now there are exceptions of course
pmurias a style checker could (or maybe should) complain about such things 19:04
AlexDaniel but generally different characters will look different, it's humans who are confused by similarly-looking shapes
pmurias but generally rakudo allows stuff that's valid Perl 6 but not the best idea 19:05
for example we compile unindented source code
AlexDaniel I found the example here very compelling: github.com/rakudo/rakudo/issues/20...-401619383
so it's not about something that's not the best idea, it's about people trying to sneak stuff in with malicious intent 19:07
pmurias IMHO if your font is confusing for ASCII characters it sucks and you shouldn't use it for programming
tbrowder_ speaking of humans, i wish we could get rid of non-ascii chars as variables in rakudo code, e.g. \c[CENT SIGN]
AlexDaniel tbrowder_: $¢ is no longer needed I think 19:08
pmurias: I can say the same about non-ascii characters, or maybe even about some subset of commonly used non-ascii chars 19:10
tbrowder_ i think timotimo or nine said so. can i do a pr removing it if all works well?
AlexDaniel and it doesn't matter, as my awesome font will not help someone to review a PR that has garbage in it
tbrowder_: sure
tbrowder_ yep, garbage in text is my problem, too. thnx 19:11
AlexDaniel a-hem, I was talking about maliciously crafted stuff :) 19:12
not unicode characters in general :)
tbrowder_ well, malicious or not, i still haven’t cured seeing all the funny-font chars in all the editors and tools tha i use. 19:13
unicode (non-ascii) is wonderful for people language, but, imo, not for computer programs. 19:15
moritz but it'll mostly be people that read the program 19:16
geekosaur if this is coming down to "but I don't do alien line noise that isn't the characters I grew up with" then we have a problem: who said your character set is the only legal one? but this is working around unicode running into a political problem, places demanding they get their own characters even when they duplicate existing ones
tbrowder_ you know what i mean :)
geekosaur yes, I do know what you mean
that someone should have declared United States ASCII as the only legal character set 19:17
because it's what you know and therefore "standard" and "proper"
pmurias geekosaur: banning non-ascii variables names seems like a good perl6critic policy, the compiler shouldn't do it 19:19
geekosaur maybe. I'd call that local policy, not something that should be enshrined in either the compiler or a general checker 19:20
AlexDaniel banning ascii quotes also seems like a good idea to me :) 19:22
AlexDaniel brings popcorn
anyway, I think the riased issue in R#2003 is irrelevant to all that 19:23
synopsebot R#2003 [open]: github.com/rakudo/rakudo/issues/2003 Should we allow identifiers with different scripts?
AlexDaniel raised*
brrt then there's the simpler argument that a limited number of characters is handy because there's only so many buttons that can be placed in convenient ways for computer entry, and given that (almost) everybody already has a keyboard that outputs ascii... 19:25
i mean, culture is arbitrary, sure, but sometimes aribtrary is acceptable
AlexDaniel and over 50% of perl 6 users can type non-ascii stuff 19:29
so “acceptable” is fine, but there's also “better” :) 19:30
samcv AlexDaniel: interested what you think of my proposal github.com/rakudo/rakudo/issues/20...-401627848 19:32
brrt is that the same set of non-ascii stuff, though 19:50
samcv brrt: hmm? 19:53
AlexDaniel samcv: what if there's no ascii lookalike? 19:57
samcv then ignore it
AlexDaniel samcv: then script that only uses non-ascii variable names is vulnerable to malicious PRs? 19:58
samcv yes
AlexDaniel isn't it LTA?
samcv note: i'm not saying this is the end-all-be-all of this issue. this is a good starting point
notable6 samcv, I cannot recognize this command. See wiki for some examples: github.com/perl6/whateverable/wiki/Notable
samcv and easier to implement. otherwise we have to convert all of the variable names to some confusable-normalized form and compare all of them 19:59
sure it's LTA, but only using ascii variable names you will be protected. and we can address the other issue later if needed 20:00
lizmat samcv: do you have any opinion about unicode.org/reports/tr39/ ? 20:01
AlexDaniel samcv: I think it's tricky, because there are sometimes multiple ascii confusables for a character 20:02
samcv: like I and l
samcv AlexDaniel: well that will cause false positives. and that is over the top 20:03
i don't think *most* people are worried about that
AlexDaniel samcv: I mean there's a problem with step 2 :)
“If it contains any non-ascii characters we replace these non-ascii characters with their ascii lookalikes”
samcv so if it looks like more than one ascii character? 20:04
AlexDaniel It looks like even ascii characters should be replaced to a “normalized” to one form
samcv AlexDaniel: i'll have to see if there's any unicode characters that are confusable for multiple ascii's 20:05
give me a few mins
AlexDaniel any l-like character
unicode.org/cldr/utility/confusabl...amp;r=None
can be deconfused to 1 I l | 20:06
| we can throw away, that's fine
but we're still left with three 1 I l
samcv well yeah. let me come up with a list
AlexDaniel also 20:07
confusables are not just 1-to-1 replacements
m is confusable with rn
for a fixed-width font that's probably not an issue, but I'm not entirely sure 20:08
because even with a fixed-width font there are fullwidth characters
so maybe some halfwidth+halfwidth can be confused with some fullwidth char
well, if we only care about ascii, then maybe all that doesn't matter… 20:17
Geth nqp/truffle: 91547a32dd | (Paweł Murias)++ | 4 files
[truffle] Add some type coercions
20:25
nqp/truffle: f6cb25369c | (Paweł Murias)++ | 4 files
[truffle] Implement nqp::list
nqp/truffle: 3b6bba5128 | (Paweł Murias)++ | 20 files
[truffle] Implement a bunch of comparision ops
samcv AlexDaniel: in their confusables.txt there's only: 20:27
2113 ;006C ;MA# ( ℓ → l ) SCRIPT SMALL L → LATIN SMALL LETTER L#
fyi
AlexDaniel and that's it? 20:28
samcv at least as of version 8
let me check newer :P
no that's it
AlexDaniel: here's the list gist.github.com/samcv/851f0f8a8fa5...d8cbae56ce 20:37
AlexDaniel samcv: I don't understand… so ℓ is confusable with l but not with anything else in this list? 𝚰𝘭І𝖨𝐥ﺍﺎ𝔩ℐℑ𐊊Ⲓ𐌉ℓ𝜤Ɩ𝞘Ι𝚕𝟏∣اI𝗅𝕀1𝙄𝓁𐌠𝐼𞸀𞺀׀𝑰ǀӀᛁ𝟭𝕴Iߊl𝛪ⵏ𝝞𝕝𝟣ו𞣇𝙡𝓘𝗜𝟙𝑙ןⅠ𝘐١𝒍𝖑│𝐈l۱ꓲ𖼨𝙸𝟷𝓵|ⅼ⏽𝗹 20:38
20:38 ggoebel left 20:39 brrt left
samcv i guess this is backwards what i wanted to do. i want to find things that map to multiple different ascii 20:39
AlexDaniel ah
samcv but still iteresting
AlexDaniel but it should still include I, no?
samcv AlexDaniel: ah i see now 20:41
l is confusable with I
so transitively it does
AlexDaniel: ok i got what we wanted 21:04
AlexDaniel: gist.github.com/f501c4d0716ec49454...bf663ddbe1
AlexDaniel samcv: nice. So really it's just 0O and lI1 if we're talking about ascii range 21:06
21:07 robertle left
samcv i mean a lot of them become lookalikes transitively 21:07
though i mean there's not too many in this list. it is only for 1->1 mappings that map to an ascii 21:08
AlexDaniel: should i exclude ascii->ascii confusables? only non-ascii to ascii confusable? 21:09
AlexDaniel I don't know
samcv (still transitive, just the list won't include ascii->ascii confusables).
though the list can stay the same for now because it's useful to see 21:10
AlexDaniel how many visible variables do we have typically?
do we really need this lookup to be super efficient?
I mean, we can even narrow down the search by using variable length 21:11
samcv also i wouldn't say 𝕴 looks like a 1 21:12
AlexDaniel or, ok, identifier length if we're speaking generally
samcv well or an l or an i or a |
how does length factor into this?
also for things that are transitive like i and l and 1 and | those can all be mapped to the same ascii 21:13
for comparing
AlexDaniel samcv: well, if you're declaring a sub named “very-very-long-sub-name”, then even if our confusable detector is really slow, it doesn't matter
samcv ah
only compare ones with the same length
AlexDaniel for example, yeah
that would ignore multichar confusables, but maybe that's fine 21:14
I don't know, I'm just brainstorming
samcv yeah
idk we can maybe include ones like 𝙄 being confusible for I? 21:15
AlexDaniel or even if we have thousands of variables with the same length, we can still come up with something that has a better O()
for example, for every identifier generate it's confusable hash 21:16
so that hola and h0Ia has the same hash
samcv yeah
AlexDaniel and then we can look it up almost instantly, no need for ascii-oriented optimizations
s/it's/its/ – I don't understand how I keep making this mistake :) 21:17
samcv 「'」 is confusable with 「」 :P
AlexDaniel huh? 21:19
samcv i was making a joke. that ' is confusable with empty string 21:20
it's vs its
AlexDaniel ah yeah… well “it's” is indeed confusable with “its” :) 21:21
maybe it's muscle memory because “it's” is more common 21:22
samcv: ok, but seriously, if we get confusables db into rakudo, we can also assign a confusable id for every character… then use that id to generate a confusable hash for any string. And boom, efficient lookup for confusables 21:27
if we make that available to users also, then it could be another great selling point 21:28
among other unicode features in perl 6
samcv: I can't find aа in the list 21:37
u: aа
unicodable6 AlexDaniel, U+0061 LATIN SMALL LETTER A [Ll] (a)
AlexDaniel, U+0430 CYRILLIC SMALL LETTER A [Ll] (а)
AlexDaniel samcv: in the gist I mean
samcv hmm let me see 21:38
AlexDaniel samcv: also maybe
u: yу
unicodable6 AlexDaniel, U+0079 LATIN SMALL LETTER Y [Ll] (y)
AlexDaniel, U+0443 CYRILLIC SMALL LETTER U [Ll] (у)
samcv AlexDaniel: ok it's fixed 21:45
AlexDaniel samcv: why does it say foo foo foo2 foo foo2?
samcv refresh. i fixed it 21:46
AlexDaniel ah right, it was a list of things confusable with ascii characters that have more than one ascii confusable 21:48
samcv yeah. now it has all of them
AlexDaniel but that's probably identical to this table: unicode.org/cldr/utility/confusabl...amp;r=None 21:49
maybe throw in ' and - in there 21:50
unicode.org/cldr/utility/confusabl...amp;r=None
21:59 MasterDuke joined
Geth nqp/truffle: a5f75c6308 | (Daniel Green)++ | 2 files
[truffle] Implement nqp::tclc
22:02
rakudo: zoffixznet++ created pull request #2006:
Fix typo "immediatelly" → "immediately"
22:47
rakudo: e2e4218142 | (Tobias Boege)++ | 2 files
Fix typo "immediatelly" → "immediately"
rakudo: 4bdb9787de | (Zoffix Znet)++ (committed using GitHub Web editor) | 2 files
Merge pull request #2006 from taboege/typo-immediately

Fix typo "immediatelly" → "immediately"
23:20 pmurias left 23:41 MasterDuke left