Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-07-27

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:04 llfourn steven_: I forgot to mention the most important part. At the top of main.p6 you put 'use MyModule;'. Then you will get anything exported from MyModule.pm6
00:05 steven_ ok cool will add that
00:07 llfourn steven_: you have to put 'is export' on things you want to export from MyModule.pm6 to get them in main.p6
00:09 mcmillhj joined #perl6
00:09 steven_ i have been trying https://perl6advent.wordpress.com/2009/12/12/day-12-modules-and-exporting/
00:09 steven_ but cannot get it to work
00:09 llfourn what error are you getting?
00:10 steven_ Could not find MyModule at line 1
00:11 [Coke] how are you running it? probably need to specify PERL6LIB env var.
00:11 [Coke] (or use -I on the command line)
00:11 steven_ yeah i think you are right because the article references $PERL6LIB
00:11 llfourn steven_: if you do perl6 -Ilib main.p6 and MyModule.pm6 is in lib it will work
00:12 [Coke] also note that 2009 is ancient history.
00:12 steven_ btw i am REALLY NEW TO PERL
00:12 steven_ but not new to programming
00:13 steven_ i will check into that env var and then come back to this chat
00:13 steven_ success imminent
00:13 steven_ !!
00:13 llfourn steven_: good luck :)
00:14 profken Anyone have any idea about why this isn't working? https://gist.github.com/anonymous/018c83c8d4475953886c594530e4e6af
00:14 mcmillhj joined #perl6
00:18 Geth ¦ doc: bd88d704aa | (Will "Coke" Coleda)++ | doc/Type/Str.pod6
00:18 Geth ¦ doc: show OUTPUT
00:18 Geth ¦ doc: review: https://github.com/perl6/doc/commit/bd88d704aa
00:18 Geth ¦ doc: cc0c04b676 | (Will "Coke" Coleda)++ | xt/space-after-comma.t
00:18 Geth ¦ doc: convert from run to Proc::Async
00:18 Geth ¦ doc: review: https://github.com/perl6/doc/commit/cc0c04b676
00:18 profken I don't know what 'This type cannot unbox to a native number: P6opaque, Int' means
00:18 zollX is there any facility to include DATA (lines) to a program as one can in perl 5 by adding stuff after __DATA__?
00:19 llfourn profken: that sort of error
00:19 llfourn you can get like:
00:19 llfourn m: my int $a = "foo"
00:19 camelia rakudo-moar 5d89ce: OUTPUT: «This type cannot unbox to a native integer: P6opaque, Str?  in block <unit> at <tmp> line 1??»
00:19 llfourn m: my num $a = 3
00:19 camelia rakudo-moar 5d89ce: OUTPUT: «This type cannot unbox to a native number: P6opaque, Int?  in block <unit> at <tmp> line 1??»
00:19 llfourn there you go ^
00:20 llfourn it looks like it wants floating point numbers but it's getting Ints at some point
00:20 llfourn tbh I would expect it to auto convert
00:20 llfourn m: my num $a = 3e0
00:20 camelia rakudo-moar 5d89ce: ( no output )
00:22 profken how do I convert an int to a num
00:22 llfourn zollX: I think there is but tbh I don't recall. Something to do with $=pod I think.
00:22 llfourn m: my int $a = 3; my num $b = $a.Num
00:22 camelia rakudo-moar 5d89ce: ( no output )
00:22 llfourn profken: like this maybe^
00:23 geekosaur r: my num $a = 3.Num
00:23 camelia rakudo-jvm 5d89ce: OUTPUT: «java.nio.file.NoSuchFileException: /nqp/lib/Perl6/BOOTSTRAP.jar?  in <anon> (gen/jvm/ModuleLoader.nqp:92)?  in load_module (gen/jvm/ModuleLoader.nqp:79)?  in <anon> (gen/jvm/CORE.setting)?  in <anon> (gen/jvm/ModuleLoader.nqp:257)?  in load_sett…»
00:23 camelia ..rakudo-moar 5d89ce: ( no output )
00:23 zollX thanks, llfourn. that is something i do not expect perl 6 to provide but won't mind if it does indeed.
00:23 llfourn zollX: apaprently there was a SO about this: https://stackoverflow.com/questions/4269140/does-perl6-support-something-equivalent-to-perl5s-data-and-end-sections#4269362
00:24 mcmillhj joined #perl6
00:24 profken Thank you llfourn, I got it working
00:24 llfourn profken: \o/ nice!
00:25 travis-ci joined #perl6
00:25 travis-ci Doc build errored. Will "Coke" Coleda 'convert from run to Proc::Async'
00:25 travis-ci https://travis-ci.org/perl6/doc/builds/257959494 https://github.com/perl6/doc/compare/69b25a390f59...cc0c04b676e7
00:25 travis-ci left #perl6
00:25 buggable [travis build above] ? Did not recognize some failures. Check results manually.
00:26 zollX llfourn++. that SO link was much helpful
00:26 llfourn sweet. It's good to feel helpful :)
00:35 Geth ¦ doc: 513b730a85 | (Will "Coke" Coleda)++ | doc/Type/List.pod6
00:35 Geth ¦ doc: Note "not-grep"
00:35 Geth ¦ doc:
00:35 Geth ¦ doc: Fixes #1425
00:35 Geth ¦ doc: review: https://github.com/perl6/doc/commit/513b730a85
00:35 lookatme morning
00:36 Cabanossi joined #perl6
00:37 * lookatme here is 8.37
00:39 mcmillhj joined #perl6
00:39 Technaton joined #perl6
00:44 cpage_ joined #perl6
00:54 travis-ci joined #perl6
00:54 travis-ci Doc build passed. Will "Coke" Coleda 'Note "not-grep"
00:54 travis-ci https://travis-ci.org/perl6/doc/builds/257962839 https://github.com/perl6/doc/compare/cc0c04b676e7...513b730a857b
00:54 travis-ci left #perl6
00:56 mcmillhj joined #perl6
00:56 timotimo [Coke]: does anything speak against none(/foo bar/) there?
00:57 skids joined #perl6
00:58 geekosaur isn't dragging in a junction slower?
00:59 jeromelanteri morning
01:00 timotimo hm, perhaps
01:01 AlexDaniel interesting, just today we've been talking about not-grep and I'm already using the none trick for something else
01:02 timotimo there's none trick here, move along
01:02 AlexDaniel I have a feeling that pushing people towards learning none junction is far more useful than having not-grep (as it may be useful everywhere), but I'm not sure
01:02 timotimo move allong, none tricks to see, not anything at all
01:03 AlexDaniel it slightly bothers me that junctions are typically *really* slow, but maybe we can optimize none for this exact case
01:03 AlexDaniel I mean, ~~ with none
01:04 timotimo maybe a fast-path for only one thing in the junction
01:04 AlexDaniel yea
01:05 timotimo last time i looked at that hacker news post it had 208 comments, now it's 320
01:05 AlexDaniel m: say <a b c d e f>.grep({! /<[aeiou]>/})
01:05 camelia rakudo-moar 5d89ce: OUTPUT: «(b c d f)?»
01:05 AlexDaniel m: say <a b c d e f>.grep(none /<[aeiou]>/)
01:05 camelia rakudo-moar 5d89ce: OUTPUT: «(b c d f)?»
01:05 AlexDaniel which one is more readable? :)
01:05 timotimo that regex is quite easy to negate internally, though
01:05 AlexDaniel well, that's not the point, but sure
01:06 timotimo of course
01:08 mcmillhj joined #perl6
01:09 zollX AlexDaniel: both grep-not are equally readable. of course, the 2nd one has fewer characters to (humanly) parse around
01:11 colomon m: say (1, 2.3, 3, “b”).grep(Int)
01:11 camelia rakudo-moar 5d89ce: OUTPUT: «(1 3)?»
01:11 colomon m: say (1, 2.3, 3, “b”).grep(none Int)
01:11 camelia rakudo-moar 5d89ce: OUTPUT: «(2.3 b)?»
01:11 lookatme m: say (1, 2.3, 3, “b”).grep(! Int)
01:11 camelia rakudo-moar 5d89ce: OUTPUT: «Cannot use Bool as Matcher with '.grep'.  Did you mean to use $_ inside a block??  in block <unit> at <tmp> line 1??»
01:12 AlexDaniel zollX: it is also technically better because you can use it with anything, not just regexes
01:12 AlexDaniel m: say (1, 2.3, 3, “b”).grep(none Int) # case in point
01:12 camelia rakudo-moar 5d89ce: OUTPUT: «(2.3 b)?»
01:12 timotimo i wish we could figure out that the thing passed to grep was created with ! there
01:12 AlexDaniel timotimo: huh?
01:12 timotimo .grep(! Int)
01:12 timotimo says "can't use bool as a matcher!"
01:13 AlexDaniel you mean that the error message is LTA?
01:13 lookatme I prefer one have consistency
01:13 colomon are there any cases where “none” doesn’t work?
01:13 AlexDaniel colomon: this is what I'm wondering also
01:14 zollX m: say (1, 2.3, 3, “b”).grep(none Any)
01:14 camelia rakudo-moar 5d89ce: OUTPUT: «()?»
01:14 AlexDaniel colomon: very often I had revelations like this only to realize later that it doesn't always work
01:14 zollX sweet
01:15 colomon AlexDaniel: I hear you
01:16 zollX thanks people. time to step away from 'puter ...
01:18 AlexDaniel oh wow!
01:18 AlexDaniel bench: HEAD compare (^9999).grep(none /1/) ||| (^9999).grep({!/1/})
01:19 AlexDaniel ah the bot is down
01:19 AlexDaniel one sec…
01:19 statisfiable6 joined #perl6
01:19 AlexDaniel not this one though
01:19 benchable6 joined #perl6
01:19 AlexDaniel bench: HEAD compare (^9999).grep(none /1/) ||| (^9999).grep({!/1/})
01:19 benchable6 AlexDaniel, starting to benchmark the 1 given commit
01:19 benchable6 AlexDaniel, ¦HEAD: ««run failed, exit code = 1, exit signal = 0»»
01:19 AlexDaniel benchable6: wiki
01:19 benchable6 AlexDaniel, https://github.com/perl6/whateverable/wiki/Benchable
01:20 AlexDaniel bench: compare HEAD (^9999).grep(none /1/) ||| (^9999).grep({!/1/})
01:20 benchable6 AlexDaniel, starting to benchmark the 1 given commit
01:20 benchable6 AlexDaniel, https://gist.github.com/82321be4c9cf975a9c5464845a806c37
01:20 AlexDaniel bench: compare HEAD (^99999).grep(none /1/) ||| (^9999).grep({!/1/})
01:20 benchable6 AlexDaniel, starting to benchmark the 1 given commit
01:20 benchable6 AlexDaniel, https://gist.github.com/60b7a888ef4e30608ce5b260b4f696eb
01:20 AlexDaniel wrong
01:20 AlexDaniel bench: compare HEAD (^99999).grep(none /1/) ||| (^99999).grep({!/1/})
01:20 benchable6 AlexDaniel, starting to benchmark the 1 given commit
01:20 benchable6 AlexDaniel, https://gist.github.com/9d465b380c2cd0f94240fbaabce3947e
01:21 AlexDaniel … anyway
01:21 AlexDaniel e: (^99999).grep(none /1/); say now - BEGIN now
01:21 evalable6 AlexDaniel, rakudo-moar 5d89cef9f: OUTPUT: «1.0512459»
01:21 AlexDaniel e: (^99999).grep({!/1/}); say now - BEGIN now
01:21 Cabanossi joined #perl6
01:21 evalable6 AlexDaniel, rakudo-moar 5d89cef9f: OUTPUT: «8.9576913»
01:21 AlexDaniel timotimo: ?
01:22 AlexDaniel so using none junction is actually SIGNIFICANTLY faster
01:22 AlexDaniel unless I'm missing something
01:22 colomon woah
01:22 AlexDaniel e: (^99999).grep({!/1/}).elems.say; say now - BEGIN now
01:22 skids yay autothreading.
01:22 evalable6 AlexDaniel, rakudo-moar 5d89cef9f: OUTPUT: «59048?9.1152870»
01:22 AlexDaniel e: (^99999).grep(none /1/).elems.say; say now - BEGIN now
01:22 evalable6 AlexDaniel, rakudo-moar 5d89cef9f: OUTPUT: «59048?1.0630564»
01:23 timotimo that can't be true?
01:23 timotimo really strange, but i like it
01:24 AlexDaniel by the way
01:24 geekosaur I would not want to trust a bot on a vps for timing
01:24 timotimo ???? is not a valid number symbol to us :(
01:24 AlexDaniel e: (^99999).grep({/1/}).elems.say; say now - BEGIN now
01:24 evalable6 AlexDaniel, rakudo-moar 5d89cef9f: OUTPUT: «40951?8.9982822»
01:24 AlexDaniel e: (^99999).grep(/1/).elems.say; say now - BEGIN now
01:25 evalable6 AlexDaniel, rakudo-moar 5d89cef9f: OUTPUT: «40951?0.9552490»
01:25 mcmillhj joined #perl6
01:25 AlexDaniel geekosaur: this is not a vps. This is a dedicated server
01:25 AlexDaniel geekosaur: it's not completely empty, but normally it has *very* low load
01:25 colomon geekosaur: I just got similiar results (with same code) on my Mac.
01:25 AlexDaniel geekosaur: and when you have 8 TIMES the difference I don't think there's any reason not to trust it
01:26 AlexDaniel sooo, matching a regex is always significantly faster than matching a block it seems? A none junction doesn't seem to do any difference at all
01:26 skids ah. foo.
01:26 AlexDaniel like, even if we were to optimize it here, it'd give like 5% of a difference but that's not much
01:27 AlexDaniel I don't know about you folks, but for me this is a huge discovery :)
01:27 colomon AlexDaniel++ # benchmarking for the win
01:28 AlexDaniel maybe benchable can do the right thing to graph it across releases though…
01:28 AlexDaniel bench: releases (^40000).grep({!/1/}).elems.say
01:28 benchable6 AlexDaniel, starting to benchmark the 21 given commits
01:29 skids would seem to indicate a lot of time is spent in call setup for closures.
01:29 timotimo a tracing specializer could do some good here
01:31 AlexDaniel please benchable6 don't act stupid, just gist what you have…
01:31 AlexDaniel or I'll change your code even more that you'll not recognize yourself in a mirror
01:33 benchable6 AlexDaniel, «hit the total time limit of 240 seconds»
01:33 AlexDaniel bench: releases (^10000).grep({!/1/}).elems.say
01:33 benchable6 AlexDaniel, starting to benchmark the 21 given commits
01:33 AlexDaniel come on
01:33 AlexDaniel I want a graph of this
01:35 benchable6 AlexDaniel, benchmarked the given commits, now zooming in on performance differences
01:35 timotimo that was quicker
01:35 skids m: (^99999).grep(-> $a {$a ~~ /1/}).elems.say; say now - BEGIN now
01:35 camelia rakudo-moar 5d89ce: OUTPUT: «40951?1.2832665?»
01:36 skids It's probably the magic conextual variable stuff.
01:36 benchable6 AlexDaniel, https://gist.github.com/6001c5744e3c877d76928d465de31e46
01:36 AlexDaniel looks like a regression to me?
01:36 AlexDaniel let's see
01:36 timotimo fascinating
01:37 timotimo it's the same result, though, right?
01:37 AlexDaniel c: b7201a8^,b7201a8 (^99999).grep({!/1/}).elems.say; say now - BEGIN now
01:37 committable6 AlexDaniel, ¦b7201a8^: «59048?5.0481256» ¦b7201a8: «59048?9.0262629»
01:37 AlexDaniel well, there you have it
01:38 AlexDaniel this? https://github.com/rakudo/rakudo/commit/b7201a8f22338a906f2d8027a21387e8f5c77f41
01:38 timotimo Completely re-imagine Str.match internals
01:38 AlexDaniel c: b7201a8f22338a906f2d8027a21387e8f5c77f41^,b7201a8f22338a906f2d8027a21387e8f5c77f41 (^99999).grep({!/1/}).elems.say; say now - BEGIN now
01:38 AlexDaniel let's double-check
01:38 * colomon is betting no
01:38 committable6 AlexDaniel, ¦b7201a8f22338a906f2d8027a21387e8f5c77f41^: «59048?5.0645579» ¦b7201a8: «59048?9.1315745»
01:38 * colomon is wrong
01:39 AlexDaniel yup
01:39 colomon oh, those were already the two you compared
01:39 AlexDaniel note that it is still not fast at all
01:39 AlexDaniel it's like 4 times slower than junction version, at least
01:39 timotimo does it know how to bool-only for the iterator?
01:39 merced joined #perl6
01:40 AlexDaniel no idea, but I'll submit a ticket now
01:40 AlexDaniel Oct 23, 2016 damn that's a bit old
01:40 timotimo the coverage reporter could be interesting here
01:40 timotimo to see what parts of that code it hits
01:40 timotimo we have that bot yet?
01:40 AlexDaniel coverable6: help
01:40 coverable6 AlexDaniel, Like this: coverable6: f583f22 grep=SETTING say ‘hello’; say ‘world’ # See wiki for more examples: https://github.com/perl6/whateverable/wiki/Coverable
01:41 timotimo sounds great
01:41 AlexDaniel timotimo: try it?
01:41 mcmillhj joined #perl6
01:41 timotimo coverable6: b7201a8f22338a906f2d8027a21387e8f5c77f41 (^99999).grep({!/1/}).elems.say
01:41 coverable6 timotimo, https://gist.github.com/68ff88fef35f41d700c5b5c22676f3b0
01:41 timotimo well, that certainly worked
01:41 AlexDaniel well, that's too old for coverage reporting?
01:41 timotimo (coverage NYI there)
01:41 timotimo yep
01:42 AlexDaniel well, that's unfixable I think?
01:42 AlexDaniel I can add an error message for this though
01:50 timotimo not easy to fix, no
01:50 timotimo yeah, that'd be neato
01:50 AlexDaniel coverable6: HEAD (^99999).grep({!/1/}).elems.say
01:50 AlexDaniel still we can do it on head
01:50 AlexDaniel but look, benchable6 did a good job, it seems that I won't have to defenestrate it
01:50 coverable6 AlexDaniel, https://gist.github.com/f3db9e924cebe9b96a71a2b4cd67ae9c
01:50 timotimo yeah, head still has a bunch of that code
01:50 timotimo i didn't build the cover-lines-multiple-times mode yet
01:51 ilbot3 joined #perl6
01:51 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
01:52 timotimo oh, huh, parameter binding is really hot there
01:53 timotimo 28% BOOTSTRAP.nqp:2196 (i assume that's find_best_candidate), 22% bind_one_param, another 12.7% bind, another <anon> inside BOOTSTRAP with 4%, and is_bindable with 4%
01:53 AlexDaniel I want to point out that the reason we have all this information now is because we cared to *properly* resolve the issue one of the users was having, instead of telling them to go learn how grep works and to fuck off in general
01:53 timotimo none of the 11 top frames get jitted, only half of them get speshed at all
01:55 timotimo i'm glad i ran the profiler on this
01:56 AlexDaniel rejecting ideas and complaints is easy but not productive, addressing issues is what does the trick. Doesn't mean that we have to do the first thing that is proposed, but for the love of all that is good and decent, may I ask everyone to think a little bit deeper before being rejective about everything?
01:56 AlexDaniel sorry, this was bothering me a bit too much
01:57 timotimo um, i might be too tired to see what you are refering to?
01:59 mcmillhj joined #perl6
01:59 MasterDuke timotimo: btw, i've started on implementing nqp::coverage_control
01:59 timotimo that's nice!
01:59 AlexDaniel timotimo: https://irclog.perlgeek.de/perl6/2017-07-26#i_14925561
02:00 timotimo ah, that was when i wasn't on line i guess
02:00 AlexDaniel timotimo: TL;DR first reaction was “no, we don't need to add any features, go learn how it works”, and then we went with better “well, let's document how to do it. Ok, there is more than one way. Ok, one way is much slower. Ok, it is a regression”
02:01 AlexDaniel I attempted to express the idea of resolving issues this way in this blog post, but I'm not sure if anybody cares: https://perl6advent.wordpress.com/2016/12/23/day-23-everything-is-either-wrong-or-less-than-awesome/
02:02 MasterDuke timotimo: and BOOTSTRAP.nqp:2196 is probably `Routine.HOW.add_method(Routine, 'find_best_dispatchee', nqp::getstaticcode(sub ($self, $capture, int $many = 0) {`
02:04 AlexDaniel c: b7201a8f22338a906f2d^,b7201a8f22338a906f2d (^99999).grep({!/1/}).elems.say; say now - BEGIN now
02:05 timotimo yes, find_best_dispatchee
02:05 committable6 AlexDaniel, ¦b7201a8f22338a906f2d^: «59048?5.0902087» ¦b7201a8: «59048?9.23840074»
02:05 AlexDaniel c: b7201a8f22338a906f2d^,b7201a8f22338a906f2d (^99999).grep({/1/}).elems.say; say now - BEGIN now
02:05 timotimo whereever that pops up, things are terrible
02:05 committable6 AlexDaniel, ¦b7201a8f22338a906f2d^: «40951?4.905903» ¦b7201a8: «40951?9.032774»
02:05 AlexDaniel c: b7201a8f22338a906f2d^,b7201a8f22338a906f2d (^99999).grep(/1/).elems.say; say now - BEGIN now
02:05 committable6 AlexDaniel, ¦b7201a8f22338a906f2d^: «40951?1.12385689» ¦b7201a8: «40951?1.1106832»
02:05 AlexDaniel so only code blocks are affected
02:05 AlexDaniel well, at least
02:05 [Coke] m: say (1..*-1).WHAT; say (1..*-1).^name
02:05 camelia rakudo-moar 5d89ce: OUTPUT: «(WhateverCode)?{ ... }?»
02:05 AlexDaniel and doesn't matter if it's negated or not
02:06 AlexDaniel I submitted a ticket: RT #131805
02:06 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=131805
02:07 timotimo right, the big amount of time sunk comes from the proto method match from Str
02:07 timotimo i wonder if moving the $/ out of the proto and into every candidate and making the proto much simpler will alleviate performance here
02:07 [Coke] ^^ is that a bug? for doc#1355
02:07 timotimo but i'm already half on the way to bed
02:08 timotimo no, 1..*-1 is supposed to WhateverCurry
02:08 timotimo so you can have things like @foo[*-5..*-3] work out right
02:09 MasterDuke AlexDaniel++ nice writeup in the ticket
02:09 Geth ¦ doc: 138208cef7 | (Will "Coke" Coleda)++ | 28 files
02:09 Geth ¦ doc: Don't use .WHAT, use ^name
02:09 Geth ¦ doc:
02:09 Geth ¦ doc: Part of #1355
02:09 Geth ¦ doc: review: https://github.com/perl6/doc/commit/138208cef7
02:10 timotimo oh, you weren't refering to the fact that it curries at all
02:10 timotimo yeah. i'm proving now that i ought to go sleep
02:10 [Coke] Zoffix: feedback on https://github.com/perl6/doc/issues/1355 ?
02:11 [Coke] timotimo: the bug is that ^name and .WHAT are giving different results.
02:11 [Coke] (where as in every other case in the docs, it was just (e.g.) Int vs (Int)
02:11 timotimo i'd say perhaps .^name also whatever-curries there
02:11 timotimo m: say ((1..*-1).^name)(10)
02:11 camelia rakudo-moar 5d89ce: OUTPUT: «Range?»
02:12 timotimo that's ... quite useless :D
02:12 AlexDaniel hm, I wonder if this is why unicodable6 is now very slow
02:12 AlexDaniel because that's exacly what it does, it greps with a code block if you give it one
02:12 AlexDaniel I remember it getting slower suddenly at some point, but didn't think of it much
02:12 timotimo but i thought the majority of the sluggishness comes from method match on Str .. i can't come up with a good way to make sure :|
02:13 timotimo like does grep with a regex do something special?
02:13 AlexDaniel what if we eliminate match?
02:13 timotimo does it circumvent calling .match on every entry? or is it because it's Cool, not Str and somehow the conversion does something different?
02:13 AlexDaniel c: b7201a8f22338a906f2d^,b7201a8f22338a906f2d (^99999).grep({True}).elems.say; say now - BEGIN now
02:13 committable6 AlexDaniel, ¦b7201a8f22338a906f2d^: «99999?0.1037948» ¦b7201a8: «99999?0.09883378»
02:14 AlexDaniel c: b7201a8f22338a906f2d^,b7201a8f22338a906f2d (^99999).grep({(^1).pick}).elems.say; say now - BEGIN now
02:14 committable6 AlexDaniel, ¦b7201a8f22338a906f2d^: «0?0.729757» ¦b7201a8: «0?0.75104530»
02:14 AlexDaniel so it's only a regex thing?
02:15 AlexDaniel c: b7201a8f22338a906f2d^,b7201a8f22338a906f2d (^99999).grep({.match(‘1’)}).elems.say; say now - BEGIN now
02:15 committable6 AlexDaniel, ¦b7201a8f22338a906f2d^: «40951?5.0481776» ¦b7201a8: ««timed out after 10 seconds» «exit signal = SIGHUP (1)»»
02:15 * AlexDaniel shrugs
02:16 mcmillhj joined #perl6
02:18 gdonald joined #perl6
02:20 timotimo good hunting!
02:20 [Coke] m: say ((1..*-1)).^name; # close enough
02:20 camelia rakudo-moar 5d89ce: OUTPUT: «WhateverCode?»
02:21 [Coke] Zoffix: nevermind, all set.
02:25 Geth ¦ doc: 6c0d1d37fa | (Will "Coke" Coleda)++ | doc/Type/Whatever.pod6
02:25 Geth ¦ doc: fix last .WHAT instance #1355
02:25 Geth ¦ doc: review: https://github.com/perl6/doc/commit/6c0d1d37fa
02:25 Geth ¦ doc: 50731f8481 | (Will "Coke" Coleda)++ | 2 files
02:25 Geth ¦ doc: Test for inappropriate usage of .WHAT in sample code
02:26 Geth ¦ doc:
02:26 Geth ¦ doc: Provide for :ok-test<WHAT> as a way to allow it in the very few
02:26 Geth ¦ doc: examples where it makes sense.
02:26 Geth ¦ doc: review: https://github.com/perl6/doc/commit/50731f8481
02:30 mcmillhj joined #perl6
02:44 jeromelanteri try to use perl6-debug-m... failed with error: "Non ast passed to WANTED: NQPMu ===SORRY!=== Cannot find method 'named' on object of type NQPMu
02:47 lookatme what's your rakudo version ?
02:48 jeromelanteri how to see that ?
02:48 lookatme perl6 -v
02:48 jeromelanteri 2017.06 built on MoarVM version 2017.06
02:49 jeromelanteri implementing perl 3.c
02:49 jeromelanteri perl 6.v
02:49 jeromelanteri .c (zut !)
02:49 yoleaux I don't know
02:49 mcmillhj joined #perl6
02:50 geekosaur I think that was still buggy, you need 2017.07?
02:50 mr_ron joined #perl6
02:51 lookatme yeah, you can update your rakudo to last version
02:52 jeromelanteri from my packager, version has not moved... how to find the soucre ?
02:53 jeromelanteri ok found
02:53 lookatme The github release ?
02:54 jeromelanteri yes
02:54 jeromelanteri 11 days ago, a commit said: 2017.07 is now in the past
02:59 noganex_ joined #perl6
03:01 mcmillhj joined #perl6
03:03 jeromelanteri perl6 --version ==> eror unhandled exception: Missing or wrong version of dependency '/tmp/prl6/rakudo/install/bin../share/nqp/lib/MAST/Nodes.nqp' (from 'src/perl6/Pod.nqp')
03:05 jeromelanteri may i need to remove rakudo from my packager isntallation ?
03:05 jeromelanteri and what about alacryd and perl6-json-fast (installef rom packager) ?
03:06 jeromelanteri (installed from my packager)
03:06 eater joined #perl6
03:11 MasterDuke jeromelanteri: you could reinstall rakudo and manually edit the PKGBUILD to point to 2017.07
03:11 jeromelanteri ok, i removed all from packager, and try to install all from github clone, compil and install... rakudo and alacryd, maybe zef also...
03:12 jeromelanteri MasterDuke, yes, i thank about that way to, but because packages are not supported offical ones for archlinux (repos AUR) and that they have many problem for find there own dependencies sources... i decide to remove dirty things and make all clean by hand.
03:13 jeromelanteri I will do from packages when they will be maintained officialy by archlinux dudes...
03:13 MasterDuke jeromelanteri: fyi, i just flagged rakudo/nqp/moarvm as out of date
03:13 jeromelanteri yes
03:13 MasterDuke i have those packages installed, but i also have local checkouts that i build
03:13 jeromelanteri that ios why maybe also the debugger failed to run.
03:13 jeromelanteri MasterDuke, on archlinux ?
03:16 MasterDuke yeah
03:16 mcmillhj joined #perl6
03:17 jeromelanteri MasterDuke, and perl6-debug-m start running well ?
03:19 SpikeMaster joined #perl6
03:19 SpikeMaster join #emacs
03:22 MasterDuke jeromelanteri: seems to work
03:23 jeromelanteri MasterDuke, version ?
03:24 MasterDuke This is Rakudo version 2017.07-77-g5d89cef9f built on MoarVM version 2017.07-18-ga052a333
03:24 jeromelanteri MasterDuke, yeah ok, so it is not from package AUR.
03:24 jeromelanteri you modify the pkg-build then ?
03:25 MasterDuke no, just built it by hand
03:26 jeromelanteri MasterDuke,  so i not understand what you told me at 10:13:44 (UTC +7)
03:26 jeromelanteri 13 minutes ago.
03:26 jeromelanteri you have those packages installed or not ?
03:27 MasterDuke i have the packages installed (unmodified), but i also build rakudo in my home directory
03:28 jeromelanteri then when you call it, how do you do that ? (comand perl6 linked on your home construction ?)
03:29 MasterDuke i have an alias in my .bashrc
03:29 jeromelanteri i do install it from git, but then i do not see where it has been install... do the git clone repo has to be cloned inside a /usr/share/rakudo directly ?
03:29 MasterDuke `alias p6='~/Source/perl6/install/bin/perl6'`
03:29 mcmillhj joined #perl6
03:30 MasterDuke if you didn't specify a --prefix, it just went in rakudo/install
03:30 jeromelanteri MasterDuke, so the git repo is a source to keep... insatllation does not copy files on places
03:30 jeromelanteri ok
03:30 jeromelanteri which --prefix should be a good idea for system wide installation ?
03:30 MasterDuke i specified a --prefix of `--prefix=/home/dan/Source/perl6/install/`
03:32 jeromelanteri MasterDuke, yes you told me that. but for a system wide installation ? may it be /usr/share/perl6 ? may it be a good idea you think ?
03:32 MasterDuke well, if you don't use the aur packages you could always put it where they do, /usr/bin
03:32 AlexDaniel m: sub foo(+%z) { dd %z.keys }; foo %(:5a, :10b)
03:32 camelia rakudo-moar 5d89ce: OUTPUT: «(0, 1).Seq?»
03:33 AlexDaniel isn't it weird? ?
03:33 AlexDaniel like, what's the point of doing +%z at all?
03:33 jeromelanteri MasterDuke, ok, then i just do copy content of rakudo/install in good places: /usr/bin for bin, etc...
03:33 AlexDaniel m: sub foo(*%z) { dd %z.keys }; foo %(:5a, :10b)
03:33 camelia rakudo-moar 5d89ce: OUTPUT: «Too many positionals passed; expected 0 arguments but got 1?  in sub foo at <tmp> line 1?  in block <unit> at <tmp> line 1??»
03:33 AlexDaniel m: sub foo(*%z) { dd %z.keys }; foo :5a, :10b
03:33 camelia rakudo-moar 5d89ce: OUTPUT: «("a", "b").Seq?»
03:33 MasterDuke i don't think /usr/share usually has binaries
03:34 MasterDuke jeromelanteri: i don't think copying them will work, they aren't relocatable, they have hardcoded in the binaries the paths specified during configure/build
03:35 jeromelanteri MasterDuke, ok then i have to rebuild them with --prefix
03:35 Cabanossi joined #perl6
03:35 MasterDuke yep
03:39 jeromelanteri works...
03:39 MasterDuke cool
03:40 jeromelanteri MasterDuke, same for alacryd ? i have to paste a --prefix ?
03:41 MasterDuke that i don't know. i've never used it directly
03:44 MasterDuke i don't use a lot of modules, so the few i do use i just clone manually
03:45 mcmillhj joined #perl6
03:47 MasterDuke jeromelanteri: if you're not using the aur packages, you probably want to use zef instead of alacryd
03:49 jeromelanteri yes, i use zef allready... then i thank i had to install alacryd because on packages installation time, it installed it has dependency by default...
03:49 jeromelanteri so ok, i no need alacryd then.
03:50 jeromelanteri MasterDuke, thank you for your recommandations and help
03:51 MasterDuke welcome
04:02 cpage__ joined #perl6
04:04 mcmillhj joined #perl6
04:24 anser joined #perl6
04:30 mcmillhj joined #perl6
04:31 adu joined #perl6
04:42 mcmillhj joined #perl6
04:50 Cabanossi joined #perl6
04:58 mcmillhj joined #perl6
05:27 mcmillhj joined #perl6
05:35 xtreak joined #perl6
05:43 mcmillhj joined #perl6
05:56 mcmillhj joined #perl6
06:01 ufobat joined #perl6
06:11 mcmillhj joined #perl6
06:13 jaldhar joined #perl6
06:15 jaldhar Hello.  There is something I'm not understanding about Iterator.  I have a class that has a bunch of attributes and one method that updates them  (and some getters but thats not important.) ...
06:16 jaldhar I want to make this iterator so I add does Iterator to my class and implement a pull-one method which calls my update method and returns self.  Is that right?  Because it doesn't seem to be iteratinf, I just get the same values each time.
06:19 lowbro joined #perl6
06:19 lowbro joined #perl6
06:27 andrzejku joined #perl6
06:30 breinbaas joined #perl6
06:31 mcmillhj joined #perl6
06:38 lizmat joined #perl6
06:42 nadim joined #perl6
06:43 lookatme jaldhar, can u show us some code ?
06:45 mcmillhj joined #perl6
06:46 domidumont joined #perl6
06:50 Cabanossi joined #perl6
06:52 domidumont joined #perl6
06:58 mcmillhj joined #perl6
07:00 xtreak joined #perl6
07:01 xtreak joined #perl6
07:07 parv joined #perl6
07:07 ingy if I have 2 class Foo attributes@.foo and %.foo, and I make a $foo = Foo.new, can I access both attributes?
07:08 R0b0t1 joined #perl6
07:08 R0b0t1 How do I build rakduo star from a source that is verifiable?
07:09 R0b0t1 I can only access the release page over HTTP and do not want to use that download
07:09 R0b0t1 I tried to clone the star repository from github but Configure.pl refuses to run
07:09 lookatme m: class Foo { has @.foo; has %.foo; }
07:09 camelia rakudo-moar 5d89ce: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Two or more attributes declared that both want an accessor method 'foo'?at <tmp>:1?»
07:09 lookatme no way ingy
07:09 lookatme m: class Foo { has @!foo; has %!foo; }
07:09 camelia rakudo-moar 5d89ce: ( no output )
07:10 ingy thx
07:10 lookatme It can not be declare with .
07:10 ingy got it
07:10 ingy makes sense
07:11 lookatme Welcome
07:11 jaldhar lookatme: https://gist.github.com/jaldhar/bae299ee03df93fcdd3633d751581e0b
07:11 abraxxa joined #perl6
07:12 jaldhar lookatme: this is the current state of affairs pared down to the essentials.  But it is way past my bedtime now.  Will you be around in ~6 hours?
07:12 mcmillhj joined #perl6
07:12 cono R0b0t1: I usually build like this: perl Configure.pl --gen-moar --backends=moar
07:12 yoleaux 12 Jun 2017 19:38Z <eveo> cono: you should add yourself to CREDITS file: https://github.com/rakudo/rakudo/blob/nom/CREDITS
07:14 lookatme jaldhar, if I find something, I will leave message to u or comment under your gist
07:15 pecastro_ joined #perl6
07:18 |oLa| joined #perl6
07:19 TimToady joined #perl6
07:21 darutoko joined #perl6
07:26 nadim joined #perl6
07:26 rindolf joined #perl6
07:27 R0b0t1 cono: That is what I am trying to run. I see https://github.com/rakudo/star/blob/master/Configure.pl#L53
07:27 R0b0t1 However, since having just looked at the source, I will try --force
07:28 R0b0t1 cono: It fails with "Unable to read rakudo/tools/build/NQP_REVISION"
07:28 mcmillhj joined #perl6
07:29 R0b0t1 I suppose that is directed at the channel in general
07:30 R0b0t1 Hmm
07:30 R0b0t1 http://www.nntp.perl.org/group/perl.perl6.compiler/2013/05/msg8916.html
07:31 R0b0t1 Wow that is highly annoying
07:31 R0b0t1 It just downloads a tarball
07:31 R0b0t1 And one of the links 404s
07:33 wamba joined #perl6
07:34 R0b0t1 I am positive that what is being done in the star repository is supposed to be done with submodules
07:34 R0b0t1 I am trying to see if there is a verifiable chain of trust in the build system and it looks like the answer is "no."
07:35 Cabanossi joined #perl6
07:36 R0b0t1 wget --no-check-certificate https://
07:36 R0b0t1 Are you insane?
07:37 R0b0t1 I feel like a strongly worded email is in order
07:37 R0b0t1 I do declare
07:37 lookatme .tell jaldhar What do you mean same value. I test your code, and works fine. You not change public attribute, and it will be display same message when you `say` or `dd` them.
07:37 yoleaux lookatme: I'll pass your message to jaldhar.
07:40 Juerd --no-check-certificate is indeed insane.
07:43 zakharyas joined #perl6
07:44 R0b0t1 So erm
07:46 R0b0t1 Juerd, do you have any recommendations here? Should I post to perl6-user about my issues with trying to verify the releases or to perl6-compiler to suggest that their build system is a poor one
07:46 geekosaur that didn't actually end up in star, did it? I know we had someone several months ago who insisted that we couldn't be a real project without a curl|sh install, so made an install site that did that... without https
07:46 R0b0t1 Not that I think you have any relevant expertise, I just need someone to pick for me
07:46 R0b0t1 But that's not to say you seem uninformed
07:46 mcmillhj joined #perl6
07:46 geekosaur but there was general refusal to make the main rakudo site use it
07:48 R0b0t1 geekosaur: If a project has a curl|sh line on its front page it makes me think it is developed by amateurs
07:49 dakkar_ joined #perl6
07:51 astj_ joined #perl6
07:51 astj joined #perl6
07:53 linuksz joined #perl6
07:54 AlexDani` joined #perl6
07:57 linuksz why isn't it work: http://sprunge.us/EdUb
07:57 linuksz ?
08:01 R0b0t1 Well having written the email it seems most appropriate for perl6-compiler
08:01 linuksz it don't give an usage message when launched with no arguments
08:01 AlexDani` joined #perl6
08:03 jonas1 joined #perl6
08:05 mcmillhj joined #perl6
08:06 pharv_ joined #perl6
08:18 araujo_ joined #perl6
08:19 lookatme linuksz, you can add constraint for your: Str:D $english_file_name or Str $english_file_name!
08:20 araujo_ joined #perl6
08:20 mcmillhj joined #perl6
08:22 linuksz it doesn't work. http://sprunge.us/SWYL
08:23 stmuk R0b0t1: https://rakudo.perl6.org/downloads/star/ is https if that's what you want
08:23 stmuk the star github repo is used to build the tarball and not star itself directly
08:25 stmuk what do you mean "verify the release"?
08:27 lookatme linuksz, is your script correct ? It report syntax error when I try it
08:28 linuksz i think its syntax is correct
08:28 lookatme Can you run `perl6 -c your.p6` ?
08:28 linuksz i get the following error when i run it: Variable '$translation_file_name' is not declared
08:28 linuksz it isn't syntax error
08:29 lookatme No it's syntax error
08:29 lookatme so use perl6 -c check your syntax
08:29 linuksz i get the following error:
08:29 linuksz ===SORRY!=== Error while compiling /mnt/ramlemez/test.pl6
08:29 linuksz Variable '$translation_file_name' is not declared
08:29 linuksz at /mnt/ramlemez/test.pl6:135
08:29 linuksz ------> "### {?$translation_file_name.IO.basename}
08:30 lookatme linuksz, so there some error with your script
08:30 linuksz this is the output of perl6 -c test.pl6
08:33 linuksz yes, and i don't know why doesn't it give an usage message when launched without arguments
08:33 linuksz where should i search the errors? MAIN signature?
08:34 lookatme I think all parameter of your MAIN is optional
08:36 linuksz but i used '!'
08:36 mcmillhj joined #perl6
08:39 linuksz i extracted the MAIN and the USAGE to a file, and deleted MAIN body: http://sprunge.us/TYdR
08:39 linuksz it works correctly
08:42 lookatme yeah, linuksz you can test your code piece by piece
08:43 linuksz i am using the MAIN function first time
08:43 linuksz maybe the variables are declared at the wrong place
08:43 zengargoyle joined #perl6
08:44 linuksz if i use a variable in the signature of MAIN, and i use it in a subroutine, should it be declared globally?
08:45 lookatme linuksz, no the parameter is lexical scope
08:46 lookatme you can pass it to your sub
08:47 linuksz i wrote this code originally without a MAIN sub
08:48 linuksz in that version, the $translation_file_name, $english_file_name, and $translator variables was global
08:48 lookatme Oh, I think you should modify your sub, add a signature
08:49 linuksz if i declare a variable in MAIN's signature, will it be global?
08:49 lookatme Not found a way you can both declare with MAIN parameter and can access in other sub
08:50 lookatme linuksz, how to declare variable in signature ?
08:50 Cabanossi joined #perl6
08:50 linuksz MAIN($english_file_name)
08:51 lookatme No
08:51 linuksz ?
08:51 lookatme The parameter is lexical scope
08:51 lookatme you can access them outside a sub
08:51 lookatme can not
08:53 linuksz oh, so i should declare the variable globally even if it is in MAIN signature?
08:54 moritz_ no, mentioning it in a signature declares it for the block that the signature is attached to
08:54 mcmillhj joined #perl6
08:54 gfldex m: my $v; sub f($v is copy){ $v = 1 }; await start f(2); say $v;
08:54 camelia rakudo-moar 1a74a8: OUTPUT: «(Any)?»
08:54 moritz_ m: sub f($x) { say $x }; f(42); # for linuksz
08:54 camelia rakudo-moar 1a74a8: OUTPUT: «42?»
08:55 moritz_ m: sub f($x) { say $x }; $x  # for linuksz
08:55 camelia rakudo-moar 1a74a8: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Variable '$x' is not declared?at <tmp>:1?------> 3sub f($x) { say $x }; 7?5$x  # for linuksz?»
08:55 lookatme linuksz,  yeah, but it is not a good solution.
08:55 linuksz i declared the variables outside of MAIN, and it works.
08:55 linuksz thanks.
08:55 gfldex linuksz: our scoped lexical parameters would make threading rather difficulty
08:56 lookatme I think I should add a feature for my Getopt module, so it can reference a global variable, and set value when user supply a option, just like Perl5 does
08:57 lookatme So you can add your `command line option` free
08:57 gfldex lookatme: please add a note to your module that it wont be threadsafe if globals are used
08:57 lookatme gfldex, I will do it
08:58 dolmen joined #perl6
08:58 lookatme thanks
09:00 mr-foobar joined #perl6
09:01 lookatme linuksz, if your want command line option support, you can checkout my module Getopt::Advance
09:02 lookatme https://github.com/araraloren/perl6-getopt-advance#source-code, There is a sample
09:02 linuksz ok, i will try it out
09:02 lookatme Add it to your original script, and MAIN is not necessary
09:04 lookatme And sorry about the document of module is not too much, if you have some question, ask me on IRC linuksz
09:04 lookatme I will add more document soon
09:06 araujo joined #perl6
09:12 mcmillhj joined #perl6
09:16 zakharyas joined #perl6
09:18 kaare_ joined #perl6
09:34 LeCamarade joined #perl6
09:35 Cabanossi joined #perl6
09:44 iviv hey o/ sent a few PRs to https://github.com/perl6/docker
09:48 stmuk no star doesn't use curl|sudo
09:52 mr-foobar joined #perl6
09:54 cpage_ joined #perl6
09:58 daxim tell raiph https://news.ycombinator.com/item?id=14856883 what's the real (error-free) code? can I observe the autothreading in htop?
10:03 rightfold Can you automatically generate a man page from a MAIN signature?
10:05 Cabanossi joined #perl6
10:14 nowan joined #perl6
10:18 Zoffix left #perl6
10:20 mr-fooba_ joined #perl6
10:22 zakharyas joined #perl6
10:22 jeromelanteri joined #perl6
10:25 nadim joined #perl6
10:30 uktest joined #perl6
10:34 astj joined #perl6
10:38 astj joined #perl6
10:45 astj joined #perl6
11:03 nadim Hi, I get an error about and ambiguous call and I ama bit perplexed about why. first some info: https://nopaste.linux-dev.org/?1160057 . given that the signature differs with because of the :D I thought that would be enough to disambiguate
11:06 astj joined #perl6
11:11 andrzejku joined #perl6
11:16 astj joined #perl6
11:22 jnthn The other one needs to be List:U
11:23 jnthn :D/:U don't count as tighter/looser
11:34 pmurias joined #perl6
11:41 R0b0t1 stmuk: Check the release .tar.gz against signed digests
11:41 R0b0t1 stmuk: Odd, I tried changing one of the links to https and I got an error about an invalid certificate. It worked this time.
11:42 R0b0t1 stmuk: Or check the signature of the .tar.gz directly, but typically large releases have hashes of the release generated with a few different algorithms and then a file of those hashes is signed with GPG.
11:49 R0b0t1 Not to be condescending if you already knew how it works, but this is the third major language project that does extremely insecure things
11:49 R0b0t1 Overall it must be the fifth or sixth large project in general
11:51 pmurias R0b0t1: extremely insecure things being not signing releases properly or running random module code from the internet?
11:52 astj joined #perl6
11:53 araraloren joined #perl6
11:54 mr_ron joined #perl6
11:59 raschipi joined #perl6
12:10 pmurias stmuk: reading the sources in the tarballs doesn't actually get you any extra security as we bundle compiled bytecodes
12:13 pmurias stmuk: you would have to write a moarvm bytecode disassembler and read the the stage0 bytecode
12:20 pmurias how is curl|sh less safe then downloading a .tar.gz full of code and executing it?
12:21 nadim joined #perl6
12:21 nadim jnthn: thanks, let me try this
12:22 raschipi pmurias: You're supposed to check the code before executing it.
12:24 pmurias raschipi: do you read the moarvm bytecode when downloading nqp?
12:30 pmurias raschipi: manually checking everything you download before executing it is for most people as practical as rewriting it instead of downloading or visiting a Perl 6 core developer bringing the code on a usb pen drive
12:32 raschipi Just making sure it's sane and you actually have the right to use it.
12:35 araraloren evening
12:36 pmurias raschipi: that only guards you against code that's obviously stupid not intentionally malicious
12:36 raschipi sure
12:37 astj joined #perl6
12:47 espadrine joined #perl6
12:50 Cabanossi joined #perl6
12:57 stmuk pmurias: yes I know .. there are two hints in my email about that
13:02 mcmillhj joined #perl6
13:10 astj joined #perl6
13:10 astj_ joined #perl6
13:20 mr-foobar joined #perl6
13:26 nadim I am putting stuff in a junction to match and I get this error https://nopaste.linux-dev.org/?1160059, maybe I have misunderstood what smart matching can match or not.
13:26 nadim jnthn: I thought ~~ could match the same objkect on both sides even when it is in a junction
13:26 stmuk R0b0t1: I suspect most of the major language projects understand what you propose doesn't add much real security for quite a lot of effort and potential key management issues
13:31 AlexDani` joined #perl6
13:31 stmuk what would be useful is if the SHA256 hashes are being distributed widely (not from our ftp servers) by third party systems
13:31 stmuk eg. https://github.com/Homebrew/homebrew-core/blob/master/Formula/rakudo-star.rb#L5
13:35 Cabanossi joined #perl6
13:36 stmuk also fossies.org
13:44 pmurias stmuk: doesn't signing help protect people who already got the keys before our servers got compromised?
13:46 stmuk yes that's true and we could use third party keyservers but I'm still unconvinced its worth the effort
13:47 stmuk its not really the technical issues but the issues over lost keys etc.
13:54 mr-foobar joined #perl6
14:00 skids joined #perl6
14:06 yan__ joined #perl6
14:18 nicq20 joined #perl6
14:21 nicq20 When do $* vars exist? I'm trying to figure out the difference between $*LANG and $?LANG.
14:23 raschipi $* is a dynamic variable. It will be looked in the current scope and if not found, in the scope of the caller.
14:24 raschipi Normal varibles if not found in the current scope will be looked in the outer scope
14:24 raschipi $? is a compile-time variable
14:26 nicq20 Do $* vars get changed other than when changing scope?
14:26 raschipi Sorry, I don't follow.
14:28 raschipi Dynamic variables change just the same as other variables.
14:30 nicq20 For context: I'm fiddling with slangs still. I can't get a method to mixin right: https://irclog.perlgeek.de/perl6/2017-07-26#i_14926529
14:30 cdg joined #perl6
14:33 nicq20 I was trying to figure out, why the role is applied to $?LANG, but not $*LANG. It does get applied when in a new scope though.
14:35 Cabanossi joined #perl6
14:36 daxim 6: "????????????".chars
14:36 raschipi m: "????????????".chars
14:36 camelia rakudo-moar 1a74a8: ( no output )
14:36 raschipi m: "????????????".chars.say
14:36 camelia rakudo-moar 1a74a8: OUTPUT: «1?»
14:37 lucasb joined #perl6
14:40 nadim m: my %h = <a 1> ;  %h1 ~~ %h1 ;
14:40 camelia rakudo-moar 1a74a8: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Variable '%h1' is not declared?at <tmp>:1?------> 3my %h = <a 1> ;  7?5%h1 ~~ %h1 ;?»
14:40 nadim m: my %h1 = <a 1> ;  %h1 ~~ %h1 ;
14:40 camelia rakudo-moar 1a74a8: ( no output )
14:40 nadim m: my %h1 = <a 1> ;  'match'.say if %h1 ~~ %h1 ;
14:40 camelia rakudo-moar 1a74a8: ( no output )
14:40 nadim m: my %h1 = <a 1> ;  'match'.say if %h1 ~~ 1 ;
14:40 camelia rakudo-moar 1a74a8: OUTPUT: «match?»
14:40 nadim m: my %h1 = <a 1> ;  'match'.say if %h1 ~~ 2 ;
14:40 camelia rakudo-moar 1a74a8: ( no output )
14:40 nadim m: my %h1 = <a 1> ;  'match'.say if %h1 ~~ %h1 ;
14:40 camelia rakudo-moar 1a74a8: ( no output )
14:41 nadim hmmm why doesn %h1 smart match itself?
14:43 vike joined #perl6
14:48 nadim m: my %h1 = <a 1> ;  'match'.say if %h1 ~~ %(a 1) ;
14:48 camelia rakudo-moar 1a74a8: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Undeclared routine:?    a used at line 1??»
14:49 nadim m: my %h1 = <a 1> ;  'match'.say if %h1 ~~ %(<a 1>) ;
14:49 camelia rakudo-moar 1a74a8: ( no output )
14:51 nadim m: my %h1 = <a 1> ;  'match'.say if %h1 eqv %h1 ;
14:51 camelia rakudo-moar 1a74a8: OUTPUT: «match?»
14:51 nadim m: my %h1 = <a 1> ;  'match'.say if %h1 === %h1 ;
14:51 camelia rakudo-moar 1a74a8: OUTPUT: «match?»
14:55 raschipi nadim, it's not implemented yet in rakudo
14:55 raschipi https://github.com/perl6/roast/blob/master/S03-smartmatch/hash-hash.t
14:56 raschipi #?rakudo 2 todo "NYI"
14:58 nicq20 SourceBaby: help
14:58 SourceBaby nicq20, Use s: trigger with args to give to sourcery sub. e.g. s: Int, 'base'. See http://modules.perl6.org/dist/CoreHackers::Sourcery
15:01 nicq20 s: &~~
15:01 SourceBaby nicq20, Something's wrong: ?ERR: ===SORRY!=== Error while compiling -e?Missing required term after infix?at -e:6?------>     put sourcery( &~~ <HERE>)[1];?    expecting any of:?        prefix?        term?
15:02 nicq20 s: &~~, Set, Set
15:02 SourceBaby nicq20, Something's wrong: ?ERR: ===SORRY!=== Error while compiling -e?Preceding context expects a term, but found infix , instead?at -e:6?------>     put sourcery( &~~,<HERE> Set, Set )[1];?
15:02 nicq20 s: &~~, <HERE> Set, Set
15:02 SourceBaby nicq20, Something's wrong: ?ERR: ===SORRY!=== Error while compiling -e?Preceding context expects a term, but found infix , instead?at -e:6?------>     put sourcery( &~~,<HERE> <HERE> Set, Set )[1];?
15:13 nicq20 To fix that, could we effectively just add `method ACCEPTS(Hash:D: Hash:D \h) { self ~~ h.Set }`?
15:13 nadim raschipi: thanks, that was making me crazy
15:14 nicq20 Oh, wait. Ignore me.
15:17 moritz /ignore nicq20
15:17 khw joined #perl6
15:19 sufrostico joined #perl6
15:19 sufrostico joined #perl6
15:19 dolmen joined #perl6
15:25 jaldhar lookatme: thanks for looking at this.  But I am confused.  Am I not changing the public attributes in the evolve function?  It's still not iterating for me.
15:25 yoleaux 07:37Z <lookatme> jaldhar: What do you mean same value. I test your code, and works fine. You not change public attribute, and it will be display same message when you `say` or `dd` them.
15:26 jaldhar yoleaux: see above.  I still don't get it.
15:27 nhywyll joined #perl6
15:27 jaldhar For anyone else who might be willing to help:  see https://gist.github.com/jaldhar/bae299ee03df93fcdd3633d751581e0b
15:28 jaldhar I'm trying to make the Algorithm::DawkinsWeasel class iterable so I can do e.g.  say $weasel.current-phrase while $weasel
15:29 jaldhar but I get back the same values each time.
15:30 moritz jaldhar: $weasel.phrases that returns an iterator sounds like a better API design
15:30 moritz jaldhar: then you could say  for $weasel.phrases -> $current { say "Current phrase: $current }
15:31 moritz and method phrases could be as simple as my $current = $something; gather while $current { take $current; $current = next_phrase_for($current) }
15:35 jaldhar moritz: I don't necessarily want just the current-phrase but I think I understand you.  Let me try it...
15:35 Cabanossi joined #perl6
15:38 jaldhar moritz: btw does your book go into these kinds of topics or is it more basic?  I'm going to order it anyway but I was just interested to know.
15:38 moritz jaldhar: it does mention gather/take, but not in detail
15:39 mspo did you write your book in POD6?
15:44 itaipu joined #perl6
15:44 konsolebox joined #perl6
15:49 [Coke] I seriously doubt anyone is doing that.
15:50 araraloren jaldhar, why you think they are same value
15:51 mspo [Coke]: write a book in pod?
15:51 mspo [Coke]: https://www.perl.com/pub/2004/01/30/ttbook.html
15:51 araraloren Anyone know if there are a module can generate temp file path. Only file path.
15:52 moritz mspo: no, I wrote it in markdown, using LeanPub to render it
15:52 lizmat joined #perl6
15:53 moritz mspo: for the next book I'm starting, I'm considering using bookdown, wich is a somewhat richer markdown dialect
15:53 moritz (but leanpub has the advantage that they handle payments, and allow you to publish and sell early and incrementally)
15:53 [Coke] mspo: POD6.
15:53 mspo moritz: it must be tough to find a good format
15:53 [Coke] I know some people write in a superset of pod5.
15:54 mspo rst is the python docstring format, right?
15:55 mspo IO::Path::UNIX should probably grow mktemp
15:55 araraloren For written I prefer asciidoc
15:56 moritz mspo: I'm quite with markdown for 90% of the tasks; the rest needs a few extensions
15:57 mspo moritz: someone linked this to me earlier: https://beta.undeadly.org/cgi?action=article&amp;sid=20170304230520
15:58 mspo http://modules.zef.pm/search?terms=mktemp  giving a 500 error
15:58 araraloren OK, There is $*TMPDIR, that's enough
15:59 mspo https://github.com/ugexe/Perl6-PathTools
16:00 araraloren Oh, thanks
16:02 Grrrr joined #perl6
16:05 hythm joined #perl6
16:15 jaldhar does perl6 have something like end in C++ STL which is one past the last value?
16:16 jaldhar because my iterator works now almost but it stops on the last value so I can't get that in a loop.
16:17 noganex joined #perl6
16:18 S007 joined #perl6
16:19 cdg joined #perl6
16:20 domidumont joined #perl6
16:20 araraloren jaldhar, I think it's IteratorEnd
16:21 zakharyas joined #perl6
16:26 zengargoyle jaldhar: have you seen Zoffix's article on Sequences and Iterator stuff?  it has a few examples of writing iterator stuff that might be helpful if you haven't read it already.
16:29 vmeson joined #perl6
16:32 Zoffix joined #perl6
16:32 itaipu joined #perl6
16:33 Zoffix mspo: IO::Path::* types are IO::Path + specific $.SPEC class. They're not gonna grow anything else.
16:33 Zoffix mspo: with $*TEMP.mkdir('foo') { .do-things } or use one of the two temp path modules
16:33 Zoffix buggable: Temp::Path
16:34 Zoffix buggable: eco Temp::Path
16:34 buggable Zoffix, Temp::Path 'Make a temporary path, file, or directory': https://github.com/zoffixznet/perl6-Temp-Path
16:35 Zoffix jaldhar: as mentioned, it's IterationEnd: https://rakudo.party/post/Perl-6-Seqs-Drugs-and-Rock-n-Roll--Part-2
16:35 Zoffix jaldhar: but the more common approach is to just use gather/take instead of making your own iterators: https://rakudo.party/post/Perl-6-Seqs-Drugs-and-Rock-n-Roll#igatheryoulltakeusto...
16:37 Zoffix s/'$*TEMP'/\$*TMPDIR/
16:37 Zoffix .oO( but $*HOME and not $*HOMEDIR -_- )
16:38 Zoffix nadim: hash's ACCEPT's broken. It's still on my todo to fix it :/
16:39 * zengargoyle thinks shell-wise $TMP was too much like $FOO while $HOME had meaning.
16:40 Guest81670 joined #perl6
16:40 araraloren Zoffix, I just want generate a temp file path, I choose that PathTools
16:40 Aaronepower joined #perl6
16:41 araraloren good night!
16:41 * Zoffix backlogs
16:42 Zoffix R0b0t1: FWIW, Rakudo releases are signed
16:42 Zoffix And GitHub is the "third party" with keys. I don't know what extra effort stmuk is talking about. It's like 1 command to run
16:42 nadim Zoffix: do you think this problem is related too? https://nopaste.linux-dev.org/?1160059
16:44 Zoffix nadim: that sounds like this bug hitting the code inside Junction: https://rt.perl.org/Ticket/Display.html?id=128905#ticket-history
16:49 Zoffix skids: FWIW, we don't autothread Junctions yet.
16:50 Cabanossi joined #perl6
16:50 Zoffix m: say .^name with 1..*-1
16:50 camelia rakudo-moar 9658dd: OUTPUT: «WhateverCode?»
16:52 Zoffix jeromelanteri: "eror unhandled exception: Missing or wrong version of dependency" <-- that usually means you're running `perl6` instead of `./perl6
16:53 Zoffix jeromelanteri: debugger was fixed like a few days after 2017.06 release
16:53 Zoffix buggable: deb
16:53 nadim sounds like an error right, the only thing in the junction is a hash, I was surprised to get a callable problem
16:53 Zoffix huggable: deb
16:53 huggable Zoffix, CentOS, Debian, Fedora and Ubuntu Rakudo packages: https://github.com/nxadm/rakudo-pkg/releases
16:53 nadim huggable: youhoo!
16:53 huggable nadim, nothing found
16:53 thundergnat joined #perl6
16:54 Zoffix nadim: well, junction calls teh method on all the things inside it; that's your callable
16:55 thundergnat .tell jaldhar You may (or may not, who knows) be interested in looking at http://rosettacode.org/wiki/Evolutionary_algorithm#Perl_6
16:55 yoleaux thundergnat: I'll pass your message to jaldhar.
16:55 emeric joined #perl6
16:55 Zoffix R0b0t1: and there *is* an HTTPS download page: https://rakudo.perl6.org/downloads/star/
16:56 Guest81670 joined #perl6
16:56 mr-foobar joined #perl6
16:56 nadim the code is used to flatten a data dump a bit, it's in the next release, I wanted to be able to say ddt @whatnot, :flat(Array, %my_hash, 7) to flatten all arrays, only my hash, and anything lower than level 7
16:57 nadim it will have to wait :)
16:58 Zoffix nadim: wait for what Hash.ACCEPTS fix?
16:59 jaldhar Zoffix: thanks to moritz I'm using gather/take now but still apparently getting it wrong :(
16:59 yoleaux 16:55Z <thundergnat> jaldhar: You may (or may not, who knows) be interested in looking at http://rosettacode.org/wiki/Evolutionary_algorithm#Perl_6
16:59 Zoffix jaldhar: ok, then you don't need IterationEnd
17:00 itaipu joined #perl6
17:01 Zoffix nadim: oh the callable thing.
17:01 jaldhar zoffix: so you're saying my class should not actually do Iterator at all?
17:01 jaldhar thundergnat: that's cheating!
17:01 Zoffix jaldhar: I've not seen your code, so I don't know :)
17:03 Zoffix nadim: `if Nil !=== @flatten.first: $depth|$s`
17:03 Zoffix nadim: if that still gives the Junction callable error, try `if Nil !=== @flatten.first: { $_ ~~ $depth or $_ ~~ $s }`
17:03 AlexDani` joined #perl6
17:03 Guest81670 joined #perl6
17:04 Zoffix PSA: large changes were merged to MaroVM today. So if you spot something breaking be sure to report it. Also, performance landscape changed: https://github.com/rakudo/rakudo/commit/9658dd98c9
17:04 Zoffix MaroVM... MoarVM :)
17:04 jaldhar zoffix: if you're interested the working code is at https://github.com/jaldhar/Algorithm-DawkinsWeasel.  What I'm trying to do now is make it iterable so I can simplify loops.
17:05 * Zoffix mutters things about intermixed POD and code
17:06 [Coke] Zoffix: any feedback on the .WHAT check I added? Cover what you wanted?
17:06 Zoffix [Coke]: no feedback
17:07 Zoffix [Coke]: any word on TPF status?
17:07 Zoffix the ticket and IO grant
17:08 jaldhar Zoffix: I'll probably change that because I've noticed it's not idiomatic but personally I prefer having the POD for each method next to it.  If you have a folding editor it is not inconvenient.
17:09 cdg joined #perl6
17:09 Zoffix jaldhar: and if you happen to read the code somewhere without a syntax highligher, it's entirely unreadable, because the POD code examples are indistinguishable from actual code :)
17:10 jaldhar Zoffix: yeah I get it.
17:11 Zoffix jaldhar: and yeah, I don't think your class should do Iterator role. You generally don't directly work with Iterator objects.
17:12 Zoffix The loop looks simple enough to me.
17:12 * zengargoyle murmurs again about shadow blocks for documentation. :P
17:14 Zoffix You could make .evolution method that takes a &formatter callable returns a Seq with each of the steps. Then loop'd be just .say for $weasel.evolution: { .count.fmt('%04d'), ' ', .current-phrase, ' [', .hi-score, ']' }
17:15 * Zoffix &
17:15 Zoffix left #perl6
17:16 jaldhar Zoffix: ok I will look into this.
17:17 jaldhar Zoffix: and thanks for your articles on perl6.party ^w rakudo.party.  They were what gave me the idea to look into Iterators.
17:17 tony-o MoarVM panic: Internal error: invalid thread ID 1586853824 in GC work pass
17:18 tony-o this happens with new moar running the 'ab.pl' script in the perl6/perl6-http-server-async repo
17:19 tony-o actually, you want i should move this to the moar channel?
17:22 mr-foobar joined #perl6
17:23 cdg_ joined #perl6
17:23 zengargoyle .ask thundergnat is evolution thing your code?  i don't get the '$parent ne target;' bit, it does nothing in a sink context....  hrmmm.
17:23 yoleaux zengargoyle: I'll pass your message to thundergnat.
17:25 S007 joined #perl6
17:27 setty1 joined #perl6
17:28 [Coke] Zoffix: no feedback on the grant. I have been having trouble getting information from Dan. Last I heard he missed the initial request for disbursement and was working on int.
17:28 [Coke] *it
17:28 zengargoyle .tell thundergnat nevermind.  i mistook loop () {} for loop {} because the code was formatted to nicely.
17:28 yoleaux zengargoyle: I'll pass your message to thundergnat.
17:30 AlexDaniel [Coke]: by the way, can you check if my CLA was received?
17:35 committable6 joined #perl6
17:35 bisectable6 joined #perl6
17:35 greppable6 joined #perl6
17:35 evalable6 joined #perl6
17:35 coverable6 joined #perl6
17:35 unicodable6 joined #perl6
17:35 benchable6 joined #perl6
17:35 statisfiable6 joined #perl6
17:40 esh joined #perl6
17:42 Aaronepower joined #perl6
17:54 Aaronepower joined #perl6
17:56 suman__ joined #perl6
17:57 suman__ This woud be a good exercise for perl 6 too.https://stackoverflow.com/questions/45357866/webscraping-with-r
18:10 evanm joined #perl6
18:10 mscha joined #perl6
18:11 mscha m: say now - 1;  # works
18:11 camelia rakudo-moar 9658dd: OUTPUT: «Instant:1501179098.695875?»
18:11 mscha m: say now-1;  # doesn't work
18:11 camelia rakudo-moar 9658dd: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Undeclared routine:?    now used at line 1. Did you mean 'not', 'HOW'???»
18:11 timotimo yeah, now is a term
18:11 timotimo m: say &now # does not exist
18:11 camelia rakudo-moar 9658dd: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Undeclared routine:?    now used at line 1. Did you mean 'not', 'HOW'???»
18:11 mscha m: say pi-1;  # works, even though pi and now are supposedly both terms
18:11 camelia rakudo-moar 9658dd: OUTPUT: «2.14159265358979?»
18:11 timotimo m: say &term:<now> # exists
18:11 camelia rakudo-moar 9658dd: OUTPUT: «sub term:<now> () { #`(Sub|36776120) ... }?»
18:11 timotimo m: say &term<pi>
18:11 camelia rakudo-moar 9658dd: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Undeclared routine:?    term used at line 1??»
18:11 timotimo no, pi is probably a constant
18:12 timotimo oops
18:12 timotimo m: say &term:<pi>
18:12 camelia rakudo-moar 9658dd: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Undeclared routine:?    term:<pi> used at line 1. Did you mean 'term:<time>', 'term:<now>'???»
18:12 mscha Doc says it's a term.
18:12 timotimo sounds like a docbug, then
18:12 mscha Still, why can't you say term-1?
18:12 timotimo m: say now\-1
18:12 camelia rakudo-moar 9658dd: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Confused?at <tmp>:1?------> 3say now\7?5-1?    expecting any of:?        postfix?»
18:13 timotimo not sure
18:15 perlpilot LTM
18:16 perlpilot - can appear in identifiers
18:16 perlpilot (that's my guess as to the reason now-1 barfs anyway)
18:16 perlpilot Though, I thought - had to have alphabetics on either side, so maybe that's wrong.
18:17 timotimo hm, and we don't backtrack, so we don't go back over it?
18:17 timotimo m: my $foo = 10; say $foo-1
18:17 camelia rakudo-moar 9658dd: OUTPUT: «9?»
18:17 timotimo but then why does this work :P
18:18 geekosaur now-1 is not reporting the undefined symbol to be "now-1", but "now". for whatever reason it has decided "now" must be a sub instead of a term?
18:18 timotimo oh
18:19 geekosaur or some similar semantic hosage
18:19 timotimo m: sub term:<now-1> { now / 2 }; say now; say now-1
18:19 camelia rakudo-moar 9658dd: OUTPUT: «Instant:1501179590.453435?750589795.227994?»
18:19 timotimo now-1 is actually a valid term
18:19 geekosaur but it is only parsed as one via LTM if you define it
18:20 geekosaur m: say now-1;
18:20 camelia rakudo-moar 9658dd: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Undeclared routine:?    now used at line 1. Did you mean 'not', 'HOW'???»
18:20 geekosaur undeclared routine: now
18:20 geekosaur not now-1
18:20 timotimo good catch
18:20 timotimo yeah, when it doesn't find a term with now-1, it'll try to find a sub "now", which it doesn't find
18:20 timotimo m: sub now { 1 }; say now-1
18:20 camelia rakudo-moar 9658dd: OUTPUT: «0?»
18:20 timotimo m: sub now { 1 }; say now
18:20 camelia rakudo-moar 9658dd: OUTPUT: «1?»
18:21 timotimo mhh
18:22 geekosaur that seems like ltm failure to me tbh. if a term now-1 exists then it should match, if not then now should match as a term
18:23 perlpilot m: say time-1
18:23 camelia rakudo-moar 9658dd: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Undeclared routine:?    time used at line 1??»
18:23 timotimo - is dangerous like that
18:24 perlpilot time and now are the only two terms I see defined in src/core
18:27 timotimo rand
18:27 pecastro joined #perl6
18:29 [Coke] AlexDaniel: How was it sent?

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

Perl 6 | Reference Documentation | Rakudo