Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-05-01

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 bjz joined #perl6
00:00 haxmeister learned simple subs, file IO and some methods, regex implementation... I'm liking it so far
00:01 AlexDaniel haxmeister: does not look bad at all
00:01 haxmeister it works.. I'm gonna add some stuff to it
00:02 haxmeister I need it to not look in certain directories there.. will need to figure out the method for figuring out the folder name
00:03 Geth joined #perl6
00:03 haxmeister does .basename return the folder if it's not a file?
00:04 nadim joined #perl6
00:05 nadim Hi, just got the latest rakudo, I was 571 commits back,
00:05 nadim I have ::("Terminal::ANSIColor::EXPORT::ALL::&color") fail when it worked before, what has changed
00:08 AlexDaniel nadim: maybe this? http://rakudo.org/2017/03/18/lexical-require-upgrade-info/
00:14 timotimo timo@schmand ~> perl6 -e 'require ::("Terminal::ANSIColor"); say ::("Terminal::ANSIColor::EXPORT::ALL::&color")'
00:14 timotimo sub color (Str $what) { #`(Sub|77895256) ... }
00:15 timotimo this is on my latest rakudo right now
00:16 nadim that also works for me, and the version I have is 2 hours old
00:16 timotimo hm, so we'll need to look at a bit more context for the case where it doesn't work
00:17 gfldex haxmeister: that's how I would write it: https://gist.github.com/gfldex/9bf8ed50c2c75e144c1d676cbef83f9c
00:18 nadim https://nopaste.linux-dev.org/?1123980
00:18 timotimo haxmeister: doing regex matches for a very simple thing like "ends in .log" is a whole lot of unnecessary overhead; try something like $thepath ~~ *.ends-with(".log") instead
00:19 stmuk joined #perl6
00:19 timotimo well, yeah, that can't work
00:19 timotimo didn't i have a pull request for you a couple days ago? where did that disappear to ...
00:20 nadim I merged it manually
00:20 timotimo okay, then you missed the most important bit
00:20 nadim lol!
00:20 timotimo yes, indeed
00:20 nadim the if (try require ::Terminal::ANSIColor) !=== Nil { $is_ansi = True } is certainly your
00:21 timotimo when you require ::Terminal::ANSIColor like that in method new, it'll only be visible inside the new method
00:21 timotimo that's why i stashed away the &color sub in an attribute
00:21 timotimo if you apply that part of my patch again, things should work again
00:22 timotimo i think i'll go to bed now
00:22 timotimo have a good one!
00:22 nadim I found what I did here: * 7ba0dd8 FIXED: lexical require, patch by timo  (3 weeks ago, Nadim Khemir) but since it was by hand I probably missed a bit as you said
00:22 timotimo yeah, i looked at that
00:23 nadim I guess I will find it in your repo od Data::Dump::Tree
00:23 timotimo by moving the self.bless at the end my patch also enables us to turn &.ansicolor into &!ansicolor so it's no longer visible to the outside. that'll require a submethod TWEAK(:&!ansicolor) { } though
00:23 timotimo https://github.com/nkh/P6-Data-Dump-Tree/commit/81f3bfe986d2af937dbf91963cb9759a016089cc
00:23 timotimo that was my patch
00:24 timotimo why it's inside nkh/P6-Data-Dump-Tree instead of my own fork of it i'm not sure
00:24 nadim thanks and good night :)
00:24 timotimo you're welcome :)
00:27 Cabanossi joined #perl6
00:30 gfldex brrt++ # http://brrt-to-the-future.blogspot.de/2017/04/letting-templates-do-what-you-mean.html
00:36 k-man joined #perl6
00:46 dj_goku joined #perl6
00:51 ponbiki joined #perl6
00:53 Praise joined #perl6
00:53 Praise joined #perl6
00:55 astj joined #perl6
00:57 Praise joined #perl6
00:57 Praise joined #perl6
00:58 Zoffix joined #perl6
01:04 Zoffix haxmeister: your script has a bug. You're not exhausing output of `dir` call before recursing into other dirs, so it'll crash when you recurse over enough dirs to reach maximum per-process open files. gfldex's version has it as well, except it hides the bug behind the `try`
01:05 Zoffix haxmeister: the docs have an example of recursive search without that bug. Note how it's pushing all the dirs to look at into an array instead; this lets it open and close each dir 1 at a atime: https://docs.perl6.org/routine/dir
01:06 Zoffix haxmeister: better yet, just use File::Find module. It can take a regex for the filename to look for: https://github.com/tadzik/File-Find
01:07 haxmeister tyvm Zoffix .. hopefully the page doesn't have features I haven't learned yet
01:07 Voldenet joined #perl6
01:07 Voldenet joined #perl6
01:07 samcv in grammars, is there a method that gets hit at the very end of parsing?
01:07 samcv and only hit once
01:08 Zoffix left #perl6
01:09 samcv action classes i mean
01:10 AlexDaniel samcv: what about using method TOP? :)
01:11 samcv it gets hit many times
01:12 * AlexDaniel wonders under what conditions this could happen
01:12 samcv i thkn
01:12 samcv err
01:12 samcv maybe. hm
01:13 stmuk_ joined #perl6
01:13 Geth ¦ doc: c991862cf9 | (Zoffix Znet)++ | doc/Type/IO/Path.pod6
01:13 Geth ¦ doc: [io grant] Add warning to dir about...
01:13 Geth ¦ doc:
01:13 Geth ¦ doc: ...exhausting open files limit due to not exhausing the
01:13 Geth ¦ doc: iterator of the Seq the routine returns.
01:13 Geth ¦ doc: review: https://github.com/perl6/doc/commit/c991862cf9
01:14 haxmeister ugh
01:16 haxmeister so I should push what I get from dir() into an array and iterate the array because dir() holds the directory open wating for the recursive call?
01:17 haxmeister and gfldex I have no idea what .&?ROUTINE is yet..lol
01:19 gfldex haxmeister: &?ROUTINE referes to the current sub (or method)
01:20 gfldex haxmeister: and .& means $_.&(some-sub-or-method-here)
01:20 haxmeister that's hard to remember
01:20 idyll joined #perl6
01:22 haxmeister but I have difficulty with understanding when we are not addressing $_ explicitly.. took me a minute looking at yours to get it
01:24 AlexDaniel haxmeister: wait, what's hard to remember?
01:24 haxmeister gfldex: could you have put parenthesis in your logic ... (.f) && (.basename ~~ $build-log-regex) ?
01:25 haxmeister AlexDaniel: .&?ROUTINE
01:25 AlexDaniel haxmeister: well, $_. can always be shortened to .
01:26 AlexDaniel but to be honest it's the first time I see &?ROUTINE :D
01:26 haxmeister AlexDaniel: maybe I should just make an explicit call for now.. lol
01:26 Cabanossi joined #perl6
01:27 haxmeister when I'm a perl6 badass.. then I'll do .&?ROUTINE ..lol
01:27 AlexDaniel haxmeister: sure, why not. You'll quickly get tired of it anyway :P
01:27 gfldex for advanced players, there is &?BLOCK
01:27 haxmeister AlexDaniel: yeah but by that time I won't be trying to remember all kinds of other new stuff in my head
01:28 gfldex see https://docs.perl6.org/language/variables#index-entry-%26%3FBLOCK
01:28 AlexDaniel gfldex: interestingly, &?ROUTINE is broken
01:28 AlexDaniel gfldex: oops, in the docs I mean
01:28 AlexDaniel it points here https://docs.perl6.org/syntax/&?ROUTINE but it is 404
01:28 AlexDaniel it should probably point here https://docs.perl6.org/language/variables#&?ROUTINE
01:29 samcv AlexDaniel, nope top is being called twice
01:29 samcv i wasn't crazy
01:30 AlexDaniel samcv: alright. Why?
01:30 AlexDaniel samcv: I mean, that would mean that TOP actually matched twice
01:30 samcv the cations class
01:30 samcv actions class
01:30 samcv i don't mean the grammar
01:30 AlexDaniel yes?
01:31 samcv it gets hit three times
01:31 samcv and it's messing things up
01:31 samcv i need something that's only called once at the end not 3 times
01:32 samcv https://gist.github.com/c9ffe206206648e7e90327ffae69a37b
01:32 samcv three times :(
01:32 AlexDaniel well, do you match TOP recursively?
01:33 AlexDaniel hm… probably not…
01:33 samcv how would i do that
01:34 AlexDaniel like rule TOP { <TOP> }
01:34 samcv nope
01:35 AlexDaniel code?
01:39 samcv ok it's not doing it i forget what i changed. trying something else here
01:39 samcv not sure what was going on. but. will get back to you
01:40 dj_goku joined #perl6
01:40 dj_goku joined #perl6
01:48 ilbot3 joined #perl6
01:48 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
01:52 samcv oh ok changing TOP from regex to a token makes it only run once
01:52 samcv but also breaks the world
01:57 Geth Swapped META.info → META6.json in 1 dists in https://github.com/perl6/ecosystem/commit/ce13941798
01:57 samcv i'm trying to get this code to only run once https://github.com/samcv/SPDX-Parser/blob/test/lib/SPDX/Parser.pm6#L78-L84
01:58 samcv and only at the end of it. if there aren't any $<compound-expression> matches found in the grammar
01:58 samcv then i need to make sure to push the <simple-expression> matches since they won't be pushed inside the complex expression ones
02:32 adu joined #perl6
02:47 poohman joined #perl6
03:16 eater joined #perl6
03:26 Cabanossi joined #perl6
03:37 pierre_ joined #perl6
03:38 labster joined #perl6
03:40 adu joined #perl6
03:59 aborazmeh joined #perl6
03:59 aborazmeh joined #perl6
04:01 wigner joined #perl6
04:03 adu joined #perl6
04:13 CIAvash joined #perl6
04:26 Cabanossi joined #perl6
04:45 poohman joined #perl6
04:45 poohman_ joined #perl6
05:11 Cabanossi joined #perl6
05:19 moritz \o
05:39 sammers hi moritz
05:41 Cabanossi joined #perl6
05:43 Actualeyes joined #perl6
05:48 sena_kun joined #perl6
05:56 samcv \o
05:57 sena_kun o/
05:58 samcv anybody can help me?
05:58 samcv TOP is called multiple times in the action class for my grammar and i need a method called on the
05:58 sena_kun samcv, don't ask to ask. :) It depends on your problem.
05:58 samcv only once and at the end
06:00 sena_kun hmmm. it is too complex to phasers as it seems.
06:00 sena_kun FIRST and LAST works only on loops, afaik.
06:01 sena_kun you can recognize first method call with inner state variable, but I am not sure you can guess where the last call would be.
06:05 sena_kun if you don't want to explicity call it from TOP, perhaps there are some magical grammar methods that can be overloaded.
06:09 samcv hm
06:09 samcv yeah
06:09 samcv i need a like DONE method or something
06:09 samcv to be called at the very end of the action parse
06:11 sena_kun as an ugly alternative, cannot you wrap(change?) your result up(if you want to do it) outside of `parse`? I mean, after `parse` you get a tree and you can customize it by hands in the worst case.
06:12 moritz samcv: you can do something like   regex TOP { your regex goes here <.finish_marker> }
06:12 samcv ooo
06:12 moritz samcv: token finish_marker { <?> }
06:12 samcv and have it be zero width?
06:12 samcv nice
06:12 samcv thank you moritz :)
06:13 moritz method TOP { return unless $<finish_marker> }
06:13 moritz or if TOP is supposed to match the whole string, you can do   return unless $/.to == $/.orig.chars;
06:16 samcv also how to call the autogenerated USAGE sub
06:16 samcv yourself i mean
06:16 samcv USAGE() isn't working
06:21 moritz m: sub MAIN() { say $?USAGE }
06:21 camelia rakudo-moar 76af53: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Variable '$?USAGE' is not declared␤at <tmp>:1␤------> 3sub MAIN() { say 7⏏5$?USAGE }␤»
06:21 moritz :(
06:22 moritz m: sub MAIN() { &::('USAGE')() }
06:22 camelia rakudo-moar 76af53: OUTPUT: «No such symbol ''␤  in sub MAIN at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in sub MAIN at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
06:22 samcv hm
06:23 moritz looking at src/core/Main.pm, it looks like USAGE is pretty well encapsulated
06:23 samcv :(
06:23 moritz and the specced ways to access it aren't implemented
06:23 samcv suprised there's not a USAGE you can call
06:23 samcv that's what i assumed. and that you would override it if you defined it yourself
06:48 samcv moritz, the finish_marker gets called first
06:50 wamba joined #perl6
06:51 parv joined #perl6
06:56 Cabanossi joined #perl6
06:57 pierre_ joined #perl6
07:04 espadrine joined #perl6
07:09 gdonald joined #perl6
07:37 wamba joined #perl6
07:39 Actualeyes joined #perl6
08:00 Geth ¦ Inline-Perl5: f1594f9fb6 | (Stefan Seifert)++ | META6.json
08:00 Geth ¦ Inline-Perl5: Fix installed Inline::Perl5 not finding all the sub-modules
08:00 Geth ¦ Inline-Perl5:
08:00 Geth ¦ Inline-Perl5: Add missing keys in "provides" in META.json
08:00 Geth ¦ Inline-Perl5: review: https://github.com/niner/Inline-Perl5/commit/f1594f9fb6
08:13 samcv making major progress now on SPDX parser
08:14 samcv not bug free. but over a lot of the issues
08:15 samcv weird error though
08:15 samcv ===SORRY!===
08:15 samcv Cannot find method 'has_compile_time_value' on object of type NQPMu
08:19 rindolf joined #perl6
08:38 ufobat joined #perl6
08:45 rogbro joined #perl6
08:47 rogbro joined #perl6
08:47 Ven joined #perl6
08:51 rindolf joined #perl6
08:57 jjones-jr joined #perl6
09:01 rogbro left #perl6
09:02 rogbro joined #perl6
09:05 nadim_ joined #perl6
09:11 Cabanossi joined #perl6
09:19 pmurias joined #perl6
09:20 pmurias do we want nqp::sprintf("%d", ["not a number"]) to work?
09:20 rogbro joined #perl6
09:22 Ven joined #perl6
09:26 Ven_ joined #perl6
09:26 pierre_ joined #perl6
09:28 samcv hmm pmurias not sure but if a string has a number in it. hm
09:28 samcv maybe that's why it works?
09:28 samcv a bit odd though. but
09:28 samcv bbl
09:32 darutoko joined #perl6
09:33 rogbro joined #perl6
09:33 rogbro left #perl6
09:36 rogbro_ joined #perl6
09:52 rogbro joined #perl6
10:04 pierre_ joined #perl6
10:12 rogbro joined #perl6
10:13 Rawriful joined #perl6
10:19 Ven joined #perl6
10:21 eliasr joined #perl6
10:31 laouji joined #perl6
10:41 Cabanossi joined #perl6
10:45 notbenh joined #perl6
11:11 Cabanossi joined #perl6
11:15 Ven_ joined #perl6
11:26 bjz joined #perl6
11:29 laouji joined #perl6
11:31 wamba joined #perl6
11:34 Ven joined #perl6
11:40 AlexDaniel joined #perl6
12:06 pierre_ joined #perl6
12:38 laouji joined #perl6
12:40 zakharyas joined #perl6
12:42 rindolf joined #perl6
12:58 mcmillhj joined #perl6
13:06 cdg joined #perl6
13:07 zakharyas joined #perl6
13:11 Sound joined #perl6
13:11 Cabanossi joined #perl6
13:12 Sound_ joined #perl6
13:16 pierre_ joined #perl6
13:23 [Coke] $dayjob question - anyone ever have to provide proof of relationship for medical benefits? (US or not)
13:24 [Coke] (I have to dig up the marriage & birth certs for new job)
13:24 colomon I’m on my wife’s benefits, and I don’t remember providing proof
13:25 colomon only changed a couple of years ago
13:25 Voldenet [Coke]: Well, you have to provide it now, so yes, but I don't remember providing anything like that in Poland
13:26 Voldenet perl6-related question: what's the best way to say "the argument $x needs to have method y" in a signature?
13:27 timotimo m: say Str.^can("uc")
13:27 camelia rakudo-moar 451a23: OUTPUT: «(uc uc)␤»
13:27 timotimo m: say Str.^can("not_this_though")
13:27 camelia rakudo-moar 451a23: OUTPUT: «()␤»
13:27 timotimo so you could 'where *.^can("methodname")'
13:28 DrForr That's no guarantee though that the method is going to do what you expect when you call it, though. Maybe you're after a class instead?
13:31 Voldenet m: sub do-stuff($x where { $x.^can("u"); }) { say $x.u; }; do-stuff(class { method u {} }.new())
13:31 camelia rakudo-moar eb1ce4: OUTPUT: «Nil␤»
13:31 Voldenet m: sub do-stuff($x where { $x.^can("u"); }) { say $x.u; }; do-stuff(class { }.new())
13:31 camelia rakudo-moar eb1ce4: OUTPUT: «Constraint type check failed in binding to parameter '$x'; expected anonymous constraint to be met but got <anon|51954672> (<anon|51954672>.new)␤  in sub do-stuff at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
13:31 Voldenet Perfect.
13:31 DrForr class MyStr is Str { method do-stuff { } }; my $x = MyStr.new; sub foo( MyStr $x ) { }
13:32 Voldenet but then your object must be of type MyStr
13:32 Voldenet Basically, though I want to pass an implementation to the given protocol (java style anonymous class)
13:32 DrForr True, but you also know that the do-stuff() method accepts the arguments you want because you created it that way. And it's also still a Str.
13:32 Voldenet is there any better way to do what I want?
13:33 DrForr If you can accept it being that generic, then I'd go for it. Otherwise I'd probably have to see the code and scratch my head for a bit.
13:34 [Coke] use a role, but also allow specific core classes that you know do what you want?
13:35 DrForr I would've suggested a role as well but I wasn't sure if those would play well with whatever hierarchy that he's established.
13:36 DrForr I do something similar in Perl6::Parser, a combination of roles to restrict the things classes can do, and a simple, nearly empty class hierarchy that people can do ~~ conparisons on.
13:37 Voldenet m: role Anon { method u { ... } }; sub do-stuff(Anon $x) { $x.u; }; do-stuff(class X does Anon { method u {} }.new())
13:37 camelia rakudo-moar eb1ce4: ( no output )
13:37 Voldenet m: role Anon { method u { ... } }; sub do-stuff(Anon $x) { $x.u; }; do-stuff(class X does Anon { }.new())
13:37 camelia rakudo-moar eb1ce4: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Method 'u' must be implemented by X because it is required by roles: Anon.␤at <tmp>:1␤»
13:38 Voldenet Yeah, the error message is a lot better.
13:38 Voldenet + it's compile-time
13:39 DrForr You can also declare method foo {!!!} to state that the method must exist in child classes.
13:40 Voldenet I wish I could get rid of class name inside of "do-stuff(class X does Anon { }.new)" though, hm
13:40 skids joined #perl6
13:41 drrho_ joined #perl6
13:42 Voldenet m: role Anon { method u { !!! } }; sub do-stuff(Anon $x) { $x.u; }; do-stuff(class { also does Anon; method u {} }.new)
13:42 camelia rakudo-moar eb1ce4: ( no output )
13:43 timotimo but then your objects have to cooperate
13:44 laouji joined #perl6
13:44 MasterDuke_ m: role Anon { method u { ... } }; sub do-stuff(Anon $x) { $x.u; }; do-stuff(class :: does Anon { }.new())
13:44 camelia rakudo-moar eb1ce4: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Method 'u' must be implemented by <anon|54615424> because it is required by roles: Anon.␤at <tmp>:1␤»
13:45 Voldenet that looks... better :)
13:47 poohman joined #perl6
13:55 haxmeister can't figure out why I get an error on my while loop.. https://pastebin.com/G8gX8uDX
13:56 haxmeister says missing block while ⏏@listing {
13:56 Cabanossi joined #perl6
13:58 AlexDaniel haxmeister: did you mean for ?
13:59 AlexDaniel ah no, probably not
13:59 haxmeister was trying to change to push and pop.. the example uses while
13:59 haxmeister don't want to use the example.. want to understand the example
13:59 AlexDaniel e: https://pastebin.com/raw/G8gX8uDX
13:59 evalable6 AlexDaniel, Successfully fetched the code from the provided URL.
13:59 evalable6 AlexDaniel, rakudo-moar eb1ce4142: OUTPUT: «(exit code 1) ===SORRY!=== Error while compiling /tmp/GGd2uf91Kv␤Missing block␤at /tmp/GGd2uf91Kv:17␤------> ␉while ⏏@listing {»
13:59 cdg joined #perl6
13:59 AlexDaniel c: HEAD https://pastebin.com/raw/G8gX8uDX
14:00 committable6 AlexDaniel, Successfully fetched the code from the provided URL.
14:00 committable6 AlexDaniel, ¦HEAD(eb1ce41): «===SORRY!=== Error while compiling /tmp/3MrG7lPnwC␤Missing block␤at /tmp/3MrG7lPnwC:17␤------> ␉while ⏏@listing { «exit code = 1»»
14:01 AlexDaniel haxmeister: probably needs a space after dir($start-dir)
14:04 haxmeister that was it
14:04 haxmeister dug out a few other errors.. but now the proggy runs with no response
14:04 AlexDaniel \o/
14:04 haxmeister the error messages are tricky sometimes..lol
14:05 AlexDaniel haxmeister: mostly, we consider less than awesome error messages as bugs, so feel free to submit tickets
14:07 haxmeister ah man.. I dunno I'm pretty noobish, that might get irritating sorting through my tickets to find the ones that are not just my ignorance
14:10 AlexDaniel haxmeister: I doubt that would be a problem
14:10 AlexDaniel and you can always ask here beforehand ;)
14:10 AlexDaniel you'll have to golf it down to 1-2 lines of code though
14:11 haxmeister where is the bug reporting page at?
14:17 MasterDuke_ huggable: rakudobug
14:17 huggable MasterDuke_, Report bugs by emailing to rakudobug@perl.org
14:17 MasterDuke_ haxmeister: ^^^
14:18 haxmeister kk
14:18 haxmeister ty
14:20 haxmeister now I have no errors but my code seems to loop infinitely without producing anything..lol
14:20 haxmeister https://pastebin.com/UU2nf1Di
14:25 MasterDuke_ this isn't the problem, but you could simplify `my @listing; for dir($start-dir) {@listing.push($_);}` to just `my @listing = dir($start-dir)`
14:27 haxmeister yes MasterDuke_ that is how I had it before.. I changed it to long hand while trying to root out an error I had.. thank you for the advice
14:29 haxmeister I just am not seeing how this isn't working.. I feel so noobish lol, I would have nailed it the first time in lisp ;-P
14:29 TimToady joined #perl6
14:31 MasterDuke_ you're popping@listing, but if $item is a directory that doesn't match the regex, you're putting it right back in @listing
14:31 Geth ¦ ecosystem: bfec6ee8e3 | (Stefan Seifert)++ | META.list
14:31 Geth ¦ ecosystem: Switch to versioned releases on CPAN for Inline::Perl5
14:31 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/bfec6ee8e3
14:33 MasterDuke_ haxmeister: i.e., it's just testing the same directory over and over again
14:33 pmurias Voldenet: re java style anonymous class, you are aware that Perl 6 has closures?
14:35 haxmeister MasterDuke_: having to stare at it a minute.. I'm not seeing it yet
14:36 pmurias Voldenet: so that you can do something like $foo.foo(-> {"do some stuff here"})
14:36 haxmeister MasterDuke_: if it's a directory who's basename is not "work".. push it back on the stack.. that's what I'm intending
14:38 haxmeister I've never used a while loop on a stack that while block is changing.. that's different to me
14:38 MasterDuke_ m: my @a = <a b c>; while @a { my $i = @a.pop; say $i; if $i ne "c" { @a.push($i) }; }
14:38 camelia rakudo-moar eb8d00: OUTPUT: «(timeout)c␤b␤b␤b␤b␤b␤b␤b␤b␤b␤b␤b␤b␤b␤b␤b␤b␤b␤b␤b␤b␤b␤b␤b␤b␤b␤b␤b␤b␤b␤b␤b␤b␤b␤b␤b␤b␤b␤b␤b␤b␤b␤b␤b␤b␤b␤b␤b␤b␤b␤b␤b␤b␤b␤b␤b␤b␤b␤b␤b␤b␤b…»
14:39 haxmeister lol
14:39 ChoHag joined #perl6
14:39 MasterDuke_ that's what's happening
14:41 ggoebel joined #perl6
14:41 Voldenet pmurias: but the interface looking like that: (&fn1, &fn2, &fn3) isn't very descriptive when you're reading code
14:41 Voldenet erm, sub (&fn1, &fn2, &fn3)
14:44 alimon joined #perl6
14:45 Geth ¦ Inline-Perl5/release-0.26: aa06e66e93 | (Stefan Seifert)++ | META6.json
14:45 Geth ¦ Inline-Perl5/release-0.26: Point to the source tar ball in META6.json
14:45 Geth ¦ Inline-Perl5/release-0.26: review: https://github.com/niner/Inline-Perl5/commit/aa06e66e93
14:49 pmurias Voldenet: you can pass named arguments
14:50 Geth ¦ ecosystem: eeac110f08 | (Stefan Seifert)++ | META.list
14:50 Geth ¦ ecosystem: Fix Inline::Perl5 versioned releases
14:50 Geth ¦ ecosystem:
14:50 Geth ¦ ecosystem: Thanks to ugexe++ for explaining, how this is supposed to work.
14:50 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/eeac110f08
14:51 Voldenet pmurias: ah, right, hm, I might reconsider
14:52 pmurias there is nothing wrong with requiring a role and passing an class instance that's implement it btw
14:53 pmurias but from my limited java experience they use anonymous class with a method or two mostly to make up for the lack of closures
15:10 st_elmo joined #perl6
15:11 Voldenet pmurias: yes, however more modern java has the option to "autoimplement" the anonymous inner class with a lambda, which pretty much does the same
15:11 Cabanossi joined #perl6
15:11 Voldenet except the consumer can think of interfaces, still
15:17 domidumont joined #perl6
15:31 nhywyll joined #perl6
15:32 mr-foobar joined #perl6
15:35 stmuk_ http://rakudo.org/2017/05/01/announce-rakudo-star-release-2017-04/
15:42 khw joined #perl6
15:43 laouji joined #perl6
15:46 Geth ¦ perl6.org: 8580a455a8 | (Steve Mynott)++ | source/downloads/index.html
15:46 Geth ¦ perl6.org: R* 2017.04
15:46 Geth ¦ perl6.org: review: https://github.com/perl6/perl6.org/commit/8580a455a8
15:47 nadim_ hi all, I'd rather not optimize code like an idiot, but I also prefer to not have completely silly code. I am trying to make Data::Dump::Tree better but speed is still a problem. I have profiles it (and not got must smarter in the move) done reviews. ..  now I am asking if there is someone who would like to have a look at it. Maybe I am missing something or I am using something that I should not. Help pointing at what to do is appreciated.
15:49 haxmeister MasterDuke_: got it working.. so happy.. works plus I understand it with my limited syntax knowledge
15:49 haxmeister MasterDuke_: thanks for help
15:50 MasterDuke_ np
15:51 haxmeister MasterDuke_:this does prevent dir() from remaining open on recursion as far as I can tell https://pastebin.com/5d89hbxF
15:53 MasterDuke_ haxmeister: fyi, `for dir($listing) { @stack.push($_); }` could be `@stack.append(dir($listing))`
15:55 haxmeister append would put it on bottom right?
15:56 haxmeister more appropriate on bottom actually
15:56 haxmeister makes me wonder why the loop doesn't stop prematurely when I'm pushing on top
15:57 MasterDuke_ append is the same as push, but it essentially flattens what it's pushing
15:59 MasterDuke_ m: my @a = <a b c>; my @b = <d e f>; @a.append: @b; say @a; my @c = <a b c>; @c.push:  @bl say @c
15:59 camelia rakudo-moar 5ec8a4: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Variable '@bl' is not declared␤at <tmp>:1␤------> 3 @b; say @a; my @c = <a b c>; @c.push:  7⏏5@bl say @c␤»
16:00 haxmeister so append could prevent me from accidentally putting the whole list in a single stack item
16:00 MasterDuke_ m: my @a = <a b c>; my @b = <d e f>; @a.append: @b; say @a; my @c = <a b c>; @c.push:  @b; say @c
16:00 camelia rakudo-moar 5ec8a4: OUTPUT: «[a b c d e f]␤[a b c [d e f]]␤»
16:00 MasterDuke_ exactly
16:00 haxmeister in the case of what I have written.. I avoided the problem by chance yeah?
16:01 MasterDuke_ kind of. depends if you knew how push treats lists as arguments
16:02 MasterDuke_ if you're familiar with Perl 5, it automatically flattens much of the time. Perl 6 usually treats them as single entities, and you have to explicitly flatten them if you want that
16:02 MasterDuke_ s/flattens/flattens lists/
16:03 haxmeister I don't honestly.. but from now on when I want to be sure to extend the stack, I will use append so as not to get lost in my own logic
16:03 haxmeister perl having lists and arrays both is interesting to me, but at the same time can be confusing when it's not apparent what the functional differences might be
16:05 laouji joined #perl6
16:25 laouji joined #perl6
16:27 haxmeister at first I thought it was irritating that dir() returned IO objects.. but now I love it.. absolutely well thought out
16:30 st_elmo joined #perl6
16:33 haxmeister so this will always flatten properl? my @stack = dir($start);
16:33 Ven joined #perl6
16:33 nebuchad` joined #perl6
16:34 mcmillhj joined #perl6
16:37 ambs_ joined #perl6
16:41 laouji joined #perl6
16:42 incredible joined #perl6
16:42 ilmari joined #perl6
16:42 rodarmor joined #perl6
16:43 setty1 joined #perl6
16:44 lucs joined #perl6
16:44 mcmillhj joined #perl6
16:48 emeric joined #perl6
16:48 BuildTheRobots joined #perl6
16:49 TreyHarris joined #perl6
16:50 kurahaupo joined #perl6
16:50 moritz yes
16:51 eliasr joined #perl6
16:56 kybr left #perl6
16:59 zakharyas joined #perl6
17:03 kurahaupo left #perl6
17:06 kurahaupo_ joined #perl6
17:11 TEttinger joined #perl6
17:12 poohman joined #perl6
17:18 laouji joined #perl6
17:21 ChoHag joined #perl6
17:33 alimon joined #perl6
17:51 poohman joined #perl6
17:54 poohman hello was playing with win32 api native calling today and came across a function to get the machine name. It was returned in a pointer. Can I access the name using the pointer or can only use pointers to pass to other functions say as handles?
17:56 Cabanossi joined #perl6
17:57 poohman2 joined #perl6
17:59 awwaiid poohman: is it a pointer to a string? It might work like magic to say it is an Str
17:59 awwaiid poohman: link us to the function call definition
18:04 poohman2 will switch over to pc - give me a moment
18:05 poohman joined #perl6
18:07 poohman_ joined #perl6
18:07 poohman_ BOOL WINAPI GetComputerName(
18:07 poohman_ _Out_   LPTSTR  lpBuffer,
18:07 poohman_ _Inout_ LPDWORD lpnSize
18:07 poohman_ );
18:08 xfix joined #perl6
18:08 poohman_ sorry had to switch over from mobile to laptop - for example - if I want to dereference lpBuffer and get the name - how can I do it?
18:10 moritz what's LPTSTR?
18:11 poohman_ joined #perl6
18:11 poohman_ lpBuffer [out]
18:11 poohman_ A pointer to a buffer that receives the computer name or the cluster virtual server name. The buffer size should be large enough to contain MAX_COMPUTERNAME_LENGTH + 1 characters.
18:12 poohman joined #perl6
18:12 moritz so a char* ?
18:12 poohman_ ja
18:13 moritz then just declare it as "returns Str", and it should work
18:15 moritz sub GetComputerName(uint16) returns Str is encoded('utf8') is native('yourlibrary');
18:15 moritz something like that
18:16 poohman_ hmmm ok will try it tomorrow in my windows machine - but why do you expect it to dereference it considerings its an opaquepointer - because its a String??
18:17 moritz well, if it's a char*, you can just declare it as Str, no need to treat it like an opaque pointer
18:18 geekosaur isn't it utf16?
18:18 jnthn Hm, but BOOL is the return type, and LPTSTR is a pointer to a string
18:18 jnthn And a string is already a pointer
18:18 moritz oh
18:18 moritz so it's Str $out is rw?
18:18 jnthn If that works, then yes :)
18:18 jnthn And also the second parameter would be Int $foo is rw
18:18 jnthn Otherwise there's the good old CArray of length 1 trick :-)
18:19 jnthn Uh, not Int, but int32
18:19 jnthn Since it seems it takes the buffer length and then updates it with how much stuff is in the buffer after
18:19 poohman_ its LPTSTR it says in the documentation
18:19 jnthn Yeah, I think that means "long pointer to string" or some such :)
18:20 geekosaur I was thinking that means you need a preallocated Buf?
18:20 jnthn Right :-)
18:20 jnthn And then to decode it yourself
18:21 jnthn I'm rusty on Win32 API but my guess is there's a GetComputerNameW that returns wide (utf-16)
18:22 jnthn And GetComputerName would return...something but not likely utf-8 on Windows. :)
18:23 poohman_ if tis utf-8 then can get it directly as Str but not if utf-16 - have I understood that correctly?
18:24 geekosaur windows doesn't do utf8, at least not in its APIs
18:24 poohman_ ok
18:24 mscha joined #perl6
18:25 geekosaur normally the answer would be "code page" but Windows is usually pretty good about making that specifically an I/O device attribute
18:25 mscha It would be nice if the Windows version of Rakudo Star 2017.04 would work if you're not called “Steve”.  ????
18:25 nhywyll joined #perl6
18:25 mscha perl6.bat: @ "C:\Users\steve\temp\rakudo-star-2017.04\install\bin\moar" ...
18:28 geekosaur loooovely
18:28 geekosaur "NetBIOS names consist of up to 15 bytes of OEM characters including letters, digits, hyphens, and periods. Some characters are specific to the character set. NetBIOS names are typically represented in the OEM character set. The OEM character set depends on the locale. Some OEM character sets represent certain characters as two bytes. NetBIOS names, by convention, are represented in uppercase where the translation algorithm from lowercase to uppe
18:28 geekosaur rcase is OEM character set dependent."
18:28 leah2 joined #perl6
18:28 geekosaur so, basically undefined as to what it represents
18:29 * lizmat starts on the P6W
18:29 geekosaur MSDN suggests GetComputerNameEx which handles Unicode, DNS, and other aspects of modern reality
18:29 lizmat so let me know if you think I missed something in the past week
18:29 geekosaur https://msdn.microsoft.com/en-us/library/windows/desktop/ms724220(v=vs.85).aspx
18:30 geekosaur ("Computer Names" which documents legacy interfaces such as the NetBIOS stuff)
18:31 poohman_ was just going through a  win32 api and was trying to get things working in perl6 - will have to try the GetComputerNameEx and see how it goes
18:31 z joined #perl6
18:31 poohman_ win32 api tutorial I meant
18:32 poohman_ will try tomorrow and ask for help again if I get stuck
18:32 poohman_ thanks for the help
18:33 poohman_ goodnight people
18:42 ggoebel joined #perl6
18:45 avalenn joined #perl6
18:46 ufobat joined #perl6
18:48 zakharyas joined #perl6
18:52 labster joined #perl6
18:53 nhywyll joined #perl6
19:02 Geth ¦ doc: 80165120fe | (Zoffix Znet)++ | doc/Type/Signature.pod6
19:02 Geth ¦ doc: Point out difference in where clause...
19:02 Geth ¦ doc:
19:02 Geth ¦ doc: ...between block and non-block versions.
19:02 Geth ¦ doc:
19:02 Geth ¦ doc: RT#131239: https://rt.perl.org/Ticket/Display.html?id=131239
19:02 Geth ¦ doc: review: https://github.com/perl6/doc/commit/80165120fe
19:02 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=131239
19:05 j joined #perl6
19:07 jaush hi.  i just installed rakudo star 2017.04, and there seems to be a problem:  perl6.bat starts as follows:
19:07 jaush @ "C:\Users\steve\temp\rakudo-star-2017.04\install\bin\moar"
19:09 [Coke] (I am surprised, as I thought everything was installing into C:\rakudo still)
19:09 TimToady I assume your name is not steve :)
19:10 jaush it is not ;)
19:10 jaush by contrast, for 2017.01 the perl6.bat begins:  @ "C:\rakudo\bin\moar"
19:11 TimToady stmuk_: ^^^
19:12 rub_ixCube joined #perl6
19:13 rub_ixCube hey, is it possible to use multiple queries in a when statement, i.e `when "x" "X" { say "x"; }`;
19:14 Zoffix joined #perl6
19:14 Zoffix rub_ixCube: \o :) Glad to see you made the right choice (saw your reddit post) :P
19:15 rub_ixCube :)
19:15 Zoffix rub_ixCube: yeah, you can use when "x" | "y" to mean (when x or y)
19:15 Zoffix huggable: Junction
19:15 huggable Zoffix, Logical superposition of values: https://docs.perl6.org/type/Junction
19:15 [Coke] oh. maybe steve pushed a test build, oops.
19:15 Zoffix rub_ixCube: a post on Junctions: https://perl6.party/post/Perl-6-Schrodinger-Certified-Junctions
19:15 rub_ixCube thnx
19:15 Zoffix m: $_ = 'foo'; when { 'foo' or 'bar' } { say "hi!" }
19:15 camelia rakudo-moar 858a3d: OUTPUT: «hi!␤»
19:16 Zoffix rub_ixCube: or you can use a block (or sub). If it returns a truthy value, the when clause will run
19:18 alimon joined #perl6
19:18 Zoffix haxmeister: in `my @stack = dir($start);` there's nothing *to* flatten, as dir returns a flat Seq.
19:18 MasterDuke_ m: $_ = 'abc'; when { 'foo' or 'bar' } { say "hi!" }
19:18 camelia rakudo-moar 858a3d: OUTPUT: «hi!␤»
19:19 Zoffix haxmeister: the functional difference between Lists and Arrays is Arrays are mutable, while Lists aren't.
19:19 Zoffix MasterDuke_: ah, right, need an eq there :P
19:20 yqt joined #perl6
19:21 Zoffix haxmeister: Arrays *are* Lists; they're a subclass. There's also Slip (also a subclass of List) which is like list but automatically flattens into outer iterables. Lastly, there's Seq. It's similar to a List but its point is that it doesn't keep around values it already produced and in many cases it actually failsover to be a List under the hood, caching values it generated. That's pretty much the 4 main Perl
19:21 Zoffix 6 list-like things.
19:21 Zoffix m: $_ = 'abc'; when { $_ ~~ 'foo' | 'bar' } { say "hi!" }
19:21 camelia rakudo-moar 858a3d: ( no output )
19:22 Zoffix m: $_ = 'abc'; when 'foo' | 'bar' { say "hi!" } # same
19:22 camelia rakudo-moar 858a3d: ( no output )
19:22 Zoffix m: $_ = 'abc'; when -> $v { $v eq 'foo' or $v eq 'bar' } { say "hi!" }
19:22 camelia rakudo-moar 858a3d: ( no output )
19:22 Zoffix m: $_ = 'bar'; when -> $v { $v eq 'foo' or $v eq 'bar' } { say "hi!" }
19:22 camelia rakudo-moar 858a3d: OUTPUT: «hi!␤»
19:22 rub_ixCube i mostly chose Perl6 because Perl 5 is slowly dying.
19:22 Zoffix rub_ixCube: yup
19:23 haxmeister Zoffix: thank you
19:23 Zoffix Recent survey showed only 16% of Perl 5 users started using it in the past 5 years.
19:24 Zoffix Survey: http://blog.builtinperl.com/post/perl-developer-survey-2017-results---part-1
19:25 haxmeister I almost went to perl5 because I have 2 books at home .. but I like the lispy feel of perl6 and the fancy editions to regex and other things..
19:25 haxmeister Zoffix: perl5 will decline but not disappear.. perl6 will only have slow gains as python reaches it's pinnacle
19:26 ttkp6 joined #perl6
19:26 haxmeister IMO anyway
19:26 Cabanossi joined #perl6
19:26 haxmeister perl6 is still not implemented properly on gentoo/funtoo linux.. there is some issue with getting modules squared away with our package manager
19:27 Zoffix haxmeister: sounds about right.
19:29 haxmeister I started to tinker with python just a few weeks ago.. I just can't squeeze how I think into a box that wooden.. lol
19:32 g0d355__ joined #perl6
19:32 laouji joined #perl6
19:35 samcv Ambiguous call to 'infix:<cmp>'; these signatures all match:
19:35 samcv :(Int:D \a, Rational:D \b)
19:35 samcv :(Str:D \a, Str:D \b --> Order:D)
19:35 samcv how do i fix this?
19:35 samcv argh
19:36 samcv the line that gives the error is: for %secs-per-unit.sort(*.value)
19:36 Zoffix m: <1.5> cmp <4>
19:36 camelia rakudo-moar 858a3d: OUTPUT: «WARNINGS for <tmp>:␤Useless use of "cmp" in expression "<1.5> cmp <4>" in sink context (line 1)␤Ambiguous call to 'infix:<cmp>'; these signatures all match:␤:(Rational:D \a, Int:D \b)␤:(Str:D \a, Str:D \b --> Order:D)␤  in block <unit> at <tmp>…»
19:36 Zoffix oops
19:37 Zoffix samcv: for your script, I'm guessing %secs-per-unit.sort(*.value.Numeric)
19:37 Zoffix For Perl 6
19:37 * Zoffix looks into it
19:37 samcv i will add that in and hopefully will at least unbreak my irc bot :X
19:40 robertle is it just me or are all HTTP related modules currently a bit underwhelming?
19:41 Zoffix What you talking aboot! WWW is the most overwhelming module!
19:41 Zoffix buggable: eco WWW
19:41 buggable Zoffix, WWW 'No-nonsense, simple HTTPS client with JSON decoder': https://github.com/zoffixznet/perl6-WWW 4 other matching results: https://modules.perl6.org/#q=WWW
19:41 Zoffix :)
19:42 Zoffix robertle: but yeah :) HTTP::UserAgent is most-working from my experience, but it still needs to implement some bits IIRC
19:43 * samcv still doesn't know the easiest one to use and just does qqx{curl -s '$var'}
19:44 samcv if there's one that is super simple would be nice to know
19:44 Zoffix samcv: one word: WWW
19:44 Zoffix HTTP::Tiny is a wrapper around curl FWIW
19:44 samcv thanks
19:44 robertle a http client that uses futures rather than blocking would be good
19:44 samcv that's three words though Zoffix :P
19:44 robertle and then the server side...
19:45 Zoffix robertle: why does it need futures? If you want it non-blocking, put `start` before it.
19:46 samcv start returns a Promise so you can do whatever you wnat with that
19:46 robertle does that not just block a different thread?
19:46 Zoffix use WWW; start { get 'https://perl6.org' }.then: { .say }; some-other-stuff-while-we-wait
19:46 Zoffix *.say even
19:48 Zoffix m: start { say "Simulating WWW request"; sleep 2; 42 }.then: *.result.say; say "meow meow meow"; sleep 3
19:48 camelia rakudo-moar 858a3d: OUTPUT: «Simulating WWW request␤meow meow meow␤42␤»
19:49 ggoebel joined #perl6
19:50 robertle seriously, does the "start" method not limit me to RAKUDO_MAX_THREADS concurrent requests?
19:50 robertle if it doesn't I'm sold!
19:52 b2gills start doesn't create a thread it creates a Promise that will be done on a thread, at some point in the future. It does not create a thread.
19:54 jnthn Yeah, but the thread comes from a pool, which you can exhaust.
19:54 Zoffix But it'd just get cued up, right?
19:54 jnthn Yes
19:55 jnthn I wrote an answer on this topic on SO recently that has quite a few details :)
19:55 Zoffix m: await ^32 .map: { start { sleep 2 } }; say now - INIT now
19:55 camelia rakudo-moar 858a3d: OUTPUT: «4.0061557␤»
19:55 Zoffix yup
19:55 jnthn m: use v6.d.PREVIEW; await ^32 .map: { start { await Promise.in(2) } }; say now - INIT now
19:55 camelia rakudo-moar 858a3d: OUTPUT: «2.0140311␤»
19:55 jnthn :)
19:55 Zoffix :D
19:55 robertle ..but it will only get queued for a short period of time, then activated, and then it will block on the socket for a long time. right? so essentially you are just blocking a thread when intertnally the IO is async anyway -- sounds weird
19:56 robertle so alternatively the HTTP client could just use async IO and return a promise right away, never blocking
19:56 jnthn That would be preferable, yes :)
19:56 jnthn Then you could have a hundred active requests and just a handful of threads.
19:56 robertle turning this into blocking modde is far simpler and less intrusive than the other weay around
19:57 Ven joined #perl6
19:57 robertle basically what I am wondering is whether it would not be better to do any such modules async-by-default?
19:58 jnthn Well, with the caveat that such modules are a bit more challenging to develop, and it's up to the people making modules to decide how to do them. :-)
19:58 Zoffix m: dd <42> eqv <1.5>
19:58 camelia rakudo-moar 858a3d: OUTPUT: «Ambiguous call to 'infix:<eqv>'; these signatures all match:␤:(Numeric:D \a, Numeric:D \b)␤:(Str:D \a, Str:D \b)␤  in block <unit> at <tmp> line 1␤␤»
19:58 jnthn Certainly when I wrote SSH::LibSSH I decided to just go directly to writing an async binding
19:59 robertle sure, i'm not criticising at all! just wondering whether there is something that I do not understand...
19:59 Zoffix m: dd <42> === <1.5>
19:59 camelia rakudo-moar 858a3d: OUTPUT: «Bool::False␤»
19:59 jnthn I think it's simply that the async primitives have only fairly recently reached the point where they can be relied on.
20:00 robertle yeah, noticed that as well when playing around...
20:00 robertle and profiler + async is still wonky?
20:00 jnthn profiler + anything with more than one thread
20:00 Zoffix So what does it mean that it'll block on a socket? One core will be busy until it downloads all the things?
20:01 jnthn Zoffix: The core won't be busy, the thread just won't be able to take on another task.
20:01 robertle not busy, but the thread is blocked, and there are only so many of these...
20:01 Zoffix Ah OK. Thanks.
20:02 Guest7768 m: getc
20:02 camelia rakudo-moar 858a3d: OUTPUT: «read string requires an object with REPR MVMOSHandle (got Scalar with REPR P6opaque)␤  in block <unit> at <tmp> line 1␤␤»
20:02 jnthn I recently got an IO::Socket::Async::SSL mostly together (a few things outstanding still), which will hopefully make more async networking stuff possible :)
20:02 DrForr I don't suppose Unicode filenames are allowed - I find myself in the position of being able to legitimately write a file called Dōbutsu.pm6 here.
20:02 MasterDuke_ jnthn: timotimo was musing about how to get the profiler to support more than one thread, but i don't think he ended up with something definite
20:03 Zoffix buggable: eco ווו
20:03 buggable Zoffix, ווו '666th module in the Perl 6 Ecosystem is properly Evil!': https://github.com/zoffixznet/perl6-666
20:03 MasterDuke_ is it possible, just requires some grunt work? or tricky even to figure out if possible?
20:03 Zoffix DrForr: ^ At least that works
20:04 jnthn MasterDuke_: So far as I recall, I made the collection data structures per-thread, so collecting the data should be fine. What I didn't do was sort out stopping profiling across all threads and safely collecting all the data.
20:04 Zoffix s: &getc, \()
20:04 DrForr Thanks, I'll give it a shot, I suppose.
20:04 jnthn MasterDuke_: So in theory it's not a huge amount of work
20:04 MasterDuke_ yeah, that's the part he was talking about
20:04 jnthn MasterDuke_: Though we then have the problem of presenting said results
20:05 jnthn I've also been pondering a sampling profiler
20:05 jnthn Which would provide less accurate, but also far less intrusive, measurement, and a lot less data
20:05 Zoffix Ven``: getc not implemented yet on ArgFiles; will be by end of the month as part of IO grant
20:05 MasterDuke_ he's been working on a text ui for profiler results, i don't know how "production-ready" he plans on taking it
20:05 Ven`` Zoffix: thank you :)
20:06 MasterDuke_ jnthn: is there any way of annotating the perl6 code such that perf could report on it as a stop-gap measure?
20:06 jnthn I don't know perf or its workings well enough to know, sorr.
20:06 jnthn *sorry
20:06 Ven`` Zoffix: I had a question about your "will-close" module, why so many nqp::callerctx?
20:07 timotimo jnthn: how hard would it be to have a value for the gc status that would allow me to communicate to other TCs "stop what you're doing as soon as you can and tell me when you're stopped" that would also deal properly with blocked threads and such?
20:07 timotimo that's what i think i'd need to have the profiler spit out the data from other threads
20:08 Zoffix Ven``: 'cause it needs to go up from where the trait is evaluating it. I most of the code from some core trait
20:08 Zoffix Ven``: why, is there a way to write that simpler?
20:09 Zoffix s/I most/I stole most/;
20:09 Zoffix .oO( someone stole my 'stole'! )
20:09 Ven`` Zoffix: I have no idea, it just looked really more complex than a "will leave {.close}" (and requires to know how many stackframes there are I guess)
20:11 Zoffix Ven``: looks pretty much as complex as `will leave {.close}` that ends up calling Variable.willdo, which is this: https://github.com/rakudo/rakudo/blob/nom/src/core/Variable.pm#L24
20:11 cdg joined #perl6
20:11 Cabanossi joined #perl6
20:11 Ven`` Zoffix: oh, of course, but that's core code – when such impl. details change, it'll be updated "by definition" – that's what I meant
20:12 jnthn timotimo: Not sure, I thought about it the other day and first thing "oh it's easy" followed by "oh, it's not" :P
20:12 jnthn s/thing/thought/
20:13 Ven`` m: my $s = 'one from the beginning'; say $s.substr(*-3) ~ $s.substr(3);
20:13 camelia rakudo-moar 858a3d: OUTPUT: «ing from the beginning␤»
20:13 Ven`` m: my $s = 'one from the beginning'; say $s.substr(*-3) ~ $s.substr(0, *-3);
20:13 camelia rakudo-moar 858a3d: OUTPUT: «ingone from the beginn␤»
20:17 Zoffix left #perl6
20:19 AlexDaniel m: my $s = ‘one from the beginning’; say $s.comb.list.rotate(-3).join
20:19 camelia rakudo-moar 858a3d: OUTPUT: «ingone from the beginn␤»
20:20 Ven_ joined #perl6
20:20 Ven_ m: my @a = 1..10; say @a[(1..10).map(* + 3).map(* % 10)];
20:20 camelia rakudo-moar 858a3d: OUTPUT: «(5 6 7 8 9 10 1 2 3 4)␤»
20:21 AlexDaniel Seq can probably have a .rotate too
20:21 Khisanth joined #perl6
20:36 moritz lol I blogged: https://perlgeek.de/blog-en/perl-6/2017-015-book-update.html
20:37 lizmat moritz: congrats
20:37 lizmat and good to see more than one mainline publisher is now on the Perl 6 bandwagon  :-)
20:37 moritz tl;dr: apress.com will publish my book
20:38 geekosaur joined #perl6
20:38 moritz lizmat: thanks
20:40 jnthn moritz: Cool! Congrats. :)
20:41 AlexDaniel awesome cover, by the way
20:43 AlexDaniel “($upper - $lower )” :S
20:44 lizmat http://www.apress.com/gp/book/9781484228982
20:47 moritz lizmat: oh, nice. I wasn't aware of that :-)
20:49 xfix joined #perl6
20:50 timotimo moritz: \o/
20:53 xfix joined #perl6
21:03 haxmeister moritz: can't purchase ebook yet?
21:04 ChoHag joined #perl6
21:07 haxmeister https://www.amazon.com/Perl-Fundamentals-Examples-Projects-Studies/dp/1484228987
21:08 moritz haxmeister: no, it's still a work in progress
21:14 geekosaur joined #perl6
21:14 stmuk_ stmuk-- # I'll delete the 2017.04 MSI and release (probably in about 24 hrs time)
21:15 stmuk_ I must have missed a "make clean"
21:20 pmurias joined #perl6
21:21 haxmeister moritz: a perl6 noob like me could use a book like that :).. I may be your first customer
21:26 Cabanossi joined #perl6
21:29 Geth ¦ perl6.org: 293c3528eb | (Steve Mynott)++ | source/downloads/index.html
21:29 Geth ¦ perl6.org: Curse of 2017.04 infects MSI. Document its deleted with a replacement to
21:29 Geth ¦ perl6.org:
21:29 Geth ¦ perl6.org: follow
21:29 Geth ¦ perl6.org: review: https://github.com/perl6/perl6.org/commit/293c3528eb
21:56 dct joined #perl6
22:24 kent\n joined #perl6
22:24 grondilu m: sub { push @_, pi }(my @a); say @a;
22:24 camelia rakudo-moar e5870c: OUTPUT: «[]␤»
22:24 grondilu m: sub (@x) { push @x, pi }(my @a); say @a;
22:24 camelia rakudo-moar e5870c: OUTPUT: «[3.14159265358979]␤»
22:24 grondilu ^not sure this is normal
22:24 grondilu m: sub (@_) { push @_, pi }(my @a); say @a;
22:24 camelia rakudo-moar e5870c: OUTPUT: «[3.14159265358979]␤»
22:25 grondilu m: { push @_, pi }(my @a); say @a;
22:25 camelia rakudo-moar e5870c: OUTPUT: «[]␤»
22:25 grondilu m: { push @^_, pi }(my @a); say @a;
22:25 camelia rakudo-moar e5870c: OUTPUT: «[3.14159265358979]␤»
22:25 grondilu if it's normal, it's subtle
22:26 Cabanossi joined #perl6
22:28 mcmillhj joined #perl6
22:32 skids joined #perl6
22:39 lizmat and another Perl 6 Weekly hits the Net: https://p6weekly.wordpress.com/2017/05/01/2017-18-starlight-starbright/
22:47 mcmillhj joined #perl6
22:56 Cabanossi joined #perl6
23:15 Woodi joined #perl6
23:23 adu joined #perl6
23:35 mcmillhj joined #perl6
23:41 majensen joined #perl6
23:56 Cabanossi joined #perl6
23:56 majensen samcv: I am yr TPF grant manager
23:57 majensen Pls have a look at it email, thx
23:58 majensen s( it )( yr)

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

Perl 6 | Reference Documentation | Rakudo