Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-08-05

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:00 AlexDaniel at least that's how I see it :(
00:00 AlexDaniel seeing “rakudo language” makes me want to flip the table though…
00:01 zengargoyle right, where does that leave Perl 6 on Erlang?
00:03 nadim Do we have a tool for code coverage?
00:05 zengargoyle i haven't heard of one (at least in the everybody knows to use this way).
00:11 * zengargoyle wonders if you could run --profile on the tests and pull out callable names and check against callable names in the codebase.
00:16 zengargoyle 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
00:17 * zengargoyle pretty much assumes nadim knows more than me. :)
00:17 nadim you probably assume wrong ;)
00:18 nadim 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:21 zengargoyle dumper is impressive to me, i need to take a look at it.
00:25 zengargoyle nadim: maybe you write Test::Coverage next. :P
00:28 astj joined #perl6
00:32 Todd_ joined #perl6
00:33 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:37 geekosaur I expect it would be a comma *outside* the quote
00:42 geekosaur m: use lib '/usr/share/perl6/site/bin','/home/linuxutil'
00:42 camelia rakudo-moar abf1cf: ( no output )
00:42 zengargoyle use lib 'path1', 'path2';  maybe use lib split(',',"path1,path2");
00:42 geekosaur not that that can fully test since I doubt either one works on that host
00:42 Todd_ will test
00:43 Todd_ this worked
00:43 Todd_ use lib '/usr/share/perl6/site/bin', '/home/linuxutil';
00:43 Todd_ Thank you!
00:44 zengargoyle why use lib '/usr/share/perl6/site/bin' ?
00:45 zengargoyle seems an odd thing to do.
00:45 MasterDuke nadim: there's the MVM_COVERAGE_LOG=cover.log option
00:46 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”)
00:47 coverable6 MasterDuke, https://gist.github.com/7cbab7fd334c5819ac3ad49c3c910c84
00:47 MasterDuke nadim: that's what ^^^ uses
00:47 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"
00:48 zengargoyle Todd_: cool.
00:51 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 pharv joined #perl6
00:52 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:53 nadim zengargoyle: If I am not too chicken shit, I'll write next version of Asciio in P6
00:54 nadim MasterDuke++
00:55 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 https://github.com/nkh/P6-Data-Dump-Tree or install with Zef
00:55 * zengargoyle chants burn RHEL burn! :)
00:56 nadim MasterDuke: that would be nice.
00:56 Todd_ bye bye
00:56 skids o/
00:56 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.
00:57 Cabanossi joined #perl6
00:57 nadim zengargoyle: dd is cool enough, ddt is readable that's the only difference
00:58 nadim 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!
00:58 nadim haha!
00:59 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
00:59 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.
01:00 nadim skids: will look at it, testing is good
01:04 nadim 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. http://imgur.com/alqOYOo
01:05 nadim skids: Test::Screen is not among the modules in module.p6.whatnot
01:06 skids It's part of Proc::Screen
01:06 nadim skids: maybe I should write a Proc::Tmux
01:06 nadim skids: ah!
01:07 nadim I see that you wrote it, maybe you should write Proc::Tmux ;)
01:07 nadim 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.
01:08 skids It was a while ago but I think I remember looking at tmux and seeing some blockers.
01:09 nadim I moved from screen 5 years ago, not going back
01:10 nadim not that screen was bad, just tmux is better engineered and documented
01:10 * zengargoyle never got the tmux fever. :)
01:11 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.
01:12 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.
01:13 nadim nah, it has an interface for that
01:14 nadim and you can get the whole buffer written into a file
01:15 nadim I see that there are quite a few tmux related modules on cpan
01:23 * zengargoyle asciio looks neat.
01:25 zengargoyle it is user driven correct?  a UI tool for manual drawing?
01:26 nadim It's a gtk+ perl tool that looks like ascii drawing but it saved text files too
01:27 nadim 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...
01:28 nadim that's the plan with the next version
01:28 nadim https://www.youtube.com/watch?v=0l9W84PhOyI
01:28 zengargoyle mix that with dot and grammar and constraint layout. :P
01:28 nadim you are welcome to join the effort ;)
01:29 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
01:30 nadim but some A* routing would be nice
01:30 nadim it's 10 years old, time to refresh it. And even if it does ascii, I will make it generate nice fluff for management
01:31 * 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
01:32 nadim look from this time stamp https://youtu.be/0l9W84PhOyI?t=174
01:33 zengargoyle i think like "=begin data :for<asciio>   Input -> Output    =end data" draw pretty picture for me.
01:33 * zengargoyle lazy
01:35 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. :)
01:35 nadim but doing automatic routing is possible, in the worst case by using dot
01:35 nadim lol, I am sure you do fine.
01:36 zengargoyle yeah, have you read HOP?
01:37 zengargoyle Higher Order Perl by Dominus had a bit of "develop a constraint solver" for box layout....
01:37 zengargoyle but it's been years since i read HOP
01:37 nadim yes, not all of it, it's on a shelf somewhere, I'll dust it out
01:38 nadim 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.
01:39 * zengargoyle has translate HOP into p6 in back of my mind....
01:40 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.
01:41 nadim do it, do it
01:42 nadim .tell Zoffix http://blogs.perl.org/users/zoffix_znet/2016/02/perl-6-shortcuts-part-1.html /me wants part 2 pretty please
01:50 yoleaux nadim: I'll pass your message to Zoffix.
01:50 * 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:50 mr-fooba_ joined #perl6
01:52 ilbot3 joined #perl6
01:52 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:52 araraloren good noon!
01:53 * 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
01:56 Geth ¦ whateverable/master: 6 commits pushed by (Aleks-Daniel Jakimenko-Aleksejev)++
01:56 Geth ¦ whateverable/master: 1353ee3df4 | <{…}> is not what I wanted
01:56 Geth ¦ whateverable/master: 4517a40a81 | Do timeout checks before doing the work, not after
01:56 Geth ¦ whateverable/master: 4e23050a7e | Longer lines are easier to read
01:56 Geth ¦ whateverable/master: 49674773ed | Mix Reply into messages from Handleable exceptions
01:56 Geth ¦ whateverable/master: dd198e3a44 | Handle exceptions when impersonating other bots
01:56 Geth ¦ whateverable/master: 5be4c05fb6 | Yet another refactoring commit
01:56 Geth ¦ whateverable/master: review: https://github.com/perl6/whateverable/compare/754efdfe89...5be4c05fb6
01:56 Cabanossi joined #perl6
01:57 AlexDaniel … poof!
02:08 Geth ¦ whateverable: bbc970fabc | (Aleks-Daniel Jakimenko-Aleksejev)++ | Sakefile
02:08 Geth ¦ whateverable: Kill everybody before upgrading rakudo
02:08 Geth ¦ whateverable:
02:08 Geth ¦ whateverable: There are so many things that can be done better here (e.g. the build
02:08 Geth ¦ whateverable: script may be running and so we should terminate it gracefully), but
02:08 Geth ¦ whateverable: that's a quest for another day.
02:08 Geth ¦ whateverable:
02:08 Geth ¦ whateverable: Also, this does not work anyway. Why? Rakudobrew pulls rakudo from
02:08 Geth ¦ whateverable: under the sake script, so it dies a horrible death.
02:08 Geth ¦ whateverable:
02:08 Geth ¦ whateverable: ????
02:08 Geth ¦ whateverable: review: https://github.com/perl6/whateverable/commit/bbc970fabc
02:11 bisectable6 joined #perl6
02:11 quotable6 joined #perl6
02:11 unicodable6 joined #perl6
02:11 bloatable6 joined #perl6
02:11 committable6 joined #perl6
02:11 coverable6 joined #perl6
02:11 evalable6 joined #perl6
02:11 greppable6 joined #perl6
02:11 benchable6 joined #perl6
02:11 statisfiable6 joined #perl6
02:17 noganex_ joined #perl6
02:27 basket joined #perl6
02:28 lizmat joined #perl6
02:32 Ptolemarch joined #perl6
02:54 pharv joined #perl6
03:00 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:02 Zoffix .
03:02 yoleaux 01:42Z <nadim> Zoffix: http://blogs.perl.org/users/zoffix_znet/2016/02/perl-6-shortcuts-part-1.html /me wants part 2 pretty please
03:02 Zoffix not in the near future
03:04 pharv do you have any suggestions for how to detect a memory leak then?
03:05 Zoffix I was responding to nadim's message.
03:05 timotimo how slowly does it leak?
03:06 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
03:07 AlexDaniel pharv: what version of rakudo are you using?
03:07 pharv 2017.07
03:11 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:14 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
03:20 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
03:20 Zoffix 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
03:20 Zoffix avoided if the "management" picks a different, official extension to the name.
03:23 Zoffix s/don't load/load/;
03:25 Cabanossi joined #perl6
03:26 geekosaur pharv, on windows you use procmon (may need to get it from microsoft sysinternals); on unix, top.
03:26 geekosaur if you are on a BSD or macOS, you can press control-T in the terminal window to get a very basic summary
03:27 Geth ¦ whateverable: f2d1d8c13e | (Aleks-Daniel Jakimenko-Aleksejev)++ | t/coverable.t
03:27 Geth ¦ whateverable: Everyone loves performance improvements!
03:27 Geth ¦ whateverable:
03:27 Geth ¦ whateverable: Meanwhile, Coverable cries in the corner.
03:27 Geth ¦ whateverable: review: https://github.com/perl6/whateverable/commit/f2d1d8c13e
03:27 Geth ¦ whateverable: 88412024cf | (Aleks-Daniel Jakimenko-Aleksejev)++ | Coverable.p6
03:27 Geth ¦ whateverable: How did we even get this piece of code here?
03:27 Geth ¦ whateverable:
03:27 Geth ¦ whateverable: Maybe it is faster, but that does not matter.
03:27 Geth ¦ whateverable: review: https://github.com/perl6/whateverable/commit/88412024cf
03:30 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
03:31 pharv ok, thanks
03:34 hythm_ joined #perl6
03:34 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:39 Ben_Goldberg joined #perl6
03:51 mr-foobar joined #perl6
03:53 hythm_ Hello, P6.
03:53 hythm_ How to do loop inside template? here is gist of the code https://gist.github.com/hythm7/b21e05164a8e397ffaae0276065f41ac
03:57 pharv % for @rows -> %r { %r<id> % }
04:02 Actualeyes joined #perl6
04:10 Cabanossi joined #perl6
04:17 mr-fooba_ joined #perl6
04:23 hythm_ %r  gives Invalid typename 'r'.  Tried with % $r but still get same output, all rows printed in one line
04:24 pharv %= %r<id>
04:34 go|dfish joined #perl6
04:36 jeromelanteri joined #perl6
04:36 hythm_ I'm still missing something, still getting the invalid type error. Also I Updated the gist with what I did
04:38 pharv should $h<rows> be %h<rows> or does that not matter?
04:40 hythm_ I think it doesn't matter
04:40 pharv move the % r { to the line above and remove the space between % and r
04:40 pharv % for @rows -> %r {
04:43 hythm_ Tnat gave me different error: (error) Type check failed in binding to parameter '%r'; expected Associative but got Array ($["x", "z"])
04:43 hythm_ I think now the template syntax work, just need to figure out the type
04:44 pharv cool
04:44 zengargoyle joined #perl6
04:53 hythm_ Thanks pharv
04:53 pharv np
04:56 mr-foobar joined #perl6
04:59 MasterDuke pharv: you could try https://github.com/Skarsnik/p6-linux-proc-statm
05:00 pharv oh, awesome, thanks!
05:02 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
05:02 pharv you mean perl6 --profile=heap?
05:03 MasterDuke no, it's an external program
05:03 pharv oh
05:03 MasterDuke https://github.com/KDE/heaptrack
05:03 pharv oh, that is great, thank you
05:05 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:06 pharv ahh, thanks... i'm installing it now
05:12 xtreak joined #perl6
05:25 Cabanossi joined #perl6
05:47 haha joined #perl6
05:49 zengargoyle joined #perl6
06:13 araraloren joined #perl6
06:29 ChoHag joined #perl6
06:35 szabgab joined #perl6
06:39 szabgab pharv: regarding the memory leak, please see this: http://www.nntp.perl.org/group/perl.perl6.users/2017/08/msg4133.html
06:40 pharv ok
06:41 Geth ¦ ecosystem: noqisofon++ created pull request #358: Add App::Miroku
06:41 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/pull/358
06:41 szabgab I'll add a call to the templating system, without Bailador, as another case
06:41 pharv ok, cool
06:42 pharv 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
06:43 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:45 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:46 szabgab I was hoping someone will look at my memory-usage measuring code and let me know if it looks reasonable
06:47 Geth ¦ ecosystem: 031fb495a5 | (ned rihine)++ | META.list
06:47 Geth ¦ ecosystem: Add App::Miroku
06:47 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/031fb495a5
06:47 Geth ¦ ecosystem: e35ef552af | lizmat++ (committed using GitHub Web editor) | META.list
06:47 Geth ¦ ecosystem: Merge pull request #358 from noqisofon/master
06:47 Geth ¦ ecosystem:
06:47 Geth ¦ ecosystem: Add App::Miroku
06:47 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/e35ef552af
06:49 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:50 szabgab how are you "outputting the memmory" ?
06:51 pharv m: use Linux::Proc::Statm; $statm = get-statm(); $size = $statm<size>; say $size;
06:51 camelia rakudo-moar abf1cf: OUTPUT: «===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…»
06:52 pharv m: zef install Linux::Proc::Statm
06:52 camelia rakudo-moar abf1cf: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Undeclared routines:?    install used at line 1?    zef used at line 1??»
06:54 wamba joined #perl6
06:55 geekosaur no, you can't install new modules in camelia
06:55 pharv ah
06:55 pharv does bailador support cached responses?
06:56 geekosaur I have no idea, sorry
06:56 geekosaur not everyone is a web programmer, oddly enough
06:56 pharv sorry, was asking szabgab
06:56 szabgab pharv: I think it caches the templates
06:56 szabgab unless you run it in watch mode
06:57 szabgab but I don't think it caches the responses
06:57 pharv ok
06:59 szabgab try to see if running regexes, even without bailador show any signs of memory leak.
07:01 pharv ok
07:36 ufobat joined #perl6
07:38 xtreak joined #perl6
07:41 xtreak joined #perl6
07:54 hythm_ joined #perl6
07:59 xtreak joined #perl6
08:04 moritz thanks zengargoyle
08:04 yoleaux 4 Aug 2017 23:00Z <zengargoyle> moritz: clicky clicky purchased dead tree.
08:05 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:11 parv joined #perl6
08:15 ChoHag joined #perl6
08:18 araujo__ joined #perl6
08:30 araraloren joined #perl6
08:31 jameslenz joined #perl6
08:37 hlorofils joined #perl6
08:40 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 hythm_ I have a small program to show that here: https://gist.github.com/hythm7/b21e05164a8e397ffaae0276065f41ac
08:41 tzekid joined #perl6
08:44 darutoko joined #perl6
08:45 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:48 araraloren joined #perl6
08:49 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:50 wamba joined #perl6
08:50 hythm_ zengargoyle The loop looks like % for $h<rows> -> $row {    #and $h<rows> is an array
08:51 araraloren hythm, you should force the variable to list context, for @($h<rows>) -> ...
08:51 xtreak joined #perl6
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:53 hythm_ araraloren forcing to list context working
08:53 zengargoyle yeah, @() or maybe for flat $h<row> ... or |$h<row>
08:54 araraloren m: my $a = 1, 2, 3; for $a -> $i { say " => ", $i; }
08:54 camelia rakudo-moar abf1cf: OUTPUT: «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?»
08:55 araraloren m: my $a = 1, 2, 3; for $a -> $i { say " -> ", $i; }
08:55 camelia rakudo-moar abf1cf: OUTPUT: «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?»
08:55 hythm_ zengargoyle makes sense, sometimes its needed as single thing or multiple items.
08:55 zengargoyle there are a few options to make an item thing (single thing as array) poof out to list of individual items.
08:55 araraloren m: my $a = (1, 2, 3); for $a -> $i { say " -> ", $i; }
08:55 camelia rakudo-moar abf1cf: OUTPUT: « -> (1 2 3)?»
08:55 araraloren m: my $a = (1, 2, 3); for @($a) -> $i { say " -> ", $i; }
08:55 camelia rakudo-moar abf1cf: OUTPUT: « -> 1? -> 2? -> 3?»
08:55 araraloren It's like a reference to an array or list
08:56 zengargoyle m: my $a = (1, 2, 3); for |$a -> $i { say " -> ", $i; }
08:56 camelia rakudo-moar abf1cf: OUTPUT: « -> 1? -> 2? -> 3?»
08:57 araraloren m: my $a = (1, 2, 3); for $a.flat -> $i { say " -> ", $i; }
08:57 camelia rakudo-moar abf1cf: OUTPUT: « -> 1? -> 2? -> 3?»
08:57 dpk left #perl6
08:57 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
08:58 zengargoyle m: my @a = (1, 2, 3); for @a -> $i { say " -> ", $i; }
08:58 camelia rakudo-moar abf1cf: OUTPUT: « -> 1? -> 2? -> 3?»
08:58 araraloren Document not clear
08:59 zengargoyle araraloren: i believe it... but i haven't read docs in a while. :)
09:00 zengargoyle $ 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`
09:00 zengargoyle when you put array in $x you have to do more hinting/work to make it like @x.
09:01 nadim joined #perl6
09:01 zengargoyle when you put something in \x with no sigil, you really have to do some work sometimes. :)
09:02 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.
09:03 zengargoyle i think @ is basically a Seq.cached (or is it clone or something...)
09:04 edehont joined #perl6
09:05 zengargoyle Seq still hurts my brain. :P
09:08 araraloren zengargoyle, have you watch jnthn's video about concurrency
09:09 zengargoyle araraloren: yes, but i need to do again. i sort of got lost in last bits...
09:09 araraloren oh
09:10 zengargoyle short attention span :P
09:10 Cabanossi joined #perl6
09:10 zengargoyle and video sorta messed up a bit.
09:11 araraloren haha
09:12 araraloren 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.
09:13 nadim joined #perl6
09:13 zengargoyle yeah, my problem is Seq poping up when you don't expect it to be a Seq and haven't prepared....
09:13 zengargoyle more bad p5 everything is an array habit than actual problem.
09:14 araraloren yeah
09:14 nadim zengargoyle: .Seq that have already been iterated, a dream!
09:15 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.
09:16 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. :)
09:18 zengargoyle at least it's an error that "i know what that means".
09:19 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:20 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 mr-foobar joined #perl6
09:21 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:22 zengargoyle 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:23 zengargoyle lazy hasn't burned into my brain yet.
09:27 Exodist joined #perl6
09:29 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
09:30 zengargoyle it seems so slightly different from p5 that i don't quite know how to explain... :P
09:31 araraloren https://docs.perl6.org/language/5to6-nutshell#Reference_creation
09:32 araraloren It should be `item context` mentioned here
09:34 araraloren And next section Dereferencing is talk about @%$ ()
09:35 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 zengargoyle it's all containers.
09:37 zengargoyle and $@%& is *gah* like gender.  they're all the same thing and the sigil is just some expected behavior. :)
09:38 araraloren And I guess it is same thing has different mean
09:38 araraloren in different location, as you said
09:38 araraloren :<
09:38 zengargoyle yeah, i mean if you do the sigil-less my \x = ( 1, 2, 3 )
09:39 zengargoyle 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:40 araraloren yeah
09:40 zengargoyle like IIRC... my \f = sub { say "hello" }  doesn't do f() because that is & magic, but f.() works.
09:41 zengargoyle 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
09:42 araraloren m: my \f = (1, 2, 3); say "A" ~ $_ for f;
09:42 camelia rakudo-moar abf1cf: OUTPUT: «A1?A2?A3?»
09:42 zengargoyle there are no real references i think.... everything is an object.  a 'reference' is just an object in a scalar container.
09:42 zengargoyle --ish
09:43 zengargoyle references like C or perl 5 where it's a pointer like thing.
09:44 araraloren https://docs.perl6.org/language/variables#Sigilless_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.
09:44 andreoss joined #perl6
09:44 araraloren I mean reference is like C# or JAVA
09:45 zengargoyle ah, me no do C# or Jave. :)  neverming...
09:46 araraloren `Sigilless variables do not enforce context, so they can be used to pass something on as-is:`
09:47 araraloren 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)
09:48 araraloren zengargoyle, ++
09:49 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:50 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. :)
09:50 araraloren Cool!
09:51 zengargoyle yeah... hehe, they be but are zen!
09:51 araraloren haha
09:51 zengargoyle please note i could be totally wrong and nobody is here to tell me. :P
09:52 araraloren I know
09:53 araraloren Container is also something they help us understand language syntax
09:53 araraloren It's no different
09:56 pmurias joined #perl6
09:56 pmurias hi
09:56 araraloren pmurias, hi
10:00 basket hi pmurias
10:01 zengargoyle i need to check docs again, but i think i would be bad doc writer...
10:01 araraloren :) me too
10:02 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 {}
10:02 andreoss
10:02 camelia rakudo-moar abf1cf: OUTPUT: «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?»
10:02 zengargoyle like axioms of math or something... :)
10:03 zengargoyle from these all things arise... (except for the few exceptions... )
10:03 andreoss is there a manual which explains it?
10:04 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 zengargoyle and finding the "we finally documented this one thing" is hard.
10:04 araraloren m: constant Foo := Metamodel::ClassHOW.new_type( name => 'Foo' ); Foo.^compose(); say Foo.new;
10:04 camelia rakudo-moar abf1cf: OUTPUT: «Foo.new?»
10:05 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.
10:05 araraloren or something like that
10:06 araraloren and Foo does not create yet
10:06 zengargoyle a wiser me woulc have saved everything good. :)
10:06 andreoss m: INIT {constant Foo := Metamodel::ClassHOW.new_type( name => 'Foo' ); Foo.^compose(); }; class Foo::B is Foo {}
10:06 andreoss
10:06 camelia rakudo-moar abf1cf: OUTPUT: «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?»
10:07 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 {}
10:07 camelia rakudo-moar abf1cf: ( no output )
10:07 xtreak I have a program that makes CPU run at 100% but gives no output. https://pastebin.com/x7yVWRe4
10:08 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
10:08 camelia rakudo-moar abf1cf: OUTPUT: «Foo::B?»
10:08 araraloren andreoss, it's like a method only has declaration
10:08 araraloren not implement
10:08 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>
10:09 araraloren m: CHECK {constant Foo := Metamodel::ClassHOW.new_type( name => 'Foo' ); Foo.^compose(); }; class Foo::B is Foo {}
10:09 camelia rakudo-moar abf1cf: OUTPUT: «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?»
10:10 araraloren INIT is happen at run time
10:10 araraloren https://docs.perl6.org/language/phasers#Execution_Order
10:12 zengargoyle /<numlist>/ not /<numbers> is first thing.
10:14 xtreak Yes numlist doesn't match. So I tried <numbers>+
10:14 araraloren yeah, I faced a lot of `100% CPU`
10:15 araraloren m: my rule numbers  { <[0..9]>\,? }; my rule numlist { '[' ~ ']' <numbers> }; say "[1,12]" ~~ /<numbers>+/;
10:15 camelia rakudo-moar abf1cf: OUTPUT: «?1,?? numbers => ?1,??»
10:15 zengargoyle https://gist.github.com/8995cffb6a495f53d3fecfce8c26f43f
10:15 araraloren m: my rule numbers  { <[0..9]>\,? }; my rule numlist { '[' ~ ']' <numbers> }; say "[1,12]" ~~ /<numlist>+/;
10:15 camelia rakudo-moar abf1cf: OUTPUT: «Nil?»
10:15 zengargoyle xtreak: ^^ try looking at that.
10:16 araraloren m: my rule numbers  { <[0..9]> \,? }; my rule numlist { '[' ~ ']' <numbers>+ }; say "[1,12]" ~~ /<numlist>/;
10:16 camelia rakudo-moar abf1cf: OUTPUT: «Nil?»
10:16 xtreak zengargoyle: Thanks. Is there a reason why it causes 100%
10:17 zengargoyle yeah, i'm not sure about original code... just know maybe how to do the thing you seem to want. :)
10:18 wamba m: my rule numbers  { <[0..9]>+ }; my rule numlist { "[" ~ "]" <numbers>+ % "," }; say "[1,12]" ~~ /<numlist
10:18 wamba >/;
10:18 camelia rakudo-moar abf1cf: OUTPUT: «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?»
10:18 zengargoyle but you match numbers instead of numlist in the code....
10:18 wamba my rule numbers  { <[0..9]>+ }; my rule numlist { "[" ~ "]" <numbers>+ % "," }; say "[1,12]" ~~ /<numlist>/;
10:19 wamba m: my rule numbers  { <[0..9]>+ }; my rule numlist { "[" ~ "]" <numbers>+ % "," }; say "[1,12]" ~~ /<numlist>/;
10:19 camelia rakudo-moar abf1cf: OUTPUT: «?[1,12]?? numlist => ?[1,12]??  numbers => ?1??  numbers => ?12??»
10:19 colomon joined #perl6
10:20 xtreak Yes numlist doesn't match so I tried numbers with commas manually separating it.
10:21 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>/
10:21 camelia rakudo-moar abf1cf: OUTPUT: «?[1,2]?? numlist => ?[1,2]??  numbers => ?1,??  numbers => ?2??»
10:21 zengargoyle <[0..9]>*\,? isn't going to match multiple times if you match <numbers> and not like <numbers>+
10:22 araraloren m: my rule xxx { <[a..z]>*\,? }; say "xyz123" ~~ /<xxx>/;
10:22 camelia rakudo-moar abf1cf: OUTPUT: «??? xxx => ???»
10:22 zengargoyle and * can match nothing, so always matches....
10:22 araraloren m: my rule xxx { <[a..z]>*\,? }; say "x,y,z," ~~ /<xxx>/;
10:22 camelia rakudo-moar abf1cf: OUTPUT: «?x,?? xxx => ?x,??»
10:22 araraloren m: my rule xxx { <[a..z]>*\,? }; say "x,y,z," ~~ /<xxx>+/;
10:22 zengargoyle you probably at least want <[0..9]>+
10:22 camelia rakudo-moar abf1cf: OUTPUT: «(timeout)»
10:23 zengargoyle (because * there matches any empty space.....
10:23 araraloren m: my rule xxx { <[a..z]>*\,? }; say "x,y,z," ~~ rx:r/<xxx>+/;
10:23 zengargoyle over and over and over with backtracking i would guess..
10:23 camelia rakudo-moar abf1cf: OUTPUT: «(timeout)»
10:24 araraloren If a regex is declared with the rule keyword, both the :sigspace and :ratchet adverbs are implied.
10:24 araraloren rule does not backtrack
10:24 zengargoyle m: my rule xxx { <[a..z]>+\,? }; say "x,y,z," ~~ rx:r/<xxx>+/;
10:24 camelia rakudo-moar abf1cf: OUTPUT: «?x,y,z,?? xxx => ?x,?? xxx => ?y,?? xxx => ?z,??»
10:25 araraloren I think this a bug.
10:25 araraloren ;D
10:25 xtreak Thanks. I will take some more time to parse what you said and get back if there are any doubts.
10:26 zengargoyle it is unexpected, but trying to match 'nothing' with backtracing can take forever.....
10:26 zengargoyle m: my token xxx { <[a..z]>*\,? }; say "x,y,z," ~~ rx:r/<xxx>+/;
10:27 camelia rakudo-moar abf1cf: OUTPUT: «(timeout)»
10:27 zengargoyle m: my regex xxx { <[a..z]>*\,? }; say "x,y,z," ~~ rx:r/<xxx>+/;
10:27 zengargoyle well, maybe. :)
10:27 camelia rakudo-moar abf1cf: OUTPUT: «(timeout)»
10:27 zengargoyle m: my token xxx { <[a..z]>*\,? }; say "x,y,z," ~~ rx/<xxx>+/;
10:28 camelia rakudo-moar abf1cf: OUTPUT: «(timeout)»
10:29 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]>*\,? ]+/
10:29 camelia rakudo-moar abf1cf: OUTPUT: «(timeout)»
10:30 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:31 * zengargoyle would ask moritz :)
10:33 araraloren And maybe he forgot go forward
10:33 zengargoyle m: say 'x' ~~ /<[x]>*\,?/
10:33 camelia rakudo-moar abf1cf: OUTPUT: «?x??»
10:33 zengargoyle bah humbug.
10:34 colomon joined #perl6
10:34 zengargoyle m: say 'x,x' ~~ /<[x]>*\,?/
10:34 camelia rakudo-moar abf1cf: OUTPUT: «?x,??»
10:34 * zengargoyle whelp...
10:35 araraloren m: say 'x,x' ~~ /[ <[x]>*\,? ]+/
10:35 araraloren m: say 'x,' ~~ /[ <[x]>*\,? ]+/
10:35 araraloren m: say 'x' ~~ /[ <[x]>*\,? ]+/
10:35 araraloren I think there are something wrong in regex
10:36 araraloren m: say '' ~~ /[ <[x]>*\,? ]+/
10:36 camelia rakudo-moar abf1cf: OUTPUT: «(timeout)»
10:36 camelia rakudo-moar abf1cf: OUTPUT: «(timeout)»
10:36 camelia rakudo-moar abf1cf: OUTPUT: «(timeout)»
10:36 camelia rakudo-moar abf1cf: OUTPUT: «(timeout)»
10:37 zengargoyle yeah, match nothing multiple goes forever...
10:37 zengargoyle m: say '' ~~ /[ <[x]>*\,? ]*/
10:37 araraloren Oh, again
10:37 camelia rakudo-moar abf1cf: OUTPUT: «(timeout)»
10:37 zengargoyle yeah, that +/* :)
10:37 nadim zengargoyle: the code I posted is not from an article but from this channel
10:38 araraloren m: say '' ~~ /[ <[x]>*\,? ]?/
10:38 camelia rakudo-moar abf1cf: OUTPUT: «???»
10:38 araraloren m: say '' ~~ /[ <[x]>*\,? ]+?/
10:38 camelia rakudo-moar abf1cf: OUTPUT: «???»
10:38 zengargoyle nadim: i'm afraid i'm lost...
10:40 zengargoyle nadim: i've forgotten what you are referencing.
10:42 * zengargoyle wonders if irssi has a ?something? thing to search backwadrs through history.
10:45 zengargoyle nadim: "Zoffix's code if it can get you out of troubles..." ?
10:46 * zengargoyle cut-n-pasted that into my file of things that might come in handy someday.
10:49 zengargoyle nadim: oh, now i think i remember.  i didn't miss a Zoffix article because it was chat.
10:50 * zengargoyle didn't think that much about it. :)
10:50 espadrine joined #perl6
10:53 nadim zengargoyle: :)
10:57 * zengargoyle follow the Z on twitter so i expect to eventually see stuff.  (unless Z has blocked me :) ) but no worries.
10:59 * 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".
11:20 rindolf joined #perl6
11:20 mr-foobar joined #perl6
11:20 g0d355__ joined #perl6
11:20 * zengargoyle goes to bed.
11:38 sjoshi joined #perl6
11:40 dogbert2 joined #perl6
11:41 nadim joined #perl6
11:45 araraloren_ joined #perl6
12:07 ChoHag joined #perl6
12:11 robertle joined #perl6
12:14 RockyBalboa joined #perl6
12:15 medfly joined #perl6
12:15 medfly left #perl6
12:24 mingdao joined #perl6
12:36 haha joined #perl6
12:36 lichtkind joined #perl6
12:40 Cabanossi joined #perl6
12:44 mr-fooba_ joined #perl6
12:46 pmurias should the rakudo.js webpack loader be called rakudo-loader or perl6-loader?
12:46 pmurias the same question can be asked about perl6-runtime vs rakudo-runtime
12:53 moritz rakudo imho
12:53 moritz the "perl6" executable that rakudo generates is mostly for historical reasons
12:54 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
12:54 moritz and if I remember correctly, the name "rakudo" came up only after that
12:54 moritz and nobody ever bothered to change the executable name since then, and now stuff depends on it
13:15 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:18 Zoffix Looks like this bug is recent https://rt.perl.org/Ticket/Display.html?id=131829#ticket-history  I recall trying `my $a := 1…?; for $a {}` in the past and it wasn't leaking; now it does
13:20 Zoffix 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 Zoffix my @a := Seq.new: class :: does Iterator { method lazy (--> True) {}; method pull-one { 42 } }.new; for @a {} # 400MB/s growth
13:20 Zoffix my $a := Seq.new: class :: does Iterator { method lazy (--> True) {}; method pull-one { 42 } }.new; for $a {} # 170MB of RAM flat
13:20 Zoffix actually the first one should just be assignment, not binding.... Why doesn't it cry that I passed it non-positional?
13:21 Zoffix And that Seq can normally just be `1…?` Seq, but there's some recent bug I mentioned above with gather/take leaking memory
13:22 timotimo Zoffix: maybe because it's the "positional bind failover"?
13:22 Zoffix That's for parameters
13:22 Zoffix m: my @a := ().Seq
13:22 Zoffix ^ and it works fine in this case (throws)
13:22 timotimo OK, so not just any bind
13:23 camelia rakudo-moar abf1cf: OUTPUT: «Type check failed in binding; expected Positional but got Seq ($(().Seq))?  in block <unit> at <tmp> line 1??»
13:24 Zoffix buggable: speed 4
13:24 buggable Zoffix, ???? data for 2017-08-04–2017-08-05; range: 3.660s–4.594s; 14% faster
13:24 Zoffix jnthn++
13:26 Zoffix hm, looks like it's trying to consume the Seq before carping about it
13:26 Zoffix m: my @a := Seq.new: class :: does Iterator {method pull-one {IterationEnd}}.new;
13:26 camelia rakudo-moar abf1cf: OUTPUT: «Type check failed in binding; expected Positional but got Seq ($(().Seq))?  in block <unit> at <tmp> line 1??»
13:26 Zoffix m: my @a := Seq.new: class :: does Iterator {method pull-one {42}}.new; # hang
13:27 camelia rakudo-moar abf1cf: OUTPUT: «(timeout)»
13:31 Zoffix m: my @a := 1…?; # but this one has `is-lazy` set
13:31 camelia rakudo-moar abf1cf: OUTPUT: «Type check failed in binding; expected Positional but got Seq (?)?  in block <unit> at <tmp> line 1??»
13:32 andrzejku joined #perl6
13:32 araraloren_ m: say Seq ~~ Positional
13:32 camelia rakudo-moar abf1cf: OUTPUT: «False?»
13:33 Zoffix Filed as https://rt.perl.org/Ticket/Display.html?id=131845
13:35 xinming joined #perl6
13:36 BenGoldberg joined #perl6
13:40 Cabanossi joined #perl6
13:42 bioexpress joined #perl6
13:43 xinming_ joined #perl6
13:46 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?
13:47 rightfold bioexpress: if it's Cool
13:47 bioexpress rightfold: what does that mean?
13:48 weabot joined #perl6
13:50 bioexpress It's a base class
13:52 ufobat joined #perl6
13:52 BenGoldberg m: say 1 ~~ Cool;
13:52 camelia rakudo-moar abf1cf: OUTPUT: «True?»
13:52 BenGoldberg m: say pi ~~ Cool;
13:52 camelia rakudo-moar abf1cf: OUTPUT: «True?»
13:52 BenGoldberg m: say 'abc' ~~ Cool;
13:52 camelia rakudo-moar abf1cf: OUTPUT: «True?»
13:52 BenGoldberg m: say [] ~~ Cool;
13:52 camelia rakudo-moar abf1cf: OUTPUT: «True?»
13:52 BenGoldberg m: say {} ~~ Cool;
13:52 camelia rakudo-moar abf1cf: OUTPUT: «True?»
13:53 BenGoldberg m: say sub {} ~~ Cool;
13:53 camelia rakudo-moar abf1cf: OUTPUT: «False?»
13:53 bioexpress evalbot usage: 'p6: my @a=[1,[1..4],'hello']; my $s = subst( /l/, "K", :g); say $s.WHAT'
13:53 bioexpress p6: my @a=[1,[1..4],'hello']; my $s = subst( /l/, "K", :g); say $s.WHAT;
13:53 camelia rakudo-moar abf1cf: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Undeclared routine:?    subst used at line 1. Did you mean 'substr'???»
13:53 bioexpress 'p6: my @a=[1,[1..4],'hello']; my $s = subst( /l/, "K", :g); say $s.WHAT;'
13:53 BenGoldberg subst is a method.
13:54 skids joined #perl6
13:54 bioexpress 'p6: my @a=[1,[1..4],'hello']; my $s = @a.subst( /l/, "K", :g); say $s.WHAT;'
13:54 bioexpress 'p6: my @a=(1,[1..4],'hello'); my $s = @a.subst( /l/, "K", :g); say $s.WHAT;'
13:54 BenGoldberg m: my @a = [ 1, [1..4], 'hello' ]; say @a.subst: /l/, "K", :g;
13:54 camelia rakudo-moar abf1cf: OUTPUT: «1 1 2 3 4 heKKo?»
13:55 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;
13:55 camelia rakudo-moar abf1cf: OUTPUT: «K K 2 3 4 hello?»
13:55 camelia rakudo-moar abf1cf: OUTPUT: «(Str)?»
13:55 bioexpress Is this allowed?
13:55 BenGoldberg ?
13:55 BenGoldberg What do you mean?
13:56 bioexpress Can I rely on this stringification?
13:56 BenGoldberg Yes.
13:56 bioexpress Thx!
13:56 BenGoldberg It's part of the specification, not a mere implementation detail.
13:56 moritz arrays always stringify by joining with a single blank
13:57 bioexpress m: my @a=(1,[1..4],'hello'); my $s = @a.subst( /Q/, "K", :g); say $s.WHAT;
13:57 camelia rakudo-moar abf1cf: OUTPUT: «(Str)?»
13:59 bioexpress m: my @a=(1,[1..4],'hello'); @a.=subst( /Q/, "K", :g); say @a.WHAT;
13:59 camelia rakudo-moar abf1cf: OUTPUT: «(Array)?»
14:00 bioexpress m: my @a=(1,[1..4],'hello'); @a.=subst( /Q/, "K", :g); say @a.perl;
14:00 camelia rakudo-moar abf1cf: OUTPUT: «["1 1 2 3 4 hello"]?»
14:01 araraloren_ m: say 'x,x' ~~ /[ <[x]>*\,? ]+/
14:02 araraloren_ moritz, Is ^^ code has a bug on regex ?
14:02 camelia rakudo-moar abf1cf: OUTPUT: «(timeout)»
14:02 araraloren_ m: say '' ~~ /[ <[x]>*\,? ]+/
14:02 araraloren_ even null string hang on
14:03 camelia rakudo-moar abf1cf: OUTPUT: «(timeout)»
14:03 timotimo no
14:04 moritz araraloren_: did you mean x*%\, or so?
14:04 timotimo you're matching a single zero-width string infinitely often
14:04 moritz don't quantify regexes that can match a zero-width string
14:05 bioexpress moritz: who in the code above did the joining of the array with a single blank?
14:06 timotimo it's getting Str called on it
14:06 timotimo by Cool's subst method
14:06 araraloren_ moritz, No, I just found that hang on
14:06 timotimo m: .perl.say for Cool.^find_method("subst")
14:06 camelia rakudo-moar abf1cf: OUTPUT: «method subst (Cool $: |c is raw) { #`(Method|27087000) ... }?»
14:07 timotimo s: Cool, "subst"
14:07 SourceBaby timotimo, Sauce is at https://github.com/rakudo/rakudo/blob/abf1cfe/src/core/Cool.pm#L172
14:07 timotimo okay it calls Stringy on itself
14:08 bioexpress Thx!
14:22 AlexDaniel joined #perl6
14:24 pilne joined #perl6
14:46 majensen joined #perl6
14:46 nadim joined #perl6
14:49 majensen left #perl6
14:56 itaipu joined #perl6
15:20 nhywyll joined #perl6
15:26 wamba joined #perl6
15:48 andreoss joined #perl6
15:53 http_GK1wmSU joined #perl6
15:54 araraloren m: use NativeCall; sub rand_r(uint32 is rw) of int32 is native(Str) { * }; say &rand_r;
15:54 camelia rakudo-moar abf1cf: OUTPUT: «sub rand_r (uint32 $ is rw --> int32) { #`(Sub+{Callable[int32]}+{NativeCall::Native[Sub+{Callable[int32]},Str]}|108130800) ... }?»
15:55 http_GK1wmSU left #perl6
16:02 ufobat :)
16:02 yoleaux 2 Aug 2017 22:56Z <Zoffix> ufobat: some tips for your resources issue: https://irclog.perlgeek.de/perl6/2017-08-02#i_14960004
16:02 yoleaux 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 https://rt.perl.org/Ticket/Display.html?id=131842
16:03 ufobat Zoffix, yeah. i wasn't sure if i wasn't doing something wrong
16:10 Cabanossi joined #perl6
16:16 geekosaur joined #perl6
16:18 zakharyas joined #perl6
16:19 ufobat i noticed some ppl complained about installation issues with bailador. i think it is fixed now: http://blogs.perl.org/users/martin_barth/2017/08/bailador-tests-and-docker.html
16:20 cdg joined #perl6
16:21 MasterDuke ufobat: cool. fyi, "espacially"
16:23 ufobat fixed, thank you
16:34 Geth ¦ whateverable: be9c01a870 | (Aleks-Daniel Jakimenko-Aleksejev)++ | t/bisectable.t
16:34 Geth ¦ whateverable: Everyone loves performance improvements! ?2
16:34 Geth ¦ whateverable:
16:34 Geth ¦ whateverable: See also f2d1d8c13e673da1080216873a70467062f8668f.
16:34 Geth ¦ whateverable:
16:34 Geth ¦ whateverable: You may think that tests with unbounded queries are taking more time
16:34 Geth ¦ whateverable: because we simply have more commits now, but this does not matter
16:34 Geth ¦ whateverable: given the logarithmic nature of the process. Also, even if we have one
16:34 Geth ¦ whateverable: <…commit message has 13 more lines…>
16:34 Geth ¦ whateverable: review: https://github.com/perl6/whateverable/commit/be9c01a870
16:34 BenGoldberg joined #perl6
16:40 Cabanossi joined #perl6
16:48 nadim is there a way to write @very_long_var = @very_long_var.map {...} shorter? kinda @very_long_var .map= {...}
16:49 MasterDuke @very_long_var .= map() should work, right?
16:49 nadim I try
16:50 nadim nope
16:51 andreoss m: my @a = 1,2,3; @a.=map(* + 1).say
16:51 camelia rakudo-moar abf1cf: OUTPUT: «[2 3 4]?»
16:51 nadim Sorry, yes, did it wrong
16:52 nadim left the dot on the wrong side
16:52 raschipi joined #perl6
16:54 Ven joined #perl6
16:55 araraloren m: my @a = 1, 2, 3; @a .= map(* + 2); say @a;
16:55 camelia rakudo-moar abf1cf: OUTPUT: «[3 4 5]?»
17:07 pharv joined #perl6
17:11 benchable6 joined #perl6
17:11 committable6 joined #perl6
17:11 statisfiable6 joined #perl6
17:26 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:34 ChoHag joined #perl6
17:38 cdg_ joined #perl6
17:38 cdg_ joined #perl6
17:40 Cabanossi joined #perl6
18:04 nadim joined #perl6
18:44 haha joined #perl6
18:44 anser joined #perl6
18:55 Cabanossi joined #perl6
18:57 szabgab joined #perl6
18:57 snarkyboojum joined #perl6
19:04 Ven joined #perl6
19:15 wamba joined #perl6
19:28 moritz awwaiid: use nativecall?
19:36 timotimo awwaiid: stdin and stdout shouldn'- be nonblocking any more with recent rakudo
19:40 Cabanossi joined #perl6
19:40 timotimo awwaiid: at least strace -e fcntl only shows a getfd EBADF, setfd, cloexec, and getfl for rdonly|largefile
19:48 hythm_ joined #perl6
19:51 TEttinger joined #perl6
19:53 awwaiid timotimo: naw, this is an external program that invokes mine and sets it nonblocking on the other end
19:53 awwaiid moritz: yeah, that appears to be the current answer. I see that in the most-wanted-modules list too
19:54 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!
19:55 timotimo yeah, i'd say use nativecall to get at fcntl
19:55 timotimo or open another instance of stdin from /dev/stdin or /dev/tty or whatever
19:55 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 :)
19:56 timotimo right
19:56 timotimo glad to hear you're using perl6 in a contest setting :)
19:56 awwaiid contest isn't over, ya'll can join :)
19:56 awwaiid https://icfpcontest2017.github.io/
19:56 awwaiid This contest is _specifically_ to show off programming languages
19:58 timotimo well, yeah :)
20:08 haha joined #perl6
20:13 cdg joined #perl6
20:14 haha_ joined #perl6
20:15 Geth_ ¦ perl6-examples: 09121546d1 | (David Warring)++ | 3 files
20:15 Geth_ ¦ perl6-examples: GLRish fixes for 99-problems
20:15 Geth_ ¦ perl6-examples: review: https://github.com/perl6/perl6-examples/commit/09121546d1
20:15 Geth_ ¦ perl6-examples: ffb8930ed4 | (David Warring)++ | 3 files
20:15 Geth_ ¦ perl6-examples: IOish fixes for cookbook
20:15 Geth_ ¦ perl6-examples: review: https://github.com/perl6/perl6-examples/commit/ffb8930ed4
20:16 rindolf joined #perl6
20:28 Ven joined #perl6
20:35 dogbert11 joined #perl6
20:40 BenGoldberg joined #perl6
20:42 hythm_ joined #perl6
20:42 BenGoldberg left #perl6
20:43 BenGoldberg joined #perl6
20:46 Geth_ ¦ perl6-examples: 1e781e2161 | (David Warring)++ | t/categories/tutorial.t
20:46 Geth_ ¦ perl6-examples: fix tutorial word-wrap test
20:46 Geth_ ¦ perl6-examples: review: https://github.com/perl6/perl6-examples/commit/1e781e2161
20:51 colomon joined #perl6
21:00 colomon joined #perl6
21:07 channing1 joined #perl6
21:29 wamba joined #perl6
21:33 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 domm ..I do NOT recommend..
21:34 domm in fact, calling any methods/functions from inside a template can only lead to tears
21:37 semigloss joined #perl6
21:39 Geth_ ¦ perl6-examples: 530542e6c7 | (David Warring)++ | .travis.yml
21:39 Geth_ ¦ perl6-examples: add travis test job for Rakudo 2017.07
21:39 Geth_ ¦ perl6-examples: review: https://github.com/perl6/perl6-examples/commit/530542e6c7
21:45 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:48 d33pb00k-GK1wmSU joined #perl6
21:51 d33pb00k-GK1wmSU left #perl6
21:53 domm I prefer to prepare all data needed for a view in a model, and then pass that on for rendering
21:54 domm 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...
22:02 eater[sha2017] joined #perl6
22:04 eater[sha2017] You guys may enjoy this: https://github.com/the-eater/shinit :)
22:05 eater[sha2017] an init system in perl6 :')
22:11 MasterDuke eater[sha2017]: heh. you should .tell lizmat about it, might make it into the perl 6 weekly
22:18 tushar joined #perl6
22:27 nadim I agree.'
22:40 Cabanossi joined #perl6
22:52 eater[sha2017] hmm
22:52 eater[sha2017] https://zt.je/4n1V0.png
22:52 eater[sha2017] how does this happen
22:52 eater[sha2017] hmm, only happens on ro filesystem
22:53 zengargoyle moritz++ -- don't quantify regexes that can match a zero-width string -- DIHWIDT
22:59 * zengargoyle surprised that is in spec glossary but not docs.perl6.org glossary... conscious choice?
23:10 Cabanossi joined #perl6
23:10 eater[sha2017] .tell lizmat You may like this: https://github.com/the-eater/shinit
23:10 yoleaux eater[sha2017]: I'll pass your message to lizmat.
23:10 eater[sha2017] :)
23:13 * zengargoyle lol at me, spent a minute wondering why the *** some glossary entries had a '§' marker and some didn't.  grrr .hover links. :)
23:47 tbrowder hi, #perl6
23:50 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:53 tbrowder reading a file is more "natural" to me, but i'm open to using best practices.
23:54 Geth ¦ doc: 5b9f4c5dde | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/modules-core.pod6
23:54 Geth ¦ doc: s/Perl/Rakudo impl/;
23:54 Geth ¦ doc:
23:54 Geth ¦ doc: Most of these modules aren't standard Perl 6.
23:54 Geth ¦ doc: (also, didn't we want to call them "standard" rather than "core"?)
23:54 Geth ¦ doc: review: https://github.com/perl6/doc/commit/5b9f4c5dde

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

Perl 6 | Reference Documentation | Rakudo