»ö« 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:13 bjz joined 00:27 udev joined 00:28 bjz left 00:29 udev left, Cabanossi left
u-ou sips coffee 00:30
00:32 Cabanossi joined 00:52 pytuger joined
pytuger #C 00:52
mb
timotimo hi pytuger
pytuger hello timotimo
EVAL('say("Do you enjoy perl6? timotimo? I am still getting used to it. \n")') 00:54
timotimo yeah, i really like it
if you want to have some code run in the channel, you can put "p6:" in front 00:55
pytuger Thank you for the info timotimo. : ) 00:56
00:56 chenryn joined 00:59 chenryn left
timotimo i'm about to head to bed, but if you have questions, feel free to ask and wait for others to wake up 01:07
u-ou 'i really like perl 6'.say 01:08
samcv :D
u-ou :>
timotimo i wonder if anybody would enjoy trying out pyglet via Inline::Python ... 01:10
i'm positively surprised to see that project still being developed 01:11
samcv what does it do 01:13
timotimo it's like allegro or sdl, with a slight focus on opengl 01:14
anyway, sleep timp 01:16
time*
01:19 ChoHag left
Geth doc: 53f2b999b5 | (Zoffix Znet)++ | 4 files
[io grant] Document `role IO`'s new purpose
01:25
01:27 quotable6 left, quotable6 joined, ChanServ sets mode: +v quotable6 01:28 quotable6 left, quotable6 joined, ChanServ sets mode: +v quotable6, Cabanossi left 01:30 quotable6 left, quotable6 joined, ChanServ sets mode: +v quotable6 01:31 Cabanossi joined 01:41 shadowpaste0 left 01:42 shadowpaste0 joined 01:45 ilbot3 left 01:48 ilbot3 joined, ChanServ sets mode: +v ilbot3
u-ou what's a good way to get a list in random order? 01:54
MasterDuke_ .pick(*) 01:56
m: say (^5).pick(*)
camelia (4 3 2 0 1)
MasterDuke_ m: say (^5).pick(*)
camelia (4 0 2 3 1)
AlexDaniel m: say WHAT (^5).pick(*)
camelia (Seq)
MasterDuke_ m: say WHAT (^5).pick(*).list 01:57
camelia (List)
MasterDuke_ m: say (^5).pick(*).list
camelia (3 4 1 0 2)
u-ou thanks :D
AlexDaniel
.oO( defined thanks )
01:59
02:07 jraglin joined 02:09 labster joined 02:19 noganex joined 02:22 noganex_ left 02:38 BenGoldberg left
u-ou omg perl 6 02:40
02:40 BenGoldberg joined 02:44 Cabanossi left 02:46 Cabanossi joined 02:47 BenGoldberg left 02:50 BenGoldberg joined
u-ou (Though each time you write a custom constructor, remember that it makes subclassing harder). 03:17
03:17 yusrideb left
u-ou why is that? 03:17
03:23 skids joined
mst I would suspect because now you can't just add keyword params like normal and expect them to just work? 03:31
u-ou fair enough 03:32
I just thought it might have been something deeper than that, why I asked
03:34 jercos_ is now known as jercos
mst IMO if you can't do whatever you need to with BUILD or TWEAK, you need to rethink your life choices in terms of the API you picked for new() 03:35
03:50 Cabanossi left 03:52 Cabanossi joined 03:53 angelds joined 04:10 AlexDaniel left 04:12 wamba joined
TimToady indeed, one of the patches in the uncurse branch was to turn Match's 'method new' into a 'submethod BUILD' because the former made it very hard to subclass grammars, which you really wanna be able to do 04:29
speaking of which, probably about time to remerge and test again to make sure I'm not diverging from Zoffix++'s work... 04:31
04:35 Cabanossi left, BenGoldberg left 04:37 Cabanossi joined 04:44 angelds left 04:47 CIAvash joined 04:53 pytuger left 04:57 labster left 04:58 bjz joined 05:02 labster joined 05:05 Cabanossi left 05:07 Cabanossi joined 05:11 geekosaur left, geekosaur joined, kyan joined 05:15 larks joined
u-ou how do you get a child class to inherit attributes? 05:17
TimToady you can only inherit accessors 05:18
u-ou ok
TimToady but maybe you want to use a role in that case
which is more like generic code that can instantiate attributes in a class
u-ou alrighty
TimToady but when you say "does MyRole" in a class, that is specifically not inheritance in the classical sense 05:19
more like an include, only it's not textual, more like a hygienic macro 05:20
but roles are great if what you really want is code reuse, not parent/child management
dmaestro Just opened: github.com/perl6/nqp/issues/353 05:21
05:25 xiaomiao left, xiaomiao joined
larks is there a nicer way of doing "my $promise2 = $promise1.then(-> $in {squared($in.result)});"? 05:26
moritz larks: maybe $promise2 = $promise1.then(&squared o *.result); 05:31
mst $promise1.then({ squared($^p.result) }) ? 05:32
moritz $promise1.then({ squared .result }) 05:34
mst ooo 05:35
05:36 Cabanossi left
mst moritz: is that because .then sets $_ to the promise or because a blocksub with no implicit args has that happen? 05:36
u-ou so anonymous subroutines always make $_ their first parameter when they come across it?
or what mst said
moritz mst: any block without another signature gets $_ as an implicit argument 05:37
05:37 leah2 left
moritz it's not specific to the "then" method 05:37
mst moritz: but presumably my $^p would stop the $_ filling happening?
05:37 Cabanossi joined
moritz mst: right, because the $^p auto-generates a signature 05:38
u-ou ahh
so ($_) is like the default signature 05:40
moritz ($_ is rw) iirc 05:41
TimToady m: say { .foo }.signature
camelia (;; $_? is raw)
u-ou cool :)
05:53 leah2 joined
Geth doc: ed7403c9b6 | (Gabor Szabo)++ | doc/Language/terms.pod6
link from 'time' to 'now' to make it easier to find
05:56
05:57 szabgab joined
szabgab I wonder if such cross-links ( github.com/perl6/doc/commit/ed7403...b4accf5218 ) are welcome or if I should stop doing them? 05:58
yoleaux 9 Apr 2017 18:02Z <samcv> szabgab: yes if you put nom in .travis.yml it does devel build of rakudo. Worked for me here travis-ci.org/samcv/URL-Find
samcv hi yoleaux 05:59
hi szabgab
szabgab hi samcv
mst szabgab: having read through the docs end to end and still had trouble finding things, I would hope they are welcome because I think we need lots more of them
I have exactly zero actual say in the matter though
05:59 skids left
samcv very yes szabgab 06:00
we need more crosslinks
szabgab smash: thanks. Then instead of filing issues I'll just put in the links. Do you know how frequently is docs.perl6.org regenerated? 06:02
samcv like 30 mins? 06:03
szabgab wow, it seems Travis testing failed on the docs repo after my commit. I have no clue why travis-ci.org/perl6/doc/jobs/222498917 06:11
06:12 darutoko joined
szabgab hmm, I might have an idea why 06:13
06:17 dct joined
Geth doc: 160c6a2cc2 | (Zoffix Znet)++ | doc/Type/IO/Handle.pod6
[io grant] Document IO::Handle.lock/.unlock

Rakudo impl: github.com/rakudo/rakudo/commit/214198bfb2 Tests: github.com/perl6/roast/commit/4194755c19
06:18
06:21 nadim joined
szabgab it seems Pod::To::HTML is actually th one failing its tests and it is used in doc 06:22
Geth doc: 757a0f7132 | (Gabor Szabo)++ | doc/Language/terms.pod6
link to correct anchor
06:23
doc: dbc8594a53 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/terms.pod6
Fix incorrect link
06:26
06:29 geekosaur left 06:31 geekosaur joined
Geth doc: c324f7ec49 | (Gabor Szabo)++ | doc/Language/modules.pod6
Make it easier to find information about Selective Importing #1270
06:33
doc: e4cc659d9a | (Gabor Szabo)++ | doc/Language/5to6-perlfunc.pod6
link to EVAL #1260
06:36
06:49 dct left
larks thanks moritz and mst =] 06:50
eater hey, is there actually a recommend IDE/Editor for perl6? 06:52
inb4 /use vim/
larks I use nvi >_>; 06:53
06:54 Zoffix joined
moritz others like atom 06:54
Geth doc: d84193a3fb | (Gabor Szabo)++ | doc/Language/5to6-perlfunc.pod6
link to exceptions #1260
06:55
Zoffix huggable: atom ide
huggable Zoffix, github.com/perl6/Atom-as-a-Perl6-IDE
Zoffix eater: Atom is great. ^ that repo lists some useful plugins.
u-ou I've never tried atom or even emacs. too happy with vim :P 06:56
Zoffix szabgab: the breakage was due to recent Rakudo commits. Just pushed a fix
eater its really weird to actually see people recommend atm :')
s/atm/atom
hope it's improved since 3 years ago
moritz I'm sure it has
Zoffix Sublime Text is the kind of editors, but it ain't got good Perl 6 highlighting, so I use atom :/
06:57 Zoffix left
moritz I mean, it has had lots of contributions in the last three years 06:57
eater yeah when I used it 3 years ago, it was pretty cool, but once you added some plugins it became really unresponsive 06:58
personally use PhpStorm or vim for everything but PhpStorm doesn't really have good perl6 plugins and vim doesn't have autocompletion
moritz ctrl+n 06:59
eater yeah, but not based on defined variables and stuff, like PhpStorm has 07:00
07:01 aindilis joined, nbrown joined 07:07 nbrown left 07:10 szabgab left
Geth doc: d1e2d734c3 | (Gabor Szabo)++ | doc/Language/5to6-perlvar.pod6
bunch of Perl 5 cross links
07:17
samcv eater, atom has gottan a lot faster in the last year or so
eater yeah it feels really responsive rn
samcv and see github.com/perl6/Atom-as-a-Perl6-IDE for good plugins to install 07:18
perl 6 highlighting etc 07:19
eater people linked it to me yeah, thanks samcv
07:21 jraglin left
Geth doc: 40665df5e2 | (Gabor Szabo)++ | doc/Type/IO.pod6
more information on closing filehandles #1258
07:28
07:35 Cabanossi left 07:37 Cabanossi joined
Geth doc: 4ca7f68760 | (Gabor Szabo)++ | doc/Language/py-nutshell.pod6
add some Python-related indexes
07:41
u-ou bah, got circular module difficulties
these can be tricky 07:43
is there some easy way around them in perl 6?
I mean, is there a way you can actually have them? 07:45
moritz inside a compunit, yes
by predeclaring one of them 07:46
u-ou what's a compunit?
moritz m: class B { ... }; class A { has B $.x }; class B is A { }
camelia ( no output )
moritz u-ou: a part of a program that's compiled in one go. For example a file.
u-ou where can I read more? 07:47
moritz dunno, maybe docs.perl6.org/language/modules.html ? 07:48
u-ou so you can have multiple files in one compunit? 07:49
moritz nope 07:51
08:09 ChoHag joined 08:11 kyan left 08:44 espadrine joined 08:46 mr-foobar joined 08:56 jraglin joined
u-ou tired 08:56
08:56 pytuger joined 09:01 parv joined 09:05 labster left 09:33 rindolf joined 09:35 Cabanossi left 09:37 Cabanossi joined 09:39 pytuger left 09:40 bjz_ joined 09:42 bjz left 09:43 leah2 left 10:02 leah2 joined 10:28 CIAvash left
samcv behold! moarvm.github.io/coverage/ 10:42
automated coverage reports by travis ci generated on every moarvm push (nqp test suite is what it is based on) 10:43
woo
yay robots
timotimo i kind of wish it would put the moar binary results below the libmoar results instead of having two frames :( 10:44
samcv yeah 10:45
that could be nice. i am bad at web dev
timotimo i can try to whip up a sed file that does it
we don't have a perl6 at that point ;(
samcv that does what?
oh
below on the html page
timotimo yeah
in the same .html
at the moment i have to scroll both frames sideways and vertically 10:46
samcv yeah
it's bad
timotimo and my mouse doesn't have a horizontal scrollba
10:46 leah2 left
timotimo scrollwheel or even clicks on the scrollwheel or whatever 10:46
samcv though changing what it says might be nice. where it says Coverage Report 10:47
to say the branch. and moarvm version
nqp etc
since my coverage script generates some text that can be put there 10:48
but no way to insert it atm
timotimo sure, we can sed all of that :P
i'm not really good at sed, but this should be doable
i'll just wget -r this stuff or something
samcv github.com/MoarVM/coverage 10:49
there is a repo for it :X 10:50
this branch github.com/MoarVM/coverage/tree/gh-pages
timotimo that could work %)
you could make gh-pages the default branch on github for that repo
i have a sed line to put "libmoar" and "commit id 123456" in the right spot 10:54
now to split-and-merge the two files
i'll also have to fix every link in the html file 10:56
samcv ah yeah 10:57
timotimo that'll be doable.
samcv why fix links
they work
or are they broken
i thought they workd
timotimo they are not broken 10:58
but they will break if i combine both index.html files into one index.html one level further up
samcv ok i changed default and deleted master
oh 10:59
uh
yes
i understand now
timotimo i think i'll give you a .sh that'll take one argument which is the abbreviated commit hash (with git describe --tags it'll be nicer so we should do that) and puts both html files into one 11:00
samcv uh why commit hash
why would you do that.
don't we want to edit the files before we push them?
grondilu m: say 0i
camelia 0+0i
grondilu m: use MONKEY; augment class Complex { multi method gist(Complex $z where $z.im == 0:) { self.re.gist } }; say 0i; 11:01
camelia 0
timotimo uh, huh?
i thought we want the commit hash to be in the title?
samcv oh
yes we do
ok i understand
very good. continue
11:02 leah2 joined
timotimo okay so 11:10
i've got ' quotations here
how do i substitute $0 into that?
no, must be $1 actually 11:11
oh no, you've already left :<
samcv don't use sed maybe use perl?
timotimo i don't do perl 11:12
tadzik what year is this
timotimo how do i do, like, $1=$($1 || "unknown") ? 11:13
it won't do $1= and it won't do 1=
tadzik maybe awk will %) 11:15
timotimo i think i figured out what i need
HASH=${1:-unknown}
split_and_merge.sh: line 3: ${$1-unknown}: bad substitution 11:16
>:(
tadzik :D
timotimo oh, right
one $ too many
yup, this works!
11:16 parv left 11:17 awwaiid left 11:35 Cabanossi left 11:37 Cabanossi joined 11:38 jraglin left 11:52 nadim left, nadim joined 11:57 nadim left 12:00 leah2 left 12:12 AlexDaniel joined 12:16 leah2 joined 12:50 Cabanossi left
timotimo moritz: are you interested in how to make irclog.perlgeek.de's index page faster to load? 12:52
12:52 Cabanossi joined
timotimo moritz: using "montage -geometry +0+0 -tile 1x" on all the activity graph .png files gives you a very tall image that you can sub-select images from in css, and then you can optipng the big png file to compress it down a whole lot 12:53
moritz timotimo: depends on the amount of work that it means for me :-)
timotimo without optipng the montaged png file is only half as big as concatenating all .png files into one 12:54
and with optipng -o7 (not very heavy on the cpu) it's between a third and a quarter big
and then you save a whole bunch of http requests
moritz timotimo: hm, then I'd need to have a concept for channels that miss an image
timotimo have a blank.png that you copy to have the given filename 12:55
irclog.perlgeek.de/perl6-noise-gan/ - why does this exist :D 12:56
moritz maybe a typo when I configured teh bot?
timotimo potentially
i'm looking into this right now because of our moarvm coverage reports 12:57
i suggested putting a little tick line just like yours into the file-overview-tables
and i was wondering how big the individual graphs will be, and whether it'd be good to turn them into a data url
aha, util/cron-graphs.pl 12:59
timotimo snoops around a little
moritz might be better to write the data into a json file, and then use some javascript magic to render it 13:00
timotimo that's also a possibility 13:01
then you're benefiting from people only rarely visiting the front page
moritz is the front page slow for you? 13:03
'cause I just opened it in a browser where I hadn't loaded it before, and it was pretty fast 13:04
timotimo nah, it's actually very fast
just 1.6s to finish 13:05
moritz developers.google.com/speed/pagesp...geek.de%2F says 89/100
timotimo it could feel faster if the pngs had a height attribute so it wouldn't make the columns jump when they individually load 13:06
moritz and maybe I could activate HTTP/2 13:07
13:07 dct joined
timotimo oh 13:08
in the cron script you could run gnuplot only once instead of once for each channel
oh, interesting 13:09
huh. never mind, misread something 13:10
ooooh! 13:11
moritz! moritz moritz moritz!
moritz timo!
moritz hopes timotimo didn't find a severe security bug
timotimo you can "plot '-' options" and then it'll read data from stdin until it reaches a line with only a single "e" in it
and you can also plot "<echo '1 2'" ... 13:12
no way. there's a special filename "+", too? 13:13
moritz and current I use temp files, right? 13:14
timotimo yup
plot "< awk '{print $1-1965, $2}' population.dat", pop(x) 13:15
gaaah :D
moritz doesn't look like code from me :-) 13:18
timotimo it's neat to have that, but nesting quoting inside quoting is never fun 13:19
grondilu reads the lines above and agrees it'd be smarter to use javascript to draw functions 13:21
timotimo well volunteered! ;)
grondilu I'm not familiar with this page. And the link at the bottom "powered by" fails 13:25
moritz github.com/moritz/ilbot here's the source code
moritz should set up a different "powered by" page
timotimo moritz: what's the "" at the top of the irc logs indices for? 13:26
moritz timotimo: not intentional 13:27
timotimo OK
grondilu a quick search shows me tons of ways to draw graphs in js. www.jsgraphs.com/ And even without a library, with 2D canvas, should not be too hard.
moritz I don't think anybody says it's super hard. It just needs doing. 13:28
timotimo "needs" :) 13:32
13:32 itaipu joined 13:33 MasterDuke_ left 13:36 Cabanossi left 13:38 Cabanossi joined, leah2 left 13:43 ajr_ joined 13:44 itaipu left 13:45 itaipu joined
ajr_ I have just installed rakudo* on a Raspberry Pi. There were a few test failures, but it was mostly successful. Would any of the details of this be of interest, or is it already a mundane feat? 13:46
timotimo dunno, you can gist it up and if someone in the future cares they can find it in the irclog 13:49
is that a raspberry pi 1?
13:50 itaipu left 13:51 itaipu joined 13:57 dct left 14:06 Exchizz joined
ajr_ timotimo - no, it is a 3B. I doubt if anything lower-spec would be feasible. (As it was, I had to play with swap space to get enough memory.) 14:06
Exchizz Hi guys :> Is it correctly understood that getservbyport() is not implemented in perl6 ? Thanks in advance :>
It's listed here: docs.perl6.org/perl6.xhtml but I can't call it :/ 14:07
timotimo yeah, that's the 5-to-6 document 14:09
where it's supposed to list what the perl6 equivalent is
you can nativecall into that function, o ruse Inline::Perl5 14:10
perl6.xhtml is weird as F 14:12
Exchizz ahhh I didn't notice that the perl6 version is missing, thanks :> I've experience with Inline::perl5, but how do I make a nativecall into that function ? :> 14:14
14:15 leah2 joined
ajr_ Is there a convenient place to search, to see if particular test failures have already been reported/resolved? 14:16
Exchizz Found it timotimo, thanks yo :)
14:17 LeCamarade left 14:19 LeCamarade joined 14:37 Zoffix joined
Zoffix ajr_: which tests are you talking about? 14:38
Rakudo star's test suite? 14:40
moritz speaking of Rakudo Star; what are the plans for future releases? 14:41
Zoffix ajr_: if it's a failure for a module, report it for that module; if it's a failure of rakudo's tests, report them by emailing to [email@hidden.address] There aren't any know failures in that area
moritz the background is that I will have to hand in my manuscript for "Perl 6 by Example" around June 1st, and I'd like to be able to recommend a relatively recent R* release 14:43
Zoffix moritz: per December plans, there will be a R* release this month. 14:44
moritz: also, there's been a blog post and some comments on the Future of R*: github.com/rakudo/star/issues/83
14:46 espadrine left
gfldex moritz: there is at least one blocker in Task::Star 14:46
Zoffix Blog post: blogs.perl.org/users/steve_mynott/2...uture.html 14:47
14:51 mxco86 left 14:54 mxco86 joined 14:58 mxco86 left 14:59 mxco86 joined 15:00 mxco86 left
Zoffix moritz: also, unsure if you saw my description of Perl6.VIP, but it's now public perl6.vip/ even if the deliverable itself isn't :) 15:01
15:02 mxco86 joined
moritz Zoffix: I saw it just now 15:04
it's pretty much exactly what I want (and also what I'd recommend to use in the book if it was available early enough) 15:05
gfldex: what's the blocker? 15:06
Zoffix OK. Then I'll give it priority once the grant is done. Perhaps, it'll be ready soon enough to be included in the book. 15:07
15:10 awwaiid joined 15:11 MilkmanDan left
ajr_ Zoffix: I've just submitted the rakudobug. Please let me know of any deficiencies in the report. 15:15
15:15 mxco86 left 15:16 itaipu left 15:17 itaipu joined 15:21 espadrine joined
Zoffix Thanks. Don't see it yet, but there's usually a delay, so I'm sure we'll see it soon. The tickets end up on perl6 queue in rt.perl.org/ (or top of the list on perl6.fail ) 15:22
15:22 Zoffix left, TimToady left 15:30 kurahaupo joined 15:37 skids joined
gfldex moritz: github.com/jnthn/grammar-debugger/issues/34 15:59
16:00 jraglin joined, MilkmanDan joined 16:06 Exchizz left
moritz gfldex: thanks 16:06
16:36 culb left
RabidGravy does anyone see a reason not to add a dependency (of NativeHelpers::CStruct ) to Net::ZMQ to make polling actually useful? 16:50
gfldex ugexe: I actually want to run zef on every travis build because zef must be happy with the module before it can go into the ecosystem. Just building zef itself is (most of the time) not well spend time. 16:52
ugexe gfldex: the example i showed shows how to use travis testing without *installing* zef 16:53
e.g. it shows how to run zef to test/install some piece of work without actually installing zef
you'll still have to eat the initial precomp of zef, but you should shave some more seconds off none-the-less 16:54
17:03 TimToady joined
ugexe github.com/ugexe/P6TCI/blob/master/.travis.yml # another example demonstrated slightly different 17:17
17:28 itaipu left 17:32 dct joined 17:34 itaipu joined, Stamm joined 17:36 Cabanossi left
Stamm hello all 17:36
i have a question about hashes 17:37
in the doc, iy is explained how to *initialize* a hash with non-string keys
but how do i *add* an entry with a non-string key?
17:37 Cabanossi joined 17:43 Xliff joined
Xliff \o 17:43
m: "This should hAve PrOper TitLeCase".tc.say
camelia This should hAve PrOper TitLeCase
Xliff :(
m: "This should hAve PrOper TitLeCase".lc.tc.say 17:44
camelia This should have proper titlecase
Xliff What would be the best way to .tc every word in a string?
$str.words.tc.join(' ')/ 17:45
Except .words would choke on .tc
17:46 Stamm left
Xliff m: "This should hAve PrOper TitLeCase".words.tc.say 17:46
camelia This should hAve PrOper TitLeCase
Xliff m: "This should hAve PrOper TitLeCase".words.map({ .tc }).join(' ').say
camelia This Should HAve PrOper TitLeCase
Xliff m: "This should hAve PrOper TitLeCase".words.map({ .lc.tc }).join(' ').say 17:47
camelia This Should Have Proper Titlecase
Xliff \o/
jnthn m: "This should hAve PrOper TitLeCase".wordcase.say 18:03
camelia This Should Have Proper Titlecase
Xliff jnthn++ 18:04
timotimo huh 18:06
that face when you wonder "huh, how the hell can a method call give me a compile-time error for wrong arguments?"
and then you realize that the program has not only compiled, but also run to almost-completion in that timespan
Xliff Heh. 18:07
I wish I had that problem. :P
18:08 ajr_ left 18:11 gdonald left, gdonald joined 18:16 ChoHag left 18:26 dct left
timotimo dinner time, yay 18:30
18:38 itaipu left 18:46 labster joined 19:02 xinming_ joined 19:03 Zoffix joined
Zoffix Just added IO::Path.child-secure. More eyes to find insecurities in it welcome. It should be impossible to end up with a path that's not a child of the invocant: github.com/rakudo/rakudo/commit/1887114dd8 19:04
19:05 xinming left 19:07 darutoko left
timotimo can you fool it with combining characters on top of / or something? 19:08
Zoffix m: use nqp; dd nqp::iseq_s("/", nqp::substr("/\x[308]", 0, 1)) 19:10
camelia 0
Zoffix doesn't look like it
timotimo so ... 19:12
"../\x[308]" will properly be recognized as being ../ and then some garbage? 19:13
Zoffix Oh
Let's see
timotimo++ 19:15
timotimo you see, i've been working on a json parser recently
Zoffix :)
OK. Plan B: split on $!SPEC.dir-seps, join on nuls, and then compare stuff
moritz has also had to solve the problem withere " + combining character wouldn't parse as a quoted string
*where 19:16
19:16 zapwai joined 19:21 Cabanossi left
timotimo we ought to be careful about things that can turn into /, too, when encoding stuff 19:21
like, can we get utf8-c8 to cause a / to appear out of thin air? 19:22
19:22 Cabanossi joined 19:23 avalenn left
Zoffix hm, thinking more of it, looks like the bug's in resolve, really 19:25
m: dd "/tmp/../\x[308]".resolve: :completely
camelia No such method 'resolve' for invocant of type 'Str'
in block <unit> at <tmp> line 1
Zoffix m: dd "/tmp/../\x[308]".IO.resolve: :completely
camelia "/tmp/../̈".IO(:SPEC(IO::Spec::Unix))
timotimo really, we'd want to be able to work at byte level here 19:26
but that's annoying AF.
Zoffix m: use nqp; dd nqp::split($*SPEC.dir-sep, "/tmp/../\x[308]".IO.absolute) 19:30
camelia ("", "tmp", "../̈")
timotimo you'll have to be smarter than that 19:31
Zoffix m: use nqp; my $sep = $*SPEC.dir-sep; dd split m/$sep/, "/tmp/../\x[308]".IO.absolute
camelia Use of uninitialized value of type Any in string context.
Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.
in block <unit> at <tmp> line 1
Use of Nil in string context
in block <unit> at <tmp> line 1…
Zoffix What uninitilized value?
timotimo you can go through with nqp::ordat and see if there's any / that aren't actually eq "/"
Zoffix m: use nqp; my $sep = $*SPEC.dir-sep; dd split /:ignoremark $sep/, "/tmp/../\x[308]".IO.absolute 19:33
camelia ("", "tmp", "..", "").Seq
Zoffix timotimo: and then do what? 19:34
I mean what does it suppose to mean? updir path and filename named "\x[308]"? 19:35
19:37 Rawriful joined
Zoffix m: use nqp; my $p := "../̈foo".encode: 'Latin-1'; 19:38
camelia Error encoding Latin-1 string: could not encode codepoint 776
in block <unit> at <tmp> line 1
Zoffix I thought anything could be encoded into Latin-1
timotimo no 19:39
you can decode any byte garbage as latin1
because every value between 0 and 255 is valid at every position
Zoffix Ah. I see
timotimo however, you can only ever get codpeoints between 0 and 255, so when you have something higher than that, you can't turn it into latin1
anyway, you could use that ordat trick to split the path, and you can do an initial pass to see if there are any treacherous slashes in there at all 19:40
Zoffix doesn't get how to use the ordat trick 19:41
and my terminal's totally messed up due to the combiner :(
19:42 Zoffix_ joined, mxco86 joined
Zoffix_ m: use nqp; dd nqp::ordat("../̈", 3) 19:42
camelia -1
Zoffix_ m: use nqp; dd nqp::ordat("../̈", 2)
camelia 47
Zoffix_ m: use nqp; dd nqp::ordat("/̈", 0)
camelia 47
Zoffix_ m: use nqp; dd nqp::ordat("/̈", 1)
camelia -1
Zoffix_ wut
timotimo ordat gives you the ord of the base character 19:43
because ord doesn't make any sense for synthetics
Zoffix_ No idea how to use that tho. What ordat trick? 19:45
Zoffix_ is hacking up a thing with bufs now
timotimo the one where you get 47 for the strange / 19:46
m: say chr(47)
camelia /
Zoffix_ Yeah, but I want to split on '/' while leaving the combiners in the string
timotimo when you find a / via ordat == 47, you eqat with "/" and if they disagree you've got an asshole trying to pwn you
github.com/timo/json_fast/blob/mas...ast.pm#L84 19:47
this gives you only the combiner
samcv Zoffix_, you can link to moarvm.github.io/coverage/ for moarvm coverage now \o/ 19:56
19:58 sjn left
Zoffix_ m: use nqp; my $p := Buf.new: "../̈foo".encode('utf8-c8'); my $sep := $*SPEC.dir-sep.ord; my int $els = nqp::elems($p); my int $i = -1; nqp::while( nqp::isne_i($els, $i = nqp::add_i($i, 1)), nqp::if( nqp::iseq_i($p.AT-POS($i), $sep), $p.AT-POS($i) = 0)); dd nqp::split("\0", $p.decode('utf8-c8')); 19:59
camelia ("..", "\x[308]foo")
Zoffix_ Well, this works...
Zoffix_ braces for perf impact
samcv, done 20:02
lizmat Zoffix_: at this point we should probably settle for correct :-) 20:03
Zoffix_ 132x slower than just nqp::split($SPEC.dir-sep, $path) >_< 20:04
Zoffix_ makes a coffee and thinks harder
samcv that is always what I do :) 20:05
make more tea and think harder
then hit my head with the empty mug if that still does not work
timotimo drink tea harder
AlexDaniel sleeping harder helps too 20:10
20:14 committable6 left, committable6 joined, ChanServ sets mode: +v committable6
Zoffix_ 34x slower... it's improving! :) 20:16
timotimo but now it's safe? 20:17
Zoffix_ The bug's not in .child-secure, but in .resolve, so it's... more-correcter? but also makes .child-secure secure 20:18
Also, the slowage is just for the splitting part, not entire routine
my $p := nqp::encode($path, 'utf8-c8', nqp::list_i); dd nqp::atpos($p, 1); 20:20
m: my $p := nqp::encode($path, 'utf8-c8', nqp::list_i); dd nqp::atpos($p, 1);
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$path' is not declared
at <tmp>:1
------> 3my $p := nqp::encode(7⏏5$path, 'utf8-c8', nqp::list_i); dd nqp::
Zoffix_ m: my $p := nqp::encode('x', 'utf8-c8', nqp::list_i); dd nqp::atpos($p, 1);
camelia 5===SORRY!5=== Error while compiling <tmp>
Could not find nqp::list_i, did you forget 'use nqp;' ?
at <tmp>:1
------> 3 nqp::encode('x', 'utf8-c8', nqp::list_i7⏏5); dd nqp::atpos($p, 1);
expecting any of:
argument list
Zoffix_ ffs
m: use nqp; my $p := nqp::encode('x', 'utf8-c8', nqp::list_i); dd nqp::atpos($p, 1);
camelia MVMArray: atpos expected int register
in block <unit> at <tmp> line 1
Zoffix_ Is there a way to use nqp::atpos(...) with the result from nqp::encode?
moritz m: use nqp; my $p := nqp::encode('x', 'utf8-c8', nqp::list_i); dd nqp::atpos_i($p, 0) 20:21
camelia 0
Zoffix_ Ahh
Thanks :) Didn't realize there were typed ones
20:21 Cabanossi left
moritz but why 0? 20:21
20:22 gdonald left, gdonald joined 20:23 Cabanossi joined, gdonald left
Zoffix_ oh :( 20:23
20:23 gdonald joined
moritz m: use nqp; my $p := nqp::encode('x', 'utf8-c8', nqp::list_i); say $p 20:23
camelia Cannot find method 'gist': no method cache and no .^find_method
in block <unit> at <tmp> line 1
moritz m: use nqp; my $p := nqp::encode('x', 'utf8-c8', nqp::list_i); say $p.^name
camelia BOOTIntArray
20:31 wamba left
Zoffix_ m: my $p := nqp::encode($path, 'utf8-c8', buf8.new); dd nqp::atpos_i($p, 0); 20:32
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$path' is not declared
at <tmp>:1
------> 3my $p := nqp::encode(7⏏5$path, 'utf8-c8', buf8.new); dd nqp::atp
Zoffix_ m: my $p := nqp::encode('x', 'utf8-c8', buf8.new); dd nqp::atpos_i($p, 0);
camelia 5===SORRY!5=== Error while compiling <tmp>
Could not find nqp::encode, did you forget 'use nqp;' ?
at <tmp>:1
------> 3:= nqp::encode('x', 'utf8-c8', buf8.new)7⏏5; dd nqp::atpos_i($p, 0);
Zoffix_ well, that works
23x. Good 'nuf 20:37
20:51 mouldysammich left
Begi Hey, #perl6 ! I've got a question about the perl6.org code 21:00
How, and how often is the fetch-recent-blog-posts.pl script launched ?
Zoffix_ Begi, every 15 minutes 21:02
*/15 * * * * bash ~/perl6.org/update.sh > update.log 2>&1
timotimo um 21:03
that doesn't run the fetch-recent-blog-ponts.pl scripts though?
Zoffix_ Does: github.com/perl6/perl6.org/blob/ma...ate.sh#L11
timotimo oops
i looked at the update.sh above that
i.e. i looked at /home/perl6.org/update.sh but you talked about /home/perl6.org/perl6.org/update.sh 21:04
Zoffix_ That's probably an old copy, from before me moved it to repo
Begi ok, thanks, I didn't see it... 21:05
And why Perl 5 ?
Zoffix_ Begi, because it works? 21:06
Begi sure
but it would be nice to use Perl 6 for perl6.org, no ?
Zoffix_ heh 21:07
Begi, why? That feels a bit tribal.
It's not even installed on that box. 21:08
Begi ow
I think it'd be preferable, but as long as it works with Perl5... 21:09
Zoffix_ When I wrote that script we didn't have DOM::Tiny in ecosystem so it was easier to just use the tools that work.
This page is generated by a PHP script: rakudo.org/downloads/star/ 21:10
Use what works. Tribalism is stupid.
21:10 Zoffix_ left, Zoffix left 21:11 RabidGravy left 21:19 cog_ left 21:20 cog_ joined 21:28 kyan joined 21:34 Cabanossi left
geekosaur ^ 21:36
21:38 Cabanossi joined, kybr left 21:39 kybr joined 21:41 Cabanossi left 21:42 Cabanossi joined
Geth doc: 3145979a14 | (Zoffix Znet)++ | doc/Type/IO/Path.pod6
[io grant] Document IO::Path.child-secure

Rakudo impl: github.com/rakudo/rakudo/commit/1887114dd8 Tests: github.com/perl6/roast/commit/f3c5dae288
21:47
doc: c5524efb90 | (Zoffix Znet)++ | doc/Type/IO/Path.pod6
[io grant] Rename IO::Path.concat-with to .add

Rakudo impl: github.com/rakudo/rakudo/commit/0b5a41ba87 Tests: github.com/perl6/roast/commit/39677c4059
21:49
doc: 81a5806c83 | (Zoffix Znet)++ | doc/Type/IO/Path.pod6
[io grant] Amend IO::Path.resolve: :completely

To include the bit that the last path fragment does not have to exist.
Rakudo correction: github.com/rakudo/rakudo/commit/51e462925a Tests: github.com/perl6/roast/commit/a716962791
21:51
22:05 dct joined 22:15 raiph joined 22:20 Cabanossi left 22:22 Cabanossi joined 22:27 dct left 22:30 Rawriful left 22:32 espadrine left 22:45 AlexDaniel left 22:48 AlexDaniel joined 22:51 Cabanossi left 22:52 Cabanossi joined 23:32 BenGoldberg joined, [particle] left, [particle] joined
Geth doc: 3feecce1fd | (Zoffix Znet)++ | 2 files
Get rid of $COLONs in URLs; samcv++
23:46
23:50 Cabanossi left 23:52 Cabanossi joined
Geth doc: cbbd4bc5cf | (Samantha McVey)++ (committed by Zoffix Znet) | app.pl
Make sure we only correct `::` into $COLON$COLON on MSWin
23:57