Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-04-16

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:13 bjz joined #perl6
00:27 udev joined #perl6
00:30 * u-ou sips coffee
00:32 Cabanossi joined #perl6
00:52 pytuger joined #perl6
00:52 pytuger #C
00:52 pytuger mb
00:52 timotimo hi pytuger
00:52 pytuger hello timotimo
00:54 pytuger EVAL('say("Do you enjoy perl6? timotimo? I am still getting used to it. \n")')
00:54 timotimo yeah, i really like it
00:55 timotimo if you want to have some code run in the channel, you can put "p6:" in front
00:56 pytuger Thank you for the info timotimo.  : )
00:56 chenryn joined #perl6
01:07 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:08 u-ou 'i really like perl 6'.say
01:08 samcv :D
01:08 u-ou :>
01:10 timotimo i wonder if anybody would enjoy trying out pyglet via Inline::Python ...
01:11 timotimo i'm positively surprised to see that project still being developed
01:13 samcv what does it do
01:14 timotimo it's like allegro or sdl, with a slight focus on opengl
01:16 timotimo anyway, sleep timp
01:16 timotimo time*
01:25 Geth ¦ doc: 53f2b999b5 | (Zoffix Znet)++ | 4 files
01:25 Geth ¦ doc: [io grant] Document `role IO`'s new purpose
01:25 Geth ¦ doc: review: https://github.com/perl6/doc/commit/53f2b999b5
01:27 quotable6 joined #perl6
01:28 quotable6 joined #perl6
01:30 quotable6 joined #perl6
01:31 Cabanossi joined #perl6
01:42 shadowpaste0 joined #perl6
01:48 ilbot3 joined #perl6
01:48 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
01:54 u-ou what's a good way to get a list in random order?
01:56 MasterDuke_ .pick(*)
01:56 MasterDuke_ m: say (^5).pick(*)
01:56 camelia rakudo-moar e0e080: OUTPUT: «(4 3 2 0 1)␤»
01:56 MasterDuke_ m: say (^5).pick(*)
01:56 camelia rakudo-moar e0e080: OUTPUT: «(4 0 2 3 1)␤»
01:56 AlexDaniel m: say WHAT (^5).pick(*)
01:56 camelia rakudo-moar e0e080: OUTPUT: «(Seq)␤»
01:57 MasterDuke_ m: say WHAT (^5).pick(*).list
01:57 camelia rakudo-moar e0e080: OUTPUT: «(List)␤»
01:57 MasterDuke_ m: say (^5).pick(*).list
01:57 camelia rakudo-moar e0e080: OUTPUT: «(3 4 1 0 2)␤»
01:57 u-ou thanks :D
01:59 AlexDaniel .oO( defined thanks )
02:07 jraglin joined #perl6
02:09 labster joined #perl6
02:19 noganex joined #perl6
02:40 u-ou omg perl 6
02:40 BenGoldberg joined #perl6
02:46 Cabanossi joined #perl6
02:50 BenGoldberg joined #perl6
03:17 u-ou (Though each time you write a custom constructor, remember that it makes subclassing harder).
03:17 u-ou why is that?
03:23 skids joined #perl6
03:31 mst I would suspect because now you can't just add keyword params like normal and expect them to just work?
03:32 u-ou fair enough
03:32 u-ou I just thought it might have been something deeper than that, why I asked
03:35 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:52 Cabanossi joined #perl6
03:53 angelds joined #perl6
04:12 wamba joined #perl6
04:29 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:31 TimToady speaking of which, probably about time to remerge and test again to make sure I'm not diverging from Zoffix++'s work...
04:37 Cabanossi joined #perl6
04:47 CIAvash joined #perl6
04:58 bjz joined #perl6
05:02 labster joined #perl6
05:07 Cabanossi joined #perl6
05:11 geekosaur joined #perl6
05:11 kyan joined #perl6
05:15 larks joined #perl6
05:17 u-ou how do you get a child class to inherit attributes?
05:18 TimToady you can only inherit accessors
05:18 u-ou ok
05:18 TimToady but maybe you want to use a role in that case
05:18 TimToady which is more like generic code that can instantiate attributes in a class
05:18 u-ou alrighty
05:19 TimToady but when you say "does MyRole" in a class, that is specifically not inheritance in the classical sense
05:20 TimToady more like an include, only it's not textual, more like a hygienic macro
05:20 TimToady but roles are great if what you really want is code reuse, not parent/child management
05:21 dmaestro Just opened: https://github.com/perl6/nqp/issues/353
05:25 xiaomiao joined #perl6
05:26 larks is there a nicer way of doing "my $promise2 = $promise1.then(-> $in {squared($in.result)});"?
05:31 moritz larks: maybe $promise2 = $promise1.then(&squared o *.result);
05:32 mst $promise1.then({ squared($^p.result) }) ?
05:34 moritz $promise1.then({ squared .result })
05:35 mst ooo
05:36 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?
05:36 u-ou or what mst said
05:37 moritz mst: any block without another signature gets $_ as an implicit argument
05:37 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 #perl6
05:38 moritz mst: right, because the $^p auto-generates a signature
05:38 u-ou ahh
05:40 u-ou so ($_) is like the default signature
05:41 moritz ($_ is rw) iirc
05:41 TimToady m: say { .foo }.signature
05:41 camelia rakudo-moar b7c036: OUTPUT: «(;; $_? is raw)␤»
05:41 u-ou cool :)
05:53 leah2 joined #perl6
05:56 Geth ¦ doc: ed7403c9b6 | (Gabor Szabo)++ | doc/Language/terms.pod6
05:56 Geth ¦ doc: link from 'time' to 'now' to make it easier to find
05:56 Geth ¦ doc: review: https://github.com/perl6/doc/commit/ed7403c9b6
05:57 szabgab joined #perl6
05:58 szabgab I wonder if such cross-links ( https://github.com/perl6/doc/commit/ed7403c9b6fd4fe296f0f001cc937eb4accf5218  ) 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 https://travis-ci.org/samcv/URL-Find
05:59 samcv hi yoleaux
05:59 samcv hi szabgab
05:59 szabgab hi samcv
05:59 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
05:59 mst I have exactly zero actual say in the matter though
06:00 samcv very yes szabgab
06:00 samcv we need more crosslinks
06:02 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:03 samcv like 30 mins?
06:11 szabgab wow, it seems Travis testing failed on the docs repo after my commit. I have no clue why https://travis-ci.org/perl6/doc/jobs/222498917
06:12 darutoko joined #perl6
06:13 szabgab hmm, I might have an idea why
06:17 dct joined #perl6
06:18 Geth ¦ doc: 160c6a2cc2 | (Zoffix Znet)++ | doc/Type/IO/Handle.pod6
06:18 Geth ¦ doc: [io grant] Document IO::Handle.lock/.unlock
06:18 Geth ¦ doc:
06:18 Geth ¦ doc: Rakudo impl: https://github.com/rakudo/rakudo/commit/214198bfb2
06:18 Geth ¦ doc: Tests: https://github.com/perl6/roast/commit/4194755c19
06:18 Geth ¦ doc: review: https://github.com/perl6/doc/commit/160c6a2cc2
06:21 nadim joined #perl6
06:21 szabgab it seems Pod::To::HTML is actually th one failing its tests and it is used in doc
06:23 Geth ¦ doc: 757a0f7132 | (Gabor Szabo)++ | doc/Language/terms.pod6
06:23 Geth ¦ doc: link to correct anchor
06:23 Geth ¦ doc: review: https://github.com/perl6/doc/commit/757a0f7132
06:26 Geth ¦ doc: dbc8594a53 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/terms.pod6
06:26 Geth ¦ doc: Fix incorrect link
06:26 Geth ¦ doc: review: https://github.com/perl6/doc/commit/dbc8594a53
06:31 geekosaur joined #perl6
06:33 Geth ¦ doc: c324f7ec49 | (Gabor Szabo)++ | doc/Language/modules.pod6
06:33 Geth ¦ doc: Make it easier to find information about Selective Importing #1270
06:33 Geth ¦ doc: review: https://github.com/perl6/doc/commit/c324f7ec49
06:36 Geth ¦ doc: e4cc659d9a | (Gabor Szabo)++ | doc/Language/5to6-perlfunc.pod6
06:36 Geth ¦ doc: link to EVAL #1260
06:36 Geth ¦ doc: review: https://github.com/perl6/doc/commit/e4cc659d9a
06:50 larks thanks moritz and mst =]
06:52 eater hey, is there actually a recommend IDE/Editor for perl6?
06:52 eater inb4 /use vim/
06:53 larks I use nvi >_>;
06:54 Zoffix joined #perl6
06:54 moritz others like atom
06:55 Geth ¦ doc: d84193a3fb | (Gabor Szabo)++ | doc/Language/5to6-perlfunc.pod6
06:55 Geth ¦ doc: link to exceptions #1260
06:55 Geth ¦ doc: review: https://github.com/perl6/doc/commit/d84193a3fb
06:55 Zoffix huggable: atom ide
06:55 huggable Zoffix, https://github.com/perl6/Atom-as-a-Perl6-IDE
06:55 Zoffix eater: Atom is great. ^ that repo lists some useful plugins.
06:56 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
06:56 eater its really weird to actually see people recommend atm :')
06:56 eater s/atm/atom
06:56 eater hope it's improved since 3 years ago
06:56 moritz I'm sure it has
06:56 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 #perl6
06:57 moritz I mean, it has had lots of contributions in the last three years
06:58 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 eater personally use PhpStorm or vim for everything but PhpStorm doesn't really have good perl6 plugins and vim doesn't have autocompletion
06:59 moritz ctrl+n
07:00 eater yeah, but not based on defined variables and stuff, like PhpStorm has
07:01 aindilis joined #perl6
07:01 nbrown joined #perl6
07:17 Geth ¦ doc: d1e2d734c3 | (Gabor Szabo)++ | doc/Language/5to6-perlvar.pod6
07:17 Geth ¦ doc: bunch of Perl 5 cross links
07:17 Geth ¦ doc: review: https://github.com/perl6/doc/commit/d1e2d734c3
07:17 samcv eater, atom has gottan a lot faster in the last year or so
07:17 eater yeah it feels really responsive rn
07:18 samcv and see https://github.com/perl6/Atom-as-a-Perl6-IDE for good plugins to install
07:19 samcv perl 6 highlighting etc
07:19 eater people linked it to me yeah, thanks samcv
07:28 Geth ¦ doc: 40665df5e2 | (Gabor Szabo)++ | doc/Type/IO.pod6
07:28 Geth ¦ doc: more information on closing filehandles #1258
07:28 Geth ¦ doc: review: https://github.com/perl6/doc/commit/40665df5e2
07:37 Cabanossi joined #perl6
07:41 Geth ¦ doc: 4ca7f68760 | (Gabor Szabo)++ | doc/Language/py-nutshell.pod6
07:41 Geth ¦ doc: add some Python-related indexes
07:41 Geth ¦ doc: review: https://github.com/perl6/doc/commit/4ca7f68760
07:41 u-ou bah, got circular module difficulties
07:43 u-ou these can be tricky
07:43 u-ou is there some easy way around them in perl 6?
07:45 u-ou I mean, is there a way you can actually have them?
07:45 moritz inside a compunit, yes
07:45 moritz by predeclaring one of them
07:46 u-ou what's a compunit?
07:46 moritz m: class B { ... }; class A { has B $.x }; class B is A { }
07:46 camelia rakudo-moar 88140b: ( no output )
07:46 moritz u-ou: a part of a program that's compiled in one go. For example a file.
07:47 u-ou where can I read more?
07:48 moritz dunno, maybe https://docs.perl6.org/language/modules.html ?
07:49 u-ou so you can have multiple files in one compunit?
07:51 moritz nope
08:09 ChoHag joined #perl6
08:44 espadrine joined #perl6
08:46 mr-foobar joined #perl6
08:56 jraglin joined #perl6
08:56 * u-ou tired
08:56 pytuger joined #perl6
09:01 parv joined #perl6
09:33 rindolf joined #perl6
09:37 Cabanossi joined #perl6
09:40 bjz_ joined #perl6
10:02 leah2 joined #perl6
10:42 samcv behold! https://moarvm.github.io/coverage/
10:43 samcv automated coverage reports by travis ci generated on every moarvm push (nqp test suite is what it is based on)
10:43 samcv woo
10:43 samcv yay robots
10:44 timotimo i kind of wish it would put the moar binary results below the libmoar results instead of having two frames :(
10:45 samcv yeah
10:45 samcv that could be nice. i am bad at web dev
10:45 timotimo i can try to whip up a sed file that does it
10:45 timotimo we don't have a perl6 at that point ;(
10:45 samcv that does what?
10:45 samcv oh
10:45 samcv below on the html page
10:45 timotimo yeah
10:45 timotimo in the same .html
10:46 timotimo at the moment i have to scroll both frames sideways and vertically
10:46 samcv yeah
10:46 samcv it's bad
10:46 timotimo and my mouse doesn't have a horizontal scrollba
10:46 timotimo scrollwheel or even clicks on the scrollwheel or whatever
10:47 samcv though changing what it says might be nice. where it says Coverage Report
10:47 samcv to say the branch. and moarvm version
10:47 samcv nqp etc
10:48 samcv since my coverage script generates some text that can be put there
10:48 samcv but no way to insert it atm
10:48 timotimo sure, we can sed all of that :P
10:48 timotimo i'm not really good at sed, but this should be doable
10:48 timotimo i'll just wget -r this stuff or something
10:49 samcv https://github.com/MoarVM/coverage
10:50 samcv there is a repo for it :X
10:50 samcv this branch https://github.com/MoarVM/coverage/tree/gh-pages
10:50 timotimo that could work %)
10:50 timotimo you could make gh-pages the default branch on github for that repo
10:54 timotimo i have a sed line to put "libmoar" and "commit id 123456" in the right spot
10:54 timotimo now to split-and-merge the two files
10:56 timotimo i'll also have to fix every link in the html file
10:57 samcv ah yeah
10:57 timotimo that'll be doable.
10:57 samcv why fix links
10:57 samcv they work
10:57 samcv or are they broken
10:57 samcv i thought they workd
10:58 timotimo they are not broken
10:58 timotimo but they will break if i combine both index.html files into one index.html one level further up
10:58 samcv ok i changed default and deleted master
10:59 samcv oh
10:59 samcv uh
10:59 samcv yes
10:59 samcv i understand now
11:00 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
11:00 samcv why would you do that.
11:00 samcv don't we want to edit the files before we push them?
11:00 grondilu m: say 0i
11:00 camelia rakudo-moar 88140b: OUTPUT: «0+0i␤»
11:01 grondilu m: use MONKEY; augment class Complex { multi method gist(Complex $z where $z.im == 0:) { self.re.gist } }; say 0i;
11:01 camelia rakudo-moar 88140b: OUTPUT: «0␤»
11:01 timotimo uh, huh?
11:01 timotimo i thought we want the commit hash to be in the title?
11:01 samcv oh
11:01 samcv yes we do
11:01 samcv ok i understand
11:01 samcv very good. continue
11:02 leah2 joined #perl6
11:10 timotimo okay so
11:10 timotimo i've got ' quotations here
11:10 timotimo how do i substitute $0 into that?
11:11 timotimo no, must be $1 actually
11:11 timotimo oh no, you've already left :<
11:11 samcv don't use sed maybe use perl?
11:12 timotimo i don't do perl
11:12 tadzik what year is this
11:13 timotimo how do i do, like, $1=$($1 || "unknown") ?
11:13 timotimo it won't do $1= and it won't do 1=
11:15 tadzik maybe awk will %)
11:15 timotimo i think i figured out what i need
11:15 timotimo HASH=${1:-unknown}
11:16 timotimo split_and_merge.sh: line 3: ${$1-unknown}: bad substitution
11:16 timotimo >:(
11:16 tadzik :D
11:16 timotimo oh, right
11:16 timotimo one $ too many
11:16 timotimo yup, this works!
11:37 Cabanossi joined #perl6
11:52 nadim joined #perl6
12:12 AlexDaniel joined #perl6
12:16 leah2 joined #perl6
12:52 timotimo moritz: are you interested in how to make irclog.perlgeek.de's index page faster to load?
12:52 Cabanossi joined #perl6
12:53 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 :-)
12:54 timotimo without optipng the montaged png file is only half as big as concatenating all .png files into one
12:54 timotimo and with optipng -o7 (not very heavy on the cpu) it's between a third and a quarter big
12:54 timotimo and then you save a whole bunch of http requests
12:54 moritz timotimo: hm, then I'd need to have a concept for channels that miss an image
12:55 timotimo have a blank.png that you copy to have the given filename
12:55 timotimo https://irclog.perlgeek.de/perl6-noise-gan/ - why does this exist :D
12:56 moritz maybe a typo when I configured teh bot?
12:56 timotimo potentially
12:57 timotimo i'm looking into this right now because of our moarvm coverage reports
12:57 timotimo i suggested putting a little tick line just like yours into the file-overview-tables
12:57 timotimo and i was wondering how big the individual graphs will be, and whether it'd be good to turn them into a data url
12:59 timotimo aha, util/cron-graphs.pl
12:59 * timotimo snoops around a little
13:00 moritz might be better to write the data into a json file, and then use some javascript magic to render it
13:01 timotimo that's also a possibility
13:01 timotimo then you're benefiting from people only rarely visiting the front page
13:03 moritz is the front page slow for you?
13:04 moritz '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
13:05 timotimo just 1.6s to finish
13:05 moritz https://developers.google.com/speed/pagespeed/insights/?url=https%3A%2F%2Firclog.perlgeek.de%2F says 89/100
13:06 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:07 moritz and maybe I could activate HTTP/2
13:07 dct joined #perl6
13:08 timotimo oh
13:08 timotimo in the cron script you could run gnuplot only once instead of once for each channel
13:09 timotimo oh, interesting
13:10 timotimo huh. never mind, misread something
13:11 timotimo ooooh!
13:11 timotimo moritz! moritz moritz moritz!
13:11 moritz timo!
13:11 * moritz hopes timotimo didn't find a severe security bug
13:11 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
13:12 timotimo and you can also  plot "<echo '1 2'" ...
13:13 timotimo no way. there's a special filename "+", too?
13:14 moritz and current I use temp files, right?
13:14 timotimo yup
13:15 timotimo plot "< awk '{print $1-1965, $2}' population.dat", pop(x)
13:15 timotimo gaaah :D
13:18 moritz doesn't look like code from me :-)
13:19 timotimo it's neat to have that, but nesting quoting inside quoting is never fun
13:21 * grondilu reads the lines above and agrees it'd be smarter to use javascript to draw functions
13:21 timotimo well volunteered! ;)
13:25 grondilu I'm not familiar with this page. And the link at the bottom "powered by" fails
13:25 moritz https://github.com/moritz/ilbot here's the source code
13:25 * moritz should set up a different "powered by" page
13:26 timotimo moritz: what's the "" at the top of the irc logs indices for?
13:27 moritz timotimo: not intentional
13:27 timotimo OK
13:27 grondilu a quick search shows me tons of ways to draw graphs in js.  http://www.jsgraphs.com/  And even without a library, with 2D canvas, should not be too hard.
13:28 moritz I don't think anybody says it's super hard. It just needs doing.
13:32 timotimo "needs" :)
13:32 itaipu joined #perl6
13:38 Cabanossi joined #perl6
13:43 ajr_ joined #perl6
13:45 itaipu joined #perl6
13:46 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:49 timotimo dunno, you can gist it up and if someone in the future cares they can find it in the irclog
13:49 timotimo is that a raspberry pi 1?
13:51 itaipu joined #perl6
14:06 Exchizz joined #perl6
14:06 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 :>
14:07 Exchizz It's listed here: https://docs.perl6.org/perl6.xhtml but I can't call it :/
14:09 timotimo yeah, that's the 5-to-6 document
14:09 timotimo where it's supposed to list what the perl6 equivalent is
14:10 timotimo you can nativecall into that function, o ruse Inline::Perl5
14:12 timotimo perl6.xhtml is weird as F
14:14 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:15 leah2 joined #perl6
14:16 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:18 LeCamarade joined #perl6
14:37 Zoffix joined #perl6
14:38 Zoffix ajr_: which tests are you talking about?
14:40 Zoffix Rakudo star's test suite?
14:41 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 rakudobug@perl.org There aren't any know failures in that area
14:43 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:44 Zoffix moritz: per December plans, there will be a R* release this month.
14:44 Zoffix moritz: also, there's been a blog post and some comments on the Future of R*: https://github.com/rakudo/star/issues/83
14:46 gfldex moritz: there is at least one blocker in Task::Star
14:47 Zoffix Blog post: http://blogs.perl.org/users/steve_mynott/2017/01/rakudo-star-past-present-and-future.html
14:54 mxco86 joined #perl6
14:59 mxco86 joined #perl6
15:01 Zoffix moritz: also, unsure if you saw my description of Perl6.VIP, but it's now public https://perl6.vip/ even if the deliverable itself isn't :)
15:02 mxco86 joined #perl6
15:04 moritz Zoffix: I saw it just now
15:05 moritz 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:06 moritz gfldex: what's the blocker?
15:07 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:10 awwaiid joined #perl6
15:14 ajr_ Zoffix: I've just submitted the rakudobug. Please let me know of any deficiencies in the report.
15:17 itaipu joined #perl6
15:21 espadrine joined #perl6
15:22 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 https://rt.perl.org/ (or top of the list on https://perl6.fail )
15:22 Zoffix left #perl6
15:30 kurahaupo joined #perl6
15:37 skids joined #perl6
15:59 gfldex moritz: https://github.com/jnthn/grammar-debugger/issues/34
16:00 jraglin joined #perl6
16:00 MilkmanDan joined #perl6
16:06 moritz gfldex: thanks
16:50 RabidGravy does anyone see a reason not to add a dependency (of NativeHelpers::CStruct ) to Net::ZMQ to make polling actually useful?
16:52 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:53 ugexe gfldex: the example i showed shows how to use travis testing without *installing* zef
16:53 ugexe e.g. it shows how to run zef to test/install some piece of work without actually installing zef
16:54 ugexe you'll still have to eat the initial precomp of zef, but you should shave some more seconds off none-the-less
17:03 TimToady joined #perl6
17:17 ugexe https://github.com/ugexe/P6TCI/blob/master/.travis.yml # another example demonstrated slightly different
17:32 dct joined #perl6
17:34 itaipu joined #perl6
17:34 Stamm joined #perl6
17:36 Stamm hello all
17:37 Stamm i have a question about hashes
17:37 Stamm in the doc, iy is explained how to *initialize* a hash with non-string keys
17:37 Stamm but how do i *add* an entry with a non-string key?
17:37 Cabanossi joined #perl6
17:43 Xliff joined #perl6
17:43 Xliff \o
17:43 Xliff m: "This should hAve PrOper TitLeCase".tc.say
17:43 camelia rakudo-moar 88140b: OUTPUT: «This should hAve PrOper TitLeCase␤»
17:43 Xliff :(
17:44 Xliff m: "This should hAve PrOper TitLeCase".lc.tc.say
17:44 camelia rakudo-moar 88140b: OUTPUT: «This should have proper titlecase␤»
17:44 Xliff What would be the best way to .tc every word in a string?
17:45 Xliff $str.words.tc.join(' ')/
17:45 Xliff Except .words would choke on .tc
17:46 Xliff m: "This should hAve PrOper TitLeCase".words.tc.say
17:46 camelia rakudo-moar 88140b: OUTPUT: «This should hAve PrOper TitLeCase␤»
17:46 Xliff m: "This should hAve PrOper TitLeCase".words.map({ .tc }).join(' ').say
17:46 camelia rakudo-moar 88140b: OUTPUT: «This Should HAve PrOper TitLeCase␤»
17:47 Xliff m: "This should hAve PrOper TitLeCase".words.map({ .lc.tc }).join(' ').say
17:47 camelia rakudo-moar 88140b: OUTPUT: «This Should Have Proper Titlecase␤»
17:47 Xliff \o/
18:03 jnthn m: "This should hAve PrOper TitLeCase".wordcase.say
18:03 camelia rakudo-moar 88140b: OUTPUT: «This Should Have Proper Titlecase␤»
18:04 Xliff jnthn++
18:06 timotimo huh
18:06 timotimo that face when you wonder "huh, how the hell can a method call give me a compile-time error for wrong arguments?"
18:06 timotimo and then you realize that the program has not only compiled, but also run to almost-completion in that timespan
18:07 Xliff Heh.
18:07 Xliff I wish I had that problem. :P
18:11 gdonald joined #perl6
18:30 timotimo dinner time, yay
18:46 labster joined #perl6
19:02 xinming_ joined #perl6
19:03 Zoffix joined #perl6
19:04 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: https://github.com/rakudo/rakudo/commit/1887114dd8
19:08 timotimo can you fool it with combining characters on top of / or something?
19:10 Zoffix m: use nqp; dd nqp::iseq_s("/", nqp::substr("/\x[308]", 0, 1))
19:10 camelia rakudo-moar 88140b: OUTPUT: «0␤»
19:10 Zoffix doesn't look like it
19:12 timotimo so ...
19:13 timotimo "../\x[308]" will properly be recognized as being ../ and then some garbage?
19:13 Zoffix Oh
19:13 Zoffix Let's see
19:15 Zoffix timotimo++
19:15 timotimo you see, i've been working on a json parser recently
19:15 Zoffix :)
19:15 Zoffix OK. Plan B: split on $!SPEC.dir-seps, join on nuls, and then compare stuff
19:15 * moritz has also had to solve the problem withere " + combining character wouldn't parse as a quoted string
19:16 moritz *where
19:16 zapwai joined #perl6
19:21 timotimo we ought to be careful about things that can turn into /, too, when encoding stuff
19:22 timotimo like, can we get utf8-c8 to cause a / to appear out of thin air?
19:22 Cabanossi joined #perl6
19:25 Zoffix hm, thinking more of it, looks like the bug's in resolve, really
19:25 Zoffix m: dd "/tmp/../\x[308]".resolve: :completely
19:25 camelia rakudo-moar 188711: OUTPUT: «No such method 'resolve' for invocant of type 'Str'␤  in block <unit> at <tmp> line 1␤␤»
19:25 Zoffix m: dd "/tmp/../\x[308]".IO.resolve: :completely
19:25 camelia rakudo-moar 188711: OUTPUT: «"/tmp/../̈".IO(:SPEC(IO::Spec::Unix))␤»
19:26 timotimo really, we'd want to be able to work at byte level here
19:26 timotimo but that's annoying AF.
19:30 Zoffix m: use nqp; dd nqp::split($*SPEC.dir-sep, "/tmp/../\x[308]".IO.absolute)
19:30 camelia rakudo-moar 188711: OUTPUT: «("", "tmp", "../̈")␤»
19:31 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
19:31 camelia rakudo-moar 188711: OUTPUT: «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…»
19:31 Zoffix What uninitilized value?
19:31 timotimo you can go through with nqp::ordat and see if there's any / that aren't actually eq "/"
19:33 Zoffix m: use nqp; my $sep = $*SPEC.dir-sep; dd split /:ignoremark $sep/, "/tmp/../\x[308]".IO.absolute
19:33 camelia rakudo-moar 188711: OUTPUT: «("", "tmp", "..", "").Seq␤»
19:34 Zoffix timotimo: and then do what?
19:35 Zoffix I mean what does it suppose to mean? updir path and filename named "\x[308]"?
19:37 Rawriful joined #perl6
19:38 Zoffix m: use nqp; my $p := "../̈foo".encode: 'Latin-1';
19:38 camelia rakudo-moar 188711: OUTPUT: «Error encoding Latin-1 string: could not encode codepoint 776␤  in block <unit> at <tmp> line 1␤␤»
19:38 Zoffix I thought anything could be encoded into Latin-1
19:39 timotimo no
19:39 timotimo you can decode any byte garbage as latin1
19:39 timotimo because every value between 0 and 255 is valid at every position
19:39 Zoffix Ah. I see
19:39 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
19:40 timotimo 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:41 * Zoffix doesn't get how to use the ordat trick
19:41 Zoffix and my terminal's totally messed up due to the combiner :(
19:42 Zoffix_ joined #perl6
19:42 mxco86 joined #perl6
19:42 Zoffix_ m: use nqp; dd nqp::ordat("../̈", 3)
19:42 camelia rakudo-moar 188711: OUTPUT: «-1␤»
19:42 Zoffix_ m: use nqp; dd nqp::ordat("../̈", 2)
19:42 camelia rakudo-moar 188711: OUTPUT: «47␤»
19:42 Zoffix_ m: use nqp; dd nqp::ordat("/̈", 0)
19:42 camelia rakudo-moar 188711: OUTPUT: «47␤»
19:42 Zoffix_ m: use nqp; dd nqp::ordat("/̈", 1)
19:42 camelia rakudo-moar 188711: OUTPUT: «-1␤»
19:42 Zoffix_ wut
19:43 timotimo ordat gives you the ord of the base character
19:43 timotimo because ord doesn't make any sense for synthetics
19:45 Zoffix_ No idea how to use that tho. What ordat trick?
19:45 * Zoffix_ is hacking up a thing with bufs now
19:46 timotimo the one where you get 47 for the strange /
19:46 timotimo m: say chr(47)
19:46 camelia rakudo-moar 188711: OUTPUT: «/␤»
19:46 Zoffix_ Yeah, but I want to split on '/' while leaving the combiners in the string
19:46 timotimo when you find a / via ordat == 47, you eqat with "/" and if they disagree you've got an asshole trying to pwn you
19:47 timotimo https://github.com/timo/json_fast/blob/master/lib/JSON/Fast.pm#L84
19:47 timotimo this gives you only the combiner
19:56 samcv Zoffix_, you can link to https://moarvm.github.io/coverage/ for moarvm coverage now \o/
19:59 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 rakudo-moar 188711: OUTPUT: «("..", "\x[308]foo")␤»
19:59 Zoffix_ Well, this works...
19:59 * Zoffix_ braces for perf impact
20:02 Zoffix_ samcv, done
20:03 lizmat Zoffix_: at this point we should probably settle for correct  :-)
20:04 Zoffix_ 132x slower than just nqp::split($SPEC.dir-sep, $path) >_<
20:04 * Zoffix_ makes a coffee and thinks harder
20:05 samcv that is always what I do :)
20:05 samcv make more tea and think harder
20:05 samcv then hit my head with the empty mug if that still does not work
20:05 timotimo drink tea harder
20:10 AlexDaniel sleeping harder helps too
20:14 committable6 joined #perl6
20:16 Zoffix_ 34x slower... it's improving! :)
20:17 timotimo but now it's safe?
20:18 Zoffix_ The bug's not in .child-secure, but in .resolve, so it's... more-correcter? but also makes .child-secure secure
20:18 Zoffix_ Also, the slowage is just for the splitting part, not entire routine
20:20 Zoffix_ my $p := nqp::encode($path, 'utf8-c8', nqp::list_i); dd nqp::atpos($p, 1);
20:20 Zoffix_ m: my $p := nqp::encode($path, 'utf8-c8', nqp::list_i); dd nqp::atpos($p, 1);
20:20 camelia rakudo-moar 188711: OUTPUT: «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::␤»
20:20 Zoffix_ m: my $p := nqp::encode('x', 'utf8-c8', nqp::list_i); dd nqp::atpos($p, 1);
20:20 camelia rakudo-moar 188711: OUTPUT: «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␤»
20:20 Zoffix_ ffs
20:20 Zoffix_ m: use nqp; my $p := nqp::encode('x', 'utf8-c8', nqp::list_i); dd nqp::atpos($p, 1);
20:20 camelia rakudo-moar 188711: OUTPUT: «MVMArray: atpos expected int register␤  in block <unit> at <tmp> line 1␤␤»
20:20 Zoffix_ Is there a way to use nqp::atpos(...) with the result from nqp::encode?
20:21 moritz m: use nqp; my $p := nqp::encode('x', 'utf8-c8', nqp::list_i); dd nqp::atpos_i($p, 0)
20:21 camelia rakudo-moar 188711: OUTPUT: «0␤»
20:21 Zoffix_ Ahh
20:21 Zoffix_ Thanks :) Didn't realize there were typed ones
20:21 moritz but why 0?
20:22 gdonald joined #perl6
20:23 Cabanossi joined #perl6
20:23 Zoffix_ oh :(
20:23 gdonald joined #perl6
20:23 moritz m: use nqp; my $p := nqp::encode('x', 'utf8-c8', nqp::list_i); say $p
20:23 camelia rakudo-moar 188711: OUTPUT: «Cannot find method 'gist': no method cache and no .^find_method␤  in block <unit> at <tmp> line 1␤␤»
20:23 moritz m: use nqp; my $p := nqp::encode('x', 'utf8-c8', nqp::list_i); say $p.^name
20:23 camelia rakudo-moar 188711: OUTPUT: «BOOTIntArray␤»
20:32 Zoffix_ m: my $p := nqp::encode($path, 'utf8-c8', buf8.new); dd nqp::atpos_i($p, 0);
20:32 camelia rakudo-moar 188711: OUTPUT: «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␤»
20:32 Zoffix_ m: my $p := nqp::encode('x', 'utf8-c8', buf8.new); dd nqp::atpos_i($p, 0);
20:32 camelia rakudo-moar 188711: OUTPUT: «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);␤»
20:32 Zoffix_ well, that works
20:37 Zoffix_ 23x. Good 'nuf
20:51 mouldysammich left #perl6
21:00 Begi Hey, #perl6 ! I've got a question about the perl6.org code
21:00 Begi How, and how often is the fetch-recent-blog-posts.pl script launched ?
21:02 Zoffix_ Begi, every 15 minutes
21:02 Zoffix_ */15    *       *       *       *       bash ~/perl6.org/update.sh > update.log 2>&1
21:03 timotimo um
21:03 timotimo that doesn't run the fetch-recent-blog-ponts.pl scripts though?
21:03 Zoffix_ Does: https://github.com/perl6/perl6.org/blob/master/update.sh#L11
21:03 timotimo oops
21:03 timotimo i looked at the update.sh above that
21:04 timotimo 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
21:05 Begi ok, thanks, I didn't see it...
21:05 Begi And why Perl 5 ?
21:06 Zoffix_ Begi, because it works?
21:06 Begi sure
21:06 Begi but it would be nice to use Perl 6 for perl6.org, no ?
21:07 Zoffix_ heh
21:07 Zoffix_ Begi, why? That feels a bit tribal.
21:08 Zoffix_ It's not even installed on that box.
21:08 Begi ow
21:09 Begi 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.
21:10 Zoffix_ This page is generated by a PHP script: http://rakudo.org/downloads/star/
21:10 Zoffix_ Use what works. Tribalism is stupid.
21:10 Zoffix_ left #perl6
21:10 Zoffix left #perl6
21:20 cog_ joined #perl6
21:28 kyan joined #perl6
21:36 geekosaur ^
21:38 Cabanossi joined #perl6
21:39 kybr joined #perl6
21:42 Cabanossi joined #perl6
21:47 Geth ¦ doc: 3145979a14 | (Zoffix Znet)++ | doc/Type/IO/Path.pod6
21:47 Geth ¦ doc: [io grant] Document IO::Path.child-secure
21:47 Geth ¦ doc:
21:47 Geth ¦ doc: Rakudo impl: https://github.com/rakudo/rakudo/commit/1887114dd8
21:47 Geth ¦ doc: Tests: https://github.com/perl6/roast/commit/f3c5dae288
21:47 Geth ¦ doc: review: https://github.com/perl6/doc/commit/3145979a14
21:49 Geth ¦ doc: c5524efb90 | (Zoffix Znet)++ | doc/Type/IO/Path.pod6
21:49 Geth ¦ doc: [io grant] Rename IO::Path.concat-with to .add
21:49 Geth ¦ doc:
21:49 Geth ¦ doc: Rakudo impl: https://github.com/rakudo/rakudo/commit/0b5a41ba87
21:49 Geth ¦ doc: Tests: https://github.com/perl6/roast/commit/39677c4059
21:49 Geth ¦ doc: review: https://github.com/perl6/doc/commit/c5524efb90
21:51 Geth ¦ doc: 81a5806c83 | (Zoffix Znet)++ | doc/Type/IO/Path.pod6
21:51 Geth ¦ doc: [io grant] Amend IO::Path.resolve: :completely
21:51 Geth ¦ doc:
21:51 Geth ¦ doc: To include the bit that the last path fragment does not have to exist.
21:51 Geth ¦ doc:
21:51 Geth ¦ doc: Rakudo correction: https://github.com/rakudo/rakudo/commit/51e462925a
21:51 Geth ¦ doc: Tests: https://github.com/perl6/roast/commit/a716962791
21:51 Geth ¦ doc: review: https://github.com/perl6/doc/commit/81a5806c83
22:05 dct joined #perl6
22:15 raiph joined #perl6
22:22 Cabanossi joined #perl6
22:48 AlexDaniel joined #perl6
22:52 Cabanossi joined #perl6
23:32 BenGoldberg joined #perl6
23:32 [particle] joined #perl6
23:46 Geth ¦ doc: 3feecce1fd | (Zoffix Znet)++ | 2 files
23:46 Geth ¦ doc: Get rid of $COLONs in URLs; samcv++
23:46 Geth ¦ doc: review: https://github.com/perl6/doc/commit/3feecce1fd
23:52 Cabanossi joined #perl6
23:57 Geth ¦ doc: cbbd4bc5cf | (Samantha McVey)++ (committed by Zoffix Znet) | app.pl
23:57 Geth ¦ doc: Make sure we only correct `::` into $COLON$COLON on MSWin
23:57 Geth ¦ doc: review: https://github.com/perl6/doc/commit/cbbd4bc5cf

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

Perl 6 | Reference Documentation | Rakudo