Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-01-12

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 dalek rakudo-star-daily: e5ff808 | coke++ | log/ (6 files):
00:00 dalek rakudo-star-daily: today (automated commit)
00:00 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/e5ff8083e8
00:01 [Coke] someone who knows travis: we need a way to run the 6.c tests in spectest, in addition to the other config/builds. (I do this by insuring t/spec has a checkout of 6.c instead of master, but we could probably make a *test target for it)
00:11 Zoffix Do we have a Perl 6 blog space where anyone could write? Is it just http://blogs.perl.org/ ?
00:14 timotimo i think there's more than just ugexe's blog up on ugexe.com; i think tony-o's hosted there, too
00:15 * Zoffix chuckles at the flashing skulls
00:15 timotimo :D
00:28 Skarsnik Good night #perl6
00:28 Zoffix night
00:29 shmibs joined #perl6
00:48 pierre-vigier joined #perl6
01:02 BenGoldberg joined #perl6
01:09 TimToady hmm, when I try the p6doc with the suggested Type::Str.split, the first thing I notice is that the Usage lines are flowed into a paragraph, which renders them less than readable
01:09 yeahnoob joined #perl6
01:09 bpmedley joined #perl6
01:09 TimToady also, maybe we should have a shorter way to get at a type than a Type:: prefix
01:11 TimToady a program like p6doc really oughta be taught what a bare "Str.split" means
01:28 Zoffix PERL 6 SUCKS!!! :) http://blogs.perl.org/users/zoffix_znet/2016/01/why-in-the-world-would-anyone-use-perl-6.html
01:28 Zoffix Man, that took $n amount of hours too long. I'm way behind on my much more important Warframe-playing quota.
01:28 Zoffix \o
01:36 colomon joined #perl6
01:40 Actualeyes joined #perl6
01:58 lucs Filetest operators appear to report that a broken symlink file just doesn't exist (nor is a file, or a link, or readable).
01:59 lucs (can't show it with camelia though)
01:59 atweiden joined #perl6
02:00 lucs And my rakudo is oldish (but stable enough for what I'm doing, so I'm a bit wary of rebuilding everything again just to test :-( )
02:04 lucs https://gist.github.com/lucs/e7c89c1046982d38cdbf
02:04 cpage_ joined #perl6
02:06 xpen joined #perl6
02:08 zwu joined #perl6
02:17 dalek doc: fcaf3ec | (Brock Wilcox)++ | doc/Language/variables.pod:
02:17 dalek doc: Fix sigil table formatting
02:17 dalek doc: review: https://github.com/perl6/doc/commit/fcaf3ec03c
02:18 zwu joined #perl6
02:20 zwu why there are many old bugs issued even in 6 years ago at https://rt.perl.org. I'm curious how many bugs have been fixed and how many bugs are remained?
02:22 awwaiid zwu: probably a lot of the open bugs are irrelevant and need to be culled; need someone to go through and evaluate them
02:23 awwaiid hm. rakudo.org still doesn't mention the 2015.12 release :(
02:23 Juerd How likely are bugs from years ago to still matter?
02:24 skids A lot are valid bugs, but on less urgent subsystems.
02:25 skids Some were left as low-hanging-fruit so new contributers could cut their teeth.
02:25 Juerd Did that work out?
02:26 awwaiid hmm. someone needs to give me rights to close these things
02:26 skids In some cases, probably.  I imagine there are a few heavy controbuters that started out that way.
02:26 skids awwaiid: do you have the right to comment on a bug when logged in?
02:26 awwaiid skids: yes
02:27 skids Then you can mark them resolved probably, from a drop-down when commenting.
02:27 skids But mae sure the bug has tests first.
02:28 dj_goku joined #perl6
02:28 dj_goku joined #perl6
02:28 awwaiid I'm looking at https://rt.perl.org/Ticket/Display.html?id=68024 as an example. You're right that I get a status update dropdown in the comment form, but it only has "open" and "open (unchanged)" as my options
02:28 skids Unfortunately the rigt to flag things as "test needed" and "lhf" seems to be a separate thing.
02:28 awwaiid lemme try another one...
02:28 Juerd skids: Although I agree that bugs *should* have regression tests, there are almost 1200 open/new bugs in the queue. I don't think it's realistic to spend a lot of time on each of them.
02:29 skids Well, part of the reason there are 1200 is becaus someone made a bug for every roast test a year or so ago.
02:29 skids (fudged test, that is)
02:31 Juerd skids: From quickly browsing through the 24 pages of bugs, the ones you describe appear to be only 3 pages.
02:34 Juerd Is there a list of people who can close bugs or grant priviliges?
02:34 Juerd s/lig/leg/
02:34 Juerd Also, there seem to be quite a few bugs that are just IRC logs. I find those highly annoying.
02:34 awwaiid well... my survey just now found that most of these are actually actionable (from a semi-random sample)
02:35 colomon joined #perl6
02:35 awwaiid but I've just started
02:35 Juerd awwaiid: Do you have bug closing permissions?
02:36 skids Juerd: I do, apparently.
02:36 Juerd If not, I suggest that when leaving a comment you include something that's machine-parsable :)
02:37 skids WRT IRC log bugs, it's better the issue be filed than not is the general attitude -- not everyone has time to make a nice RT.
02:38 Juerd skids: Agreed, but given a screenful of log, it would be nice if it at least highlighted the actual bug
02:38 kaare_ joined #perl6
02:39 Juerd skids: But I've opened more bugs at random and apparently it isn't as much of a problem as I initially thought
02:39 Juerd I can't paste multi-line things into the REPL. Is that a known behavior?
02:40 cuonglm joined #perl6
02:41 skids perl6 -e '<paste thing here>' enter?
02:42 skids Though a lot of people tend to use ' on camelia a lot so that sometimes needs some massage.
02:47 Juerd perl6 -
02:47 Juerd Otherwise I still can't paste things containing single quotes
02:47 Juerd - will read from stdin, which is fine (perl5-like)
02:48 ilbot3 joined #perl6
02: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!
02:49 raiph joined #perl6
02:51 awwaiid Juerd: nope, no closing permissions. But my sample so far still says that maybe I don't _need_ it so much as I haven't found too many to close.
02:53 Juerd I think that everything that emits a proper NYI or has a NYI-skip test can just be closed. The issue is tracked in the source, so why duplicate the data in a bug?
02:53 Juerd It just clutters the queue
02:55 Juerd But maybe it's just me and my aversion to long lists of backlog
02:57 molaf_ joined #perl6
02:59 sammers joined #perl6
03:09 kid51_ joined #perl6
03:10 cuonglm (1, 2, 3).join('\n') and (1, 2, 3).join("\n") produced different output because the interpreting for \n inside double and single quote
03:10 cuonglm Is that behavior documented else where in Perl6 doc?
03:11 cuonglm I went through http://doc.perl6.org/routine/join#class_List but found nothing
03:12 skids cuonglm: I think that falls out just from '\n' and "\n" beig different strings.
03:13 raiph cuonglm: http://doc.perl6.org/language/quoting
03:13 sammers hello, what is the simplest way to convert an array of strings, '1-2-3'.split('-'), to an array of Int? I am using `for` at the moment... wondering if there is a better way.
03:15 skids m: "1-2-3".split("-")».Int.say # might not be implemented very efficiently ATM
03:15 camelia rakudo-moar 0c4db8: OUTPUT«(1 2 3)␤»
03:16 skids m: "1-2-3".split("-").map(*.Int).say
03:16 camelia rakudo-moar 0c4db8: OUTPUT«(1 2 3)␤»
03:16 sammers skids, thanks, that looks good.
03:18 skids m: say +«"1-2-3".split("-") # for golfers
03:18 camelia rakudo-moar 0c4db8: OUTPUT«(1 2 3)␤»
03:18 raiph m: say '1-2-3'.comb: /\d*/ # for hairstylists
03:18 camelia rakudo-moar 0c4db8: OUTPUT«(1  2  3 )␤»
03:18 uruwi joined #perl6
03:19 uruwi a
03:19 raiph b, c d golfish?
03:19 Juerd m: say '1-2-3'.comb: /\d+/  # for those who don't like the double spaces in the output :P
03:19 camelia rakudo-moar 0c4db8: OUTPUT«(1 2 3)␤»
03:20 skids has to be of Int
03:20 cuonglm raiph: I read that link, too. But it still made me confused. '\n' and '\\n' are the same
03:20 cuonglm raiph: looks weird to me. Anyway, thanks for the information
03:20 cuonglm skids: Thanks
03:20 raiph m: say '\n', '\\n'
03:20 camelia rakudo-moar 0c4db8: OUTPUT«\n\n␤»
03:21 raiph cuonglm: yw
03:21 skids m: "\n".ords.say; '\n'.ords.say; '\\n'.ords.say
03:21 camelia rakudo-moar 0c4db8: OUTPUT«(10)␤(92 110)␤(92 110)␤»
03:21 sammers skids, can you explain this +«?
03:22 skids It's a prefix hyper operator.
03:22 Juerd sammers: prefix + numifies, and with « it operates on a list of things
03:23 sammers ok, that looks very useful... what is the prefix to stringify?
03:23 Juerd sammers: ~
03:23 raiph m: say q[This back\slash stays], q[This back\\slash stays] # cuonglm did you see that bit in the doc i linked?
03:23 camelia rakudo-moar 0c4db8: OUTPUT«This back\slash staysThis back\slash stays␤»
03:23 sammers ok, ah, alright, starting to make sense now...
03:23 skids https://doc.perl6.org/language/operators#Hyper_Operators
03:24 Juerd sammers: + is for numbers, ~ is for strings, ? is for bools, ! is for bools but negated ;)
03:25 sammers m: say ?«"True-False-True).split("-")
03:25 camelia rakudo-moar 0c4db8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/9lnlipQiOa␤Unable to parse expression in double quotes; couldn't find final '"' ␤at /tmp/9lnlipQiOa:1␤------> 3say ?«"True-False-True).split("-")7⏏5<EOL>␤    expecting any of:␤        double qu…»
03:25 sammers m: say ?«"True-False-True").split("-")
03:25 camelia rakudo-moar 0c4db8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/h5oBe486Ks␤Unexpected closing bracket␤at /tmp/h5oBe486Ks:1␤------> 3say ?«"True-False-True"7⏏5).split("-")␤»
03:26 sammers m: say ?«("True-False-True").split("-")
03:26 camelia rakudo-moar 0c4db8: OUTPUT«(True True True)␤»
03:26 Juerd Uh oh
03:26 sammers hmm
03:26 Juerd m: "A" |~ "B";
03:26 camelia rakudo-moar 0c4db8: OUTPUT«WARNINGS for /tmp/0sq90EMpgO:␤Useless use of "|" in expression "\"A\" |~ " in sink context (line 1)␤»
03:26 Juerd m: say("A" |~ "B")
03:26 camelia rakudo-moar 0c4db8: OUTPUT«any(A, B)␤»
03:26 Juerd I did not expect that to become a junction.
03:26 Juerd Should be buffer bitwise or...
03:26 Juerd OH!
03:26 sammers m: say ?«("1-0-1").split("-")
03:26 camelia rakudo-moar 0c4db8: OUTPUT«(True True True)␤»
03:26 Juerd m: say("A" ~| "B")
03:26 camelia rakudo-moar 0c4db8: OUTPUT«C␤»
03:27 Juerd Sorry, had it the wrong way around :)
03:27 cuonglm raiph: Yes, that's why I said it looks weird to me :D
03:28 BenGoldberg m: say [|~] "A", "B";
03:28 camelia rakudo-moar 0c4db8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/4ltXyn5cLl␤Prefix ~ requires an argument, but no valid term found␤at /tmp/4ltXyn5cLl:1␤------> 3say [|~7⏏5] "A", "B";␤    expecting any of:␤        prefix␤»
03:28 Juerd sammers: Note that the string "False" is true.
03:28 BenGoldberg m: say [~|] "A", "B";
03:28 camelia rakudo-moar 0c4db8: OUTPUT«C␤»
03:28 skids sammers: Any nonempty string is True when boolified
03:28 BenGoldberg m: say so "0"
03:28 camelia rakudo-moar 0c4db8: OUTPUT«True␤»
03:28 BenGoldberg m: say so "False"
03:28 camelia rakudo-moar 0c4db8: OUTPUT«True␤»
03:29 sammers in that situation, is there a way to convert the string to bool?
03:29 BenGoldberg So that the string "False" becomes false?
03:29 sammers right
03:30 BenGoldberg Hmm...
03:30 Juerd sammers: Not built-in
03:30 sammers this isn't something I need atm, just curious.
03:31 BenGoldberg m: True.WHAT.say
03:31 camelia rakudo-moar 0c4db8: OUTPUT«(Bool)␤»
03:31 BenGoldberg m: Bool.keys.say
03:31 camelia rakudo-moar 0c4db8: OUTPUT«()␤»
03:31 zwu joined #perl6
03:31 BenGoldberg m: Bool.enums.keys.say
03:31 camelia rakudo-moar 0c4db8: OUTPUT«Method 'enums' not found for invocant of class 'Bool'␤  in block <unit> at /tmp/eu1nw2ylDF line 1␤␤»
03:32 sammers thanks everyone, you have been very helpful...
03:34 BenGoldberg m: say Bool.^attributes;
03:34 camelia rakudo-moar 0c4db8: OUTPUT«Method 'gist' not found for invocant of class 'BOOTSTRAPATTR'␤  in block <unit> at /tmp/tOEDmGkz4j line 1␤␤»
03:34 BenGoldberg j: my @a = Bool.^attributes;
03:34 camelia rakudo-jvm 6c0f93: OUTPUT«java.lang.RuntimeException: java.lang.StackOverflowError␤␤»
03:36 raiph m: use MONKEY; augment class Str { multi method gist ("Foo") { 42 } }; say "Foo"
03:36 camelia rakudo-moar 0c4db8: OUTPUT«Foo␤»
03:38 pat_js joined #perl6
03:39 cuonglm Is there any way to list all builtin class in perl6?
03:40 cuonglm I mean all things listed here http://doc.perl6.org/type.html
03:41 autarch m: class C { submethod DESTROY { say self } }; C.new for 1..10
03:41 yoleaux 11 Jan 2016 08:12Z <nine> autarch: Have you thought about using network connections to communicate the results of test subprocesses to the master? I guess that could be easier than trying to get concurrent writing to files performant cross platform. And it would also make it trivial to run high level clusterwide tests :)
03:41 camelia rakudo-moar 0c4db8: ( no output )
03:41 autarch should I not expect DESTROY methods to be called when the interpreter exits?
03:41 autarch nine: that sounds like a good idea to investigate
03:41 hoelzro autarch: unless --full-cleanup is specified, no
03:42 autarch is DESTROY not intended to be used much?
03:42 skids autarch: still tbd I think for now they only do so for GC purposes.
03:42 hoelzro cuonglm: CORE::.keys should give you a good push in the right direction
03:43 hoelzro autarch: I think it depends on the use
03:43 autarch also, I don't see anything about --full-cleanup when I run "perl6 --help"
03:43 hoelzro autarch: it's a MoarVM option =/
03:43 * autarch digs out an example ...
03:43 * hoelzro should really add MVM_FULL_CLEANUP
03:43 autarch m: class C { has @.threads; method foo { @!threads = (^10).map: { Thread.start( name => $_, sub { sleep 1; say $*THREAD.name } ) }; say @!threads; }; submethod DESTROY { say 'bye'; .finish for @!threads }; }; C.new.foo; exit 0
03:43 camelia rakudo-moar 0c4db8: OUTPUT«[Thread #3 (0) Thread #4 (1) Thread #5 (2) Thread #6 (3) Thread #7 (4) Thread #8 (5) Thread #9 (6) Thread #10 (7) Thread #11 (8) Thread #12 (9)]␤»
03:44 autarch so there's what I think is a reasonable example of why I might want DESTROY to be called on interpreter exit
03:44 hoelzro autarch: in that instance, you should probably have a cleanup method and call it in a leave phaser
03:44 autarch hoelzro: that puts the burden on the user of class C in that case, rather than letting C implement its own cleanup - that doesn't seem like a great design for an API
03:44 hoelzro agreed
03:45 cuonglm hoelzro: It's interesting. Thanks. How can I found documentation for CORE?
03:45 hoelzro I'm with you on having a global destruction time, the leave phaser is just what's been recommended to me in the past
03:45 autarch is this something I should file a bug for?
03:46 hoelzro cuonglm: I don't know if it's doc'd on doc.perl6.org, but it's in the design docs under S02
03:46 hoelzro autarch: you could, but it may just end up getting rejected
03:46 autarch well, that's ok
03:46 hoelzro jnthn (and others) have argued that we shouldn't be relying on a global destruction time
03:46 hoelzro but you probably have better arguments than I for making a case for it =)
03:47 autarch oh, if it's already decided then there's no point filing a bug
03:47 hoelzro I don't know if it's decided spec-wise; I think the spec says implementations are free to do what they want
03:47 autarch ok, I'll file a bug
03:47 hoelzro well, before you do
03:47 hoelzro lemme see if I can dig up a discussion about it when I was asking
03:47 hoelzro that way you can have some context
03:48 skids cuonglm: http://design.perl6.org/S02.html#Pseudo-packages
03:48 hoelzro skids++
03:49 autarch https://rt.perl.org/Ticket/Display.html?id=127243
03:49 autarch I'd also note that "implementations can do what they want" has historically not worked so great, at least not with C
03:49 hoelzro heh
03:49 hoelzro good point
03:49 autarch what you end up with is people relying on undefined behavior, bugs across platforms, and a general huge freaking mess
03:49 cuonglm hoelzro: and skids: Thanks
03:50 hoelzro autarch: http://irclog.perlgeek.de/perl6/2015-07-22#i_10938226
03:52 autarch hmm, I guess I could record all the active threads in a package level variable and have an END block
03:52 * autarch pukes a little in his mouth after typing that
03:52 hoelzro haha
03:53 hoelzro I think we need a better solution
03:53 autarch I do like the idea of having a $*TEARDOWN option which allows you to _disable_ this and risk the consequences
03:53 autarch but the default should really be to run all the DESTROYers
03:53 hoelzro I mean, the GC (in Moar) knows which objects have a finalizer or not
03:53 hoelzro so if nothing has a finalizer, you don't need to do the full cleanup
03:53 hoelzro right?
03:54 hoelzro I think they're even tracked in their own queue, so you don't even need to do the full heap traversal
03:54 hoelzro (that could be out of date or a misconception of mine)
03:55 zwu just thought if perl 6 needs to support thread local storage ?
03:55 autarch I updated the ticket to point to that discussion too
03:55 hoelzro thanks autarch
03:56 autarch this seems quite critical to making threading really useful, since otherwise it's quite easy to have the main thread exit while child threads are still running
03:56 noganex joined #perl6
03:57 autarch sheesh, I used quite in one sentence, boo me
03:59 pjscott joined #perl6
04:01 autarch quite twice*
04:01 dayangkun joined #perl6
04:05 autarch on another DESTROY topic, I also noted that it doesn't seem to be called at block exit either
04:05 hoelzro nope
04:05 autarch is there a way to inject a LEAVE into the caller?
04:05 hoelzro it's like Java/C# GC; it's not specified when or if the finalizer will run
04:05 hoelzro there might be, but I don't know offhand
04:06 autarch there are certain useful things you can do in p5 with DESTROY that it'd be nice to do in p6
04:07 autarch but not all of them actually need DESTROY
04:07 hoelzro it would be nice if we had facilities similar to p5 Guard, but on the object level
04:09 hoelzro one of the core devs may have some ideas on that
04:09 autarch yeah, that's what I was thinking of
04:11 dfg5678 joined #perl6
04:11 skids http://whiteknight.github.io/2012/05/23/destructors_are_hard # blast from the past, back when parrot was the VM, FWIW
04:12 hoelzro nice find skids
04:13 skids I think some of the obstacles listed in there were parrot-specific, but some may still be pertinant
04:14 herby_ joined #perl6
04:14 herby_ good evening, everyone!
04:15 skids o/
04:15 hoelzro greetings!
04:15 herby_ trying to tackle the dailyprogrammer problem since there isn't a perl6 solution yet
04:15 herby_ https://www.reddit.com/r/dailyprogrammer/comments/40h9pd/20160111_challenge_249_easy_playing_the_stock/
04:16 herby_ if I had an array of <jame sally jesse raphael>, how do I get the index spot of jesse?
04:16 hoelzro herby_: you want index
04:16 hoelzro m: <jame sally jesse raphael>.index('jesse')
04:16 camelia rakudo-moar 0c4db8: ( no output )
04:16 hoelzro m: say <jame sally jesse raphael>.index('jesse')
04:16 camelia rakudo-moar 0c4db8: OUTPUT«11␤»
04:17 hoelzro oh, my bad
04:17 hoelzro I always make that mistake =/
04:17 hoelzro index is for strings only
04:17 hoelzro you want first
04:17 herby_ m: my @array = ['james', 'sally', 'jesse']; say @array.index('jesse')
04:17 camelia rakudo-moar 0c4db8: OUTPUT«12␤»
04:17 hoelzro m: say <jame sally jesse raphael>.first('jesse', :k)
04:17 camelia rakudo-moar 0c4db8: OUTPUT«2␤»
04:17 herby_ yeah
04:17 herby_ there we go :)
04:17 herby_ I knew perl 6 had an easy way to do it
04:17 herby_ just didnt know what
04:18 herby_ m: say ['james', 'sally', 'jesse', 'raphael'].first('raphael', :k)
04:18 camelia rakudo-moar 0c4db8: OUTPUT«3␤»
04:19 gfldex .index coerces to Str
04:19 herby_ thanks, hoelzro!
04:19 hoelzro no problem!
04:20 adhoc joined #perl6
04:22 herby_ m: my @array = <5 3 8 16 10>; my @newArray = @array[5..]; say @newArray;
04:22 camelia rakudo-moar 0c4db8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/eL2odGvlFg␤Please use ..* for indefinite range␤at /tmp/eL2odGvlFg:1␤------> 3<5 3 8 16 10>; my @newArray = @array[5..7⏏5]; say @newArray;␤»
04:22 herby_ blah
04:22 BenGoldberg joined #perl6
04:22 herby_ m: my @array = <5 3 8 16 10>; my @newArray = @array[2..]; say @newArray;
04:22 camelia rakudo-moar 0c4db8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/LXg9M9Xzu5␤Please use ..* for indefinite range␤at /tmp/LXg9M9Xzu5:1␤------> 3<5 3 8 16 10>; my @newArray = @array[2..7⏏5]; say @newArray;␤»
04:23 herby_ one more question.  how do I slice an array, say from spot number 3 to the end?
04:23 hoelzro m: my @array = <5 3 8 16 10>; say @array[2..*];
04:23 camelia rakudo-moar 0c4db8: OUTPUT«(8 16 10)␤»
04:23 hoelzro you almost had it!
04:24 herby_ thought I was close!
04:28 herby_ m: say <1.2 4.4 3.2 8.8>.first(
04:28 camelia rakudo-moar 0c4db8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/aE0CTxOqOH␤Unable to parse expression in argument list; couldn't find final ')' ␤at /tmp/aE0CTxOqOH:1␤------> 3say <1.2 4.4 3.2 8.8>.first(7⏏5<EOL>␤    expecting any of:␤        argument list␤»
04:28 herby_ m: say <1.2 4.4 3.2 8.8>.first(4.4)
04:28 camelia rakudo-moar 0c4db8: OUTPUT«4.4␤»
04:29 hoelzro be careful when using real numbers
04:29 hoelzro .first uses ACCEPT (iirc), so you may end up missing an element due to representational error
04:29 herby_ hmm. thought I had a clever solution to that challenge problem
04:30 herby_ m: say ["1.2", "4.4", "3.2", "8.8"].first("4.4")
04:30 camelia rakudo-moar 0c4db8: OUTPUT«4.4␤»
04:31 herby_ oh well, still learned something new.  thanks again
04:32 hoelzro happy to help
04:36 cpage_ joined #perl6
04:37 skids m: (1, 3, 2, 5, 7, 8).pairs.squish(:as({ state $f = -1 => Inf; "$f <=> $_".say; $f.value <=> $_.value; LEAVE { $f = $_ } })).say # ?!? why that last iter?
04:37 camelia rakudo-moar 0c4db8: OUTPUT«WARNINGS for /tmp/bTkyHvPIqn:␤Useless use of "<=>" in expression ".value <=> $_.value" in sink context (line 1)␤-1   Inf <=> 0       1␤0     1 <=> 1 3␤1     3 <=> 2 2␤2     2 <=> 3 5␤3     5 <=> 4 7␤4     7 <=> 5 8␤5     8 <=> Mu<72861600>␤Method 'value' not found for i…»
04:39 skids m: (1, 2).squish(:as({ $_.perl.say }))
04:39 camelia rakudo-moar 0c4db8: OUTPUT«1␤2␤Mu.new␤»
04:44 pierre-vigier joined #perl6
04:44 Hotkeys if you've got a version like class Foo::Bar:ver<1.2.3>
04:44 Hotkeys is there a way to get that version
04:44 Hotkeys in code
04:44 Hotkeys via the MOP or something?
04:47 skids m: class Foo::Bar:ver<1.2.3> { }; Foo::Bar.^ver.say
04:47 camelia rakudo-moar 0c4db8: OUTPUT«v1.2.3␤»
04:47 Hotkeys oh
04:47 Hotkeys that's easier than i thought it would be
04:47 Hotkeys thanks skids
04:47 skids np.
04:48 skids m: class Foo::Bar:ver<1.2.3> { }; Foo::Bar.HOW.^methods».name.sort.perl.say
04:48 camelia rakudo-moar 0c4db8: OUTPUT«("ACCEPTS", "ACCEPTS", "ASSIGN-KEY", "ASSIGN-POS", "AT-KEY", "AT-POS", "Array", "BIND-KEY", "BIND-POS", "BUILDALL", "BUILDALLPLAN", "BUILDPLAN", "BUILD_LEAST_DERIVED", "Bag", "BagHash", "Bool", "CREATE", "Capture", "DELETE-KEY", "DELETE-POS", "DUMP", "DUMP…»
04:49 skids Not all of those are part of the 6.c standard, some are rakudo internals.
04:49 * skids wonders whether .ver is.
04:50 pierre-vigier strange thing about flattening of list
04:50 pierre-vigier p6: say flat ( (1,2),(3,4));my @m = (1,2),(3,4); say flat @m;
04:50 camelia rakudo-moar 0c4db8: OUTPUT«(1 2 3 4)␤((1 2) (3 4))␤»
04:51 pierre-vigier it does not seem normal, does it?
04:51 skids pierre-vigier: Arrays (versus Lists) are itemized element by element, they are considered as flat as they want to be.
04:52 skids You have to explicitly .map(*.flat) to break the itemization.
04:52 skids (Except for dimensional arrays, apparently)
04:52 skids By default @m is an Array.
04:52 Hotkeys m: my @m = (1,2).Slip,(3,4).Slip; say flat @m;
04:52 camelia rakudo-moar 0c4db8: OUTPUT«(1 2 3 4)␤»
04:52 Hotkeys this might help too
04:53 skids m: say flat ( (1,2),(3,4));my @m := (1,2),(3,4); say flat @m;
04:53 camelia rakudo-moar 0c4db8: OUTPUT«(1 2 3 4)␤(1 2 3 4)␤»
04:53 pierre-vigier p6: say flat ( (1,2),(3,4));my @m = (1,2),(3,4); say @m.map( *.flat );
04:53 camelia rakudo-moar 0c4db8: OUTPUT«(1 2 3 4)␤((1 2) (3 4))␤»
04:53 skids Binding instead of assigning puts the List directly into @m instead of making an Array.
04:53 pierre-vigier hum, so no way to force flatten an array?
04:54 Hotkeys not unless you flatten everything in it first
04:54 pierre-vigier .map( *.flat) does not seem to work
04:54 Hotkeys hmm
04:54 skids say flat ( (1,2),(3,4));my @m = (1,2),(3,4); say @m.map( *.flat ).flat;
04:54 pierre-vigier p6: say flat ( (1,2),(3,4));my @m = (1,2),(3,4); say @m.map( *.flat ).flat;
04:54 camelia rakudo-moar 0c4db8: OUTPUT«(1 2 3 4)␤(1 2 3 4)␤»
04:54 Hotkeys m: my @m = (1,2),(3,4); say @m.map(*.Slip).flat
04:54 camelia rakudo-moar 0c4db8: OUTPUT«(1 2 3 4)␤»
04:55 skids The map flattens each itemized element into a list but the result of it is not itself flat.
04:55 pierre-vigier ok, there is something i do not follow hwew
04:55 pierre-vigier oh, ok
04:56 Hotkeys why is it that *.Foo doesn't need the curlies but any other map stuff does
04:56 Hotkeys not just doesn't need the curlies but gets mad when you use them
04:57 skids * generates whatever code.  { * } is a block that returns Whatevercode, which never gets run.
04:57 pierre-vigier the origin of my question was to check if every element of an array of array is a Numeric ( i can't use shaped array for my case, at least not now)
04:58 Hotkeys actually
04:58 pierre-vigier p6: my @m = [ [ 1,2],[3,4.0]]; if all( @m.map(*.Slip).flat ) ~~ Numeric { say "ok";} else { say "ko";}
04:58 camelia rakudo-moar 0c4db8: OUTPUT«ok␤»
04:58 Hotkeys you can use flatmap for that
04:58 pierre-vigier it's working, but feels "complicated"
04:59 Hotkeys my @m = [ [ 1,2],[3,4.0]]; if all(@m.flatmap) ~~ Numeric { say "ok";} else { say "ko"; }
04:59 Hotkeys er
04:59 Hotkeys m: my @m = [ [ 1,2],[3,4.0]]; if all(@m.flatmap(* ~~ Numeric)) { say "ok";} else { say "ko"; }
04:59 camelia rakudo-moar 0c4db8: OUTPUT«ko␤»
04:59 Hotkeys hmm
04:59 Hotkeys m: my @m = [ [ 1,2],[3,4.0]]; if all(@m.flatmap(*)) { say "ok";} else { say "ko"; }
04:59 camelia rakudo-moar 0c4db8: OUTPUT«Cannot call flatmap(Array: Whatever); none of these signatures match:␤    ($: &block, :$label, *%_)␤  in block <unit> at /tmp/3GrL8lIZVz line 1␤␤»
05:00 Hotkeys er
05:00 pierre-vigier m: my @m = [ [ 1,2],[3,4.0]]; if all(@m.flatmap({})) ~~ Numeric { say "ok";} else { say "ko"; }
05:00 camelia rakudo-moar 0c4db8: OUTPUT«Cannot call flatmap(Array: Hash); none of these signatures match:␤    ($: &block, :$label, *%_)␤  in block <unit> at /tmp/mQZ8bo_zG6 line 1␤␤»
05:00 pierre-vigier m: my @m = [ [ 1,2],[3,4.0]]; if all(@m.flatmap({*})) ~~ Numeric { say "ok";} else { say "ko"; }
05:00 camelia rakudo-moar 0c4db8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/foPRN6CnHp␤{*} may only appear in proto␤at /tmp/foPRN6CnHp:1␤------> 3[ [ 1,2],[3,4.0]]; if all(@m.flatmap({*}7⏏5)) ~~ Numeric { say "ok";} else { say "k␤    expecting any of:␤        argument l…»
05:00 Hotkeys never mind
05:00 Hotkeys it doesn
05:00 Hotkeys 't flatten like I thought it did
05:01 Hotkeys you'll have to do it the previous way
05:01 pierre-vigier ok, thank you
05:01 pierre-vigier feel a bit stragne, need to get used to it
05:01 pierre-vigier but flatmap to apply a function will solve me some hassle
05:02 skids m: my @a = [1,2],[3,4]; say so [&&] @a.map( { $_.all ~~ Int } );
05:02 camelia rakudo-moar 0c4db8: OUTPUT«True␤»
05:02 pierre-vigier i did implement a kind of flatmap my self, taht apply a funcction on element or call map with the same param if it's an array
05:02 Hotkeys skids that only works for one level deep though
05:03 pierre-vigier my @a =[[1,2],[3,4]] ; say so [&&] @a.map( { $_.all ~~ Int } );
05:03 pierre-vigier m: my @a =[[1,2],[3,4]] ; say so [&&] @a.map( { $_.all ~~ Int } );
05:03 camelia rakudo-moar 0c4db8: OUTPUT«True␤»
05:03 pat_js is there a regex adverb to state that you only want matches for the whole string?
05:03 skids pierre-vigier: If I had to I would bet there will be some sort of syntactical relief for Array flattenning by 6.d as it is starting to be a FAQ.
05:03 pierre-vigier ok
05:04 hoelzro pat_js: you can throw ^ and $ at the beginning and end of the regex
05:04 pierre-vigier anyway,  it's solving my issue for now
05:04 pierre-vigier thank you a lot :)
05:04 Hotkeys hoelzro++
05:04 skids Hotkeys: I thought that was all that was needed?
05:04 Hotkeys I guess
05:04 Hotkeys it'd be nice for a generic flat though
05:04 Hotkeys flatten all the way arrays or lists
05:04 Hotkeys s/generic/general
05:05 pat_js is there a regex adverb to state that you only want matches for the whole string?
05:05 pat_js sorry
05:06 skids Oh. hold on.  There may be a trick.
05:06 pat_js hoelzro: I want the grammar to be provided from somewhere else. Is there no other way but to state a new grammar.
05:06 skids m: my @a = [1,2],[3,4]; @a[*;*;*].say
05:06 camelia rakudo-moar 0c4db8: OUTPUT«(1 2 3 4)␤»
05:07 pierre-vigier joined #perl6
05:07 hoelzro pat_js: could you give an example of what you'd like to do? just pretend an adverb *does* exist and write some example code
05:07 sortiz m: my @a = 1,(3,4,(5,6,6)),7; say so all(@a.List.flat) ~~ Int;
05:07 camelia rakudo-moar 0c4db8: OUTPUT«True␤»
05:08 llfourn joined #perl6
05:08 sortiz pierre-vigier, ^^
05:08 skids my @a = 1,[3,4,[5,6,6]],7; say so all(@a.List.flat) ~~ Int;
05:08 skids m: my @a = 1,[3,4,[5,6,6]],7; say so all(@a.List.flat) ~~ Int;
05:08 camelia rakudo-moar 0c4db8: OUTPUT«False␤»
05:09 skids The problem is really nested arrays.
05:09 pat_js sub do-something-with-grammar(Str $string, Grammar $grammar){ my $Match = grammar.match($string, 'TOP', :whole-match); … do something}
05:10 pierre-vigier hum, still pretty comfused :)
05:10 pierre-vigier but map( @.Slip|List|flat ).flat
05:10 pat_js oh forgot die "match failed" unless $Match
05:10 pierre-vigier seems to be working
05:10 pierre-vigier in my usecase
05:10 hoelzro hmm...do regexes have something like nextsame?
05:10 hoelzro pat_js: gimme a second; I'll try an experiment
05:11 skids m: my @a = 1,[3,4,[5,6,6]],7; say so all(@a[*;*;*]) ~~ Int;
05:11 camelia rakudo-moar 0c4db8: OUTPUT«True␤»
05:11 skids m: my @a = 1,[3,4,[5,"a",6]],7; say so all(@a[*;*;*]) ~~ Int;
05:11 camelia rakudo-moar 0c4db8: OUTPUT«False␤»
05:11 skids That'll get you 3 dims.  Now if only I could remember if there was a way to get infinite *;'s
05:12 pierre-vigier m: my @a = [[1,2],[3,4]];say @a[*;*];
05:12 camelia rakudo-moar 0c4db8: OUTPUT«(1 2 3 4)␤»
05:13 pierre-vigier hum, interesting, it's rakudo, or perl 6.c ?
05:13 skids That I do not know.
05:13 zengargoyle joined #perl6
05:13 pierre-vigier m: my @a = [[1,2],[3,4]];say @a[*][*];
05:13 camelia rakudo-moar 0c4db8: OUTPUT«([1 2] [3 4])␤»
05:13 hoelzro pat_js: wait...don't grammars implicitly anchor to the beginning and end of a string?
05:14 skids I do think the dimensional mapping to nesting is in the design documents, ISTR.  Whather it's flat, or at least listy, I don't know if that is specced.
05:14 * zengargoyle somewhat irked that just running perl6 leaves 5M of stuff in ~.perl6
05:15 skids Grammar.parse anchors and .subparse does not IIRC.
05:15 joydo joined #perl6
05:15 pat_js hoelzro: oh, you're right, I'm sorry
05:15 Hotkeys oh
05:16 Hotkeys interesting
05:16 skids Though, the modifier in question for anchoring is :p (a.k.a. :pos)
05:18 Hotkeys m: my @a = 1,[3,4,[5,6,6]],7; all(gather @a.deepmap(*.take)) ~~ Numeric
05:18 camelia rakudo-moar 0c4db8: ( no output )
05:18 Hotkeys m: my @a = 1,[3,4,[5,6,6]],7; say all(gather @a.deepmap(*.take)) ~~ Numeric
05:18 camelia rakudo-moar 0c4db8: OUTPUT«True␤»
05:18 Hotkeys There's a fun one
05:18 Hotkeys deepmap isn't in the docs
05:18 sortiz m: my @a = 1,[3,4,[5,6,6]],7; dd @a[**]
05:18 camelia rakudo-moar 0c4db8: OUTPUT«HyperWhatever in array index not yet implemented. Sorry. ␤  in block <unit> at /tmp/eq0X87StqZ line 1␤␤»
05:19 sortiz um
05:19 Hotkeys my @l = [[1], 2, [[3,4], 5], [[[7,8,9]]], [[[6]]], 7, 8, []]; say all(@l.deepmap(* ~~ Numeric));
05:19 Hotkeys m: my @l = [[1], 2, [[3,4], 5], [[[7,8,9]]], [[[6]]], 7, 8, []]; say all(@l.deepmap(* ~~ Numeric));
05:19 camelia rakudo-moar 0c4db8: OUTPUT«all([True], True, [[True True] True], [True True True], [True], True, True, [])␤»
05:19 Hotkeys oops
05:20 Hotkeys m: my @l = [[1], 2, [[3,4], 5], [[[7,8,9]]], [[[6]]], 7, 8, []];  say all(gather @l.deepmap(*.take)) ~~ Numeric
05:20 camelia rakudo-moar 0c4db8: OUTPUT«True␤»
05:22 sortiz Hokeys++ # for deepmap
05:22 Hotkeys I wish it was in the docs
05:22 Hotkeys it's nice
05:22 daotoad joined #perl6
05:23 sortiz \o bed time
05:24 Hotkeys oh
05:25 Hotkeys here's an even nicer one
05:25 Hotkeys never mind I lied
05:33 pjscott joined #perl6
05:35 skids m: use Test; is (1,2), [1,2] # :/
05:35 camelia rakudo-moar 0c4db8: OUTPUT«ok 1 - ␤»
05:38 pierre-vigier joined #perl6
05:41 pierre-vigier joined #perl6
05:43 snarkyboojum joined #perl6
05:44 snarkyboojum left #perl6
05:51 llfourn joined #perl6
05:53 pjscott joined #perl6
05:58 Cabanossi joined #perl6
06:10 sjoshi joined #perl6
06:21 darutoko joined #perl6
06:25 pierre-vigier joined #perl6
06:26 Ch0c0late joined #perl6
06:30 ribasushi joined #perl6
06:33 uruwi I need a talk buddy
06:33 jeek Hi!
06:37 uruwi Hi
06:37 uruwi Sorry it took a bit of time to respond
06:37 pjscott joined #perl6
06:38 jeek No worries.
06:39 uruwi http://i.imgur.com/qrLN9qH.png
06:39 uruwi ^  what I'm working on
06:41 gfldex m: sub f ($a where * ~~ Str) {}; try { f 10; CATCH { default { .WHAT.note } } };
06:41 camelia rakudo-moar 0c4db8: OUTPUT«(AdHoc)␤»
06:41 gfldex that's not good
06:42 gfldex any test that wants to check against a constraint type check, will have to use .Str ~~ /Constraint type check failed/ to tell if the right exception was thrown
06:44 pierre-vigier joined #perl6
06:53 domidumont joined #perl6
06:58 domidumont joined #perl6
07:14 r1991 joined #perl6
07:17 CIAvash joined #perl6
07:24 FROGGS joined #perl6
07:39 dalek rakudo/nom: 991f9a2 | skids++ | src/core/Nil.pm:
07:39 dalek rakudo/nom: Fix some Nil LTA warnings.
07:39 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/991f9a2ab3
07:39 dalek rakudo/nom: d22af32 | niner++ | src/core/Nil.pm:
07:39 dalek rakudo/nom: Merge pull request #683 from skids/nil
07:39 dalek rakudo/nom:
07:39 dalek rakudo/nom: Fix some Nil LTA warnings.
07:39 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d22af328d7
07:47 nine .tell donaldh I know it-s perl6-debug-m. There's also perl6-debug-j, so I just replace "perl6-debug" in $*EXECUTABLE by "perl6"
07:47 yoleaux nine: I'll pass your message to donaldh.
07:48 nine .tell donaldh do you have any other precomp issues?
07:48 yoleaux nine: I'll pass your message to donaldh.
08:01 nine .tell Zoffix very nice blog post :)
08:01 yoleaux nine: I'll pass your message to Zoffix.
08:04 abraxxa joined #perl6
08:06 firstdayonthejob joined #perl6
08:08 pecastro joined #perl6
08:08 moritz URL?
08:13 CIAvash http://blogs.perl.org/users/zoffix_znet/2016/01/why-in-the-world-would-anyone-use-perl-6.html
08:14 lnrdo joined #perl6
08:17 rurban joined #perl6
08:19 [Tux] csv-ip5xs            50000    18.238    12.588
08:19 [Tux] test                 50000    24.998    24.330
08:19 [Tux] test-t               50000    12.862    11.961
08:19 [Tux] csv-parser           50000    51.677    -0.602
08:19 zakharyas joined #perl6
08:20 FROGGS [Tux]: hi, where was that chart again?
08:20 [Tux] http://tux.nl/Talks/CSV6/speed4.html http://tux.nl/Talks/CSV6/speed5.html
08:21 lnrdo joined #perl6
08:22 pierre-vigier joined #perl6
08:22 FROGGS [Tux]: thank you
08:27 _nadim joined #perl6
08:31 uruwi__ joined #perl6
08:36 brrt joined #perl6
08:47 rindolf joined #perl6
08:48 dakkar joined #perl6
08:49 andreoss joined #perl6
08:50 timotimo o/
08:51 brrt \o timotimo
08:59 pierre-vigier Any way to make a list or an array immutable?
09:00 pierre-vigier m: my @l = (1,2,3); @l[0]=9; say @l;
09:00 camelia rakudo-moar d22af3: OUTPUT«[9 2 3]␤»
09:00 pierre-vigier without creating a constant
09:00 pierre-vigier idea would be an object that contains a list
09:01 pierre-vigier i want to return a view of that list, but immutable
09:01 timotimo m: my @l = (1, 2, 3) but role { method ASSIGN-POS(|) { die "immutable!" }; method AT-POS(|) { my \result = callsame; return result } }; try @l[0] = "hi"; say @l
09:01 camelia rakudo-moar d22af3: OUTPUT«[hi 2 3]␤»
09:01 masak good antenoon, #perl6
09:01 timotimo m: my @l = (1, 2, 3) but role { method ASSIGN-POS(|) { die "immutable!" }; method AT-POS(|) { my \result = callsame; return Proxy.new( FETCH => sub (|) { result } } }; try @l[0] = "hi"; say @l
09:01 camelia rakudo-moar d22af3: OUTPUT«5===SORRY!5=== Error while compiling /tmp/15zaTEHgZH␤Unable to parse expression in argument list; couldn't find final ')' ␤at /tmp/15zaTEHgZH:1␤------> 3 Proxy.new( FETCH => sub (|) { result } 7⏏5} }; try @l[0] = "hi"; say @l␤    expectin…»
09:02 timotimo m: my @l = (1, 2, 3) but role { method ASSIGN-POS(|) { die "immutable!" }; method AT-POS(|) { my \result = callsame; return Proxy.new( FETCH => sub (|) { result }) } }; try @l[0] = "hi"; say @l
09:02 camelia rakudo-moar d22af3: OUTPUT«[hi 2 3]␤»
09:02 timotimo oh
09:02 timotimo duh, when list assignment happens, the role gets dropped
09:02 timotimo m: my @l = (1, 2, 3); @l does role { method ASSIGN-POS(|) { die "immutable!" }; method AT-POS(|) { my \result = callsame; return Proxy.new( FETCH => sub (|) { result }) } }; try @l[0] = "hi"; say @l
09:02 camelia rakudo-moar d22af3: OUTPUT«[1 2 3]␤»
09:03 timotimo m: my @l = (1, 2, 3); @l does role { method ASSIGN-POS(|) { die "immutable!" }; method AT-POS(|) { my \result = callsame; return Proxy.new( FETCH => sub (|) { result }, STORE => sub (|) { say "denied!"; die "immutable!" }) } }; try @l[0] = "hi"; say @l
09:03 camelia rakudo-moar d22af3: OUTPUT«[1 2 3]␤»
09:03 dalek rakudo/nom: ec03d6e | lizmat++ | src/core/ (4 files):
09:03 dalek rakudo/nom: Move FILETEST-MODIFIED to Rakudo::Internals
09:03 dalek rakudo/nom:
09:03 dalek rakudo/nom: Also, have it return epoch, rather than Instant, as we don't need
09:03 dalek rakudo/nom: instants for internal usage: especially if the Instant is derived
09:03 dalek rakudo/nom: from epoch.
09:03 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ec03d6e87e
09:03 pierre-vigier applying a role in runtime, good idea
09:03 timotimo m: my @l = (1, 2, 3); @l does role { method ASSIGN-POS(|) { say "denied via assign-pos"; die "immutable!" }; method AT-POS(|) { my \result = callsame; return Proxy.new( FETCH => sub (|) { result }, STORE => sub (|) { say "denied!"; die "immutable!" }) } }; try @l[0] = "hi"; say @l
09:03 camelia rakudo-moar d22af3: OUTPUT«denied via assign-pos␤[1 2 3]␤»
09:04 pierre-vigier once again purpose, is
09:05 pierre-vigier i have my Math::Matrix class, where i want to access elements like that , my $m = Math::Matrix.new([[1,2],[3,4]]); say $m[0][0];
09:05 pierre-vigier making read only as the first step is easy
09:05 pierre-vigier in ASSIGN-POS
09:05 pierre-vigier however, i can update the second level, as it's an array of array
09:06 timotimo right
09:06 pierre-vigier so i want that AT-POS, instead of returning a list
09:06 timotimo well, at some point you'd be using a shaped array for this, hopefully
09:06 pierre-vigier return an immutable one
09:06 timotimo but they are not optimized at all right now, so they carry a performance penalty
09:06 pierre-vigier i would like too, but i'm still facing issue with that yet
09:06 pierre-vigier like partial view
09:06 pierre-vigier however, i might not need it
09:07 pierre-vigier demanstration of the problem
09:07 timotimo yeah, partial views
09:08 pierre-vigier m: my Int @a[2,2] = (1,2),(3,4); say @a[0];
09:08 camelia rakudo-moar d22af3: OUTPUT«Partially dimensioned views of arrays not yet implemented. Sorry. ␤  in block <unit> at /tmp/OxohvJmXXR line 1␤␤»
09:08 pierre-vigier still i will check i can use taht
09:08 pierre-vigier maybe, create an accessor to get a line
09:08 pierre-vigier as a matrix
09:10 xyf joined #perl6
09:14 timotimo so your matrix type will double as a representation for vectors?
09:15 pierre-vigier not really, in fact you are right, i should probably not allow to access a "row"
09:15 pierre-vigier but jsut a cell
09:15 pierre-vigier in taht case, i might be able to do everything with shaped array
09:15 pierre-vigier even now
09:16 timotimo it'll still be slower than AoA ;(
09:16 dalek rakudo/nom: 6525cdf | lizmat++ | src/core/ (4 files):
09:16 dalek rakudo/nom: Move FILETEST-ACCESSED to Rakudo::Internals
09:16 dalek rakudo/nom:
09:16 dalek rakudo/nom: Also, have it return epoch, rather than Instant.
09:16 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6525cdfc30
09:17 pierre-vigier ok, i will create an accessor cell
09:17 pierre-vigier only document that one for now
09:17 pierre-vigier as it's not an important part
09:17 pierre-vigier and not expose [] operator
09:17 pierre-vigier until a further to come decision :D
09:18 pierre-vigier so i can play with both implemenation as internal only
09:18 Hotkeys Thinking about contributing to the Lingua::* part of the ecosystem
09:19 kjs_ joined #perl6
09:19 Hotkeys Linguistics is my major and perl 6 is my current programming language of interest
09:19 Hotkeys Might as well mix them together
09:20 masak Hotkeys: go for it! :)
09:20 kjs_ joined #perl6
09:21 Hotkeys I was thinking about doing part of speech tagging but it's fairly complicated
09:21 Hotkeys I might try something simpler to get my feet wet
09:21 El_Che Hotkeys: interesting
09:22 masak +1 on starting simple
09:22 burnersk joined #perl6
09:23 snarkyboojum joined #perl6
09:24 brrt another +1
09:24 brrt all working complex systems started out as simple systems :-)
09:24 El_Che and then they imploded :)
09:24 RabidGravy joined #perl6
09:25 Hotkeys Lol
09:26 Hotkeys I've never really done big ecosystem contributions before
09:26 Hotkeys This is exciting
09:26 Hotkeys By big I mean creating things rather than fixing a line somewhere etc
09:27 El_Che Hotkeys: what better scenario than in a new language?
09:27 El_Che (one heavily inspired by linguistics, even)
09:28 Hotkeys Yep
09:28 Hotkeys Much easier (you know what I mean) in a new language
09:33 dalek rakudo/nom: 509545a | lizmat++ | src/core/ (4 files):
09:33 dalek rakudo/nom: Move FILETEST-CHANGED to Rakudo::Internals
09:33 dalek rakudo/nom:
09:33 dalek rakudo/nom: Also, have it return epoch, rather than Instant.
09:33 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/509545a461
09:34 _nadim good morning
09:34 lizmat afk for a few hours&
09:34 rindolf joined #perl6
09:39 wamba joined #perl6
09:43 gfldex m: sub f (*@a where all(*) ~~ Str) { say @a>>.WHAT }; f(<a b c>);
09:43 camelia rakudo-moar 6525cd: OUTPUT«Constraint type check failed for parameter '@a'␤  in sub f at /tmp/nBjV2r82ds line 1␤  in block <unit> at /tmp/nBjV2r82ds line 1␤␤»
09:43 gfldex m: sub f (*@a where all(@a) ~~ Str) { say @a>>.WHAT }; f(<a b c>);
09:43 camelia rakudo-moar 6525cd: OUTPUT«(Array)␤»
09:43 gfldex what does * turn into in that case?
09:44 wamba joined #perl6
09:45 brrt good question....
09:45 masak it's not a whatever star, if that's what you're asking.
09:46 masak oh, the above one, in the `where` clause. sorry, I missed that one :)
09:46 gfldex i shall point you better next time
09:46 masak I don't know exactly what it turns into... but it feels inconsistent to me to expect the above one to work when the below one works!
09:47 masak (because the below one is already a thunk, you're basically over-thunking with the above one)
09:47 [ptc] joined #perl6
09:48 gfldex masak: while we are at the subject of thunk, could you add thunk and it's meaning to https://doc.perl6.org/language/glossary ?
09:48 burnersk joined #perl6
09:49 masak gfldex: I'm pretty sure I saw it in S99 the other day. maybe copy it from there?
09:50 wamba joined #perl6
09:50 cognominal_ joined #perl6
09:51 gfldex found it
09:56 salva joined #perl6
09:58 shadowpaste joined #perl6
09:58 El_Che what wat the trick again to prevent java type declarations?: has OpenLDAP::DataConsistency::ConfigInfo $info = OpenLDAP::DataConsistency::ConfigInfo.new();
09:58 El_Che $.info
09:59 dalek doc: c63d94b | (Wenzel P. P. Peppmeyer)++ | doc/Language/glossary.pod:
09:59 dalek doc: glosarify thunk
09:59 dalek doc: review: https://github.com/perl6/doc/commit/c63d94b33e
09:59 dalek doc: c4076e8 | (Wenzel P. P. Peppmeyer)++ | doc/Language/glossary.pod:
09:59 dalek doc: Merge pull request #343 from gfldex/master
09:59 dalek doc:
09:59 dalek doc: glosarify thunk
09:59 dalek doc: review: https://github.com/perl6/doc/commit/c4076e859e
10:00 M-eternaleye joined #perl6
10:00 timotimo El_Che: you want .= new
10:00 grassass joined #perl6
10:00 El_Che thank you, that was it
10:00 timotimo that works because a variable of type OpenLDAP::DataConsistency::ConfigInfo is initialized to the type object for you. and calling .= new on that is the same as what you wrote in full
10:00 El_Che I was looking at the doc, but didn't find it
10:04 _nadim Is there a way to persist variable between code blocks in a string? I searching for a P6 equivalent toText::Template and it seems I'll have to roll one.
10:05 timotimo _nadim: you can use $(...) instead of { ... }
10:05 timotimo the { } gives you an extra scope (because it's curlies and curlies do that)
10:05 masak timotimo: with the added comment that `has` declarations are special enough that `.= new` has to be fairly special-cased as well ;)
10:05 timotimo but $(...) doesn't add another scope
10:06 timotimo masak: yeah :S
10:06 timotimo masak: because with a has declaration, the initialization has to move into the BUILD/BUILDALL
10:06 _nadim timotimo: grat, I'll try it immediately
10:07 masak timotimo: yes, because it's a thunk with a `self`, which doesn't exist until then
10:07 masak vide:
10:07 masak m: class A { has $.b }; class B { has A $.a .= new(:b(self)) }; say ?B.new.a.b
10:07 camelia rakudo-moar 509545: OUTPUT«True␤»
10:07 timotimo ah, yes
10:07 timotimo verily so
10:10 leont joined #perl6
10:15 masak m: class A { has $.b }; class B { has A $.a .= new(:b(self)) }; my $b = B.new; say $b === $b.a.b # more telling
10:15 camelia rakudo-moar 509545: OUTPUT«True␤»
10:16 Amnez777 joined #perl6
10:16 lnrdo joined #perl6
10:16 Amnez777 joined #perl6
10:18 _nadim question #1 is there anything like a "Safe" as we have in P5?
10:18 peter4 joined #perl6
10:18 timotimo i don't know what that is, can you explain?
10:18 Amnez777 joined #perl6
10:19 _nadim http://search.cpan.org/~rgarcia/Safe-2.35/Safe.pm
10:19 salva joined #perl6
10:20 leont There is a restricted environment AFAIK, camelia uses it, no idea how it works
10:21 timotimo we have nothing ready-to-use like that, but our own EVAL allows you to at least supply different lexical environments
10:21 timotimo and eval cannot install new lexicals in an outer scope or anything like that
10:22 timotimo https://gnu.wildebeest.org/blog/mjw/2016/01/09/looking-forward-to-gcc6-nice-new-warnings/  -  pretty
10:22 _nadim unfortunately there's not much about that in the docs. Maybe some article, or advent, URL one can point me to?
10:22 grassass joined #perl6
10:23 timotimo i don't think so :(
10:23 _nadim It will come :)
10:24 virtualsue joined #perl6
10:24 timotimo what leont referred to is the RESTRICTED setting, which is a "first line of defense" and utterly easy to circumvent if you know a bit about internals
10:24 zakharyas joined #perl6
10:26 _nadim question #2: given a name and some value, how does one create a variable in scope? eg: ('hi', 'there') would give a $hi containing 'there'.
10:26 wollmers joined #perl6
10:27 timotimo variables and lexical scopes are compile-time constructs and are fixed at run-time
10:28 _nadim so I need to Eval this?
10:28 _nadim no Symbole table to play with?
10:29 timotimo i think so
10:31 _nadim A last one. perlsec, Safe, Opcode, Taint , ...  any documentation about this?
10:31 _nadim these
10:33 timotimo i don't think so, no
10:33 gfldex Perl 6 is untainted
10:34 _nadim gfldex: what do you mean by that?
10:35 timotimo we don't have tainting support yet
10:36 gfldex there is no tainted mode
10:37 kjs_ joined #perl6
10:44 El_Che is there an obvious way to redirect (or drop stdout). Testing a method that just prints a sample config, so I want to make sure the method executes fine, but don't care about the output
10:45 timotimo we have a module for that
10:45 timotimo IO::Capture::Simple or something?
10:45 espadrine joined #perl6
10:46 El_Che timotimo: no select function like in p5?
10:46 timotimo i've never been a perl5 programmer, so i have no idea about that :)
10:47 El_Che timotimo: in perl stdin, err en out are dynamic variables that can be changed (e.g. to a filehandle)
10:48 RabidGravy El_Che, you can just set $*OUT etc to a suitably handle like object
10:48 timotimo right
10:48 El_Che RabidGravy: I'll give it a go
10:50 _Gustaf_ joined #perl6
10:51 DrForr El_Che: promises &c replace that, I think...
10:51 timotimo i'm not sure our stdin is tappable
10:54 El_Che well, I want to omit a say in the method without needing to mock the method
10:54 timotimo right
10:55 timotimo so you either use IO::Capture::Simple or IO::MiddleMan
10:56 El_Che I get that, but it sounds silly to add a dependency just for testing, no?
10:56 rurban joined #perl6
10:57 timotimo i don't think so
10:57 timotimo sadly, we don't have a "testing-depends" or so
10:57 RabidGravy arguable, if you make your own, possibly complex, code to use in a test then you have to arrange to have that tested too
10:57 timotimo https://github.com/sergot/IO-Capture-Simple/blob/master/lib/IO/Capture/Simple.pm - look how simple that is
10:58 El_Che timotimo: I agree
10:58 RabidGravy timotimo, sure we do, unfortunately panda at the moment just flattens all the test-depends, build-depends and depends into one dependency list
10:58 timotimo oh!
10:58 timotimo well, of course it does. because it decides to build and test stuff before installing :)
10:58 timotimo though with --notests it could skip the test-depends part
10:59 RabidGravy yeah
10:59 El_Che META.info only has @depends
10:59 anaeem1_ joined #perl6
10:59 RabidGravy no, really it has test-depends and build-depends as well
10:59 timotimo what pieces of the infrastructure allow for that?
11:00 RabidGravy http://design.perl6.org/S22.html#build-depends
11:00 El_Che Not in the doc: http://doc.perl6.org/language/modules#Distributing_Modules . Leave the doc as it is, untill panda supports test en build-depends?
11:00 timotimo we have a meta info tester. does it respect that? we have docs. do they mention it?
11:01 RabidGravy Test::META suppports it yeah, but as it's "optional" there's not much it can do with it
11:01 timotimo right.
11:02 RabidGravy El_Che, I think it should probably be in that document because panda *does* support them, just not very cleverly and future software may do better
11:04 El_Che Adding it and people will expect it to work.
11:05 El_Che Adding a note make it somewhat too verbose
11:05 RabidGravy iit does "work" inasmuch as a test-depends or build-depends gets added to the dependencies
11:06 El_Che * Support for this entry is planned to work in future versions of Perl 6 module installers like panda and zef.
11:06 El_Che RabidGravy: I get that, but that's pretty useless, no?
11:07 RabidGravy whatever
11:08 zengargoyle hrm, what replaced «as IO» in: sub foo(:$path as IO) { ... }
11:08 timotimo IO(AcceptableSupertypes)
11:08 timotimo alternatively just IO()
11:08 timotimo (that'll be the same as IO(Any), but IO(Cool) may be more helpful)
11:09 zengargoyle thanks
11:09 timotimo yw
11:10 zengargoyle fixing up old module post xmas....
11:10 timotimo good :)
11:10 * zengargoyle wonders how experimental «pack» is....
11:11 timotimo we don't guarantee that it'll work in the future. but i believe through the use v6.c syntax you can get the current implementation for a long-ish time
11:11 RabidGravy zengargoyle, it's more that people don't like and think something better can be done but nothing better has emerged
11:11 zengargoyle Text::Fortune needs simple pack/unpack of the .dat
11:11 timotimo how simple is it?
11:11 timotimo can you share a link?
11:11 kjs_ joined #perl6
11:12 zengargoyle just 'N' and 'C'
11:13 timotimo num and char?
11:13 timotimo no, num makes no sense
11:13 timotimo integers and characters?
11:13 zengargoyle https://github.com/zengargoyle/Text-Fortune/blob/master/lib/Text/Fortune.pm6
11:14 zengargoyle yeah, integers and one char
11:14 timotimo ah, as simple as that
11:14 zengargoyle $dat.read(4).unpack('N'); like
11:14 timotimo yeah, yeah
11:15 timotimo we really need a good primitive to move between common representations of things and simple bufs ...
11:15 RabidGravy the code for unpack isn't particularly complex, you could just rip that part for your own code
11:15 pat_js joined #perl6
11:20 TimToady joined #perl6
11:21 rurban joined #perl6
11:25 pat_js I have a question about the chunks method of the Match objects
11:26 timotimo do you mean "caps"?
11:26 pat_js no I mean the chunks
11:26 moritz pat_js: ask away
11:26 pat_js why is the value sometimes a Str and sometimes a submatch?
11:26 pat_js especially when the key is ~
11:27 moritz pat_js: because it gives the string in chunks that matches and chunks that didn't get matched by anything
11:27 timotimo ah, i didn't even know about the chunks method yet :)
11:27 moritz or not by a submatch, at least
11:27 timotimo oh hey moritz!
11:27 moritz pat_js: and the ~ key is for things that weren't matched by a submtach
11:27 moritz \o timotimo
11:28 moritz pat_js: see also: http://doc.perl6.org/routine/chunks
11:28 moritz if you don't want the parts that didn't get matched by something capturing, use .caps
11:29 pat_js but how do I find out where the sub strings indicated by '~' are located?
11:29 timotimo i wonder: should we collect a list of examples from examples.perl6.org that demonstrate use of a given method well (-ish)?
11:29 timotimo pat_js: i'd assume you'd take the .to of the previous entry and the .from of the following (-1 on the .from, probably)
11:29 pat_js that's where i came from.
11:30 pat_js timotimo: but that's very statefull, I wanted to avoid that.
11:30 timotimo i don't see a good reason why it wouldn't mix in a role with .from and .to into the strings that are keyed with ~
11:30 brachtmax joined #perl6
11:31 timotimo perhaps a .orig to make it more compatible with the submatches
11:32 pat_js perl6: grammar {rule TOP{<x> <y>};token x{x*}; token y{y*}}.parse('x y').chunks».value».from
11:32 camelia rakudo-moar 509545: OUTPUT«Method 'from' not found for invocant of class 'Str'␤  in block <unit> at /tmp/tmpfile line 1␤␤»
11:32 camelia ..rakudo-jvm 6c0f93: ( no output )
11:33 timotimo yeah
11:33 pat_js perl6: grammar {rule TOP{<x> <y>};token x{x*}; token y{y*}}.parse('x y').chunks».value».from
11:33 camelia rakudo-jvm 6c0f93: OUTPUT«Method 'from' not found for invocant of class 'Str'␤  in block <unit> at /tmp/tmpfile:1␤␤»
11:33 camelia ..rakudo-moar 509545: OUTPUT«Method 'from' not found for invocant of class 'Str'␤  in block <unit> at /tmp/tmpfile line 1␤␤»
11:33 pat_js oh sorry, didn't want to paste it again.
11:33 timotimo i'm suggesting to change the chunks method to make that work
11:33 timotimo it'll have a performance impact, though
11:34 itaipu joined #perl6
11:35 El_Che tadzik: how strict does Config::INI needs to be? I see it does not support #comments as pretty common on unix config files.
11:46 pat_js is there a "Substring Role"? I highly doubt that. Maybe the case is too specific.
11:50 pierre-vigier joined #perl6
11:50 * zengargoyle will make getting rid of «use experimental :pack;» in Text::Fortune a TODO item for later. :)  probably along with a major re-think as T::F was my first Perl 6 module from long ago and is a bit icky.  but it passes tests again...
11:51 FROGGS pat_js: what would this role do?
11:53 timotimo FROGGS: it'd probably look a bit like Match; .orig, .from, .to
11:55 pat_js FROGGS: I was just pondering, because of my problem higher up. timotimo suggested that a role should be mixed into the string that come as values to '~' in the result of the .chunks method
11:55 nine El_Che: even if the *depends are merge into one list at installation by panda, it makes still sense. For example uninstall might want to check if other modules depend on the to-be-uninstalled one and warn if so. There we don't want to see build or test-depends
11:58 aenaxi joined #perl6
12:00 Skarsnik joined #perl6
12:02 Skarsnik Helo
12:04 awwaiid Why is &prefix:<+^> bitwise negation (instead of &prefix:<-^>) ? ohhh wait.... duh, the "+" is just the bitwise op indicator. Nevermind... posted here for posterity
12:04 timotimo yeah, it's not 100% fantastic
12:04 uruwi_ joined #perl6
12:06 timotimo but it's still nice to have the indicator in front
12:06 Actualeyes joined #perl6
12:06 dalek rakudo/nom: 8b227ba | lizmat++ | src/core/Exception.pm:
12:06 dalek rakudo/nom: Add X::IO::Unknown exception class
12:06 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8b227ba896
12:06 dalek rakudo/nom: 9b8773d | lizmat++ | src/core/Rakudo/Internals.pm:
12:06 dalek rakudo/nom: Handle errors from nqp::fileops
12:06 dalek rakudo/nom:
12:06 dalek rakudo/nom: Turns out some of the nqp::fileops can actually return -1, which would
12:06 dalek rakudo/nom: cause a false positive.
12:06 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9b8773d709
12:11 RabidGravy I don't suppose there is some succinct mechanism whereby if one has a list of Callables then you can run all those that match the supplied args ?
12:12 moritz m: ( -> { say 'argless'}, -> Int { say 'Int'} )>>.?()
12:12 camelia rakudo-moar 9b8773: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Q9muFK6BLn␤Cannot use .? on a non-identifier method call␤at /tmp/Q9muFK6BLn:1␤------> 3 'argless'}, -> Int { say 'Int'} )>>.?()7⏏5<EOL>␤»
12:13 RabidGravy sort of lke "'@callables>>.(@args)" but with a grep on the signatures involved
12:13 moritz m: $_.?() for ( -> { say 'argless'}, -> Int { say 'Int'} )
12:13 camelia rakudo-moar 9b8773: OUTPUT«5===SORRY!5=== Error while compiling /tmp/rIg726aRHt␤Cannot use .? on a non-identifier method call␤at /tmp/rIg726aRHt:1␤------> 3$_.?()7⏏5 for ( -> { say 'argless'}, -> Int { say␤»
12:14 moritz RabidGravy: we have .?method() for invoking-if-signature-matches, but it doesn't seem to work direction invocation
12:14 moritz which is a shame
12:15 RabidGravy so grep then
12:15 gfldex m: ( -> { say 'argless'}, -> Int { say 'Int'} )>>.?&postfix:<<()>>
12:15 camelia rakudo-moar 9b8773: OUTPUT«5===SORRY!5=== Error while compiling /tmp/SCh2kPAlMf␤Undeclared routine:␤    postfix:<()> used at line 1. Did you mean 'postfix:<i>', 'postfix:<-->', 'postfix:<ⁿ>', 'postfix:<++>'?␤␤»
12:16 gfldex is .() an operator?
12:16 moritz m: (-> { say 'argless'}).()
12:16 camelia rakudo-moar 9b8773: OUTPUT«argless␤»
12:16 moritz gfldex: ^^ yes
12:16 gfldex how is it defined?
12:16 moritz same as (), roughly (but it doesn't for the "everything followed by () is a routine invocation" rule)
12:17 lnrdo joined #perl6
12:18 Skarsnik hm, does that loop on a recent rakudo? https://gist.github.com/Skarsnik/df17adee07c18fa52c00
12:18 RabidGravy m: ( -> { say 'argless'}, -> Int { say 'Int'} ).grep(())>>.()
12:18 camelia rakudo-moar 9b8773: ( no output )
12:18 RabidGravy m: ( -> { say 'argless'}, -> Int { say 'Int'} ).grep(:())>>.()
12:18 camelia rakudo-moar 9b8773: ( no output )
12:19 RabidGravy er, something like that anyway
12:19 brrt joined #perl6
12:19 gfldex m: ( -> { say 'argless'}, -> Int { say 'Int'} )>>.?&postcircumfix:<( )>;
12:19 camelia rakudo-moar 9b8773: OUTPUT«5===SORRY!5=== Error while compiling /tmp/4Rk2UMC3ce␤Undeclared routine:␤    postcircumfix:<( )> used at line 1. Did you mean 'postcircumfix:<{ }>', 'postcircumfix:<[ ]>', 'postcircumfix:<[; ]>', 'postcircumfix:<{; }>'?␤␤»
12:19 lizmat Skarsnik: could you try renaming Channel to something else?  Perhaps some interaction with the built in Channel ?
12:19 timotimo i don't think you can do it like that, Skarsnik
12:20 Skarsnik yes, but that make rakudo go on forever. Should it stop to resolve the circular dependancy?
12:20 dalek rakudo/nom: 6edbd16 | lizmat++ | src/core/IO.pm:
12:20 dalek rakudo/nom: Remove untested, undocced, unused version of IO.all
12:20 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6edbd163d9
12:21 RabidGravy m: ( -> { say 'argless'}, -> Int { say 'Int'} ).grep(\())>>.()
12:21 camelia rakudo-moar 9b8773: ( no output )
12:21 vytas timotimo, are you planning to do perl6 weekly ? :P
12:21 Skarsnik It's the montly perl6 weekly :)
12:21 timotimo vytas: yeah ... yesterday i wasn't feeling well at all, so i didn't get around to doing anything at all
12:21 RabidGravy m: ( -> { say 'argless'}, -> Int { say 'Int'} ).grep({ $_.signature ~~ \()})>>.()
12:21 camelia rakudo-moar 9b8773: ( no output )
12:21 timotimo i hope i can do it today, but today is also a bit of a busy day
12:21 vytas timotimo, fair play :)) thanks
12:22 RabidGravy I'm sure I can work this out
12:23 ilmari m: ( -> { say 'argless'}, -> Int { say 'Int'} ).grep({ $_.signature ~~ :()})>>.()
12:23 camelia rakudo-moar 9b8773: OUTPUT«argless␤»
12:24 RabidGravy yay!
12:24 ilmari m: .WHAT.say for :(), \()
12:24 camelia rakudo-moar 9b8773: OUTPUT«(Signature)␤(Capture)␤»
12:24 Skarsnik lizmat, renaming the class change nothing ^^
12:24 lizmat :-(
12:25 muraiki joined #perl6
12:26 timotimo Skarsnik: as i said, you're apparently building a totally common use-loop
12:27 timotimo well, i didn't say it exactly like that
12:27 Skarsnik Yes, but should it detect it? x)
12:27 timotimo hm.
12:27 timotimo well, it could, i guess
12:27 RabidGravy I thought it used to to be honest
12:27 pjscott joined #perl6
12:27 RabidGravy at least at the first level
12:27 timotimo it used to be honest? :P
12:28 Skarsnik I can't install another rakudo aside this one. I don't have free space x)
12:28 RabidGravy now it's corrupt and deceitful
12:28 RabidGravy anyway, off out for about
12:28 nine RabidGravy: yes we had a circular dependency detection.
12:29 sjoshi joined #perl6
12:29 Skarsnik hm, let add space to this system
12:30 lizmat Skarsnik: I just found out I had 350MB of precomp in my ~/.perl6 dir
12:30 lizmat perhaps that needs cleaning
12:30 Skarsnik oh
12:30 Skarsnik root@testperl6:~/piko/Discord# du -sh  ~/.perl6/
12:30 Skarsnik 39M     /root/.perl6/
12:30 Skarsnik not that bad x)
12:33 timotimo i only have 18mb in there
12:34 lnrdo joined #perl6
12:34 nine if you compile rakudo a couple times per day, it accumulates faster
12:35 timotimo right
12:36 Skarsnik let's update virtual box )
12:36 AlexDaniel joined #perl6
12:38 lizmat every commit I do, is at least one compile + spectest cycle
12:38 AlexDaniel huggable: help
12:38 huggable AlexDaniel, I'm a factoid bot. See me my source at https://github.com/zoffixznet/perl6-IRC-Client-Plugin-Factoid
12:40 sena_kun joined #perl6
12:41 sammers joined #perl6
12:42 virtualsue joined #perl6
12:42 AlexDaniel huggable: @arr.flat as 「Array.flat」 is gesigned to flat shaped arrays. See https://rt.perl.org/Public/Bug/Display.html?id=127121
12:42 huggable AlexDaniel, nothing found
12:43 AlexDaniel huggable: flat as 「Array.flat」 is gesigned to flat shaped arrays. See https://rt.perl.org/Public/Bug/Display.html?id=127121
12:43 huggable AlexDaniel, nothing found
12:43 lnrdo joined #perl6
12:43 timotimo you need ":is:"
12:43 AlexDaniel huggable: @arr.flat :is: 「Array.flat」 is gesigned to flat shaped arrays. See https://rt.perl.org/Public/Bug/Display.html?id=127121
12:43 huggable AlexDaniel, Added @arr.flat as 「Array.flat」 is gesigned to flat shaped arrays. See https://rt.perl.org/Public/Bug/Display.html?id=127121
12:43 AlexDaniel huggable: @arr.flat
12:43 huggable AlexDaniel, 「Array.flat」 is gesigned to flat shaped arrays. See https://rt.perl.org/Public/Bug/Display.html?id=127121
12:43 AlexDaniel ok
12:44 AlexDaniel gesigned… dammit
12:44 timotimo hahaha
12:44 AlexDaniel huggable: ^delete @arr.flat
12:44 huggable AlexDaniel, Marked factoid `@arr.flat` as deleted
12:44 timotimo it seems like you can just :is: it again and it'll be edited
12:44 AlexDaniel huggable: @arr.flat :is: 「Array.flat」 is designed to flat shaped arrays. See https://rt.perl.org/Public/Bug/Display.html?id=127121
12:44 huggable AlexDaniel, Added @arr.flat as 「Array.flat」 is designed to flat shaped arrays. See https://rt.perl.org/Public/Bug/Display.html?id=127121
12:44 AlexDaniel huggable: @arr.flat
12:44 huggable AlexDaniel, 「Array.flat」 is designed to flat shaped arrays. See https://rt.perl.org/Public/Bug/Display.html?id=127121
12:45 AlexDaniel I'm not sure if “to flat” is correct English, it is probably not…
12:45 timotimo nah, "to flatten" should be right
12:45 lizmat flatten
12:45 AlexDaniel huggable: @arr.flat :is: 「Array.flat」 is designed to flatten shaped arrays. See https://rt.perl.org/Public/Bug/Display.html?id=127121
12:45 huggable AlexDaniel, Added @arr.flat as 「Array.flat」 is designed to flatten shaped arrays. See https://rt.perl.org/Public/Bug/Display.html?id=127121
12:45 AlexDaniel huggable: @arr.flat
12:45 huggable AlexDaniel, 「Array.flat」 is designed to flatten shaped arrays. See https://rt.perl.org/Public/Bug/Display.html?id=127121
12:45 AlexDaniel great
12:47 timotimo it seems like the ^delete step is also recorded as just an edit
12:47 dalek rakudo/nom: 997d7d1 | lizmat++ | src/core/ (2 files):
12:47 dalek rakudo/nom: Make RAKUDO_MODULE_DEBUG output a bit more readable
12:47 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/997d7d1e5a
12:47 AlexDaniel huggable: hyper problems :is: See https://rt.perl.org/Public/Bug/Display.html?id=127099 and https://rt.perl.org/Public/Bug/Display.html?id=127190
12:47 huggable AlexDaniel, Added hyper problems as See https://rt.perl.org/Public/Bug/Display.html?id=127099 and https://rt.perl.org/Public/Bug/Display.html?id=127190
12:48 dalek roast/linkable-anchors: 64b031f | (Brock Wilcox)++ | S03-operators/bit.t:
12:48 dalek roast/linkable-anchors: Add annotations to make roast deep-linkable
12:48 dalek roast/linkable-anchors: review: https://github.com/perl6/roast/commit/64b031f651
12:49 AlexDaniel huggable: ugly stacktraces :is: Indeed, stacktraces are less than awesome due to how precompilation works. This is a known issue. There is also a bug report: https://rt.perl.org/Public/Bug/Display.html?id=126908
12:49 huggable AlexDaniel, Added ugly stacktraces as Indeed, stacktraces are less than awesome due to how precompilation works. This is a known issue. There is also a bug report: https://rt.perl.org/Public/Bug/Display.html?id=126908
12:49 nine AlexDaniel: you could probably /msg that to the bot
12:51 AlexDaniel nine: oh yeah, perhaps. Though maybe it is useful for others to see what I am adding. I hope that it's not too spammy
12:52 sena_kun Where does panda store modules? I removed .perl6 but they are still here.
12:53 nine m: say CompUnit::RepositoryRegistry.repository-for-name("site");
12:53 camelia rakudo-moar 997d7d: OUTPUT«inst#/home/camelia/rakudo-m-inst-1/share/perl6/site␤»
12:53 nine sena_kun: ^^^
12:53 FROGGS nine: can we already query a module for its storage location?
12:54 FROGGS nine: or at least which cur is responsible?
12:55 FROGGS nine: or what was the pendant of .candidates again?
12:56 nine FROGGS: no that's unmerged in the query_repos branch
12:57 nine That branch contains even an uninstall method
12:57 timotimo neato!
12:58 kaare_ joined #perl6
12:58 FROGGS uhhhh!
12:58 FROGGS nine++
12:58 FROGGS bbl
13:01 nine The thing with uninstall is, that it takes a Distribution object leaving the question, where this object is coming from. That could be $*REPO.resolve(CompUnit::DependencySpecification(:short-name<Inline::Perl5>, :ver(v0.1)).dist but that feels like a bit of a roundabout way.
13:02 nine my $comp-unit = $*REPO.resolve(CompUnit::DependencySpecification(:short-name<Inline::Perl5>, :ver(v0.1)); $comp-unit.repo.uninstall($comp-unit.dist);
13:03 brrt joined #perl6
13:04 sftf joined #perl6
13:05 sena_kun If it works, then where is the problem? Bad code you can rewrite as fast as you find better solution and make a commit, but everytime reinstalling all perl6 by hands - isn't it harder/worse?
13:06 nine sena_kun: I'm not sure what you mean?
13:06 nine sena_kun: are you arguing for merging that branch?
13:06 sena_kun nine, *
13:07 DrForr And '*' means what?
13:08 sena_kun nine, you said that code above is a bit unclear and smells. But if it works... I can't be confident, because I don't know rules of merging here, but I don't think that package manager without "uninstall" button is strange anyway.
13:09 sena_kun s/don't//
13:10 masak hello from a _train_ \o/
13:10 nine sena_kun: we're currently figuring out how to do backwards incompatible changes in Perl 6. I think we have a decent plan and we have made progress on the implementation and I think we can merge that soon. Then we can return to merge feature branches quickly.
13:10 timotimo yo masak, happy training!
13:11 sena_kun DrForr, I just sent notification, because I forgot it in previous message. So '*' means something like 'Look at previous message'.
13:12 DrForr Ah.
13:12 timotimo i think in this channel we usually write ^, ^^ or ^^^
13:12 timotimo or sometimes even ^^^^
13:12 sena_kun nine, if it so - okay, sorry for arguing about things I don't know well yet.
13:12 masak timotimo: the actual training is tomorrow :P
13:13 DrForr masak: What on, if I might ask?
13:13 DrForr (as I might want to compare notes...)
13:13 sena_kun timotimo, thanks.
13:13 lizmat m: .say for dir
13:13 camelia rakudo-moar 997d7d: OUTPUT«"/home/camelia/.cpanm".IO␤"/home/camelia/.local".IO␤"/home/camelia/.npm".IO␤"/home/camelia/.perl6".IO␤"/home/camelia/.perlbrew".IO␤"/home/camelia/.rcc".IO␤"/home/camelia/.ssh".IO␤"/home/camelia/Perlito".IO␤"/home/camelia/evalbot".IO␤"/hom…»
13:14 lizmat and here I thought we had disallowed dir() without args ?
13:14 Skarsnik ok, recent rakudo still does not see the circular depandacy
13:14 lizmat m: .say for dir("")   # ah, the empty string
13:14 camelia rakudo-moar 997d7d: OUTPUT«Must specify something as a path: did you mean '.' for the current directory?␤  in block <unit> at /tmp/IW7Ca8r0u2 line 1␤␤»
13:14 nine sena_kun: just shows you care :)
13:15 daxim http://doc.perl6.org/»   click on the link titled "'»' is a regex" - 404
13:16 travis-ci joined #perl6
13:16 travis-ci Doc build canceled. Wenzel P. P. Peppmeyer 'Merge pull request #343 from gfldex/master
13:16 travis-ci https://travis-ci.org/perl6/doc/builds/101789123 https://github.com/perl6/doc/compare/fcaf3ec03cb6...c4076e859e1a
13:16 travis-ci left #perl6
13:17 grassass joined #perl6
13:17 rurban1 joined #perl6
13:18 daxim http://doc.perl6.org/syntax/$/   likewise 404
13:18 gfldex https://doc.perl6.org/syntax/%24 <-- works
13:18 masak DrForr: Git, this time
13:19 timotimo why don't we try an automated crawler that reports 404s?
13:19 daxim I don't want $ I want $/
13:19 DrForr Cool. I could probably use that course :)
13:19 masak DrForr: we seem to have a constant trickle of Git deliveries. (and we like that, because we have lots of in-house Git knowledge.)
13:22 suman joined #perl6
13:22 sjoshi joined #perl6
13:22 AlexDaniel by the way, non-texas version of ^ is ↑ (though any other unicode arrow will do)
13:23 masak m: say 1 ^ 2; say 1 ↑ 2
13:23 camelia rakudo-moar 997d7d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/07tA4JwXOh␤Confused␤at /tmp/07tA4JwXOh:1␤------> 3say 1 ^ 2; say 17⏏5 ↑ 2␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        statem…»
13:23 masak AlexDaniel: Rakudo seems to disagree.
13:23 suman There's a great need to improve Perl 6 documentation. While python's documentation is awesome, perl 6 has still a lot to go.
13:23 AlexDaniel in IRC, not in Perl 6 :D
13:23 xyf joined #perl6
13:24 wamba joined #perl6
13:25 DrForr suman: Volunteers gladly accepted!
13:25 AlexDaniel it seems that you can't enter ↓ and ↑ using compose key by default
13:25 DrForr Hrm, I could use that to add the tetration operator :)
13:26 Skarsnik Cool be nice to have a tool provided with rakudo like debianbugrepport x)
13:26 DukeOfPerl joined #perl6
13:26 daxim AlexDaniel, AltGr+y …+u …+i …+U on a qwerty ←↓→↑
13:27 Skarsnik ok circular dependancy repported x) https://rt.perl.org/Ticket/Display.html?id=127247
13:27 daxim also, if you install kragen's .XCompose, you get Compose - > resulting →
13:27 AlexDaniel daxim: what the idea behind those?
13:27 daxim define idea
13:28 AlexDaniel daxim: U perhaps stands for Up, but what about the others?
13:28 AlexDaniel <- and -> are supported by compose key in linux by default
13:28 AlexDaniel it's just that there is no ↑↓
13:29 nine Skarsnik: AFAIK there's already an open ticket for that
13:30 nine Skarsnik: I merged the tickets
13:30 daxim you assume they were chosen for mnemonic value, but this isn't the case!
13:30 Skarsnik erf, sorry
13:30 dalek rakudo/nom: 5ed58f6 | lizmat++ | / (6 files):
13:30 dalek rakudo/nom: Rip out remaining dead code from newio branch
13:30 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5ed58f6dbd
13:31 daxim with kragen's .XCompose:  (Compose up up) or (Compose - ^) giving ↑, (Compose down down) or (Compose - v) giving ↓
13:31 suman And also we don't have much video tutorials on youtube, even for perl 5.  While python has thousands (PyData, Enthought, Continuum) and what not. Its easier to migrate to python for newcomers due to vast amount of video tutorials and resources. We need to have the same abreadth of materials for perl 6 too.
13:31 xpen joined #perl6
13:32 daxim I want a pony.
13:32 AlexDaniel daxim: that totally makes sense and it is great
13:32 dalek roast: b6f5abc | lizmat++ | S (2 files):
13:32 dalek roast: Remove references to dead code of newio branch
13:32 dalek roast:
13:32 dalek roast: The code was not referenced, and could only be run if you knew of
13:32 dalek roast: its internals.  So, as far as I'm concerned, this is a valid change
13:32 dalek roast: to the 6.c version of roast and to be cherry-picked if necessary.
13:32 dalek roast: review: https://github.com/perl6/roast/commit/b6f5abc232
13:33 masak heh, I just found http://blogs.perl.org/users/leon_timmermans/2010/04/why-perl-6-is-different.html
13:33 AlexDaniel suman: I don't think that anybody will disagree with that. The question is, who is going to do that (if not you)? :)
13:33 masak apparently macros in Perl 6 are really really cool :P
13:33 moritz masak: make it true!
13:34 masak on a more serious note, I find it difficult to engage in that comment thread, because they're talking about Perl 6 macros without any knowledge of what has happened since the Big Investigation started
13:34 masak let me take some examples, and leave it at that:
13:34 _nadim can one scope a "use Module::Something"?
13:34 lizmat afk for a few hours again&
13:35 masak from the post itself: "In Lisp macros are possible because its uniform syntax of trees of symbols. In Perl 6 macros are made possible by its key innovation."
13:35 moritz masak: I saw the hn submission of the article with (2010) in the heading, and immediately decided not to read it
13:35 masak I don't really know what that means :)
13:35 masak oh! 2010!
13:35 masak that makes more sense, then
13:35 Skarsnik x)
13:35 moritz _nadim: imports are lexical anway
13:35 masak anyway
13:35 masak Qtrees are pretty un-Lisp-like at this point
13:36 suman AlexDaniel unfortunately I am also a newbie. I am myself learning python with the videos I have heard of perl's power of text processing. Thus I am fascinated towards perl. However I am having difficulty learning it myself. Definitely I don't have enough materials.
13:36 masak the closer comparison is IntelliJ's PSI
13:36 DukeOfPerl joined #perl6
13:36 AlexDaniel suman: that's really, really good! You're the one that can do this job better than others!
13:37 * DukeOfPerl has been working towards Perl AI since 1965, before Perl came to be.
13:37 DrForr suman: Perl 5 is better documented by far, but Perl 6 is new, and you sound like you'd be an ideal candidate for stumbling into the dark holes where things are missing :)
13:37 masak "The reason lisps are what they are is that they're homoiconic, i.e. the representation of the program is also a data structure [...] of the language itself." -- this is true in Perl 6. Qtrees are a data structure of the language itself.
13:37 DukeOfPerl http://ai.neocities.org/P6AI_man.html -- Killer App User Manual
13:37 * DukeOfPerl is getting out of Dodge after a drive-by P6AI meme-insertion.
13:38 _nadim moritz: thanks for the information
13:39 masak "How would I define the equivalent of a Lisp macro to turn (5 10 /) into (/ 10 5) in Perl 6?" -- the current answer, unimplented so far but fairly straightforward, is visitor macros. (or perhaps they will be called "watcher macros")
13:39 AlexDaniel .u ????
13:39 yoleaux U+1F42A DROMEDARY CAMEL [So] (????)
13:39 AlexDaniel .u ????
13:39 yoleaux U+1F42B BACTRIAN CAMEL [So] (????)
13:39 masak (as in "watcher doin' there, buddy?") :P
13:39 AlexDaniel two camels in unicode but no butterfly
13:39 AlexDaniel whyyy…
13:40 suman DrForr even the documentation should look attractive I guess :) May be we can change theme of perl 5 documentation. No offense, I find python's documenation eegant.
13:40 masak "Lisp is not something to aspire to. It's alleged beauty lies in its rejection of all the useful tools of communication in favor of the dubious benefits of homoiconicity." -- good news! Qtrees don't turn everything into a cons list! :D
13:40 lizmat m: say ++"????"
13:40 camelia rakudo-moar 997d7d: OUTPUT«Cannot call prefix:<++>(Str); none of these signatures match:␤    (Mu:D $a is rw)␤    (Mu:U $a is rw)␤    (Int:D $a is rw)␤    (int $a is rw)␤    (Bool $a is rw)␤    (Num:D $a is rw)␤    (Num:U $a is rw)␤    (num $a is rw)␤  in block <uni…»
13:40 daxim U+1F98B BUTTERFLY
13:40 lizmat m: my $a = "????"; $a++; say $a
13:40 camelia rakudo-moar 997d7d: OUTPUT«????␤»
13:40 lizmat m: my $a = "????"; $a++; say $a.uniname
13:40 camelia rakudo-moar 997d7d: OUTPUT«BACTRIAN CAMEL␤»
13:40 lizmat m: my $a = "????"; say $a.uniname; $a++; say $a.uniname
13:40 camelia rakudo-moar 997d7d: OUTPUT«DROMEDARY CAMEL␤BACTRIAN CAMEL␤»
13:40 lizmat :-)
13:40 masak "I hope Perl 6 only steals some aspects of macro from Lisp. I hope it stays true to Perl 1-5's design, that is: caring about syntax and making things easy for the programmers instead of parsers." -- check.
13:41 masak that is all.
13:41 masak lizmat: that looks like a lightning talk all on its own :P
13:42 lizmat it's just an easter egg I put in long ago  :-)
13:42 arnsholt masak: Where are those quotes from?
13:43 arnsholt nm. I learned how to backlog
13:43 masak http://blogs.perl.org/users/leon_timmermans/2010/04/why-perl-6-is-different.html
13:43 [Coke] m: CORE::.values.map({$_.WHAT}).grep(* !~~ Sub) # Is this a bug?
13:43 camelia rakudo-moar 997d7d: ( no output )
13:43 AlexDaniel Zoffix++ # nice blog post
13:44 [Coke] (locally that dies with a complaint about shortname)
13:44 masak I found nothing all that quoteworthy from the HN thread: https://news.ycombinator.com/item?id=10884950
13:44 lizmat [Coke]: because IterationEnd lives in CORE::, .values doesn't work right on CORE::
13:44 lizmat zefram++ pointed that out extensively
13:44 DrForr suman: It's not going to get better without people working on it, how about it?
13:45 suman DrForr
13:45 suman DrForr Yeah I agree. I will contribute as much as I can.
13:46 masak no need for that double negation. it *is* going to get better *with* people working on it -- right? ;)
13:46 nine m: say CORE::.values.map({$_.WHAT}).grep(* !~~ Sub)
13:46 camelia rakudo-moar 997d7d: OUTPUT«Method 'shortname' not found for invocant of class 'Perl6::Metamodel::CurriedRoleHOW'␤  in block <unit> at /tmp/41NzwQrmnJ line 1␤␤»
13:46 masak I mean, that seems to be the likely path ahead to me.
13:47 DrForr Cool! I'm probably going to write some placeholder s/// docs this weekend...
13:48 masak does anyone else find adverb node attachment hard to reason about in practice?
13:48 moritz masak: me
13:48 masak I just had a situation where I inserted a `&&` in code, and the `&&` "stole" the adverb from a .{}
13:48 jnthn lizmat: IterationEnd will likely end up becoming a term defined in the compiler and mapped to something under Rakudo::Internals.
13:49 AlexDaniel oh wow
13:49 AlexDaniel who's that? :)
13:49 AlexDaniel jnthn: I missed you! :)
13:49 jnthn o/ AlexDaniel :)
13:50 masak jnthn! \o/
13:50 jnthn masak: I think that in no small part comes from them being parsed as pretend infixes...
13:50 [Coke] I've spotted a wild jnthn++ !
13:50 jnthn And so precedence comes in to play.
13:50 masak jnthn: thing is, it's *correct* semantics. after the fact, I can explain to myself how it happened
13:51 masak jnthn: but it still makes me think, because I tend to want to understand things that trip me up
13:51 masak jnthn: it seems I need something like a mental rule "hey, there's an adverb here. proceed with caution -- don't just insert more infixes before it"
13:51 jnthn I guess you can use "and" instead of && to fix the case in question?
13:52 masak probably. but that's off-putting to me, since I always use `&&` in `if` statements
13:52 masak I only use `and` between statements
13:56 sergot http://doc.perl6.org/routine/.%3F
13:57 rurban1 joined #perl6
13:57 sergot there is a problem when searching for ? and clicking "Postfix .?"
13:57 jnthn masak: Yes, can sympathize with that...
13:57 masak jnthn: I ended up writing it as `$expr && ($obj{$key} :exists)`
13:57 [Coke] sergot: can you open a ticket on github.com/perl6/doc/issues ?
13:58 [Coke] sergot: We have a few cases where the search or the filename is wonky still
13:58 moritz iirc there are several open issues regarding search and/or weird URLs
13:58 sergot [Coke]: of course :)
13:58 moritz our options are limited as long as we remain with static pages
13:59 raiph joined #perl6
14:00 AlexDaniel moritz: what about something like this: http://stackoverflow.com/questions/16136521/apache-mod-rewrite-path-name-as-query-parameters
14:01 moritz AlexDaniel: that requires dynamic content, yes
14:01 AlexDaniel right
14:02 AlexDaniel or at least some kind of a wrapper
14:02 AlexDaniel wait, I think that I wanted to do it other way round
14:02 sena_kun left #perl6
14:02 moritz AlexDaniel: though when we do that, we can use the URL routing facility of the web framework we use; don't need to use mod_rewrite then
14:03 moritz AlexDaniel: the problem is that / can't be part of file names, and there are some odditiies with dots too
14:03 lucs Does anything like 'stat' exist yet?
14:03 AlexDaniel moritz: right
14:03 moritz mapping // as a search term to //.html is... problematic :-)
14:03 timotimo lucs: yeah, we have something™
14:03 sergot moritz: what stops us from making it dynamic? I remember there was an issue with p6 speed, is it still the thing?
14:04 sergot moritz: I mean, writing dynamic framework or something
14:04 moritz sergot: speed and stability matter, yes
14:04 lucs timotimo: "something™", right :)  Any details?
14:04 timotimo i ... don't know details :o
14:04 sergot moritz: oh, ok, thanks :)
14:04 AlexDaniel lucs: what do you need exactly?
14:04 wollmers jnthn: bitops with uint64 work with my module LCS::BV, using bit vectors and carry.
14:04 timotimo i never work with files, you know ...
14:04 timotimo we have things like .e for exists, though
14:04 moritz sergot: and one of the main things: writing it is not enough; it needs to maintained
14:05 lucs AlexDaniel: Get a file's owner user/group.
14:05 sergot moritz: right
14:05 sergot sounds like a good GSoC project, hehe :)
14:05 moritz sergot: and since I seem to be the one who runs most of the *.perl6.org infrastructure and thus end up maintaining it, I don't want anything clever
14:05 jnthn wollmers: Is there a reason you're telling me this? :) (Note, I didn't backlog...)
14:05 AlexDaniel lucs: ehhh I don't see how could you retrieve those, but you can change it: http://doc.perl6.org/type/IO::Path#routine_chmod
14:06 jnthn wollmers: Or is the point that your module is doing something right that core is doing wrong?
14:06 sergot moritz: right, is it a matter of "no one else wants to do this", or something else?
14:06 sergot moritz: I mean, maintaining *.perl6.org
14:06 wollmers jnthn: I submitted a bug long ago. But only sprintf has the problem.
14:06 moritz sergot: seems like
14:06 jnthn wollmers: Ah, OK
14:07 sergot moritz: well, I think I can give you a pair of hands... I guess..
14:07 jnthn I think there are other issues with uint64
14:07 moritz sergot: whenever there's problem with the infrastructure side, nothing happens until I do it; I'd be happy to have help with it though :-)
14:07 [Coke] Given how slow it is to generate static pages, I am leery that a dynamic site is going to be usable, speed wise.
14:07 sergot moritz: I'm offering you my help then :)
14:07 lucs AlexDaniel: Hmm... Not quite what I need, eh.
14:07 [Coke] In theory, however, I want the site to be dynamic so we can do more clever stuff.
14:07 moritz sergot: please /msg me your ssh public key(s)
14:08 sergot moritz: oki :)
14:08 moritz [Coke]: well, it'd need to be a hybrid; parse the .pod, generate HTML snippets and graphs etc. and an index
14:08 moritz [Coke]: and then at run time, combine and serve these snippets
14:11 [Coke] htmlify.p6 declares %*POD2HTML-CALLBACKS and assigns to them, but never reads them back out.
14:12 moritz [Coke]: Pod::To::HTML does that
14:12 sergot tadzik++ started to work on tadzik/Bailador, it's something
14:13 AlexDaniel sergot: by started to work you mean?
14:13 masak question for everyone: now that Rakudo has precompilation built in, is it time to retire ufo?
14:15 [Coke] RT: 1197; GLR: 6; NOM: 7; JVM: 57; WEIRD: 13; LHF: 1; LTA: 117
14:15 jnthn masak: I'd considered using it in the past (but was too lazy) for speeding up my module development
14:15 sergot AlexDaniel: he started the project, made it work, and ... it's not so fresh right now
14:15 jnthn masak: But I get that for free now
14:15 sergot AlexDaniel: but it's easy to continue the work actually
14:15 jnthn masak: And I "panda --force install ." for testing installed versions of my modules
14:15 AlexDaniel sergot: well, atm it is pretty dead…
14:17 sergot AlexDaniel: yep :(
14:20 PerlJam masak: I don't know if this is a good data point for you or not, but the fact that ufo still exists always catches me by surprise  :)
14:21 moritz PSA: sergot has now joined the ranks of web server administrators for perl6.org et al; if something goes wrong, please ping him as well as me
14:21 _nadim How do I pass a pair to a sub and get it "parsed' by the capture? for %h {my_sub($_) } ; my sub ($k, $v) {}
14:22 sergot moritz++
14:22 virtualsue joined #perl6
14:22 TEttinger joined #perl6
14:22 hoelzro I always felt that Pairs should destructure to two element lists
14:22 moritz _nadim: my_sub(.key, .value)
14:23 hoelzro but I never really spent time thinking about the pros and cons, and that may just be P5 habits carrying over
14:23 jnthn %h.kv.map(&my_sub) # also cute
14:23 _nadim OK, can you please explain hte mechanism behind the .something?
14:23 moritz _nadim: .foo is short for $_.foo
14:24 moritz m: sub f( $ (:$key, :$value) ) { say "$key: $value" }; f "a" => "x"
14:24 camelia rakudo-moar 5ed58f: OUTPUT«a: x␤»
14:24 moritz that's with a sub-signature
14:24 pmurias joined #perl6
14:24 cdg joined #perl6
14:25 _nadim I kinda like tha more
14:28 _nadim But I can't seem to be able to type the lements of the pair, and it doesn't matter which way i use
14:29 PerlJam _nadim: show code.
14:29 moritz m: sub f( $ (:$key, Int :$value) ) { say "$key: $value" }; f "a" => "x"
14:29 camelia rakudo-moar 5ed58f: OUTPUT«cannot stringify this␤  in sub f at /tmp/3IV7exB7jb line 1␤  in block <unit> at /tmp/3IV7exB7jb line 1␤␤»
14:29 _nadim m: sub f( $ (Str :$key, Str :$value) ) { say "$key: $value" }; f "a" => "x"
14:29 camelia rakudo-moar 5ed58f: OUTPUT«a: x␤»
14:30 moritz m: sub f( $ (:$key, Int :$value) ) { say "$key: $value" }; f "a" => Any
14:30 camelia rakudo-moar 5ed58f: OUTPUT«cannot stringify this␤  in sub f at /tmp/3PKdPXISCn line 1␤  in block <unit> at /tmp/3PKdPXISCn line 1␤␤»
14:30 moritz huh, the error message sucks
14:30 _nadim m: multi sub f( $ (Str :$key, Str :$value) ) { say "$key: $value" }; multi sub f( $ (Str :$key, Int :$value) ) { say "$key: $value" }; f "a" => "x" ; f "a" => 1 ;
14:30 camelia rakudo-moar 5ed58f: OUTPUT«a: x␤a: 1␤»
14:31 _nadim OK, works here, I check again in my code
14:33 [Coke] m: my $b; { my $_ = 5; $b = { .say } }; $_ = 42; $b()
14:33 camelia rakudo-moar 5ed58f: OUTPUT«Potential difficulties:␤    Redeclaration of symbol $_␤    at /tmp/WS71v3CtJJ:1␤    ------> 3my $b; { my $_7⏏5 = 5; $b = { .say } }; $_ = 42; $b()␤42␤»
14:33 [Coke] masak: ^^ How does this impact RT #78278 ?
14:33 molaf joined #perl6
14:34 RabidGravy joined #perl6
14:38 skids joined #perl6
14:39 dalek nqp: 75bd5c2 | (Pawel Murias)++ | src/vm/js/ (2 files):
14:39 dalek nqp: [js] Implement nqp::readlink.
14:39 dalek nqp: review: https://github.com/perl6/nqp/commit/75bd5c2c7f
14:39 dalek nqp: 3e8aa5b | (Pawel Murias)++ | t/nqp/19-file-ops.t:
14:39 dalek nqp: Test nqp::readlink.
14:39 dalek nqp: review: https://github.com/perl6/nqp/commit/3e8aa5beec
14:41 xpen joined #perl6
14:45 AlexDaniel Hm. Change all . to . and all / to / or something like that. Allow these in Perl 6 and there you go, no problem with static files.
14:45 AlexDaniel .oO( a minute of crazy ideas ↑ )
14:45 masak m: my $b; { $_ = 5; $b = { .say } }; $_ = 42; $b()
14:45 camelia rakudo-moar 5ed58f: OUTPUT«42␤»
14:45 masak [Coke]: I'm on a bad connection -- can't load the ticket. is the above good enough?
14:46 [Coke] .ask TimToady if he can decide on the right behavior for https://rt.perl.org/Ticket/Display.html?id=112216
14:46 masak [Coke]: I'm unsure whether the redeclation error is bogus or not.
14:46 yoleaux [Coke]: I'll pass your message to TimToady.
14:46 _nadim moritz: is the subsignature way of doing it very new? I get error: Cannot call declare(Pair); none of these signatures match: ($ (Str :$variable, Hash :$value)) ... ($ (Str :$variable, List :$value)) ...
14:46 [Coke] masak: the ticket is years old and the behavior has changed.
14:46 moritz _nadim: not new
14:47 moritz _nadim: but the names matter; a Pair has attributes 'key' and 'value', so you must use those names
14:47 [Coke] masak: no rush, deal with it later.
14:47 _nadim moritz: argggg!
14:47 _nadim and thanks
14:47 Ch0c0late joined #perl6
14:47 moritz _nadim: you can rename, however:  ($ Str :key($variable), Hash :$value)
14:47 _nadim beautiful! I looked at the name and thought "noooo, can't be that"
14:49 _Vi joined #perl6
14:50 _nadim hmm, it seems that 80% of P5::Text::Template can be re-written in 10 lines of code! I guess I have to package it now.
14:51 Zoffix joined #perl6
14:51 _nadim moritz: you said that imports are scoped, which I tried of course, but is MONKEY-SEE-NO-EVAL also scoping?
14:51 Zoffix Should this DWIM?
14:51 yoleaux 08:01Z <nine> Zoffix: very nice blog post :)
14:51 Zoffix m: ^10 .Seq.say
14:51 camelia rakudo-moar 5ed58f: OUTPUT«Method 'Seq' not found for invocant of class 'Range'␤  in block <unit> at /tmp/lFXq92JWFI line 1␤␤»
14:51 Zoffix m: ^10 .List.Seq.say
14:51 camelia rakudo-moar 5ed58f: OUTPUT«(0 1 2 3 4 5 6 7 8 9)␤»
14:51 Zoffix Thanks.
14:52 JimmyZ where is  Zoffix's post?
14:52 Zoffix JimmyZ, http://blogs.perl.org/users/zoffix_znet/2016/01/why-in-the-world-would-anyone-use-perl-6.html
14:53 JimmyZ oh, I saw it yesterday evening.
14:53 moritz _nadim: dunno; try it and see?
14:55 masak [Coke]: yeah, I read through https://rt.perl.org/Ticket/Display.html?id=78278 -- the observable seems to be defunct under the new semantics, so the ticket might be moot. my guess is that doing `my $_` clashes nowadays with the (implicit) `$_` parameter. that's fine.
14:55 masak [Coke]: the thing I can't answer easily is whether the ticket points to an issue or faulty semantics that we still have, and that can be expressed in some other way.
14:55 masak [Coke]: someone smarter than me might be able to see that.
14:58 [Coke] m: say 3½ # wonder if there's any way to sanely make this work.
14:58 camelia rakudo-moar 5ed58f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/H6cy4Qq__D␤Bogus postfix␤at /tmp/H6cy4Qq__D:1␤------> 3say 37⏏5½ # wonder if there's any way to sanely ␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        s…»
14:59 itaipu joined #perl6
15:00 Zoffix Yeah, I had a working code for that a month or so ago :)
15:00 * Zoffix tries again
15:01 Zoffix m: sub postfix:<½> { $^a+½ }; say 3½ + ½
15:01 camelia rakudo-moar 5ed58f: OUTPUT«4␤»
15:01 Zoffix Well. Not sure if that qualifies as "sanely", since you'd have to introduce like a dozen of ops ^_^
15:03 Zoffix m: sub postfix:('½',  '⅓') { $^a+&?ROUTINE.name.substr(9,1).Int }; say 3½
15:03 camelia rakudo-moar 5ed58f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/SDQrthc4Ki␤Bogus postfix␤at /tmp/SDQrthc4Ki:1␤------> 3+&?ROUTINE.name.substr(9,1).Int }; say 37⏏5½␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        state…»
15:05 nowan joined #perl6
15:07 andreoss m: say ¼
15:07 camelia rakudo-moar 5ed58f: OUTPUT«0.25␤»
15:08 sortiz joined #perl6
15:08 pmurias joined #perl6
15:08 pmurias how can I test nqp::gethostname?
15:08 yoleaux 11 Jan 2016 19:12Z <[Coke]> pmurias: we have no stats on that sort of thing, but we've never had a java-based christmas.
15:09 dalek nqp: f500636 | (Pawel Murias)++ | src/vm/js/ (2 files):
15:09 dalek nqp: [js] Implement nqp::gethostname.
15:09 dalek nqp: review: https://github.com/perl6/nqp/commit/f500636845
15:10 wamba joined #perl6
15:10 sortiz morning #perl6
15:10 Zoffix m: sub postfix:{$_} { $^a+$_ } for '½'; say 3½ + ½
15:10 camelia rakudo-moar 5ed58f: OUTPUT«===SORRY!===␤Internal error: find_var_decl could not find $_␤»
15:10 Zoffix Interesting error :}
15:10 harrison_ joined #perl6
15:11 Zoffix m: use MONKEY-SEE-NO-EVAL; EVAL "sub postfix:{$_} \{ \$^a+$_ \}" for '½'; say 3½ + ½
15:11 camelia rakudo-moar 5ed58f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Val39a41LL␤Bogus postfix␤at /tmp/Val39a41LL:1␤------> 3stfix:{$_} \{ \$^a+$_ \}" for '½'; say 37⏏5½ + ½␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤       …»
15:12 Zoffix Hm. What's :context on EVAL? I see it used here https://github.com/rakudo/rakudo/blob/nom/lib/Test.pm6#L447 but it's not in the docs http://docs.perl6.org/routine/EVAL
15:12 FROGGS joined #perl6
15:12 Zoffix From the name I can surmise the meaning, but... is there a way to make that EVAL "sub ..." sub be available in the outer context?
15:13 mspo that LOC is crazy
15:13 Skarsnik hm, how do I get the script directory?
15:13 mspo EVAL $code, context => CALLER::CALLER::CALLER::CALLER::;
15:13 rurban joined #perl6
15:15 moritz Zoffix: context => OUTER::
15:15 timotimo Zoffix: there is not. lexical scopes are compile-time constructs.
15:15 andreoss m: EVAL 'my sub foo { say q{bae} }', context => OUTER::; foo
15:15 mspo m: say %*ENV{_}
15:15 camelia rakudo-moar 5ed58f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tr7rmhl2qc␤Undeclared routine:␤    foo used at line 1␤␤»
15:15 camelia rakudo-moar 5ed58f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/3dg_YJvTtL␤Undeclared name:␤    _ used at line 1␤␤»
15:15 moritz Zoffix: BUT I think it's intentional that it's undocumented, because it's a rather hacky feature
15:15 ruoso joined #perl6
15:15 moritz right, it gives EVAL the outer lexical context, but you can't add to it
15:15 andreoss m: EVAL 'my sub foo { say q{bae} }', context => CALLER::CALLER::CALLER::CALLER::; foo
15:15 camelia rakudo-moar 5ed58f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/zBqrrGaI2F␤Undeclared routine:␤    foo used at line 1␤␤»
15:16 mspo m: say %*ENV<_>
15:16 Zoffix m: say $*SPEC.catpath: ($*SPEC.splitpath: $?FILE)[0 .. *-1]
15:16 camelia rakudo-moar 5ed58f: OUTPUT«/home/camelia/perl5/perlbrew/perls/perl-5.20.1/bin/perl␤»
15:16 camelia rakudo-moar 5ed58f: OUTPUT«Too few positionals passed; expected 4 arguments but got 2␤  in block <unit> at /tmp/XiZwELls1j line 1␤␤»
15:17 Zoffix m: use MONKEY-SEE-NO-EVAL; EVAL "sub postfix:{$_} \{ \$^a+$_ \}", context => OUTER:: for '½'; say 3½ + ½
15:17 camelia rakudo-moar 5ed58f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tuGLp3A5Bd␤Bogus postfix␤at /tmp/tuGLp3A5Bd:1␤------> 3_ \}", context => OUTER:: for '½'; say 37⏏5½ + ½␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤       …»
15:17 Skarsnik m: say $*PROGRAM.perl;
15:17 camelia rakudo-moar 5ed58f: OUTPUT«"/tmp/lyJ676iZYJ".IO(:SPEC(IO::Spec::Unix),:CWD("/home/camelia"))␤»
15:17 Zoffix Ah
15:17 rurban1 joined #perl6
15:17 Skarsnik m: say $*PROGRAM.CWD;
15:17 camelia rakudo-moar 5ed58f: OUTPUT«/home/camelia␤»
15:18 Skarsnik m: say $*PROGRAM.basedir;
15:18 camelia rakudo-moar 5ed58f: OUTPUT«Method 'basedir' not found for invocant of class 'IO::Path'␤  in block <unit> at /tmp/4NiJdbXu9N line 1␤␤»
15:19 [Coke] dd
15:19 [Coke] dd
15:19 [Coke] ... weird. Sorry about that.
15:19 Skarsnik Oh it's dirname x)
15:20 andreoss m: $*PROGRAM.CWD.IO.chmod(0x000)
15:20 camelia rakudo-moar : ( no output )
15:20 _nadim moritz: MONKEY-SEE-NO-EVAL is also scoped.
15:20 Skarsnik m: say $*PROGRAM.dirname;
15:20 Zoffix m: use MONKEY-SEE-NO-EVAL; &::($_) = EVAL "sub postfix:<$_> \{ \$^a+$_ \}" for '½';
15:20 camelia rakudo-moar : OUTPUT«Permission denied»
15:20 camelia rakudo-moar : OUTPUT«Permission denied»
15:20 Zoffix haha
15:20 andreoss lol
15:20 rurban joined #perl6
15:20 camelia rakudo-moar : OUTPUT«(timeout)»
15:20 Zoffix m: say "what have you done!"
15:20 camelia rakudo-moar : OUTPUT«Permission denied»
15:20 Skarsnik xD
15:21 Zoffix andreoss, lol. You're bad, bad boy :P
15:21 camelia rakudo-moar : OUTPUT«(timeout)»
15:21 andreoss m: $*PROGRAM.CWD.IO.chmod(0x775)
15:21 camelia rakudo-moar : OUTPUT«Permission denied»
15:21 Skarsnik whelp
15:21 * Zoffix pokes moritz to a fix :)
15:21 [Coke] so when someone deliberately breaks camelia, that's, what, a 24 hour ban?
15:21 camelia rakudo-moar : OUTPUT«(timeout)»
15:21 * moritz is inclined to wait and see if a rebuild fixes it
15:21 Zoffix Nah, we'd have to connect to the box and change the mode manually
15:21 Zoffix Hm
15:21 Zoffix Maybe
15:22 * Zoffix gets an idea
15:22 * Zoffix 's idea didn't work
15:23 domidumont joined #perl6
15:23 masak :)
15:23 moritz m: say 42
15:23 camelia rakudo-moar 5ed58f: OUTPUT«42␤»
15:24 moritz andreoss--
15:24 Zoffix :D
15:24 moritz FTR it was manual intervention that fixed it, not a rebuild
15:24 rurban1 joined #perl6
15:24 moritz m: say m: $*PROGRAM.CWD
15:24 camelia rakudo-moar 5ed58f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/JwTbjxNBOA␤Colons may not be used to delimit quoting constructs␤at /tmp/JwTbjxNBOA:1␤------> 3say m:7⏏5 $*PROGRAM.CWD␤    expecting any of:␤        colon pair (restricted)␤»
15:24 Zoffix So... What is that "restricted setting" thing? Is that something that comes with Perl 6 or is it something that's configured manually?
15:24 moritz m: say $*PROGRAM.CWD
15:24 camelia rakudo-moar 5ed58f: OUTPUT«/home/camelia␤»
15:24 sena_kun joined #perl6
15:25 joydon joined #perl6
15:25 Zoffix Asking for whether the .chmod thing is a whole in a general restricted setting mode..
15:25 Zoffix s/whole/hole/;'
15:25 moritz Zoffix: it comes with rakudo, and you can invoke it with --setting=restricted or something
15:25 pmurias joined #perl6
15:27 Skarsnik m: say $*PROGRAM.dirname;
15:27 camelia rakudo-moar 5ed58f: OUTPUT«/tmp␤»
15:27 Skarsnik hm, evalbot in not in /home/camelia?
15:27 Zoffix Skarsnik, it is, but it spawns a temp program for each eval
15:27 moritz Skarsnik: evalbot != the program being executed
15:27 Skarsnik Oh right
15:28 Zoffix Um, how do I go through all unicode characters? I've see it evaled here... Like I want to grep all .uninames for something
15:28 Fleurety joined #perl6
15:28 Skarsnik damn that sucks, I need to upgrade my perl6 install on my dedicated server
15:28 Skarsnik Could not find MONKEY-SEE-NO-EVAL in any of:
15:28 moritz m: for 1..65536 { try say .chr if uniname($_) =~ /GREEK/ }
15:28 camelia rakudo-moar 5ed58f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/14f_RtPCK6␤Unsupported use of =~ to do pattern matching; in Perl 6 please use ~~␤at /tmp/14f_RtPCK6:1␤------> 3..65536 { try say .chr if uniname($_) =~7⏏5 /GREEK/ }␤»
15:28 moritz m: for 1..65536 { try say .chr if uniname($_) ~~ /GREEK/ }
15:28 camelia rakudo-moar 5ed58f: OUTPUT«͂␤̓␤̈́␤ͅ␤Ͱ␤ͱ␤Ͳ␤ͳ␤ʹ␤͵␤Ͷ␤ͷ␤ͺ␤ͻ␤ͼ␤ͽ␤;␤Ϳ␤΄␤΅␤Ά␤·␤Έ␤Ή␤Ί␤Ό␤Ύ␤Ώ␤ΐ␤Α␤Β␤Γ␤Δ␤Ε␤Ζ␤Η␤Θ␤Ι␤Κ␤Λ␤Μ␤Ν␤Ξ␤Ο␤Π␤Ρ␤Σ␤Τ␤Υ␤Φ␤Χ␤…»
15:28 nine moritz: is it that EVAL really can't add to the outer context, or that the surrounding code can't use those additions at compile time because they're not there yet?
15:28 pjscott joined #perl6
15:28 Zoffix Thanls
15:29 moritz nine: you can't add keys to a lexpad at runtime
15:29 dj_goku joined #perl6
15:31 timotimo Zoffix: camelia isn't on p6c.org; it's on nine's server
15:32 Zoffix ?
15:32 [Coke] Is there a way to list the unicode properties on a character?
15:32 moritz m: say uniprop('a')
15:32 camelia rakudo-moar 5ed58f: OUTPUT«Ll␤»
15:32 Skarsnik so does --prefix still work (in rakudo) with all the precomp stuff?
15:33 Zoffix m: '4'.uniprop.say
15:33 camelia rakudo-moar 5ed58f: OUTPUT«Nd␤»
15:33 [Coke] moritz: that gets the value of a prop. how do you get all the available props to get?
15:33 moritz [Coke]: dunno
15:33 [Coke] m: uniprop("Z", "OTHERPROP").say
15:33 camelia rakudo-moar 5ed58f: OUTPUT«0␤»
15:33 timotimo know it from the unicode specs? :\
15:34 ParsonsNose joined #perl6
15:34 [Coke] m: uniprop("Z", "GeneralCategory").say
15:34 camelia rakudo-moar 5ed58f: OUTPUT«Lu␤»
15:36 Zoffix Is there a way to use a variable for an op?
15:36 Zoffix m: my $x = sub foo {say $^a.Int + 42}; my $op = '—'; my &postfix:<$op> = $x; '1'—
15:36 camelia rakudo-moar 5ed58f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/0S8u1B4YOH␤Bogus postfix␤at /tmp/0S8u1B4YOH:1␤------> 3y $op = '—'; my &postfix:<$op> = $x; '1'7⏏5—␤    expecting any of:␤        infix␤        infix stopper␤        statement end␤    …»
15:37 timotimo Zoffix: you can't declare a lexical variable with a run-time-dependent name
15:38 [Coke] m: my $x = sub foo {say $^a.Int + 42}; my $op = '—'; my &postfix:($op) = $x; '1'—
15:38 camelia rakudo-moar 5ed58f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/7dSIKdjWql␤You can't adverb &postfix␤at /tmp/7dSIKdjWql:1␤------> 3t + 42}; my $op = '—'; my &postfix:($op)7⏏5 = $x; '1'—␤»
15:38 Zoffix can't -_-
15:38 * Zoffix tries anyway
15:38 [Coke] m: my $x = sub foo {say $^a.Int + 42}; my $op = '—'; sub postfix:($op) = $x; '1'—
15:38 camelia rakudo-moar 5ed58f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/WFW5k6LVm2␤Missing block␤at /tmp/WFW5k6LVm2:1␤------> 3t + 42}; my $op = '—'; sub postfix:($op)7⏏5 = $x; '1'—␤    expecting any of:␤        new name to be defined␤»
15:39 [Coke] maybe if you separated out the "use a variable in the name" and the "use a variable for the body", you'd have better luck. :)
15:40 ambs joined #perl6
15:40 Skarsnik wait, why the build process use the prefix before a make install
15:43 rurban joined #perl6
15:46 rurban1 joined #perl6
15:46 Skarsnik Is that a bug or it's normal?
15:47 ilmari define "use"? write to?
15:48 Hotkeys It's snowing
15:48 Skarsnik well after running configure, I use make and it use /opt/nqp and /opt/moar (/opt was empty)
15:48 Hotkeys Does p6 have a way to stop it from snowing here
15:48 rdleon joined #perl6
15:48 Skarsnik well /opt/bin/
15:48 mspo Skarsnik: the rakudo star build isn't DESTDIR-friendly
15:49 Zoffix m: CORE::{"&prefix:<+++>"} = CORE::{"&prefix:<++>"}; my $x = 42; +++$x; say $x
15:49 camelia rakudo-moar 5ed58f: OUTPUT«Cannot modify an immutable Nil␤  in block <unit> at /tmp/0E5v4Phztg line 1␤␤»
15:49 Zoffix tsk tsk.
15:49 Skarsnik I git clone rakudo
15:49 mspo Skarsnik: it builds and installs its dependencies in order since they depend on eachother
15:50 mspo Skarsnik: it should be updated to intsall the build-time dependencies somewhere else and then installed as a big unit
15:50 ilmari Skarsnik: rakudo depends on nqp, which depends on moar
15:50 Skarsnik that what I was expecting, build the dep in a dir and only install on make install
15:50 ilmari so these need to be installed in the same prefix first
15:51 mspo Skarsnik: I think it's complicated by 'use' directives in some files being fully qualified
15:51 grondilu iirc that's how big projects like GCC do things.  Build must be done in a ./build directory first.
15:51 Skarsnik That how... everything does it?
15:52 grondilu not everything
15:52 mspo read about it here: https://www.gnu.org/prep/standards/html_node/DESTDIR.html
15:52 grondilu from what I remember of buiding linux from scratch, only GCC and the standard C lib require a ./build directory.
15:53 mspo grondilu: most oss software supports DESTDIR building (especially if it uses autoconf)
15:54 Zoffix m: class Foo::Bar is Int {}; say GLOBAL::.keys
15:54 camelia rakudo-moar 5ed58f: OUTPUT«(Foo)␤»
15:54 Zoffix How come
15:54 mspo in perl6- nqp supports DESTDIR but then the other builds break down
15:54 Skarsnik but that should be the default when using gen-nqp and gen-moar
15:54 nine Skarsnik: that rakudo builds nqp and even MoarVM is a convenience feature. It's as if gcc's build script had an option to first install binutils and libz system wide before continuing.
15:54 Zoffix How can I get the name of all use-defined classes? It doesn't seem to be in GLOBAL
15:55 Zoffix m: class Foo::Bar is Int {}; say GLOBAL::.perl
15:55 camelia rakudo-moar 5ed58f: OUTPUT«{:Foo(Foo)}␤»
15:55 ilmari Skarsnik: external dependencies tend to have to be actually installed first
15:55 mspo or maybe it's moar and not nqp, I forget
15:56 Skarsnik Yes, but I expect to only install on make install if I use gen-xxx
15:57 mspo Skarsnik: rakudo star is like a *brew script more than a single project, is the best way to think of it
15:57 mspo Skarsnik: you should use the components individually
15:57 Skarsnik I don't use rakudo star x)
15:57 mspo okay
15:58 mspo anyway I agree that it's not a very friendly build :)
15:58 Zoffix Hm. I've no idea what to suggest this person (small module to convert from P5 to P6). Any suggestions? https://twitter.com/nomadovich/status/686917160149495808
15:59 Skarsnik "Don't"
15:59 mspo Skarsnik: also, weirdly, nqp is actually a shell script that calls moar
15:59 Skarsnik I would like a complete Zip (or any archive) module, but it's only me x)
15:59 dalek nqp: 7d2b53b | (Pawel Murias)++ | src/vm/js/ (2 files):
15:59 dalek nqp: [js] Implement nqp::bitxor_s, nqp::bitand_s, nqp::bitor_s.
15:59 dalek nqp: review: https://github.com/perl6/nqp/commit/7d2b53b16f
15:59 dalek nqp: 0bc35f4 | (Pawel Murias)++ | t/nqp/59-nqpop.t:
15:59 dalek nqp: Test nqp::bitand_s, nqp::bitor_s, nqp::bitxor_s.
15:59 dalek nqp: review: https://github.com/perl6/nqp/commit/0bc35f4476
16:00 Zoffix Skarsnik, nah, I think that's too categorical. It's perfectly fine to convert small things, especially to try Perl 6 out.
16:00 arnsholt mspo: Not that weird, really. The result of compiling NQP (or Rakudo, for that matter) is just a pile of Moar bytecode
16:00 pmurias jnthn: hi
16:00 Skarsnik I stoppped doing perl5 seriously like 10 years ago, so I don't know what small p5 module  could be cool to have
16:00 mspo arnsholt: it seems to imply that the build *could* be more destdir-friendly :)
16:00 arnsholt Then to run the program, you just want run that bytecode, which you do with the moar program
16:03 nine Getting rid of that shell script wrapper is really mostly an exercise in build system wrangling. Unfortunately we do seem to have a lack of qualified and interested people in that area.
16:03 sortiz Zoffix, seen http://doc.perl6.org/language/5to6-nutshell#Automated_Translation ?
16:03 RabidGravy Zoffix, maybe it's look on the most wanted list. Or alternatively, my thing would be, try making an actual software to use and see what modules it needs and start with the ones that aren't there :)
16:03 Zoffix sortiz, yes, and IMHO, that stuff is largely a footgun.
16:04 mspo does "rakudo" produce any artifacts on its own?
16:04 mspo or is it all nqp code
16:04 arnsholt I think there a shared lib as well
16:04 mspo libmoar is the only one i found
16:04 mspo why it's not statically linked by default?  nfi :)
16:04 mspo can I produce my own binaries in perl6, linked with libmoar, and not need to install perl6 to run them?
16:05 _Vi joined #perl6
16:05 jnthn pmurias: hi o/
16:05 RabidGravy yeah, the "automated translation" can work if you already understand well how the code works and have a basic idea how it should work in P6 but only to save some typing :)
16:06 Zoffix There's no easy way to get the reverse of .^parents, is there? I want to get all class names that inherit from class $x
16:06 jnthn mspo: Not statically linked 'cus Rakudo also compiles some small VM extensions.
16:06 * Zoffix is still unclear why m: class Foo::Bar is Int {}; say GLOBAL::.perl doesn't have a 'Bar' anywhere in the output
16:06 jnthn Zoffix: No, otherwise we'd struggle to GC 'em...unless we introduced weak references, which may yet happen. :)
16:06 nine ./install/share/perl6/runtime/dynext/libperl6_ops_moar.so
16:06 Zoffix \o/
16:07 jnthn m: class Foo::Bar { }; say GLOBAL::.keys;
16:07 camelia rakudo-moar 5ed58f: OUTPUT«(Foo)␤»
16:07 jnthn m: class Foo::Bar { }; say GLOBAL::Foo::.keys;
16:07 camelia rakudo-moar 5ed58f: OUTPUT«(Bar)␤»
16:07 jnthn There's the Bar
16:07 Zoffix Ah
16:07 pmurias jnthn: do you want to be suggested as the grant manager for the javascript backend grant?
16:07 ilmari has anyone submitted a signature for moarvm bytecode to file(1)?
16:07 Zoffix m: class Foo::Bar { }; say GLOBAL::Foo::.perl
16:07 camelia rakudo-moar 5ed58f: OUTPUT«{:Bar(Foo::Bar)}␤»
16:07 ilmari aka libmagic
16:07 Zoffix wtf
16:07 Zoffix Ah
16:07 Zoffix m: class Foo::Bar { }; say GLOBAL::.perl
16:07 camelia rakudo-moar 5ed58f: OUTPUT«{:Foo(Foo)}␤»
16:08 Zoffix m: class Foo::Bar { }; say dd GLOBAL::
16:08 camelia rakudo-moar 5ed58f: OUTPUT«{:Foo(Foo)}␤Nil␤»
16:08 Zoffix I kinda expected those last two evals to go all the way.
16:09 jnthn pmurias: I probably can, if there's nobody else up for it :)
16:10 sena_kun joined #perl6
16:10 _nadim Is there a "do $file_name" a la P5?
16:10 Skarsnik hm
16:11 jnthn m: EVALFILE 'foo'
16:11 camelia rakudo-moar 5ed58f: OUTPUT«5===SORRY!5=== Error while compiling /home/camelia/EVAL_0␤Undeclared routine:␤    bar used at line 1. Did you mean 'VAR', 'bag'?␤␤»
16:11 Zoffix _nadim, EVALFILE
16:11 jnthn hah, what, there's a file called foo? :D
16:11 Zoffix m: 'foo'.IO.slurp.say
16:11 camelia rakudo-moar 5ed58f: OUTPUT«bar␤»
16:11 Zoffix heh
16:11 jnthn lol
16:11 nine Now that's obvious
16:12 jnthn m: sub bar() { say 'mmm...a pint' }; EVALFILE 'foo'
16:12 camelia rakudo-moar 5ed58f: OUTPUT«mmm...a pint␤»
16:12 _nadim Zoffix: thanks. it's not in the documentation
16:12 RabidGravy :)
16:12 Zoffix _nadim, well volunteered! :D
16:13 Zoffix _nadim, there's a one-sentence blurb here: http://design.perl6.org/S29.html#Context
16:13 sena_kun Do we have in perl6 something like tuple type? To quickly wrap and unwrap things together without constructing new type.
16:13 _nadim Man, if you knew how much I'd prefer do that. I have 4 more weeks of hell, then I can.
16:13 _nadim Indeed there is documentation :)
16:13 nine sena_kun: List
16:14 Juerd sena_kun: Lists, arrays, hashes...
16:14 jnthn sena_kun: Lists are immutable so server fine as that, and are easily unpacked
16:14 jnthn *serve
16:14 _nadim sena_kun: Captures work too
16:14 sena_kun Thanks, I'll try list firstly.
16:14 nine .oO(progressive loading of answers)
16:16 _nadim But but .... all answers are pretty wrong. Well, no they are right but the problem is wrong. Looks like "I don't like types, give me a hammer"
16:16 jnthn Sometimes you need the hammer to work out which types you should have.
16:17 _nadim jnthn: I didn't say that I don't use hammers ;)
16:18 Skarsnik m: class Foo{ has Str @.t}; my %h; %h<t> = ["hello"]; say Foo.new(|%h); #Bug?
16:18 camelia rakudo-moar 5ed58f: OUTPUT«Type check failed in assignment to @!t; expected Str but got Array␤  in block <unit> at /tmp/UIPMaHUORj line 1␤␤»
16:19 Skarsnik It was working before x-mas :(
16:19 Skarsnik m: class Foo{ has @.t}; my %h; %h<t> = ["hello"]; say Foo.new(|%h); #Bug?
16:19 camelia rakudo-moar 5ed58f: OUTPUT«Foo.new(t => [["hello"],])␤»
16:20 jnthn Skarsnik: No
16:20 jnthn Skarsnik: Made attribute assignment intialization consistent with normal assignment
16:20 jnthn (Which was a bug fix)
16:20 jnthn And that worked by accident before the fix
16:21 jnthn Hashes are a bunch of Scalar values if assigned to
16:21 jnthn And that itemizes
16:21 hankache joined #perl6
16:22 Skarsnik The issue I have a sub that return me a Str @; that I put in a hash and if I give the hash to new it fail like that
16:22 RabidGravy m: class Foo{ has @.t}; my %h; %h<t> := ["hello"]; say Foo.new(|%h);
16:22 camelia rakudo-moar 5ed58f: OUTPUT«Foo.new(t => ["hello"])␤»
16:22 jnthn Can bind it into the hash instead.
16:22 lostinfog joined #perl6
16:22 RabidGravy jnthn++ pointed that out to me a few momths agio when the change went in :)
16:23 Skarsnik class Foo{ has Str @.t}; my %h; %h<t> = ("hello"); say Foo.new(|%h)
16:23 Skarsnik m: class Foo{ has Str @.t}; my %h; %h<t> = ("hello"); say Foo.new(|%h)
16:23 camelia rakudo-moar 5ed58f: OUTPUT«Foo.new(t => Array[Str].new("hello"))␤»
16:23 Skarsnik I don't get it really
16:23 Skarsnik why this work
16:24 jnthn m: my @a = "hello"; say @a.perl
16:24 camelia rakudo-moar 5ed58f: OUTPUT«["hello"]␤»
16:24 jnthn m: my @a = ("hello",); say @a.perl
16:24 camelia rakudo-moar 5ed58f: OUTPUT«["hello"]␤»
16:24 jnthn m: my @a = $("hello",); say @a.perl
16:24 camelia rakudo-moar 5ed58f: OUTPUT«[("hello",),]␤»
16:24 jnthn m: my @a = $["hello",]; say @a.perl
16:24 camelia rakudo-moar 5ed58f: OUTPUT«[["hello"],]␤»
16:24 poga left #perl6
16:24 jnthn And the $ is implied by hash values being Scalar containers.
16:24 Skarsnik so I need to write %h<k> = foo().list then?
16:25 jnthn No, you'd need to bind
16:25 jnthn %h<k> := foo()
16:25 Skarsnik why? my sub does not return a scalar
16:26 khw joined #perl6
16:26 jeek joined #perl6
16:27 dalek nqp: d667c8e | (Pawel Murias)++ | src/vm/js/ (2 files):
16:27 dalek nqp: [js] Stub getcodelocation the same way the JVM backend does it.
16:27 dalek nqp: review: https://github.com/perl6/nqp/commit/d667c8ee3a
16:27 jnthn Skarsnik: Yes, but hash values are *by definition* scalars
16:28 jnthn That's how assignment to arrays/hashes works
16:28 Skarsnik I still think it's weird. if I do say %h<k>.WHAT it give me Array[Str]
16:30 Skarsnik It should tell me it's a scalar or a Str if it's not the case
16:31 hankache hello *
16:32 Skarsnik m: class Foo{ has Str @.t}; my Array %h; %h<t> = ["hello"]; say Foo.new(|%h);
16:32 camelia rakudo-moar 5ed58f: OUTPUT«Type check failed in assignment to @!t; expected Str but got Array␤  in block <unit> at /tmp/WmVnBx9ol0 line 1␤␤»
16:33 sortiz m: my %h = :k; say %h<k>.VAR.WHAT
16:33 camelia rakudo-moar 5ed58f: OUTPUT«(Scalar)␤»
16:33 timotimo unless you type your list to be of Str, that on't ever work
16:34 Skarsnik m: class Foo{ has @.t}; my Array %h; %h<t> = ["hello"]; say Foo.new(|%h);
16:34 camelia rakudo-moar 5ed58f: OUTPUT«Foo.new(t => [["hello"],])␤»
16:35 Skarsnik m: class Foo{ has @.t}; my Any %h; %h<t> = ["hello"]; say Foo.new(|%h);
16:35 camelia rakudo-moar 5ed58f: OUTPUT«Foo.new(t => [["hello"],])␤»
16:35 Skarsnik hm, Any did not worked for me
16:37 timotimo m: class Foo { has @.t }; my Any %h; @(%h<t>) = ["hello"]; say Foo.new(|%h)
16:37 camelia rakudo-moar 5ed58f: OUTPUT«Cannot modify an immutable Any␤  in block <unit> at /tmp/4R3U2DPJts line 1␤␤»
16:37 timotimo m: class Foo { has @.t }; my Any %h; %h<t> = flat ["hello"]; say Foo.new(|%h)
16:37 camelia rakudo-moar 5ed58f: OUTPUT«Foo.new(t => [("hello",).Seq,])␤»
16:38 timotimo ugh, even worse :)
16:44 Zoffix m: my $type = 'Array'; say $type.^parents: :all
16:44 camelia rakudo-moar 5ed58f: OUTPUT«((Cool) (Any) (Mu))␤»
16:44 Zoffix Is there a way to list parents of a type when its name is stored in a variable?
16:44 Zoffix m: use MONKEY-SEE-NO-EVAL; my $type = 'Array'; say EVAL "$type.^parents: :all"
16:44 camelia rakudo-moar 5ed58f: OUTPUT«((List) (Cool) (Any) (Mu))␤»
16:44 Zoffix Guess that'll do
16:45 timotimo better use ::($foo) instead of EVAL
16:45 Zoffix Ah. Thanks
16:45 timotimo m: my $cn = 'Array'; say ::($cn).^parents(:all)
16:45 camelia rakudo-moar 5ed58f: OUTPUT«((List) (Cool) (Any) (Mu))␤»
16:50 sena_kun joined #perl6
16:50 Skarsnik hm
16:51 funrep how do i pass an argument to a named parameter?
16:51 Skarsnik This array issue in hash make me wonder if I should fix pgarray in dbiish
16:52 PerlJam funrep: :name($value)   or name => $value
16:52 Skarsnik or :name<value>
16:52 Zoffix funrep, for numerics :42param also works
16:52 Zoffix s/numerics/ints/;
16:52 sena_kun Is 'subst' method is the best replace for "=~ s///" for now?
16:53 Zoffix funrep, for booleans  :foo and :!foo work
16:53 Zoffix sena_kun, that's what I use yes. There's also subst-mutable
16:53 PerlJam sena_kun: or just use s/// ?
16:53 Zoffix :)
16:53 jnthn m: my $foo = 'bear'; $foo ~~ s/a/e/; say $foo; # can also use this form
16:53 camelia rakudo-moar 5ed58f: OUTPUT«beer␤»
16:54 jnthn m: my $foo = 'bear'; $foo ~~ s/a/ = 'e'; say $foo; # or this form
16:54 camelia rakudo-moar 5ed58f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/S9oy6T3ZDG␤Malformed replacement part; couldn't find final /␤at /tmp/S9oy6T3ZDG:1␤------> 3 ~~ s/a/ = 'e'; say $foo; # or this form7⏏5<EOL>␤    expecting any of:␤        postfix␤»
16:54 * Zoffix tries to remember how to use S/// and fails
16:54 jnthn oh, right
16:54 jnthn m: my $foo = 'bear'; $foo ~~ s[a] = 'e'; say $foo; # or this form
16:54 camelia rakudo-moar 5ed58f: OUTPUT«beer␤»
16:54 sena_kun Oh wow.
16:54 funrep PerlJam, Zoffix: thanks!
16:54 PerlJam sena_kun: you're going to be saying that quite often about Perl 6 if you keep using it ;)
16:54 jnthn m: my $foo = "The answer is 21"; $foo ~~ s[\d+] *= 2; say $foo # showing off :)
16:54 camelia rakudo-moar 5ed58f: OUTPUT«The answer is 42␤»
16:54 Zoffix :)
16:55 Zoffix Man, that's awesome
16:55 Zoffix m: class Foo::Bar is Int {}; class Meow is Foo::Bar {}; say Meow.^parents: :all
16:55 camelia rakudo-moar 5ed58f: OUTPUT«((Bar) (Int) (Cool) (Any) (Mu))␤»
16:55 Zoffix Bar??
16:55 RabidGravy so if have an object which has a Supplier which it may emit stuff on, is it better to give a single Supply to all interested tappers or a new one for each?
16:55 Skarsnik m: class Foo{ has @.t}; sub bar() {my %h; my $p = "hello".comb; %h<t> = $p; %h} my %h; %h = bar(); say Foo.new(|%h);
16:55 camelia rakudo-moar 5ed58f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/RtKKOm8Q4D␤Strange text after block (missing semicolon or comma?)␤at /tmp/RtKKOm8Q4D:1␤------> 3h; my $p = "hello".comb; %h<t> = $p; %h}7⏏5 my %h; %h = bar(); say Foo.new(|%h);␤    expecting any o…»
16:56 Skarsnik m: class Foo{ has @.t}; sub bar() {my %h; my $p = "hello".comb; %h<t> = $p; %h}; my %h; %h = bar(); say Foo.new(|%h);
16:56 camelia rakudo-moar 5ed58f: OUTPUT«Foo.new(t => [("h", "e", "l", "l", "o").Seq,])␤»
16:56 uruwi_ joined #perl6
16:57 Skarsnik m: class Foo{ has @.t}; sub bar() {my Any %h; my $p = "hello".comb; %h<t> = $p; %h}; my %h; %h = bar(); say Foo.new(|%h);
16:57 camelia rakudo-moar 5ed58f: OUTPUT«Foo.new(t => [("h", "e", "l", "l", "o").Seq,])␤»
16:57 jnthn RabidGravy: It depends on the semantics you want around done/quit
16:57 Zoffix m: class Foo::Bar is Int {}; class M::Me::Mew is Foo::Bar {}; class Meow is M::Me::Mew {}; say Meow.^parents: :all
16:57 camelia rakudo-moar 5ed58f: OUTPUT«((Mew) (Bar) (Int) (Cool) (Any) (Mu))␤»
16:57 Zoffix This looks like a bug to me :(
16:57 jnthn RabidGravy: If you will only emit then it's equivalent.
16:57 jnthn Zoffix: It's 'cus .WHAT gives you the shortname
16:58 RabidGravy e.g. should I do "method foo-supply() { $!supplier.Supply }" or "method foo-supply() { state $supply = $!supplier.Supply; $supply }"
16:58 Skarsnik m: class Foo{ has @.t}; sub bar() {my Any %h; my $p = "hello".comb; %h<t> = $p; %h}; my %h; %h := bar(); say Foo.new(|%h);
16:58 camelia rakudo-moar 5ed58f: OUTPUT«Foo.new(t => [("h", "e", "l", "l", "o").Seq,])␤»
16:58 jnthn Beware of state there, it's not per instance
16:58 Skarsnik Err, I think that screw me with DBIish
16:58 Zoffix m: class Foo::Bar is Int {}; class M::Me::Mew is Foo::Bar {}; class Meow is M::Me::Mew {}; my $x = M::Me::Mew.new; say $x.WHAT
16:58 camelia rakudo-moar 5ed58f: OUTPUT«(Mew)␤»
16:58 jnthn Zoffix: Use .WHO for all of it
16:58 Zoffix m: class Foo::Bar is Int {}; class M::Me::Mew is Foo::Bar {}; class Meow is M::Me::Mew {}; my $x = M::Me::Mew.new; say $x.WHO
16:58 camelia rakudo-moar 5ed58f: OUTPUT«M::Me::Mew␤»
16:58 Skarsnik I want to return a hash with array that are array x)
16:59 Zoffix m: class Foo::Bar is Int {}; class M::Me::Mew is Foo::Bar {}; class Meow is M::Me::Mew {}; my $x = M::Me::Mew.new; say $x.WHAT.WHO
16:59 camelia rakudo-moar 5ed58f: OUTPUT«M::Me::Mew␤»
16:59 Zoffix Thanks
16:59 RabidGravy yeah, in this case done / quit don't matter
16:59 jnthn RabidGravy: Each call to .Supply gives you something that separately enforces the supply grammar (emit* [done|quit])
16:59 Skarsnik m: class Foo{ has @.t}; sub bar() returns Hash[Any] {my Any %h; my $p = "hello".comb; %h<t> = $p; %h}; my %h; %h := bar(); say Foo.new(|%h);
16:59 camelia rakudo-moar 5ed58f: OUTPUT«Foo.new(t => [("h", "e", "l", "l", "o").Seq,])␤»
16:59 jnthn OK, then it won't matter for you.
17:00 jnthn It's more intersting if you have a Supplier that you may feed more things into after an error, provided a fresh Supply is obtained.
17:00 jnthn Zoffix: A straight $x.WHO will do it, you don't need to .WHAT first
17:00 jnthn Zoffix: There's also .^name
17:02 Zoffix jnthn, but I'm using .^parents. Basically, I'm writing a sub that'll give me all of the descendants of a class. So what I'm doing is this: https://gist.github.com/zoffixznet/fa955e2ff7142d05b08f which is recursing over ::GLOBAL and trying to call .^parents on everything I find, and then grep the results for the original class name
17:02 Zoffix m: class Foo::Bar is Int {}; class M::Me::Mew is Foo::Bar {}; class Meow is M::Me::Mew {}; say Meow.^parents(:all).map: {.WHO}
17:02 camelia rakudo-moar 5ed58f: OUTPUT«(M::Me::Mew Foo::Bar Int Cool Any Mu)␤»
17:03 RabidGravy ah! the "state not per instance" thing just answered a completely unrelated mystery I had earlier (assigning a Proxy to a state variable in an accessor,) duh
17:04 jnthn Zoffix: .^parents gives you back type objects, not names
17:04 Zoffix I see now :)
17:05 Khisanth joined #perl6
17:05 Zoffix Ah, right, I don't need a .WHO at all then. I was just confused by my .say output
17:11 kjs_ joined #perl6
17:13 Zoffix FWIW, the colours in "Interp / Spesh / JIT" column of the profiler output not colourblind-friendly
17:13 * Zoffix notices the use of bootstrap classes and files this under "not important enough to bother fix"
17:13 b2gills m: my $false-str = 'False'; say Bool::{$false-str}
17:13 camelia rakudo-moar 5ed58f: OUTPUT«False␤»
17:16 Ch0c0late left #perl6
17:22 dalek DBIish: 0633711 | (Sylvain Colinet)++ | lib/DBDish/Pg/StatementHandle.pm6:
17:22 dalek DBIish: To have array in a hash we need to bind with :=
17:22 dalek DBIish: review: https://github.com/perl6/DBIish/commit/0633711aa6
17:22 dalek DBIish: 12e2212 | Skarsnik++ | lib/DBDish/Pg/StatementHandle.pm6:
17:22 dalek DBIish: Merge pull request #48 from Skarsnik/master
17:22 dalek DBIish:
17:22 dalek DBIish: To have array in a hash we need to bind with :=
17:22 dalek DBIish: review: https://github.com/perl6/DBIish/commit/12e2212cb3
17:23 Skarsnik I should add test for Pg array xD
17:26 telex joined #perl6
17:27 funrep what is a consise way of dropping the first 3 elements of an array?
17:27 jnthn @foo[3..*]
17:28 funrep (y)
17:28 ilmari ?
17:35 jast probably some kind of emoticon in new-fangled IRC clients
17:36 Skarsnik gah, I need to force to get ride of ==> Installing DBIish
17:36 Skarsnik DBIish:ver<*>:auth<>:api<> already installed
17:36 Skarsnik ?
17:36 moritz yes, need force
17:37 Zoffix Use the force, Luke!
17:38 RabidGravy I think (y) comes out as ????some place
17:39 RabidGravy that is THUMBS UP SIGN
17:41 sortiz so much FB?
17:41 alber joined #perl6
17:43 * alpha123 *twitch*
17:47 jabus joined #perl6
17:47 mspo splice?
17:50 jabus oi
17:50 xinming_ joined #perl6
17:53 mspo m: @x = <a b c d e f>; @x.splice(3,*);
17:53 camelia rakudo-moar 5ed58f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ZodD6vGhWC␤Variable '@x' is not declared␤at /tmp/ZodD6vGhWC:1␤------> 3<BOL>7⏏5@x = <a b c d e f>; @x.splice(3,*);␤»
17:53 mspo m: my  @x = <a b c d e f>; @x.splice(3,*);
17:53 camelia rakudo-moar 5ed58f: ( no output )
17:53 mspo weird
17:53 ilmari m: my  @x = <a b c d e f>; say @x.splice(3,*); say @x
17:53 camelia rakudo-moar 5ed58f: OUTPUT«[d e f]␤[a b c]␤»
17:53 mspo anway it worked in my repl :)
17:53 mspo oh right
17:54 ilmari camelia only captures stdout/stderr
17:54 ilmari not return values
17:57 Calibellus joined #perl6
18:01 itaipu joined #perl6
18:01 firstdayonthejob joined #perl6
18:02 daxim p6: "hello world".say
18:02 camelia rakudo-moar 5ed58f: OUTPUT«hello world␤»
18:03 domm_ joined #perl6
18:03 Skarsnik is there a way to type an array after its 'declaration'?
18:03 Skarsnik like my @t; @t is of Str; ?
18:03 funrep how do i add 2 strings?
18:04 Skarsnik ~
18:04 funrep nice thanks
18:04 Skarsnik m: say "Hello" ~ "World"
18:04 camelia rakudo-moar 5ed58f: OUTPUT«HelloWorld␤»
18:05 frew does perl6 specify a standard JSON decoder, and if not, does rakudo star ship with one?
18:05 frew someone at work was asking and I realized I don't even konw how to look that up
18:06 Skarsnik JSON::Tiny/JSON::Fast are commonly used
18:06 Skarsnik I think panda install one of them and Star have one of them too x)
18:06 frew any idea how I can look that up?
18:08 Skarsnik perl6 -MJSON::Tini -e 'say "foo"'
18:08 SHODAN joined #perl6
18:10 tony-o frew: rakudo does ship with a json decoder
18:10 yoleaux 7 Jan 2016 07:28Z <nine> tony-o: the one and only reason why I don't want to read the log is because it's a huge waste of time to read through thousands of lines of chatter when you already know what you want to tell me. If you have useful input, please just give it.
18:10 yoleaux 7 Jan 2016 07:28Z <nine> tony-o: nothing would make me happier than someone coming up with a good plan where we don't have to recompile modules for every user.
18:11 Skarsnik the internal json decoder is private now I think
18:11 tony-o frew: the decoder ops in ::Tiny and ::Fast are both the same, too fwiw
18:11 frew tony-o: can you point me to a doc about that?  like a page listing stuff included in star or something?
18:11 tony-o m: from-json('{ "test": "value" }').perl.say;
18:11 camelia rakudo-moar 5ed58f: OUTPUT«${:test("value")}␤»
18:11 PerlJam m: say to-json(<a b c>);
18:11 camelia rakudo-moar 5ed58f: OUTPUT«[␤  "a",␤  "b",␤  "c"␤]␤»
18:12 PerlJam (just checking)
18:12 Skarsnik Cannot put a type constraint on an 'our'-scoped variable
18:12 Skarsnik :(
18:12 tony-o frew: i only know that from reading the source and writing a decoder to make it faster :-) PerlJam might have something, he usually schools me on the docs
18:13 PerlJam frew: there's from-json and to-json built in (but they might be slow)
18:13 tony-o they're significantly slower than using ::Fast
18:13 frew PerlJam: why aren't those listed on doc.perl6.org?
18:13 PerlJam frew: dunno.  No one got around to it I guess
18:13 tony-o I'm partial to ::Fast because i wrote at least one of the iterations of it
18:13 tony-o frew: it's meant to only be used internally as Skarsnik was getting at
18:14 frew huh
18:14 tony-o it was, at least.  unsure about the general feeling towards it now
18:14 tony-o it was being used in CUR a long time ago for a MANIFEST file
18:14 tony-o so it was used for module loading at one point
18:14 nine it still is
18:14 tony-o there it is :-)
18:14 PerlJam yeah, that was the primary reason they exist in core
18:14 PerlJam s/was/is/
18:15 sjoshi joined #perl6
18:15 tony-o so it was meant to be used internally and not meant to be GA
18:15 tony-o but, it does happen to be GA currently
18:15 tony-o GA = generally available
18:17 jnthn frew: Modules are generally located through http://modules.perl6.org/ and docs.perl6.org is really language docs.
18:17 tony-o frew: there isn't likely to be any docs on it
18:17 frew jnthn: ok, well fwiw my initial thought was that maybe the lang would specify that JSON decoding would be included
18:17 frew not saying it should be, but it didn't seem infeasable
18:18 frew hah, 2% of perl6 modules are related to json
18:19 Skarsnik nine, I need to test futher, but I think precomp on 32bits does not work well comparing to 64bits
18:19 jnthn On documentation: is there documented somewhere how to set up Travis builds for Perl 6 modules? I hoped the "not set up" on modules.perl6.org would link to instructions on how... :)
18:19 tony-o frew: ::Fast is different from ::Tiny in the decoding realm.  ::Tiny is similar to core and ::Fast is a PP6 decoding mechanism,  ::Fast was significantly faster last time i benchmarked but that was several months ago
18:20 jnthn oh, the Travis link right at the top :)
18:20 leont joined #perl6
18:20 tony-o ::Tiny is technically more interesting, though
18:20 frew fwiw I want my JSON as boring as it gets :)
18:20 tony-o lol
18:21 PerlJam jnthn: having "not set up" link there too sounds like a nice enhancement
18:21 Zoffix jnthn, yeah, it should: https://github.com/perl6/modules.perl6.org/issues/47
18:21 Zoffix And the instructions are here: https://docs.travis-ci.com/user/languages/perl6
18:22 tony-o Zoffix: it's on my list to look at all the bug reports you've sent me over the last week
18:22 jnthn Cool, should do it for some of my modules :)
18:22 Zoffix And speaking of JSON modules... I'm quite amazed most of the encoded JSON has about 40% of its size in useless spaces. I'd think the "default" mode for encoded JSON would be for it to be transmitted somewhere for computers to read, not for humans to read.
18:23 Zoffix m: say to-json [<foo bar ber>]
18:23 camelia rakudo-moar 5ed58f: OUTPUT«[␤  "foo",␤  "bar",␤  "ber"␤]␤»
18:23 * Zoffix shakes head
18:23 Zoffix m: say to-json "foo"
18:23 camelia rakudo-moar 5ed58f: OUTPUT«"foo"␤»
18:26 Zoffix JSON::Tiny fares better, but still can be trimmed quite a bit.
18:26 tony-o how does ::Fast get on?
18:27 vendethiel joined #perl6
18:28 uruwi_ JSON::Fast is the example that Zoffix typed here
18:28 Zoffix Seems to have the exact number of extraneous whitespace as core; unless I'm calling the wrong function: https://gist.github.com/zoffixznet/78064c45fe9619e5063f
18:28 tony-o isn't that using the built in?
18:28 tony-o ah, they could be exactly the same
18:29 domidumont joined #perl6
18:29 milwen joined #perl6
18:30 jack_rabbit joined #perl6
18:30 milwen Hey everyone. I'm new to perl6 and IRC.
18:30 Zoffix Hm. This is weird. There is a `pretty` named arg, https://github.com/timo/json_fast/blob/master/lib/JSON/Fast.pm#L13 but $ perl6 -MJSON::Fast -e 'say to-json [<foo bar ber>, { :meow<foo>, :foo([<bar>, {:2ber, :moor([<foo>])}]) }] :!pretty' gives me Unexpected named parameter 'pretty' passed
18:30 Zoffix milwen, hai :)
18:30 timotimo welcome, milwen!
18:30 PerlJam milwen: greetings!
18:30 psy joined #perl6
18:31 Zoffix Ah, needs a comma
18:31 Zoffix yeah, disabling :pretty works. That's good then
18:31 * Zoffix makes a doc PR
18:32 Skarsnik jnthn, I am confused with this array in hash business. I try to put an Array on the (Array or Hash) returned by DBish like in https://github.com/perl6/DBIish/blob/master/lib/DBDish/Pg/StatementHandle.pm6#L121; but I still get something I can't pass to new
18:37 nine Skarsnik: can you give a smaller example for this ?
18:39 milwen I have a question: why does {if @nums.elems > 0 {return @nums.pop + mul(@nums);} work for adding array elements but trying to multiply the same elements always returns 0?
18:41 Hotkeys can you do an example on camelia
18:41 Zoffix milwen, one of the elements is zero?
18:42 milwen no tested with [1,2,3,4]
18:42 Zoffix milwen, what's mul()?
18:42 milwen oh sorry that's my multiplication sub.  its add() for adding.
18:42 Hotkeys m: my @nums = [1,2,3,4]; I have a question: {if @nums.elems > 0 {say @nums.pop + mul(@nums);}
18:42 camelia rakudo-moar 5ed58f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/xio9Dl2XhV␤Missing block (taken by some undeclared routine?)␤at /tmp/xio9Dl2XhV:1␤------> 3.elems > 0 {say @nums.pop + mul(@nums);}7⏏5<EOL>␤»
18:43 Hotkeys m: my @nums = [1,2,3,4]; if @nums.elems > 0 {say @nums.pop + mul(@nums)}
18:43 camelia rakudo-moar 5ed58f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/0JU6sDK79H␤Undeclared routine:␤    mul used at line 1␤␤»
18:43 Hotkeys what does the sub do
18:43 Zoffix milwen, please shown an example program that demonstrates the problem
18:43 Zoffix s/shown/show/;
18:43 milwen
18:43 milwen sub mul(@nums)
18:43 milwen {
18:43 milwen if @nums.elems > 0
18:43 milwen {
18:44 milwen return @nums.pop * mul(@nums);
18:44 Hotkeys oh dear
18:44 milwen }
18:44 milwen }
18:44 Hotkeys just so you know
18:44 Hotkeys you can do a reduction with an operator
18:44 Hotkeys m: say [*] [1,2,3,4]
18:44 camelia rakudo-moar 5ed58f: OUTPUT«24␤»
18:44 Hotkeys like so
18:45 Hotkeys if you're just trying to multiply the elements of an array
18:45 Zoffix milwen, on IRC, it's generally frowned upon to paste large chunks of text like that. It's disruptive, hard to read, and we can't copy-paste it into something to place with it. Generally people use a pastebin, like http://fpaste.scsys.co.uk/
18:45 PerlJam milwen: in the future use gist.github.com or some other paste site to show code please
18:45 milwen well that's alot easier. haha thanks
18:45 Hotkeys :D
18:45 itaipu joined #perl6
18:45 Hotkeys there might be a product function too
18:45 Hotkeys not sure
18:45 PerlJam milwen: what does mul() return when @nums.elems == 0  ?
18:46 Hotkeys m: say product([1,2,3,4])
18:46 camelia rakudo-moar 5ed58f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/lqbHpFw_i_␤Undeclared routine:␤    product used at line 1. Did you mean 'produce'?␤␤»
18:46 Hotkeys m: say prod([1,2,3,4])
18:46 camelia rakudo-moar 5ed58f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/_4ld379tue␤Undeclared routine:␤    prod used at line 1␤␤»
18:46 Hotkeys darn
18:46 milwen it just returns () with no args
18:46 Hotkeys m: say 3 * ()
18:46 camelia rakudo-moar 5ed58f: OUTPUT«0␤»
18:46 Hotkeys that's why
18:47 Hotkeys m: say ().Int
18:47 camelia rakudo-moar 5ed58f: OUTPUT«0␤»
18:48 Zoffix m: say from-json "foo"
18:48 camelia rakudo-moar 5ed58f: OUTPUT«Invalid JSON: foo␤  in block <unit> at /tmp/O8Vl21MN6s line 1␤␤»
18:48 Zoffix This is an error. Modern JSON spec allows non-object top-level things
18:48 Zoffix (same issue's in JSON::Fast)
18:49 Hotkeys time to make JSON::Modern
18:50 Zoffix :P
18:50 Hotkeys jk I'm already set on contributing to the Lingua::* part of the ecosystem
18:51 mspo JSON, YAML, BSON, and the rest should all be grammars, right?
18:51 Zoffix mspo, why should? Grammars are slow
18:51 PerlJam grammars should be fast :)
18:52 mspo well maybe not bson; idk
18:52 Zoffix PerlJam++
18:52 Hotkeys grammars are a big talking point of p6 I'd think they'd be quick :p
18:52 Zoffix Hm, we should look into adding Perl 6 into the implementations list here http://www.json.org/
18:52 mspo Zoffix: json is a sublangauge of javascript so it feels like a natrual fit
18:53 Hotkeys is that what the js stands for in json
18:53 PerlJam Hotkeys: grammars are *awesome*; but they are also not super optimized yet.
18:53 Hotkeys They are pretty awesome
18:53 mspo is a grammar the correct way to, say, parse out a network protocol?
18:53 Hotkeys Let's make them speedy quick how can I help
18:53 Zoffix mspo, huggable does it with IRC
18:53 Zoffix huggable, say hello
18:53 huggable Zoffix, nothing found
18:53 PerlJam mspo: it's *a* way.  "correct" requires a longer conversation  :)
18:53 Zoffix :D
18:54 Hotkeys it would definitely be a cool way
18:54 mspo what about a non-text protocol, like HTTP/2
18:54 mspo I just made a directory for Grammar::Memcached in my local dev box
18:54 mspo maybe I'm misguided
18:55 Zoffix Well. My response to that would be: start doing it. If you curse a lot during the process, perhaps it's not the right tool :P
18:55 flussence Grammars can only parse Strs right now; there were provisions in the synopses for handling binary as 7-bit ascii but that was never implemented
18:55 Hotkeys lol
18:55 PerlJam mspo: grammars are meant to "parse" non-text things, but right now it would be a little clunky I think.
18:55 Hotkeys brb heading to class and such
18:56 mspo I didn't see a clear way in a grammar to say "read X bytes", for example
18:57 Skarsnik nine, something like? class Foo{ has Str @.t}; sub bar() returns Hash[Any] {my Any %h; my $p = "hello".comb; %h<t> = $p; %h}; my %h; %h := bar(); say Foo.new(|%h);
18:57 mspo I guess that would all be done in the blob type?
18:58 kjs_ joined #perl6
18:58 milwen *Just testing the pastebin thing* https://gist.github.com/anonymous/fa62cd2f1fd32277dcd8
18:59 mspo yeah, with pack and unpack
18:59 Zoffix milwen, test successful! :) Camelia can also eval those
18:59 Zoffix m: https://gist.github.com/anonymous/fa62cd2f1fd32277dcd8
18:59 camelia rakudo-moar 5ed58f: OUTPUT«1␤»
19:00 FROGGS joined #perl6
19:00 PerlJam milwen: why parens around @*ARGS?
19:01 Zoffix Rakudobugged the from-json thing: https://rt.perl.org/Ticket/Display.html?id=127252
19:01 milwen simple answer.  I tried running it, didn't work, put the parens around, and THEN realized I didn't save the file the first time. haha
19:02 Skarsnik I wonder how many bugs open you have Zoffix x)
19:03 Zoffix Skarsnik, 24 open
19:03 Hotkeys Okay hello I made it to class
19:03 Hotkeys And I remembered to bring my clicker
19:03 Hotkeys Go me
19:04 Zoffix Skarsnik, which pales in comparison to the 223 open Issue I have created on GitHub :)
19:04 Hotkeys Zoffix is a reporting machine
19:04 jabus joined #perl6
19:04 lnrdo_ joined #perl6
19:05 AlexDaniel joined #perl6
19:08 mspo wasn't udp support added recently?
19:10 jnthn mspo: Yes, went in shortly before the release
19:11 jnthn mspo: https://github.com/perl6/roast/blob/master/S32-io/IO-Socket-Async-UDP.t # tests
19:11 daxim audience asks:  is it possible to autothread your own operators?
19:11 audience I did not ask that
19:12 Zoffix :o
19:12 nine Skarsnik: use a Map instead of a Hash
19:12 Skarsnik ?
19:12 mspo jnthn: didn't make it to docs
19:13 Zoffix mspo, I see some UDP mentioning http://docs.perl6.org/type/IO::Socket::Async.html#method_udp
19:13 mspo but not IO::Socket::INET?
19:13 Zoffix *shrug*
19:13 jnthn mspo: No, not implemented for sync sockets
19:14 jnthn UDP is inherently async anyway.
19:14 mspo and "low level" Sockets just doesn't exist?
19:14 lnrdo joined #perl6
19:14 mspo for RAW, for example
19:14 flussence sure they do: just use nativecall
19:14 nine m: class Foo{ has @.t; method gist() { dd @.t; } }; sub bar() returns Map {my %h := Map.new((t => my @ = "hello".comb)); %h}; my %h; %h := bar(); dd %h; say Foo.new(|%h);
19:14 camelia rakudo-moar 5ed58f: OUTPUT«Map.new((:t(["h", "e", "l", "l", "o"])))␤Array @!t = ["h", "e", "l", "l", "o"]␤Cannot unbox a type object␤  in block <unit> at /tmp/TwfMqM99pM line 1␤␤»
19:14 nine Skarsnik: ^^^
19:15 mspo flussence: I wonder
19:17 Zoffix timotimo, sent you a PR for docs for JSON::Fast. I didn't document the :level arg to to-json, because it seems like most an internal thing. https://github.com/timo/json_fast/pull/10
19:20 psy_ joined #perl6
19:20 Skarsnik nine, for me the initial code should work. I can write class Foo{ has @.t}; my %h; %h<t> = ("hello"); say Foo.new(|%h)
19:21 Skarsnik or even %h<t> := ["Hello"]
19:21 nine Skarsnik: a Hash itemizes the values, just like Array itemizes the values.
19:21 nine Map and List don't
19:22 timotimo Zoffix: oh, sweet!
19:22 timotimo yeah, :level is internal indeed
19:23 leont joined #perl6
19:23 mst Zoffix: I want to replace the background of every commenter on https://www.reddit.com/r/perl/comments/40m42l/why_in_the_world_would_anyone_use_perl_6/ with http://trout.me.uk/you.jpg
19:24 mst Zoffix: except chromatic, who would get http://trout.me.uk/hopper.jpg instead
19:24 Zoffix lol
19:24 Zoffix I've not seen any of that yet
19:24 * Zoffix reads
19:24 timotimo that's a ... huge bag of dicks
19:24 timotimo isn't it?
19:25 El_Che Hi Zoffix, I saw your post
19:25 flussence it's a factory of 'em
19:25 Skarsnik nine, I still don't get it really, it just confusing why it work outside a sub but not when the hash is returned
19:26 Zoffix mst, well, I fully agree with what you said lol :)
19:27 Zoffix El_Che, hi
19:27 * timotimo is afk for watching star wars! o/
19:28 El_Che timotimo: as a wookie?
19:28 virtualsue joined #perl6
19:31 El_Che Zoffix: 5 comments on your post (incl your answer) isn't really a sign of a huge hostility, imho
19:32 * El_Che now reading virtualsue's take
19:32 Zoffix El_Che, yeah, those comments are fine :)
19:33 El_Che Zoffix: there have been longer flames there in the past
19:33 * leont would rather work on creating cool stuff than argue with idiots on the internet
19:33 Zoffix leont++ good point
19:33 PerlJam leont++ indeed
19:33 * Zoffix proceeds to continue working on Class::Descendant and then Evil.pm6
19:34 El_Che leont: didn't you know someone is somewhere wrong on the internet!!
19:34 flussence leont++ # that's why I'm here, not there
19:34 El_Che today, I amused myself adding return types to my methods. That was something I liked about java
19:35 El_Che In my perl5 code I put the expected return type in comments, but sometimes I forget :)
19:36 leont Sometimes I'd like a Void return type though
19:36 leont (Or Sink, I suppose)
19:37 El_Che that would make it explicit indeed
19:37 gfldex you can explicitly return Nil, what happens to be the absense of a value
19:38 El_Che mm
19:38 El_Che m: sub s returns Nil { say 'foo' }; s
19:38 camelia rakudo-moar 5ed58f: OUTPUT«foo␤Type check failed for return value; expected Nil but got Bool␤  in sub s at /tmp/4uXkQno5Bl line 1␤  in block <unit> at /tmp/4uXkQno5Bl line 1␤␤»
19:39 El_Che (I know why, but still)
19:39 leont Something likse sub s is void {} could work
19:40 nine m: class Foo{ has @.t; method gist() { dd @.t }; }; my %h; sub bar() { my %h; %h<t> := ["hello"]; %h }; %h := bar; say Foo.new(|%h)
19:40 camelia rakudo-moar 5ed58f: OUTPUT«Array @!t = ["hello"]␤Cannot unbox a type object␤  in block <unit> at /tmp/1bOVn8TiRs line 1␤␤»
19:40 nine Skarsnik: ^^^
19:41 gfldex setting a return type doesn't really get you anything unless you use introspectoon on ther caller side against that return type
19:41 gfldex the return type is merely a runtime check of the returned value
19:41 gfldex what will move the line nr. in the error message around
19:41 El_Che gfldex: I like it as documentation (part of the signature)
19:42 nine It may also help uncover bugs more quickly.
19:42 moritz it documents that the error in the callee side, not on the caller side
19:42 jnap left #perl6
19:42 gfldex El_Che: please don't like it in a function that is called in a tight loop. Those 5% can add up quickly.
19:43 El_Che gfldex: because it's runtime
19:43 El_Che I see
19:44 Skarsnik err,
19:44 gfldex i know that it's 5% because that dropped out of a benchmark i did today
19:44 Skarsnik that should be an optimisation? since it know what to expect from the sub
19:44 gfldex sadly i'm very sleepy or i would tell you more
19:44 moritz Skarsnik: do submit a patch
19:45 zakharyas joined #perl6
19:45 Zoffix whoa... "WARNING: unhandled Failure detected in DESTROY: Type Signal does not support associative indexing." :P
19:46 virtualsue joined #perl6
19:46 cdg joined #perl6
19:47 Skarsnik nine, how I can have this work? (than my issue with DBIish, since I affect $value var that is put in the hash later) class Foo{ has @.t}; sub bar {my %h; my $p = "hello".comb; %h<t> = $p; %h}; my %h = bar(); say Foo.new(|%h)
19:47 Skarsnik I mean it work if I do %h<t> := $p
19:47 Zoffix m: CORE::IterationEnd ~~ Signal
19:48 camelia rakudo-moar 5ed58f: OUTPUT«Cannot call ACCEPTS(Signal: ); none of these signatures match:␤    (Mu:U $: \topic, *%_)␤    (Mu:U $: Mu:U \topic, *%_)␤    (Any:D $: Mu:D \a, *%_)␤    (Any:D $: Mu:U \a, *%_)␤    (Any:U $: \topic, *%_)␤    (Numeric:D $: \a, *%_)␤  in block <…»
19:48 jabus joined #perl6
19:48 Zoffix m: CORE::IterationEnd.WHAT.say
19:48 camelia rakudo-moar 5ed58f: OUTPUT«(Mu)␤»
19:48 El_Che .seen tadzik
19:48 yoleaux I saw tadzik 7 Jan 2016 20:18Z in #perl6: <tadzik> huh
19:48 nine Skarsnik: Even if you do %h<t> := $p; the point where it goes wrong is the %h = bar(); It would also go wrong if it was my %h = %o; Think of it like you're assigning the list of key-value pairs to this new %h. The benefit of binding gets lost there.
19:50 Zoffix What's a sane way to get all types/roles from CORE::? This is my attempt so far, but lines 17/18 are choking on some values (like the example above) https://gist.github.com/zoffixznet/4a623b529d2f52e833e3
19:50 peter__ joined #perl6
19:51 flussence open a repl and hold down tab? :D
19:51 nine Zoffix: I'm curious. What do you need them for?
19:51 Zoffix :( programmatically
19:51 mst write a small expect script that opens a repl and holds down tab
19:51 Zoffix nine, I want to know all descendants of a class.
19:52 Skarsnik well nine my goal is to have Array as value in my hash x)
19:52 Zoffix nine, and I want those so I could recompose them after I augment the parent
19:52 flussence (last time this came up, I used /usr/bin/script...)
19:52 mst oh, my, you're doing 'muck with a superclass, then re-init all subclasses thereof'
19:52 mst I almost implemented that in perl5 once then thought better of it
19:52 Zoffix mst, :D
19:52 Zoffix Nah, it sounds like fun :)
19:53 Zoffix FWIW, the module is called Evil :P
19:53 nine Zoffix: that won't give them anyway, since there may be anonymous classes or lexically scoped ones
19:53 Zoffix aww :(
19:53 yurivish joined #perl6
19:53 rurban joined #perl6
19:53 lnrdo joined #perl6
19:53 rurban1 joined #perl6
19:54 mst Zoffix: you're going to have to invent padwalker
19:54 masak here's a first: in developing a really cute DSL, I find myself passing variable declarations into a constructor. like so: `Board::OctagonalTiling.new(octagon => my $octagon, diamond => my $diamond)`
19:54 AlexDaniel m: sub foo($x = foo) { 42 }; say test;
19:54 camelia rakudo-moar 5ed58f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ABanGGSF5o␤Undeclared routine:␤    test used at line 1␤␤»
19:54 rurban2 joined #perl6
19:54 AlexDaniel m: sub foo($x = foo) { 42 }; say foo;
19:54 masak I guess the same technique is possible in Perl 5 (so someone likely already did this), but in Perl 5 you'd have to pass a reference, like \my $octagon
19:54 mst masak: no you wouldn't
19:54 camelia rakudo-moar 5ed58f: OUTPUT«Memory allocation failed; could not allocate 14597464 bytes␤»
19:54 mst masak: @_ is aliases
19:55 masak ooh
19:55 masak yes, indeed
19:55 Skarsnik fun one AlexDaniel
19:55 Zoffix mst, hm. Then I'll stow this until I'm smarter.
19:55 mst I have auto-immolating proxy objects with an AUTOLOAD that sets $_[0]
19:55 Zoffix My plans for world domination will have to wait.
19:55 masak mst: does this technique have a name? I'm basically passing variables in so that I can refer to "the same thing" later. like gensyms, but not for macros.
19:56 Zoffix AlexDaniel, I wonder whether that should generate a "deep recursion" warning, like you'd get in P5
19:56 jameslenz joined #perl6
19:56 mst masak: not that I can think of, I tend to describe it via a simile to 'open my $fh, ...'
19:57 AlexDaniel Zoffix: well, is there any recursion limit at all?
19:57 AlexDaniel m: sub foo() { return foo }; say foo
19:57 camelia rakudo-moar 5ed58f: OUTPUT«Memory allocation failed; could not allocate 37888 bytes␤»
19:57 llfourn is there any way to tell you are in the last iteration of a for loop other than having a counter? or kv -> $val,$i?
19:57 moritz masak: in p5, you need references if arrays or hashes are to be passed in and modified, because they'd be flattened out otherwise
19:58 Zoffix AlexDaniel, doesn't seem to be, but I'd imagine it'd be more helpful to get an error with a line number than an "Out of memory" thing (or just getting killed by the OS)
19:58 Skarsnik llfourn, do something on LAST ?
19:59 Zoffix m: for ^5 { LAST { say "$_" } }
19:59 camelia rakudo-moar 5ed58f: OUTPUT«4␤»
19:59 AlexDaniel Zoffix: yeah, it is less than awesome. That's what I'll submit, I guess
19:59 llfourn Skarsnik, Zoffix Ah ha! Is there a do something on not last :P
19:59 llfourn if last { } else { }
19:59 AlexDaniel Zoffix: though I'm not sure if there is any easy way to make it better
20:00 AlexDaniel LAST { }
20:00 Skarsnik hm
20:00 Skarsnik good question
20:01 ugexe LAST does not always work
20:01 ugexe m: sub foo() { for ^5 { LAST { say $_; }; return if $_ == 2; }; }; foo()
20:01 camelia rakudo-moar 5ed58f: ( no output )
20:01 Zoffix m: for ^5 { LAST { last }; .say }
20:01 camelia rakudo-moar 5ed58f: OUTPUT«0␤1␤2␤3␤4␤»
20:01 Zoffix hm
20:01 AlexDaniel ugexe: noooo. Whyy?
20:01 llfourn what ugexe shows makes sense to me
20:01 jnthn ugexe: Yes, it only fires if you reach the end of the loop by normal means.
20:01 Zoffix ugexe, seems to have worked just fine there. You exited before you got to the last element
20:02 jnthn Worth noting that in general we can't know in advance if we're at the last element.
20:02 llfourn m: for ^5 { LAST { say "LAST RAN" }; .say }
20:02 camelia rakudo-moar 5ed58f: OUTPUT«0␤1␤2␤3␤4␤LAST RAN␤»
20:02 jnthn Until we ask for the next one
20:02 moritz you seem to want a "finally" clause or so
20:02 Skarsnik m: sub foo() { for ^5 { END { say $_; }; return if $_ == 2; }; }; foo()
20:02 camelia rakudo-moar 5ed58f: OUTPUT«2␤»
20:02 moritz Skarsnik: END is a bit extreme :-)
20:03 Skarsnik Oh END it end of script?
20:03 moritz Skarsnik: aye :-)
20:03 moritz m: sub foo() { for ^5 { END { say $_; }; return if $_ == 2; }; }; foo(); say "I'm done here";
20:03 camelia rakudo-moar 5ed58f: OUTPUT«I'm done here␤2␤»
20:04 llfourn it makes sense to me that in general cases we can't know if we're at last beforehand. I suppose it would be icky adding something to tell you in the specific cases you do.
20:05 ugexe really you should do `last if $_ == 2`, but im just saying that someone might think LAST { } should fire when its the last item actually iterated, not if its the expected last item to be iterested
20:06 ugexe i know `why` it works that way, but it should be clear how that example could confuse someone
20:06 prammer joined #perl6
20:06 rurban joined #perl6
20:09 rurban1 joined #perl6
20:10 Celelibi joined #perl6
20:10 RabidGravy gosh I really got myself in a tiz with a Proxy there
20:10 PerlJam Zoffix++ (just read your reply to jnap.  Well said IMHO)
20:13 Skarsnik nine, what I don't really understand is why the Array became an Array of Array
20:13 M-eternaleye joined #perl6
20:18 masak where's the part of spec that tells how to distinguish a block from a hash again?
20:18 masak S02? S04? I can't find it
20:18 masak m: say { bar => 42 }.^name; say { bar => my $bar }.^name   # and currently I'm surprised that the second one is a Block
20:18 camelia rakudo-moar 5ed58f: OUTPUT«Hash␤Block␤»
20:19 flussence m: say %(bar => my $bar).^name # does this parse...?
20:19 camelia rakudo-moar 5ed58f: OUTPUT«Hash␤»
20:19 jnthn masak: S06-other/anon-hashes-vs-blocks.t
20:19 [Coke] S06-other/anon-hashes-vs-blocks.t ?
20:19 [Coke] ... dammit. :)
20:19 jnthn masak: Block because it declares symbols.
20:20 masak aha.
20:20 Skarsnik Oh
20:20 flussence forcing {} as a block is easy for me to remember, you just stick a ; in there. Same works in perl5
20:20 masak should I use hash(bar => my $bar) or something if I want a Hash but also want to declare symbols?
20:20 Skarsnik m: my %hash = Any;
20:20 camelia rakudo-moar 5ed58f: OUTPUT«Odd number of elements found where hash initializer expected␤  in block <unit> at /tmp/CU8FDzfDUo line 1␤␤»
20:20 jnthn Or %(...)
20:20 masak flussence: that wasn't really enough for Perl 6, in practice
20:20 Skarsnik I need to return Hash for 'undef' % ?
20:21 masak flussence: largely because .map et al. aren't special-cased
20:21 masak jnthn: ooh, %(...) is a good idea
20:21 jnthn Yeah, only one char longer than {...} if that matters :)
20:21 masak m: class C { has %.x }; say C.new( x => (foo => my $foo) )
20:21 camelia rakudo-moar 5ed58f: OUTPUT«C.new(x => {:foo(Any)})␤»
20:21 flussence @(...) is the one I usually need-and-forget-it-exists most often :)
20:21 masak nice, I don't even need the % in my case :)
20:22 Zoffix m: my %hash = %();
20:22 camelia rakudo-moar 5ed58f: ( no output )
20:22 jnthn Time for rest... o/ #perl6
20:23 jabus joined #perl6
20:24 skids m: sub a (|c) { c.perl.say }; a(1) :d; # Heh.   You learn something every time you open the design docs.
20:24 camelia rakudo-moar 5ed58f: OUTPUT«\(1, :d)␤»
20:27 _Vi joined #perl6
20:29 lnrdo joined #perl6
20:29 AlexDaniel rest? I thought jnthn will have another non-stop year long coding session :)
20:30 AlexDaniel skids: you mean that you can put adverbs outside of the brackets?
20:30 nine Skarsnik: it's the difference between $[1, 2] and [1, 2]
20:30 skids That adverbs were interpreted that way by .()
20:31 nine Skarsnik: m: my @a := [1, 2]; dd @a; my $b = @a; dd $b; my %h = t => @a; dd %h
20:31 nine m: my @a := [1, 2]; dd @a; my $b = @a; dd $b; my %h = t => @a; dd %h
20:31 camelia rakudo-moar 5ed58f: OUTPUT«[1, 2]␤Array $b = $[1, 2]␤Hash %h = {:t($[1, 2])}␤»
20:33 Skarsnik m: my %h = Any; # is that a bug?
20:33 camelia rakudo-moar 5ed58f: OUTPUT«Odd number of elements found where hash initializer expected␤  in block <unit> at /tmp/vVQbE1CjjA line 1␤␤»
20:33 dalek json: 9888329 | moritz++ | / (4 files):
20:33 dalek json: Implement RFC7159. Closes #22
20:33 dalek json: review: https://github.com/moritz/json/commit/9888329771
20:33 skids m: my %h = Nil
20:33 camelia rakudo-moar 5ed58f: OUTPUT«Odd number of elements found where hash initializer expected␤  in block <unit> at /tmp/8_1ieR2IGw line 1␤␤»
20:33 grondilu joined #perl6
20:33 skids More arguably buglike
20:36 llfourn I don't get it why are %h = Nil, or %h = Any bugs?
20:37 RabidGravy m: %h = Empty
20:37 camelia rakudo-moar 5ed58f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/BBP4AhNfCq␤Variable '%h' is not declared␤at /tmp/BBP4AhNfCq:1␤------> 3<BOL>7⏏5%h = Empty␤»
20:37 RabidGravy m: my %h = Empty
20:37 camelia rakudo-moar 5ed58f: ( no output )
20:37 Zoffix :o
20:37 Skarsnik I am curious was DBIish pass some tests x)
20:37 Skarsnik *why
20:38 llfourn m: say Empty
20:38 camelia rakudo-moar 5ed58f: OUTPUT«()␤»
20:38 moritz because if they didn't, we'd iterate until they do
20:38 skids llfourn: %h = Any is not a bug.  %h = Nil could be argued to be one because Nil has special uses in that capacity.
20:38 Skarsnik m: say "foo" if Empty;
20:38 camelia rakudo-moar 5ed58f: ( no output )
20:39 llfourn skids: ah ok gotcha thanks
20:39 skids Empty.perl.say
20:39 skids m: Empty.perl.say
20:39 camelia rakudo-moar 5ed58f: OUTPUT«slip()␤»
20:39 moritz note that Empty isn't a type anymore
20:40 dalek DBIish: e998b51 | (Sylvain Colinet)++ | lib/DBDish/ (2 files):
20:40 dalek DBIish: Return Hash instead of Any when no result left
20:40 dalek DBIish: review: https://github.com/perl6/DBIish/commit/e998b51bc3
20:40 zakharyas joined #perl6
20:41 spider-mario joined #perl6
20:51 FROGGS joined #perl6
20:53 kjs_ joined #perl6
20:55 hoelzro is there a builtin Str method to pad a string on the left or right side? it seems indent can do it, but only with spaces
20:56 moritz hoelzro: fmt/sprintf?
20:56 moritz for special cases, such as padding with space or numbers with 0
20:56 hoelzro ah, that would work
20:57 daotoad joined #perl6
20:57 hoelzro it seems a little wordy, but it gets the job done
20:57 hoelzro thanks moritz
20:59 rurban joined #perl6
20:59 pmqs joined #perl6
21:04 rurban1 joined #perl6
21:16 pmurias joined #perl6
21:18 cdg joined #perl6
21:19 pi4 joined #perl6
21:19 jnap joined #perl6
21:20 znpy joined #perl6
21:24 jnap newbie question of the day, those of you using rakudobrew, you add export PATH=~/.rakudobrew/bin:$PATH to .bashrc or something else?  just spent a silly 5 minutes trying to figure out why 'which perl6' was giving me nothing :)
21:24 daotoad joined #perl6
21:24 alpha123 jnap: yes
21:26 espadrine joined #perl6
21:26 RabidGravy i's definitely there for me
21:26 RabidGravy jonathan@coriolanus Tinky]$ which perl6
21:26 RabidGravy ~/.rakudobrew/bin/perl6
21:28 jnap cool, I've not used Perlbrew in ages but now I am remembering it was sorta the same way
21:29 moritz iirc perlbrew gives you a perlbrewrc file which you can source from your .bashrc, and which sets up $PATH for you
21:29 RabidGravy yeah, I've looked in the other rakudobrewy dirs in my path and no perl6
21:30 sortiz jnap: I use in .bashrc:  eval "$(/home/sog/.rakudobrew/bin/rakudobrew init -)"
21:31 prammer if [ -x ~/.rakudobrew/bin/rakudobrew ]; then eval "$(~/.rakudobrew/bin/rakudobrew init -)"; fi
21:31 virtualsue joined #perl6
21:36 jnap basically like how perlbrew was, cool.
21:40 masak interesting. I knew about six, but I never thought about this problem: http://astrofrog.github.io/blog/2016/01/12/stop-writing-python-4-incompatible-code/
21:41 moritz masak: my main reaction was "YAGNI"
21:41 moritz worrying now about compatibility with yet another incompatible major python version seems like overkill
21:41 jnap awesome I can run my failing tests!  by my reckoning that's a step up from yesterday ;)
21:42 moritz I hope that the python dev community is still in enough shock from the slow python 3 uptake that they don't consider a python 4 any time soon
21:42 jnap its just perl6 -Ilib ....   for testing?  I didn't see a prove6
21:42 moritz jnap: you can use p5's prove
21:42 moritz jnap: prove -e 'perl6 -Ilib' t
21:43 jnap ah, because its just tap right
21:43 moritz jnap: there's also a Perl 6 prove being worked on (or two even), but I don't know the current status
21:43 moritz right
21:43 moritz protocols++
21:43 leont Install TAP::Harness, and you have a prove6 ;-)
21:44 leont It's fully functional, except the parallelism
21:44 jnap its still better than what we had for perl5 back in the early days.  I still maintain some test code that has "print 'ok 1' " crap all over
21:44 rparks99 joined #perl6
21:46 masak 'night, #perl6
21:47 leont I've came across that too
21:49 TimToady that was how Perl 1 was tested :)
21:49 yoleaux 14:46Z <[Coke]> TimToady: if he can decide on the right behavior for https://rt.perl.org/Ticket/Display.html?id=112216
21:50 AlexDaniel .oO(Stop writing code that will break on Perl 7!)
21:50 [Coke] there are some test tests in roast that look like that to this day.
21:51 moritz [Coke]: those that test say() and print(), iirc
21:51 TimToady it makes sense in some cases
21:51 prammer left #perl6
21:52 prammer joined #perl6
21:56 _nadim joined #perl6
21:56 TimToady [Coke]: I guess in the absence of strong arguments to the contrary, I'm okay with the current behavior of #112216
21:58 [Coke] TimToady++ danke.
21:58 [Coke] only 1199 tickets to go. :|
21:58 [Coke] m: say 1199.is-prime
21:58 camelia rakudo-moar 5ed58f: OUTPUT«False␤»
21:59 * lizmat feels empty and goes to bed
22:00 [Coke] lizmat: g'nite!
22:00 * [Coke] was feeling very down earlier today but is now in a goodish mood.
22:01 revhippie joined #perl6
22:04 FROGGS m: { use Test }; say Test # why does this work? I thought even 'use' is lexical?
22:04 camelia rakudo-moar 5ed58f: OUTPUT«(Test)␤»
22:05 [Coke] m: say Test;
22:05 camelia rakudo-moar 5ed58f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/4iVo44sVAX␤Undeclared name:␤    Test used at line 1␤␤»
22:05 llfourn FROGGS: that's a good question. I thought it didn't.
22:05 [Coke] (just checking)
22:05 FROGGS I mean, sure, we do global merging and stuff with these symbol... it is just that I ask myself if this is right or not
22:05 llfourn yes but shoudn't it merge it into the GLOBALish of the lexpad
22:06 llfourn not the UNIT
22:06 llfourn is lexpad GLOBALish even a thing?
22:06 ZoffixWin joined #perl6
22:06 ZoffixWin joined #perl6
22:06 FROGGS I think so
22:09 ZoffixWin What's the process for making changes to the http://rakudo.org/how-to-get-rakudo/ ? I think this comment definitely raises a good point, if you're coming in as a Windows user. https://www.reddit.com/r/perl/comments/40m42l/why_in_the_world_would_anyone_use_perl_6/cyvu4yp
22:09 nine It may be just a straight forward bug caused by my lack of understanding of those things when I did the refactor.
22:11 llfourn it seems from World.nqp that load_module is being passed $*GLOBALish when 'use' is parsed
22:11 llfourn and I think $*GLOBALish might be UNIT::GLOBALish hence the behaviour
22:11 linuxuser9000 joined #perl6
22:12 frankjh joined #perl6
22:13 nine Ok, so not my bug.
22:18 llfourn I think maybe lexpad GLOBALish is not a thing, and it wouldn't be very GLOBALish if they did exist in lexpads.
22:19 llfourn though someone thinks they should be because of the '$cur_GLOBALish' arg to load_module so maybe it's a NYI
22:19 AlexDaniel segfault! Hooray!
22:19 AlexDaniel m: my $x := (my $y := $x); say $x.^methods;
22:19 camelia rakudo-moar 5ed58f: OUTPUT«(signal SEGV)»
22:20 AlexDaniel m: my $x := (my $y := $x); say $y.^methods;
22:20 camelia rakudo-moar 5ed58f: OUTPUT«(signal SEGV)»
22:20 Skarsnik that cute
22:20 AlexDaniel Yeah, I feel recursive today
22:20 ZoffixWin m: my $x := (my $y := $x); say $y.first
22:20 camelia rakudo-moar 5ed58f: OUTPUT«Cannot call method 'first' on a null object␤  in block <unit> at /tmp/Cfxl0RUwCS line 1␤␤»
22:20 ZoffixWin interesting
22:21 AlexDaniel m: my $x := (my $y := $x); say $y.WHAT;
22:21 camelia rakudo-moar 5ed58f: OUTPUT«(signal SEGV)»
22:21 AlexDaniel m: my $x := (my $y := $x); say $y.perl;
22:21 camelia rakudo-moar 5ed58f: OUTPUT«Cannot call method 'perl' on a null object␤  in block <unit> at /tmp/RppiK6fAM1 line 1␤␤»
22:22 frankjh Hi, In NativeCall:  I have a native C routine foo(char* buf, unsigned long long* len). The native routine writes the length of a buffer into that memory location. sub foo(CArray[int8], ???) How do I express that correctly?
22:23 Skarsnik Pointer[size_t]?
22:24 Skarsnik Could be Pointer[size_t] is rw maybe
22:25 Skarsnik this unsigned long long is suspcious, it's really the C route signature?
22:25 Skarsnik *routine
22:26 FROGGS sub foo(CArray[int8], CArray[ulonglong]) { * }; my $buf = CArray[int8].new; my $len = CArray[ulonglong].new; $len[0] = 0; foo($buf, $len); say $len
22:27 FROGGS frankjh: something like that^^
22:27 frankjh yes, I think: typedef unsigned long long u64; int crypto_sign(u8 *sm,u64 *smlen,const u8 *m,u64 n,const u8 *sk)
22:27 frankjh ulonglong exists?
22:27 FROGGS m: say NativeCall; say ulonglong
22:27 camelia rakudo-moar 5ed58f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/STwz9xgvrT␤Undeclared routine:␤    ulonglong used at line 1␤␤»
22:27 FROGGS :o(
22:27 FROGGS m: say NativeCall; say uint64
22:27 camelia rakudo-moar 5ed58f: OUTPUT«NativeCall is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting line 1␤  in method gist at src/RESTRICTED.setting line 33␤  in block <unit> at /tmp/gdgAETEEIe line 1␤␤»
22:28 FROGGS m: use NativeCall; say uint64
22:28 camelia rakudo-moar 5ed58f: OUTPUT«(uint64)␤»
22:28 FROGGS m: use NativeCall; say ulonglong
22:28 camelia rakudo-moar 5ed58f: OUTPUT«(ulonglong)␤»
22:28 FROGGS there you go
22:29 lokien_ joined #perl6
22:30 frankjh Ah Cool. I seems missing in the doc http://doc.perl6.org/language/nativecall. Many Thanks!
22:31 Skarsnik u64 are uint64 probably
22:31 frankjh Unfortunately not: typedef unsigned long long u64;
22:31 lokien_ hey, I want to be a unix hax0r, but I only know clojure. few guys told me that I have to learn c, awk, sed etc. c is too spooky for me. can I learn perl instead?
22:32 AlexDaniel lokien_: Perl 5 or Perl 6?
22:33 Skarsnik frankjh, yes, but I mean if it's call u64 it mean something that is always a 64 bits unsigned on every plateform, so a uint64 will be perl6 type
22:33 lokien_ AlexDaniel: I don't know, honestly. I'm writing here because perl 6 looks better
22:33 Skarsnik huggable, module App::GPTrixie
22:33 huggable Skarsnik, Link to module: http://modules.perl6.org/repo/App::GPTrixie
22:33 Skarsnik if you want to not write too much NC code
22:33 Skarsnik *definition
22:34 AlexDaniel lokien_: if we are speaking about language design, then yes, it is better. But Perl 5 is currently faster (most of the time) for crunching stuff
22:34 lokien_ AlexDaniel: much faster?
22:34 AlexDaniel lokien_: depends
22:35 lokien_ AlexDaniel: oh, well. so.. can I learn perl instead of these other tools? I think I'd go with 6
22:35 AlexDaniel lokien_: also there is much more stuff written in Perl 5, but this is not necessarily a good argument because you can use all that from Perl 6 with Inline::Perl5
22:36 AlexDaniel lokien_: well, it is a joy to code in Perl 6 so you wont regret it for sure
22:36 lokien_ AlexDaniel: much better than with python
22:37 lokien_ AlexDaniel: perl syntax spooks me to the bone though
22:37 frankjh Skarsnik: But he typedef is from the native lib, so it looks like u64 notes there something with is at least 64bit or, do I miss something? Probably a bad name for the u64 type...
22:38 AlexDaniel lokien_: but it is not that some tool will outperform every other tool in all scenarios, so you always have to keep your eyes open anyway :)
22:38 lokien_ AlexDaniel: I just want something for quick and dirty scripts
22:39 AlexDaniel lokien_: try it and see if it works for you :)
22:39 lokien_ AlexDaniel: can I ask my foolish questions here?
22:40 AlexDaniel lokien_: yes, although they are not considered stupid here
22:40 AlexDaniel or foolish
22:40 Skarsnik frankjh, I mean it's a common thing to have a typedef for 64bits stuff. Like sqlite has a sqlite_int64 and I pretty sure it defined according to your system. It's pretty common on code not using C99 standard
22:41 AlexDaniel lokien_: I think that we actually want to see more questions like this here (because it is easier to improve the docs)
22:42 kjs_ joined #perl6
22:42 lokien_ AlexDaniel: sorry, I was on #lisp for a little while, I'm still feeling foolish. I'll try my best in the next days
22:42 Skarsnik but since perl6 offert int64/num64 it's pretty safe to translate sqlite_int64 to int64, instead of figuring the type behind the sqlite_int64 typedef
22:43 yqt joined #perl6
22:43 lokien_ AlexDaniel: anyway, do you guys write any full-blown programs with perl? or is it a string processing, "domain specific" language
22:44 llfourn with perl5 yes, with perl6 I mostly just experiment so far :)
22:45 Skarsnik FROGGS, btw, CArray[uint8] give me signed int8 when getting the value x)
22:45 AlexDaniel lokien_: people do all sorts of things with it, though perhaps not enterprise-grade big-ass programs yet
22:46 AlexDaniel lokien_: I like using it as teaching aid for example (you can show almost anything in Perl 6)
22:46 FROGGS Skarsnik: yes, I got a similar bug report just a few days ago
22:46 AlexDaniel lokien_: I also write tests for C programs in Perl 6… :)
22:46 lokien_ llfourn: well, I hope I won't have to switch to 5
22:47 frankjh Skarsnik: It looks like it is here unsigned long long on all plattforms, so it might be larger on some of them.
22:47 Skarsnik it's not a generated header?
22:47 lokien_ AlexDaniel: umm, I'll grab a book tomorrow and try to do some advent of code with it. or "perl introduction", we'll see
22:47 llfourn lokien_: I hope you won't either, but it depends what you are trying to do
22:48 lokien_ thanks for being polite and helpful, I like you already
22:48 AlexDaniel llfourn: by the way, are there any reasons to switch to 5 besides performance?
22:48 lokien_ llfourn: have fun :^)
22:48 PerlJam AlexDaniel: CPAN
22:48 AlexDaniel PerlJam: Inline::Perl5 ?
22:49 PerlJam AlexDaniel: doesn't work with all modules on CPAN.
22:49 AlexDaniel PerlJam: uh! Okay
22:49 llfourn AlexDaniel: well, Mojolicious is still the most excellent thing that exists for web glue stuff
22:49 dalek ecosystem: 97f3c33 | FROGGS++ | META.list:
22:49 dalek ecosystem: add "pragma" if
22:49 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/97f3c33ce5
22:49 llfourn right what PerlJam said :)
22:49 AlexDaniel lokien_: not sure which book you are mentioned but a good way to start is http://doc.perl6.org/language.html
22:49 frankjh Skarsnik: Maybe, it is an unusal library: http://tweetnacl.cr.yp.to/20140427/tweetnacl.c, line 8 or so.
22:50 PerlJam lokien_: adventofcode is a good choice.  I did some of the problems myself this year while waiting in an airport.
22:50 AlexDaniel llfourn: yeah, that makes sense.
22:50 PerlJam lokien_: (in perl 6)
22:51 lokien_ AlexDaniel: I was talking about this http://perl6intro.com
22:51 AlexDaniel lokien_: there is also https://learnxinyminutes.com/docs/perl6/
22:52 AlexDaniel lokien_: both are great resources, indeed
22:52 Skarsnik frankjh, Oh yeah. Well have fun with that x)
22:52 lokien_ PerlJam: I've done like 4 in clojure and 1 in go, they are pretty fun. I was waking in the dark writing go code though, I copied one third of it from SO
22:53 lokien_ s/waking/walking
22:53 frankjh :)
22:53 timotimo o/
22:53 llfourn AlexDaniel: For the things I use Mojo for Inline::Perl5 is not appropriate, I don't need any specific module I need the IOLoop, combined with ...yes speed.
22:53 lokien_ AlexDaniel: thanks, I'll read it tomorrow
22:54 AlexDaniel lokien_: by the way, if you find that something is missing, your contributions are welcome
22:54 RabidGravy right, toodles people
22:54 virtualsue joined #perl6
22:54 Skarsnik good night RabidGravy
22:54 PerlJam lokien_: P6 does suffer a speed impediment on some of the problems though.
22:54 AlexDaniel lokien_: because since you are just starting out you probably know better what could be improved
22:55 lokien_ AlexDaniel: where can I search for useful functions?
22:55 AlexDaniel lokien_: hmmm, what do you mean?
22:56 lokien_ PerlJam: is it *that* slow?
22:56 PerlJam lokien_: doc.perl6.org is the first place to look
22:56 PerlJam lokien_: for some of the problems, yes.  Perl 6 isn't highly optimized yet.
22:57 lokien_ AlexDaniel: like, I want to open a text file, I don't know how, I go into "files" bookmark on some website and there is this function I was looking for
22:57 PerlJam lokien_: For instance, I think I killed my run for part 2 of Day 4 because it was taking so long.
22:57 lokien_ AlexDaniel: sth like clojuredocs.org
22:58 lokien_ PerlJam: it was like 5 seconds in clojure.. damn.
22:58 AlexDaniel lokien_: http://doc.perl6.org/language.html see Input/Output
22:59 lokien_ AlexDaniel: thanks
23:01 lokien_ perl 5 is similar/a bit faster than python 3? oh, well. I've always thought it was fast
23:01 PerlJam lokien_: I was using an unoptimized Perl 6 implementation of MD5.  If I'd used NativeCall to get at a C lib for it, it would have gone *much* quicker
23:02 leont MD5 isn't the sort of thing dynamic languages are good at
23:02 lokien_ PerlJam: I've had md5s taking 100% from 4 cores, so.. it's a bit unfair
23:03 PerlJam leont: one day Perl 6 will be good at it ;)
23:04 * leont remembers implementing biological alignment algorithms in perl5, it was about 100 times slower than the C implementation :-/
23:04 lokien_ leont: 100 times slower than c isn't that slow, actually
23:05 kjs_ joined #perl6
23:05 lokien_ some golang's crypto function was 340 times slower than c
23:05 Skarsnik I am curious how far native type + SMIT + shapped Array will push the perf
23:06 PerlJam dinner time for me.  See you guys later
23:06 * PerlJam &
23:06 leont SMIT?
23:07 Skarsnik I probably get this one wrong, the cpu instruction to do the same instruction on a multiple value on one cycle
23:09 lokien_ I'm going to sleep, see you tommorow, I'll be asking a lot of silly questions.
23:11 leont SIMD?
23:11 Skarsnik Yes SIMD
23:12 Skarsnik I used them one to convert yuv to rgb once x)
23:14 newbie joined #perl6
23:19 AlexDaniel joined #perl6
23:19 zwu joined #perl6
23:22 AlexDaniel please delete RT 127250
23:23 * AlexDaniel wishes that some day he will be able to do that himself
23:24 kid51 joined #perl6
23:27 ribasushi joined #perl6
23:28 cpage_ joined #perl6
23:33 _nadim In a heredoc, a code block output is added, s there something tha can be returned by the block to not add a line?
23:33 _nadim Nil work the same as the empty string, it adds an ampty line
23:34 AlexDaniel m: subset Int of Int where * >= 0; my Int $x = 5
23:34 camelia rakudo-moar 5ed58f: OUTPUT«===SORRY!===␤You cannot create an instance of this type␤»
23:34 AlexDaniel m: subset Str of Int where * >= 0; my Int $x = 5
23:34 camelia rakudo-moar 5ed58f: ( no output )
23:42 daotoad joined #perl6
23:42 tadzik El_Che: I'm around now :)
23:46 atweiden joined #perl6
23:55 pierre-vigier joined #perl6
23:59 rindolf joined #perl6

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

Perl 6 | Reference Documentation | Rakudo