Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-12-09

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 joeschmoe2 m: my $Link = 'https://www.google.com'; say $Link  /msg
00:00 camelia rakudo-moar c27a00: OUTPUT«5===SORRY!5=== Error while compiling /tmp/yA7ERKIWq6␤Undeclared routine:␤    msg used at line 1. Did you mean 'msb'?␤␤»
00:01 _nadim So long, and thanks for all the fish
00:01 Zoffix \o
00:02 joeschmoe2 i suck
00:02 diakopter m: ***=*=***=****=**=***=*=****=*=**
00:02 camelia rakudo-moar c27a00: ( no output )
00:03 joeschmoe2 +camelia m: my $Link = 'https://www.google.com'; say $Link
00:03 Zoffix joeschmoe2, /msg is an IRC command to send private messages. You use it by typing  /msg NICK_TO_SEND_MESSAGE_TO MESSAGE ... and the message you'd send is the same one you're typing here in the channel
00:03 Zoffix /msg camelia m: say 42
00:04 Zoffix ^ type that exactly and it'll work :)
00:04 Zoffix diakopter, hax!
00:04 nine Something for the bikeshedding commitee: how should I call CompUnit::RepositoryRegistry's method that takes a string of the form "inst#/path/to/site" and gives you a CompUnit::Repository object?
00:04 xjrK I have a class in a .pm6 module... I want to access it in another file. use Class::Whatever should work, no?
00:04 marchelzo isn't it kind of inconsistent that 'for ((1, 2), (3, 4), (5, 6)) -> $a, $b { ... }' uses the pairs to populate $a and $b, but 'for (1, 2, 3, 4, 5, 6) -> $a, $b { ... }' uses two elements each time?
00:05 Zoffix m: for ((1, 2), (3, 4), (5, 6)) -> $a, $b { say "$a $b" }
00:05 camelia rakudo-moar c27a00: OUTPUT«1 2 3 4␤Too few positionals passed; expected 2 arguments but got 1␤  in block <unit> at /tmp/NP1kzGr44W:1␤␤»
00:05 diakopter nine: bikeshed->woodshed
00:05 Zoffix m: for |((1, 2), (3, 4), (5, 6)) -> $a, $b { say "$a $b" }
00:05 camelia rakudo-moar c27a00: OUTPUT«1 2 3 4␤Too few positionals passed; expected 2 arguments but got 1␤  in block <unit> at /tmp/ZmQcAKx0ew:1␤␤»
00:05 marchelzo Zoffix: huh
00:06 lucasb joined #perl6
00:06 Zoffix m: for (1, 2, 3, 4, 5, 6) -> $a, $b { say "$a $b" }
00:06 camelia rakudo-moar c27a00: OUTPUT«1 2␤3 4␤5 6␤»
00:06 Zoffix marchelzo, seems terribly consistent to me :)
00:06 joeschmoe2 I have a new friend her name is +camelia
00:06 marchelzo this perl6advent thing is wrong then
00:06 nine diakopter: are we meta-bikeshedding now? ;)
00:06 Zoffix perhaps, is it from last year?
00:06 marchelzo from 2009
00:06 Zoffix Ohh.
00:06 Zoffix marchelzo, yeah, there likely have been a billion changes since then :|
00:07 Zoffix nine, path-to-repo? :)
00:07 lucasb here, a bikeshed team member arrived :)
00:07 _nadim "you cannot create an instance of this type" ... got to love the error messages.
00:07 lucasb nine: doesn't it make sense to call it '.from-string' ?
00:07 marchelzo I was warned about that. Apparently the authors have been trying to update it for modern perl6 but there are still some things that are outdated.
00:07 lucasb *does it
00:07 Zoffix nine, or just .repo() :) Hard to say without knowing what other methods are :)
00:08 nine lucasb, Zoffix: I guess what bothers me is that I'm reluctant to have "repo" twice in the name, yet a plain .from-string doesn't really tell you what you get
00:08 Zoffix CompUnit::RepositoryRegistry​.repo('inst#/path/to/site')
00:09 Zoffix *shrug*
00:09 nine There will also be a method that gives you the 'site' or 'vendor' repo
00:09 marchelzo Zoffix: so how _would_ you loop over two lists in parrallel? flat $a Z $b?
00:10 Zoffix marchelzo, no idea. I barely know any Perl 6, sorry :)
00:10 marchelzo Zoffix: oh, ok. no worries.
00:12 lucasb timotimo: when you wake up, see if you've put this test in the wrong place: https://github.com/timo/json_fast​/blob/master/lib/JSON/Fast.pm#L81
00:12 lucasb I think where it is, it'll never fire and end the loop.
00:12 nine I think I will go with repository-for-spec (because it may just return a cached object) and repository-for-name
00:13 Zoffix lucasb, is that the probable cause of the freeze?
00:13 * Zoffix is trying to debug that ATM
00:13 lucasb Zoffix: that's my hypothesis :)
00:15 marchelzo How to interleave multiple lists together?
00:17 joeschmoe joined #perl6
00:17 n0tjack joined #perl6
00:17 nine marchelzo: maybe [>]?
00:17 nine marchelzo: err [Z]
00:18 marchelzo I want (1, 2, 3) and (4, 5, 6) to become (1, 4, 2, 5, 3, 6)
00:18 marchelzo so flat after [Z] would work
00:18 marchelzo but I was wondering if there was a shorter way
00:18 lucasb m: say <1 2 3> Z <4 5 6>
00:18 camelia rakudo-moar c27a00: OUTPUT«((1 4) (2 5) (3 6))␤»
00:19 marchelzo it seems like a common thing to want to do (e.g., for $list1 ??? $list2 -> $elem1, $elem2 { ... })
00:19 joeschmoe sorry
00:20 nine marchelzo: for <1 2 3> Z <a b c> -> ($a, $b) { ... }
00:20 marchelzo so the parens around $a, $b are important?
00:20 Sgeo__ joined #perl6
00:20 Zoffix m: my @l1 = 1..4; my @l2 = 5..8; for @l1 Z @l2 -> ($a, $b) { say "[$a $b]" }
00:20 camelia rakudo-moar c27a00: OUTPUT«[1 5]␤[2 6]␤[3 7]␤[4 8]␤»
00:20 Zoffix m: my @l1 = 1..4; my @l2 = 5..8; for @l1 Z @l2 -> $a, $b { say "[$a $b]" }
00:20 camelia rakudo-moar c27a00: OUTPUT«[1 5 2 6]␤[3 7 4 8]␤»
00:20 nine yes, that makes it unpack
00:21 marchelzo nine: great, that makes sense. thanks
00:21 lucasb another variant is: <1 2 3> Z[&slip] <4 5 6>
00:21 lucasb but that looks ugly :)
00:21 joeschmoe quick question how do you do a regex search and replace as a oneliner
00:21 marchelzo m: <1 2 3> Z[&slip] <4 5 6>
00:21 camelia rakudo-moar c27a00: ( no output )
00:22 marchelzo m: say (<1 2 3> Z[&slip] <4 5 6>).fmt
00:22 camelia rakudo-moar c27a00: OUTPUT«1 4 2 5 3 6␤»
00:22 joeschmoe quick question how do you do a regex search and replace as a oneliner and print it to std out
00:22 marchelzo so.. is Z a meta-operator as well as a regular operator?
00:22 Zoffix joeschmoe, you mean in files?
00:23 joeschmoe sure or just all on the command line quoted
00:23 Zoffix no idea
00:23 * Zoffix is as helpful as a brick :P
00:23 cbk joined #perl6
00:23 Axord joined #perl6
00:25 nine marchelzo: yes
00:25 marchelzo what does the <1 2 3> syntax mean exactly? is it the same as (1, 2 3)?
00:26 nine marchelzo: yes, <foo bar baz> is equal to ('foo', 'bar', 'baz')
00:26 Zoffix aw
00:27 Zoffix lucasb left seconds before I found that their hypothesis was right :)
00:28 z8 joined #perl6
00:28 M-eternaleye joined #perl6
00:30 _nadim can one reach non exported sub via the package they reside in? EG A::B::C::<&foo>()
00:30 Psyche^ joined #perl6
00:30 Zoffix .tell timotimo Sent you a PR to fix the freezing issue. lucasb++ first found the problematic line. https://github.com/timo/json_fast/pull/8
00:30 yoleaux Zoffix: I'll pass your message to timotimo.
00:31 skids joined #perl6
00:33 captain-adequate joined #perl6
00:34 dalek rakudo/repository_registry: 10eb41b | (Stefan Seifert)++ | / (9 files):
00:34 dalek rakudo/repository_registry: Rename CompUnitRepo to CompUnit::RepositoryRegistry
00:34 dalek rakudo/repository_registry:
00:34 dalek rakudo/repository_registry: Its job will be to manage the mapping of repository spec strings to
00:34 dalek rakudo/repository_registry: repositories.
00:34 dalek rakudo/repository_registry: review: https://github.com/rakudo/rakudo/commit/10eb41ba43
00:34 dalek rakudo/repository_registry: 75ffcdc | (Stefan Seifert)++ | src/ (4 files):
00:34 dalek rakudo/repository_registry: Rename CompUnit::RepositoryRegistry.new to .repository-for-spec
00:34 dalek rakudo/repository_registry:
00:34 dalek rakudo/repository_registry: CompUnit::RepositoryRegistry is uninstantiable and the method is used
00:34 dalek rakudo/repository_registry: only in a few places. No need to shorten the name.
00:34 dalek rakudo/repository_registry: review: https://github.com/rakudo/rakudo/commit/75ffcdc172
00:35 TEttinger joined #perl6
00:39 joeschmoe im doing this wrong  i just want to search and replace and then pring -e 's:g/ut/foo/'; say $_
00:40 n0tjack joined #perl6
00:43 [Coke] advent2013-day14.t is hanging. :|
00:51 flussence [Coke]: that's happened to me a few times, seems to happen at random
00:51 dalek perl6-roast-data: 71b6ae5 | coke++ | / (9 files):
00:51 dalek perl6-roast-data: today (automated commit)
00:51 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/71b6ae52b5
00:54 joeschmoe m: 'hello world' ~~ s/'hello world'/bye/; .say
00:54 camelia rakudo-moar c27a00: OUTPUT«Cannot modify an immutable Str␤  in block <unit> at /tmp/Ac_YQSYh1Q:1␤␤»
00:54 [Coke] it shouldn't be ble to hang that, though ^^
00:54 joeschmoe m: 'hello world' ~~ s/hello world/bye/; .say
00:54 camelia rakudo-moar c27a00: OUTPUT«Potential difficulties:␤    Space is not significant here; please use quotes or :s (:sigspace) modifier (or, to suppress this warning, omit the space, or otherwise change the spacing)␤    at /tmp/dpsKMLEkGX:1␤    ------> 3'hello world' ~~ s/hello7…»
00:55 joeschmoe m: 'hello world' ~~ 's/hello world/bye/'; .say
00:55 camelia rakudo-moar c27a00: OUTPUT«(Any)␤»
00:55 joeschmoe m: 'hello world' ~~ :s/hello world/bye/; .say
00:55 camelia rakudo-moar c27a00: OUTPUT«5===SORRY!5=== Error while compiling /tmp/gtPAxuuZtH␤Missing required term after infix␤at /tmp/gtPAxuuZtH:1␤------> 3'hello world' ~~ :s/hello world/bye/7⏏5; .say␤    expecting any of:␤        prefix␤        term␤»
00:56 joeschmoe what am i doing wrong in the search and replace
01:03 skids m: my $a = "hello world"; $a ~~ s:s/hello world/bye/; $a.say;
01:03 camelia rakudo-moar c27a00: OUTPUT«bye␤»
01:03 skids m: $_ = "hello world"; s:s/hello world/bye/; .say
01:03 camelia rakudo-moar c27a00: OUTPUT«bye␤»
01:05 skids The first s is "run a substitution" and the second one is an adverb that means spaces are not ignored in the pattern.
01:10 yeahnoob joined #perl6
01:15 cdg joined #perl6
01:21 Zoffix joined #perl6
01:32 km3 joined #perl6
01:36 herby_ joined #perl6
01:36 herby_ Evening, everyone!
01:36 marchelzo hi herby_
01:37 herby_ m: if "abcde" ~~ /e/ {say "Found it"}
01:37 camelia rakudo-moar c27a00: OUTPUT«Found it␤»
01:37 herby_ I'm still having a problem wrapping my head around Grammars
01:38 herby_ if I do:    grammar Test {  token TOP { c } }, then look for a match, it doesn't find anything
01:38 Zoffix herby_, have you seen today's Advent article?
01:38 herby_ I have :)
01:38 herby_ great article
01:38 Zoffix :)
01:38 Zoffix k
01:38 herby_ everyone is talking about how great grammars are, i just can't seem to grasp them yet
01:38 herby_ Test.parse("abcde")   would not find a match
01:39 Zoffix m: grammar Test {  token TOP { <c> }; token c { \d+ };  }; say Test.parse("42");
01:39 camelia rakudo-moar c27a00: OUTPUT«「42」␤ c => 「42」␤»
01:39 herby_ what if you did    token c { 4 }
01:40 herby_ so looking for a specific digit, instead of a digit
01:40 Zoffix m: grammar Test {  token TOP { .+? 'c' .+ } }; say Test.parse("abcde");
01:40 camelia rakudo-moar c27a00: OUTPUT«「abcde」␤»
01:40 Zoffix m: grammar Test {  token TOP { <c> .+ }; token c { 4 };  }; say Test.parse("42");
01:40 camelia rakudo-moar c27a00: OUTPUT«「42」␤ c => 「4」␤»
01:40 herby_ hmmm
01:40 herby_ what the world
01:40 Zoffix IIUC, the grammar needs to match the whole parse string
01:40 herby_ ahhh
01:40 Zoffix m: grammar Test {  token TOP { <c> }; token c { 4 };  }; say Test.parse("42");
01:40 camelia rakudo-moar c27a00: OUTPUT«Nil␤»
01:40 herby_ thats what I discovered
01:41 herby_ the fact that I need to know the structure of the whole string
01:41 Zoffix so this fails, because there's no match rule for the "2"
01:41 herby_ ok, i just wanted to make sure I wasn't missing a concept
01:42 flussence wait, does that do an implicit ^ and $ ?
01:42 julien_ joined #perl6
01:43 herby_ m: grammar Test { token TOP { <c> }; token c { 4 } ; }; say Test.parse("24");
01:43 camelia rakudo-moar c27a00: OUTPUT«Nil␤»
01:44 cdg joined #perl6
01:44 Zoffix Don't know if it's an implicit ^ and $, but, I'd think "parse" would mean to "interpret the string"... and if part of it doesn't make sense to the grammar, it's fair for it to fail
01:44 marchelzo Zoffix: you mean there is a perl6 advent for this year as well?
01:44 Zoffix marchelzo, yeah: https://perl6advent.wordpress.com/
01:45 marchelzo Zoffix: ah, I'm looking at the 2009 one right now. Have they done one every year since then?
01:45 Zoffix *shrug* probably
01:45 marchelzo I've got a lot of reading to do then
01:45 Zoffix :)
01:46 Zoffix m: grammar Test { token TOP { <c>+ }; token c { \d } ; }; say Test.parse("24");
01:46 camelia rakudo-moar c27a00: OUTPUT«「24」␤ c => 「2」␤ c => 「4」␤»
01:46 lustlife joined #perl6
01:46 Zoffix Grammars are so nice.
01:46 herby_ :)
01:46 herby_ I'm trying to rewrite a simple server log parser (currently written in Perl 5) using Grammars
01:46 herby_ but the format of each line might change slightly, depending what activity occured
01:47 herby_ so it seems like with Grammars, I don't want to use them unless I know exactly what the string will look like?
01:47 herby_ or am I oversimplifying it
01:48 herby_ I'm thinking I'm oversimplifying it
01:49 geekosaur depends on whether you can characterize what you are looking at. log lines tend to have a well defined prefix and a reasonably well defined end (timestamp, newline respectively are common)
01:49 geekosaur you might capture the rest and pass it to another grammar which tries to match various kinds of log messages
01:50 herby_ yeah. there are mainly two types of string entries for this. one entry shows the user logging into the server with workstation info etc
01:50 herby_ and the other type of line will be user activity
01:51 herby_ I'll try and plan for both
01:51 geekosaur but remember that at the bottom is just regexes so it can handle quite a lot; you do need to be able to discern one of those types from the other, but if you can't do that then you've got a bigger problem than grammars anyway, I suspect
01:51 Zoffix m: grammar Test { token TOP { <log-line>+ }; token log-line { .+?\n } ; }; say Test.parse("foo\nbar\nbaz");
01:51 camelia rakudo-moar c27a00: OUTPUT«Nil␤»
01:51 Zoffix m: grammar Test { token TOP { <log-line>+ }; token log-line { .+?\n } ; }; say Test.parse("foo\nbar\nbaz\n");
01:51 camelia rakudo-moar c27a00: OUTPUT«「foo␤bar␤baz␤」␤ log-line => 「foo␤」␤ log-line => 「bar␤」␤ log-line => 「baz␤」␤»
01:52 Zoffix m: grammar Test { token TOP { <log-line>+ }; token log-line { .+?\n? } ; }; say Test.parse("foo\nbar\nbaz");
01:52 camelia rakudo-moar c27a00: OUTPUT«「foo␤bar␤baz」␤ log-line => 「f」␤ log-line => 「o」␤ log-line => 「o␤」␤ log-line => 「b」␤ log-line => 「a」␤ log-line => 「r␤」␤ log-line => 「b」␤ log-line => 「a」␤ log-line => 「z」␤»
01:52 Zoffix m: grammar Test { token TOP { <log-line>+ }; token log-line { .+\n? } ; }; say Test.parse("foo\nbar\nbaz");
01:52 camelia rakudo-moar c27a00: OUTPUT«「foo␤bar␤baz」␤ log-line => 「foo␤bar␤baz」␤»
01:53 Zoffix m: grammar Test { token TOP { <log-line>+ }; token log-line { .+?[\n|\z] } ; }; say Test.parse("foo\nbar\nbaz");
01:53 camelia rakudo-moar c27a00: OUTPUT«5===SORRY!5=== Error while compiling /tmp/NV7alei5Md␤Unsupported use of \z as end-of-string matcher; in Perl 6 please use $␤at /tmp/NV7alei5Md:1␤------> 3log-line>+ }; token log-line { .+?[\n|\z7⏏5] } ; }; say Test.parse("foo\nbar\nbaz")␤»
01:53 Zoffix aw
01:53 Zoffix m: grammar Test { token TOP { <log-line>+ }; token log-line { .+?[\n|$$] } ; }; say Test.parse("foo\nbar\nbaz");
01:53 camelia rakudo-moar c27a00: OUTPUT«「foo␤bar␤baz」␤ log-line => 「foo␤」␤ log-line => 「bar␤」␤ log-line => 「baz」␤»
01:53 Zoffix weee
01:53 geekosaur don't you really want log lines separated by \n ?
01:54 hoelzro I just noticed while trying to debug further panda-build problems that `perl6 --ll-exception $(which panda-build)` doesn't pass --ll-exception to the new perl6 process. Is there a way to find out the command line arguments given between perl6 and the name of the script?
01:55 Zoffix herby_, BTW, there's http://modules.perl6.org/repo/Grammar::Debugger (which also includes Grammar::Tracer) you may find useful when writing grammars
01:55 lustlife` joined #perl6
01:55 geekosaur m: grammar Test { token TOP { <log-line>+ % '\n' }; token log-line { .+} ; }; say Test.parse("foo\nbar\nbaz");
01:55 camelia rakudo-moar c27a00: OUTPUT«「foo␤bar␤baz」␤ log-line => 「foo␤bar␤baz」␤»
01:55 geekosaur no, did that wrong
01:56 geekosaur m: grammar Test { token TOP { <log-line>+ % '\n' }; token log-line { .+? } ; }; say Test.parse("foo\nbar\nbaz");
01:56 herby_ thanks Zoffix, I saw a youtube video where he was using a perl6-debugger but I couldn't get it to work
01:56 camelia rakudo-moar c27a00: OUTPUT«Nil␤»
01:56 herby_ I'll check those out
01:57 herby_ what does the % do?
01:57 herby_ <log-line>+ %
01:57 herby_ <log-line>+ % '\n'
02:02 Zoffix m: grammar Test { token TOP { <log-line>+ % '\n' }; token log-line { .+? } ; }; say Test.parse("foo\nbar\nbaz");
02:02 camelia rakudo-moar c27a00: OUTPUT«Nil␤»
02:02 Zoffix no idae
02:02 Zoffix m: grammar Test { token TOP { [ <log-line>  \n? ]+ }; token log-line { <-[\n]> } ; }; say Test.parse("foo\nbar\nbaz");
02:02 camelia rakudo-moar c27a00: OUTPUT«「foo␤bar␤baz」␤ log-line => 「f」␤ log-line => 「o」␤ log-line => 「o」␤ log-line => 「b」␤ log-line => 「a」␤ log-line => 「r」␤ log-line => 「b」␤ log-line => 「a」␤ log-line => 「z」␤»
02:02 Zoffix m: grammar Test { token TOP { [ <log-line>  \n? ]+ }; token log-line { <-[\n]>+ } ; }; say Test.parse("foo\nbar\nbaz");
02:02 camelia rakudo-moar c27a00: OUTPUT«「foo␤bar␤baz」␤ log-line => 「foo」␤ log-line => 「bar」␤ log-line => 「baz」␤»
02:03 lucs ack'ing for "EXECUTABLE" in the design docs (github.com/perl6/specs) matches nothing -- looking for P5's $^X equivalent.
02:04 Zoffix m: say $*PROGRAM
02:04 camelia rakudo-moar c27a00: OUTPUT«"/tmp/zKU4Shd0tn".IO␤»
02:04 herby_ <log-line>+ % '\n'
02:04 Zoffix m: say $*EXECUTABLE-NAME
02:04 camelia rakudo-moar c27a00: OUTPUT«perl6-m␤»
02:04 Zoffix lucs, check out http://doc.perl6.org/language/5to6-perlvar
02:04 herby_ whoops, ignore that
02:05 geekosaur herby_, the % means parse a list of something separated by something else
02:05 lucs Zoffix: Yeah, that's where I saw EXECUTABLE(-NAME, yes), but I was looking for more details.
02:05 geekosaur so <number> % ',' would be a comma-separated list of numbers
02:05 geekosaur er
02:06 geekosaur <number>+ % ','
02:06 geekosaur saying at least one number, separated by commas
02:06 herby_ ah ok, thats pretty neat
02:07 lucs (details like, can I get its full path from inside the program?)
02:10 geekosaur that isn't always available
02:10 lucs Hmm...
02:10 herby_ m: grammar Test { token TOP { <c>+ % ',' }; token c { \d }; }; say Test.parse("1,2,3,4,5");
02:10 camelia rakudo-moar c27a00: OUTPUT«「1,2,3,4,5」␤ c => 「1」␤ c => 「2」␤ c => 「3」␤ c => 「4」␤ c => 「5」␤»
02:11 marchelzo is there an alternative way to write f($_) without explicitly mentioning $_? f is not a method, it's a block.
02:11 zengargoyle m: say $*EXECUTABLE.abspath
02:11 camelia rakudo-moar c27a00: OUTPUT«./rakudo-m-inst/bin/perl6-m␤»
02:12 zengargoyle m: say $*EXECUTABLE.^methods
02:12 camelia rakudo-moar c27a00: OUTPUT«(BUILD new-from-absolute-path abspath is-absolute is-relative parts volume dirname basename extension Numeric Bridge Int succ pred IO open pipe watch absolute relative cleanup resolve parent child chdir rename copy move chmod unlink symlink link mkdir rmdi…»
02:12 zengargoyle you might be able to find something in there...
02:13 lucs geekosaur: I happen to want to launch perl6 from within the program, and I'd like not to have to trust the PATH and make sure I'm invoking the same instance.
02:14 flussence m: sub f { $^a * 2 }; given 5 { say .&f }
02:14 camelia rakudo-moar c27a00: OUTPUT«10␤»
02:14 lucs geekosaur: Why do you say it's not always available?
02:14 geekosaur zengargoyle, there turn out to be ways to defeat that...
02:15 geekosaur the program is usually passed a basename as $0 if it was found on $PATH. one sting in the tail is that the shell may have a different $PATH it's using than it has exported
02:15 marchelzo flussence: thanks
02:15 geekosaur (this is not common but is possible)
02:16 geekosaur I should say as argv[0] since I am talking about C here
02:16 geekosaur or if it's not started by a shell, it could do pretty much anything
02:16 geekosaur (not to mention edge cases like traditional login prepending a - to argv[0] to indicate that it's a login shell)
02:17 lucs geekosaur: Ah, I see what you mean.
02:17 zengargoyle m: say (slurp "/proc/self/cmdline").trans( "\x00"=>' ');
02:17 camelia rakudo-moar c27a00: OUTPUT«/home/camelia/rakudo-m-inst-2/bin/moar --execname=./rakudo-m-inst/bin/perl6-m --libpath=/home/camelia/rak​udo-m-inst-2/share/nqp/lib --libpath=/home/camelia/raku​do-m-inst-2/share/perl6/lib --libpath=/home/camelia/rakudo​-m-inst-2/share/perl6/runtime /home/ca…»
02:17 geekosaur also IIRC windows cannot pass a path
02:17 herby_ Thanks for the help and tips on understanding Grammars.  Now I have some ideas for my log parser
02:17 lucs geekosaur: I guess I'll have to trust the PATH :)
02:17 geekosaur so, you can get something that *usually* works but not that *always* works, except by going to platform dependent stuff like Linux /proc/self/exe
02:19 * zengargoyle wonders if Perl 6 has a way to set program name ala $0 = 'foobar'
02:21 zengargoyle tho even if it's platform dependent, it should be settable by that platform dependent method during startup...
02:24 zengargoyle then again, the actual executable is 'moar' with a bunch of options... :)
02:24 cdg joined #perl6
02:28 astrofyziky joined #perl6
02:29 zengargoyle heh: $ /lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 /opt/rakudobrew/moar-nom/install/bin/moar --execname=/opt/rakudobrew/bin​/../moar-nom/install/bin/perl6 --libpath=/opt/rakudobrew/mo​ar-nom/install/share/nqp/lib --libpath=/opt/rakudobrew/moa​r-nom/install/share/perl6/lib --libpath=/opt/rakudobrew/moar-​nom/install/share/perl6/runtime /opt/rakudobrew/moar-nom/install/​share/perl6/runtime/perl6.moarvm -e 'say
02:29 zengargoyle $*EXECUTABLE-NAME'
02:29 zengargoyle output: perl6
02:29 zengargoyle the LIES!
02:31 hahainternet day 8: "with an impressive collection of utility to get most of our common", utility should be plural i think
02:31 hahainternet "Tools that take the repetitive and automatable parts of our work the way" should be "away" i believe
02:31 hahainternet "Just as classes are first class citizen that we can introspect" citizen should also be plural
02:32 hahainternet hope people don't mind me giving these corrections, it's all i can do to help D:
02:32 lucs (introspecting citizens is an unusual metaphor, eh)
02:33 hahainternet classes is plural, and so citizen should be too i think
02:33 hahainternet that's how the rule goes iirc
02:33 hahainternet so says my grade C in GCSE English :D
02:34 hahainternet "Each expression is a list of terms, or possibly and alternative of them" and should be 'an'
02:35 secwang joined #perl6
02:39 marchelzo is it possible to load some code into the repl and use things that are defined in it?
02:40 zengargoyle lucs: looks like the executable name is set by the perl6 wrapper script itself.  passed in as an option to the moar vm instance running the code.
02:40 dj_goku marchelzo: like print them or inspect them?
02:40 telex joined #perl6
02:40 lucs zengargoyle: Do we happen to have access to it?
02:41 zengargoyle my .../bin/perl6: exec /opt/rakudobrew/moar-nom/install/bin/moar  --execname="$0"
02:41 marchelzo dj_goku: like I made a grammar, and I want to try parsing some stuff in the repl.
02:45 zengargoyle m: say $*EXECUTABLE.path
02:45 camelia rakudo-moar c27a00: OUTPUT«./rakudo-m-inst/bin/perl6-m␤»
02:45 zengargoyle so it depends in this case on how you start it...
02:45 lucs zengargoyle: Cool, thanks :)
02:45 zengargoyle m: say $*EXECUTABLE.absolute
02:45 camelia rakudo-moar c27a00: OUTPUT«./rakudo-m-inst/bin/perl6-m␤»
02:45 BenGoldberg joined #perl6
02:45 vendethiel joined #perl6
02:45 zengargoyle m: say $*EXECUTABLE.resolve.absolute
02:45 camelia rakudo-moar c27a00: OUTPUT«/rakudo-m-inst/bin/perl6-m␤»
02:45 zengargoyle wonder if camelia is in a chroot...
02:45 lucs It expands correctly for me here.
02:46 marchelzo does this look reasonable? I don't know if I need to use regex for TOP or if I could use token: http://sprunge.us/CfWK
02:47 zengargoyle or probably started up funny to handle rebuilds and such. like: cd /home/camelia; ./rakudo-m-inst/bin/perl6-m;  probably wrapped up in an easily kickable script.
02:47 AlexDaniel joined #perl6
02:48 AlexDaniel m: my $foo = 5; say “x: $_” for $foo
02:48 camelia rakudo-moar c27a00: OUTPUT«x: 5␤»
02:48 zengargoyle it doesn't get PATH expanded since it's started with an absolute path
02:48 AlexDaniel m: my @foo = 5, 4; say “x: $_” for @foo
02:48 camelia rakudo-moar c27a00: OUTPUT«x: 5␤x: 4␤»
02:48 AlexDaniel m: my $foo = [5, 4]; say “x: $_” for $foo
02:48 camelia rakudo-moar c27a00: OUTPUT«x: 5 4␤»
02:48 AlexDaniel m: my $foo = [5, 4]; say “x: $_” for $foo; say $foo.WHAT
02:48 camelia rakudo-moar c27a00: OUTPUT«x: 5 4␤(Array)␤»
02:49 AlexDaniel hmm
02:49 AlexDaniel m: my $foo = [5, 4]; say “x: $_” for |$foo
02:49 camelia rakudo-moar c27a00: OUTPUT«x: 5␤x: 4␤»
02:49 AlexDaniel m: my $foo = 5; say “x: $_” for |$foo
02:49 camelia rakudo-moar c27a00: OUTPUT«x: 5␤»
02:50 AlexDaniel It's just interesting how sometimes it doesn't matter whether it is an array or not
02:50 zengargoyle marchelzo: TOP can be anything.  i think i've even seen it be a method that does some stuff and then calls another rule explicitly.
02:50 hahainternet AlexDaniel: where doesn't it matter? it seems that everything there is quite consistent
02:51 AlexDaniel hahainternet: yes it is consistent, yet it is pretty useful
02:51 zengargoyle it's just the name TOP that gets called by default.  (you can also start at another rule/regex/token/method by passing an argument to parse)
02:51 hahainternet oh right, i thought you were complaining about something
02:52 zengargoyle AlexDaniel: that's the single thing iterates rule.
02:52 hahainternet i think retaining the clear distinction between scalar, array and hash is fantastic, it's something i find frustrating in python
02:52 marchelzo say I've got a Match object, and the pattern was <foo> | <bar> <baz>. How do I tell which one matched?
02:52 hoelzro zengargoyle: there's a MoarVM ticket open to address that, iirc
02:52 hahainternet i think the one thing i'm unsure of in 6 is how to turn a positional into an array member
02:52 marchelzo if $<foo>?
02:52 hoelzro marchelzo: you could check which of $<foo> or $<bar> is defined
02:53 flussence m: use Test:<1.*>;
02:53 camelia rakudo-moar c27a00: OUTPUT«===SORRY!===␤Could not find Test:<1.*>:ver<True>:auth<True>:api<True> in:␤    /home/camelia/.perl6/2015.11-435-gc27a00c␤    /home/camelia/rakudo-m-inst-2/share/perl6/site␤    /home/camelia/rakudo-m-inst-2/share/perl6/vendor␤    /home/camelia/raku…»
02:53 marchelzo hoelzro: how do you check if something is defined?
02:53 flussence if I'm reading the docs correctly, that 1.* should end up in :ver, right?
02:53 hoelzro $<foo>.defined, or defined($<foo>)
02:53 hoelzro but if $<foo> should do the trick
02:54 AlexDaniel hahainternet: sometimes you don't want it though. e.g. there could be some config value that is typically singular, yet you can make it so that if you shove an array ref into it will magically work :)
02:54 hoelzro since all defined Matches are truthy
02:54 marchelzo hoelzro: ok, thanks
02:54 zengargoyle m: use Test:ver<1.*>;
02:54 camelia rakudo-moar c27a00: OUTPUT«===SORRY!===␤Could not find Test:ver<1.*>:auth<True>:api<True> in:␤    /home/camelia/.perl6/2015.11-435-gc27a00c␤    /home/camelia/rakudo-m-inst-2/share/perl6/site␤    /home/camelia/rakudo-m-inst-2/share/perl6/vendor␤    /home/camelia/rakudo-m-in…»
02:54 zengargoyle m: use Test:ver<*>;
02:54 camelia rakudo-moar c27a00: OUTPUT«===SORRY!===␤Could not find Test:ver<*>:auth<True>:api<True> in:␤    /home/camelia/.perl6/2015.11-435-gc27a00c␤    /home/camelia/rakudo-m-inst-2/share/perl6/site␤    /home/camelia/rakudo-m-inst-2/share/perl6/vendor␤    /home/camelia/rakudo-m-inst…»
02:54 zengargoyle m: use Test:ver<True>;
02:54 camelia rakudo-moar c27a00: OUTPUT«===SORRY!===␤Could not find Test:ver<True>:auth<True>:api<True> in:␤    /home/camelia/.perl6/2015.11-435-gc27a00c␤    /home/camelia/rakudo-m-inst-2/share/perl6/site␤    /home/camelia/rakudo-m-inst-2/share/perl6/vendor␤    /home/camelia/rakudo-m-i…»
02:54 zengargoyle heh
02:55 AlexDaniel hahainternet: otherwise you'd have to pass [$val] all the time… which is probably not too bad
02:55 hahainternet AlexDaniel: well in python, it's frustrating that if i pass a string to a function and then say 'for x in y', it will iterate the damn string
02:55 AlexDaniel hahainternet: hahaha
02:55 hahainternet wheras what i really want to say is "this positional is always an array, even if a string is passed, make it [$x]"
02:55 hahainternet it doesn't matter as much in p6 because of better design
02:55 hahainternet but the closest i know is slurpy args, it's just one thing on my list :D
02:56 marchelzo how can you do if-then-else as an expression? Like $cond ? $val : $val2 or something.
02:56 zengargoyle ?? !!
02:56 AlexDaniel marchelzo: $cond ?? $val !! $val2
02:56 hahainternet you can also use 'if' as the rhs can't you?
02:57 AlexDaniel hahainternet: can't use else though :)
02:57 hahainternet oh really? i thought there was a nice idiom for that
02:57 zengargoyle orelse?
02:57 hahainternet i don't have enough time in my day to write nice perl6 :(
02:58 zengargoyle m: say do if True { "bar" } else { "foo" };
02:58 camelia rakudo-moar c27a00: OUTPUT«bar␤»
02:58 zengargoyle m: say do if False { "bar" } else { "foo" };
02:58 camelia rakudo-moar c27a00: OUTPUT«foo␤»
02:58 hahainternet else works fine yeah
02:58 hahainternet i just checked locally lol
02:58 AlexDaniel huh
02:59 hahainternet expression -> statement or what have you
02:59 AlexDaniel why would you use it instead of ?? !! ?
02:59 lucs zengargoyle: Not the most elegant, but if you must... :)
02:59 hahainternet it's very explicit, and you might have a more complex conditional etc
03:00 lucs Yeah, the structure is useful.
03:00 hahainternet i've written quite a bit of golang recently
03:00 hahainternet and going back to python, dear god i miss a lot of the explicit nature
03:01 AlexDaniel hahainternet: well, Perl 6 is also not the most explicit language
03:01 hahainternet AlexDaniel: on the contrary, to me it appears to be as explicit as you like
03:01 hahainternet and a lot of the implicit assumptions are consistent and predictable
03:01 hahainternet i'm very happy with how p6 is turning out, i really look forward to finding work in it
03:02 AlexDaniel hahainternet: well, if you write a couple of things explicitly, then perhaps
03:02 noganex_ joined #perl6
03:02 AlexDaniel hahainternet: but most Perl 6 code that you will stumble upon is probably not like this
03:02 hahainternet AlexDaniel: too early to say imho
03:02 AlexDaniel though we don't know right now, yes
03:02 Herby_ joined #perl6
03:04 hahainternet the current thing i'm most intrigued with is the ability to produce a 'proper' ORM
03:04 AlexDaniel m: say "test" if True or say 42 and False
03:04 camelia rakudo-moar c27a00: OUTPUT«test␤»
03:04 AlexDaniel m: say "test" if False or say 42 and False
03:04 camelia rakudo-moar c27a00: OUTPUT«42␤»
03:04 marchelzo wow I am so impressed with perl6
03:04 hahainternet i've been using a number of different ORMs of late, and they're all kinda bleh
03:04 AlexDaniel look at this… I think that I wrote a bit too much of prolog…
03:05 hahainternet AlexDaniel: what's with 'and False'?
03:05 hoelzro marchelzo: glad to hear that =)
03:05 AlexDaniel hahainternet: it has to fail…
03:05 AlexDaniel hahainternet: otherwise you'd get both
03:05 AlexDaniel hahainternet: so it is an “else” emulator…
03:06 marchelzo hoelzro: does this look okay style-wise? I think maybe I should have used if ... {...} else {...} instead of the ?? !! syntax. http://sprunge.us/KgGd
03:06 hahainternet interesting, and 'xor' doesn't seem to work locally
03:06 marchelzo grammars are super nice though
03:06 hahainternet i don't quite see how that works :/
03:06 hahainternet marchelzo: fwiw i think your use of ?? and !! is pretty clear
03:06 AlexDaniel marchelzo: usually you'd use ?? !! when you want to assign
03:07 hoelzro looks alright to me; a few pointers:
03:07 AlexDaniel marchelzo: so I don't recommend doing it this way, although you might
03:07 hoelzro 1) you don't need to do $/.make; just make is fine
03:07 hoelzro 2) you can also use regexes with different long names instead of |, if you prefer
03:07 AlexDaniel marchelzo: e.g. $val = $cond ?? 42 !! 69; # here is where it totally makes sense
03:08 hoelzro so regex factor:times { <number> '*' <factor> } ; regex factor:number { <number> }
03:08 AlexDaniel marchelzo: everywhere else, well, not so much, unless you want to return something
03:08 hoelzro and then have method factor:times($/) and method factor:number($/) in your actions class
03:08 hoelzro that's more a personal taste thing for me, though
03:08 AlexDaniel marchelzo: Oh, you are returning something, aren't you?
03:09 cdg joined #perl6
03:09 marchelzo hoelzro: oh, that's exactly what I was wishing I could do
03:09 marchelzo incredible
03:10 marchelzo what exactly does the make method do? I don't fully understand its significance. I get what .made does, but not .make.
03:11 hahainternet AlexDaniel: oh i just looked at it again and i see the precedence, i'm just dumb :D
03:11 marchelzo AlexDaniel: yea
03:11 hoelzro marchelzo: make is kind of like return for action methods
03:11 hoelzro I don't know if I even fully get it =/
03:11 hoelzro it basically sets .made/.ast for $/
03:12 marchelzo I tried replacing $/.make: with just make: but I got an error.
03:12 marchelzo "Redeclaration of symbol make"
03:13 hoelzro huh, that's odd.
03:13 hoelzro oh, drop the :
03:13 hoelzro just "make $value"
03:14 marchelzo oh, ok
03:15 marchelzo so action methods are not regular methods?
03:15 hoelzro they are
03:15 hoelzro I just don't know why make is used and not return
03:17 marchelzo I see
03:17 marchelzo the fact that you can write make instead of $/.make:... is that a special thing just for grammars?
03:19 hoelzro I think that make just compiles to $/.make
03:19 * hoelzro looks
03:19 hoelzro yes
03:20 hoelzro it just desugars to $/.make
03:25 AlexDaniel m: sub infix:<relse>($cond, $b) is looser(&infix:<or>) { $cond ?? True !! ($b() and False) }; say “just look” if 42 < 69 relse { say “at this insanity” };
03:25 camelia rakudo-moar c27a00: OUTPUT«just look␤»
03:26 AlexDaniel m: sub infix:<relse>($cond, $b) is looser(&infix:<or>) { $cond ?? True !! ($b() and False) }; say “just look” if 42 > 69 relse { say “at this insanity” };
03:26 camelia rakudo-moar c27a00: OUTPUT«at this insanity␤»
03:26 hahainternet nice
03:27 AlexDaniel I wonder if there is any way to get rid of { }
03:27 AlexDaniel I don't think so, unless you modify the grammar more crazily
03:28 * hahainternet shrugs
03:28 AlexDaniel hahainternet: this reminds me of some Python feature…
03:29 AlexDaniel hahainternet: the one that does !! ??
03:29 AlexDaniel 「a if test else b」
03:29 hahainternet yeah, the 'ternary' type operator added in 2.6 or so?
03:29 AlexDaniel m: sub infix:<python>($cond, $b) is looser(&infix:<or>) { $cond ?? True !! ($b() and False) }; say “just look” if 42 > 69 python { say “at this insanity” };
03:29 camelia rakudo-moar c27a00: OUTPUT«at this insanity␤»
03:30 hahainternet i wonder how those quotes are done on my keyboard
03:31 AlexDaniel 「doSomething if cond else pass」 – RHS if in python?
03:31 hahainternet it's only for assignment iirc but it is 3:30am so i'm not exactly at 100%
03:32 AlexDaniel “SyntaxError: invalid syntax”
03:33 hahainternet var = "foo" if True else "bar"
03:33 hahainternet is the correct syntax
03:33 hahainternet i had to actually test it lol
03:33 hahainternet i'm going to get some tea :D
03:33 AlexDaniel hahainternet: sure, I know
03:34 AlexDaniel just hoped that I can trick it :)
03:34 AlexDaniel hm
03:35 AlexDaniel actually, you can use it!
03:35 AlexDaniel foo() if 2 < 10 else 1
03:35 AlexDaniel and it works just fine in void context
03:37 AlexDaniel so there you have it, rhs if in python… just if this 「else 1」 does not bother you too much
03:38 hahainternet AlexDaniel: so how do you type your quote characters?
03:38 hahainternet i should start customising my compose key / third level keys
03:38 AlexDaniel m: say 0_0
03:38 camelia rakudo-moar c27a00: OUTPUT«0␤»
03:39 AlexDaniel hahainternet: my keyboard layout https://files.progarm.org/2015-​12-09-053921_1054x363_scrot.png
03:40 AlexDaniel hahainternet: some of these arrows are typable arrows, others are normal arrows :)
03:40 MadcapJake my program for adventofcode day 6 takes like 2 hours to run :_(
03:40 AlexDaniel hahainternet: designed for japanese keyboard
03:41 AlexDaniel hahainternet: the ones with short spacebar and more thumb buttons
03:41 hahainternet AlexDaniel: interesting, how did you produce that png?
03:41 AlexDaniel hahainternet: keys with ♿ are sticky
03:41 AlexDaniel hahainternet: that's just a table in my private wiki. I took a screenshot
03:42 hahainternet ah ok
03:43 lucs In P5, arbitrary information can be passed to a module's import() function by doing something like  use Foo ('bar') .
03:44 lucs How is something similar done in P6 (import() function not being the same notwithstanding)?
03:45 lucs "Similar" meaning: pass some information to the module so it can set itself up as desired.
03:46 AlexDaniel hahainternet: this layout turned up being quite interesting. Well, if you are interested in keyboard layout :)
03:46 AlexDaniel hahainternet: for example, AltGr+x is delete. And guess what x does in vim!
03:46 hahainternet AlexDaniel: i'm trying to find out how to modify my layout in gnome 3 :)
03:46 hahainternet deletes the character under the cursor?
03:46 AlexDaniel yeah
03:46 Ben_Goldberg joined #perl6
03:47 AlexDaniel hahainternet: I think that you can go straight to creating your own layout
03:47 AlexDaniel hahainternet: which is done with xkb
03:48 AlexDaniel hahainternet:  /usr/share/X11/xkb/symbols/us is a file with the layout description
03:48 hahainternet AlexDaniel: not in gnome it seems, it uses some other source for them
03:49 AlexDaniel hahainternet: honestly, I don't buy it. I think that almost all GNU/Linux distros are using xkb
03:49 BenGoldberg_ joined #perl6
03:49 geekosaur sadly
03:49 geekosaur yes, they use xkb. but gnome apps use ibus which is informed by but not configured by xkb; they have additional configuration
03:50 AlexDaniel okay, but let's say you create your own xkb layout, is it going to be available?
03:50 hahainternet looks like https://git.gnome.org/browse/gtk+/​tree/gtk/gtkimcontextsimpleseqs.h is the source
03:50 geekosaur it will be available. but ibus will intercept some keys before xkb can process them
03:51 geekosaur and hat imcontext thing, yeh, which can intercept keys before either ibus or xkb can see them
03:52 zengargoyle ibus is just an input method.  xkb is the event generation.
03:52 orbus joined #perl6
03:52 zengargoyle you can easily remove ibus or replace it with uim or scim for instance.
03:52 geekosaur enjoy figuring out which layer is messing with you\
03:53 zengargoyle you just have to load appropriate modules for other ime's to work with gnome/gtk/qt
03:53 AlexDaniel well, the question is what is going to happen if you use something like “key <AD04> { [ p, P, End, End ] };”
03:53 * zengargoyle has a love/hate relationship with ibus...
03:54 hahainternet i just want to have fancy japanese quotes ;)
03:54 AlexDaniel is it going to get in your way somehow? e.g. swallow End button event or block your third level completely
03:54 zengargoyle yeah, that's why i keep ibus around, for anthy. :P
03:58 AlexDaniel anyway, I recommend everybody to experiment with their keyboard layouts. Fancy quotes are just part of it, what is way more useful is to have arrow keys on your home row.
03:58 hahainternet i just discovered Ω which is nice :D
03:58 hahainternet didn't know how to type that the other day
03:59 noganex joined #perl6
04:00 AlexDaniel what I've just discovered is that there's <dead_greek> key
04:00 zengargoyle but which key is it?
04:01 AlexDaniel zengargoyle: you have to assign it
04:01 zengargoyle that's the part i never figured out...
04:01 zengargoyle plus, laptop with few actually free keys
04:02 AlexDaniel AltGr gives you a whole set of keys which are free
04:02 AlexDaniel twice
04:02 zengargoyle no altgr key on my keyboard...
04:03 kaare_ joined #perl6
04:03 AlexDaniel reassign Caps Lock to AltGr then
04:03 zengargoyle caps is compose :)
04:03 AlexDaniel set compose to Caps + something
04:04 AlexDaniel like Caps+l or whatever
04:04 AlexDaniel unless you really want to have a dedicated key for compose :)
04:05 zengargoyle i think i'm just going to use that XCompose file that was mentioned in the advent.
04:05 AlexDaniel but in this case you can use right ctrl or whatever. What keyboard is that without AltGr?
04:05 * lucs & # ZZ
04:05 zengargoyle has tons of mappings.  greek are Multi * O (for omega)
04:06 AlexDaniel what is multi?
04:06 zengargoyle laptop keyboards are often short a few keys, no altgr, only one 'windows' key,
04:06 lucs left #perl6
04:06 zengargoyle Multi_key is just another name for Compose
04:07 AlexDaniel ah right
04:08 AlexDaniel zengargoyle: well, right, that's one way to do it. Personally I think that pressing Shift + some key is more comfortable than pressing Compose + some key
04:08 AlexDaniel though there are guys who make their shifts sticky
04:09 AlexDaniel and AltGr is just another kind of a shift :)
04:09 zengargoyle well compose as capslock is just to the left of A on my keyboard, quite easy to hit.  and it's sticky so it compose and then other characters, you don't have to hold it down or anything.
04:10 AlexDaniel I know, but that's kinda the difference
04:10 AlexDaniel by the way, if you don't like the number of keys on your laptop you can always try to find japanese keyboard
04:10 AlexDaniel I mean, for your laptop
04:12 zengargoyle yeah, in the end, i guess i find it easier to remember 'compose + these two sorta mnemonic characters' vs this magic key + this other certain key, or some combination of shift+alt+key :)
04:12 AlexDaniel compose is great for entering rare characters. For common stuff, um, not so much!
04:13 AlexDaniel e.g. you don't need mnemonics for common stuff :)
04:14 zengargoyle but it's the uncommon stuff that's the most fun. :) 💡
04:14 marchelzo how do you do .pick with replacement?
04:14 zengargoyle what's pick with replacement?
04:14 AlexDaniel “”‘’「」…– «»〈〉
04:14 AlexDaniel ^ I'm not sure that these things are uncommon
04:15 marchelzo random selection with replacement
04:15 AlexDaniel marchelzo: use splice
04:15 zengargoyle i don't get the replacement part...
04:15 TimToady that's called "roll", as in dice
04:15 zengargoyle do you mean roll?
04:15 zengargoyle heh
04:16 marchelzo yes. roll. outside of programming this is called random selection with replacement.
04:16 AlexDaniel aaaaaah
04:16 zengargoyle m: say (1..6).roll xx 12
04:16 camelia rakudo-moar c27a00: OUTPUT«(4 2 4 6 6 4 5 2 6 4 2 5)␤»
04:16 TimToady m: say ('⚀' .. '⚅').roll(5)
04:16 camelia rakudo-moar c27a00: OUTPUT«(⚁ ⚂ ⚅ ⚀ ⚀)␤»
04:16 marchelzo like if you  were randomly pulling 5 things out of a bag, .roll would be like replacing each think before pulling out the next one.
04:16 marchelzo each thing*
04:16 TimToady hmm
04:16 AlexDaniel m: say ⚀
04:16 camelia rakudo-moar c27a00: OUTPUT«5===SORRY!5===␤Argument to "say" seems to be malformed␤at /tmp/gb9C0Qp6jX:1␤------> 3say7⏏5 ⚀␤Bogus postfix␤at /tmp/gb9C0Qp6jX:1␤------> 3say 7⏏5⚀␤    expecting any of:␤        infix␤        infix stopper␤        pos…»
04:16 AlexDaniel awww
04:17 TimToady m: say ⚅
04:17 camelia rakudo-moar c27a00: OUTPUT«5===SORRY!5===␤Argument to "say" seems to be malformed␤at /tmp/engd6PCjA_:1␤------> 3say7⏏5 ⚅␤Bogus postfix␤at /tmp/engd6PCjA_:1␤------> 3say 7⏏5⚅␤    expecting any of:␤        infix␤        infix stopper␤        pos…»
04:17 TimToady aww
04:17 zengargoyle cards aren't numeric either. :(
04:18 AlexDaniel m: say '⚅' - '⚀' # I think that you can do this…
04:18 camelia rakudo-moar c27a00: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5⚅' (indicated by ⏏)␤  in block <unit> at /tmp/0Y2RJbNn8n:1␤␤Actually thrown at:␤  in block <unit> at /tmp/0Y2RJbNn8n:1␤␤»
04:18 AlexDaniel noooo
04:18 AlexDaniel ah
04:18 AlexDaniel m: say '⚅'.org - '⚀'.ord # I think that you can do this…
04:18 camelia rakudo-moar c27a00: OUTPUT«Method 'org' not found for invocant of class 'Str'␤  in block <unit> at /tmp/isVC8tQzEX:1␤␤»
04:18 AlexDaniel m: say '⚅'.ord - '⚀'.ord # I think that you can do this…
04:18 camelia rakudo-moar c27a00: OUTPUT«5␤»
04:22 AlexDaniel m: my \term:<⚅> = 6; say ⚅;
04:22 camelia rakudo-moar c27a00: OUTPUT«6␤»
04:23 dalek ecosystem: 97800c8 | (Anthony Parsons)++ | META.list:
04:23 dalek ecosystem: Add Minecraft-Tools to ecosystem
04:23 dalek ecosystem:
04:23 dalek ecosystem: https://github.com/flussence/Minecraft-Tools
04:23 dalek ecosystem:
04:23 dalek ecosystem: Just for fun, this contains two modules whose IDs differ only in version number.
04:23 dalek ecosystem: Let's see how that goes...
04:23 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/97800c8347
04:25 aoniao joined #perl6
04:25 AlexDaniel 20s startup for my thing using bailador… uh
04:25 flussence that might just be precomp
04:26 flussence should be faster the second time
04:26 AlexDaniel slow every time
04:26 flussence oh... :(
04:27 * zengargoyle has been pleasantly surprised how much second time is faster.  well usually...
04:27 AlexDaniel actually, I haven't noticed any speedup when precomp arrived…
04:27 AlexDaniel any way to force no precomp?
04:27 AlexDaniel so that I can see if it is much slower
04:33 zengargoyle 0m12.424s vs 0m2.460s for testing Algorithm::Trie::libdatrie
04:35 zengargoyle that's 4 test files so 4x that it doesn't have to compile from scratch...
04:38 dj_goku yay just connected to connection using IO::Socket::Async to a real system (gearmand)!
04:39 dj_goku blah that didn't come out right. I made my first real connection to gearmand using IO::Socket::Async!
04:47 skids .tell masak https://gist.github.com/skids/97378d26a684591f1b89 # I only felt like bikeshedding tonight
04:47 yoleaux skids: I'll pass your message to masak.
04:48 * zengargoyle wonders if NativeCall needs to be a depends in META
05:00 bpmedley joined #perl6
05:00 secwang joined #perl6
05:05 hoelzro zengargoyle: I don't think so
05:05 hoelzro it's bundled with Rakudo, right?
05:32 xinming joined #perl6
05:47 lustlife` joined #perl6
05:50 secwang joined #perl6
05:51 xinming joined #perl6
05:53 Sqirrel joined #perl6
05:56 xinming joined #perl6
06:02 zengargoyle joined #perl6
06:03 adu joined #perl6
06:04 adu \o
06:08 xinming joined #perl6
06:26 xinming joined #perl6
06:30 xinming joined #perl6
06:32 Actualeyes joined #perl6
06:37 MadcapJake how would you do bitwise negation that *doesn't* give a negative result?
06:38 MadcapJake wait, nevermind, problem is elsewhere :P
06:42 MadcapJake no that is it, how do you do one's complement?
06:42 * MadcapJake loves bitwise math :P
06:44 MadcapJake adventofcode.com/day/7 has bitwise NOT of 123 equals 65412 ?? that doesn't make sense to me
06:46 MadcapJake oh i think i need to have an unsigned int
06:46 xinming joined #perl6
06:48 Tux__ joined #perl6
06:54 glaukommatos joined #perl6
06:54 kjs_ joined #perl6
07:01 CIAvash joined #perl6
07:10 ambs joined #perl6
07:17 rurban joined #perl6
07:38 [Tux] test             50000    22.975    22.864
07:38 [Tux] test-t           50000    16.793    16.683
07:38 [Tux] csv-parser       50000    25.370    25.259
07:40 eyck joined #perl6
07:45 grondilu adventofcode?  I failed at day 3, no idea why.  Seemed easy enough.
07:48 sno joined #perl6
07:51 _nadim Good morning everyone.
07:53 grondilu say 1 + unique [\+] map { when '^' {+i}; when 'v' {-i}; when '<' {-1}; when '>' {+1} }, slurp.comb;  # that was a solution I thought was smart.
07:54 RabidGravy joined #perl6
07:56 grondilu oh wait that does not work with the examples
07:57 grondilu m: say unique 0, 0+0i
07:57 camelia rakudo-moar c27a00: OUTPUT«(0 0+0i)␤»
07:57 glaukommatos joined #perl6
07:57 grondilu yeah I remember now
07:58 moritz grondilu: map *.narrow, ...
07:58 grondilu that's how I found the (0+0i).narrow bug
07:58 grondilu m: say (0+0i).narrow
07:58 camelia rakudo-moar c27a00: OUTPUT«Attempt to divide by zero using /␤  in block <unit> at /tmp/vlOiRxr9BK:1␤␤Actually thrown at:␤  in block <unit> at /tmp/vlOiRxr9BK:1␤␤»
07:58 moritz eeks
07:58 grondilu I got annowed and stopped searching.
07:59 moritz grondilu: looks like an easy fix
07:59 grondilu I did submit a PR though:  https://github.com/rakudo/rakudo/pull/620
08:00 dalek rakudo/nom: b2ae6dc | grondilu++ | src/core/Complex.pm:
08:00 dalek rakudo/nom: handling nul real part in narrow method
08:00 dalek rakudo/nom:
08:00 dalek rakudo/nom: you don't want to divide by $!re unless you've dealt with the case $!re == 0e0
08:00 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b2ae6dc4e0
08:01 dalek rakudo/nom: 49d8728 | grondilu++ | src/core/Complex.pm:
08:01 dalek rakudo/nom: deal with nul case
08:01 dalek rakudo/nom:
08:01 dalek rakudo/nom: if self is actually null, the nul integer should be returned.
08:01 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/49d8728f19
08:01 dalek rakudo/nom: 40fe92d | moritz++ | src/core/Complex.pm:
08:01 dalek rakudo/nom: Merge pull request #620 from grondilu/patch-1
08:01 dalek rakudo/nom:
08:01 dalek rakudo/nom: handling nul real part in narrow method
08:01 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/40fe92d65d
08:02 grondilu thanks
08:02 grondilu still won't solve day 3 for me I'm afraid
08:02 grondilu say +unique [\+] 0i, |map { when '^' {+i}; when 'v' {-i}; when '<' {-1}; when '>' {+1} }, slurp.comb;
08:03 moritz grondilu: still needs a .narrow somewhere
08:03 _nadim How can one access a non exported sub?
08:03 grondilu no, as I put 0i instead of 0
08:03 moritz grondilu: an
08:03 moritz _nadim: if it's an "our" sub, through the package name
08:03 moritz _nadim: ThePackage::thesub()
08:03 moritz _nadim: if it's neither "our" nor exported: not at all
08:04 BooK grondilu: advent of code looks funny
08:04 BooK are people publishing their answers?
08:04 grondilu surely, somewhere
08:04 grondilu on reddit for instance
08:05 BooK I'd have thought github
08:05 grondilu probably as well
08:05 _nadim thnks, while I am at it, can I alias then with something like MY::<&the_alias> = ThePackage::<&thesib>
08:05 BooK adventofgolf would be an interesting twist
08:06 moritz _nadim: my &the_alias = &ThePackage::sub # iirc
08:07 Ch0c0late joined #perl6
08:07 _nadim moritz: thank you
08:07 dalek roast: 66d8f6c | moritz++ | S32-num/narrow.t:
08:07 dalek roast: Fix, unfudge and expand RT #126828 tests
08:07 dalek roast: review: https://github.com/perl6/roast/commit/66d8f6c6c9
08:07 mattp__ joined #perl6
08:08 grondilu m: say +unique [\+] 0i, |{ '^' => i, v => -i, '<' => -1, '>' => 1 }{.comb} for qw{ < ^>v< ^v^v^v^v^v};
08:08 camelia rakudo-moar c27a00: OUTPUT«2␤4␤2␤»
08:08 _nadim I did try to find a documentaion about exporting and such but was not lucky enough to find the right one, any links?
08:09 grondilu should be S12, shoudn't it?
08:09 moritz _nadim: there's http://doc.perl6.org/routine/is%20export though it's not very much
08:09 grondilu sorry meant S11
08:10 _nadim moritz: that one I found :)
08:10 moritz _nadim: then what are you now looking for
08:11 MadcapJake grondilu: unfortunately i wrote over my part 1, but the only change was alternating between a robot and santa https://www.reddit.com/r/adventofcode/c​omments/3v8roh/day_3_solutions/cxnwg43
08:12 hahainternet here's a weird one, the doc site for me when i 'first' load it has code with screwed up kerning
08:12 hahainternet an f5 fixes it
08:12 darutoko joined #perl6
08:15 MadcapJake m: sub prefix:<u+^>(Int $i) {:2($i.base(2).split('').map({$_ ~~ '0' ?? '1' !! '0'})).base(10).Int}; say u+^123; #unsigned bitwise negation
08:15 camelia rakudo-moar 40fe92: OUTPUT«This call only converts base-2 strings to numbers; value ("0", "0", "0", "0", "0", "1", "0", "0", "0").Seq is of type Seq, so cannot be converted!␤(If you really wanted to convert ("0", "0", "0", "0", "0", "1", "0", "0", "0").Seq to a base-2 string, use …»
08:23 MadcapJake hmm base returns a string so why doesn't that split work?
08:23 _nadim moritz: a single place whisth all the details, but I understand that I may have to put it together myself ;)
08:24 MadcapJake m: sub prefix:<u+^>(Int $i) {my $b = $i.base(2); my @c = $b.split("").map: {$_ ~~ "0" ?? "1" !! "0"}; :2(@c.join).base(10).Int}; say u+^123;
08:24 camelia rakudo-moar 40fe92: OUTPUT«8␤»
08:24 MadcapJake I think that's the wrong math :( anyone know how I could do unsigned bitwise negation?
08:25 moritz _nadim: ah, maybe http://doc.perl6.org/language/module​s#Exporting_and_Selective_Importing also interests you
08:28 xinming joined #perl6
08:29 _nadim indeed :)
08:34 xinming joined #perl6
08:36 Ven joined #perl6
08:38 abraxxa joined #perl6
08:38 pdcawley Any chance the "we are not most men..." bit of p6advent day 6 be changed to 'we are not most people'? Doesn't affect the sense; does affect the message.
08:38 pdcawley Sorry, day 8.
08:39 moritz pdcawley: afaict it's an obscure reference to some movie or another
08:39 xinming joined #perl6
08:39 DrForr And I didn't write it, I must be slipping.
08:40 pdcawley moritz: So?
08:40 dalek doc: 9020737 | moritz++ | doc/Type/ (2 files):
08:40 dalek doc: Link to more detailed documentation on "is export" and importing
08:40 dalek doc: review: https://github.com/perl6/doc/commit/90207371fb
08:40 moritz pdcawley: so the reference will probably be not recognizable afterwards. Just sayin'
08:40 moritz in the end, I'll leave it to tadzik, who wrote it.
08:42 koo8 joined #perl6
08:44 leont joined #perl6
08:45 pdcawley moritz: I'm not sure it's that recognizable now; Google search for "we are not most men" is remarkably short list of results.
08:49 g4 joined #perl6
08:49 g4 joined #perl6
08:51 CIAvash joined #perl6
08:51 _nadim Who is the author/maintainer of Test? diag does not ouput anything before a test is done.
08:51 moritz _nadim: Test is maintained alongside rakudo
08:52 moritz _nadim: and are you sure that's not a feature of the test harness?
08:52 _nadim I hope it is not :)
08:53 _nadim which takes me to the next question? bugs are reported in github, right?
08:54 moritz _nadim: rakudo bugs are reported via email to rakudobug@perl.org (which makes them show up at rt.perl.org)
08:54 moritz m: use Test; diag "foo"; sleep 100; # should run into a timeout
08:55 camelia rakudo-moar 40fe92: OUTPUT«(timeout)# foo␤»
08:55 moritz _nadim: in my local tests, the "# foo" shows up pretty much immediately, not at test exit
08:55 moritz _nadim: so I suspect it's the harness after all
08:56 _nadim it may very well be, I'll double check just to make sure I did not miss it then I'll report a bug and wait for someone to tell me I am completely wrong ;)
08:57 llfourn_ joined #perl6
08:57 rurban _nadim: github is good for nqp and moarvm, not rakudo
08:58 glaukommatos joined #perl6
08:59 _nadim ok
08:59 RabidGravy _nadim, it outputs to stderr immediately it is called (I just looked at the code)
09:01 nine .tell AlexDaniel no precompilation; in your module and it will compile your module every time. Its dependencies however will still be precompiled.
09:01 yoleaux nine: I'll pass your message to AlexDaniel.
09:04 xinming joined #perl6
09:04 Timbus joined #perl6
09:06 n0tjack joined #perl6
09:08 _nadim RabidGravy: I just reported 2 errors. the code says something, my eyes something else, it's probably my eyes
09:12 leont joined #perl6
09:18 masak good antenoon, #perl6
09:18 yoleaux 04:47Z <skids> masak: https://gist.github.com/skids/97378d26a684591f1b89 # I only felt like bikeshedding tonight
09:19 matt_ joined #perl6
09:19 matt_ joined #perl6
09:19 matt_ joined #perl6
09:20 _nadim masak: good morning
09:21 masak :)
09:26 dakkar joined #perl6
09:27 RabidGravy good foo all
09:30 moritz RabidGravy: and a happy bar to you
09:30 BooK first time in my life I'm using named captures in Perl 5
09:30 BooK guess I'm gearing up for perl 6
09:31 masak \o/
09:31 El_Che good morning #perl6
09:31 masak BooK: early signs of an onset of Perl 6 are subtle, such as sudden usage of named captures in Perl 5
09:31 RabidGravy :)
09:31 BooK not writing regexp, though, generating them rather
09:31 masak as you do
09:31 El_Che Channels got me hooked
09:31 BooK I want to write happy code, so I let it write part of itself
09:32 El_Che Book: That's how Skynet happened
09:32 BooK El_Che: you'll never guess the name of the (work) project
09:32 moritz "Perl 6: paving the road for Skynet"
09:32 masak BooK: there's a scene in Girl Genius where they make a point of Agatha being so much of a spark that even the little machines she invents have the spark
09:32 BooK Skijnet # it's a Dutch company
09:33 masak BooK: O.O
09:33 moritz wouldn't that be a good title for an advent post :-)
09:33 masak BooK: I'm genuinely terrified now.
09:33 El_Che Book: SchijtNet for the detractors?
09:33 RabidGravy If I wanted to get the "package" of the call site of a method, is there any way to get that from callframe/backtrace/something else ?
09:34 moritz RabidGravy: once you have the code object, and it's a Routine, you can call .package on it
09:34 moritz RabidGravy: and I think that Backtrace exposes the code object
09:34 moritz maybe callframe too, dunno
09:35 RabidGravy ah, okay, will test in a bit, cheers. First have to go to the quack to have my non-ideal lifestyle condemned in order to get a repeat prescription
09:35 koo8 joined #perl6
09:36 domidumont joined #perl6
09:37 BooK masak: we're building a system that will first read network configs and make reports for humans to fix them, according to our world view, and eventually, as we get more confident with the system, focus on the "model" and let it write the configs and manage the devices
09:37 BooK so yes, the name was obvious
09:38 CQ joined #perl6
09:41 BooK my job will be done when the network people ask for a "JFDI" button :-)
09:42 BooK I'll commit that change with -m"Judgement Day"
09:43 nine callframe exposes the code object
09:43 El_Che semi random paste from the code working now: masak: we're building a system that will first read network configs and make reports for humans to fix them, according to our world view, and eventually, as we get more confident with the system, focus on the "model" and
09:43 El_Che let it write the configs and manage the devices
09:43 El_Che 10:37 < BooK> so yes, the name was obvious
09:43 El_Che damn
09:43 nine callframe(1).code
09:43 El_Che I meant this: has Str $.separator = "(ノಠ益ಠ)ノ彡┻━┻"; # Yes we can utf-8!
09:44 BooK wrong paste buffer is as embarrasing as wrong window
09:44 El_Che is the modules.perl6.org repo also meant for applications?
09:44 BooK shouldn't that be applications.perl6.org ?
09:45 DrForr I've put some examples/ directories up, but not as part of any official installs.
09:45 El_Che BooK: you don't know my pain. I am a linux user working on a linux vm in a windows machine (@work)
09:47 masak BooK: "when armageddon finally arrived, it arrived because people were fully aware and decided to pick a funny name" :P
09:47 masak m: class A { has @.x; method m($op) { my class B { method y { $op } }; @.x.push(B.new); say .y for @.x; } }; my $s = A.new; $s.m(1); say "--"; $s.m(2)
09:47 camelia rakudo-moar 40fe92: OUTPUT«1␤--␤2␤2␤»
09:47 masak I have a question about the above eval.
09:47 masak I expected OUTPUT«1␤--␤1␤2␤» -- are my expectations out of whack?
09:48 masak and, assuming they are, how can I do something similar but which has that output?
09:49 jnthn masak: classes are not closures
09:50 jnthn So yes, you should has $.op in B and do .new(:$op) or so
09:50 masak ah, yes
09:50 arnsholt So that code would explode horribly if the B.y method was called in an outside scope?
09:50 jnthn Or, to spend lots more memory doing the same thing, you can go with a parametric role :P
09:50 masak jnthn++
09:50 jnthn masak: Given it's marked "my", it can't easily be ;)
09:50 jnthn uh, arnsholt ^^
09:51 arnsholt You could return an object, though, couldn't you?
09:51 jnthn Sure, and then you create the usual "package scoped inside lexically scoped" situation, where you'll probably see Any or so
09:52 masak *nod*
09:52 arnsholt Right, right
09:52 masak I'm actually completely fine with that answer
09:52 jnthn OK, I probably should not time at the airport to "not one tiny thing can possibly go wrong" levels :)
09:52 jnthn *cut time
09:52 jnthn Even if I am in Norway :)
09:53 jnthn bbl &
09:53 arnsholt Usually a good idea =)
09:53 arnsholt Peaceful travels, jnthn
09:53 mrf Are any people here attending LPW. Or more importantly pre LPW social on Friday?
09:57 vytas mrf, I'll be at LPW and possibly in post LPW social but not pre
09:58 mrf vytas: I should likely be at the post social as well :D
10:01 glaukommatos joined #perl6
10:06 DrForr I'll be there, but not for the social :(
10:10 mrf DrForr: No Beer!!!
10:11 DrForr With my leg it's probably not a good idea for me to go stumbling around :)
10:13 mrf thats true
10:13 DrForr It's pretty decent these last few days (I'm off my cane, though I still bring it with me) but it still needs to be strengthened.
10:22 mrf At least its getting better
10:25 tadzik pdcawley: yeah, I think I'll go and change that. For the record, I did check if I'm correct in assuming that "men" is for gender-neutral and "man" is for male, but I must've been wrong either way
10:26 masak nope, "men" is just the plural of "man".
10:26 moritz "men" is just the plural of "man", and both can either mean "human" or "male human", depending on context
10:26 masak there's a slow, gradual cultural shift from "of course man/men includes women" to "of course it doesn't"
10:26 masak and at any given time, you will have people arguing either side
10:28 Ven o/ #perl6
10:28 BooK words are hard, let's hug!
10:30 vytas there is always singular they :)
10:37 nine or just "people"
10:39 BooK or simply *
10:46 espadrine joined #perl6
10:52 lizmat $ perl6 --ll-exception t/spec/S03-metaops/reduce.rakudo.moar
10:52 lizmat Cannot find method 'orig'
10:52 lizmat at gen/moar/stage2/QAST.nqp:5461  (/Users/liz/Github/rakudo.moar/install/share/n​qp/lib/QAST.moarvm:compile_all_the_stmts:182)
10:53 lizmat this new spectest breakage goes deep into the rabbit hole
10:56 pdcawley tadzik: Thanks.
10:59 lucs joined #perl6
11:00 nine lizmat: looks scary
11:01 sergot for vscode users: https://marketplace.visualstudio​.com/items/sergot.Perl6Snippets
11:02 glaukommatos joined #perl6
11:02 masak yep, 007 is completely busted on Rakudo HEAD
11:03 lizmat m: [\orelse] Any, 0, 1   # scare breakage golfed
11:03 camelia rakudo-moar 40fe92: OUTPUT«===SORRY!===␤Cannot find method 'orig'␤»
11:03 xinming_ joined #perl6
11:04 masak lizmat: I wonder if we're looking at the same error or not.
11:04 masak I'm seeing "Cannot reference undeclared local 'flattening__1'"
11:05 * masak bisects
11:06 masak I'd say whatever this is, it should be reverted on sight
11:06 brrt joined #perl6
11:06 RabidGravy sergot, that reminds me I wanted to make a Perl 6 template thingy for DevAssistant
11:06 lizmat masak: pretty sure it's TimToady's last commit
11:06 lizmat verifying now
11:07 masak it's interesting with Travis CI nowadays, I'm much more inclined to stay on top of Rakudo changes :)
11:08 lizmat the commit before is ok
11:09 lizmat now double checking TimToady's
11:09 lizmat aka c27a00ca36b8baaa6d6
11:10 znpy joined #perl6
11:10 lizmat yup, that's the first one that fails
11:11 Zoffix joined #perl6
11:16 n0tjack joined #perl6
11:19 masak I'm not quite there yet, but the set still contains that possibility
11:20 rurban joined #perl6
11:21 lucs In Perl 5, arbitrary data could be passed to a module's import() function by doing "use Foo ('some', 'data')".
11:21 lucs How is something similar (passing arbitrary data to a module when 'use'ing it) done in Perl 6?
11:21 El_Che doe close channels get garbage collected even when the class they where created and consumes is still in scope?
11:22 nine lucs: we have EXPORT functions now
11:22 lizmat El_Che: as soon as objects cannot be reached anymore, they're up for GC at some point
11:23 lucs nine: grepping, thanks.
11:23 lizmat El_Che: not really an answer, but that's the essence: how it applies to your specific situation, I don't know
11:24 kid51 joined #perl6
11:25 El_Che lizmat: thx. If I open the channels in a method and pass the around, they won't be part of the instance state and hence I hope them to be GC'ed once the method exits (that's the rationale)
11:26 masak ok, c27a00ca36b8baaa6d668c025d76aa3c6b8bd711 confirmed as Bad.
11:26 masak people have about 2 minutes to raise objections before I push a revert.
11:27 Zoffix Think of the children!
11:27 CQ it's xmas season, don't refuse gifts? :)
11:28 lizmat El_Che: fwiw, if you consume the channels fast enough, I don't think there's much memory footprint to begin with
11:28 masak just confirming that the revert makes things work in 007 again.
11:29 lizmat masakL if it had been only that spectest, I would have said: no
11:29 lizmat but if it blocks you working with 007, I'm ++ on it: a commit should never block development
11:30 El_Che lizmat: I am consuming LDAP db's of 500+MB each. One channel read it as records, a second channel sort the record and change small stuff, a third write it to a new file. From the look of it, this 4gv-b VM will kill moar very soon
11:30 masak lizmat: yeah, something is clearly wrong.
11:30 masak lizmat: if I were motivated, I guess I could golf exactly what breaks.
11:31 masak lizmat: right now I only know that the 007 test suite hangs, with a Rakudo-internal error message.
11:31 masak indeed, the revert causes the test suite to work again.
11:31 masak pushing.
11:31 lizmat El_Che: well, sorting implies keeping it in memory, I guess
11:31 El_Che lizmat: only one record at the time, though
11:32 lizmat ah, so internally, sorting inside the record you mean?
11:32 El_Che yes
11:32 dalek rakudo/nom: c5f81ae | (Carl Masak)++ | src/ (5 files):
11:32 dalek rakudo/nom: Revert "get reductions thunking for left/list assoc"
11:32 dalek rakudo/nom:
11:32 dalek rakudo/nom: This reverts commit c27a00ca36b8baaa6d668c025d76aa3c6b8bd711,
11:32 dalek rakudo/nom: which breaks, among other things, the 007 test suite with the
11:32 dalek rakudo/nom: following message:
11:32 dalek rakudo/nom:
11:32 dalek rakudo/nom:     $ prove -r --exec=perl6 t/
11:32 dalek rakudo/nom:     t/features/begin.t .......................... ===SORRY!===
11:32 dalek rakudo/nom:     Cannot reference undeclared local 'flattening__1'
11:32 dalek rakudo/nom:
11:32 dalek rakudo/nom: (And then it hangs.)
11:32 dalek rakudo/nom:
11:32 dalek rakudo/nom: It also breaks other things, like the spectest suite, and this:
11:32 dalek rakudo/nom:
11:32 dalek rakudo/nom:     <lizmat> m: [\orelse] Any, 0, 1   # scare breakage golfed
11:32 dalek rakudo/nom:     <camelia> rakudo-moar 40fe92: OUTPUT«===SORRY!===␤Cannot find method 'orig'␤»
11:32 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c5f81ae608
11:32 El_Che the records are orderen, their attributes aren't, so I need to sort those before I can compare the data consistency
11:33 masak TimToady: if you're interested, I can golf the break in 007.
11:35 sergot RabidGravy++
11:41 n0tjack joined #perl6
11:48 brrt completely offtopic, but this in a way the funniest thing i've read all week
11:48 brrt https://www.linkedin.com/pulse/mongodb-​32-now-powered-postgresql-john-de-goes
11:49 brrt tl;dr mongodb 'supports analytics' by letting itself be wrapped by postgresql, which is bad because....?
11:50 brrt (because the author builds a competing database, that is why)
11:51 ilmari s/database/analytics tool/
11:51 brrt right
11:59 snarkyboojum joined #perl6
11:59 pdcawley_ joined #perl6
12:03 glaukommatos joined #perl6
12:04 lucs EXPORT question: https://gist.github.com/lucs/d2fba5bec39f8f677f4f
12:04 rindolf joined #perl6
12:09 RabidGravy lucs, afaik the EXPORT sub must be outside the package
12:10 lucs Not sure where I'd put it then :/
12:11 lucs Before the "unit module Foo;" line?
12:11 cygx joined #perl6
12:12 RabidGravy module Foo { .... }; sub EXPORT() { }
12:12 cygx lucs: if you want to use an explicit EXPORT sub, the easiest thing to do is not using a unit declaration
12:13 RabidGravy there has to be an advantage to using the block form
12:13 RabidGravy ;-)
12:14 lucs RabidGravy: Having it outside like that, I'm not sure how "use Foo..." will know how to call the right sub EXPORT, but, trying ...
12:15 RabidGravy it's per "compilation unit"
12:16 lucs I'll need to understand those more clearly :)
12:17 lucs (now, not sure where to scope my $val)
12:19 cygx lucs: workaround:
12:19 cygx my &EXPORT; unit module Foo; &EXPORT = sub { say 42; {} };
12:20 RabidGravy lucs, it is not all quite implemented as per http://design.perl6.org/S11.html
12:21 lucs cygx: The point is missing: pass the 42 with the 'use':  use Foo 42;
12:21 lucs RabidGravy: Yes, I've been reading that, but I'm not understanding as well as I'd like.
12:22 cygx my &EXPORT; unit module Foo; &EXPORT = sub ($i) { say $i; {} };
12:22 cygx or did you mean something else?
12:22 lucs cygx: I meant that last thing, thanks.
12:22 lucs (I think, trying...)
12:25 _nadim is it possible, while running tests, to make a module not available? IE, I want to test for the non existance of Terminal::ANSIColors
12:26 Ven joined #perl6
12:28 RabidGravy ouch https://travis-ci.org/sergot/h​ttp-useragent/builds/95370459
12:30 RabidGravy I was just about to say that Travis seemed to be working again
12:31 ilmari _nadim: Test::Without::Module, Devel::Hide
12:33 lizmat ilmari: that appears to be a perl 5 solution?
12:34 ilmari lizmat: sorry, I didn't notice which channel this was
12:34 * ilmari shoud go for lunch
12:34 lizmat _nadim: I'm afraid there is no solution for that yet
12:37 _nadim thank you for the information :)
12:41 rurban joined #perl6
12:42 lucs cygx: What does the {} represent in  &EXPORT = sub ($i) { say $i; {} };  ?
12:42 RabidGravy the export function has to return a Map
12:43 RabidGravy see what happens if you don't put it there
12:43 lucs I saw that in an error message, but nowhere in the docs :/
12:43 lucs (Well, not in S11)
12:44 lucs And what should that map hold?
12:44 sufrostico joined #perl6
12:45 lucs cygx's example works, but I can't manage to make the Foo::val function visible in foo.pl6.
12:47 koo8 joined #perl6
12:48 RabidGravy { '&val' => sub () { "<$val>" }}
12:48 RabidGravy would be what you want
12:49 lucs Aha, I tried many variations around that, but not that one, trying ...
12:49 RabidGravy it's a map of the names of the things to be exported to the thing
12:52 lucs Hmm... I keep getting  Could not find symbol '&val'
12:53 RabidGravy single quotes on the LHS
12:53 lucs Yep.
12:53 vytas what's the easiest way to wait for new input and eval in the same scope ?
12:55 lucs RabidGravy: Oh, I was invoking with Foo::val (fails), but with just  val , it works.
12:56 RabidGravy yeah, that's what export does
12:56 lizmat vytas: loop { EVAL prompt }
12:57 vytas lizmat, sorry what i meant was that declarations and scope would stay between evals
13:01 lizmat vytas: that's tricky, perhaps something like this will do?
13:01 lizmat my $program = ''; loop { EVAL $string ~= prompt }
13:03 lizmat my $program = ''; loop { EVAL $program ~= prompt('') }   # better
13:04 Skarsnik joined #perl6
13:04 vytas lizmat, wow ++
13:05 lucs RabidGravy: Do you just happen to know all this stuff, and/or am I just reading the wrong documentation?
13:06 RabidGravy I think I just "know" it, probably just long term osmosis from the channel
13:06 lucs (or, reading the documentation wrong)
13:06 lucs RabidGravy: Okay, thanks :)
13:07 dalek doc: 480db57 | (Claudio Ramirez)++ | doc/Language/5to6-perlvar.pod:
13:07 dalek doc: update doc for nl-in and nl-out
13:07 dalek doc: review: https://github.com/perl6/doc/commit/480db573cb
13:07 dalek doc: eef2490 | (Claudio Ramirez)++ | doc/ (3 files):
13:07 dalek doc: update doc for nl-in and nl-out
13:07 dalek doc: review: https://github.com/perl6/doc/commit/eef24903b6
13:07 dalek doc: 4498203 | (Claudio Ramirez)++ | doc/ (4 files):
13:07 dalek doc: Merge branch 'master' of github.com:perl6/doc
13:07 dalek doc: review: https://github.com/perl6/doc/commit/4498203103
13:07 dalek doc: f99e92b | RabidGravy++ | doc/ (3 files):
13:07 dalek doc: Merge pull request #231 from nxadm/master
13:07 dalek doc:
13:07 dalek doc: Update documentation for .nl => .nl-in and .nl-out
13:07 dalek doc: review: https://github.com/perl6/doc/commit/f99e92bece
13:08 El_Che according to the 5to6-perlvar is the autoflush var ($|) not implemented in perl6. Is there an other way to force the flush on each write?
13:08 brrt my suspicion is that there is a method for that....
13:08 El_Che I am looking ;)
13:09 vytas of course evaluating previous commands are annoying and troublesome
13:09 Skarsnik El_Che, .flush ?
13:09 Skarsnik $*OUT.flush ?
13:10 El_Che Skarsnik: no flush in the doc. I'll try it quickly
13:11 Skarsnik Wait I was thinking of some Qt code I was looking at. Yes IO::Handle seen to not have something to flush
13:12 El_Che it works though :)
13:13 Skarsnik m: say IO::Handle.^can("flush");
13:13 camelia rakudo-moar c5f81a: OUTPUT«()␤»
13:13 Skarsnik m: say IO.^can("flush");
13:13 camelia rakudo-moar c5f81a: OUTPUT«Too many positionals passed; expected 2 arguments but got 3␤  in block <unit> at /tmp/gT0dC3hCG0:1␤␤»
13:14 El_Che I'll add it to the doc, if no one opposes (being something to be removed or the like)
13:14 Skarsnik m: say IO::Handle.^can("flush").elems;
13:14 camelia rakudo-moar c5f81a: OUTPUT«0␤»
13:14 El_Che it's certainly there and not marked as private
13:15 El_Che https://github.com/rakudo/rakudo/blob/d3e89a528de9​d4cacf9c48a4f1f3a0c23210d102/src/core/IO/Handle.pm
13:16 Skarsnik why ^can does not find it Oo
13:17 psch Skarsnik: because the sig specifies IO::Handle:D as invocant
13:17 psch m: class A { method foo(A:D $:) { } }; A.can('foo').say; A.new.can('foo').say
13:17 camelia rakudo-moar c5f81a: OUTPUT«(foo)␤(foo)␤»
13:17 psch ...
13:17 psch no
13:17 psch :(
13:18 Skarsnik lock/unlock not documented too x)
13:19 psch m: say IO::Handle.^mro
13:19 camelia rakudo-moar c5f81a: OUTPUT«IO::Handle is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting:1␤  in method gist at src/RESTRICTED.setting:33␤  in block <unit> at /tmp/xDai_dvqwg:1␤␤»
13:19 Skarsnik m: say IO::Handle.can("flush").elems;
13:19 camelia rakudo-moar c5f81a: OUTPUT«0␤»
13:19 psch *that* is why
13:19 psch 'cause IO::Handle in camelia is an empty class that has RESTRICTED-CLASS and Mu as mro
13:19 dalek doc: f6be6c0 | (Claudio Ramirez)++ | doc/Type/IO/Handle.pod:
13:19 dalek doc: Add method flush
13:19 dalek doc: review: https://github.com/perl6/doc/commit/f6be6c06ce
13:19 dalek doc: b9f6fb0 | nxadm++ | doc/Type/IO/Handle.pod:
13:19 dalek doc: Merge pull request #232 from nxadm/master
13:19 dalek doc:
13:19 dalek doc: Add method flush
13:19 dalek doc: review: https://github.com/perl6/doc/commit/b9f6fb02dc
13:20 psch Skarsnik: cf. src/RESTRICTED.setting
13:20 El_Che what a man has to do to get the memory usage down :)
13:21 Skarsnik It's sad rakudo take so much ram to build. I can't build it in cloud9 :(
13:22 El_Che build it locally and upload it?
13:25 Skarsnik my virtualbox decided that it could not see my intel virtualisation so I can't run 64 bits guess anymore x) But I will look at using a ssh workspace
13:26 * grondilu wonders why we don't have an Int.ordinal method
13:27 grondilu m: say 'first', 'second'... *;
13:27 camelia rakudo-moar c5f81a: OUTPUT«(...)␤»
13:27 grondilu m: say ('first', 'second'... *)[^10];
13:27 camelia rakudo-moar c5f81a: OUTPUT«(first second secone seconf secong seconh seconi seconj seconk seconl)␤»
13:27 grondilu lol
13:27 Skarsnik fun
13:27 El_Che :)
13:28 El_Che secong would be a nice name for a language. C-Kong
13:30 Skarsnik use MONKEY-SLANG;
13:34 znpy joined #perl6
13:34 dalek rakudo/nom: fadbb54 | peschwa++ | src/RESTRICTED.setting:
13:34 dalek rakudo/nom: Remove RESTRICTED override for not-anymore-existing class IOU.
13:34 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/fadbb5434c
13:35 fooflare joined #perl6
13:36 n0tjack joined #perl6
13:38 MadcapJake m: sub prefix:<u+^>(Int $i) {my @bin = $i.base(2).split('')[1..*]; my @zer = @bin.unshift: |('0' xx 16 - @bin.elems); my @com = @zer.map: { $_ ~~ '0' ?? '1' !! '0' }; return :2(@com.join).base(10).Int}; say u+^123;
13:38 camelia rakudo-moar c5f81a: OUTPUT«65288␤»
13:38 MadcapJake why does that output 65288 but the adventcode question says it should output 65412??
13:38 fooflare left #perl6
13:39 [Coke] should we make Configure.pl default to moar-backend only?
13:40 Skarsnik it build parrot too?
13:41 MadcapJake my intent is to make a bitwise complement that doesn't return a negative result (which to the adventcode puzzle gives you `NOT 123 -> 65412`, but I can't seem to arrive at that result)
13:41 Skarsnik Should perl6 pod be called pod6? for https://github.com/perl6/doc/issues/167 , well it's just an example but there is nothing to tell if a .pod is perl6 or perl5
13:41 psch m: say 123.base(2)
13:41 camelia rakudo-moar c5f81a: OUTPUT«1111011␤»
13:43 psch m: sub prefix:<u+^>(Int $i) {my @bin = $i.base(2).comb; my @zer = @bin.unshift: |('0' xx 16 - @bin.elems); my @com = @zer.map: { $_ ~~ '0' ?? '1' !! '0' }; return :2(@com.join).base(10).Int}; say u+^123;
13:43 ChristopherBotto joined #perl6
13:43 camelia rakudo-moar c5f81a: OUTPUT«65412␤»
13:43 psch MadcapJake: i'm guessing you still had a '' at the end from split('')
13:43 ZoffixW joined #perl6
13:43 ZoffixW m: subset Foo of Str where any <foo bar>; sub foo (Foo $x) { say $x }; foo 'foo'; foo 'ber';
13:43 camelia rakudo-moar c5f81a: OUTPUT«foo␤Constraint type check failed for parameter '$x'␤  in sub foo at /tmp/qMmdyOI6DI:1␤  in block <unit> at /tmp/qMmdyOI6DI:1␤␤»
13:43 psch MadcapJake: .comb is better suited for that use-case, in any case
13:43 ZoffixW Didn't that used to mention the name of the subset in the error message?
13:44 ZoffixW m: subset Foo of Str where any <foo bar>; sub foo (Int $x) { say $x }; foo 'foo'; foo 'ber';
13:44 MadcapJake psch: cool thanks!
13:44 camelia rakudo-moar c5f81a: OUTPUT«5===SORRY!5===␤Calling foo(Str) will never work with declared signature (Int $x)␤at /tmp/51QTaIggrp:1␤------> 3<foo bar>; sub foo (Int $x) { say $x }; 7⏏5foo 'foo'; foo 'ber';␤Calling foo(Str) will never work with declared signature (Int …»
13:44 _nadim please tell me thaat someone has a module that, when used instead for Test, makes the framework "tranparent". If not, and if there is more than me who wants it, I'll write it. I have always hated this in P5
13:44 ZoffixW huh. I'm getting a different error locally: Type check failed in binding $set; expected Int but got Str
13:44 [Coke] (parrot), no, it includes the jvm.
13:45 [Coke] "tranparent" ?
13:45 ZoffixW _nadim, what do you mean "makes transparent"?
13:45 psch [Coke]: i'd agree with "perl Configure.pl" being equivalent to "perl Configure.pl --backends=moar --prefix=./install"
13:45 psch [Coke]: i usually also use --make-install, but people might not want that vOv
13:46 _nadim diag works like say ... say works normally ... is defined ...
13:46 Skarsnik ?
13:46 ZoffixW _nadim, still not following.
13:46 psch _nadim: what would &is do in that transparent framework?
13:47 [Coke] your transparent sounds like "this test framework is broken" to me.
13:47 PotatoGim joined #perl6
13:47 _nadim psch: the same thing or nothing if one would prefer
13:48 _nadim when a test fails, I want to be able to very quickly run it without the framework
13:48 ZoffixW _nadim, but how would you test things?
13:49 ZoffixW without is
13:49 Skarsnik perl6 -I lib t/mytest.t ?
13:49 _nadim ZoffixW: often, I need to see output, dmp data structures to fix the tests
13:49 psch _nadim: well, if it seems useful to you, go for it.  i don't quite understand the purpose
13:49 * ZoffixW neither
13:50 Skarsnik run the test directly, it will display everything you output
13:50 ZoffixW _nadim, I think you may simply be asking for the -v flag to prove :)
13:50 Skarsnik only prove hide it
13:50 _nadim I will probably write something, it will be easier to describe after I have written it :)
13:50 ZoffixW Sure
13:50 ZoffixW Write all the things! :)
13:50 psch isolating a breaking test case isn't annoying enough for me to want a module that i replace Test with instead of running the test alone
13:50 _nadim ZoffixW: not -v, I actually run prove with -v all the time
13:51 psch like, < copy & paste the breaking test-case into an -e or camelia > is usually fine with me :)
13:51 Skarsnik I run the test directly when I want to test a test x)
13:51 ZoffixW _nadim, then I'm not at all sure what issue you're trying to solve. What you describe is hinting me at my P5 version of https://metacpan.org/pod/Test::Mojo::Role::Debug
13:51 _nadim psch: you are starting to get what I want, except that I don't want to copy paste
13:51 ZoffixW _nadim, so I'd say write the module and make it available :)
13:52 psch _nadim: well, as i said, if it seems useful to you go for it
13:52 _nadim that's the plan ;)
13:52 psch me personally i think copying and pasting the test case is cleaner than altering a (potentially upstream) test-file vOv
13:52 psch don't wanna start commit broken test files again :P
13:53 psch especially not to roast >_>
13:53 * ZoffixW never had to copy-paste tests :S
13:53 ZoffixW ISAGN for DIE_ON_FIRST_FAIL type of thing. If there's a failure, stop further testing.
13:53 ZoffixW (I think I already mentioned that)
13:54 Skarsnik There is a DIE on FIRST FAIL?
13:54 ZoffixW Is that a question or...?
13:54 Skarsnik Yes, sorry
13:54 ZoffixW There is Test::Most in P5 that does that sort of thing. Makes doing TDD much easier
13:55 Skarsnik It was annoying when testing stuff in DBIish x)
13:55 Skarsnik "Oh test 10 has failed, wait there is 40 tests left"
13:56 psch m: my \blk = (-> --> Int { Str }); say blk.returns; say blk()
13:56 camelia rakudo-moar fadbb5: OUTPUT«5===SORRY!5=== Error while compiling /tmp/VqmQ1Eq46l␤Variable '&blk' is not declared␤at /tmp/VqmQ1Eq46l:1␤------> 3 --> Int { Str }); say blk.returns; say 7⏏5blk()␤»
13:56 psch eh
13:56 prammer joined #perl6
13:56 psch m: my &blk = (-> --> Int { Str }); say blk.returns; say blk()
13:56 camelia rakudo-moar fadbb5: OUTPUT«Method 'returns' not found for invocant of class 'Str'␤  in block <unit> at /tmp/7KsFZ1L7D8:1␤␤»
13:56 psch m: my &blk = (-> --> Int { Str }); say &blk.returns; say blk()
13:56 camelia rakudo-moar fadbb5: OUTPUT«(Int)␤(Str)␤»
13:56 psch i am looking at about where that could be corrected
13:56 psch but i don't get it :/
13:57 ZoffixW m: class Meow { subset Foo of Str where any <foo bar>; method foo (Foo $x) { say $x }; }; Meow.new.foo: 'foo'; Meow.new.foo: 'ber';
13:57 camelia rakudo-moar fadbb5: OUTPUT«foo␤Constraint type check failed for parameter '$x'␤  in method foo at /tmp/hc0UhYrCM0:1␤  in block <unit> at /tmp/hc0UhYrCM0:1␤␤»
13:57 ZoffixW ^^ that error is LTA. It should mention that Foo type was expected
13:57 ZoffixW As in this case:
13:57 ZoffixW m: class Meow { subset Foo of Str where any <foo bar>; has Foo $!bar = 'meow'; method foo (Foo $x) { say $x }; }; Meow.new.foo: 'foo'; Meow.new.foo: 'ber';
13:57 camelia rakudo-moar fadbb5: OUTPUT«Type check failed in assignment to $!bar; expected Meow::Foo but got Str␤  in block <unit> at /tmp/QM2m1KlW7Q:1␤␤»
13:58 RabidGravy WTF is "Serialization Error: Unimplemented case of read_ref" all about
13:58 Skarsnik In what?
13:59 RabidGravy well, in this case the t/082-exceptions.t in H::UA
13:59 psch m: my subset Foo of Str where any <foo bar>; sub f(Foo $x) { }; &f.signature.say
13:59 camelia rakudo-moar fadbb5: OUTPUT«(Str $x where { ... })␤»
14:00 psch ZoffixW: i don't know if we can still know that.  as per above, the subset type constraint gets translated into a Str type with a where clause
14:00 psch ZoffixW: whereas the container for a variable (in the assignment case) probably knows it comes from a subset
14:02 ZoffixW Too bad.
14:02 ZoffixW My brag-tweet would've been more awesome with included useful error messages mentioning the subtype :) https://twitter.com/zoffix​/status/674589605325180928
14:02 psch ZoffixW: well, feel free to look closer at the source.  it starts around src/Metamodel/BOOTSTRAP.nqp:475-505
14:02 ZoffixW I don't know how to run that stuff :)
14:04 Skarsnik RabidGravy, I wil blame a weird error in sockets?
14:04 ZoffixW Like, I see the README mentions how to build the entire nqp, but do you guys rebuild the whole thing every time you make a change and just want to see what the effect was? https://github.com/perl6/nqp/
14:04 lizmat ZoffixW: I usually do "make install" which usually does the right thing
14:04 lizmat ZoffixW: except in a case of a NQP version bump
14:05 ZoffixW lizmat, does that take forever to run?
14:05 glaukommatos joined #perl6
14:06 * psch realizes how spoiled all those "i only use r-m" people actually are... :P
14:06 ZoffixW r-m?
14:06 moritz ZoffixW: rakudo-moarvm
14:06 psch ZoffixW: fwiw, on the machine i hack on rakudo a complete rakudo-moar build - with building moar, nqp and rakudo - takes 3 minutes
14:07 psch ZoffixW: contrast with iirc almost 15 minutes r-j :P
14:07 lizmat my settings build cycle using make install is at about 80 seconds
14:07 lizmat this is excluding any Moar or NQP building
14:08 psch ZoffixW: if you only change stuff below $rakudo-git-path/src you only need to rebuild rakudo itself too, which as lizmat++ points out might be less than two minutes
14:08 lizmat psch: once upon a time, building with parrot to >5 minutes
14:08 lizmat *took
14:09 arnsholt Just parsing the setting took at least two minutes on this machine with Parrot, IIRC
14:10 ZoffixW k, I'll try to play around with the guts on the weekend.
14:10 arnsholt I remember being a bit envious of jnthn's machine that did the parse stage in about 100 seconds =)
14:10 ZoffixW rakudobrew build moar parse stage took 59seconds on my home box last night :)
14:12 psch lizmat: on hack i have real    6m28.179s for r-j with existing nqp-j and an RTE during install-core-dist.pl
14:13 lizmat many modules installed maybe ?
14:13 psch and stage parse is 5 sec shy of 2 minutes
14:13 psch lizmat: no, Configure.pl
14:14 lizmat ah...:-)
14:15 RabidGravy "Stage parse      : 182.712" on a 1.58GHz celeron :-\
14:15 psch hack is a pretty beefy machine, i think
14:16 psch model name      : Intel Core i7 9xx (Nehalem Class Core i7)  cpu MHz         : 2399.996
14:16 psch yup :P
14:17 yaewa joined #perl6
14:18 prammer joined #perl6
14:19 marchelzo joined #perl6
14:20 moei joined #perl6
14:20 marchelzo how can you get everything but the head of a list? there must be a better way than $mylist.tail($mylist.elems - 1)
14:21 RabidGravy why would I be getting "P6M Merging GLOBAL symbols failed: duplicate definition of symbol Response" in a test on travis but not locally?
14:21 psch m: my @a = ^10; say @a[1..*]
14:21 camelia rakudo-moar fadbb5: OUTPUT«(1 2 3 4 5 6 7 8 9)␤»
14:22 psch marchelzo: ^^^ is another way
14:23 marchelzo the whatever star is so mystifying
14:24 moritz m: my @a = ^10; say @a.tail
14:24 camelia rakudo-moar fadbb5: OUTPUT«(9)␤»
14:24 _nadim marchelzo: my ($ignore, @rest) = @list
14:25 marchelzo _nadim: I like that way
14:25 marchelzo but if you don't want to assign the tail to anything then it's weird
14:26 Skarsnik ($head, @list) = @array;
14:26 Skarsnik probably work x)
14:26 _nadim m: my @list = ^5; my ($ignore, @rest) = @list ; @rest.say
14:26 camelia rakudo-moar fadbb5: OUTPUT«[1 2 3 4]␤»
14:26 grondilu m: say q{\\} ~~ /'\\'/
14:26 camelia rakudo-moar fadbb5: OUTPUT«「\」␤»
14:26 psch m: my @a = ^10; say [*] (($, @) = @a)[1] #
14:26 camelia rakudo-moar fadbb5: OUTPUT«362880␤»
14:26 * grondilu was expecting \
14:26 gfldex m: my @a = (1..10).list; my ($,@rest) = @a; dd @rest;
14:26 camelia rakudo-moar fadbb5: OUTPUT«Array $var = $[2, 3, 4, 5, 6, 7, 8, 9, 10]␤»
14:26 _nadim m: my @list = ^5; my ($ignore, @rest) = @list ; @list.say ; @rest.say
14:26 camelia rakudo-moar fadbb5: OUTPUT«[0 1 2 3 4]␤[1 2 3 4]␤»
14:27 marchelzo psch: ok, what the fuck
14:27 psch marchelzo: well, ($, @) is a List with two elements
14:27 marchelzo right
14:27 _nadim marchelzo: what do you mean with "not want to assign the tail to anything"?
14:28 lizmat m: my @list = ^5; my ($, @rest) = @list ; @list.say ; @rest.say  # no need to name the scalar to be ignnored
14:28 camelia rakudo-moar fadbb5: OUTPUT«[0 1 2 3 4]␤[1 2 3 4]␤»
14:28 psch marchelzo: and (($, @) = @a) puts the first elem of @a into the anon Scalar, and the rest into the anon Array
14:28 marchelzo I didn't know ($, @) = @a was a thing.
14:28 psch marchelzo: of that two element List we take the second element and multiply all elements of *that* afterwards
14:28 _nadim lizmat: tanks, I did try Nil but it complained heavily ;)
14:28 marchelzo I didn't know about anonymous Arrays / Scalars.
14:28 grondilu wth how do I quote a backslash?
14:28 grondilu m: say q{\}
14:28 camelia rakudo-moar fadbb5: OUTPUT«5===SORRY!5=== Error while compiling /tmp/30d3hzcYzD␤Couldn't find terminator } (corresponding { was at line 1)␤at /tmp/30d3hzcYzD:1␤------> 3say q{\}7⏏5<EOL>␤    expecting any of:␤        }␤»
14:29 marchelzo _nadim: that I don't want to use the = operator.
14:29 psch grondilu: q[] still does some backslash interpolation
14:29 psch m: say Q[\]
14:29 camelia rakudo-moar fadbb5: OUTPUT«\␤»
14:29 psch grondilu: you want Q{}
14:29 grondilu ok, and in a regex?
14:30 psch m: say q[\qq<\c[SNOWMAN]>]
14:30 camelia rakudo-moar fadbb5: OUTPUT«☃␤»
14:30 masak "{ Q{} }" should work in the worst case
14:32 _nadim marchelzo: http://doc.perl6.org/routine/splice#class_List  but why not use the above
14:32 grondilu m: say q{\\} ~~ /\x5C ** 2/
14:32 camelia rakudo-moar fadbb5: OUTPUT«Nil␤»
14:33 grondilu m: say Q{\\} ~~ /\x5C ** 2/
14:33 camelia rakudo-moar fadbb5: OUTPUT«「\\」␤»
14:33 kaare_ joined #perl6
14:33 marchelzo _nadim: I will in cases where I want to assign the tail to something
14:33 grondilu m: say Q{\\} ~~ /'\\'/
14:33 camelia rakudo-moar fadbb5: OUTPUT«「\」␤»
14:33 grondilu ^what am I missing here?
14:33 marchelzo it's good to know multiple ways I guess
14:34 moritz grondilu: that \ escapes, even in single-quoted strings
14:35 grondilu so what the equivalent of Q{} inside a regex?
14:35 _nadim then put something into the construct. ($, @the_thing_you_want_to_assigne_to) = @source
14:36 _nadim marchelzo: ^^
14:36 marchelzo right
14:36 grondilu m: say Q{\\} ~~ /'\\\\'/
14:36 camelia rakudo-moar fadbb5: OUTPUT«「\\」␤»
14:36 marchelzo ok thanks
14:37 grondilu m: say Q{\\} ~~ /\\\\/
14:37 camelia rakudo-moar fadbb5: OUTPUT«「\\」␤»
14:37 grondilu ^that will do I guess
14:39 jdrab joined #perl6
14:45 sunnavy joined #perl6
14:52 zakharyas joined #perl6
14:57 skids joined #perl6
14:57 moritz eek
14:57 moritz found a very nasty test code bug at work
14:57 lizmat eek!
14:58 moritz which would, under some not-too-obscure conditions, swallow all exceptions
14:58 moritz and since test data setup is very fiddly, test writes tend to avoid doing it, and stuff their test into existing files with existing test data
14:58 * colomon found a bug a few days ago for $work which under obscure-ish conditions would cause his code to process entirely incorrect data.
14:59 * hahainternet just fixed a bug that resulted in 'nonsense' data production, as it mistook one field for another in a cache
14:59 hahainternet python unfortunately
14:59 moritz so now we have a few a test files with huge amounts of tests in each, and some of them are downright bogus, and nobody ever noticed
15:00 moritz hahainternet: I had a similar-ish bug recently, where a cache would be written by a wrong key, causing people to be mis-identified in our ticket system
15:00 moritz not at login time, but at "send this person a notification" time
15:00 loren joined #perl6
15:01 loren evening, perl6, long time no see..
15:01 rurban joined #perl6
15:01 hahainternet moritz: i was naive and thought i could use a postgres array with a key field first, and then the rest of the fields deterministically ordered
15:02 hahainternet later switching to the key field just being part of the array order, but didn't switch from using array[0] as the search key
15:02 hahainternet whoops :D
15:02 hahainternet this is why i am so interested in strongly type restricted ORMs in p6
15:03 hahainternet with a bit of annotation i could easily have had PrimaryKey and FilterKey types, and at least noticed there was something wrong :D
15:03 hahainternet also hi @ loren
15:03 AlexDaniel joined #perl6
15:04 moritz hahainternet: an assumption later, silently invalidated. Yes, that's a problem
15:04 glaukommatos joined #perl6
15:04 moritz hahainternet: in my case (test bug) it was reckless use of "goto"
15:04 Skarsnik feel free to write a orm that use attr.WHY x)
15:04 ChoHag Does :exists work on Positionals?
15:05 loren I give up build perl6 under msys2 , there are many path problem. Though i success make it once, i wonder it's a accident....
15:05 loren hahainternet, hi ..
15:05 hahainternet Skarsnik: i learned about .WHY only yesterday, looking forward to finding a use
15:06 loren ChoHag, may be not, i think ..
15:07 lizmat m: my @a; @a[3] = Any; say @a[*]:exists
15:07 camelia rakudo-moar fadbb5: OUTPUT«(False False False True)␤»
15:07 lizmat ChoHag: ^^^
15:08 moritz lizmat++ # data points for RT #126842
15:08 jnthn wtf :/
15:08 jnthn dalek--
15:08 lizmat moritz: fwiw, the run with nqp::force_gc is still running at 22K iterations
15:08 Skarsnik hahainternet, could probably be used to say has $.id; #db=PrimaryKey and have an ORM class mapping that x)
15:09 dalek joined #perl6
15:09 hahainternet wb dalek
15:09 loren lizmat,  will be work like this? sub my(Str $str?) { if $str:exists { } }
15:10 lizmat loren: that's not a Positional
15:10 ChoHag Nifty.
15:10 jnthn Anyway, I just pusehd a few commits, one of which adds a `use experimental`, and is cached is now needing `use experimental :cached`.
15:10 RabidGravy $str.defined
15:10 jnthn Also fixed that the newline pragma wasn't installed by make install.
15:10 loren eh, lizmat
15:11 jnthn loren: Just use if $str.defined
15:12 lizmat loren: something more Perl 6ish:
15:12 lizmat m: my $a; with $a { .say }
15:12 camelia rakudo-moar fadbb5: ( no output )
15:12 lizmat m: my $a = 42; with $a { .say }
15:12 camelia rakudo-moar fadbb5: OUTPUT«42␤»
15:12 jnthn yes, or with :)
15:13 psch jnthn: do you have an idea re: RT #126232?  i had thought adding a p6typecheckrv to the block could work, but it doesn't
15:13 Ven joined #perl6
15:13 psch m: (-> --> Int { Str })() # for reference
15:13 camelia rakudo-moar fadbb5: ( no output )
15:14 loren I just think isn't it $str:eixsts cool than $str.defined, haha
15:14 loren jnthn, lizmat em, got it
15:14 masak loren: no, :exists is an adverb on hash access
15:15 lizmat masak: or array access
15:15 masak or what lizmat said
15:15 masak m: my %h; say %h<foo> :exists
15:15 camelia rakudo-moar fadbb5: OUTPUT«False␤»
15:15 ChoHag m: my %x = a => 42; say %x<b>:!exists; say !(%x<b>:exists); say !%x<b>:exists
15:15 camelia rakudo-moar fadbb5: OUTPUT«True␤True␤Unexpected named parameter 'exists' passed␤  in block <unit> at /tmp/0JAhK8EoFz:1␤␤»
15:15 masak loren: the above should be read as `<foo> :exists` -- that's a "unit"
15:15 loren I know that .. , masak
15:15 ChoHag Why is the third say statement an error?
15:15 masak loren: so with `$str :exists`, the adverb is not "sitting on" some operator. and it must do that.
15:15 ChoHag Is ! doing something I don't know about?
15:16 moritz ChoHag: it's a precedence problem
15:17 loren If we can use like that, every variable can use :exists, may be it can be a postfix ?
15:17 moritz ChoHag: I guess the adverb binds to the ! instead of the <>
15:17 moritz m: my %x = a => 42; say !(%x<b>:exists)
15:17 camelia rakudo-moar fadbb5: OUTPUT«True␤»
15:17 moritz m: my %x = a => 42; say not %x<b>:exists
15:17 camelia rakudo-moar fadbb5: OUTPUT«True␤»
15:19 gfldex you use ! unless you use unless
15:19 * gfldex chuckles
15:19 CQ you could double negate it with !unless! ...?
15:20 loren m: my %x = a => 42; say !(%x<b>:exists); if !(%x<b>:exists) { say 'True' }; unless (%x<b>:exists) { say 'True' }
15:20 camelia rakudo-moar fadbb5: OUTPUT«True␤True␤True␤»
15:20 ChoHag m: my %x = a => 42; say not:exists %x<b>
15:20 camelia rakudo-moar fadbb5: OUTPUT«5===SORRY!5=== Error while compiling /tmp/1y0MB7M9ET␤Undeclared routine:␤    x used at line 1␤␤»
15:20 ChoHag m: my %x = a => 42; say !:exists %x<b>
15:20 camelia rakudo-moar fadbb5: OUTPUT«5===SORRY!5=== Error while compiling /tmp/dhbNgODBLX␤Undeclared routine:␤    x used at line 1␤␤»
15:20 masak ChoHag: in the case of `!`, it's "above" `<b>` in the AST, and so `:exists` binds to it
15:20 masak ChoHag: an adverb basically looks back in the source code for something to bind to
15:21 masak ChoHag: but (and this is key) it doesn't take the textually closest thing it finds, but the AST-ly topmost thing
15:22 moritz sounds like worth of an FAQ entry
15:23 ChoHag Adverbs are going to needs a lot of clear explaining. They're a very weird thing.
15:23 dalek rakudo/nom: 2f91998 | jnthn++ | / (3 files):
15:23 dalek rakudo/nom: Make macro/quasi experimental.
15:23 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/2f91998db5
15:24 dalek roast: 4039698 | jnthn++ | / (17 files):
15:24 dalek roast: Add `use experimental :macros` as needed.
15:24 dalek roast: review: https://github.com/perl6/roast/commit/4039698ce8
15:33 khw joined #perl6
15:39 zengargoyle good * #perl6
15:40 loren zengargoyle, o/
15:40 molaf joined #perl6
15:40 AlexDaniel 「0..($wolf_quantitiy-1)」 hmmm… 「0..^$wolf_quantity」 !
15:40 yoleaux 09:01Z <nine> AlexDaniel: no precompilation; in your module and it will compile your module every time. Its dependencies however will still be precompiled.
15:40 hankache joined #perl6
15:41 hankache hello #perl6
15:41 psch hm, i did figure something out to make < (-> --> Int { Str })() > throw, but that complains about not being able to serialize a Block during install-core-dist.pl6 :/
15:42 psch AlexDaniel: probably just < ^$wolf_quantity > instead of < 0..^$wolf_quantity >?
15:42 AlexDaniel psch: correct, that's the next step :)
15:42 loren m: say ^10;
15:42 camelia rakudo-moar 2f9199: OUTPUT«^10␤»
15:42 psch i mean, they are functionally identical still..
15:42 hankache m: say (^10);
15:42 camelia rakudo-moar 2f9199: OUTPUT«^10␤»
15:43 psch m: say @ = ^10; say eager ^10
15:43 camelia rakudo-moar 2f9199: OUTPUT«[0 1 2 3 4 5 6 7 8 9]␤(0 1 2 3 4 5 6 7 8 9)␤»
15:43 loren m: say [^10];
15:43 camelia rakudo-moar 2f9199: OUTPUT«[0 1 2 3 4 5 6 7 8 9]␤»
15:43 hankache m: say |^10
15:43 camelia rakudo-moar 2f9199: OUTPUT«0123456789␤»
15:43 * RabidGravy resorts to adding "diag HTTP::Resonse.^mro>>.perl" to try and understand what is going on in travis
15:45 hankache m: say ^10.WHAT
15:45 camelia rakudo-moar 2f9199: OUTPUT«Potential difficulties:␤    Precedence of ^ is looser than method call; please parenthesize␤    at /tmp/OPaSTs7mBW:1␤    ------> 3say ^107⏏5.WHAT␤Use of uninitialized value of type Int in numeric context  in block <unit> at /tmp/OPaSTs7mBW:1…»
15:45 AlexDaniel m: say ^10 .WHAT
15:45 camelia rakudo-moar 2f9199: OUTPUT«===SORRY!===␤Method call must either supply a name or have a child node that evaluates to the name␤»
15:45 hankache m: say (^10).WHAT
15:45 camelia rakudo-moar 2f9199: OUTPUT«(Range)␤»
15:46 hankache voila!
15:46 AlexDaniel m: say (|^10) .WHAT
15:46 camelia rakudo-moar 2f9199: OUTPUT«===SORRY!===␤Method call must either supply a name or have a child node that evaluates to the name␤»
15:46 AlexDaniel m: say (|^10).WHAT
15:46 camelia rakudo-moar 2f9199: OUTPUT«(Slip)␤»
15:46 hankache oh!! i thought that would return a list ^^
15:47 psch m: say ^10 .list.WHAT
15:47 camelia rakudo-moar 2f9199: OUTPUT«===SORRY!===␤Method call must either supply a name or have a child node that evaluates to the name␤»
15:47 AlexDaniel what's wrong with 「 .WHAT」 ?
15:47 psch m: say (^10) .list.WHAT
15:47 camelia rakudo-moar 2f9199: OUTPUT«===SORRY!===␤Method call must either supply a name or have a child node that evaluates to the name␤»
15:47 psch m: say (^10).list.WHAT
15:47 camelia rakudo-moar 2f9199: OUTPUT«(List)␤»
15:47 AlexDaniel m: say 5 .WHAT
15:47 camelia rakudo-moar 2f9199: OUTPUT«===SORRY!===␤Method call must either supply a name or have a child node that evaluates to the name␤»
15:47 psch huh, when did that break
15:47 AlexDaniel camelia: help
15:47 camelia AlexDaniel: Usage:
15:47 camelia ..<(nqp-js|star-j|rakudo-MOAR|niecza|nqp-parrot|​rakudo-moar|p5-to-p6|debug-cat|pugs|nqp-jvm|nqp-​moarvm|star-m|prof-m|std|rakudo-jvm|rPn|nPr|r-jv​m|rj|rn|nrP|r-j|nqp|perl6|rakudo|Prn|star|n|nqp-​m|nr|sm|nom|rnP|nqp-mvm|P|M|p56|Pnr|m|r|rm|sj|p6​|nqp-q|r-m|nqp-p|nqp-j|j)(?^::\s(?!OUTPUT)) $perl6_program>
15:48 hankache m: 5.WHAT.say
15:48 camelia rakudo-moar 2f9199: OUTPUT«(Int)␤»
15:48 hankache m: say 5.WHAT
15:48 camelia rakudo-moar 2f9199: OUTPUT«(Int)␤»
15:48 AlexDaniel hmm, no way to tell camelia to run it on 2015.11?
15:48 hankache AlexDaniel you have a space after 5
15:48 AlexDaniel hankache: so what
15:49 psch star-m: say 5 .WHAT
15:49 camelia star-m 2015.09: OUTPUT«5===SORRY!5=== Error while compiling /tmp/YDmUQYVYQD␤Two terms in a row␤at /tmp/YDmUQYVYQD:1␤------> 3say 57⏏5 .WHAT␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        statement m…»
15:49 psch ah, too old for that
15:49 AlexDaniel hankache: I bet that it was working
15:49 dalek doc: 606d556 | (Wenzel P. P. Peppmeyer)++ | doc/Language/traps.pod:
15:49 dalek doc: add trap of adverb precedence
15:49 dalek doc: review: https://github.com/perl6/doc/commit/606d556060
15:49 dalek doc: 6f59d83 | (Wenzel P. P. Peppmeyer)++ | doc/Language/traps.pod:
15:49 dalek doc: Merge pull request #233 from gfldex/master
15:49 dalek doc:
15:49 dalek doc: add trap of adverb precedence
15:49 dalek doc: review: https://github.com/perl6/doc/commit/6f59d83580
15:49 AlexDaniel m: 5 .say
15:49 camelia rakudo-moar 2f9199: OUTPUT«5␤»
15:49 AlexDaniel m: 5 .WHAT
15:49 camelia rakudo-moar 2f9199: OUTPUT«===SORRY!===␤Method call must either supply a name or have a child node that evaluates to the name␤»
15:50 AlexDaniel m: 5 .WHICH
15:50 camelia rakudo-moar 2f9199: ( no output )
15:50 AlexDaniel m: 5 .sin.say
15:50 camelia rakudo-moar 2f9199: OUTPUT«-0.958924274663138␤»
15:50 hankache AlexDaniel: dunno just saying
15:50 ilmari m: 5 .WHAT .say
15:50 camelia rakudo-moar 2f9199: OUTPUT«===SORRY!===␤Method call must either supply a name or have a child node that evaluates to the name␤»
15:50 AlexDaniel hankache: look ↑ it works
15:50 psch m: say 5 .++
15:50 camelia rakudo-moar 2f9199: OUTPUT«5===SORRY!5=== Error while compiling /tmp/TvwB0m7vKs␤Unsupported use of . to concatenate strings; in Perl 6 please use ~␤at /tmp/TvwB0m7vKs:1␤------> 3say 5 .+7⏏5+␤»
15:50 AlexDaniel but not with .WHAT
15:51 gfldex m: my %x = a => 42; say !%x<b>:exists; CATCH { default { .WHAT.say } }
15:51 camelia rakudo-moar 2f9199: OUTPUT«(AdHoc)␤»
15:51 hankache m: say (5) .WHAT
15:51 camelia rakudo-moar 2f9199: OUTPUT«===SORRY!===␤Method call must either supply a name or have a child node that evaluates to the name␤»
15:51 gfldex not sure i like that to be AdHoc
15:51 hankache ok i give up
15:51 hankache no spaces for WHAT
15:51 ilmari m: pi.sin.say
15:51 camelia rakudo-moar 2f9199: OUTPUT«1.22464679914735e-16␤»
15:52 hankache AlexDaniel: is this a bug?
15:52 AlexDaniel m: π . sin . say
15:52 camelia rakudo-moar 2f9199: OUTPUT«1.22464679914735e-16␤»
15:52 AlexDaniel hankache: yes, probably
15:52 hankache m: say "helllo" .WHAT
15:52 camelia rakudo-moar 2f9199: OUTPUT«===SORRY!===␤Method call must either supply a name or have a child node that evaluates to the name␤»
15:52 psch m: 5 .Real.WHAT.say # this is the curious bit imo
15:52 camelia rakudo-moar 2f9199: OUTPUT«===SORRY!===␤Method call must either supply a name or have a child node that evaluates to the name␤»
15:53 AlexDaniel if not, then at least it is LTA because it lacks the line number…
15:53 * AlexDaniel submits rakudobug…
15:53 ilmari m: say sin pi/2
15:53 camelia rakudo-moar 2f9199: OUTPUT«1␤»
15:53 hankache m: say 5 . Real
15:53 camelia rakudo-moar 2f9199: OUTPUT«5␤»
15:53 AlexDaniel j: π . WHAT
15:53 hankache weird
15:53 camelia rakudo-jvm 6c0f93: OUTPUT«===SORRY!===␤Method call must either supply a name or have a child node that evaluates to the name␤»
15:54 AlexDaniel hankache: one reason why you might want to use it is in 「^10 .say」 case
15:54 AlexDaniel hankache: otherwise you need parens
15:54 AlexDaniel m: ^10.say
15:54 camelia rakudo-moar 2f9199: OUTPUT«Potential difficulties:␤    Precedence of ^ is looser than method call; please parenthesize␤    at /tmp/yznGid3Yyh:1␤    ------> 3^107⏏5.say␤WARNINGS:␤Useless use of "^" in expression "^10.say" in sink context (line 1)␤10␤»
15:54 AlexDaniel m: ^10 .say
15:54 camelia rakudo-moar 2f9199: OUTPUT«^10␤»
15:54 AlexDaniel m: (^10).say
15:54 camelia rakudo-moar 2f9199: OUTPUT«^10␤»
15:55 hankache AlexDaniel aha ok
15:55 psch cb25b2f475f31335d77d018474482aceec2c74de is the original "spaces around infix:<.>" commit, checking if that actually worked for .WHAT before
15:55 psch i'm pretty sure it did, but it's a good start for a bisect anyway :P
15:56 hankache I am a big fan of putting parentheses everywhere
15:56 AlexDaniel psch: oh wow, you are bisecting it. I'll wait then
15:56 RabidGravy okay I put that diag in and now the test passes, this actually sucks
15:56 hankache i always get precedence messed up
15:57 * AlexDaniel hates parentheses…
15:57 psch AlexDaniel: well, the RT fix i was working on is running into CURLI-related problems, which i don
15:57 psch 't quite feel up to look into
15:58 * hankache should learn more about precedence
15:58 AlexDaniel m: ^10 .^methods.say
15:58 camelia rakudo-moar 2f9199: OUTPUT«5===SORRY!5=== Error while compiling /tmp/IVXMYbL_BG␤Unsupported use of . to concatenate strings; in Perl 6 please use ~␤at /tmp/IVXMYbL_BG:1␤------> 3^10 .^7⏏5methods.say␤»
15:58 AlexDaniel hmm…
15:59 hankache . to concatenate!!
15:59 zengargoyle AlexDaniel: ^methods is a macro or something...
15:59 hankache Devil get out of camelia!!
15:59 psch m: Nil .?say
15:59 camelia rakudo-moar 2f9199: OUTPUT«5===SORRY!5=== Error while compiling /tmp/UQCoK1BjKy␤Unsupported use of . to concatenate strings; in Perl 6 please use ~␤at /tmp/UQCoK1BjKy:1␤------> 3Nil .?7⏏5say␤»
15:59 psch only the normal method dot works with space
15:59 psch all the mutators for it don't
15:59 * hankache starts incantation
16:00 psch because we look for an ident directly after the dot (minus whitespace)
16:00 AlexDaniel I'm not sure if it should not work…
16:00 AlexDaniel but maybe that's the price for this awesome error message
16:00 AlexDaniel which in this case is less than awesome
16:01 psch well, .WHAT anywhere in a space-y method call chain didn't work with the original commit either
16:01 psch so it's at least not a regression
16:01 AlexDaniel okay, interesting
16:01 psch probably 'cause .WHAT doesn't go the normal QAST::Op(:op<callmethod>,...) route
16:02 moritz right, it's macro-Y
16:02 psch which fits the error message, 'cause we apparently build such an Op but don't populate the children correctly, because .WHAT isn't a method that can be called with callmethod
16:04 hankache what is a slip?
16:04 hankache the result of flattening?
16:05 hankache m: say (|^10).WHAT
16:05 camelia rakudo-moar 2f9199: OUTPUT«(Slip)␤»
16:05 AlexDaniel m: say 5 . WHICH
16:05 camelia rakudo-moar 2f9199: OUTPUT«Int|5␤»
16:05 hankache and what's the difference between slip and list
16:05 hankache ?
16:05 pyrimidine I'm seeing an error pop up that appears to be from precomp: https://gist.github.com/cjf​ields/ebe5d55f76041b34e6eb
16:07 pyrimidine The plugin in this case is loaded dynamically here: https://github.com/cjfields/bioperl​6/blob/master/lib/Bio/SeqIO.pm6#L36
16:09 pyrimidine Based on the timing, I think it's in the plugin, not in SeqIO.  any way to debug this?
16:09 Skarsnik No idea, there is this bug with other method in similar code
16:10 nine pyrimidine: perl6 --ll-exception might give us further information
16:10 pyrimidine nine: will give that a try
16:11 marchelzo is lines()[0] the best way to read one line?
16:12 ugexe .get
16:12 marchelzo ugexe: thanks
16:13 FROGGS joined #perl6
16:14 AlexDaniel by the way, what is 「.?」 ?
16:14 AlexDaniel m: Nil.?say
16:14 camelia rakudo-moar 2f9199: OUTPUT«Nil␤»
16:14 ugexe call method say if it exists
16:14 AlexDaniel right
16:14 AlexDaniel thanks
16:15 pyrimidine nine: bingo, worked, see second gist here: https://gist.github.com/cjfields/ebe5d55f760​41b34e6eb#file-run-using-perl6-ll-exception
16:19 pyrimidine nine: I suppose I could also submit as a bug.  Strangely enough it appears to work, but I do see some oddities with the class in the plugin which I need to diagnose a bit more.  Could try turning off precomp for that module, see if it fixes the issue
16:23 psch m: say ({ a => 1, b => 2 }).WHAT
16:23 camelia rakudo-moar 2f9199: OUTPUT«(Hash)␤»
16:23 psch hm
16:24 psch that's really weird
16:25 psch like, i've added on line to Perl6::Actions.pblock, and that makes that bit of code say (Block) instead
16:25 [Coke] ORMS: just say no.
16:26 joeschmoe joined #perl6
16:26 psch huh, maybe not...
16:26 [Coke] jnthn++ #experimental!
16:26 zengargoyle joined #perl6
16:28 joeschmoe m: 'oldstring' ~~ 's/oldstring/newstring/'; .say
16:28 camelia rakudo-moar 2f9199: OUTPUT«(Any)␤»
16:29 joeschmoe I want it to say newstring what am i doing wrong
16:30 ilmari m: $_ = 'oldstring'; s/oldstring/newstring/; .say
16:30 camelia rakudo-moar 2f9199: OUTPUT«newstring␤»
16:30 joeschmoe thanks i was missing $_ =
16:30 joeschmoe the default variable
16:31 ilmari also, you were just smart-matching one string against another
16:31 FROGGS joeschmoe: don't wrap your regexes in quotes
16:32 FROGGS m: 'oldstring' ~~ s/oldstring/newstring/; .say
16:32 camelia rakudo-moar 2f9199: OUTPUT«Cannot modify an immutable Str␤  in block <unit> at /tmp/ZQt37OfOCc:1␤␤»
16:32 joeschmoe m: 'oldstring' ~~ s/oldstring/newstring/; .say
16:32 camelia rakudo-moar 2f9199: OUTPUT«Cannot modify an immutable Str␤  in block <unit> at /tmp/4W8daPWGUs:1␤␤»
16:32 Hotkeys hello people of perland
16:32 joeschmoe m: $_ = 'oldstring' ~~ s/oldstring/newstring/; .say
16:32 camelia rakudo-moar 2f9199: OUTPUT«Cannot modify an immutable Str␤  in block <unit> at /tmp/p2yDVz2SiK:1␤␤»
16:32 FROGGS joeschmoe: use the .subst method if you want to operate on constant strings
16:32 psch hrm, how *does* pblock know if it's a Block or a Hash..? :/
16:32 FROGGS psch: it guesses
16:33 joeschmoe m: $_ = 'oldstring';s/oldstring/newstring/; .say
16:33 camelia rakudo-moar 2f9199: OUTPUT«newstring␤»
16:33 ab6tract joined #perl6
16:33 joeschmoe yeah i did it
16:33 ab6tract o/
16:33 FROGGS psch: grep for 'is_hash' in the actions
16:34 psch FROGGS: ahh, that helps.  although i don't know if that's too late to attach the p6typecheckrv...
16:35 rhr joined #perl6
16:35 psch but that does explain why everything turned into Blocks for me with adding the p6typecheckrv in pblock
16:36 joeschmoe m: $_ = 'oldstring';d/old/; .say
16:36 camelia rakudo-moar 2f9199: OUTPUT«5===SORRY!5=== Error while compiling /tmp/AlXlGaNaWQ␤Missing required term after infix␤at /tmp/AlXlGaNaWQ:1␤------> 3$_ = 'oldstring';d/old/7⏏5; .say␤    expecting any of:␤        prefix␤        term␤»
16:37 joeschmoe what is the delete letter substitute is s/../ what is delete
16:38 marchelzo joined #perl6
16:38 marchelzo how reverse a Str?
16:38 marchelzo I'm a native English speaker, I swear.
16:38 FROGGS m: say 'hello'.flip
16:38 camelia rakudo-moar 2f9199: OUTPUT«olleh␤»
16:39 FROGGS marchelzo: ^^
16:39 marchelzo ah, so _that's_ what flip does
16:39 FROGGS :D
16:39 psch m: $_ = "foo"; tr:d/o//; .say
16:39 camelia rakudo-moar 2f9199: OUTPUT«f␤»
16:39 marchelzo is flip only for strings?
16:39 psch m: $_ = "foo"; tr:d/o/u/; .say
16:39 camelia rakudo-moar 2f9199: OUTPUT«fuu␤»
16:39 psch hm
16:39 marchelzo I was thinking .comb.reverse.join
16:39 psch i thought i had implemented tr:d :o
16:39 lucasb joined #perl6
16:39 FROGGS marchelzo: I think so... .reverse is for lists
16:40 joeschmoe so i need tr:
16:40 _nadim Hi, there a class that is either a Str or an Int?
16:40 ilmari m: 'hello'.comb.reverse.join.say
16:40 camelia rakudo-moar 2f9199: OUTPUT«olleh␤»
16:40 mrf _nadim: Cool
16:40 mrf IIRC
16:40 FROGGS _nadim: can you rephrase that?
16:40 _nadim thanks
16:41 FROGGS m: say Str.^mro;
16:41 ilmari m: <42>.WHAT.say
16:41 camelia rakudo-moar 2f9199: OUTPUT«((Str) (Cool) (Any) (Mu))␤»
16:41 camelia rakudo-moar 2f9199: OUTPUT«(IntStr)␤»
16:41 _nadim is there a class that can contain a Str or an Int
16:41 FROGGS m: say Int.^mro;
16:41 camelia rakudo-moar 2f9199: OUTPUT«((Int) (Cool) (Any) (Mu))␤»
16:41 psch m: my $x = <5>; say $x.isa(Str); say $x.isa(Int)
16:41 camelia rakudo-moar 2f9199: OUTPUT«True␤True␤»
16:41 ilmari m: say IntStr.^mro
16:41 camelia rakudo-moar 2f9199: OUTPUT«((IntStr) (Int) (Str) (Cool) (Any) (Mu))␤»
16:41 FROGGS _nadim: an IntStr is basically a string that look like an Int
16:42 mrf I thought IntStr was for quoted numbers. rather than Int || Str.
16:42 joeschmoe m: $_ = "your dumb smart"; tr:d/d*b//; .say
16:42 camelia rakudo-moar 2f9199: OUTPUT«your um smart␤»
16:42 joeschmoe yeah i did it cool
16:43 joeschmoe what is the "tr:" thing called
16:43 FROGGS translate
16:43 joeschmoe got it
16:44 joeschmoe thanks Froggs and psch
16:45 joeschmoe m: $_ = "your dumb smart"; tr:d/r*s//; .say
16:45 camelia rakudo-moar 2f9199: OUTPUT«you dumb mat␤»
16:45 joeschmoe m: $_ = "your dumb smart"; tr:d/d..b//; .say
16:45 camelia rakudo-moar 2f9199: OUTPUT«your dumb smart␤»
16:46 RabidGravy okay let's try this all again
16:46 joeschmoe m: $_ = "your dumb smart"; tr:d/dumb//; .say
16:46 camelia rakudo-moar 2f9199: OUTPUT«yor  sart␤»
16:46 AlexDaniel you need substitute I guess
16:46 joeschmoe m: $_ = "your dumb smart"; tr:d/"dumb"//; .say
16:46 camelia rakudo-moar 2f9199: OUTPUT«yor  sart␤»
16:46 AlexDaniel m: $_ = "your dumb smart"; s/dumb\s+//; .say
16:46 camelia rakudo-moar 2f9199: OUTPUT«your smart␤»
16:47 FROGGS you're*
16:47 FROGGS (btw)
16:47 joeschmoe Your're smart FROGGS
16:47 n0tjack joined #perl6
16:47 FROGGS :P
16:48 AlexDaniel FROGGS: well, unless you copy-paste it
16:48 znpy joined #perl6
16:49 joeschmoe So my ultimate goal is to get rid of all the tracking junk in google links via a regex so i can copy and paste it into instapaper
16:49 AlexDaniel m: $_ = "your dumb smart"; s/dumb\s+//; "$_ dog".say
16:49 camelia rakudo-moar 2f9199: OUTPUT«your smart dog␤»
16:49 marchelzo Why doesn't this work? (*.sort)([1,3,1])
16:49 AlexDaniel marchelzo: what is it supposed to do?
16:50 marchelzo AlexDaniel: be equivalent to [1,3,1].sort
16:50 AlexDaniel m: sort([1,3,1]).say
16:50 camelia rakudo-moar 2f9199: OUTPUT«(1 1 3)␤»
16:50 joeschmoe That's good Alex
16:50 marchelzo AlexDaniel: I'm not woried about how to actually sort the list, I'm just trying to learn how the Whatever star works.
16:51 psch m: say (*.sort)([1,3,1]) # ...?
16:51 camelia rakudo-moar 2f9199: OUTPUT«(1 1 3)␤»
16:51 marchelzo when I tried it in the repl it said: cannot stringify this
16:51 marchelzo I didn't use say, though.
16:52 psch m: say (*.sort)([1,3,1]).WHAT # ...?
16:52 camelia rakudo-moar 2f9199: OUTPUT«()␤»
16:52 marchelzo Why does that make a difference?
16:52 psch m: say ((*.sort)([1,3,1])).WHAT # ...?
16:52 camelia rakudo-moar 2f9199: OUTPUT«()␤»
16:52 ZoffixW joined #perl6
16:52 AlexDaniel what is () ?
16:52 ZoffixW m: say ٦1٥٠3 + ٤६੬៩ - ৭۹੧
16:52 camelia rakudo-moar 2f9199: OUTPUT«65381␤»
16:52 * ZoffixW grins
16:52 psch marchelzo: no idea, the REPL has been in varying states of weird for pretty much ever
16:53 marchelzo psch: ok, well I'm glad that my intuition was right
16:57 prammer joined #perl6
16:58 TimToady m: say Q{\\} ~~ /「\\」/
16:58 camelia rakudo-moar 2f9199: OUTPUT«「\\」␤»
16:58 TimToady grondilu: ^^
16:59 TimToady m: say 「\\」 ~~ /「\\」/
16:59 camelia rakudo-moar 2f9199: OUTPUT«「\\」␤»
17:00 AlexDaniel m: say 「hello world」
17:00 camelia rakudo-moar 2f9199: OUTPUT«hello world␤»
17:00 AlexDaniel what's the difference between 「」 and ‘’?
17:01 TimToady single quotes still recognize a few backslashes
17:01 TimToady in particluar, the trailing quote, and backslash itself
17:01 AlexDaniel m: say 'hello \\ world'
17:01 camelia rakudo-moar 2f9199: OUTPUT«hello \ world␤»
17:01 AlexDaniel m: say 「hello \\ world」
17:01 camelia rakudo-moar 2f9199: OUTPUT«hello \\ world␤»
17:02 psch and \qq
17:02 AlexDaniel right
17:02 TimToady 「\\」 is just the non-Texas version of Q[\\]
17:02 psch m: say 'a \qq[\c[SNOWMAN]]'
17:02 camelia rakudo-moar 2f9199: OUTPUT«a ☃␤»
17:04 TimToady m: say 'a pair of \Q[\\]'  # aww
17:04 camelia rakudo-moar 2f9199: OUTPUT«a pair of \Q[\]␤»
17:05 marchelzo Why is +(123.List) == 1?
17:05 AlexDaniel marchelzo: only one element in the list
17:05 marchelzo >.<
17:05 marchelzo that's obvious
17:05 marchelzo sorry
17:05 ilmari marchelzo: because a list in numeric context is the number of elements
17:05 AlexDaniel m: say +[8, 25, 42]
17:05 camelia rakudo-moar 2f9199: OUTPUT«3␤»
17:05 RabidGravy I'm glad panda-test is working again
17:06 AlexDaniel ilmari: sounds very p5-ish :)
17:06 ilmari m: say ~[3,5,7]
17:06 camelia rakudo-moar 2f9199: OUTPUT«3 5 7␤»
17:06 AlexDaniel m: say ?[3,5,7]
17:06 camelia rakudo-moar 2f9199: OUTPUT«True␤»
17:06 lizmat m: say [+] 3,4,7
17:06 camelia rakudo-moar 2f9199: OUTPUT«14␤»
17:07 lizmat m: say [**] 3,4,7
17:07 camelia rakudo-moar 2f9199: OUTPUT«14277012078932958292545728220963156039​146684385107531439710010742593593965793896998​206271672402915157798364666272270915342328125​713571309693158181880292432777662892108597723​225727193185114625431380409553674933311145415​81266774920391602594047652970259262924…»
17:07 lizmat afk for a bit&
17:07 AlexDaniel m: say [R**] 2,32
17:07 camelia rakudo-moar 2f9199: OUTPUT«1024␤»
17:07 dj_goku .messages
17:10 AlexDaniel m: say [infix:<+>] 2,4,8
17:10 camelia rakudo-moar 2f9199: OUTPUT«5===SORRY!5=== Error while compiling /tmp/pA5leA_W3x␤Two terms in a row␤at /tmp/pA5leA_W3x:1␤------> 3say [infix:<+>]7⏏5 2,4,8␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤     …»
17:10 Ven joined #perl6
17:10 AlexDaniel is there any way to make it work?
17:10 TimToady m: say [[&infix:<+>]] 2,4,8
17:10 camelia rakudo-moar 2f9199: OUTPUT«14␤»
17:10 AlexDaniel why double [[]]?
17:10 psch m: say 2 [&infix:<+>] 2
17:10 camelia rakudo-moar 2f9199: OUTPUT«4␤»
17:11 TimToady outer one is reduce, inner one turns function into infix
17:11 TimToady only works with & though
17:12 rurban joined #perl6
17:13 lucasb m: say List.()
17:13 camelia rakudo-moar 2f9199: OUTPUT«()␤»
17:13 lucasb m: say List.new.()
17:13 camelia rakudo-moar 2f9199: OUTPUT«Invocant requires a type object of type List, but an object instance was passed.  Did you forget a 'multi'?␤  in block <unit> at /tmp/UwnVEiNbnS:1␤␤»
17:13 TimToady m: say [[&[+]]] 2,4,8
17:13 camelia rakudo-moar 2f9199: OUTPUT«5===SORRY!5=== Error while compiling /tmp/sL27fn93sc␤Unable to parse expression in bracketed infix; couldn't find final ']' ␤at /tmp/sL27fn93sc:1␤------> 3say [[&7⏏5[+]]] 2,4,8␤»
17:13 lucasb List needs to answer to 'call me' for some reason?
17:13 CIAvash RabidGravy: when I tried to install HTTP::UserAgent, I was getting the same error as travis, now after your change I'm getting this: # Block Code Any Mu
17:13 CIAvash Default constructor for 'Block' only takes named arguments
17:13 CIAvash in block <unit> at t/030-cookies.t:172
17:14 _nadim can't call method 'perl' on a null object. what's a null object?
17:14 dj_goku m: say [+] [1, 2, 3]
17:14 camelia rakudo-moar 2f9199: OUTPUT«6␤»
17:14 RabidGravy which is odd, which is quite what I expected to get but it passes now
17:14 AlexDaniel _nadim: what is the code? :)
17:14 dj_goku m: say [+] 1,2,3
17:14 camelia rakudo-moar 2f9199: OUTPUT«6␤»
17:15 RabidGravy CIAvash, I would suggest getting a new rakudo as it isn't doing it now
17:16 TimToady m: say 2 [&[+]] 2
17:16 camelia rakudo-moar 2f9199: OUTPUT«5===SORRY!5=== Error while compiling /tmp/w6sedakjos␤Unable to parse expression in bracketed infix; couldn't find final ']' ␤at /tmp/w6sedakjos:1␤------> 3say 2 [&7⏏5[+]] 2␤»
17:16 TimToady hmm, I wonder why that doesn't work
17:16 AlexDaniel how can a postfix take two parameters?
17:16 _nadim AlexDaniel: http://nopaste.linux-dev.org/?878914 just figuring out things
17:16 dj_goku .tell Zoffix just wanted to say thanks for the IRC Client advent post. I took the plung on prototyping a interacting with gearmand in perl6. I was able to get connected last night!
17:16 yoleaux dj_goku: I'll pass your message to Zoffix.
17:16 RabidGravy there's something righteously messed up here "Type check failed for return value; expected NativeCall::Types::CArray[uint8] but got NativeCall::Types::CArray[uint8].new"
17:17 AlexDaniel _nadim: can you golf it down?
17:17 marchelzo How can I do custom formatting with a list of say 2 things? Like ('Foo', '32').fmt('%s -> %d') or something.
17:18 marchelzo The above doesn't work, but maybe you can see what I mean.
17:18 egor joined #perl6
17:18 TimToady .tell masak I wouldn't mind a golf of the failure, or better yet, a spectest
17:18 yoleaux TimToady: I'll pass your message to masak.
17:19 _nadim AlexDaniel: yes but I have something else right now. but the my( [@a, @b, @c]) = ... is the place that bombs it I think
17:19 CIAvash RabidGravy: I tried after updating rakudo. Do I need to uninstall and reinstall rakudo?
17:19 psch m: printf '%s -> %d', |('Foo', '32')
17:19 camelia rakudo-moar 2f9199: OUTPUT«Foo -> 32»
17:19 BuildTheRobots joined #perl6
17:19 AlexDaniel m: say sprintf("%s → %s", [42, 69])
17:19 camelia rakudo-moar 2f9199: OUTPUT«42 → 69␤»
17:20 marchelzo hmm
17:20 AlexDaniel m: say sprintf("%s → %s", [42, 69, 20])
17:20 camelia rakudo-moar 2f9199: OUTPUT«Directives specify 2 arguments, but 3 arguments were supplied␤␤»
17:20 _nadim sub xxx { my @a, @b, @c ... return @a,@b,@c) .... my (@a, @b, @c) = xxx.  @a gobbles it all, how does one write that?
17:21 AlexDaniel return [@a, @b, @c] perhaps?
17:21 zakharyas joined #perl6
17:21 _nadim Nope, I tried that first
17:21 RabidGravy CIAvash, I don't know, I couldn't replicate locally which is why I put that diag in
17:22 lucasb ^^ I found strange that sprintf flattened the list second argument
17:22 [Coke] /home/coke/sandbox/perl6-roast-d​ata/rakudo.moar-jit/perl6.moarvm t/spec/integration/advent2013-day14.t hanging again in daily test run
17:23 AlexDaniel _nadim: Ok I'm looking into it
17:23 dalek perl6-roast-data: d4dc4cb | coke++ | / (9 files):
17:23 dalek perl6-roast-data: today (automated commit)
17:23 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/d4dc4cb6ac
17:23 tadzik pdcawley_ moritz timotimo: I just learned, from a fellow anthropologist, that they often specifically mark each use of "men" in articles with a note saying "I'm using it as «people» rather than «male specimen»", or so
17:23 tadzik quite interesting
17:23 xtreak joined #perl6
17:23 psch m: sub f { [1,2,3],[4,5,6],[7,8,9] }; my ($a, $b, $c) = f; say $a
17:23 camelia rakudo-moar 2f9199: OUTPUT«[1 2 3]␤»
17:24 marchelzo Is there any way to get more detailed error messages? I get an error and it doesn't even tell me the line number.
17:24 lucasb I think just changing "men" to "dudes" would sound more inclusive :D
17:24 marchelzo "Directives specify 2 arguments, but 1 argument was supplied" is all it says.
17:24 [Coke] marchelzo: with printf*? known issue.
17:25 _nadim AlexDaniel: doin ($a $b, $c) = xxxx()  works but that is not what I want to do
17:25 AlexDaniel [Coke]: is it rakudobugged?
17:25 AlexDaniel _nadim: see psch answer ↑
17:25 marchelzo [Coke]: why does it only affect printf*?
17:25 AlexDaniel _nadim: aaah
17:25 [Coke] AlexDaniel: https://rt.perl.org/Ticket/Display.html?id=126063
17:25 AlexDaniel _nadim: that is not what you want… OK I have to learn to read :)
17:26 domidumont joined #perl6
17:26 [Coke] marchelzo: implementation detail
17:26 psch _nadim: what do you want to do?
17:26 marchelzo Is printf implemented in perl6 or in C?
17:26 psch marchelzo: in NQP, almost completely
17:26 [Coke] marchelzo: NQP
17:26 psch marchelzo: so, of those two options, Perl 6 is the correcter one
17:27 molaf_ joined #perl6
17:27 [Coke] jnthn: we need to find one of your old slide decks that shows the structure of rakudo (inc. moar, nqp, etc.) and throw that on perl6.org somewhere. or rakudo.org
17:28 [Coke] mainly for the ongoing Endless Christmas.
17:28 AlexDaniel m: my ([@a]) = 1; say @a.perl; # here is the “null object” thing
17:28 camelia rakudo-moar 2f9199: OUTPUT«Cannot call method 'perl' on a null object␤  in block <unit> at /tmp/4f49kOW4_t:1␤␤»
17:28 marchelzo does all perl6 get compiled to NQP as an IR before becoming moar bytecode? Is it meant to be written by humans?
17:29 [Coke] doesn't get compiled to nqp, no.
17:29 AlexDaniel HOORAY
17:29 AlexDaniel SEGMENTATION FAULT!
17:29 AlexDaniel m: my ([@a]) = 1; say @a.WHAT;
17:29 camelia rakudo-moar 2f9199: OUTPUT«(signal SEGV)»
17:29 TimToady jnthn: I do think we should consider renaming 'experimental' to 'MONKEY-AROUND', or maybe just 'MONKEY', on the theory that a quick audit of a project for dangerous code can just grep for MONKEY
17:29 marchelzo [Coke]: So where does nqp come from?
17:30 psch [Coke]: rakudo/docs/ has architecture.html and *.svg, maybe those are a start
17:30 AlexDaniel _nadim: so your null object finding is a bit more serious that it seemed :)
17:31 AlexDaniel _nadim: I don't think that it is critical, but it should not segfault anyway
17:31 TimToady if we then declare EVAL to be dangerous, we can also have MONKEY-SEE-NO-EVAL  :)
17:31 geekosaur rakudo perl6 is written in nqp
17:31 zengargoyle lol
17:31 [Coke] marchelzo: read http://www.jnthn.net/papers/2013-apw-lessons.pdf
17:31 AlexDaniel geekosaur: again… not true!
17:31 AlexDaniel geekosaur: it is NQP and Perl 6
17:32 [Coke] marchelzo: crap, that's not right. one sec.
17:33 lucasb you mean these? http://edumentab.github.io/rak​udo-and-nqp-internals-course/
17:33 [Coke] jnthn++ has so many slide decks, I'm trying to scan for the one that has the diagram that i think will help explain.
17:33 * psch thinks https://github.com/rakudo/rakudo​/blob/nom/docs/architecture.svg is pretty good
17:33 zengargoyle nqp == perl 6 for suitably augmented versions of nqp. :P
17:33 AlexDaniel .oO( can we declare “shell” to be dangerous and have MONKEY-SHELL ? )
17:37 * [Coke] gives up trying to find the slides in particular he was looking for, ah well.
17:37 marchelzo [Coke]: heh I went through that entire set of slides trying to find NQP
17:38 TimToady we should gather up all the known monkey idioms in a list somewhere...
17:38 marchelzo psch: does (NQP) mean the component is implemented in NQP?
17:39 marchelzo or does it mean the code is represented as NQP during that phase
17:39 TimToady monkey-shine, monkey-business...
17:39 domidumont joined #perl6
17:40 TimToady .oO(use FLYING-BUTT-MONKEY)
17:41 psch marchelzo: no to the latter, yes to the former.  the language in parens is what code that handles that stage is written in
17:41 [Coke] jnthn: is there a version of http://www.jnthn.net/papers/2013-yapceu-jvm.pdf but for moarvm?
17:41 psch marchelzo: as in, the parser and actions are written in NQP, the CORE.setting is written in Per l6
17:41 Hotkeys when should one use parens for function calls? "foo($x)" vs "foo $x"
17:42 TimToady when one wishes to guard against a future keyword "foo"
17:42 leont joined #perl6
17:42 marchelzo psch: I see
17:42 TimToady when one wishes to extend the expression with another .bar
17:43 AlexDaniel .oO( oh! MONKEY-HELL for shell! )
17:43 TimToady though of course there's also the option (foo $x).bar in that case
17:43 TimToady shades of Lisp
17:43 AlexDaniel .oO( might also make sense to rename shell to hell )
17:44 Hotkeys mmkay
17:45 AlexDaniel .oO( hell-out-of(“ls”) )
17:45 * pdcawley_ afk calling it a day, but I'll be in tomorrow morning to make up some time after my cold.
17:46 TimToady o/
17:46 [Coke] TimToady: S03-metaops/reverse.t has a passing test that might be a result of your work.
17:46 RabidGravy oh deary, deary me
17:46 RabidGravy perl6 -Ilib t/030-cookies.t
17:46 RabidGravy ===SORRY!===
17:46 RabidGravy Cannot find method 'run_alt'
17:47 cdg joined #perl6
17:47 TimToady hmm, I have a bunch of new tests there that I forgot to check in
17:47 cdg joined #perl6
17:47 RabidGravy I think that rakudo is completely messed up right now
17:48 AlexDaniel RabidGravy: you mean, after curli?
17:49 RabidGravy nope in the last hour or so
17:50 RabidGravy This is rakudo version 2015.11-443-gc769890 built on MoarVM version 2015.11-34-gc3eea17 implementing Perl v6.b.
17:50 RabidGravy [jonathan@cannibal http-useragent]$ perl6 -Ilib t/030-cookies.t
17:50 RabidGravy 1..29
17:50 RabidGravy ok 1 - new 1/3
17:51 RabidGravy This is rakudo version 2015.11-444-g2f91998 built on MoarVM version 2015.11-34-gc3eea17 implementing Perl v6.b.
17:51 moritz m: say <a b c>.roll(*).elems
17:51 camelia rakudo-moar 2f9199: OUTPUT«Cannot .elems a lazy list␤  in block <unit> at /tmp/uQ_R9jGw_Q:1␤␤Actually thrown at:␤  in block <unit> at /tmp/uQ_R9jGw_Q:1␤␤»
17:52 ZoffixW joined #perl6
17:52 RabidGravy # Block Code Any Mu
17:52 RabidGravy Default constructor for 'Block' only takes named arguments
17:52 RabidGravy in block <unit> at t/030-cookies.t:172
17:52 moritz m: say <a b c>.roll(*).rotor(5)[^10]
17:52 camelia rakudo-moar 2f9199: OUTPUT«((b a c a a) (b b b b b) (c c a c b) (c a a c a) (a c c a a) (c a b b a) (b c c b c) (c b b a a) (c a c c b) (b a b c a))␤»
17:52 ZoffixW RabidGravy, if that run_alt resurfaces, you may wanna comment on this ticket: https://rt.perl.org/Ticket/Display.html?id=126832 I had the exact same issue when installing a module with panda, though cloning a repo and installing from current dir worked
17:52 AlexDaniel _nadim: https://rt.perl.org/Public/​Bug/Display.html?id=126857
17:53 RabidGravy okay it's something to do with the presense of blib
17:54 marchelzo how do you append two lists?
17:54 ZoffixW marchelzo, .append ?
17:54 marchelzo there's no infix operator?
17:55 AlexDaniel m: say append([1, 2, 3], [10, 11, 12])
17:55 camelia rakudo-moar 2f9199: OUTPUT«[1 2 3 10 11 12]␤»
17:56 ZoffixW m: say [1, 2, 3] .append: [10, 11, 12]
17:56 camelia rakudo-moar 2f9199: OUTPUT«[1 2 3 10 11 12]␤»
17:56 ZoffixW look! infix! :D
17:56 AlexDaniel ZoffixW: hahahaha
17:56 marchelzo lol
17:58 ZoffixW m: sub infix:<»«> ($l1, $l2) { [|$l1, |$l2] }; say [1, 2, 3] »« [10, 11, 12]
17:58 camelia rakudo-moar 2f9199: OUTPUT«[1 2 3 10 11 12]␤»
17:59 AlexDaniel ZoffixW: why not call it A :)
17:59 ZoffixW m: sub infix:<¯\_(ツ)_/¯> ($l1, $l2) { [|$l1, |$l2] }; say [1, 2, 3] ¯\_(ツ)_/¯ [10, 11, 12]
17:59 camelia rakudo-moar 2f9199: OUTPUT«[1 2 3 10 11 12]␤»
18:00 moritz autarch: is your advent post for day 11 ready? because if yes, I'd like to post it tomorrow already (swap days 10 and 11)
18:00 autarch moritz: one person reviewed it, I wouldn't mind another reviewed, but otherwise yes
18:00 gfldex m: my @a = 1,2,3; @a[*-1] = |(11,22,33); dd @a;
18:00 camelia rakudo-moar 2f9199: OUTPUT«Array $var = $[1, 2, (11, 22, 33)]␤»
18:01 gfldex why does that refuse to slip?
18:01 gfldex m: my @a = 1,2,3; @a.push(|(11,22,33)); dd @a;
18:01 camelia rakudo-moar 2f9199: OUTPUT«Array $var = $[1, 2, 3, 11, 22, 33]␤»
18:01 marchelzo How can I do something like this? for lines() { /(<digit>+) (<alpha>+)/; say $1; }
18:01 TimToady note that .append is mutating the left arg
18:01 geekosaur I would suspect that you are telling it to assign to an element
18:01 marchelzo I keep getting Nil for $1.
18:01 AlexDaniel m: sub infix:<¯\_(ツ)_/¯> ($a, $b) { [$a, $b].pick }; say 42 ¯\_(ツ)_/¯ 69
18:01 camelia rakudo-moar 2f9199: OUTPUT«69␤»
18:02 AlexDaniel m: sub infix:<¯\_(ツ)_/¯> ($a, $b) { [$a, $b].pick }; say 42 ¯\_(ツ)_/¯ 69
18:02 camelia rakudo-moar 2f9199: OUTPUT«42␤»
18:02 ZoffixW marchelzo, first match is $0
18:02 marchelzo ZoffixW: I know, but $1 should still be defined shouldn't it?
18:03 ZoffixW m: for 'nope'  { /(<digit>+) (<alpha>+)/; say $1; }
18:03 camelia rakudo-moar 2f9199: OUTPUT«Nil␤»
18:03 ZoffixW m: for '42nope'  { /(<digit>+) (<alpha>+)/; say $1; }
18:03 camelia rakudo-moar 2f9199: OUTPUT«「nope」␤ alpha => 「n」␤ alpha => 「o」␤ alpha => 「p」␤ alpha => 「e」␤»
18:03 marchelzo oh, I know the problem
18:03 ZoffixW \o/
18:03 marchelzo my input didn't actually match the regex
18:03 ZoffixW :)
18:04 moritz autarch: ok, I'll review and swap dates
18:04 autarch moritz: thanks
18:07 RabidGravy ah, the random "Use of uninitialized value %ENV of type Any in string context" is coming out of qqx/ .../ here
18:08 dalek mu: 81d2e76 | moritz++ | misc/perl6advent-2015/schedule:
18:08 dalek mu: Perl 6 advent: Swap days 10 and 11
18:08 dalek mu: review: https://github.com/perl6/mu/commit/81d2e76063
18:08 dalek mu: 92dc957 | moritz++ | misc/perl6advent-2015/schedule:
18:08 dalek mu: Perl 6 advent: Update post title for day 10
18:08 dalek mu: review: https://github.com/perl6/mu/commit/92dc9570da
18:09 TimToady m: say WHAT ((*.sort)([1,3,1]))
18:09 camelia rakudo-moar 2f9199: OUTPUT«(List)␤»
18:09 gfldex m: my @a = |(1,2,3); my @b; @b[0] = |(1,2,3); dd @a, @b;
18:09 camelia rakudo-moar 2f9199: OUTPUT«Array $var = $[1, 2, 3]␤Array $var = $[(1, 2, 3),]␤»
18:10 masak TimToady: ok. I have some time tonight; I'll get on it.
18:10 yoleaux 17:18Z <TimToady> masak: I wouldn't mind a golf of the failure, or better yet, a spectest
18:11 TimToady thanks
18:11 AlexDaniel j: my ([$a]); $a.WHAT
18:11 camelia rakudo-jvm 6c0f93: OUTPUT«java.lang.NullPointerException␤  in block <unit> at /tmp/y_AIDyesNw:1␤␤»
18:11 RabidGravy it's possible that "use NativeCall; say CArray[uint8].new ~~ CArray[uint8]" may not work when precompiled
18:12 moritz autarch: I've read your advent post, and liked it. I changed one link from http to https, that's all :-)
18:12 marchelzo anyone know a nice way to turn (a, b, c, d) into ((a, b), (b, c) (c, d))?
18:13 TimToady m: my $f = (*.sort)([1,3,1]); say $f.WHAT
18:13 camelia rakudo-moar 2f9199: OUTPUT«()␤»
18:13 TimToady m: my $f = (*.sort)([1,3,1]); say $f
18:13 moritz m: say <a b c d>.rotor(2, -1).perl
18:13 camelia rakudo-moar 2f9199: OUTPUT«Cannot find method 'gist': no method cache and no .^find_method␤  in block <unit> at /tmp/wfsqiIAVuD:1␤␤»
18:13 camelia rakudo-moar 2f9199: OUTPUT«Cannot have elems < 1, did you mean to specify a Pair with => -1?␤  in block <unit> at /tmp/00fEQdi9bR:1␤␤»
18:13 moritz m: say <a b c d>.rotor(2 => -1).perl
18:13 camelia rakudo-moar 2f9199: OUTPUT«(("a", "b"), ("b", "c"), ("c", "d")).Seq␤»
18:13 moritz marchelzo: ^^
18:14 marchelzo amazing
18:14 gfldex m: my @b; @b = @b.list, |(1,2,3); dd @b; say @b;
18:14 camelia rakudo-moar 2f9199: OUTPUT«Array $var = (my \Array_74891312 = $[Array_74891312, 1, 2, 3])␤(\Array_74891312 = [Array_74891312 1 2 3])␤»
18:14 gfldex is that intentional?
18:14 gfldex m: my @b; @b = @b, |(1,2,3); dd @b; say @b;
18:14 camelia rakudo-moar 2f9199: OUTPUT«Array $var = (my \Array_80543712 = $[Array_80543712, 1, 2, 3])␤(\Array_80543712 = [Array_80543712 1 2 3])␤»
18:15 gfldex m: my @b; @b = @b, |(1,2,3); dd @b; put @b;
18:15 TimToady m: my $f = (*.sort)([1,3,1]); say $f.^name
18:15 camelia rakudo-moar 2f9199: OUTPUT«Array $var = (my \Array_57139168 = $[Array_57139168, 1, 2, 3])␤Memory allocation failed; could not allocate 29248 bytes␤»
18:15 camelia rakudo-moar 2f9199: OUTPUT«BOOTArray␤»
18:16 gfldex m: my @b; @b = @b, 1; put @b;
18:16 camelia rakudo-moar 2f9199: OUTPUT«Memory allocation failed; could not allocate 8192 bytes␤»
18:17 gfldex is that rakudos way of saying: "infinite recursion" ?
18:17 TimToady likely
18:17 gfldex i shall rakudobug
18:18 TimToady m: my $f = (*.sort)([1,3,1]); say $f.^name
18:18 camelia rakudo-moar 2f9199: OUTPUT«BOOTArray␤»
18:18 TimToady so shall I
18:18 ugexe are there any changes planed for Version, like restrictions/transformations on what is passed to .new? (i.e. should version comparison try to be smart such that ?(Version.new("v1.0") ~~ Version.new("1.0")))
18:19 ugexe i remember there was a discussion on it but i dont remember if anything came of it :(
18:19 autarch moritz: cool, thanks for reviewing it
18:20 autarch I note that the script I refer to at the end in my repo still fails with https://gist.github.com/au​tarch/1405c19f1ee561cb6fbd
18:20 gfldex m: my @b; @b[0] = |(1,2,3); dd @b; # my question if that's a bug still stands because i think it is
18:20 camelia rakudo-moar 2f9199: OUTPUT«Array $var = $[(1, 2, 3),]␤»
18:20 autarch would be nice to fix that
18:20 AlexDaniel m: my @b; @b = @b, 1; put @b;
18:20 autarch the script in question is at https://github.com/autarch/perl6-advent-201​5-article/blob/master/bin/pod-treewalker.p6
18:21 camelia rakudo-moar 2f9199: OUTPUT«Memory allocation failed; could not allocate 8192 bytes␤»
18:21 AlexDaniel oh come on! 8192 bytes!
18:21 b2gills In Perl 5 a list in scalar context will give the either the last element, or the number of elements; depending on if it is an immediate list or the result of a function call. Perl 6 returns the list itself, which in coercing numeric context always returns the number of elements.
18:21 autarch I am of course going afk - if someone figures out my issue please have a bot tell me ;)
18:22 b2gills That means it could not allocate an additional 8192 bytes
18:23 dalek rakudo/repository_registry: f729c17 | (Stefan Seifert)++ | src/core/CompUnit/RepositoryRegistry.pm:
18:23 dalek rakudo/repository_registry: Remove obsolete method ctxsave from CompUnit::RepositoryRegistry
18:23 dalek rakudo/repository_registry: review: https://github.com/rakudo/rakudo/commit/f729c17fad
18:23 dalek rakudo/repository_registry: 90da3cf | (Stefan Seifert)++ | / (3 files):
18:23 dalek rakudo/repository_registry: Move repository setup into CompUnit::RepositoryRegistry
18:23 dalek rakudo/repository_registry:
18:23 dalek rakudo/repository_registry: All code dealing with include specs is now in
18:23 dalek rakudo/repository_registry: CompUnit::RepositoryRegistry. This way we no longer need to make
18:23 dalek rakudo/repository_registry: SHORT-ID2CLASS, INCLUDE-SPEC2CUR and PARSE-INCLUDE-SPEC publicly
18:23 dalek rakudo/repository_registry: visible.
18:23 dalek rakudo/repository_registry:
18:23 dalek rakudo/repository_registry: %*CUSTOM_LIB<site> is now replaced by
18:23 dalek rakudo/repository_registry: %CompUnit::RepositoryRegistry​.repository-for-name('site')
18:23 dalek rakudo/repository_registry: review: https://github.com/rakudo/rakudo/commit/90da3cf54e
18:24 zengargoyle hrm, can you use self in a has?
18:24 nine TimToady: your commit d3c278d34e6da5b8b39b26bab32d6fcdf3e9a969 causes a regression in Inline::Perl5 where in a method self is a completely different object (higher up in the call stack) than the one the method was called on.
18:24 Skarsnik zengargoyle, probably
18:25 zengargoyle m: my class x { has $foo = self; };
18:25 camelia rakudo-moar 2f9199: ( no output )
18:25 zengargoyle yeah...
18:25 marchelzo Can someone help me understand why this isn't working? http://sprunge.us/jQPJ
18:26 AlexDaniel m: my @b; @b = @b, 1; say @b;
18:26 camelia rakudo-moar 2f9199: OUTPUT«(\Array_75579232 = [Array_75579232 1])␤»
18:26 marchelzo It says "WhateverCode object coerced to string".
18:26 AlexDaniel that's pretty cool though
18:26 Skarsnik m: class A { has $.self; method foo() {say self.self = "foo"}; my A $a = A.new; $a.foo();
18:26 camelia rakudo-moar 2f9199: OUTPUT«5===SORRY!5=== Error while compiling /tmp/cqxYXHzwMZ␤Missing block␤at /tmp/cqxYXHzwMZ:1␤------> 3elf = "foo"}; my A $a = A.new; $a.foo();7⏏5<EOL>␤»
18:26 Skarsnik m: class A { has $.self; method foo() {say self.self = "foo"}}; my A $a = A.new; $a.foo();
18:26 camelia rakudo-moar 2f9199: OUTPUT«Cannot modify an immutable Any␤  in method foo at /tmp/Ru2txYp6tp:1␤  in block <unit> at /tmp/Ru2txYp6tp:1␤␤»
18:26 ugexe *.say
18:26 psch m: *.say
18:26 camelia rakudo-moar 2f9199: ( no output )
18:26 psch m: { *.say }()
18:26 camelia rakudo-moar 2f9199: OUTPUT«5===SORRY!5=== Error while compiling /tmp/hg0Ckumkjy␤Malformed double closure; WhateverCode is already a closure without curlies, so either remove the curlies or use valid parameter syntax instead of *␤at /tmp/hg0Ckumkjy:1␤------> 3{ *.say }7…»
18:26 ugexe m: *.join('-')
18:26 camelia rakudo-moar 2f9199: ( no output )
18:26 ilmari m: class :: { method bar { 42 } has baz = self.bar + 3 }.new.baz
18:26 camelia rakudo-moar 2f9199: OUTPUT«5===SORRY!5=== Error while compiling /tmp/vqnYBhNO6l␤Strange text after block (missing semicolon or comma?)␤at /tmp/vqnYBhNO6l:1␤------> 3class :: { method bar { 42 }7⏏5 has baz = self.bar + 3 }.new.baz␤    expecting any of:␤        inf…»
18:26 Skarsnik m: class A { has $.self is rw; method foo() {say self.self = "foo"}}; my A $a = A.new; $a.foo();
18:26 camelia rakudo-moar 2f9199: OUTPUT«foo␤»
18:27 nine TimToady: With method call_context() { note self.^name }; I get the wrong self, while with method call_context(\SELF:) { note SELF.^name } it's correct!
18:27 ilmari m: class :: { method bar { 42 }; has $.baz = self.bar + 3 }.new.baz
18:27 camelia rakudo-moar 2f9199: ( no output )
18:27 ilmari m: class :: { method bar { 42 }; has $.baz = self.bar + 3 }.new.baz.say
18:27 camelia rakudo-moar 2f9199: OUTPUT«45␤»
18:27 ugexe m: my %x; %x{*.join('-')}
18:27 camelia rakudo-moar 2f9199: OUTPUT«WhateverCode object coerced to string (please use .gist or .perl to do that)  in block <unit> at /tmp/MUnHeYtLjD:1␤»
18:27 TimToady nine: is it in the lexical scope of any \self declaration?
18:28 marchelzo ugexe: ok, I see what the problem is
18:28 ugexe marchelzo: use a map block and $_ instead of *
18:28 marchelzo ugexe: yea
18:30 nine TimToady: only \self is in https://github.com/niner/Inline-Perl5/​blob/master/lib/Inline/Perl5.pm6#L969 and line 984 while the method in question is created by an EVAL in https://github.com/niner/Inline-Perl5/​blob/master/lib/Inline/Perl5.pm6#L520
18:30 marchelzo ugexe: hmm. now it says: "Use of uninitialized value of type Any in numeric context  in block" (line 12)
18:30 nine TimToady: note that the wrong self is the Perl6Callbacks object...the one where the EVAL that creates the method is run in
18:31 prammer joined #perl6
18:31 nine TimToady: Perl6Callbacks.create runs an EVAL that creates a class and the method of this class gets the Perl6Callbacks object as self instead of its own
18:32 TimToady ah, so there is already a self defined when it sees the EVAL's self, hmm, so it thinks someone said my \self = ...
18:32 nine yes, that sounds like it
18:32 TimToady maybe we'll need to back out the self part of that patch, and make self 'more reserved'
18:32 marchelzo Is there something like .sort for strings?
18:33 nine Better safe than sorry...
18:33 nine That one was quite a challenge to nail down :)
18:33 ugexe marchelzo: might try to name your outer map parameters in case you are stepping on $_ `.map(-> $arg { $arg ... })`
18:33 psch m: say <a c e b d>.sort
18:33 camelia rakudo-moar 2f9199: OUTPUT«(a b c d e)␤»
18:33 Skarsnik m: say "acebd".split('').sort;
18:33 camelia rakudo-moar 2f9199: OUTPUT«(  a b c d e)␤»
18:33 gfldex m: 'bca'.comb.sort.say;
18:33 camelia rakudo-moar 2f9199: OUTPUT«(a b c)␤»
18:34 gfldex m: 'bca'.comb.sort.join.say;
18:34 camelia rakudo-moar 2f9199: OUTPUT«abc␤»
18:34 AlexDaniel m: my @b; my @b[0] = @b
18:34 camelia rakudo-moar 2f9199: OUTPUT«5===SORRY!5===␤Cannot use variable @b in declaration to initialize itself␤at /tmp/aNwB2NF9OU:1␤------> 3my @b; my @b[0] = @7⏏5b␤    expecting any of:␤        term␤Other potential difficulties:␤    Redeclaration of symbol @b␤    at…»
18:34 gfldex i do agree that there should be Str::sort tho
18:35 psch m: say Str.^can('sort')
18:35 camelia rakudo-moar 2f9199: OUTPUT«(Method+{<anon|77418096>}.new)␤»
18:35 AlexDaniel m: my @b; my @a; my @a[0] = @b; my @b[0] = @a; say @b
18:35 camelia rakudo-moar 2f9199: OUTPUT«Potential difficulties:␤    Redeclaration of symbol @a␤    at /tmp/DVpk9qT3U5:1␤    ------> 3my @b; my @a; my @a[0]7⏏5 = @b; my @b[0] = @a; say @b␤    Redeclaration of symbol @b␤    at /tmp/DVpk9qT3U5:1␤    ------> 3my @b; my @a; my @a[0…»
18:35 AlexDaniel my favorite “Index 0 for dimension 1 out of range (must be 0..-1)” :)
18:36 ugexe m: my @b; my @a; @a[0] = @b; @b[0] = @a; say @b
18:36 camelia rakudo-moar 2f9199: OUTPUT«(\Array_74018864 = [[Array_74018864]])␤»
18:36 dalek rakudo/nom: 67749a7 | TimToady++ | src/Perl6/Grammar.nqp:
18:36 dalek rakudo/nom: make self non-overridable
18:36 dalek rakudo/nom:
18:36 dalek rakudo/nom: otherwise an EVAL creating a method within a method gets the wrong self
18:36 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/67749a7716
18:36 TimToady nine: ^^ should fix it
18:37 gfldex m: "bca".sort.say
18:37 camelia rakudo-moar 2f9199: OUTPUT«(bca)␤»
18:37 Ven joined #perl6
18:37 nine checking...
18:39 Hotkeys m: "bca".split.sort.join.say
18:39 camelia rakudo-moar 2f9199: OUTPUT«Cannot call split(Str: ); none of these signatures match:␤    (Cool $: Regex:D $pat, $limit = { ... };; :$all, *%_)␤    (Cool $: Cool:D $pat, $limit = { ... };; :$all, *%_)␤    (Str:D $: Regex:D $pat, $parts = { ... };; :$v is copy, :$k, :$kv, :$p, :…»
18:40 Hotkeys m: "bca".split('').sort.join.say
18:40 camelia rakudo-moar 2f9199: OUTPUT«abc␤»
18:40 dalek roast: 200ec05 | TimToady++ | S03-metaops/reverse.t:
18:40 dalek roast: test thunking of reversed logical ops
18:40 dalek roast: review: https://github.com/perl6/roast/commit/200ec05eb0
18:40 dalek roast: 6c2c99c | TimToady++ | S03-metaops/reverse.t:
18:40 dalek roast: fudge temporarily failing test
18:40 dalek roast: review: https://github.com/perl6/roast/commit/6c2c99c932
18:41 AlexDaniel m:  my @a; @a[0] = @b; @b[0] = @a; put @b
18:41 camelia rakudo-moar 2f9199: OUTPUT«5===SORRY!5=== Error while compiling /tmp/aT5vfdqkeN␤Variable '@b' is not declared␤at /tmp/aT5vfdqkeN:1␤------> 3my @a; @a[0] = 7⏏5@b; @b[0] = @a; put @b␤»
18:42 AlexDaniel m: my @b; my @a; @a[0] = @b; @b[0] = @a; put @b
18:42 camelia rakudo-moar 2f9199: OUTPUT«Memory allocation failed; could not allocate 49120 bytes␤»
18:42 nine \o/
18:43 nine TimToady++ # Inline::Perl5 works again :)
18:43 nine .tell [Tux] TimToady++ just fixed the rakudo regression that broke Inline::Perl5's t/v6.t
18:43 yoleaux nine: I'll pass your message to [Tux].
18:44 marchelzo Is anybody here doing the adventofcode.com challenges in perl6?
18:46 grondilu marchelzo: I do
18:46 TimToady is there a way to add [BUG] to an RT ticket I forgot to mark?
18:46 grondilu well, not everything works in Perl 6 though
18:48 grondilu I had to do day 4 in Perl 5, for instance.
18:48 grondilu and day 6
18:48 zengargoyle grondilu: now you can go back and use Inline::Perl5 :)
18:49 grondilu I've never used this.  How different is it from v5?
18:49 grondilu m: use v5;
18:49 camelia rakudo-moar 2f9199: OUTPUT«===SORRY!===␤Could not find Perl5:ver<True>:auth<True>:api<True> in:␤    /home/camelia/.perl6/2015.11-444-g2f91998␤    /home/camelia/rakudo-m-inst-2/share/perl6/site␤    /home/camelia/rakudo-m-inst-2/share/perl6/vendor␤    /home/camelia/rakudo-m-…»
18:49 zengargoyle no clue, i was just being snarky.
18:49 Ven joined #perl6
18:49 marchelzo grondilu: why?
18:49 grondilu Perl 6 was too slow
18:50 marchelzo yeah that's my problem right now
18:50 marchelzo brute force travelling salesman problem in perl6 isn't working out so well
18:51 nine grondilu: largest difference to v5 is that you can use all of CPAN with Inline::Perl5
18:52 nine TimToady: "Basics" in the menu, there you can edit the subject
18:52 grondilu marchelzo: that's day9 right?  I brute-forced it with in Perl 6.  Not very fast but reasonable.
18:52 xfix joined #perl6
18:52 grondilu on a Raspberry Pi even
18:53 prammer joined #perl6
18:53 grondilu marchelzo: make sure you have a recent rakudo, though.
18:54 marchelzo grondilu: how long did it take to execute for you?
18:55 marchelzo mine eventually finished but took several minutes
18:55 Ven joined #perl6
18:55 grondilu it did take a few minutes.  Just consider displaying progress.  When you see it not making any you can try what the program currently has as a minimum.  Worked for me.
18:56 marchelzo hmm
18:56 marchelzo I don't think my code is very good, but I'm tempted to port it to pypy3 just to see the speed difference.
18:56 koo8 joined #perl6
18:57 grondilu port it to Perl 5, you'll see enough of a difference.
18:57 RabidGravy jnthn, just added "use experimental to OO::Monitors" ;-)
18:57 marchelzo grondilu: I don't know Perl 5
18:58 masak m: say [&&] |0
18:58 camelia rakudo-moar 67749a: OUTPUT«0␤»
18:58 masak TimToady: ^
18:58 masak TimToady: that's the golf.
18:58 marchelzo at least not very well
18:58 masak TimToady: not sure where to add a spectest for that -- but I can, no problem :)
18:58 masak let's see if I can make it fail on the commit in question, but not elsewhere.
19:00 TimToady that's okay, I can put in a test as I fix it
19:00 masak TimToady: stacktrace: https://gist.github.com/masak/8fcd83e1054fc1e74e8c
19:00 masak TimToady: ok, then I leave it to you from this point on.
19:00 masak TimToady: I already found that at least `try EVAL` catches the bad mood and is testable.
19:00 TimToady I figured it probably had somethign to do with a slip
19:00 masak (see gist)
19:00 TimToady since the patch wants to take comma-args literally
19:01 TimToady at minimum I probably need to exempt slip arguments from thunking
19:02 masak TimToady: if you want to re-do your patch with the bug fixed, if you push it to a branch, I can test 007 on it before we merge to nom.
19:02 TimToady or just give up entirely on thunking lists if there's a slip anywhere
19:02 TimToady okay
19:03 masak I can show you the original un-golfed line of code
19:03 masak https://github.com/masak/007/blob/master​/lib/_007/Runtime/Builtins.pm#L121-L122
19:04 masak so, essentially an "all of these values have to be truthy" construct
19:04 masak ISTR I added the slip after GLR
19:04 * [Tux] runs «make again»
19:04 yoleaux 18:43Z <nine> [Tux]: TimToady++ just fixed the rakudo regression that broke Inline::Perl5's t/v6.t
19:07 marchelzo grondilu: oh wow
19:07 marchelzo it's almost instant in python3
19:07 marchelzo that's sort of disappointing
19:09 ChristopherBotto marchelzo: Rakudo Perl 6 hasn't been optimized yet.
19:09 marchelzo ChristopherBotto: when will it be optimized?
19:10 ChristopherBotto That will be a large part of the work in 2016.
19:10 ChristopherBotto marchelzo: That will be a large part of the work in 2016.
19:11 [Tux] nope, still fail
19:11 [Tux] must run. feedback later
19:11 marchelzo I really hope it ends up being fast
19:13 masak I think it's a little bit unfair to say that it "hadn't been optimized"
19:13 masak but surely we are not at the limit point yet. there is more optimization to be had
19:13 ChristopherBotto masak: Sorry, it hasn't been "fully" optimized.
19:14 masak it's perhaps comparable to early Ruby or something like that
19:14 * psch .oO( s/fully/seriously/ )
19:14 RabidGravy certain things have become faster
19:14 ChristopherBotto But its design will make it more optimizable than Perl 5 ever could be, right?
19:16 TimToady that's what we think, but we've thunk wrong before :)
19:16 leont joined #perl6
19:17 Ven joined #perl6
19:20 masak :P
19:21 masak ChristopherBotto: there are many opportunities for optimization in Perl 6 that couldn't be optimized in Perl 5, even in theory.
19:21 masak ChristopherBotto: of course *saying* that, and *knowing* that, is different from being as fast or faster than Perl 5 ;)
19:23 MadcapJake marchelzo: I've done AdventOfCode days 3, 5, and 6.  I'm in the midst of working on day 7
19:24 _nadim AlexDaniel: Cool, in a way, first P6 bug I find
19:24 marchelzo MadcapJake: nice
19:24 ChristopherBotto masak: It's already fast enough for many things. I use Perl 6 as my language of choice when starting a new project. On the rare occasion that I need raw speed, I'll prototype in Perl 6 before coding it in Perl 5.
19:25 _nadim AlexDaniel: actually the second one, I segaulted with something else yesterday, I kept the code for later ;)
19:25 MadcapJake day 6, I only did part 1 because compilation/execution time was over 2 hours and I would much rather solve other problems than wait that long xD
19:26 [Coke] TimToady: note that adding [BUG] to the title of a bug doesn't magically set the BUG flag.
19:26 MadcapJake originally I tried doing day 6 with shaped arrays but that was even slower (current solution is nested arrays, a double for loop, and dispatch function of sorts)
19:26 [Coke] ... note that no one actually seems to care about the bug flag.
19:27 ilbelkyr joined #perl6
19:29 MadcapJake in Day 7 I am doing another grammar and actions object! Love these! Debugging them is a bit hard though because action method sare called in post-order.
19:30 _nadim I'll ask again, sub X { return @a, @b) ... I'd like to do my(@x, @y) = X() or something like that. I know my ($x, $y) = X() work fine. but I'd like to know how to do it with arrays and not have the first one gobble everything.
19:30 Skarsnik I am not what you can return to make that work
19:31 Skarsnik return [@a], [@b]; maybe?
19:32 moritz m: sub f { my @x = 1, 2; return @x, @x }; my (@a, @b) := f(); say @b.perl
19:32 camelia rakudo-moar 67749a: OUTPUT«[1, 2]␤»
19:32 moritz just use binding :-)
19:33 _nadim ah! thanks moritz
19:35 masak ChristopherBotto: sounds nice. I think there's a large potential user base who could strike the same deal with Perl 6 speed/whipuptitude.
19:36 Skarsnik *love mi6, added a build-readme cmd to mi6*
19:36 Skarsnik My main complain about speed for now is starting time (october rakudo) x)
19:39 ilbelkyr joined #perl6
19:43 skids nine: Re: "That one was quite a challenge to nail down" unfortunately duplicated effort, yes that was a hard one to find RT#126754
19:45 timotimo too much backlog :(
19:45 yoleaux 00:30Z <Zoffix> timotimo: Sent you a PR to fix the freezing issue. lucasb++ first found the problematic line. https://github.com/timo/json_fast/pull/8
19:46 grondilu m: sub f { return "first" unless $++; return rand < $ = rand; }; say f; say f
19:46 camelia rakudo-moar 67749a: OUTPUT«first␤Use of uninitialized value of type Any in numeric context  in sub f at /tmp/Z5yFjg80Hh:1␤Cannot modify an immutable Bool␤  in sub f at /tmp/Z5yFjg80Hh:1␤  in block <unit> at /tmp/Z5yFjg80Hh:1␤␤»
19:47 psch hrm, this ContextRef thing is nigh-impenetrable from where i'm standing :/
19:47 grondilu not sure but I think it's a bug
19:48 psch and apparently something is mismatched with Makefile generation between moar and jvm, which 0ec5ad56 fixed but went broken again somewhen later...
19:48 psch maybe i have to actually read and understand all this CURLI stuff /o\
19:49 timotimo ShimmerFairy: your post has dominated all other posts since the day it came out :)
19:51 * moritz wonders if this was the Perl Weekly newsletter hitting the blog
19:51 joeshcmoe joined #perl6
19:52 demayl joined #perl6
19:55 grondilu still trying to improve permutations:  https://gist.github.com/gro​ndilu/61a28aca4bcb7ea423e4   This one does not seem faster though.
20:01 grondilu ah nevermind, does not even quite work
20:03 raoulvdberge joined #perl6
20:06 Ven joined #perl6
20:06 adhoc joined #perl6
20:11 spider-mario joined #perl6
20:12 [Coke] how can I tell which parent class or role is providing a particular method?
20:12 yqt joined #perl6
20:13 Skarsnik hm sounds tricky
20:13 Skarsnik A.^roles.grep: $_.^can("method") ?
20:15 moritz m: say Int.^can('sqrt')[0].package
20:15 camelia rakudo-moar 67749a: OUTPUT«(Int)␤»
20:15 Ven joined #perl6
20:15 moritz m: say Int.^can('list')[0].package
20:15 camelia rakudo-moar 67749a: OUTPUT«(Any)␤»
20:16 moritz m: say Int.^can('roots')[0].package
20:16 camelia rakudo-moar 67749a: OUTPUT«(Numeric)␤»
20:16 moritz [Coke]: that seems to work
20:16 [Coke] TimToady: RT #126860 is an implicit request that iterating over a string give you the characters of a string. I'm assuming the answer is no and we should reject the ticket?
20:16 [Coke] m: say Str.^can("sort")[0].package; # should be Any
20:16 camelia rakudo-moar 67749a: OUTPUT«(Any)␤»
20:17 [Coke] moritz++
20:19 timotimo hey folks, guess what
20:19 grondilu what?
20:19 timotimo grondilu: 15.5% of time spent in a simple permutations benchmark is spent in "find_best_dispatchee"
20:20 timotimo which means somewhere we're failing to go through the dispatch cache
20:20 MadcapJake If anyone has a moment to look at my adventofcode day 7 parser, I am stuck! It solves the example given, I've fixed the case where a 1 is used instead of a wire, and I've sorted assignments at the beginning.  Still I am getting zero for wire A! https://gist.github.com/Madc​apJake/558eff70f13d2ff2c223
20:20 timotimo ah
20:20 timotimo it might be the .= for .=reverse
20:21 grondilu let me try without
20:21 timotimo please do
20:21 timotimo using .=reverse for two elements in the array can very well be a SUPER CRAZY overhead
20:22 dj_goku m: say $*CWD
20:22 camelia rakudo-moar 67749a: OUTPUT«"/home/camelia".IO␤»
20:22 jdv79 15% is SUPER CRAZY to you?
20:23 jdv79 150% may qualify to me
20:23 timotimo grondilu: i'll microbenchmark a bit of stuff for you
20:23 timotimo jdv79: if the script spends more than 100% of its time in just one function, that'd be crazy to me :)
20:23 [Coke] jdv79: ... we can't spend 150% of the time in a given function.
20:24 RabidGravy I just discovered that the use Foo:ver<v0.0.1> works now
20:24 El_Che [Coke]: MAIN?
20:24 El_Che :)
20:24 grondilu nope , doesn't seem faster.  Actually it looks slower without the .reverse.
20:25 grondilu s/.reverse/.=reverse/
20:25 jdv79 right.  i meant 1.5x slower.  still 15% of runtime doesn't seem SUPER CRAZY.
20:25 jdv79 RabidGravy: in what way?
20:25 jdv79 can one actually install multiple version of the same package and use them solely or concurrently?
20:26 RabidGravy i.e. if you have "use Foo:ver<v0.0.2>" and you only have v0.0.3 installed then it craps out
20:26 dj_goku thanks for whoever wrote camelia and thought of this: Proc::Async is disallowed in restricted setting
20:27 RabidGravy but yes you can have multiple versions installed
20:27 timotimo grondilu: that's because you're now slicing twice
20:27 grondilu yes, would make sense.
20:28 grondilu but then what is the dispatch thing causing slowliness?
20:28 timotimo the difference between @foo[4,5] = @foo[4,5].reverse and @foo[4,5] = @foo[5,4] is very small
20:28 grondilu I mean there are very few function calls in this if any.
20:28 jdv79 ah
20:29 timotimo oh, damn
20:29 timotimo it wasn't .=
20:29 timotimo .= is at 1.3% exclusive time and 9.2% inclusive time
20:31 grondilu notice that we could use a faster algorithm but it would require a rewrite of the tests.  See https://github.com/perl6/roast/issues/79
20:31 timotimo there's some range objects that are getting created that are surprisingly expensive to be created
20:31 timotimo that also goes through the slow path binder, but not the "find best dispatchee" thing
20:32 grondilu which range object?  There's only ^$!n
20:33 grondilu $k+1 ... * not being a range but a sequence.
20:33 timotimo it could be that POSITIONS is what spends all that damn time in the dispatch find thingie
20:34 timotimo POSITIONS is at 30% inclusive time
20:34 timotimo POSITIONS itself is cheap enough
20:34 grondilu oh it seems $k+1..@!a.end is quite faster than $k+1..*
20:35 timotimo aye, POSITIONS goes through the slow path binder
20:35 * grondilu was wrong in thinking $k+1...* was used.  It's $k+1..*
20:35 timotimo quite a bit, eh?
20:36 timotimo m: my @a = (^20).list; for ^1000 { @a[5..*] }; say now - INIT now
20:36 camelia rakudo-moar 67749a: OUTPUT«0.63605866␤»
20:36 timotimo m: my @a = (^20).list; for ^1000 { @a[5..@a.end] }; say now - INIT now
20:36 camelia rakudo-moar 67749a: OUTPUT«0.2863622␤»
20:36 timotimo m: my @a = (^20).list; for ^1000 { @a[5..^+@a] }; say now - INIT now
20:36 camelia rakudo-moar 67749a: OUTPUT«0.29446261␤»
20:36 timotimo it's noticable at least
20:37 grondilu it's a bit silly IMHO.  Shouldn't the optimizer make it as fast in all cases?
20:37 Skarsnik yay another error in NC/Rakudo determining the size of a C structure
20:37 timotimo pfft!
20:37 timotimo the optimizer can't know that stuff
20:37 timotimo in the range, the * doesn't get whatever-curried, you know?
20:37 timotimo m: my @a = (^20).list; for ^1000 { @a[{ 5..$_ }] }; say now - INIT now
20:37 camelia rakudo-moar 67749a: OUTPUT«0.3378164␤»
20:37 timotimo ^- that's 2x faster than the range with whatever as an end, but slower than putting @a.end in directly
20:38 Ven joined #perl6
20:38 grondilu well, I'll submit a PR I guess
20:38 Skarsnik damn I hate when my code is right: Your representation is smaller than the cstruct, but total size of fields match. Did you forget a field?
20:38 timotimo :)
20:38 timotimo your module seems kinda cool, Skarsnik
20:39 Skarsnik I am running it on DBIish
20:39 timotimo grondilu: did you run a little benchmark and have an overall speed difference?
20:40 Ven joined #perl6
20:40 grondilu yeah.
20:40 timotimo does it make any difference? :<
20:40 grondilu yes.
20:41 grondilu I ran it with permutations(5).  3.9s instead of 4.5s or something.
20:41 grondilu quite significant anyway.
20:41 grondilu it's not much of a benchmark though, just a manual test.
20:42 timotimo right, fair enough
20:42 timotimo thank you for looking into it :)
20:42 timotimo with the new code, i'll do some more benchmarking and profiving
20:42 timotimo profiling
20:43 Skarsnik Thx mysql doc to not show the last field on their documentation. I really wish I could compile clang-smokegen :(
20:43 moritz that you have to care about the fields of the mysql structs is already a WTF
20:44 moritz sqlite3 and postgres manage just fine with opaque data structures that you just pass along
20:44 grondilu one thing that clearly takes time is .List. I wonder if there's a quicker way to do that.
20:44 timotimo grondilu: exchanging the two values via a variable and only doing single-value slices is a TON faster than .=reverse
20:45 grondilu really?
20:45 Ven joined #perl6
20:45 timotimo yes.
20:45 Skarsnik moritz, to get the type of a field
20:45 timotimo i can either do 10_000 .= reverse or i can do 450_000 via a variable
20:45 timotimo your choice!
20:46 grondilu let me try
20:47 timotimo do you think you can come up with something faster for the [$k+1 .. *] .= reverse?
20:47 grondilu apart from using @!a.end you mean?
20:48 leont META.info doesn't work until installed?
20:48 El_Che http://ideone.com/ supports perl6
20:48 grondilu wasn't there a trick to substitute two variables without using a temp var?
20:48 timotimo grondilu: yes
20:48 * leont is having multiple packages in one file, and it doesn't DWIM when loading them using "use"
20:48 timotimo with xor
20:48 Skarsnik leont, what do you mean?
20:49 grondilu timotimo: can you show me?  my brain is tired :P
20:49 TimToady [Coke]: yes, we can reject #126860
20:49 grondilu timotimo: nevermind, I got it:  https://en.wikipedia.org/wiki/XOR_swap_algorithm
20:49 * leont has a file with at least two packages, the unit has the name of one of them, but I also want to export from the other one, I can't get this to work
20:50 zacts joined #perl6
20:51 moritz only works for integers, no?
20:51 timotimo grondilu: please note that you're currenly working with an Any array for the numbers
20:51 timotimo whether or not using a native int array is better right now, i can't tell.
20:51 timotimo if you're up for making it a tiny bit faster still, $i++ on a native is considerably more expensive than $i = $i + 1 is
20:51 timotimo in this case, it's not $i, it's $l and ök
20:52 timotimo $k
20:52 timotimo and it's not ++, it's --
20:52 timotimo but it still applies
20:53 timotimo that won't be a noticable part of the whole. not yet anyway.
20:54 dalek rakudo/nom: 5ed63cd | grondilu++ | src/core/native_array.pm:
20:54 dalek rakudo/nom: small permutations improvement
20:54 dalek rakudo/nom:
20:54 dalek rakudo/nom: use explicit .end upper slice limit instead of Whatever.  As suggested by timotimo.
20:54 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5ed63cd108
20:54 dalek rakudo/nom: 1fe560d | timo++ | src/core/native_array.pm:
20:54 dalek rakudo/nom: Merge pull request #627 from grondilu/patch-5
20:54 dalek rakudo/nom:
20:54 dalek rakudo/nom: small permutations improvement
20:54 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1fe560d170
20:54 timotimo grondilu: i was expecting you'd also put in the exchange thing for the two slots. i guess i'll do it myself :)
20:54 Skarsnik they get freaking lazy in mysqlclient "Here you row, everything is char *" even if we can give you info on the field type
20:55 grondilu timotimo: no I'm doing it
20:56 timotimo OK :)
20:56 grondilu give me a sec
20:56 timotimo for me the timing of permutations is very noisy
20:57 dalek rakudo/nom: 294fca4 | timotimo++ | src/core/Exception.pm:
20:57 dalek rakudo/nom: undefined types are often mistaken for subs and gobble blocks
20:57 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/294fca4b09
20:58 timotimo had that patch locally and forgot to push it
20:59 * timotimo builds rakudo
20:59 * hoelzro .oO( are gobble blocks blocks that look like turkeys? )
20:59 timotimo i never understood why turkeys supposedly say "gobble gobble"
20:59 Ven joined #perl6
21:00 geraud joined #perl6
21:00 timotimo stage parse ... 95 seconds!?
21:00 timotimo must be overheating or something
21:00 grondilu me wonders if he can write $a = $b +^ $a as $a [R+^]= $b
21:02 * hoelzro ¯_(ツ)_/¯
21:02 * moritz wonders if any clarity is gained from doing so
21:02 timotimo should be able. it could be very expensive, though
21:02 grondilu I thought it would be faster
21:02 grondilu but I guess not
21:03 [Coke] (gobbled) btw, "flatten" is a better description of what's going on with that return, I think.
21:03 ZoffixMobile joined #perl6
21:04 ZoffixMobile ehehe. have you guys seen this? TimToady on a shirt; 72 hours left: https://www.kickstarter.com/projects/1422827986​/heroes-of-the-revolution-t-shirts-larry-wall/
21:05 Skarsnik This look so weird
21:05 n0tjack joined #perl6
21:06 ZoffixMobile the guy on the shirt on the pic looks like Gerge Lucas....
21:06 Skarsnik My only perl T-shirt is the one I get a YAPC in Paris x)
21:07 ZoffixMobile "in common sizes".... well, not me then X)
21:07 ZoffixMobile The only computer shirt I ever owned was the one with xkcd's sudo make me a sandwich
21:11 Skarsnik me a sandwich not a valid target for make.
21:11 Skarsnik ?
21:11 * awwaiid re-discovers the "note" sub when reading some old code
21:13 ZoffixMobile Skarsnik: https://xkcd.com/149/
21:14 timotimo grondilu: whaaaat. you actually used the xor swap trick?! is it any faster at all?
21:14 RabidGravy timotimo, would that commit explain the  "HTTP::Response.new()" in this test somehow thinking it's Block.new?
21:14 timotimo RabidGravy: what?
21:14 timotimo what commit, what what?
21:14 RabidGravy "undefined types are often mistaken for subs and gobble blocks"
21:14 Skarsnik ZoffixMobile, Oh yeah xD I was just wondering what kind of error make will say x)
21:14 RabidGravy ^
21:15 timotimo no, i don't think so
21:15 timotimo it's only about an exception message
21:15 timotimo m: given ThisIsActuallyAType { say "yay" }
21:15 camelia rakudo-moar 294fca: OUTPUT«5===SORRY!5===␤ (or perhaps it's a class that's not declared or available in this scope?)␤at /tmp/nsMvko2NCb:1␤------> 3given ThisIsActuallyAType { say "yay" }7⏏5<EOL>␤Missing block (apparently claimed by 'ThisIsActuallyAType')␤at /tmp/…»
21:15 timotimo crap!
21:15 timotimo the message got garbled!
21:16 * timotimo has a fix
21:16 grondilu timotimo: it is faster.  Also I can actually use it for the @!a[$k+1..@!a.end].=reverse
21:16 RabidGravy I'm seeing "Default constructor for 'Block' only takes named arguments  in block <unit> at t/030-cookies.t:172"  which is HTTP::Response.new(200);
21:16 grondilu waait until I update to merge
21:16 domidumont joined #perl6
21:16 * Juerd gives grondilu some free whitespace
21:16 RabidGravy doing my nut
21:17 timotimo grondilu: you ... really? that's kinda cool!
21:19 dalek rakudo/nom: 4313b30 | timotimo++ | src/core/Exception.pm:
21:19 dalek rakudo/nom: fix precedence in previous commit
21:19 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4313b30d43
21:20 Skarsnik RabidGravy, maybe it's because of the ? arg
21:20 grondilu it's an additional loop but it appears to be faster
21:21 grondilu Juerd: did I not expand correctly?
21:22 timotimo grondilu: a little loop may be a lot cheaper still than a function call that calls something else on top
21:22 timotimo grondilu: if you use postfix-while or for, you can even prevent an extra lexical scope from forming, which may be cheaper, too
21:23 grondilu the XOR trick requires three statement, not sure I can put them all in one.
21:24 RabidGravy Skarsnik, I can't reproduce except if I do panda install
21:24 Juerd grondilu: I don't understand your question.
21:25 Skarsnik RabidGravy, err, not fun :(-
21:25 timotimo grondilu: you can, by using STATEMENT_LIST( ... )
21:25 timotimo i used that same evil trick in JSON::Fast
21:26 grondilu I can indeed but that's kind of ugly
21:26 timotimo this is internal core setting code. it's meant to be fast and allowed to look kidna ugly
21:26 timotimo kinda*
21:26 timotimo thing is: someone on twitter recently complained about permutations performance, and i'm sure they're right to.
21:26 grondilu looks like that:
21:26 grondilu (@!a[$k] +^= @!a[$l]), (@!a[$l] = @!a[$k] +^ @!a[$l]), (@!a[$k] +^= @!a[$l]), $l-- until ++$k >= $l;
21:27 hoelzro I remember observing some bad performance with permutations, but I couldn't find an easy way to fix it =/
21:28 MadcapJake rakudo dev question: how do you start work on something new with your fork?  Do you delete it and just make a new one? Or do you rebase the fork to upstream HEAD?
21:28 timotimo hoelzro: you should have grabbed me! :)
21:28 Juerd IMHO anything is allowed to look ugly if it's accompanied by a comment that explains why it's ugly, and what it does.
21:28 hoelzro MadcapJake: delete the repo? I would just rebase
21:29 timotimo MadcapJake: with one bigger thing i've done i re-based onto master (that was in moarvm) a few times and gave the branch a number at the end to point out the rebasedness
21:29 hoelzro timotimo: =( missed opportunity!
21:29 hoelzro timotimo: it's still in my "look at" list if you want to collaborate on it
21:30 timotimo grondilu: it could even be that our static optimizer inlines that block for us, so it might not be worth it to use STATEMENT_LIST
21:30 timotimo hoelzro: dude, i'm working on permutations with grondilu right now :D
21:30 hoelzro =P
21:31 grondilu timotimo: that would be preferable indeed.
21:31 timotimo grondilu: has to be measured :)
21:31 timotimo how's your rakudo build times at the moment?
21:31 grondilu I may possibly golf the line above into:
21:31 grondilu (@!a[$k] +^= @!a[$l]), @!a[$k] +^= (@!a[$l] = @!a[$k] +^ @!a[$l]), $l-- until ++$k >= $l;
21:32 colomon joined #perl6
21:32 grondilu or even:
21:32 grondilu (@!a[$k] +^= @!a[$l]), @!a[$k] +^= (@!a[$l] [R+^]= @!a[$k]), $l-- until ++$k >= $l;
21:32 grondilu but htat's kind of silly
21:33 hoelzro MadcapJake: btw, do you have outstanding work that makes a rebase necessary? could you just fast forward your nom?
21:33 timotimo m: my @a = (^15).list; my int $k = 3; my int $l = 10; (@a[$k] +^= @a[$l]), @a[$k] +^= (@a[$l] = @a[$k] +^ @a[$l]), $l-- until ++$k >= $l; say @a
21:33 camelia rakudo-moar 4313b3: OUTPUT«[0 1 2 3 10 9 8 7 6 5 4 11 12 13 14]␤»
21:33 timotimo that was fast
21:34 timotimo m: my @a = (^15).list; my int $k = 3; my int $l = 11; (@a[$k] +^= @a[$l]), @a[$k] +^= (@a[$l] = @a[$k] +^ @a[$l]), $l-- until ++$k >= $l; say @a
21:34 camelia rakudo-moar 4313b3: OUTPUT«[0 1 2 3 11 10 9 8 7 6 5 4 12 13 14]␤»
21:35 timotimo m: my @a = (^15).list; my int $k = 3; my int $l = 11; STATEMENT_LIST((@a[$k] +^= @a[$l]), @a[$k] +^= (@a[$l] = @a[$k] +^ @a[$l]), $l--) until ++$k >= $l; say @a
21:35 camelia rakudo-moar 4313b3: OUTPUT«[0 1 2 3 11 10 9 8 7 6 5 4 12 13 14]␤»
21:35 grondilu if you start from $l = @a.elems you can put the $l-- at the end I think
21:35 timotimo can you check locally if either variant of these two is slower/faster?
21:35 timotimo i meant with vs without STATEMENT_LIST
21:36 grondilu with STATEMENT_LIST will always be faster, won't it?
21:36 grondilu because no lexical scope and stuf
21:36 timotimo no clue. hopefully.
21:36 timotimo the one you had up there with the commas doesn't have the lexical scope either
21:36 timotimo but it may create a list
21:37 grondilu I think this is too weird, we should stick with the version with a proper block.
21:37 timotimo sure can do.
21:37 grondilu it's in my PR if I'm not mistaken.
21:37 timotimo let me see
21:38 timotimo ah, the one from before, still
21:39 timotimo after that i'm going to have a look-see if changing the ++ and -- to assignments makes a noticable difference
21:40 sufrostico joined #perl6
21:42 jdv79 looks like larry's t-shirt might not make the cut
21:42 timotimo damn, these 2 minutes of rakudo compile time ;_;
21:43 timotimo WAITWHAT
21:43 jdv79 is there some theoretical way to cleave the setting so compiling could be shorter?
21:43 timotimo just with the latest patch you put into the PR, my dear grondilu, time taken went from 3s to 0.7s
21:43 jdv79 some sort of partial/merged compunit or something
21:43 Skarsnik lol this time cut
21:45 grondilu XOR trick FTW
21:45 timotimo well, i would have said it could have been done without the xor trick
21:46 timotimo okay, sorted by exclusive time, we now have the pull-one method from our permutations iterator at the #1 spot with 22.95% exclusive time
21:47 timotimo and iterator's push-exactly at 20.12% exclusive time
21:47 timotimo then comes postcircumfix:<[ ]> at 9.99% and then elems at 4.21%
21:47 jdv79 sounds like other random profiles i've done
21:47 MadcapJake hoelzro: I don't, what would be the command to just fast-forward? I don't want to add a merge commit.
21:47 jdv79 the new list stuff pops up often
21:48 hoelzro MadcapJake: git merge --ff-only
21:48 lucs Whoops, I can't use  =>  as an autoquoting fat comma anymore eh,
21:48 timotimo yo grondilu we can use $n - 1 from the outer scope instead of @!a.end, no?
21:48 MadcapJake oh sweet, never knew that
21:48 timotimo lucs: yeah you can
21:48 grondilu yes
21:48 lucs Hmm...
21:48 hoelzro I have that aliased to gff, I use it so often =)
21:48 timotimo wait ...
21:48 timotimo not if you mean it to give you two positional things
21:48 lucs timotimo: I did.
21:48 timotimo yeah, no, that won't fly
21:48 grondilu but in fact you can start from $!n and start with decrementing $l
21:48 lucs And that's the error that I'm getting :)
21:48 grondilu I did it in the PR
21:49 timotimo ah, cool, let me pull that change
21:49 grondilu you should wait until travis confirms it's ok though
21:49 lucs timotimo: What's actually happening with the  => ? (pointer to docs please)
21:49 grondilu well, wait before merging I mean
21:49 MadcapJake hoelzro: I have the zsh git plugin but i'm surprised there isn't an alias for that command
21:49 TEttinger joined #perl6
21:49 timotimo lucs: if you're in a parameter list, it gets turned into a named parameter, otherwise it creates a Pair object
21:49 hoelzro MadcapJake: plugin? do you use oh-my-zsh?
21:50 MadcapJake yeah
21:50 hoelzro ah ha
21:50 timotimo http://doc.perl6.org/type/Pair - doc about pair
21:50 lucs timotimo: Thanks
21:50 hoelzro if you're curious, here are the aliases I use: https://github.com/hoelzro/zsh-​config/blob/master/aliases.zsh
21:50 grondilu we only have two statement in the block now, maybe it's worth putting the until at the end.
21:50 MadcapJake there's gm (git merge), gmom (git merge origin/master), gmum (git merge upstream/master)
21:50 grondilu and do the statement-list thing
21:50 timotimo http://doc.perl6.org/type/Capture - this has a bunch on parameters
21:50 Skarsnik I bet it's already a alias for a git oscure-cmd -Xkkl256-21~~A50 insertlinusranthere
21:51 awwaiid lucs: also http://doc.perl6.org/language/syntax#Pair_literals has some info
21:51 timotimo grondilu: i can try that; how long does rakudo take to compile on your machine?
21:51 timotimo oh!
21:51 lucs Always more to read, and loving it!
21:51 timotimo i think i have optimization turned off in my moarvm
21:51 timotimo for debugging purposes
21:51 awwaiid (I need to figure out how to tag that so it comes up when you search for =>)
21:51 grondilu rakudo takes almost ten minutes to compile on my machine
21:51 RabidGravy what does "Serialization Error: Unimplemented case of read_ref" mean?
21:52 MadcapJake i almost feel like I should do gdad for git merge --ff-only ;)
21:52 * lucs is learning Perl 6 from the inside out, so to speak, so hits different level snags at different moments.
21:52 timotimo grondilu: how about only the core setting?
21:53 MadcapJake grondilu: iirc TEST_JOBS might help
21:53 MadcapJake not sure if that's just for tests though
21:53 leont It's just for the tests
21:54 leont make -j <number of cores> is helpful during building though
21:54 timotimo grondilu: there's a typo in your code
21:54 timotimo there's only an "a" where a @!a should be
21:54 grondilu is it?
21:54 timotimo in that loop
21:54 grondilu oh yeah
21:54 RabidGravy "Missing serialize REPR function for REPR VMException" what is going on here?
21:55 timotimo RabidGravy: an exception (perhaps via a Failure) ends up in the precompiled output of some module
21:55 grondilu I wonder if @!a[$k] +^= @!a[$l] = @!a[$k] +^ @!a[$l] requires parenthesis.  I think not.
21:55 RabidGravy oh bizzare
21:56 MadcapJake leont: forgot about -j, that's good to know
21:56 jdv79 moritz: i think the bot is missing stuff lately
21:56 timotimo copy out the whole permutations class into a simple script and try it out :)
21:56 grondilu that's what I've been doing from the beginning :)
21:56 timotimo oh, damn it. now i can't compare my numbers against the old numbers any more because i turned optimization off in moar for the old numbers and on for the new ones >:(
21:56 timotimo good!
21:56 timotimo i've been an idiot and editing inside the core setting
21:57 timotimo i need a bigger list to test this stuff with
21:57 timotimo it's getting too fast
21:57 grondilu been there, done that
21:57 [Coke] leont: "make -j" is sufficient, I think.
21:58 timotimo oh damn. added two numbers, the time ballooned up from 0.31s to 22.46s :D
21:58 rindolf joined #perl6
21:58 MadcapJake are command line options stored in %adverbs (in Compiler.nqp)
21:59 hoelzro MadcapJake: yes
21:59 timotimo m: STATEMENT_LIST(say "hi"; say "goodbye")
21:59 camelia rakudo-moar 4313b3: OUTPUT«hi␤goodbye␤»
22:00 timotimo i think i used a , in JSON::Fast
22:03 timotimo grondilu: using "statement_list" doesn't actually make it any better.
22:03 grondilu ok
22:04 masak m: say 2 + 2; sub infix:<+>($l, $r) { "!!!" }
22:04 camelia rakudo-moar 4313b3: OUTPUT«!!!␤»
22:04 masak overridden operators can be post-declared. freaky.
22:04 regreg joined #perl6
22:04 grondilu I've just realised @!a is not defined as a native array.  Not sure it matters.
22:05 xjrK never trust these hoes;
22:06 timotimo i told you before; i also said i don't know if a native int array would be helpful or not right now
22:06 flussence "make -j" without a limit is usually a terrible idea
22:07 MadcapJake how can I get environment info in nqp (perl6 version, vm, distro, time),  none of the dynamic perl6 variables seem to be workingt
22:07 flussence if you don't want to hardcode a number, at least use "make -j $(nproc)"
22:07 timotimo flussence: that's how i build moarvm, tbh
22:08 flussence timotimo: most of my systems would blow up around the 30-40 process mark
22:08 timotimo :)
22:08 timotimo i don't actually know how many processes make fans that out to
22:08 Zoffix .botsnack
22:08 yoleaux :D
22:08 yoleaux 17:16Z <dj_goku> Zoffix: just wanted to say thanks for the IRC Client advent post. I took the plung on prototyping a interacting with gearmand in perl6. I was able to get connected last night!
22:09 Zoffix dj_goku, cool. Glad it was useful.
22:09 timotimo ja!
22:11 timotimo grondilu: replacing -- and ++ with explicit assignments got me to 2.27 from 2.4
22:12 timotimo hm, more like to 2.27 from 2.35
22:12 timotimo well, 2.37 would be more fitting
22:12 grondilu it's a bit LTA that ++ and -- are not efficient.
22:12 timotimo yes.
22:12 timotimo we know, we'll work on it.
22:13 timotimo grondilu: are you interested in fleshing out the permutations spec tests?
22:14 regreg joined #perl6
22:14 timotimo because damn, those are *weak*
22:14 timotimo grondilu: i expect there's more to be gained from turning postcircumfix:<[ ]> into .AT-POS
22:15 timotimo but that'll make things very ugly indeed
22:15 grondilu I've made suggestions already:  https://github.com/perl6/roast/issues/79
22:16 grondilu it's definitely LTA that .AT-POS is more efficient than postcircumfix:<[ ]>
22:16 timotimo yes.
22:16 grondilu I suggest we keep [ ] until it's fixed.
22:16 grondilu and same for ++ and --
22:17 timotimo can you compare the algorithm suggested in that ticket against the current implementation now that we've micro-optimized it?
22:17 grondilu it will still be faster I think
22:18 grondilu but ok I can check
22:19 grondilu though the other algorithm could also use some XOR magic
22:19 grondilu so there's not much point to compare.
22:19 grondilu (until the otehr algorithm is re-written, that is)
22:19 timotimo sure
22:20 grondilu and we can't use it until the test are re-written anyway
22:20 grondilu so let's just keep it in cold storage
22:21 timotimo fair enough
22:21 timotimo i would accept the suggested change to the permutations test, btw
22:21 timotimo to sort it
22:22 flussence «Stage parse : 372.765» -- my 32-bit, 1.6GHz netbook is only 4x as slow as my desktop at this. Thought it'd be much worse...
22:22 timotimo wow
22:25 timotimo grondilu: interestingly, the .List method isn't getting jitted. perhaps there's a tiny win to be had there, too.
22:26 timotimo grondilu: right now, though, Iterator's general "push-exactly" is where we spend 25% of run time and only 20% run time is spent in pull-one of the permutation iterator
22:26 timotimo quite frankly, that surprises me a little bit
22:27 grondilu I don't know what "push-exactly" is.  I'll have a look.
22:28 timotimo it basically iterates over .pull-one until the target has as much as it wants
22:29 timotimo lol. oh crap. it gets called exactly as many times as pull-one minus 2
22:29 timotimo so it seems like it's calling push-exactly with "please give me one entry" each time
22:31 grondilu isn't that normal?
22:31 timotimo why doesn't it call push-one or pull-one instead?
22:31 timotimo perhaps it'd be worth it to give the general push-exactly a "fast path" for the argument "gimme one"
22:32 regreg does perl6 have any GUI library?
22:32 jdv79 wasnt that part of the design? all one needs to impl is pull-one and the rest builds on that (probably suboptimally)
22:33 grondilu I don't know.  Those Seq and Iterator classes are complicated.
22:33 Skarsnik regreg, there is a part of Gtk that has a binding (search gtk-simple on the ecosystem)
22:33 Skarsnik :eco gtk
22:33 Skarsnik x)
22:33 * timotimo tries it out
22:33 grondilu FYI, I took Str.comb as a model to write permutations.
22:33 joeschom joined #perl6
22:35 timotimo yeah, that was a good idea
22:37 timotimo weird. my fast path doesn't get executed
22:39 cognominal joined #perl6
22:39 timotimo please push exactly 2147483647
22:40 timotimo so why the F does that method get called a fuckton of times?
22:40 Skarsnik to piss you off?
22:41 timotimo probably.
22:43 timotimo hum.
22:43 timotimo it does push 8 at a time
22:44 timotimo i really don't get it :)
22:44 jdv79 you need to become one with the GLR
22:45 grondilu yeah that's definitely GLR-specific stuff
22:46 timotimo oh!
22:46 timotimo there's another pull-one that gets called 362951 times
22:47 timotimo 40323 calls of push-exactly and 40321 calls of the "expensive" pull-one
22:47 timotimo imagine my surprise :)
22:49 sno joined #perl6
23:02 lizmat timotimo: are you sure it's not calling the "default" push-exactly ?
23:03 timotimo lizmat: it is!
23:03 lizmat ah, but every time only for 1 elem, right ?
23:03 timotimo nah, many thousands :)
23:03 lizmat I recall seeing that and wondered why it wouldn't be calling pull-one directly
23:03 timotimo it's not as bad as i thought it'd be
23:05 timotimo grondilu: i'm about to merge your PR. are you ok with that?
23:07 timotimo lizmat: i wonder if we can do better than what List.permutations does now
23:07 lizmat probably  :-)
23:08 masak 'night, #perl6
23:08 timotimo like, the normal permutations function currently does a full copy of @!a, but the permutations method of list doesn't modify that list, so it *could* return the original. but it would have to get that passed in somehow
23:08 timotimo ginte masak!
23:09 timotimo the overhead of pulling the values from that list is about 6 seconds
23:09 timotimo that was less than half when we began optimizing, but now it's almost 3x as much :)
23:10 nine MadcapJake: there's nqp::getenvhash
23:12 dalek rakudo/nom: 7e9610c | grondilu++ | src/core/native_array.pm:
23:12 dalek rakudo/nom: small permutations improvement
23:12 dalek rakudo/nom:
23:12 dalek rakudo/nom: use XOR swap trick, as suggested by timotimo
23:12 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7e9610c2d0
23:13 dalek joined #perl6
23:13 loren joined #perl6
23:15 nine Why oh why does the require Inline::Perl5; in src/core/control.pm's EVAL sub not find CompUnit::RepositoryRegistry at runtime ($*W.symbol_lookup(['CompUnit', 'RepositoryRegistry'], $/)) while every other require statement can?
23:16 lizmat nine: because you twiddle with the context ?
23:16 nine lizmat: err...what does that mean?
23:17 lizmat so, you're not passing a :context ?
23:18 nine lizmat: not that I'm aware of, no
23:18 nine Could not find symbol 'RepositoryRegistry'
23:19 kid51 joined #perl6
23:19 timotimo what does your block stack look like at that point?
23:19 timotimo because all it does is look at all the Block objects it's entered so far and try to find CompUnit::RepositoryRegistry in there
23:19 lizmat nine: maybe you need to stub it ?
23:21 nine Is symbol_lookup actually the right tool for this job? This used to be find_symbol but I degraded it to a runtime lookup (or at least try to) so I could get rid of CompUnit::RepositoryRegistry in the BOOTSTRAP
23:21 lizmat nine: not sure...
23:22 nine That's the full backtrace: https://gist.github.com/niner/67d4f2170d7e37db3858
23:22 nine What I find odd about it is the FALLBACK in there
23:23 nine Makes me think that maybe I'm looking at the wrong place. But there's not that many places which refer to CompUnit::RepositoryRegistry (formerly CompUnitRepo) directly. And only one where the name is actually split into those components.
23:24 timotimo nine: comes from the Failure class
23:24 nine Ok there's 2 places: the other is method comp_unit in Perl6::Actions
23:27 timotimo hoelzro: did you see? permutations($n) improved by almost 6x
23:28 hoelzro \o/
23:28 hoelzro timotimo++ grondilu++
23:28 hoelzro way to go!
23:28 timotimo i think the permutations method on ranges should check if the range is from 0 to some value and just call the permutations sub directly instead of self.flat.permutations
23:31 nine Oooh...it _is_ actually method comp_unit if the debug print is to be believed
23:32 Zoffix joined #perl6
23:33 nine And there I still use find_symbol which will not find it because it's no longer in BOOTSTRAP
23:34 timotimo oh!
23:38 lucasb joined #perl6
23:40 lucasb I read in the backlog that ++/-- are slower than manually increment/decrement?
23:41 Zoffix left #perl6
23:41 PotatoGim joined #perl6
23:41 timotimo lucasb: on native integers
23:43 lizmat at the moment
23:43 lucasb ah, I just tested. thanks, timotimo
23:43 nine Now I'm back to "Cannot call method 'AT-KEY' on a null object" when loading a precomp file :/
23:43 lucasb strange that with "my $i", $i++ is faster than "$i=$i+1", but with "my int $i", it's the other way around
23:43 flussence is Str.encode('utf16') big or little endian?
23:44 Zoffix joined #perl6
23:45 Zoffix Hm, rakudobrew build-panda still freezes for me on JSON::Fast :(
23:45 lucasb panda wasn't updated
23:45 Zoffix oh, it includes it with it :/
23:46 lucasb you can call update-subtree.pl ext/JSON__Fast in panda root
23:46 timotimo oh, sorry, i forgot to do that
23:46 Zoffix Where's panda root?
23:47 timotimo there we go.
23:47 Zoffix looks like ~/.rakudobrew/moar-nom/panda
23:47 lizmat lucasb: that's not strange if you realize that for a native int to be ++, it basically needs to upgraded to an Int, and then downgraded again
23:48 timotimo lizmat: more or less
23:48 Zoffix timotimo++ that fixed it thanks.
23:48 lucasb lizmat: hm, I didn't know that, thanks for the info
23:48 Zoffix left #perl6
23:48 timotimo lucasb: the main source of performance trouble is that our inliner doesn't yet understand ++ on native ints, so it ends up doing full function calls
23:48 lucasb so, IOW, boxing and unboxing just to increment it :(
23:49 timotimo not quite boxing/unboxing. taking a native reference in this case
23:49 timotimo plus, on something as simple and cheap as ++, making the reference and calling the function is 99% overhead at least
23:50 timotimo at some point, spesh will understand native references completely and when the ++ sub gets inlined then, it'll not have to generate the reference; it'll just do the increment/decrement in place on the register and *then* it'll be crazy cheap
23:50 timotimo the thing about Int, on the other hand, is that it's a full object with the potential to become infinitely big
23:51 colomon joined #perl6
23:51 timotimo lucasb: does that explain things?
23:52 lucasb timotimo++, explain very well! :)
23:56 timotimo i'm deep into the whole performance topic. sadly, not good enough at it to make a dent in either of those problems :|
23:56 timotimo either meaning a) the inliner recognizing NativeRef properly and b) spesh not turning NativeRef into a direct usage of the given register/lexical

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

Perl 6 | Reference Documentation | Rakudo