»ö« 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.
lookatme morning 00:41
samcv morning lookatme 01:11
lookatme samcv, morning :) 01:13
samcv i fixed that collation thingy from yesterday :)
gotta bump moar though
lookatme Em, you seem to be busy working on that all day 01:15
samcv yeah. i got done lying down trying to come up with the next stages. so that 'æ' will sort along with ae 01:17
which is pretty neat. sometimes helps to step back from the computer and try and plan it out
still haven't figured out 100% what data structure to store it so it can be quickly checked though. since there's cases where multiple codepoints have a special collation keys different from the codeponits individually. so i will need to check and see if it matches one of the special ones 01:19
which is going to be tricky
lookatme haha, awesome, good luck! 01:24
[Coke]_ samcv: what is "userwide" ? 02:17
[Coke] github.com/perl6/doc/blob/4b329790...y.pod6#L53 ? 02:18
[Coke] .tell samcv userwide is used in doc/Language/unicode_entry.pod6 but refers to something that doesn't exist. I added it to the list of words to quiet the spellchecker; if you remove it from the doc, please also remove it from xt/words.pws 02:21
yoleaux [Coke]: I'll pass your message to samcv.
Geth doc/master: 5 commits pushed by (Will "Coke" Coleda)++ 02:22
[Coke] anyone know what the segfault Proc RT is? 02:23
samcv [Coke], what do you mean about doesn't exist 02:24
yoleaux 02:21Z <[Coke]> samcv: userwide is used in doc/Language/unicode_entry.pod6 but refers to something that doesn't exist. I added it to the list of words to quiet the spellchecker; if you remove it from the doc, please also remove it from xt/words.pws
samcv i mean you want me to use a different word that passes spell check?
[Coke] you refer to it "above". there is no instance of it above. 02:25
[Coke] (or anywhere else in doc/) 02:27
samcv ah 02:35
it should say systemwide
not userwide
[Coke] ah, thanks. want me to fix it?
samcv yeah that would be great
Geth doc: 2b913053d4 | (Will "Coke" Coleda)++ | 2 files
fix typo
02:40
ugexe perlpilot: i dunno if a bot still automatically changes meta.info -> meta6.json in the META.list
[Coke] samcv++
samcv hopefully my tips there can help someone out 02:50
since it took me some personal work to figure that out
Geth doc: 82d7534112 | (Lloyd Fournier)++ (committed using GitHub Web editor) | doc/Type/Str.pod6
Fix missing closing » in docs for Str.Int

which was causing Str.parse-base's heading to disappear
03:08
travis-ci Doc build errored. Will "Coke" Coleda 'fix typos, learn words' 03:13
travis-ci.org/perl6/doc/builds/244769807 github.com/perl6/doc/compare/c21bf...ef25ad580d
travis-ci Doc build errored. Will "Coke" Coleda 'fix typo' 03:30
travis-ci.org/perl6/doc/builds/244772740 github.com/perl6/doc/compare/7eef2...913053d4fb
lookatme I have a script runing with old version(2017.05) rakudo, then I update rakudo to 2017.06, and rakudo throw an exception when script going on from **await Process**. Not a serious problem 03:36
samcv m: my @files = (1,2,3).grep(/./) .flat.list».subst(/./, {"$0"}) 03:42
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing « or »
at <tmp>:1
------> 3 @files = (1,2,3).grep(/./) .flat.list».7⏏5subst(/./, {"$0"})
samcv why doesn't this work?
m: my @files = (1,2,3).grep(/./).flat.list».subst(/./, {"$0"})
camelia Use of Nil in string context
in block at <tmp> line 1
Use of Nil in string context
in block at <tmp> line 1
Use of Nil in string context
in block at <tmp> line 1
samcv this is not an exact example but close of some code i'm writing. the problem is i need to split the methods accoss lines to make it look nicer, since there's a ton of methods 03:42
but it won't let me separate them 03:43
ugexe use unspace 03:46
ugexe .grep(/./)\ \n .flat.list... 03:48
travis-ci Doc build errored. Lloyd Fournier 'Fix missing closing » in docs for Str.Int 03:59
travis-ci.org/perl6/doc/builds/244777119 github.com/perl6/doc/compare/2b913...d753411238
llfourn_ "The job exceeded the maximum time limit for jobs, and has been terminated." on the docs build 04:06
raschipi Yeah, every time travis complains about a doc build it's because it timed out. 04:07
llfourn_ raschipi: hmmm 04:08
llfourn I restarted it to see if we have luck the second time 04:08
raschipi samcv gets annoyed by it: irclog.perlgeek.de/perl6/2017-06-19#i_14752330 04:09
llfourn :) 04:10
I guess we have to build it somewhere else?
or make it faster...
maybe can we not build rakudo before building the docs
but just use a binary 04:11
or docker container
raschipi which distro does it runs on?
llfourn raschipi: ubuntu I think
raschipi ubuntu will get a newishbinary rakudo from debian now that it got unfrozen. 04:12
llfourn ill put an issue on the repo to discuss good idea
raschipi A PPA could also be set up and make fresh binary rakudos available for travis to use 04:16
This way the docs build is tested, but also the doc compiler
llfourn raschipi: github.com/perl6/doc/issues/1384 # ideas can go here :) 04:18
travis-ci Doc build errored. Lloyd Fournier 'Fix missing closing » in docs for Str.Int 04:57
travis-ci.org/perl6/doc/builds/244777119 github.com/perl6/doc/compare/2b913...d753411238
[Coke] m: #` 05:45
camelia ( no output )
Geth doc: 3c7fe8afb7 | (Will "Coke" Coleda)++ | xt/examples-compilation.t
Add support for ENV<P6_DOC_TEST_FUDGE>

if set to a true value, will run all skip-test tests as TODOs, allowing passing code snippets to be identified, :skip-test removed
Resolves #1377
06:02
doc: 0b5126a577 | (Will "Coke" Coleda)++ | 59 files
unfudge many unneeded :skip-tests
Geth doc: 3a1c8f8864 | (Samantha McVey)++ | 2 files
[unicode-grant] add info on parse-names to unicode page

Also link to the Unicode page from the Language/quoting
06:08
Geth doc: 17ad67fd63 | (Will "Coke" Coleda)++ | 2 files
test traps file for compilable code
06:45
doc: f65904cf2e | (Will "Coke" Coleda)++ | doc/Language/traps.pod6
format with OUTPUT, avoid command line invocations

Add a skip reason for non-perl6 code.
Resolves #1386
doc: 586958da17 | (Will "Coke" Coleda)++ | doc/Language/unicode.pod6
fix grammar-o
travis-ci Doc build errored. Will "Coke" Coleda 'unfudge many unneeded :skip-tests' 06:52
travis-ci.org/perl6/doc/builds/244806794 github.com/perl6/doc/compare/82d75...5126a5772e
[Coke] regarding the travis doc builds, see also: github.com/perl6/doc/issues/788 06:53
travis-ci Doc build errored. Samantha McVey '[unicode-grant] add info on parse-names to unicode page 06:59
travis-ci.org/perl6/doc/builds/244807941 github.com/perl6/doc/compare/0b512...1c8f8864eb
travis-ci Doc build errored. Will "Coke" Coleda 'fix grammar-o' 07:36
travis-ci.org/perl6/doc/builds/244815804 github.com/perl6/doc/compare/3a1c8...6958da170e
lizmat clickbaits p6weekly.wordpress.com/2017/06/19/...l-6-books/ 07:43
moritz lizmat++ 07:44
lookatme lizmat++ 07:52
keylet is it possible to get SQLite database schema with DBIish? 08:06
table foo(quick int, brown text, fox text) etc. 08:07
samcv this can't do at all 08:15
Geth doc: d5f31ba0f3 | (Samantha McVey)++ | .travis.yml
[travis-ci]: enable caching some directories to speed up build
samcv hopefully i can get the build actually completing in time
keylet, haven't tried it but i'm pretty sure you can use SQLite with DBIish
almost certain
moritz has done so several times 08:56
travis-ci Doc build errored. Samantha McVey '[travis-ci]: enable caching some directories to speed up build' 09:05
travis-ci.org/perl6/doc/builds/244839079 github.com/perl6/doc/compare/58695...f31ba0f33f
geekosaur "welp" 09:06
samcv hmm i wonder if it uploads even if the build timesout
samcv restarts the build
samcv may need to edit travis to not build the docs so it will cache rakudo/highlighter/modules installed 09:07
and hopefully get the time down
llfourn samcv: not to build the docs? isn't that the point of it? 09:10
samcv it is
but it times out before finishing. and i just enabled caching
so i think it's not uploading the cache
llfourn ahhh
so you can't cache because it doesn't finish because it hasn't cached? 09:11
samcv yes :)
we have never had caching, but the continuing timeouts seem to be telling me to do it... 09:12
llfourn yep caching the precomp should shave a few mins of the build at least
llfourn but having said that it will nuke the precomp everytime we have a new build 09:13
llfourn we have an issue here btw: github.com/perl6/doc/issues/1384#i...-309640682 09:13
samcv yeah there are downsides like that but
have to start somewhere 09:14
also can not recompile unless rakudo has changed
travis-ci Doc build errored. Samantha McVey '[travis-ci]: enable caching some directories to speed up build' 09:57
travis-ci.org/perl6/doc/builds/244839079 github.com/perl6/doc/compare/58695...f31ba0f33f
pmurias what's the difference between the UCD and Unicode-Grant repos? 10:05
Geth Swapped META.info → META6.json in 6 dists in github.com/perl6/ecosystem/commit/cdbcf109cc 10:11
Ven`` are precompiled files system-dependant? 10:28
i.e. github.com/rakudo/rakudo/commit/27...c674546R15 let's say this got precompiled, could this be an issue if the precompiled files got to another computer?
jnthn Ven``: In this case it wouldn't be because lexicals in non-closure situations aren't serialized, so this will be set up at startup each time. 10:30
jnthn In genearl, though, yes, if you share precomps between machines, you can hit issues 10:31
*general
Or put another way, if you want portable pre-comp output, you need to be careful what you do at compile time :) 10:32
Ven`` Thanks :). 10:33
Geth doc: 82b77a11e6 | (Samantha McVey)++ | .travis.yml
[travis-ci] disable doc build temporarily

Hopefully we can get the build files cached this way and the build won't timeout.
Also disable the OS X build which was never useful anyway.
10:45
travis-ci Doc build passed. Samantha McVey '[travis-ci] disable doc build temporarily 11:00
travis-ci.org/perl6/doc/builds/244885433 github.com/perl6/doc/compare/d5f31...b77a11e618
Geth doc: 03b510a9ab | (Samantha McVey)++ | .travis.yml
[travis-ci] add back build
11:04
robertle is there a clever way to check if a IO::Path is "under" another one? I can of course recurse on .parent until I have reached the root, but there must be a better way... 11:22
nine_ robertle: $child.Str.starts-with($root.Str)? Depends on how many real world cases you need to cover. Symlinks can make this a mess. 11:23
robertle nine_: ok, I can resolve() both of them to sort out the symlinks (?) but I think I need to cover most cases, this could be a security problem otherwise 11:24
nine_ robertle: ok, if security is an issue, forget my suggestion :) Can you re-define your problem maybe? Could you change it so, instead of having two absolute path, you only have one absolute root and relative paths? 11:27
robertle totally, good idea 11:28
eveo buggable: eco secure 11:30
buggable eveo, IO::Path::ChildSecure 'Secure version of IO::Path.child': github.com/zoffixznet/perl6-IO-Path-ChildSecure
eveo robertle: ^
eveo And 11:32
And .Str is a wrong way to stringify a path
robertle ah, great 11:35
eveo docs.perl6.org/language/io-guide#S...g_IO::Path
eveo and no, meta.info -> meta6.json script no longer runming in cron 11:43
I just run it manually once in a blue moon 11:44
buggable: eco
buggable eveo, Out of 843 Ecosystem dists, 0 have warnings, 6 have errors, and 0 have no tags in META file. See modules.perl6.org/update.log for details
eveo tis the 6 that got fixed now 11:45
travis-ci Doc build errored. Samantha McVey '[travis-ci] add back build' 11:54
travis-ci.org/perl6/doc/builds/244891299 github.com/perl6/doc/compare/82b77...b510a9abd3
[Coke] (docs) I un-skipped a bunch of tests last night. have one that is now :skip-test<perl5> - going to change that to :lang<perl5>, and then we will skip code with skip-test and any :lang that isn't perl6 (so we can annotate the ruby & haskell files as well, which are half each; we could then also have a prayer of the syntax highlighter being right for langs other than perl6. 12:13
s/of tests/of example code/
pmurias why doesn't docs.perl6.org searchbox find the &val sub? 12:51
ilmari pmurias: docs.perl6.org/routine/val is there, quite a way down 12:53
under "Sub"
TimToady hi everyone, yer up on the screen at TPC::NA 13:15
moritz \o 13:15
moritz I guess now would be a good time to run some text-based ads, right? :-) 13:16
El_Che TPC
I liked YAPC better :)
tadzik o/
TimToady now we're "tipsy"
tadzik Hm, are the talks streamed? 13:17
perlpilot_ As long as TPC doesn't turn into another OSCON we're doing good :)
El_Che haha
tbrowder o/ 13:22
TimToady just recorded, not live, afaik 13:24
sjn wishes they were streamed
btw, does TPF have an irc channel? 13:25
dmaestro sjn: [ssl.]irc.perl.org - ports are listed on www.irc.perl.org 13:26
The ports are blocked at USPTO, though :-(
perlpilot I would guess a TPF channel would be awfully quiet
dmaestro #yapc 13:27
;-)
sjn yeah. I see there's a #tpf on freenoode with obra and ingy in it. :)
TimToady twitter tag is #tpc2017dc
obra sjn: I'm happy to part if you want :) 13:37
araraloren hi 13:55
How Can I hold a reference of another variable/object in class ? 13:56
timotimo well, objects you can easily reference 13:59
araraloren Can you show me some example ? 13:59
moritz m: my $x = 1/3; $x is a reference to a Rat 14:00
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3my $x = 1/3; $x7⏏5 is a reference to a Rat
expecting any of:
infix
infix stopper
statement end
statement modif…
moritz m: my $x = 1/3; # $x is a reference to a Rat
camelia ( no output )
araraloren m: class F { has $.ref is rw; }; my $f = F.new; $f.ref := 3;
camelia 5===SORRY!5=== Error while compiling <tmp>
Cannot use bind operator with this left-hand side
at <tmp>:1
------> 3ref is rw; }; my $f = F.new; $f.ref := 37⏏5;
timotimo m: class Holder { has $.reference }; my $foo = [1, 2, 3]; my $h = Holder.new(reference => $foo); say $h.perl; $foo[2] = 99; say $h.perl 14:01
camelia Holder.new(reference => $[1, 2, 3])
Holder.new(reference => $[1, 2, 99])
pmurias the YAPC::EU rakudo.js talk has been accepted :)
perlpilot pmurias: congrats!
[Coke] if we have perl6-gdb-m, I wonder if we should also have perl6-lldb-m 14:03
pmurias++
araraloren m: class Holder { has $.reference }; my $foo = [1, 2, 3]; my $h = Holder.new(reference => $foo); say $h.perl; $foo.push(42); say $h.perl
camelia Holder.new(reference => $[1, 2, 3])
Holder.new(reference => $[1, 2, 3, 42])
raschipi Everything is reference. You get a reference, you get a reference, everyone gets a reference! 14:04
araraloren m: class Holder { has $.reference }; my $foo = [1, 2, 3]; my $h = Holder.new(reference => $foo); say $h.perl; $foo = "123"; say $h.perl 14:05
camelia Holder.new(reference => $[1, 2, 3])
Holder.new(reference => $[1, 2, 3])
araraloren Oh, That's make sense, thanks timotimo 14:06
awwaiid In case anyone is here at TPC-2017-DC aka YAPC, there's a BOF tonight for perl6 -- github.com/dcbpw/tpc-2017-dc/wiki#bofs 16:18
tbrowder see you at BOF, awwaiid 16:38
ruoso I briefly mentioned my idea for a web action dispatching framework after the talk about handling subcommands in MAIN... I decided to make a small proof of concept of how that would look like... gist.github.com/anonymous/e52cfc09...b40a9984c0 what do you folks think of that approach? 16:46
Of course this would be wrapped in some nicer syntax and things would have proper type names and stuff, but I wanted to see some early feedback on the concept
moritz ruoso: I've considered the same approach; it has a few downsides 16:48
one is that tie breaking becomes pretty hard to do
from a Perl 6 type perspective, both a literal and a regex are just constraints, so you can't say that a literal binds tighter than a regex
ruoso well, but if you have ambiguous resolution within each of those steps, I'd say the app has some design issues 16:49
because you need to be ambiguous afte the resolution of earlier parts of the request path were already resolved 16:50
moritz maybe
but still, you're tied to the design of the multi dispatcher
which might or might not be a good fit for route dispatching
ruoso which scenario do you think this would fall apart?
moritz maybe if you model request types as enum types, you get easier ANY vs. GET dispatching 16:51
ruoso well, the signature could say any('GET', 'POST')... but I don't think I ever came across a situation where I would handle both methods with the same action 16:52
moritz ruoso: I don't know, but since you aren't using types, you don't take advantage of the topological sorting
so you're back to just arity and constraints
ruoso well, the strings here are just a placeholder 16:53
ruoso "foo handler" would be a type that describes the context built up to that point 16:53
moritz I've used the same handlers for GET and for POST in several web apps already 16:53
ah, that changes things
ruoso hmm... now I'm curious... what's the use case?
moritz normal web pages with forms, for example 16:54
on the initial GET, you load the form
on POST, you validate, and if validation fails, you need to build the same form again 16:55
so the difference between GET and POST is pretty small, and putting them in the same handler (with a small case distinction) can be a good tradeoff 16:56
ruoso I see... yeah, any('GET', 'POST') could make sense... but most likely I would declare both and just have the GET do a straight forward to the view, while the POST would do the validation and then forward to the view otherwise
moritz also, a search page that allows you both to submit the form, or to supply the search terms through the URL
ruoso although that is usually only via GET, because you don't want POST resubmission in those cases 16:57
moritz YMMV :-) 16:58
ruoso the thing that I'm missing on this, tho, is the method not supported
as it is now, this would actually give a 404 on a non-supported method instead of the proper error code
but I guess a higher-level framework could generate default handlers for the other methods that return the error code instead 16:59
moritz and now you're working around limitations
ruoso well, sure, nothing is perferct 17:00
not even my typing
raschipi Those limitations can be worked around by doing own dispatch, right? P6 is handy when it fits but it's always possible to have a dispatch table. 17:03
ruoso well, but the point of this exercise would be to delegate the dispatch to the multi itself, rather than having to implement that myself... 17:06
ugexe if both get and post need to load some data, why not put the loading code in the proto, have the get dispatch be essentially empty other than the render call and post can do validation on the data still 17:10
ruoso ugexe: my usual pattern with Catalyst is to have an intermediate action that loads the data, and then a final action that acts on it on the specific method 17:20
on that mockup, the one that returns "foo handler" is the one doing the loading, then you have a separate action that is the "final" action on the chain 17:21
side question: do we have a pre-declared subset of Str where it can be numified to an Int? 17:25
ugexe proto foobar { do_init_stuff(); {*}; do_cleanup_stuff(); }
timotimo i don't think we do 17:26
m: subset NumyString of Str where +*; say "hello" ~~ NumyString; say "99" ~~ NumyString
camelia False
True
17:27
ugexe m: my $x = <2>; say $x.perl; # cant use IntStr somehow to do it?
camelia IntStr.new(2, "2")
lizmat ruoso: there's allomorphs (aka IntStr)
m: dd <42>
camelia IntStr.new(42, "42")
timotimo but strings that look like int don't turn into IntStr by themselves
ruoso m: multi foo(IntStr $f) { say $f }; foo("42") 17:28
camelia Cannot resolve caller foo(Str); none of these signatures match:
(IntStr $f)
in block <unit> at <tmp> line 1
timotimo of course you can just have a coercive type constraint
raschipi m: multi foo(Str(IntStr) $f) { say $f }; foo("42")
timotimo m: multi foo(Int() $a) { say $a }; foo("99")
camelia Resource temporarily unavailable
99
timotimo m: multi foo(Int() $a) { say $a }; foo("oh my god") 17:29
ruoso ah, I was wondering if there was a way to do that
that's actually even better
camelia Resource temporarily unavailable
timotimo m: multi foo(Int() $a) { say $a }; foo("oh my god")
camelia Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5oh my god' (indicated by ⏏)
in sub foo at <tmp> line 1
in block <unit> at <tmp> line 1
timotimo oh, huh, that throws, eh?
ugexe can we monkey patch coercion methods into core classes and have it work? 17:30
that'd probably affect everything though 17:31
ruoso oh, indeed, that doesn't act as a subset
raschipi m: multi foo(Int(Str) $a) { say $a }; foo(23)
camelia Type check failed in binding to parameter '$a'; expected Str but got Int (23)
in sub foo at <tmp> line 1
in block <unit> at <tmp> line 1
raschipi Numeric(Str) is a signature will do that, it will only accept strings that can be turned into a number. 17:34
ruoso raschipi: but it aborts the whole thing instead of failing with X::Multi::NoMatch 17:35
SmokeMachine hi there! Does any one know if is there any HTTP2 client being implemented?
raschipi m: say "4200000000000000000000000000000000000000000000000000000000+30000000000000000000000000000000000000000000000000000i".Numeric 17:36
camelia 4.2e+57+3e+52i
raschipi That's confusing...
ruoso m: subset StrToInt of Str where +*; multi foo(Int(StrToInt) $f) { say $f }; foo("42");
camelia ===SORRY!===
Cannot invoke this object (REPR: Null; VMNull)
ruoso huh, that just worked locally here 17:37
well, that exactly thing fails, but the more elaborate case works 17:39
raschipi m: subset StrToInt of Str where {+$_}; multi foo(Int(StrToInt) $f) { say $f }; foo("42"); #This way the error is different
camelia Use of uninitialized value of type Str in numeric context
in block at <tmp> line 1
42
ruoso preparing a rakudobug 17:40
or do we do github this days?
raschipi rakudobug
github for docs, roast 17:41
ruoso #131610 17:42
synopsebot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=131610
ugexe SmokeMachine: im not aware of one
ruoso there's libCurl
ugexe SmokeMachine: something that could handle multiple streams (per the spec) would be really cool 17:43
SmokeMachine ugexe: yes, it would! :) 17:43
ruoso just yesterday we had a talk here on how awesome just using the native libcurl was 17:44
SmokeMachine curl does "accept" v2, right?! 17:45
ugexe ==>> (NYI) seems like it would be nice for writing that type of stream stuff
ruoso SmokeMachine: it has support for it, but I'm not sure if it's enabled by default on most builds
cowens can someone explain what the output from buf8.new(0x65, 0xCC, 0x81).decode("utf8-c8").ords.fmt("U+%04x") means? 17:47
[Coke] m: say buf8.new(0x65, 0xCC, 0x81).decode("utf8-c8").ords.fmt("U+%04x") 17:48
camelia U+0065 U+10fffd U+0078 U+0043 U+0043 U+10fffd U+0078 U+0038 U+0031
cowens U+0065 is obviously e, but why is \x[301] turned into U+10fffd U+0078 U+0043 U+0043 U+10fffd U+0078 U+0038 U+0031? 17:49
geekosaur docs.perl6.org/language/unicode#UT8-C8 17:51
cowens thanks, I couldn't find that through the search or Google 17:52
geekosaur it was just added yesterday
c8's been in there a while but actually getting docs for it ...
cowens I guess it hasn't been indexed yet then (I was just searching for it)
[Coke] I don't think that answers the question though. 17:53
[Coke] (I mean, it describes the U+10fffd; but not why it's showing up in this decode, neh?) 17:54
geekosaur well, it doesnt answer why it got decoded that way
[Coke] m: say buf8.new(0x65, 0xCC, 0x81).decode("utf8").ords.fmt("U+%04x")
camelia U+00e9
geekosaur yeh, best I can figure is the normalization thing... except that I expected ^ to be the normalized form 17:55
some test inverted?
samcv, ping?
samcv yeah?
geekosaur oh wait, nio
timotimo when you go through the decoder to get a str, you'll have NFG
geekosaur that is correct
65+a modifier is not normalized 17:56
so it gets converted to something that round-trips
cowens Note: that doc incorrectly has the header UT8-C8 instead of UTF8-C8
geekosaur yeh
cowens unless I am crazy
timotimo .o( unreal tournament 8 )
geekosaur sorry samcv, it's fine, I was just confused a moment about what c8 was up to
cowens, note that utf8-c8 is not general use, it's for when something *must* round-trip identically 17:57
so things that would normally get normalized (e.g. 65 CC 81 -> E9) have to be encoded to prevent normalization 17:58
this is often important when working with POSIX APIs, since they are bytestrings --- if a filename contains that sequence, you must NOT normalize it, that would represent a different file
raschipi they are that way to be locale agnostic 17:59
locale here meaning encoding
geekosaur yes
cowens I am probably reading it wrong, but it sounds like I should be able to say: buf8.new(0x65, 0xCC, 0x81).decode("utf8-c8").encode, but that is obviously wrong
geekosaur you really do not want a file to be accessible or not depending on the user's preferred encoding
cowens buf8.new(0x65, 0xCC, 0x81).decode("utf8-c8").encode("utf8-c8") works though 18:00
geekosaur right, because that is what c8 encoding is for
cowens so you have to know the string is in utf8-c8
geekosaur but you have to know that anyway because it's only intended for specific uses where you must be able to roundtrip 18:01
cowens is there a way to get that information from the Str?
geekosaur no? Str is always NFG
cowens That is all cases for me (I have unnormalized files that should not be changed to NFC due to other systems expecting the original codepoints minus whatever I explicitly change) 18:02
geekosaur ... but you can look for that 10fffd marker to see if it required utf8-c8
if the marker is not there then nothing special needed to be done and the NFG one will reproduce the original filename 18:03
cowens So U+10FFFD is only used to mean UTF8-C8
geekosaur yes
cowens and if a file contains U+10FFFD it will be wrapped as well?
geekosaur that depends on how you are handling the file 18:04
cowens assuming it gets read in as :bin
geekosaur there is no magic, anywhere, that accurately tracks and reproduces encodings. files do not have associated encodings, they are byte strings. 18:05
cowens and then decoded as "utf8-c8"
geekosaur if you read as :bin then you have a stream of bytes (ideally this would be a buf8)
cowens based on the docs, I would expect 65 CC 81 to become one glyph, that looks like ?x65 ?xCC ?81 not the e ?xCC ?81 that is actually returned 18:16
strike glyph and replace with grapheme 18:17
very tired
geekosaur but the 65 is a perfectly cromulent grapheme
cowens s/grapheme/synthetic grapheme/
moritz m: say Buf.new(0x65, 0xCC, 0X81).decode('utf-8').chars 18:19
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in argument list; couldn't find final ')'
at <tmp>:1
------> 3say Buf.new(0x65, 0xCC, 07⏏5X81).decode('utf-8').chars
expecting any of:
whitespace
cowens But for purposes of working with graphemes, but not losing the original codepoints, it is less useful
moritz m: say Buf.new(0x65, 0xCC, 0x81).decode('utf-8').chars
camelia 1
moritz it is one grapheme
cowens the grapheme is e + combining acute
moritz m: say Buf.new(0x65, 0xCC, 0x81).decode('utf-8')
camelia é
moritz looks fine here
cowens Except you just lost the the fact that it is a combining acute in the source 18:20
Which is why I am trying to use utf8-c8 in the decode
but it breaks the grapheme cluster
moritz didn't you just say that you want that?
cowens m: buf8.new(0x65, 0xCC, 0x81).decode("utf8-c8").chars 18:21
camelia ( no output )
cowens m: buf8.new(0x65, 0xCC, 0x81).decode("utf8-c8").chars.say
camelia 3
cowens Well, if we are going with what I want, I want to be able to round trip a file that isn't normalized
cowens I also want to be able to work at the grapheme level 18:22
I am trying to understand if utf8-c8 gets me that, and it looks like it doesn't
moritz that's correct
cowens It is close, but not quite what I want
moritz you could keep the original Buf around 18:23
raschipi cowens: I think we're having an XY here
tell us what you really want
geekosaur if you're having to resort to c8, you have already lost on the grapheme front 18:24
cowens File contains unnormalized (but valid) UTF-8 18:24
raschipi And why can't you normalize it? 18:25
cowens I want to be able to run Perl 6 code against that file then write it out without losing the unnormalized nature of the file (unless the Perl 6 code explicitedly changed it).
Generally, because a legacy system expects it to be the same as it was (modulo the changes explictedly made) 18:26
think passwords/usernames in config files
natural keys in databases 18:27
etc
In a perfect world, the grapheme cluster is all that matters, but not all systems compare Unicode strings correctly 18:28
geekosaur those are generally disasters waiting to happen anyway
cowens Hence the need for UTF8-C*
geekosaur I mean, for that password, all you need is one system that always normalizes typed input
cowens whoops, UTF8-C8
geekosaur and suddenly they cannot log in on that system
cowens yep, that is the messy world we live in, but unfortunately you can't always get access to fix everything 18:29
raschipi But you want to deal with it at the grapheme level, what operation you want to do at the grapheme level?
cowens Anything I would normally do with Str
but in general subst, rules, etc 18:30
cowens Buf is a pain and Uni has nothing in it 18:31
raschipi Those should be done at the byte level in a file like that
moritz I have occasionally also wished for a way to do proper regex stuff with Uni, for example
parsing a data format you don't have control over is a PITA with Str semantics
moritz like my first JSON grammar failed on quoted strings whose first character was a combining character 18:31
lizmat moritz: I still think that we could have that if we had a way to convert a buffer into a Str with all synthetics, and a way to express that in code 18:32
cowens Uni is almost the right level, and so long as it has Perl 5's \X feature it would be fine
lizmat aka, a synthetic for each byte
and something like \byte(42) to refer to the synthetic of bytes with the value 42
raschipi lizmat: Wouldn't a index([ ]) do ? 18:34
lizmat that returns an Int 18:35
or Nil
that's not a synthetic codepoint
moritz lizmat: that's an interesting idea; I'll have to ponder that for a while 18:42
[Coke] (Uni) the last time this conversation came up, Uni was pointed at as the solution-which-isn't-there-yet. 18:51
jnthn Uni is meant to fill this niche, it's just way under-implemented.
But there's a lot of language design questions around it 18:52
Not to mention a lot of implementation ones
The regex engine being the most painful of them 18:53
moritz how feasible would it be to have a second type that fits the interfaces of all nqp::.*_s ops 18:54
jnthn Somewhat, but we need to think carefully about how we do it 18:55
I think probably we'd need a type distinction, so we can specialize it away 18:56
jnthn The problem is that every binary string op becomes questionable 18:56
If it's a uni and a str, what should the result be? etc. 18:57
In some cases we can say "no, we aren't going to do that"
I think at a Perl 6 level we'd want to introduce methods like subuni
To go with substr and subbuf 18:58
[Coke] (why are they not all called the same thing that doesn't have the type in it?) 18:59
perlpilot [Coke]: you were reading my mind.
jnthn Because the units you pass mean different things.
[Coke] that seems... reasonable. :) 19:00
jnthn And the expecting semantics are different
The O(...) of the operation and the expected return type also would iffer
And there's even more fun to decide here
If I do .substr on a Uni am I expecting it to interpret the indices as grapheme clusters and give me back a Uni? 19:01
Or am I expecting it to coerce it to a Str?
moritz or am I expecting an ENOTASTR?
jnthn The first seems more useful, and means that a Uni could thus have substr and subuni dealing in different units 19:02
Anyway, you can probably see from this why we haven't got around to dealing with this yet. :)
jnthn There's so many semantic questions to figure out good and consistent answers to. 19:02
masak doing some casual Perl 6 programming in the evening, after having spent $work doing mostly JavaScript. huh, apparently we named our string-replacing method ".subst" :P
we do choose quirky names sometimes, do we not 19:03
moritz we do
nicq20 '.subst' and .substr' always throws me.
moritz frugal quantifiers!
masak nicq20: clearly, ".substr" is the "r" form of ".subst" :P 19:04
moritz: that's one of the nicer quirks, though :>
moritz: no other language community (that I know of) has a term as nice as "frugal" for that
nicq20 masak: Ah, right! I keep forgetting that. :)
masak moritz: most (I think) go with "non-greedy"
jnthn wonders if he's about to get stung by his beer, given that's clearly the r form of a bee
moritz currently goes through all monospace fonts that LeanPub has to offer, in the hopes that one of them renders 「 and 」 correctly 19:05
masak jnthn: nono, a beer is an entity that has evolved "being" into an art form
moritz: talk about optimizing for a corner case :P :P :P 19:06
moritz masak: :D
it's a pretty central case when talking about p6 regex and match objects though :( 19:07
[Coke] moritz: Source Code Pro?
moritz [Coke]: no luck :(
perlpilot I have sometimes wondered if we could rename `subst` or `substr` (or both) and make it better.
moritz [Coke]: maybe it's not the font though that's having problems
perlpilot: `substitute` and `extract` 19:08
masak or "replace" and "substring" 19:08
moritz (though `extract` maybe isn't stringy enough)
perlpilot `extract` would be fine if we /could/ combine all substr, subuni, subbuf into a single thing ;-) 19:09
masak moritz: I remember when jQuery decided to call one of their flavors "jQuery compat" and everyone read it as "jQuery compact" (even though it wasn't smaller). I wonder if people would read "extract" as "exact" half of the time.
nicq20 Wow. Just realized 'subst' is short for 'substitute'.
masak nicq20: :D
moritz masak: I like substring and replace
jnthn Another fun misread I've seen a few people make is "Rakudo Start" - 'cus, you know, it's what you use to get started. :) 19:10
masak yes, that one ended up in blog posts and stuff 19:11
moritz <rant>I hate this! I'm already using a third-party tool for generating my books so that I don't have to worry about the toolchain, and here again I'm worrying about the tool chain instead of writing a chapter</rant>
timotimo Rakudo Tárte
ruoso I think I've hit a bug in recursive multis
raschipi moritz: you'll always have to mind your tools. No way around that in any craft. 19:12
moritz raschipi: I know. But if I want to cook, I can go to the shop and buy a knife that Simply Works[tm] 19:12
raschipi moritz: Nope, you need to know how to sharpen it if you'll do it professionally. 19:13
perlpilot bides with bated breath to behold the bug 19:13
cowens Is there a better way to write the Perl 6 version of perl -pi -le 's/sftp/transfer/g' FILES than perl6 -e 'slurp($_).subst("sftp", "transfer", :g) ==> spurt($_) for @*ARGS' FILES?
moritz raschipi: in this case, my book toolchain is unsharpenable :( 19:14
raschipi I was a butcher at one point, had very goog knives and carried a sharpner everywhere. Knives do not 'just work'.
perlpilot moritz: that's a pity. you tend to hurt yourself with dull tools
ugexe a sharpner or a honing steal? 19:15
moritz perlpilot: I know, I know. But I also remember the sad old days of our "Using Perl 6" book attempt, where building the book was a mystery escape room experience 19:15
perlpilot cowens: you know perl6 also has -p and -n command line options.
andrei_ sorry to interrupt a very interesting discussion, zef install Task::Star does not work anymore ? says "No candidates found matching identity: Task::Star" 19:16
moritz andrei_: yes, Task::Star is goen
*gone
cowens The problem is the -i which is missing
raschipi Well, I called it a 'chaira' but yes, I learned the name in English today. 19:16
cowens At least in the version I last looked at
perlpilot cowens: ah, indeed. That would be a nice one to have again 19:17
cowens I stole that code from Rosetta Code, but I don't know enough to know if there is a better way 19:18
moritz looks fine to me 19:22
andrei_ with Task::Star it was very easy to get started with Perl6, because it installed useful things. What should I do now? 19:25
moritz install the useful things when you need them 19:25
or install Rakudo Star
or install Task::Popular 19:26
or Task::Galaxy
andrei_ How to install p6doc?
moritz zef install p6doc 19:28
nicq20 Seems Like Task::Popular would be best. toast.perl6.party/
andrei_ Ah, this is very nice. Thank you! 19:36
raschipi How many JSON decoders are in Task::Popular, again? I think it was 7 of them. 19:39
andrei_ Sorry, small problem. After I zef install p6doc it seems that p6doc is not on PATH. To where is it installed? 19:39
nicq20 raschipi: Yep. Looks like about 7. 19:41
andrei_ It is not in ~/.rakudobrew/bin/ ...
nicq20 andrei_: How did you install it?
andrei_ git clone github.com/tadzik/rakudobrew ~/.rakudobrew 19:41
rakudobrew build moar
rakudobrew build zef 19:42
zef install Task::Star
(but Task::Star did not install)
so I did: zef install p6doc 19:43
ugexe `rakudobrew rehash`
andrei_ Ah, YES! I knew, just forgot! Now it works, thank you! 19:44
nicq20 Oops. Looks like Rakudo does not have a recursion limit. ._. 19:45
raschipi nicq20: Of course it doesn't. 19:46
nicq20 Yeah, I wanted to check if it had the same limit/warning that Perl5 had. It doesn't. 19:47
raschipi The limit is the amount of memory available. 19:48
ruoso moritz: second version of that gist, now using types instead of strings... gist.github.com/anonymous/80f67985...e2f9623779 19:55
I also removed the loop in favor of simple recursion
ruoso I also realized that the method could just be expressed as a subset... it doesn't need to be a separate argument 20:00
ufobat timotimo, gist.github.com/ufobat/902d8f7065b...4c225a6a70 20:03
perl6 bin/p6profiler-graphviz ../Bailador/03.sqlite3 doesnt seem to work
timotimo dogbert17: oh yes i only changed the tui one to fit the new names 20:20
sorry, we're just preparing dinner now
you'll find the necessary changes in the git commit history for the project 20:21
maybe you could go ahead and apply the same thing to the graphviz one?
crap, a drop of tomato juice landed on th eedge of my trackpad and now it's misbehaving 20:24
better turn of the machine
rheum101 how can I switch from audio to text output rakudo brew?? 20:45
cschwenz per docs.perl6.org/type/Num : «A Num object stores a floating-point number. It is immutable. On most platforms, it's an IEEE 754 64-bit floating point numbers, aka "double precision".» 21:07
and now for my question, is it possible to detect from within perl6 what size floating-point number Num is using? and if so, how?
ruoso github.com/ruoso/perl6-web-multi-dispatch <- organized the experiment a bit further... I'm actually fairly happy with how this looks 21:14
Geth doc: 1bbf3a880f | (Jan-Olof Hendig)++ | doc/Language/unicode.pod6
Fix typo
21:50
travis-ci Doc build errored. Jan-Olof Hendig 'Fix typo' 22:41
travis-ci.org/perl6/doc/builds/245131564 github.com/perl6/doc/compare/03b51...bf3a880f5e
ruoso for a candidate to a multi that was exported, I can find which package provided it, is it possible to tell which candidates can be resolved from the declaration site on the other package? 23:34
huh, it turns out that the obvious one of &m.candidates[0].candidates works 23:36
I was trying a bunch of other things, but didn't occur to me to ask that
timotimo i fixed my trackpad but somehow managed to get rid of 8 out of my 12 gigs of ram 23:39