»ö« 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.
AlexDaniel at least that's how I see it :( 00:00
seeing “rakudo language” makes me want to flip the table though…
zengargoyle right, where does that leave Perl 6 on Erlang? 00:01
nadim Do we have a tool for code coverage? 00:03
zengargoyle i haven't heard of one (at least in the everybody knows to use this way). 00:05
zengargoyle wonders if you could run --profile on the tests and pull out callable names and check against callable names in the codebase. 00:11
nadim: i think i ran into a problem once where perl 6 is so private that you can't test some sub because they are not exported into a namespace where you can get at them from a test. (unlike perl 5 where suitable magic always works) 00:16
nadim I found two blocks of code that were nver executed that had code that was wrong, and by wrong I mean that the call to functions didn't even ahve the right amout of arguments
zengargoyle pretty much assumes nadim knows more than me. :) 00:17
nadim you probably assume wrong ;)
I learned the minimum to make a dumper, that's it. Now that it is done, I need to find a new project where I may, or may not, learn something else. 00:18
zengargoyle dumper is impressive to me, i need to take a look at it. 00:21
zengargoyle nadim: maybe you write Test::Coverage next. :P 00:25
Todd_ Hi all! Question: what is the delimiter for "use lib"? use lib '/usr/share/perl6/site/bin,/home/linuxutil'; does not workl. I have tried a space, a semicoln, and a full coln too 00:33
geekosaur I expect it would be a comma *outside* the quote 00:37
m: use lib '/usr/share/perl6/site/bin','/home/linuxutil' 00:42
camelia ( no output )
zengargoyle use lib 'path1', 'path2'; maybe use lib split(',',"path1,path2");
geekosaur not that that can fully test since I doubt either one works on that host
Todd_ will test
this worked 00:43
use lib '/usr/share/perl6/site/bin', '/home/linuxutil';
Thank you!
zengargoyle why use lib '/usr/share/perl6/site/bin' ? 00:44
seems an odd thing to do. 00:45
MasterDuke nadim: there's the MVM_COVERAGE_LOG=cover.log option
MasterDuke coverable6: say "asdf".comb.sort.join 00:46
coverable6 MasterDuke, Seems like you forgot to specify a revision (will use “HEAD” instead of “say”)
MasterDuke, gist.github.com/7cbab7fd334c5819ac...9c3c910c84 00:47
MasterDuke nadim: that's what ^^^ uses
Todd_ It is because I am using an Anti-Kaisen OS (Scientific Linux 7.3, an RHEL Clone). All revisions and bugs are locked place. unfortately, that weird path is the only way I can get things to see themselves. I should ot complain too much. As soon as I can afford it, I am ditching RHEL and going to Fedroa. I have *** had it *** with all the frozen bugs for "reliability"
zengargoyle Todd_: cool. 00:48
Todd_ RHEL won't even runb on C236 chipset motherboards. ANd RH won't fix it. C236 runs beautifully on Fedora. I have two Fedora serers out their. And I have to tell you, the frustratin factor between an anti-Kaisen OS and a Kaisen OS is about 10 to 1. RHEL is *** not *** more reliable than Fedora by any shake of the stick. 00:51
skids all I know is that RHEL/CENTOS seem to have a knack for choosing the most buggy revisions of FreeRADIUS possible, and then never backporting fixes. 00:52
nadim zengargoyle: If I am not too chicken shit, I'll write next version of Asciio in P6 00:53
MasterDuke++ 00:54
MasterDuke i'm working on a patch to moarvm to allow some more fine-grained control of the coverage tracking 00:55
nadim zengargoyle: dumper is here github.com/nkh/P6-Data-Dump-Tree or install with Zef
zengargoyle chants burn RHEL burn! :)
nadim MasterDuke: that would be nice. 00:56
Todd_ bye bye
skids o/
zengargoyle nadim: yeah, i've seen chatter and looked at posts, just haven't gotten around to it yet. did look really cool though. 00:56
nadim MasterDuke: and some kind of presentation layer.
nadim zengargoyle: dd is cool enough, ddt is readable that's the only difference 00:57
well, there may be other small differences too like filtering and diff, and dhtml but that's just because I have too much free time and that I wanted to at least do as much in P& as I did with my P5 module 00:58
MasterDuke heh. i'm no good at presentation. you seem better than i, i'll leave it up to you!
nadim haha!
skids nadim: You might want to check out Test::Screen in Proc::Screen for testing Asciio 00:59
nadim MasterDuke: we make a data structure and let ddt display it, can make a few filters if necessary. and since it can generate, Yuge, dhtml, we could get that expandable
zengargoyle nadim: yeah, like that p5 module i don't remember that dumped thing really pretty with dump roles for classes to make objects pretty... i think i get the idea.
nadim skids: will look at it, testing is good 01:00
zengargoyle: as long as you dump small stuff then dd is very fast and redable enough, my limit is two lines, then I need something that does not use 100% of my brain to comprehend. imgur.com/alqOYOo 01:04
nadim skids: Test::Screen is not among the modules in module.p6.whatnot 01:05
skids It's part of Proc::Screen 01:06
nadim skids: maybe I should write a Proc::Tmux
skids: ah!
nadim I see that you wrote it, maybe you should write Proc::Tmux ;) 01:07
the one thing that stops me from starting P6-Asciio is that I know it is quite some work and I am too lazy to do it myself.
skids It was a while ago but I think I remember looking at tmux and seeing some blockers. 01:08
nadim I moved from screen 5 years ago, not going back 01:09
not that screen was bad, just tmux is better engineered and documented 01:10
zengargoyle never got the tmux fever. :)
nadim I have even written a plugin to create a side window (in bash :( ) 01:11
skids screen is cretinous, agreed, but tmux I think lacked some essential features for this purpose.
nadim what would they be, it's quite complete. 01:12
skids I'll have to look at it again. I think screenshots might have been problematic or something.
nadim nah, it has an interface for that 01:13
and you can get the whole buffer written into a file 01:14
I see that there are quite a few tmux related modules on cpan 01:15
zengargoyle asciio looks neat. 01:23
it is user driven correct? a UI tool for manual drawing? 01:25
nadim It's a gtk+ perl tool that looks like ascii drawing but it saved text files too 01:26
and the text is objects so you can move them around draw lines that connects them ans stay connected , etc.. 01:27
zengargoyle ah, so no ncurses non-gui...
nadim that's the plan with the next version 01:28
www.youtube.com/watch?v=0l9W84PhOyI
zengargoyle mix that with dot and grammar and constraint layout. :P
nadim you are welcome to join the effort ;)
zengargoyle hehe... 01:29
nadim I'm writting an engine which write to a virtual screen, then that can translate to curses, gtk, html/JS or whatnot
but some A* routing would be nice 01:30
it's 10 years old, time to refresh it. And even if it does ascii, I will make it generate nice fluff for management
zengargoyle has no artistic ability. like the "box1 -> box2" type thing that does magic for me. :) 01:31
nadim my artistic abilities stop at ascii boxes, nothing to boast about
look from this time stamp youtu.be/0l9W84PhOyI?t=174 01:32
zengargoyle i think like "=begin data :for<asciio> Input -> Output =end data" draw pretty picture for me. 01:33
zengargoyle lazy
nadim there was a scripting interface once, that's also planned to come back with a revenge 01:35
zengargoyle if only there were a program that could choose good variable names for me i would be much happier. :)
nadim but doing automatic routing is possible, in the worst case by using dot
lol, I am sure you do fine.
zengargoyle yeah, have you read HOP? 01:36
Higher Order Perl by Dominus had a bit of "develop a constraint solver" for box layout.... 01:37
but it's been years since i read HOP
nadim yes, not all of it, it's on a shelf somewhere, I'll dust it out
but nothing beats putting the boxes by hand, takes seconds to draw something in asciio 01:38
zengargoyle there's the free ebook/pdf/text online if you don't want to sneeze from the dust.
zengargoyle has translate HOP into p6 in back of my mind.... 01:39
nadim I like paper books too 01:40
zengargoyle i think it would be very interesting to do HOP in p6 and see just what is magically no big deal.
nadim do it, do it 01:41
.tell Zoffix blogs.perl.org/users/zoffix_znet/20...art-1.html /me wants part 2 pretty please 01:42
yoleaux nadim: I'll pass your message to Zoffix.
zengargoyle remembers i should solve that math question MJD wrote when he signed my HOP book. i'm so ashamed for not figuring out a simple group theory symmetry problem. 01:46
nadim shame on you! 01:48
araraloren good noon! 01:52
zengargoyle now thinks i should ask MJD if i can publish that and make a p6 solution somehow. 01:53
zengargoyle really needs a blog :P
Geth whateverable/master: 6 commits pushed by (Aleks-Daniel Jakimenko-Aleksejev)++ 01:56
AlexDaniel … poof! 01:57
Geth whateverable: bbc970fabc | (Aleks-Daniel Jakimenko-Aleksejev)++ | Sakefile
Kill everybody before upgrading rakudo

There are so many things that can be done better here (e.g. the build script may be running and so we should terminate it gracefully), but that's a quest for another day.
Also, this does not work anyway. Why? Rakudobrew pulls rakudo from under the sake script, so it dies a horrible death.
  💩
02:08
pharv are there any debugging tools for perl6 besides rakduo-debugger? i'm trying to detect a memory leak in a module, so i was wondering if there is a way to step through the code 03:00
Zoffix . 03:02
yoleaux 01:42Z <nadim> Zoffix: blogs.perl.org/users/zoffix_znet/20...art-1.html /me wants part 2 pretty please
Zoffix not in the near future
pharv do you have any suggestions for how to detect a memory leak then? 03:04
Zoffix I was responding to nadim's message. 03:05
timotimo how slowly does it leak?
AlexDaniel timotimo: I see you're an optimist 03:06
pharv well, it's a a web app, and on each request, it leaks a significant amount of memory, even though it's rendering the same template each time, and the templates are in a reusable array
AlexDaniel pharv: what version of rakudo are you using? 03:07
pharv 2017.07
timotimo if it weren't 5am for me and i wasn't dead tired i'd ask for the script and have a look myself 03:11
pharv i appreciate it... i'll look for you tomorrow then :) i'll try to isolate it until then 03:14
timotimo that'd be nice
pharv is there a way to access the running process so i can output the memory usage to the screen? 03:20
Zoffix zengargoyle: nothing's branded as "Rakudo Perl 6" and there's no plan to brand anything with it. "Camelia"... "tweak"... you can throw it into the pile of hundreds of other name suggestions and there's little chance they'll take on without an official action. "Rakudo", on the other hand can, as it's already in use (users look for "rakudo" OS opackages; users don't load "Rakudo Star"; `perl6 -v` says "This is
Rakudo..."). "Rakudo" can be forced into use if "management" decides not to extend the name at the time of 6.d release, and based on my observations since the publication of my post it can be done fairly easy. As you've noticed, the name isn't ideal, as it's the name of *an* implementation of the language. Its widespread use to refer to the language isn't desirable on the grand scheme of things and can be
avoided if the "management" picks a different, official extension to the name.
Zoffix s/don't load/load/; 03:23
geekosaur pharv, on windows you use procmon (may need to get it from microsoft sysinternals); on unix, top. 03:26
if you are on a BSD or macOS, you can press control-T in the terminal window to get a very basic summary
Geth whateverable: f2d1d8c13e | (Aleks-Daniel Jakimenko-Aleksejev)++ | t/coverable.t
Everyone loves performance improvements!

Meanwhile, Coverable cries in the corner.
03:27
whateverable: 88412024cf | (Aleks-Daniel Jakimenko-Aleksejev)++ | Coverable.p6
How did we even get this piece of code here?

Maybe it is faster, but that does not matter.
pharv geekosaur: do i have access to it in perl6 code? 03:30
geekosaur I don't think so. jnthn would know as it'd have to be moarvm level
pharv ok, thanks 03:31
pharv are there any IDEs that have decent perl6 support for things like autocomplete and Goto Declaration? i'm on ubuntu 16.04 and it looks like padre isn't supported, so i'm currently using atom 03:34
hythm_ Hello, P6. 03:53
How to do loop inside template? here is gist of the code gist.github.com/hythm7/b21e05164a8...76065f41ac
pharv % for @rows -> %r { %r<id> % } 03:57
hythm_ %r gives Invalid typename 'r'. Tried with % $r but still get same output, all rows printed in one line 04:23
pharv %= %r<id> 04:24
hythm_ I'm still missing something, still getting the invalid type error. Also I Updated the gist with what I did 04:36
pharv should $h<rows> be %h<rows> or does that not matter? 04:38
hythm_ I think it doesn't matter 04:40
pharv move the % r { to the line above and remove the space between % and r
% for @rows -> %r {
hythm_ Tnat gave me different error: (error) Type check failed in binding to parameter '%r'; expected Associative but got Array ($["x", "z"]) 04:43
I think now the template syntax work, just need to figure out the type
pharv cool 04:44
hythm_ Thanks pharv 04:53
pharv np
MasterDuke pharv: you could try github.com/Skarsnik/p6-linux-proc-statm 04:59
pharv oh, awesome, thanks! 05:00
MasterDuke also, i've used heaptrack to monitor mem usage 05:02
pharv i was trying to use that, couldn't figure out how to produce the output file
you mean perl6 --profile=heap?
MasterDuke no, it's an external program 05:03
pharv oh
MasterDuke github.com/KDE/heaptrack
pharv oh, that is great, thank you
MasterDuke fyi, if you do end up using heaptrack, you get slightly more useful info by calling the moarvm binary directly (and passing --full-cleanup). `perl6` is just a shell script, and that throws things off 05:05
pharv ahh, thanks... i'm installing it now 05:06
szabgab pharv: regarding the memory leak, please see this: www.nntp.perl.org/group/perl.perl6....g4133.html 06:39
pharv ok 06:40
Geth ecosystem: noqisofon++ created pull request #358:
Add App::Miroku
06:41
szabgab I'll add a call to the templating system, without Bailador, as another case
pharv ok, cool
the leak does not appear to be related to the template calls at least 06:42
szabgab In any case I have a feeling that even without modules Rakudo leaks memory
pharv if i call template in a for loop, the memory does not increase much... the biggest increase is just on the initial request 06:43
szabgab I see, then maybe the leak is the routing system of Bailador? Maybe the regex engine of Rakudo? Or maybe I am just not measuring correctly. 06:45
I was hoping someone will look at my memory-usage measuring code and let me know if it looks reasonable 06:46
Geth ecosystem: 031fb495a5 | (ned rihine)++ | META.list
Add App::Miroku
06:47
ecosystem: e35ef552af | lizmat++ (committed using GitHub Web editor) | META.list
Merge pull request #358 from noqisofon/master

Add App::Miroku
pharv it would be easy to track down with a debugger, but when i tried to use the rakudo-debugger, it crashed with a broken promise error, so i'm just outputting the memory everywhere until i can find the spike 06:49
szabgab how are you "outputting the memmory" ? 06:50
pharv m: use Linux::Proc::Statm; $statm = get-statm(); $size = $statm<size>; say $size; 06:51
camelia ===SORRY!===
Could not find Linux::Proc::Statm at line 1 in:
/home/camelia/.perl6
/home/camelia/rakudo-m-inst-2/share/perl6/site
/home/camelia/rakudo-m-inst-2/share/perl6/vendor
/home/camelia/rakudo-m-inst-2/share/perl6
Co…
pharv m: zef install Linux::Proc::Statm 06:52
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routines:
install used at line 1
zef used at line 1
geekosaur no, you can't install new modules in camelia 06:55
pharv ah
does bailador support cached responses?
geekosaur I have no idea, sorry 06:56
not everyone is a web programmer, oddly enough
pharv sorry, was asking szabgab
szabgab pharv: I think it caches the templates
unless you run it in watch mode
but I don't think it caches the responses 06:57
pharv ok
szabgab try to see if running regexes, even without bailador show any signs of memory leak. 06:59
pharv ok 07:01
moritz thanks zengargoyle 08:04
yoleaux 4 Aug 2017 23:00Z <zengargoyle> moritz: clicky clicky purchased dead tree.
moritz Perl 6 fundamentals is now ranked #6 in the "Perl" category on amazon, and four of the books before it have no Perl in the title :-) 08:05
hythm_ Hello perl6, can someone explain to me why I need o call .list on an array to work properly in for loop? Without .list the loop takes all the array in first iteration 08:40
I have a small program to show that here: gist.github.com/hythm7/b21e05164a8...76065f41ac
zengargoyle moritz: i think i skiped some of the blog posts from when it was by example and they didn't pique my interests at the time... but i'll try and read through with beginner mind and give review. :) 08:45
zengargoyle hythm_: what does your for loop look like? -- for @foo -> $f { ... } -- will do each item of @foo, -- for @foo, -> $f { ... } will treat @foo as one thing. 08:49
hythm_ zengargoyle The loop looks like % for $h<rows> -> $row { #and $h<rows> is an array 08:50
araraloren hythm, you should force the variable to list context, for @($h<rows>) -> ... 08:51
zengargoyle hythm_: there are places i think where the choice between treading @foo as a list of items or treating @foo as a single thing are a little bit odd just because it's nice to have it work one way or the other. 08:51
hythm_ araraloren forcing to list context working 08:53
zengargoyle yeah, @() or maybe for flat $h<row> ... or |$h<row>
araraloren m: my $a = 1, 2, 3; for $a -> $i { say " => ", $i; } 08:54
camelia WARNINGS for <tmp>:
Useless use of constant integer 2 in sink context (lines 1, 1)
Useless use of constant integer 3 in sink context (lines 1, 1)
=> 1
araraloren m: my $a = 1, 2, 3; for $a -> $i { say " -> ", $i; } 08:55
camelia WARNINGS for <tmp>:
Useless use of constant integer 2 in sink context (lines 1, 1)
Useless use of constant integer 3 in sink context (lines 1, 1)
-> 1
hythm_ zengargoyle makes sense, sometimes its needed as single thing or multiple items.
zengargoyle there are a few options to make an item thing (single thing as array) poof out to list of individual items.
araraloren m: my $a = (1, 2, 3); for $a -> $i { say " -> ", $i; }
camelia -> (1 2 3)
araraloren m: my $a = (1, 2, 3); for @($a) -> $i { say " -> ", $i; }
camelia -> 1
-> 2
-> 3
araraloren It's like a reference to an array or list
zengargoyle m: my $a = (1, 2, 3); for |$a -> $i { say " -> ", $i; } 08:56
camelia -> 1
-> 2
-> 3
araraloren m: my $a = (1, 2, 3); for $a.flat -> $i { say " -> ", $i; } 08:57
camelia -> 1
-> 2
-> 3
zengargoyle i don't fully get it, but the difference between $a and @a can make a difference. it gives perl 6 a hint of sorts of what you expect to happen. 08:57
araraloren both work
zengargoyle m: my @a = (1, 2, 3); for @a -> $i { say " -> ", $i; } 08:58
camelia -> 1
-> 2
-> 3
araraloren Document not clear
zengargoyle araraloren: i believe it... but i haven't read docs in a while. :) 08:59
$ implies some sort of single item thingy. @ implies some sort of positional array like thing, % implies some sort of associative hash like thingy. 09:00
araraloren yeah, I think it should be something document in the section about `for`
zengargoyle when you put array in $x you have to do more hinting/work to make it like @x.
zengargoyle when you put something in \x with no sigil, you really have to do some work sometimes. :) 09:01
hythm_ checking documentations for that, I also saw it before changing type to Seq. it would be nice if can be controlled by $, @, % 09:02
zengargoyle araraloren: yeah, doc is hard.
i think @ is basically a Seq.cached (or is it clone or something...) 09:03
zengargoyle Seq still hurts my brain. :P 09:05
araraloren zengargoyle, have you watch jnthn's video about concurrency 09:08
zengargoyle araraloren: yes, but i need to do again. i sort of got lost in last bits... 09:09
araraloren oh
zengargoyle short attention span :P 09:10
zengargoyle and video sorta messed up a bit. 09:10
araraloren haha 09:11
Seq is different from List Array, it can only be iterate once 09:12
zengargoyle hehe, yeah. there was just some bit where i went from understanding to a little bit of WAT? that i think would be fixed by a re-watch and looking at slides and not getting distracted.
zengargoyle yeah, my problem is Seq poping up when you don't expect it to be a Seq and haven't prepared.... 09:13
more bad p5 everything is an array habit than actual problem.
araraloren yeah 09:14
nadim zengargoyle: .Seq that have already been iterated, a dream!
zengargoyle my worst nightmare error that i see way too much! because me stupid that particular way. :) 09:15
nadim Zoffix posted a "who ate my Seq" piece of code a few days ago that can be very useful.
zengargoyle yeah, i understand the Seq thing, i just don't notice it untill .... 09:16
nadim it takes time to learn to work with Seqs, particularely when you generate them without thinking about them. I completely hated them, you'll get use don't wory :) 09:17
zengargoyle i sorta need to change to expecting Seq and the Array is the weird thing. :)
at least it's an error that "i know what that means". 09:18
nadim Zoffix's code if it can get you out of troubles: Seq.^lookup("iterator").wrap: sub (|) { say "touched in: "; for 3..20 { try say "\t -> {.name || <anon>} ({.file}:{.line})" with callframe($_).code }; put(); nextsame; }; 09:19
nadim also, if you use the right sigil you'll have less problems, put stuff in @arrays rather than transporting them around in $scalars 09:20
zengargoyle how new is that article? (i usually do read Zoffix in my feed but that doesn't sound familiar), maybe i missed that. 09:21
yeah, i get and can now handle a Seq most of the time, it's just that i don't expect them because p5. 09:22
lazy hasn't burned into my brain yet. 09:23
zengargoyle heh, and really it seems like $@%& are acually just new contexts.... that aren't context based on location but context based on the term involved..... 09:29
araraloren yeah
zengargoyle it seems so slightly different from p5 that i don't quite know how to explain... :P 09:30
araraloren docs.perl6.org/language/5to6-nutsh...e_creation 09:31
It should be `item context` mentioned here 09:32
And next section Dereferencing is talk about @%$ () 09:34
zengargoyle i don't know, the whole reference/dereference thing is for p5 to p6 explaining. so it doesn't actually mean much. 09:35
it's all containers.
and $@%& is *gah* like gender. they're all the same thing and the sigil is just some expected behavior. :) 09:37
araraloren And I guess it is same thing has different mean 09:38
in different location, as you said
:<
zengargoyle yeah, i mean if you do the sigil-less my \x = ( 1, 2, 3 )
it won't behave like a list would if you named it $x, but if you gave it to something expecting a list, both would be the same. 09:39
araraloren yeah 09:40
zengargoyle like IIRC... my \f = sub { say "hello" } doesn't do f() because that is & magic, but f.() works.
my &f = sub { say "Hello" } works as just f or f() because the & describes expectations. 09:41
araraloren Then f is totally a reference here, yeah you are right
araraloren m: my \f = (1, 2, 3); say "A" ~ $_ for f; 09:42
camelia A1
A2
A3
zengargoyle there are no real references i think.... everything is an object. a 'reference' is just an object in a scalar container.
--ish
references like C or perl 5 where it's a pointer like thing. 09:43
araraloren docs.perl6.org/language/variables#..._variables 09:44
zengargoyle that's like the container thing... the magic is that a scalar container tries to be invisible so you never notice it.
araraloren I mean reference is like C# or JAVA 09:44
zengargoyle ah, me no do C# or Jave. :) neverming... 09:45
araraloren `Sigilless variables do not enforce context, so they can be used to pass something on as-is:` 09:46
This is tell the truth 09:47
zengargoyle yeah, i see that as like: $x -> scalar -> Int(2) is my $x = 2, my \x = 2 is x -> Int(2)
araraloren zengargoyle, ++ 09:48
zengargoyle no container. using 'x' gets you the actual object. using $x does magic scalar hiding and gives you the object, but there's a box there if you look hard enougn. 09:49
araraloren And sigil-less variable can not be modified, cause they don't know what context they be 09:50
zengargoyle and list is ( Int, Int, Int ) like (read-only "it's an object darn it) and array is ( scalar->Int, scalar->Int) but you just don't notice. :)
araraloren Cool!
zengargoyle yeah... hehe, they be but are zen! 09:51
araraloren haha
zengargoyle please note i could be totally wrong and nobody is here to tell me. :P
araraloren I know 09:52
Container is also something they help us understand language syntax 09:53
It's no different
pmurias hi 09:56
araraloren pmurias, hi
basket hi pmurias 10:00
zengargoyle i need to check docs again, but i think i would be bad doc writer... 10:01
araraloren :) me too
zengargoyle maybe one or two pages of the container and other key things and "just read this anyway" would make doc better in the end. 10:02
andreoss m: constant Foo := Metamodel::ClassHOW.new_type( name => 'Foo' ); Foo.^compose(); class Foo::B is Foo {}
camelia 5===SORRY!5=== Error while compiling <tmp>
'Foo::B' cannot inherit from 'Foo' because 'Foo' isn't composed yet (maybe it is stubbed)
at <tmp>:1
zengargoyle like axioms of math or something... :)
zengargoyle from these all things arise... (except for the few exceptions... ) 10:03
andreoss is there a manual which explains it?
zengargoyle i don't know, i read docs long ago, but it's hard to go back and re-read because of "i already read this" or "this is easy". 10:04
and finding the "we finally documented this one thing" is hard.
araraloren m: constant Foo := Metamodel::ClassHOW.new_type( name => 'Foo' ); Foo.^compose(); say Foo.new;
camelia Foo.new
araraloren andreoss, I would guess Foo:B need Foo at compiler time 10:05
zengargoyle i remember reading docs once upon a time and Synopses and then just watching IRC and catching explanations.
araraloren or something like that
and Foo does not create yet 10:06
zengargoyle a wiser me woulc have saved everything good. :)
andreoss m: INIT {constant Foo := Metamodel::ClassHOW.new_type( name => 'Foo' ); Foo.^compose(); }; class Foo::B is Foo {}
camelia 5===SORRY!5=== Error while compiling <tmp>
'Foo::B' cannot inherit from 'Foo' because 'Foo' isn't composed yet (maybe it is stubbed)
at <tmp>:1
araraloren Haha, we need a book :) 10:07
zengargoyle m: BEGIN {constant Foo := Metamodel::ClassHOW.new_type( name => 'Foo' ); Foo.^compose(); }; class Foo::B is Foo {}
camelia ( no output )
xtreak I have a program that makes CPU run at 100% but gives no output. pastebin.com/x7yVWRe4
andreoss what does 'stubbed' mean? 10:08
zengargoyle m: BEGIN {constant Foo := Metamodel::ClassHOW.new_type( name => 'Foo' ); Foo.^compose(); }; class Foo::B is Foo {}; Foo::B.new.^name.say
camelia Foo::B
araraloren andreoss, it's like a method only has declaration
not implement
xtreak I am trying to match [1,2,3] and used the above regex. I don't know why it keeps running instead of failing or passing. I have also come across ~ to match '[' ~ ']' <numbers>
araraloren m: CHECK {constant Foo := Metamodel::ClassHOW.new_type( name => 'Foo' ); Foo.^compose(); }; class Foo::B is Foo {} 10:09
camelia 5===SORRY!5=== Error while compiling <tmp>
'Foo::B' cannot inherit from 'Foo' because 'Foo' isn't composed yet (maybe it is stubbed)
at <tmp>:1
araraloren INIT is happen at run time 10:10
docs.perl6.org/language/phasers#Execution_Order
zengargoyle /<numlist>/ not /<numbers> is first thing. 10:12
xtreak Yes numlist doesn't match. So I tried <numbers>+ 10:14
araraloren yeah, I faced a lot of `100% CPU`
m: my rule numbers { <[0..9]>\,? }; my rule numlist { '[' ~ ']' <numbers> }; say "[1,12]" ~~ /<numbers>+/; 10:15
camelia 「1,」
numbers => 「1,」
zengargoyle gist.github.com/8995cffb6a495f53d3...ce8c26f43f
araraloren m: my rule numbers { <[0..9]>\,? }; my rule numlist { '[' ~ ']' <numbers> }; say "[1,12]" ~~ /<numlist>+/;
camelia Nil
zengargoyle xtreak: ^^ try looking at that.
araraloren m: my rule numbers { <[0..9]> \,? }; my rule numlist { '[' ~ ']' <numbers>+ }; say "[1,12]" ~~ /<numlist>/; 10:16
camelia Nil
xtreak zengargoyle: Thanks. Is there a reason why it causes 100%
zengargoyle yeah, i'm not sure about original code... just know maybe how to do the thing you seem to want. :) 10:17
wamba m: my rule numbers  { <[0..9]>+ }; my rule numlist { "[" ~ "]" <numbers>+ % "," }; say "[1,12]" ~~ /<numlist 10:18
>/;
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in metachar:sym<assert>; couldn't find final '>'
at <tmp>:1
------> 3ers>+ % "," }; say "[1,12]" ~~ /<numlist7⏏5<EOL>
expecting any of:
term
zengargoyle but you match numbers instead of numlist in the code....
wamba my rule numbers  { <[0..9]>+ }; my rule numlist { "[" ~ "]" <numbers>+ % "," }; say "[1,12]" ~~ /<numlist>/;
m: my rule numbers  { <[0..9]>+ }; my rule numlist { "[" ~ "]" <numbers>+ % "," }; say "[1,12]" ~~ /<numlist>/; 10:19
camelia 「[1,12]」
numlist => 「[1,12]」
numbers => 「1」
numbers => 「12」
xtreak Yes numlist doesn't match so I tried numbers with commas manually separating it. 10:20
xtreak Also why does the example need <[0..9]>* ? Then it has [<[0..9]>*]* . Could it be simplified as [<[0..9]>]* ? I am coming from Perl 5 so I might be wrong here 10:21
araraloren m: my rule numbers { <[0..9]> \,? }; my rule numlist { "[" ~ "]" <numbers>+ }; say "[1,2]" ~~ /<numlist>/
camelia 「[1,2]」
numlist => 「[1,2]」
numbers => 「1,」
numbers => 「2」
zengargoyle <[0..9]>*\,? isn't going to match multiple times if you match <numbers> and not like <numbers>+
araraloren m: my rule xxx { <[a..z]>*\,? }; say "xyz123" ~~ /<xxx>/; 10:22
camelia 「」
xxx => 「」
zengargoyle and * can match nothing, so always matches....
araraloren m: my rule xxx { <[a..z]>*\,? }; say "x,y,z," ~~ /<xxx>/;
camelia 「x,」
xxx => 「x,」
araraloren m: my rule xxx { <[a..z]>*\,? }; say "x,y,z," ~~ /<xxx>+/;
zengargoyle you probably at least want <[0..9]>+
camelia (timeout)
zengargoyle (because * there matches any empty space..... 10:23
araraloren m: my rule xxx { <[a..z]>*\,? }; say "x,y,z," ~~ rx:r/<xxx>+/;
zengargoyle over and over and over with backtracking i would guess..
camelia (timeout)
araraloren If a regex is declared with the rule keyword, both the :sigspace and :ratchet adverbs are implied. 10:24
rule does not backtrack
zengargoyle m: my rule xxx { <[a..z]>+\,? }; say "x,y,z," ~~ rx:r/<xxx>+/;
camelia 「x,y,z,」
xxx => 「x,」
xxx => 「y,」
xxx => 「z,」
araraloren I think this a bug. 10:25
;D
xtreak Thanks. I will take some more time to parse what you said and get back if there are any doubts.
zengargoyle it is unexpected, but trying to match 'nothing' with backtracing can take forever..... 10:26
m: my token xxx { <[a..z]>*\,? }; say "x,y,z," ~~ rx:r/<xxx>+/;
camelia (timeout) 10:27
zengargoyle m: my regex xxx { <[a..z]>*\,? }; say "x,y,z," ~~ rx:r/<xxx>+/;
well, maybe. :)
camelia (timeout) 10:27
zengargoyle m: my token xxx { <[a..z]>*\,? }; say "x,y,z," ~~ rx/<xxx>+/;
camelia (timeout) 10:28
zengargoyle i still sorta think that <[]>*\,? is pretty much a NULL pattern. zero matches and zero comma. 10:29
araraloren m: say "x,y,z," ~~ rx/ [ <[a..z]>*\,? ]+/
camelia (timeout)
zengargoyle it is true after everything.... "hey, i matched noting and no ," let's try again.... "hey, i matched nothing and no ," lets try again.... "hey..... 10:30
zengargoyle would ask moritz :) 10:31
araraloren And maybe he forgot go forward 10:33
zengargoyle m: say 'x' ~~ /<[x]>*\,?/
camelia 「x」
zengargoyle bah humbug.
zengargoyle m: say 'x,x' ~~ /<[x]>*\,?/ 10:34
camelia 「x,」
zengargoyle whelp...
araraloren m: say 'x,x' ~~ /[ <[x]>*\,? ]+/ 10:35
m: say 'x,' ~~ /[ <[x]>*\,? ]+/
m: say 'x' ~~ /[ <[x]>*\,? ]+/
I think there are something wrong in regex
m: say '' ~~ /[ <[x]>*\,? ]+/ 10:36
camelia (timeout)
zengargoyle yeah, match nothing multiple goes forever... 10:37
m: say '' ~~ /[ <[x]>*\,? ]*/
araraloren Oh, again
camelia (timeout)
zengargoyle yeah, that +/* :)
nadim zengargoyle: the code I posted is not from an article but from this channel
araraloren m: say '' ~~ /[ <[x]>*\,? ]?/ 10:38
camelia 「」
araraloren m: say '' ~~ /[ <[x]>*\,? ]+?/
camelia 「」
zengargoyle nadim: i'm afraid i'm lost...
nadim: i've forgotten what you are referencing. 10:40
zengargoyle wonders if irssi has a ?something? thing to search backwadrs through history. 10:42
zengargoyle nadim: "Zoffix's code if it can get you out of troubles..." ? 10:45
zengargoyle cut-n-pasted that into my file of things that might come in handy someday. 10:46
nadim: oh, now i think i remember. i didn't miss a Zoffix article because it was chat. 10:49
zengargoyle didn't think that much about it. :) 10:50
nadim zengargoyle: :) 10:53
zengargoyle follow the Z on twitter so i expect to eventually see stuff. (unless Z has blocked me :) ) but no worries. 10:57
zengargoyle is also keeping a cut-n-paste of interesting chat things to maybe digest someday, but mostly to grep through because "i thought i saw that and it's interesting". 10:59
zengargoyle goes to bed. 11:20
pmurias should the rakudo.js webpack loader be called rakudo-loader or perl6-loader? 12:46
the same question can be asked about perl6-runtime vs rakudo-runtime
moritz rakudo imho 12:53
the "perl6" executable that rakudo generates is mostly for historical reasons
pmurias what where those reasons? 12:54
moritz back in the parrot days, there was a language/ directory in the parrot repo, and rakudo happened to be the perl6 language implementation in the parrot tree
and if I remember correctly, the name "rakudo" came up only after that
and nobody ever bothered to change the executable name since then, and now stuff depends on it
Zoffix nadim: err, I wouldn't say "@" is the right sigil for a Seq, as it's not Positional. My suggestion for you to use a @ was because you were getting consumed seq error, suggesting you were reusing your Seq and thus actually needing a List/Array instead of a Seq. Normally, you'd bind a Seq to a $ var so that when you iterate over it, the consumed values don't get cached anywhere 13:15
Zoffix Looks like this bug is recent rt.perl.org/Ticket/Display.html?id...et-history I recall trying `my $a := 1…∞; for $a {}` in the past and it wasn't leaking; now it does 13:18
nadim: but compare these two pieces of code. The first one eats up about 400MB of RAM per second. The second one keeps RAM at 170MB on my box and it doesn't grow. Why? The assignment to the @-sigiled var is caching it 13:20
my @a := Seq.new: class :: does Iterator { method lazy (--> True) {}; method pull-one { 42 } }.new; for @a {} # 400MB/s growth
my $a := Seq.new: class :: does Iterator { method lazy (--> True) {}; method pull-one { 42 } }.new; for $a {} # 170MB of RAM flat
actually the first one should just be assignment, not binding.... Why doesn't it cry that I passed it non-positional?
And that Seq can normally just be `1…∞` Seq, but there's some recent bug I mentioned above with gather/take leaking memory 13:21
timotimo Zoffix: maybe because it's the "positional bind failover"? 13:22
Zoffix That's for parameters
m: my @a := ().Seq
^ and it works fine in this case (throws)
timotimo OK, so not just any bind
camelia Type check failed in binding; expected Positional but got Seq ($(().Seq))
in block <unit> at <tmp> line 1
13:23
Zoffix buggable: speed 4 13:24
buggable Zoffix, ▅█▁▁ data for 2017-08-04–2017-08-05; range: 3.660s–4.594s; 14% faster
Zoffix jnthn++
hm, looks like it's trying to consume the Seq before carping about it 13:26
m: my @a := Seq.new: class :: does Iterator {method pull-one {IterationEnd}}.new;
camelia Type check failed in binding; expected Positional but got Seq ($(().Seq))
in block <unit> at <tmp> line 1
Zoffix m: my @a := Seq.new: class :: does Iterator {method pull-one {42}}.new; # hang
camelia (timeout) 13:27
Zoffix m: my @a := 1…∞; # but this one has `is-lazy` set 13:31
camelia Type check failed in binding; expected Positional but got Seq (?)
in block <unit> at <tmp> line 1
araraloren_ m: say Seq ~~ Positional 13:32
camelia False
Zoffix Filed as rt.perl.org/Ticket/Display.html?id=131845 13:33
rightfold Does Perl 6 have diminutives? 13:46
bioexpress Hello, is it safe to assume that a `subst` on a variable with a non-string value does stringify that value?
rightfold bioexpress: if it's Cool 13:47
bioexpress rightfold: what does that mean?
bioexpress It's a base class 13:50
BenGoldberg m: say 1 ~~ Cool; 13:52
camelia True
BenGoldberg m: say pi ~~ Cool;
camelia True
BenGoldberg m: say 'abc' ~~ Cool;
camelia True
BenGoldberg m: say [] ~~ Cool;
camelia True
BenGoldberg m: say {} ~~ Cool;
camelia True
BenGoldberg m: say sub {} ~~ Cool; 13:53
camelia False
bioexpress evalbot usage: 'p6: my @a=[1,[1..4],'hello']; my $s = subst( /l/, "K", :g); say $s.WHAT'
p6: my @a=[1,[1..4],'hello']; my $s = subst( /l/, "K", :g); say $s.WHAT;
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
subst used at line 1. Did you mean 'substr'?
bioexpress 'p6: my @a=[1,[1..4],'hello']; my $s = subst( /l/, "K", :g); say $s.WHAT;'
BenGoldberg subst is a method.
bioexpress 'p6: my @a=[1,[1..4],'hello']; my $s = @a.subst( /l/, "K", :g); say $s.WHAT;' 13:54
'p6: my @a=(1,[1..4],'hello'); my $s = @a.subst( /l/, "K", :g); say $s.WHAT;'
BenGoldberg m: my @a = [ 1, [1..4], 'hello' ]; say @a.subst: /l/, "K", :g;
camelia 1 1 2 3 4 heKKo
BenGoldberg m: my @a = [ 1, [1..4], 'hello' ]; say @a.subst: /1/, "K", :g; 13:55
bioexpress m: my @a=(1,[1..4],'hello'); my $s = @a.subst( /l/, "K", :g); say $s.WHAT;
camelia K K 2 3 4 hello
(Str)
bioexpress Is this allowed?
BenGoldberg ?
What do you mean?
bioexpress Can I rely on this stringification? 13:56
BenGoldberg Yes.
bioexpress Thx!
BenGoldberg It's part of the specification, not a mere implementation detail.
moritz arrays always stringify by joining with a single blank
bioexpress m: my @a=(1,[1..4],'hello'); my $s = @a.subst( /Q/, "K", :g); say $s.WHAT; 13:57
camelia (Str)
bioexpress m: my @a=(1,[1..4],'hello'); @a.=subst( /Q/, "K", :g); say @a.WHAT; 13:59
camelia (Array)
bioexpress m: my @a=(1,[1..4],'hello'); @a.=subst( /Q/, "K", :g); say @a.perl; 14:00
camelia ["1 1 2 3 4 hello"]
araraloren_ m: say 'x,x' ~~ /[ <[x]>*\,? ]+/ 14:01
araraloren_ moritz, Is ^^ code has a bug on regex ? 14:02
camelia (timeout)
araraloren_ m: say '' ~~ /[ <[x]>*\,? ]+/
even null string hang on
camelia (timeout) 14:03
timotimo no
moritz araraloren_: did you mean x*%\, or so? 14:04
timotimo you're matching a single zero-width string infinitely often
moritz don't quantify regexes that can match a zero-width string
bioexpress moritz: who in the code above did the joining of the array with a single blank? 14:05
timotimo it's getting Str called on it 14:06
by Cool's subst method
araraloren_ moritz, No, I just found that hang on
timotimo m: .perl.say for Cool.^find_method("subst")
camelia method subst (Cool $: |c is raw) { #`(Method|27087000) ... }
timotimo s: Cool, "subst" 14:07
SourceBaby timotimo, Sauce is at github.com/rakudo/rakudo/blob/abf1...ol.pm#L172
timotimo okay it calls Stringy on itself
bioexpress Thx! 14:08
araraloren m: use NativeCall; sub rand_r(uint32 is rw) of int32 is native(Str) { * }; say &rand_r; 15:54
camelia sub rand_r (uint32 $ is rw --> int32) { #`(Sub+{Callable[int32]}+{NativeCall::Native[Sub+{Callable[int32]},Str]}|108130800) ... }
ufobat :) 16:02
yoleaux 2 Aug 2017 22:56Z <Zoffix> ufobat: some tips for your resources issue: irclog.perlgeek.de/perl6/2017-08-02#i_14960004
4 Aug 2017 22:44Z <Zoffix> ufobat: please report the bugs you find, so they could be fixed. I filed your 1 > 1 True as rt.perl.org/Ticket/Display.html?id=131842
ufobat Zoffix, yeah. i wasn't sure if i wasn't doing something wrong 16:03
ufobat i noticed some ppl complained about installation issues with bailador. i think it is fixed now: blogs.perl.org/users/martin_barth/2...ocker.html 16:19
MasterDuke ufobat: cool. fyi, "espacially" 16:21
ufobat fixed, thank you 16:23
Geth whateverable: be9c01a870 | (Aleks-Daniel Jakimenko-Aleksejev)++ | t/bisectable.t
Everyone loves performance improvements! №2

See also f2d1d8c13e673da1080216873a70467062f8668f.
You may think that tests with unbounded queries are taking more time because we simply have more commits now, but this does not matter given the logarithmic nature of the process. Also, even if we have one ... (13 more lines)
16:34
nadim is there a way to write @very_long_var = @very_long_var.map {...} shorter? kinda @very_long_var .map= {...} 16:48
MasterDuke @very_long_var .= map() should work, right? 16:49
nadim I try
nope 16:50
andreoss m: my @a = 1,2,3; @a.=map(* + 1).say 16:51
camelia [2 3 4]
nadim Sorry, yes, did it wrong
left the dot on the wrong side 16:52
araraloren m: my @a = 1, 2, 3; @a .= map(* + 2); say @a; 16:55
camelia [3 4 5]
awwaiid Hello peeps! I'm trying to work around a contest bug in the ICFP Contest, and need to call some fnctl stuff to turn my stdin/out from non-blocking back to blocking. Any pointers? 17:26
moritz awwaiid: use nativecall? 19:28
timotimo awwaiid: stdin and stdout shouldn'- be nonblocking any more with recent rakudo 19:36
timotimo awwaiid: at least strace -e fcntl only shows a getfd EBADF, setfd, cloexec, and getfl for rdonly|largefile 19:40
awwaiid timotimo: naw, this is an external program that invokes mine and sets it nonblocking on the other end 19:53
moritz: yeah, that appears to be the current answer. I see that in the most-wanted-modules list too
hythm_ perl5 has this syntax to create a helper to use in templates helper db => sub { $dbh };, how to do the same thing in perl6? I defined a sub in app.p6 but it is not recognized in templates 19:54
timotimo ah!
yeah, i'd say use nativecall to get at fcntl 19:55
or open another instance of stdin from /dev/stdin or /dev/tty or whatever
awwaiid timotimo: yeah. It's a bit of a yak shave, so at this point I'm waiting for the contest organizers to patch it on their end :)
timotimo right 19:56
glad to hear you're using perl6 in a contest setting :)
awwaiid contest isn't over, ya'll can join :)
icfpcontest2017.github.io/
This contest is _specifically_ to show off programming languages
timotimo well, yeah :) 19:58
Geth_ perl6-examples: 09121546d1 | (David Warring)++ | 3 files
GLRish fixes for 99-problems
20:15
perl6-examples: ffb8930ed4 | (David Warring)++ | 3 files
IOish fixes for cookbook
Geth_ perl6-examples: 1e781e2161 | (David Warring)++ | t/categories/tutorial.t
fix tutorial word-wrap test
20:46
domm hythm_: no idea how to do that, but I do recommend to pass a DBH to a template - unless you want to re-implement PHP :-) 21:33
..I do NOT recommend..
in fact, calling any methods/functions from inside a template can only lead to tears 21:34
Geth_ perl6-examples: 530542e6c7 | (David Warring)++ | .travis.yml
add travis test job for Rakudo 2017.07
21:39
hythm_ domm: makes sense, I wanted to try both to see what is best practice, at first I wanted to keep code related to each view in views directory on its own template (db connection, queries,...), but seems it will lead to errors 21:45
domm I prefer to prepare all data needed for a view in a model, and then pass that on for rendering 21:53
if it's a small one-person project, you might get away with passing a dbh to the template, but usually you don't want the designer/html-coder to have full access to the DB... 21:54
eater[sha2017] You guys may enjoy this: github.com/the-eater/shinit :) 22:04
an init system in perl6 :') 22:05
MasterDuke eater[sha2017]: heh. you should .tell lizmat about it, might make it into the perl 6 weekly 22:11
nadim I agree.' 22:27
eater[sha2017] hmm 22:52
zt.je/4n1V0.png
how does this happen
hmm, only happens on ro filesystem
zengargoyle moritz++ -- don't quantify regexes that can match a zero-width string -- DIHWIDT 22:53
zengargoyle surprised that is in spec glossary but not docs.perl6.org glossary... conscious choice? 22:59
eater[sha2017] .tell lizmat You may like this: github.com/the-eater/shinit 23:10
yoleaux eater[sha2017]: I'll pass your message to lizmat.
eater[sha2017] :)
zengargoyle lol at me, spent a minute wondering why the *** some glossary entries had a '§' marker and some didn't. grrr .hover links. :) 23:13
tbrowder hi, #perl6 23:47
tbrowder a couple of days ago i asked about using stdout and stderr with NativeCall. if i have a function that eiither writes to stdout or an explicit file, would using a pipe be a better choice than reading the redirected stdout or the explicit output file? 23:50
reading a file is more "natural" to me, but i'm open to using best practices. 23:53
Geth doc: 5b9f4c5dde | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/modules-core.pod6
s/Perl/Rakudo impl/;

Most of these modules aren't standard Perl 6.
  (also, didn't we want to call them "standard" rather than "core"?)
23:54