Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-10-08

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 ShimmerFairy m: say "0123456789" ~~ /<:Numeric_Value(0..8)>/
00:00 camelia rakudo-moar 25d348: OUTPUT«「0」␤»
00:00 ShimmerFairy m: say "0123456789" ~~ /<:Numeric_Value(0..8)>+/
00:00 camelia rakudo-moar 25d348: OUTPUT«「01234567」␤»
00:02 flussence maybe it's looking at .bounds directly?
00:03 flussence m: say "0123456789" ~~ /<:Numeric_Value(1..8)>+/
00:03 camelia rakudo-moar 25d348: OUTPUT«「1234567」␤»
00:03 flussence m: say "0123456789" ~~ /<:Numeric_Value(1^..^8)>+/
00:03 camelia rakudo-moar 25d348: OUTPUT«「1234567」␤»
00:03 ShimmerFairy m: say "0123456789" ~~ /<:NumericValue(0..8)>+/ # roast only has one test on this property, spelled without underscore
00:03 camelia rakudo-moar 25d348: OUTPUT«「01234567」␤»
00:04 ShimmerFairy flussence: it _seems_ like it's doing an implicit ..^ no matter what, but who knows?
00:06 timotimo that's weird
00:07 timotimo m: say "0123456789" ~~ /<:Numeric_Value(2..5)>+/
00:07 camelia rakudo-moar 25d348: OUTPUT«「234」␤»
00:07 gfldex sitaram_: could you check please if your version eats lots of ram on your host?
00:08 ShimmerFairy m: say "0123456789" ~~ /<:Nv(0..8)>+/
00:08 camelia rakudo-moar 25d348: OUTPUT«「0123456789」␤»
00:08 ShimmerFairy timotimo: and the short alias Nv doesn't work at all! :P
00:08 flussence m: say "0123456789" ~~ /<:Numeric_Value(1,3,5,7,9)>+/
00:08 camelia rakudo-moar 25d348: OUTPUT«Nil␤»
00:08 flussence dunno if that's intended to work or not.
00:10 ShimmerFairy I would think so.
00:10 timotimo i would have expected it takes a regex-like or at least a matcher-like thing
00:10 timotimo so a range makes sense, a list ... not terribly much
00:10 timotimo maybe a set or junction
00:10 flussence oh, good point...
00:10 flussence m: say "0123456789" ~~ /<:Numeric_Value(any(1,3,5,7,9))>+/
00:10 camelia rakudo-moar 25d348: OUTPUT«「1」␤»
00:10 timotimo that wouldn't work
00:10 timotimo you'd have to skip non-matchers
00:11 timotimo m: say "0123456789" ~~ m:g/<:Numeric_Value(any(1,3,5,7,9)>+/
00:11 camelia rakudo-moar 25d348: OUTPUT«5===SORRY!5===␤Regex not terminated.␤at /tmp/X2wh3lsBCF:1␤------> 3~~ m:g/<:Numeric_Value(any(1,​3,5,7,9)>+/7⏏5<EOL>␤Regex not terminated.␤at /tmp/X2wh3lsBCF:1␤------> 3~~ m:g/<:Numeric_Value(any(1,​3,5,7,9)>+/7⏏5<EOL>␤Unable to…»
00:11 timotimo whoops
00:11 timotimo m: say "0123456789" ~~ m:g/<:Numeric_Value(any(1,3,5,7,9))>+/
00:11 camelia rakudo-moar 25d348: OUTPUT«(「1」 「3」 「5」 「7」 「9」)␤»
00:11 flussence oh right, my bad :)
00:11 timotimo there we go
00:12 ShimmerFairy m: say "0123456789" ~~ /<:Numeric_Value((0..7).any)>+/
00:12 camelia rakudo-moar 25d348: OUTPUT«「01234567」␤»
00:12 ShimmerFairy m: say "0123456789" ~~ /<:Nv((0..7).any)>+/
00:12 camelia rakudo-moar 25d348: OUTPUT«「0123456789」␤»
00:13 kyclark joined #perl6
00:14 timotimo just removing "return" statements from the formula evaluation benchmark brings my timings from ~64s down to ~58s
00:15 timotimo m: say 58 / 64
00:15 camelia rakudo-moar 25d348: OUTPUT«0.90625␤»
00:15 timotimo 10% off just from that ... damn.
00:15 timotimo i thought we had a "throw out return statements at the end of a sub if they are unnecessary" optimization somewhere
00:16 flussence maybe it started failing for whatever reason... might even explain the jump in stage-parse/startup time recently?
00:16 kyclark I understand from some docs that I can declare a MAIN($a, $b) and get a really useful "Usage" statement if no args are provided.  I don't seem to be able to accept an array (@ARGS).  Can someone explain how to do that?
00:17 timotimo perhaps it'll want to be *@ARGS
00:24 laouji joined #perl6
00:25 kyclark OK, I can use that to get access to @ARGS but it won't create a pretty usage like "foo.pl <numbers>"
00:26 kyclark Inside of MAIN I can "say @*ARGS.perl;" -- so what is the deal with the asterisk?  I can put it on either side of the @?
00:28 timotimo no, it's a twigil
00:29 timotimo @*ARGS is the dynamic variable that holds the actual full arguments passed in
00:29 timotimo what does your code look like?
00:29 timotimo perl6 -e 'sub MAIN($a, $b) { }'
00:29 timotimo that works, right?
00:30 timotimo hm. sub MAIN(@args) is very unhappy
00:30 timotimo that should probably die early
00:30 timotimo *@args on the other hand means you define a slurpy positional parameter called "@args"
00:30 kyclark http://lpaste.net/142512
00:30 timotimo (i got confused there for a tiny second)
00:30 timotimo ah
00:31 timotimo there you have a parameter called @ARGS, but you access @*ARGS instead, which is a different variable
00:31 timotimo though i now realize that @*ARGS doesn't include the program name
00:31 timotimo so that's good
00:31 kyclark I'm teaching Perl 5 right now to biologist and want to show them an equivalent example in Perl6 -- show off the wizzy bells and such
00:32 pink_mist how /do/ you access the program name?
00:32 timotimo m: say $*PROGRAM-NAME
00:32 camelia rakudo-moar 25d348: OUTPUT«/tmp/kIQxriNQVn␤»
00:32 pink_mist oh, logical :D
00:32 timotimo more logical than $0, we think
00:32 gfldex sitaram_: i can run over all tweets in real    2m33.496s with https://gist.github.com/anonymous/f86​be02dac07260c739e#file-gistfile1-txt
00:32 pink_mist m: say $*INTERPRETER-NAME #does this exist?
00:32 camelia rakudo-moar 25d348: OUTPUT«Dynamic variable $*INTERPRETER-NAME not found␤  in block <unit> at /tmp/m8ANtUEdRN:1␤␤Actually thrown at:␤  in block <unit> at /tmp/m8ANtUEdRN:1␤␤»
00:32 pink_mist nope =/
00:32 kyclark So @* is together the way to access these global bits?
00:32 gfldex sitaram_: your version eats all my ramz with any larger file :(
00:33 skids * is a twigil for dynamic variables
00:33 timotimo dynamic variables are a little bit like globals, except they are stacky
00:33 kyclark define "twigil"
00:33 pink_mist http://design.perl6.org/S02.html#Twigils
00:34 timotimo that was quick, pink_mist :)
00:35 pink_mist already had that open :P
00:35 skids Lately I've been noticing answer speeds around here that should only be attainable through performance enhancing drugs :-)
00:35 timotimo OK :)
00:36 skids (or I' just getting old)
00:38 ShimmerFairy m: sub foo { say $*BAR }; my $*BAR = 42; foo;  # a quick show of dynamic vs. lexical
00:38 camelia rakudo-moar 25d348: OUTPUT«42␤»
00:38 ShimmerFairy m: sub foo { say $BAR }; my $BAR = 42; foo;  # a quick show of dynamic vs. lexical
00:38 camelia rakudo-moar 25d348: OUTPUT«5===SORRY!5=== Error while compiling /tmp/uQvZq8c2VM␤Variable '$BAR' is not declared␤at /tmp/uQvZq8c2VM:1␤------> 3sub foo { say 7⏏5$BAR }; my $BAR = 42; foo;  # a quick sh␤»
00:38 kyclark OK, so "sub MAIN(*@numbers)" works then -- a slurpy array to get all the command-line args, but they are required, so calling the program with no args doesn't give me that so so sweet "Usage" statement for free.  Any way to get that?
00:38 kyclark * but the AREN'T required
00:40 timotimo yes, look here:
00:40 timotimo m: sub MAIN($first, *@rest) { }
00:40 camelia rakudo-moar 25d348: OUTPUT«Usage:␤  /tmp/ODqJmiHrIl <first> [<rest> ...] ␤»
00:40 timotimo but you'll have to put $first in front of @rest later
00:41 skids m: sub MAIN(*@numbers where { +$_ > 0 }) { } # wonder if MAIN could hijack that binding error
00:41 camelia rakudo-moar 25d348: OUTPUT«Constraint type check failed for parameter '@numbers'␤  in sub MAIN at /tmp/NB0K4Jllpn:1␤  in block <unit> at /tmp/NB0K4Jllpn:1␤␤»
00:41 ShimmerFairy hm, apparently &USAGE doesn't exist unless you make it. I always thought it was provided by default O_o
00:42 kyclark how do i cons in p6?
00:42 laouji joined #perl6
00:42 kyclark parse($number, @numbers) -> those are no longer one flattened array, so how do i join them with $number in the front?
00:43 timotimo i'd @numbers is copy and then @numbers.unshift($number)
00:43 timotimo otherwise it'd just be "flat $number, @numbers"
00:44 skids m: my $a = 1; my @b = 2,3; ($a, |@b).join(",")
00:44 camelia rakudo-moar 25d348: ( no output )
00:44 skids m: my $a = 1; my @b = 2,3; ($a, |@b).join(",").say
00:44 camelia rakudo-moar 25d348: OUTPUT«1,2,3␤»
00:44 timotimo m: my $a = 1; my @b = 2,3; (flat $a, @b).join(",")
00:44 camelia rakudo-moar 25d348: ( no output )
00:44 timotimo m: my $a = 1; my @b = 2,3; say (flat $a, @b).join(",")
00:44 camelia rakudo-moar 25d348: OUTPUT«1,2,3␤»
00:44 timotimo both ways work
00:45 flussence argh, --profile-compile doesn't fit in 16GB of ram+swap, only took 10 last time I poked at it...
00:46 thowe joined #perl6
00:47 timotimo does someone want to figure out why is-lazy (at line 13513 of the current m-CORE.setting on my machine - it's of class ARRAY) allocates Scalars?
00:47 flussence ...and when I give it enough I get «Unhandled exception: Cannot find method 'handle-exception'» :S
00:48 kyclark In P5, "die" with a newline at the end won't print die's location, but P6 it just adds a newline.  Is there a proper way to stop program execution w/o the trace info?
00:49 timotimo note + exit
00:50 skids timotimo: I would expect the Array reifier to allocate scalars, because Arrays "enforce" containerization on each element (except when explicit binding is used)
00:51 laouji_ joined #perl6
00:51 timotimo i should give you the source i'm looking at
00:51 timotimo https://github.com/koorchik/formula-evalu​ation-benchmark/blob/master/perl6/ast.pl
00:52 ugexe j: .say for (1..10).rotor(3, :partial) # unwind exception with jvm .rotor(:partial)
00:52 timotimo it could very well be that this is all about sub-optimal argument passing
00:52 camelia rakudo-jvm 25d348: OUTPUT«(1 2 3)␤(4 5 6)␤(7 8 9)␤(10)␤»
00:53 ugexe must have already warmed it up
00:55 BenGoldberg kyclark, I think what you want with that 'parse' thing is parse( $number, |@numbers ).  I could be wrong though.
00:55 kyclark OK, comments to make this really idiomatic P6?
00:55 kyclark http://lpaste.net/142512
00:55 timotimo in this case i'd really just throw out sub MAIN completely
00:56 timotimo and then use @*ARGS directly instead
00:56 timotimo also, we have a %% operator (and its negated version !%%) for your divisibility tests
00:58 BenGoldberg Also, you could have used * or $^n or $^x (etc) instead of $_ in those tests.
00:58 timotimo there's also the cool thing called "categorize"
00:58 timotimo m: say <1 3 3 2 8>.classify(* %% 2)
00:58 camelia rakudo-moar 25d348: OUTPUT«False => [1 3 3], True => [2 8]␤»
00:59 timotimo sorry, i told you about "categorize", then immediately used "classify" instead %)
00:59 kyclark for ({ * %% 2 }, { * !%% 2 }) -> $cond ?? that doesn't work
00:59 timotimo it doesn't?
00:59 aborazmeh joined #perl6
00:59 aborazmeh joined #perl6
01:00 kyclark ------>     for ({ * %% 2 }⏏, { * !%% 2 }) -> $cond {
01:00 kyclark expecting any of:
01:00 kyclark horizontal whitespace
01:00 kyclark statement end
01:00 flussence well it's a closure inside a closure...
01:00 kyclark statement modifier
01:00 kyclark statement modifier loop
01:00 timotimo oh
01:00 timotimo that, too
01:00 BenGoldberg How about: for [(* %% 2), (* % 2)] -> $cond {
01:00 timotimo m: for * %% 2, * !%% 2 -> $cond { say $cond }
01:00 camelia rakudo-moar 25d348: OUTPUT«WhateverCode.new␤WhateverCode.new␤»
01:01 timotimo m: for * %% 2, * !%% 2 -> $cond { say (1, 3, 3, 2, 8).grep($cond) }
01:01 camelia rakudo-moar 25d348: OUTPUT«(2 8)␤(1 3 3)␤»
01:01 kyclark wait -- classify -- i see it work in the REPL, but what is it!?  an array?
01:01 BenGoldberg m: for [(* %% 2), (* % 2)] -> $cond { say $cond }
01:01 camelia rakudo-moar 25d348: OUTPUT«WhateverCode.new␤WhateverCode.new␤»
01:02 BenGoldberg If forget if classify returns an array of pairs, or a hash ;)
01:02 BenGoldberg m: say <1 3 3 2 8>.classify(* %% 2).WHAT
01:02 camelia rakudo-moar 25d348: OUTPUT«(Hash[Any,Any])␤»
01:02 BenGoldberg There we go, that's it.
01:02 kyclark that. is. crazy.
01:03 BenGoldberg Why?
01:04 flussence m: <1 3 3 2 8>.classify(* %% 2).values.map: { say @$_.join(' + '), ' = ', [+] $_ };
01:04 camelia rakudo-moar 25d348: OUTPUT«1 + 3 + 3 = 7␤2 + 8 = 10␤»
01:04 kyclark Sorry, not bagging on Perl.  I'm a long-long-time P5er.  Just wrapping my head around this.  I've gone off into Haskell wilderness for a while along with some other languages.  P6 is exciting, but it's frankly weird, too.
01:04 BenGoldberg It's not much differnent from doing, with perl 5: sub classify { my $cond = shift; my %result; push @{$result{$cond->{$_}}}, $_ for @_; \%result }
01:05 flussence I think List::MoreUtils had a thing for doing that...
01:05 timotimo or in python something like { classificator(inval): inval for invals }
01:05 BenGoldberg Except of course that since arrays are objects in p6, it's a class method, not just a subroutine.
01:06 laouji_ joined #perl6
01:06 BenGoldberg I don't think that python would work, since it would produce one result for each value, when you want them aggregated into an array.
01:07 kid51 joined #perl6
01:07 kyclark classify would have to consume the entire list first, right?
01:07 kyclark not possible to work on inifinite lists?
01:09 pierrot joined #perl6
01:09 klabstriechst joined #perl6
01:10 BenGoldberg Making classify work on infinite lists would be tricky -- it could be done, perhaps, but ...
01:12 timotimo BenGoldberg: you are right of course
01:12 timotimo we have a classify method for Supplies, IIRC
01:12 timotimo it spits out a supply of supplies
01:12 timotimo and i think you can coerce an infinite list into a supply? perhaps?
01:13 timotimo you'll have to pump it, of course
01:13 timotimo can't really pull from one of the ends, that would be kinda weird
01:13 timotimo especially if no further items matching your criterion follow after a certain point
01:13 timotimo you'll just keep filling up the other resulting lists
01:14 csd__ joined #perl6
01:17 BenGoldberg I don't see classify anywhere on http://doc.perl6.org/type/Supply
01:18 jonadab joined #perl6
01:19 timotimo could be i only dreamt it up
01:19 timotimo but with supplies and the "on" primitive it should be easy to build
01:20 BenGoldberg It's in S17.  There are tests for it.  It's just been omited from the docs.
01:20 timotimo oh
01:20 timotimo ah, yes
01:20 timotimo implemented in SupplyOperations
01:21 colomon is there a way for users to access quoting characters in regex?
01:21 colomon generic quote, I mean.
01:22 timotimo you mean "anything that we'd accept to quote stuff with"?
01:22 colomon and get its mate, too, if it is different.
01:22 thou joined #perl6
01:23 ShimmerFairy I don't think so, you'd have to use stuff in $~MAIN most likely.
01:23 timotimo hmm
01:23 ShimmerFairy (Or use $~Quote if it's right for what you want to do)
01:23 TimToady you need the quibble stuff too
01:24 ShimmerFairy ah, right
01:26 timotimo oh hey TT
01:26 ienh joined #perl6
01:27 * timotimo transfers to bed in the hopes of getting rid of his all-day-headache
01:28 nuc joined #perl6
01:34 llfourn joined #perl6
01:35 laouji_ joined #perl6
01:36 kaare_ joined #perl6
01:37 TimToady I'm starting to get a handle on why sitaram_'s program is slow
01:38 TimToady parsing a single million-line file, about 8 seconds is the lines/NFG work, so that's in the noise for now
01:38 TimToady the whole thing takes over 3 minutes, about 15 seconds of which is the stuff after the first test, so we can neglect that too
01:39 TimToady 3 minutes for 'next unless m:i/knicks/'
01:39 TimToady taking off :i there takes it down to about 70 seconds
01:39 [Coke] on doc.perl6.org, why are some of the methods of Cool listed as "routine" instead of method or sub?
01:40 TimToady rewriting the match with a non-gather-take .simplematch method takes the non :i case down to about 20 seconds (again, 8 seconds of that is lines overhead, so the actual literal match is about 12 seconds)
01:41 TimToady putting the :i back on, using the .simplematch, takes it back up to about 2m25
01:41 TimToady so the :i pattern is running about 10 times slower than the non-:i pattern
01:43 [Coke] ah. I think maybe some of the htmlify stuff is being broken by the new usage blocks.
01:45 sitaram_ gfldex: eating all RAM?  Not that I could see.  The RAM usage bar doesn't even move (but I only tried with the 10,000 lines per file, 13 files, version, not the 100x of that which is the real input)
01:45 llfourn joined #perl6
01:45 TimToady and, roughly, for running the non-:i pattern through .match instead of .simplematch, we pay about 500% overhead
01:46 TimToady jnthn: ^^^
01:46 TimToady dinner &
01:49 spudboy joined #perl6
01:51 sitaram_ gfldex: running it on 1/10th of the full input (100,000 lines per file, same 13 files).  Memory usage is... inching up slowly (very slowly).  But then it's only done 2 files so far.
01:52 sitaram_ gfldex: oh yeah it's hitting RAM quite a bit now; it's the top in memory
01:53 sitaram_ gfldex: can you tell me what part of my code is doing that (memory hogging)?  Yours isn't, but I am not familiar with the new syntax
01:54 sitaram_ gfldex: first I thought the "for" should be a "while" (in P5 that would make a difference), but you also have a "for"
01:55 llfourn joined #perl6
01:57 llfourn joined #perl6
01:58 dalek doc: e675207 | coke++ | / (4 files):
01:58 dalek doc: Prefer append over push?
01:58 dalek doc: review: https://github.com/perl6/doc/commit/e675207e08
01:58 dalek doc: 99dcace | coke++ | lib/Pod/Convenience.pm6:
01:58 dalek doc: Make first-code-block less picky about location
01:58 dalek doc:
01:58 dalek doc: This lets us deal with the recent additions of text marking
01:58 dalek doc: "defined as" vs. the "Usage"
01:58 dalek doc: review: https://github.com/perl6/doc/commit/99dcaceaa6
02:00 sitaram_ gfldex: yours is eating ram too, just a bit more slowly.  There's no reason for the logic to do that; the final hash (even with the full file) has less than 200 elements, mapping a simple string to a count.
02:00 timotimo oh hold on
02:00 sitaram_ ...definitely no reason to cross firefox in RAM usage :-)
02:00 timotimo you might be keeping around full match objects
02:01 timotimo these hold a reference to the whole source string
02:05 laouji_ joined #perl6
02:11 tokuhirom joined #perl6
02:26 noganex_ joined #perl6
02:34 coetry joined #perl6
02:39 dalek doc: 19c6a84 | coke++ | lib/Type/Iterable.pod:
02:39 dalek doc: fix typo
02:39 dalek doc: review: https://github.com/perl6/doc/commit/19c6a84baf
02:40 [Coke] having seen the USAGES in action now, I'm not sure I like them. Is anyone getting something from them that the signature does not provide?
02:40 chenryn joined #perl6
02:48 ShimmerFairy If you're not familiar with P6 syntax it might be helpful, but they just look redundant to me. Not to mention that they generally have less info than the signatures (e.g. what kind of slurpy is it?).
02:49 ShimmerFairy [Coke]: to me, it seems like something more useful in a tutorial, as opposed to a reference. (And even then, a tutorial would be showing concrete usages, as opposed to an abstract pseudocode)
02:51 laouji_ joined #perl6
03:05 awwaiid I updated my toy music-player-wrapper to post-GLR; only realy change was a "push @files, @found_files" -> "push @files, |@found_files" (abbreviated example)
03:07 llfourn you could also do: append @files, @found_files
03:11 thou joined #perl6
03:19 coetry joined #perl6
03:22 sitaram_ TimToady: what is "lines/NFG"?  (unless it's internal, in which case I may not understand anyway !)
03:22 mfollett joined #perl6
03:27 justine_o joined #perl6
03:28 sitaram_ TimToady: 8 secs for one million lines without doing anything is a bit high.  With a cold cache, http://paste.fedoraproject.org/276186/74630144 takes 16 seconds for 12.2 million lines (in 13 files)
03:28 sitaram_ (umm that's P5 I meant to say but you probably guessed anyway)
03:30 TimToady thing is, it's analyzing all those lines for composed characters and turning them into graphemes, so that's actually impressively fast
03:30 TimToady it's not necessarily what you want for this particular benchmark, of course
03:31 sitaram_ TimToady: so this is a unicode/utf8 related thing?  I admit I've never played with that even on p5; I dare say that might slow down a tad too then!
03:31 TimToady P5 is sort of cheating there by only looking for ASCII, in a sense
03:32 TimToady also, there are potentially ways we can improve that 8 seconds
03:32 TimToady but I'm not worried about those yet, given the that's not the slow bit
03:32 sitaram_ indeed
03:33 TimToady it's currently mostly the :i implementation, and to a lesser extent, the setup of an unneeded lazy gather/take
03:34 sitaram_ would the :i be helped if I replaced it with [kK][nN][iI][cC][kK][sS] ?
03:34 TimToady good question, lemme try it here
03:34 sitaram_ TimToady: just by the way, this isn't something I *need*.  I just got sucked into it by someone else, wrote up the P5 version of the benchmark (submitted it as a pull request), then -- on a whim -- decided to try the perl 6 version.
03:35 sitaram_ I remember a grep speed up from that sort of thing until a year or so ago when they fixed it
03:36 TimToady yes, that's much faster than :i, runs a million lines in about 25 seconds, so about 17 due to the pattern
03:36 TimToady as opposed to more than two minutes
03:37 TimToady and only 5 seconds slower than the bare string
03:38 sitaram_ I get 2X speedup from that (I'm playing with a smaller set of files; only 10,000 lines each instead of the one million lines each, but all 13 files)
03:38 TimToady as a datapoint, using index (case sensitive) takes about 15 seconds, so about 7 seconds for the match
03:39 TimToady and I don't think our index does boyer-moore yet, so that could get better too
03:39 TimToady you don't have the .simplematch I'm using
03:40 sitaram_ yup; and the 32-bit stuff is also probably an issue
03:41 csd_ joined #perl6
03:42 TimToady my .simplematch isn't setting $/ currently, lemme see if that's a big difference, and then maybe I'll check in the .simplematch
03:44 TimToady seems to add a second or two, so I'll leave it out
03:46 aborazmeh joined #perl6
03:46 aborazmeh joined #perl6
03:48 tokuhirom joined #perl6
03:48 dalek rakudo/nom: 472ea02 | TimToady++ | src/core/Str.pm:
03:48 dalek rakudo/nom: add a temp routine for speed testing of .match
03:48 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/472ea02a75
03:49 TimToady and I've been using lines that look like: next unless .simplematch(/:i knicks/);
03:50 TimToady on my machine it runs 6 times longer with the :i than without (discounting the 8 seconds of lines() overhead)
03:51 dalek problem_solver_tutorial: cebd3b6 | (Herbert Breunung)++ | chapter/text0.md:
03:51 dalek problem_solver_tutorial: wrote chapter 0 paragraph 2
03:51 dalek problem_solver_tutorial: review: https://github.com/perl6/problem_​solver_tutorial/commit/cebd3b6497
04:06 dalek problem_solver_tutorial: b9428f5 | (Herbert Breunung)++ | chapter/text0.md:
04:06 dalek problem_solver_tutorial: linktest
04:06 dalek problem_solver_tutorial: review: https://github.com/perl6/problem_​solver_tutorial/commit/b9428f559b
04:06 avuserow joined #perl6
04:08 coetry joined #perl6
04:09 dalek problem_solver_tutorial: 05c49ac | (Herbert Breunung)++ | chapter/text0.md:
04:09 dalek problem_solver_tutorial: next linktest
04:09 dalek problem_solver_tutorial: review: https://github.com/perl6/problem_​solver_tutorial/commit/05c49acd52
04:10 advwp joined #perl6
04:13 dalek problem_solver_tutorial: f9c46cd | (Herbert Breunung)++ | chapter/text0.md:
04:13 dalek problem_solver_tutorial: last linktest
04:13 dalek problem_solver_tutorial: review: https://github.com/perl6/problem_​solver_tutorial/commit/f9c46cdcc4
04:19 awwaiid hm! debian unstable apt-get install perl6 nqp works! nqp installed some other weird js things, and had to be listed at all instead of just rakudo, but whatev
04:21 kyclark joined #perl6
04:21 laouji_ joined #perl6
04:23 dalek problem_solver_tutorial: 3b2b0ed | (Herbert Breunung)++ | chapter/text0.md:
04:23 dalek problem_solver_tutorial: linking complete chapter 0
04:23 dalek problem_solver_tutorial: review: https://github.com/perl6/problem_​solver_tutorial/commit/3b2b0ed845
04:32 coetry joined #perl6
04:33 thowe will rakudobrew get me the latest jazz?
04:34 dalek problem_solver_tutorial: 38c5867 | (Herbert Breunung)++ | chapter/text0.md:
04:34 dalek problem_solver_tutorial: fixing head links
04:34 dalek problem_solver_tutorial: review: https://github.com/perl6/problem_​solver_tutorial/commit/38c586750e
04:34 dalek problem_solver_tutorial: 8820d33 | (Herbert Breunung)++ | / (2 files):
04:34 dalek problem_solver_tutorial: update menu
04:34 dalek problem_solver_tutorial: review: https://github.com/perl6/problem_​solver_tutorial/commit/8820d33a90
04:34 chenryn joined #perl6
04:34 allen joined #perl6
04:36 laouji_ joined #perl6
04:36 lichtkind joined #perl6
04:38 lichtkind brew info rakudo-star
04:38 lichtkind shows you version it will install
04:39 thowe I want Birthday, or Birthday+
04:41 TimToady rakudobrew installs  2015.09-271-g0cee783, which is early Birthday
04:41 lichtkind installing from git is easy
04:41 TimToady yeah, it's not bad, though you have to install panda yourself too
04:42 lichtkind sorry for annoyance here but i have to figuere one thing out and test it on the server
04:42 vendethiel joined #perl6
04:43 dalek problem_solver_tutorial: c3bb273 | (Herbert Breunung)++ | chapter/text (2 files):
04:43 dalek problem_solver_tutorial: link dir fix
04:43 dalek problem_solver_tutorial: review: https://github.com/perl6/problem_​solver_tutorial/commit/c3bb2734a6
04:45 lichtkind hurry that was last time
04:45 lichtkind fix worked
04:45 lichtkind good night
04:49 coetry joined #perl6
04:49 allen joined #perl6
04:51 * moritz idly wonders what time zone lichtkind lives in right now
04:52 dalek ecosystem: 29e9366 | ugexe++ | META.list:
04:52 dalek ecosystem: Add PathTools
04:52 dalek ecosystem:
04:52 dalek ecosystem: General purpose file system utility routines
04:52 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/29e9366429
04:59 thou joined #perl6
05:05 skids .tell timotimo https://gist.github.com/skids/7be38321eade492c3fd9
05:05 yoleaux skids: I'll pass your message to timotimo.
05:06 jkva joined #perl6
05:28 Xor_ joined #perl6
05:28 TimToady m: say  class { has Int:D $.foo is default(0) }.new
05:28 camelia rakudo-moar 472ea0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/WV7JjqRYN7␤Variable definition of type Int:D requires an initializer␤at /tmp/WV7JjqRYN7:1␤------> 3  class { has Int:D $.foo is default(0) 7⏏5}.new␤    expecting any of:␤        constraint␤»
05:29 TimToady I don't think that one should require an initializer
05:30 TimToady m: my Int:D $x is default(0);
05:30 camelia rakudo-moar 472ea0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/p5BBLy48x8␤Default value '0' will never bind to a parameter of type Int:D␤at /tmp/p5BBLy48x8:1␤------> 3my Int:D $x is default(0)7⏏5;␤    expecting any of:␤        constraint␤»
05:30 TimToady say wot?
05:31 TimToady is that one bug or two?
05:32 TimToady m: my Int:D @array is default(0); @array[0] = Nil;
05:32 camelia rakudo-moar 472ea0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/MpVmByHAQM␤Default value '0' will never bind to a parameter of type Array[Int:D]␤at /tmp/MpVmByHAQM:1␤------> 3my Int:D @array is default(0)7⏏5; @array[0] = Nil;␤    expecting any of:␤        co…»
05:33 TimToady two and a half?
05:40 TimToady .tell FROGGS RT #126291 is aimed in your general direction
05:40 yoleaux TimToady: I'll pass your message to FROGGS.
05:43 FROGGS k
05:43 yoleaux 05:40Z <TimToady> FROGGS: RT #126291 is aimed in your general direction
05:44 FROGGS yeah, I wonder how we make that one work...
05:50 davido_ joined #perl6
05:58 FROGGS[mobile] joined #perl6
05:58 FROGGS[mobile] okay, I guess I know how
05:58 telex joined #perl6
06:01 mjp_ left #perl6
06:03 TimToady jnthn: re http://irclog.perlgeek.de/p​erl6/2015-10-07#i_11335791 the original intent was just to have an alternate sugar for traits, but with people carping about is vs isa, if isa semantics dominate traits, then colonpairs could be a safe haven to force the trait interpretion, but I don't really see the need for this before Christmas
06:08 csd_ joined #perl6
06:10 FROGGS joined #perl6
06:17 summa joined #perl6
06:17 summa m: say <a a b b b c c>.squish;
06:17 camelia rakudo-moar 472ea0: OUTPUT«(a a b b b c c)␤»
06:18 summa m: my $as = *.lc; say <a A b B c>.squish(:$as);
06:18 camelia rakudo-moar 472ea0: OUTPUT«(a A b B c)␤»
06:18 diana_olhovik joined #perl6
06:19 summa a squish bug?
06:20 laouji_ joined #perl6
06:22 TimToady kinda looks like it
06:23 TimToady m: say (1,1,2,2,2,3,3).squish
06:23 camelia rakudo-moar 472ea0: OUTPUT«(1 1 2 2 2 3 3)␤»
06:26 TimToady m: say (1,1,2,2,2,3,3).unique
06:26 camelia rakudo-moar 472ea0: OUTPUT«(1 2 3)␤»
06:28 [Tux] test             50000    36.738    36.628
06:28 [Tux] test-t           50000    36.702    36.591
06:28 [Tux] http://tux.nl/Talks/CSV6/speed4.html
06:29 TimToady m: say (1,1,2,2,2,3,3).squish(:with(&[eqv]))
06:29 camelia rakudo-moar 472ea0: OUTPUT«(1 1 2 2 2 3 3)␤»
06:30 dalek mu: a2dfe24 | (Ingo Blechschmidt)++ | docs/Perl6/Perl5/Differences.pod:
06:30 dalek mu: Correct a few tiny typos
06:30 dalek mu: review: https://github.com/perl6/mu/commit/a2dfe248f0
06:30 dalek mu: 988a56a | FROGGS++ | docs/Perl6/Perl5/Differences.pod:
06:30 dalek mu: Merge pull request #9 from iblech/patch-1
06:30 dalek mu:
06:30 dalek mu: Correct a few tiny typos
06:30 dalek mu: review: https://github.com/perl6/mu/commit/988a56ae06
06:31 firstdayonthejob joined #perl6
06:38 Ven joined #perl6
06:42 PotatoGim joined #perl6
06:44 derlg_ joined #perl6
06:44 derlg_ hello
06:44 FROGGS hi derlg_
06:47 thou joined #perl6
06:51 bsb joined #perl6
06:55 zakharyas joined #perl6
06:56 * Ven waves at #perl6. o/
06:57 derlg_ *waves*
06:57 bjz joined #perl6
06:59 jkva joined #perl6
07:01 dalek rakudo/nom: e54ea07 | TimToady++ | src/core/Str.pm:
07:01 dalek rakudo/nom: setting $/ is in the noise level, so do it
07:01 dalek rakudo/nom:
07:01 dalek rakudo/nom: The .simplematch method is still considered a temporary experiment,
07:01 dalek rakudo/nom: but setting $/ makes it likely that the parser could select it when it
07:01 dalek rakudo/nom: knows there are no external options like :g.  (Internal options like :i
07:01 dalek rakudo/nom: are okay.)
07:01 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e54ea0735b
07:03 rurban joined #perl6
07:03 domidumont joined #perl6
07:06 laouji_ joined #perl6
07:09 Woodi joined #perl6
07:09 * moritz really wants an infix:<Z> in Perl 5
07:15 nine moritz: at least there's zip in List::MoreUtils. I don't think, I've ever had a use case for it though.
07:15 grondilu joined #perl6
07:16 antiatom joined #perl6
07:17 moritz nine: my current use case is having a list of names and a list of values, and passing them as named arguments
07:17 bjz joined #perl6
07:17 moritz nine: the workaround is  my %h; @h{@names} = @values; foo(%h)
07:17 nine foo(zip @names, @values) would work, too
07:17 moritz nine: but once you're used to Z, you want to write that without the temporary var as  foo( @names Z @values );
07:18 moritz ... at the expense of another dependency
07:18 nine List::MoreUtils is in core
07:18 moritz Data for 2014-09-14
07:18 moritz List::MoreUtils was not in CORE (or so I think)
07:19 nine Oh, indeed
07:19 nine Don't know, why I thought it was...
07:19 nine A huge improvement for Perl 5 would already be to just unify List::Util and List::MoreUtils
07:19 moritz wishful thinking :-)
07:20 El_Che nine++
07:22 nine moritz: according to metacpan.org, 738 CPAN modules depend on List::MoreUtils. You may already depend on it anyway.
07:26 bjz joined #perl6
07:27 cucushka joined #perl6
07:28 moritz nine: probably. But don't undermine my ramblings, will you? :-)
07:29 nine moritz: I wouldn't dare :) I'm looking forward to the day when I can leave the List::Util/List::MoreUtils nonsense behind :)
07:30 nine I've been programming Perl 5 for fun and for a living for 15 years and still can't remember which util is in which package.
07:37 dalek roast: 6fa03d9 | TimToady++ | S04-statement-modifiers/ (8 files):
07:37 dalek roast: test that all statement modifiers are terminators
07:37 dalek roast: review: https://github.com/perl6/roast/commit/6fa03d9816
07:37 dalek nqp: 6717984 | TimToady++ | src/HLL/Grammar.nqp:
07:37 dalek nqp: nulltermish should check terminator
07:37 dalek nqp:
07:37 dalek nqp: This lets statement modifiers be terminators after comma, as in STD.
07:37 dalek nqp: Fixes RT #79174.
07:37 dalek nqp: review: https://github.com/perl6/nqp/commit/67179841ac
07:39 llfourn joined #perl6
07:39 dalek rakudo/nom: 23c9dff | TimToady++ | src/Perl6/Grammar.nqp:
07:39 dalek rakudo/nom: with/without statement mods are also terminators
07:39 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/23c9dffb52
07:39 dalek rakudo/nom: 651e17c | TimToady++ | tools/build/NQP_REVISION:
07:39 dalek rakudo/nom: bump nqp to get RT #79174 fix
07:39 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/651e17c080
07:41 moritz wow, a 5-digit RT fixed \o/
07:43 ely-se joined #perl6
07:44 bakedb joined #perl6
07:58 darutoko joined #perl6
08:01 dalek ecosystem: e22c33d | moznion++ | META.list:
08:01 dalek ecosystem: Add HTML::Escape
08:01 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/e22c33dacf
08:01 dalek ecosystem: 178284b | moritz++ | META.list:
08:01 dalek ecosystem: Merge pull request #68 from moznion/html-escape
08:01 dalek ecosystem:
08:01 dalek ecosystem: Add HTML::Escape
08:01 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/178284baaa
08:01 dalek rakudo/nom: f3aace1 | lizmat++ | src/core/Any-iterable-methods.pm:
08:01 dalek rakudo/nom: Fix for #126293
08:01 dalek rakudo/nom:
08:01 dalek rakudo/nom: For some reason, the "once" block was fired for *every* time a
08:01 dalek rakudo/nom: pull-one was called.  Also very unclear why the tests didn't spot this.
08:01 dalek rakudo/nom: Weird.
08:01 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f3aace185e
08:06 ienh joined #perl6
08:06 domm joined #perl6
08:09 dakkar joined #perl6
08:10 dalek roast: 522ca4a | lizmat++ | S32-list/squish.t:
08:10 dalek roast: Add test for #126293
08:10 dalek roast: review: https://github.com/perl6/roast/commit/522ca4afd1
08:12 RabidGravy joined #perl6
08:14 masak lizmat: "Also very unclear why the tests didn't spot this." -- is there a test which definitely ought to have spotted this?
08:14 Ven joined #perl6
08:18 lizmat hmmm... all the tests seem to have .list, which probably gets the push-all version of the iterator
08:19 csd_ joined #perl6
08:20 llfourn joined #perl6
08:21 AlexDaniel joined #perl6
08:22 dalek roast: c8e924a | lizmat++ | S32-list/squish.t:
08:22 dalek roast: Some more test adjustments
08:22 dalek roast: review: https://github.com/perl6/roast/commit/c8e924a615
08:22 AlexDaniel awwaiid: it seems like rakudo version in debian unstable is 2014.07-something
08:23 AlexDaniel awwaiid: so I think that I'd much rather prefer if it was not there at all
08:24 larion joined #perl6
08:24 AlexDaniel awwaiid: Oh! but nqp, indeed, is 2015.09
08:27 kjs_ joined #perl6
08:27 Axord joined #perl6
08:34 lizmat afk for a few hours&
08:35 thou joined #perl6
08:37 ely-se I prefer awk for a few hours.
08:37 * moritz is awkward all day
08:38 ely-se I think a2p should be upgraded so that it can generate Perl 6 code.
08:43 literal m: my @words = <foo <bar> baz>;
08:43 camelia rakudo-moar f3aace: OUTPUT«Value of type Array uselessly passed to val()  in block <unit> at /tmp/XblfYcnIau:1␤»
08:43 literal what does this mean?
08:44 dr_bibble joined #perl6
08:44 moritz it's  bogus warning
08:44 moritz or error
08:45 rindolf joined #perl6
09:01 kjs_ joined #perl6
09:02 espadrine joined #perl6
09:26 spider-mario joined #perl6
09:29 Psyche^ joined #perl6
09:32 ][Sno][ joined #perl6
09:33 jnthn morning, #perl6
09:34 DrForr Afternoon...
09:34 jnthn Certainly before noon here :)
09:35 jnthn Granted, it's "jitro" not "ráno", but... :)
09:36 [Sno] joined #perl6
09:36 DrForr Damn you timezone Dan :)
09:36 jnthn TimToady++ # another one off the xmas list
09:41 masak jnthn: wow, there's both "jitro" and "ráno"? "jitro" is kinda like "antenoon", I guess?
09:41 jnthn masak: Yeah, I think it applies after 10am
09:42 DrForr Oh, right, another apocalypse survived.
09:42 masak jnthn: yeah, that's how I use "antenoon"
09:43 FireFly joined #perl6
09:47 lolisa joined #perl6
09:49 kid51 joined #perl6
09:49 dalek doc: 851cf02 | (Lloyd Fournier)++ | lib/Language/modules.pod:
09:49 dalek doc: Fixed misstatement about packages and 'is export'
09:49 dalek doc: review: https://github.com/perl6/doc/commit/851cf02103
09:50 vytas joined #perl6
09:54 andreoss joined #perl6
09:54 dalek doc: 7df7c77 | (Lloyd Fournier)++ | lib/Language/modules.pod:
09:54 dalek doc: added missing =end code
09:54 dalek doc: review: https://github.com/perl6/doc/commit/7df7c77c68
09:54 andreoss where the difference between [$a]  and [$a,]  is described?
09:55 pmurias joined #perl6
09:55 masak m: my $a = 42; say [$a].perl; say [$a,].perl
09:55 camelia rakudo-moar f3aace: OUTPUT«[42]␤[42]␤»
09:55 andreoss m: ([[1,2,3],] , [[1,2],[3]] ).flat.say
09:55 camelia rakudo-moar f3aace: OUTPUT«([1 2 3] [1 2] [3])␤»
09:55 pmurias what do I need to do to have perl6-bench benchmark nqp-js?
09:55 andreoss m: ([[1,2,3]] , [[1,2],[3]] ).flat.say
09:55 camelia rakudo-moar f3aace: OUTPUT«(1 2 3 [1 2] [3])␤»
09:55 jnthn andreoss: S07 if nowhere else
09:56 * jnthn thought somebody worked on getting a description into the docs too
09:56 llfourn m: [1] ~~ [1,]
09:56 camelia rakudo-moar f3aace: ( no output )
09:56 llfourn say [1] ~~ [1,]
09:56 llfourn m: say [1] ~~ [1,]
09:56 camelia rakudo-moar f3aace: OUTPUT«True␤»
09:57 andreoss it doesn't .flat the same way
09:58 andreoss why [[1]] is the same as [1]?
09:58 jnthn Signle argument rule
09:58 jnthn Same thing that makes [1..10] work
10:01 virtualsue joined #perl6
10:03 llfourn m: say [[1]] ~~ [[1],]
10:03 camelia rakudo-moar f3aace: OUTPUT«False␤»
10:04 llfourn m: say [[1]] ~~ [[1]]
10:04 camelia rakudo-moar f3aace: OUTPUT«True␤»
10:06 laouji_ joined #perl6
10:16 rurban joined #perl6
10:23 thou joined #perl6
10:32 nerfur joined #perl6
10:33 nerfur hello
10:34 antiatom joined #perl6
10:35 psch hi #perl6 o/
10:37 psch m: constant $x = "µ, @"; sub circumfix:<<$x>> { say $^a }; µ 5 @; # unclear if this is correct as-is or should work...
10:37 camelia rakudo-moar f3aace: OUTPUT«5===SORRY!5=== Error while compiling /tmp/cB8XNgtIl5␤Colon pair value '$x' too complex to use in name␤at /tmp/cB8XNgtIl5:1␤------> 3nstant $x = "µ, @"; sub circumfix:<<$x>>7⏏5 { say $^a }; µ 5 @; # unclear if this i␤    expecting any of…»
10:39 [ptc]_ joined #perl6
10:40 jnthn psch: Is there another form to write it that does work?
10:41 dalek roast: 7f75447 | jnthn++ | S32-str/fc.t:
10:41 dalek roast: Tests for .fc.
10:41 dalek roast:
10:41 dalek roast: Including the various tricky cases.
10:41 dalek roast: review: https://github.com/perl6/roast/commit/7f75447e30
10:41 psch jnthn: i don't think so, no
10:42 psch m: constant $x = "µ, @"; sub circumfix:[$x] { say $^a }; µ 5 @; # unclear if this is correct as-is or should work...
10:42 camelia rakudo-moar f3aace: OUTPUT«5===SORRY!5=== Error while compiling /tmp/TzxfWg1B64␤Two terms in a row␤at /tmp/TzxfWg1B64:1␤------> 3 @"; sub circumfix:[$x] { say $^a }; µ 57⏏5 @; # unclear if this is correct as-is ␤    expecting any of:␤        infix␤        inf…»
10:42 psch huh, accidental underline o.o
10:42 psch jnthn: but that form also doesn't do the .words.Stringy conversion either, so..?
10:42 jnthn No
10:42 jnthn Ah, so the first one is the one we might have expected to work
10:43 psch jnthn: right, if any of those should work it's the first one
10:43 jnthn I dunno, it'd be nice if it worked some day, but I don't think we need to sort it out pre-Christmas.
10:43 jnthn If it's -Ofun to make it work, feel free ;)
10:43 psch i'm struggling to find a way to figure out which values i can compile time evaluate
10:44 psch as in, the check that fails that one is the same that forbids infix:[/./]
10:44 psch and that is definitely bogus...
10:45 dalek rakudo/nom: c7b6128 | lizmat++ | src/Perl6/World.nqp:
10:45 dalek rakudo/nom: Only initialize $Pair when we need it
10:45 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c7b6128334
10:45 jnthn I recently did a patch to make constants interpolated in regexes contribute to LTM; dunno if that could be of interest.
10:45 jnthn Well, or inspiration.
10:45 psch i think it's more a matter of ast inspection - the only idea i had up to now was "see if there's a WVal at the bottom, if so fail"
10:46 Ven joined #perl6
10:46 psch i guess i'll try that, see if it works
10:46 psch unless there's a case that a WVal could turn into a correct compile time value..?
10:49 chenryn joined #perl6
10:50 laouji_ joined #perl6
10:56 antiatom joined #perl6
10:57 ely-se joined #perl6
11:04 jnthn psch: Well, you can probably check the value is a Str
11:05 jnthn (If you have a WVal)
11:10 dalek nqp: 0853cdb | jnthn++ | tools/build/MOAR_REVISION:
11:10 dalek nqp: Bump MOAR_REVISION for new foldcase op.
11:10 dalek nqp: review: https://github.com/perl6/nqp/commit/0853cdbabc
11:10 dalek nqp: 84f7b50 | jnthn++ | src/vm/moar/QAST/QASTOperationsMAST.nqp:
11:10 dalek nqp: Map nqp::fc op on Moar backend.
11:10 dalek nqp: review: https://github.com/perl6/nqp/commit/84f7b505de
11:10 dalek nqp: a488d59 | jnthn++ | src/vm/jvm/QAST/Compiler.nqp:
11:10 dalek nqp: For now, map nqp::fc to nqp::lc on JVM.
11:10 dalek nqp:
11:10 dalek nqp: It's right for a bunch of cases, at least.
11:10 dalek nqp: review: https://github.com/perl6/nqp/commit/a488d59023
11:12 psch jnthn: well, <<>> gives a Slip - i haven't seen a case where i get a Str WVal, and if those appear they seem to already have a compile time value and already work earlier
11:23 dalek rakudo/nom: 54451b3 | jnthn++ | tools/build/NQP_REVISION:
11:23 dalek rakudo/nom: Bump NQP_REVISION for new nqp::fc op.
11:23 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/54451b3c21
11:23 dalek rakudo/nom: 912d208 | jnthn++ | src/core/ (2 files):
11:23 dalek rakudo/nom: Implement .fc method and fc(...) sub.
11:23 dalek rakudo/nom:
11:23 dalek rakudo/nom: Performs the Unicode foldcase operation. Unlike uc/tc/lc, it already
11:23 dalek rakudo/nom: understands full mappings (where one grapheme may expand to many). It
11:23 dalek rakudo/nom: is made available on JVM too, but is incomplete there.
11:23 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/912d208771
11:23 dalek rakudo/nom: 1a1c0ff | jnthn++ | t/spectest.data:
11:23 dalek rakudo/nom: Run S32-str/fc.t on MoarVM.
11:23 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1a1c0ff6df
11:23 larion joined #perl6
11:30 dalek rakudo/nom: 6f31121 | lizmat++ | src/Perl6/World.nqp:
11:30 dalek rakudo/nom: Reduce number of $*W lookups
11:30 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6f31121e7c
11:32 gtl joined #perl6
11:32 jnthn Once again, got some other bits to tend to after lunch today, but later on plan to work on getting uc/tc/lc handling the special cases where they cause a string to change its grapheme count :)
11:33 * masak .oO( what apout fc?! ) :P
11:37 jnthn .oO( don't give a fc! )
11:37 jnthn bbiab &
11:51 laouji joined #perl6
11:52 ely-se joined #perl6
11:52 cognominal joined #perl6
11:53 domidumont FROGGS: done: rakudo 2015.09 is now available on Debian/sid. Thanks for the help
11:53 [ptc] domidumont++
11:54 domidumont [ptc]: hi.. glad you're still around :-)
11:54 brrt joined #perl6
11:54 [ptc] domidumont: sorry for my lack of help over the last while
11:54 domidumont [ptc]: no problem. That's what teams are for
11:55 [ptc] yup, am still around.  Trying to get myself active again.  Had hoped to make the necessary changes for rakudo today, but you beat me to it :-)
11:55 * [ptc] needs to learn not to promise too many things...
11:55 [ptc] domidumont: really happy that you got the whole stack built on Debian!
11:55 Loren joined #perl6
11:56 timotimo i'm also quite delighted to see 2015.09 on debian! :)
11:56 yoleaux 05:05Z <skids> timotimo: https://gist.github.com/skids/7be38321eade492c3fd9
11:56 moritz domidumont++
11:56 timotimo .tell skids a bigger MAST can result in better performance if our dynamic optimizer can understand it better, so that might be an explanation. ..
11:56 yoleaux timotimo: I'll pass your message to skids.
11:57 domidumont [ptc]: we're still not out of the woods. I'm worried about the compatibility between version between moar nqp and rakudo. Is there a ground rule ?
11:57 timotimo a newer version of moar is almost always compatible with older nqp and rakudo
11:57 [ptc] domidumont: I believe they should all have the same tag
11:57 moritz yes, they need dependencies on the exact version numbers
11:58 timotimo between nqp and rakudo it can be much, much hairier
11:58 [ptc] domidumont: e.g. moarvm|nqp|rakudo.2015.09 should work
11:58 timotimo in any case, a change in nqp version means rakudo has to rebuild all its files
12:00 AlexDaniel joined #perl6
12:01 domidumont ok. I'm retrying, rebuild moar, test... ok. no problem.. now nqp...
12:01 domidumont no. By rebuilding nqp (same code), I break rakudo
12:01 moritz aye
12:01 moritz that's the really hairy part.
12:01 AlexDaniel domidumont: great!!
12:02 domidumont AlexDaniel: thanks :-)
12:03 domidumont moritz: that is going to be a pain if nqp needs packaging fix. I'll then need to trigger a re-build of rakudo and express correctly the dependencies between packages. Lest I'll get a log of bug reports ...
12:03 timotimo right, when nqp changes, rakudo immediately has to be rebuilt to go with the new nqp
12:04 domidumont timotimo: I get that, but I did not change nqp. I just rebuilt it
12:04 [ptc] my guess is that if one of the "supporting" packages needs a packaging fix, then all above need to be rebuilt and repackaged as well
12:05 domidumont [ptc]: usually, not if the change is backward compatible
12:06 moritz rakudo depends on exact versions of serialization contexts in nqp
12:06 moritz so even if your fix adds a single object that's not exposed to the outside world, you need a rakudo rebuild
12:07 [ptc] domidumont: I only meant in the Rakudo stack, since it looks like if one needs to rebuild nqp, then rakudo needs to be rebuilt too
12:07 El_Che the windows rakudo build is not up to date yet. Something blocking?
12:07 domidumont moritz: that sounds reasonable. But why impose a rebuild if the code does not change ?
12:07 Ven joined #perl6
12:07 moritz domidumont: that's another nasty thing (more)
12:08 [ptc] domidumont: however, that's how it *looks*, there are probably other considerations which mean that one can avoid rebuilds in some situations
12:08 timotimo domidumont: ah, well, that's a change in rakudo's eyes :\
12:08 moritz domidumont: nqp and rakudo identify serialization contexts via hashes
12:08 moritz domidumont: now nqp is self-hosting, which means it must take care not to confuse the SC of the host and of the source when compiling itself
12:09 moritz domidumont: which is why it introduces timestamps into these SCs, to avoid collision
12:10 moritz domidumont, jnthn: I wonder if we could use command-line-supplyable identifiers instead of timestamps to distinguis the stages at the various builds
12:10 moritz then a rebuild without a code change should get an SC with the same hash
12:10 timotimo that could also give us shorter identifiers
12:10 timotimo i'd like that
12:10 timotimo save a tiny bit more ram and disk space
12:12 thou joined #perl6
12:12 domidumont Or the hash could be based on the actual source code (a bit like the code signatures computed by cons or scons)
12:12 timotimo that would break the compiler vs compilee thing again
12:12 timotimo because we always build the stage2 with the same code we've built the stage1 from
12:13 * domidumont light bulb went on
12:13 moritz domidumont: no
12:13 Ven joined #perl6
12:13 moritz domidumont: because stage 1 and stage 2 have the same source code
12:15 domidumont can the hash be salted with stage1 and then stage2 ?
12:16 moritz something like that, yes
12:16 moritz that's what I meant with command-line-supplyable identifiers
12:16 domidumont ah ok.
12:17 timotimo those identifiers could very well have - for example - the git commit identifier (plus a random string if the commit is "dirty")
12:19 dalek rakudo/nom: 6f65c36 | peschwa++ | src/Perl6/World.nqp:
12:19 dalek rakudo/nom: Add some more nibble_to_str logic.
12:19 dalek rakudo/nom:
12:19 dalek rakudo/nom: This lets us distinguish a few more valid-at-compile-time values for &foofix
12:19 dalek rakudo/nom: declarations.
12:19 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6f65c36ea2
12:19 FROGGS domidumont: \o/
12:19 dalek roast: db4b845 | peschwa++ | S06-operator-overloading/sub.t:
12:19 dalek roast: Add a test for defining a circumfix operator from a single constant.
12:19 dalek roast: review: https://github.com/perl6/roast/commit/db4b84535e
12:20 laouji joined #perl6
12:21 psch i found myself wishing for nqp::trim with the rakudo commit, but i'm pretty sure it's not useful enough to want the op
12:23 jnthn I suspect we can find a different way to manage the bootstrap issue than the timestamps.
12:23 jnthn Without too much trouble.
12:24 andreoss why i can't have lazy arrays of native type?
12:24 jnthn moritz and timotimo both nailed the problem we're solving with them
12:26 jnthn andreoss: Because natively typed arrays are stored differently (in a packed form, rather like C arrays)
12:27 moritz seems we already have a stable-sc option
12:27 moritz but don't use it anywhere
12:27 laouji joined #perl6
12:27 jnthn (Meaning they can be passed off to to native code, even)
12:27 moritz though it needs a bit extending
12:27 * grondilu got:  MoarVM op 'fc' is unknown as a core or extension op at gen/moar/stage1/QAST.nqp:1862  (gen/moar/stage1/QAST.moar​vm:moarop_return_type:98)
12:28 * ShimmerFairy wonders if sticking "_stage1" and "_stage2" to the end of the SC hash would be sufficient to differentiate the stages :P
12:28 [Coke] moritz: 'make html' should now work again on docs.
12:28 moritz grondilu: seems like your moarvm is too old
12:28 moritz [Coke]++ # thanks!
12:28 timotimo grondilu: needs a newer moarVM
12:28 * jnthn did bump MOAR_REVISION and NQP_REVISION...hopefully correctly :)
12:29 moritz jnthn: might've been just a rebuild without running Configure.pl
12:30 jnthn aye :)
12:32 timotimo it's a very easy mistake to make
12:32 sufrostico joined #perl6
12:34 moritz jnthn: https://github.com/perl6/nqp/commit/a1​9dab8ae4f435fa44eaf6286f512b5543fd8888 do you think that's the right direction?
12:34 moritz I guess src/QAST/Block.nqp    my $cuid_suffix := ~nqp::time_n(); wants similar treatment
12:35 dalek nqp/stable-sc: a19dab8 | moritz++ | / (3 files):
12:35 dalek nqp/stable-sc: Build stage2 with the --stable-sc option
12:35 dalek nqp/stable-sc:
12:35 dalek nqp/stable-sc: also extend --stable-sc to accept an identifier which is to be part of the SC hash
12:35 dalek nqp/stable-sc:
12:35 dalek nqp/stable-sc: Can only make stage 1 stable after a bootstrap, I fear
12:35 dalek nqp/stable-sc: review: https://github.com/perl6/nqp/commit/a19dab8ae4
12:36 lea joined #perl6
12:37 dalek nqp/stable-sc: c0c31bf | moritz++ | src/QAST/Block.nqp:
12:37 dalek nqp/stable-sc: Avoid use of nqp::time_n() if --stable-sc was provided
12:37 dalek nqp/stable-sc: review: https://github.com/perl6/nqp/commit/c0c31bf4bd
12:37 timotimo i'm liking the way this branch goes
12:38 grondilu I did run Configure.pl.  It's not the first time I have to remove moarvm manually.  Not sure what I'm missing.
12:39 timotimo "remove"?
12:39 timotimo i hope you mean "rebuild" :)
12:39 * grondilu ran 'rm $(which moar)' before running Configure.pl again
12:39 moritz Code ref 'BUILD' does not exist in serialization context
12:39 moritz EEKS
12:40 lizmat hmm.  that sounds familiar
12:40 moritz that's after bootstrapping
12:40 moritz (in the stable-sc branch, and with --stable-sc=s0)
12:41 moritz after bootstrapping, and without --stable-sc=s0, all is fine
12:41 moritz where "all" = all(build, tests)
12:41 grondilu ah some other ugly errors
12:41 grondilu src/6model/reprs/MVMIter.c: In function ‘MVM_iter’:
12:41 grondilu src/6model/reprs/MVMIter.c:304:1: error: unrecognizable insn:
12:41 grondilu (insn 577 576 578 45 (set (reg:SI 2 r2)
12:41 grondilu (sign_extend:SI (mem/s:QI (plus:SI (mult:SI (reg/v:SI 187 [ idx ])
12:41 grondilu (const_int 8 [0x8]))
12:41 grondilu (reg/f:SI 452 [ frame_59->env ])) [0 D.13419_98->i8+0 S1 A64]))) src/6model/reprs/MVMIter.c:197 -1
12:41 domm joined #perl6
12:41 grondilu (nil))
12:41 rurban joined #perl6
12:42 jnthn grondilu: It...caused an internal error in your *C* compiler?!
12:43 grondilu sthe hell if I know
12:43 jnthn It's what it looks like
12:43 [ptc] it sure looks that way.  Which compiler is it?  (just curious)
12:43 grondilu I'm removing my nqp dir and start again
12:43 * moritz rofls
12:44 grondilu gcc (Debian 4.6.3-14+rpi1) 4.6.3
12:44 jnthn .oO( When will gcc be production ready? :) )
12:44 [ptc] in 15 years ;-)
12:44 timotimo what the .... %)
12:45 grondilu that's arguably a pretty old version
12:45 timotimo yeah, but still ...
12:46 masak apparently, gcc is implemented using Lisp :P
12:46 moritz masak: in its own Lisp dialect, of course
12:46 timotimo not guile, eh?
12:46 timotimo well, that's a scheme, right?
12:47 moritz GCLisp
12:47 moritz timotimo: I'm just kidding, I have no idea
12:47 timotimo heh
12:47 jnthn Well, Greenspun's Tenth Rule... :)
12:47 timotimo when can gcc read mail?
12:47 timotimo actually ... when can rakudo read mail?
12:48 [Coke] m: open fail
12:48 camelia rakudo-moar 6f3112: ( no output )
12:48 moritz timotimo: port Email::MIME to Perl 6! :-)
12:51 [Coke] moritz: if I do docs#147, do you have a preference for the new dir name? I am thinking "lib" for code, "src" for docs. or maybe "docs?"
12:51 nine Don't port, use!
12:51 nine Actually....I remember having demonstrated reading my email with Perl 6 a year ago ;)
12:52 FROGGS nine: bah! don't stop the movement! /o/
12:52 masak nine: "Don't port, use!" is a nice slogan
12:52 masak though, it's also a nice point that this is not an either-or situation...
12:53 masak usually, nine's method is the fastest one for getting a result... porting might be a long-term strategy
12:53 grondilu oh crap.  Same error again.
12:53 moritz [Coke]: "lib" for code.
12:53 moritz [Coke]: for the docs... dunno. 'src' or 'doc' (singular please)
12:54 moritz I guess I prefer 'doc'
12:54 pink_mist [Coke]: if the src needs to be transformed before it can be displayed, sure, src sounds good
12:54 gfldex m: 'mbox'.IO.lines()>>.say # timotimo there you go
12:54 camelia rakudo-moar 6f65c3: OUTPUT«From camelia@ns1.niner.name  Thu Oct 23 11:00:01 2014␤Return-Path: <camelia@ns1.niner.name>␤X-Original-To: camelia␤Delivered-To: camelia@ns1.niner.name␤Received: by ns1.niner.name (Postfix, from userid 1012)␤     id 6BFCBC0041; Thu, 23 Oct 2014 11:00…»
12:54 pink_mist imo
12:54 timotimo gfldex: wow, perl6 is miraculous!
12:54 timotimo however
12:54 timotimo >>.say will give you the lines in a semi-random order :)
12:55 timotimo you're basically lazily reading in the lines, just to hyper them into "say"
12:55 gfldex i'm always lazy when i read my mail :)
12:55 moritz you don't read it "really fast", with the good old "rm -rf *" command?
12:55 moritz "read mails, really fast"
12:57 gfldex I read every 2nd mail and assume it to be a good average
12:58 nine I like to recommend using what's already there for getting quicker results and then start porting later, when there's a user and the user's test suit available.
12:58 dalek roast: 0f71d26 | lizmat++ | S06-operator-overloading/sub.t:
12:58 dalek roast: Skip tests that makes compilation barf
12:58 dalek roast: review: https://github.com/perl6/roast/commit/0f71d26c4f
12:59 dalek rakudo/nom: f931261 | lizmat++ | src/Perl6/Grammar.nqp:
12:59 dalek rakudo/nom: Make 'use attributes' work as designed
12:59 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f931261fdb
12:59 masak "So I can go to Japan and ask for directions, but I can’t really understand the answers!" -- http://www.linuxvoice.com/interview-larry-wall/
13:00 masak TimToady: so... you're saying you speak... "write-only Japanese"? :P :P :P
13:01 * masak .oO( ご注意:上記は冗談です )
13:02 psch lizmat: that test worked fine for me when i pushed it :/
13:04 psch i guess that means something i rebased over broke it again
13:04 psch well, except if there's something OSX-specific somewhere in there
13:06 lizmat trying to reproduce the error message
13:06 psch hm, no, nothing due to the rebase
13:06 lizmat compiling takes about 40 seconds
13:06 Guest49363 should END run before all the threads are done? leads to this happening:
13:06 Guest49363 m: my $fh = open('/dev/urandom'); END { $fh.close }; Thread.start({ $fh.read(2) });
13:06 camelia rakudo-moar 6f65c3: OUTPUT«open is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting:1␤  in sub open at src/RESTRICTED.setting:9␤  in block <unit> at /tmp/JBqcPNHhA5:1␤␤Unhandled exception: Method 'close' not found for invocant of class 'Any'…»
13:07 Guest49363 m: my $fh = '/dev/urandom'.IO.open; END { $fh.close }; Thread.start({ $fh.read(2) });
13:07 camelia rakudo-moar 6f65c3: OUTPUT«Unhandled exception: read bytes requires an object with REPR MVMOSHandle␤   at gen/moar/m-CORE.setting:21793  (/home/camelia/rakudo-inst-2/share/perl​6/runtime/CORE.setting.moarvm:read:58)␤ from /tmp/v31PshSTYr:1  (<ephemeral file>::19)␤ from gen/moar…»
13:07 nerfur left #perl6
13:07 lizmat Guest49363: I think it has to do with a malformed UTF-8 error message being improperly handled
13:07 timotimo m: say '/dev/urandom'.IO.WHAT
13:07 camelia rakudo-moar 6f65c3: OUTPUT«(IO::Path)␤»
13:08 timotimo m: say '/dev/urandom'.IO.perl
13:08 camelia rakudo-moar 6f65c3: OUTPUT«q|/dev/urandom|.IO(:SPEC(IO::Spec::Unix))␤»
13:08 timotimo m: say '/dev/urandom'.IO.open.WHAT
13:08 camelia rakudo-moar 6f65c3: OUTPUT«(IO::Handle)␤»
13:08 timotimo m: say '/dev/urandom'.IO.open.perl
13:08 camelia rakudo-moar 6f65c3: OUTPUT«IO::Handle.new(path => q|/dev/urandom|.IO(:SPEC(IO::Spec::Unix)), ins => 0, chomp => Bool::True)␤»
13:08 lizmat psch: grrrr... now it compiles and runs ok  :-(
13:08 timotimo the restricted setting should restrict this, too .. :S
13:08 psch lizmat: that's curious :/
13:09 carlin lizmat: that one is END is running and closing the filehandle before the thread calls read on it
13:09 lizmat lemme run it 10 times and see if I can reproduce it
13:11 lizmat hmmm.... so why does *parsing* S06-operator-overloading/sub.t take as long as parsing the setting, with only 516 lines ???
13:13 FROGGS because it clones and modifies the grammar very often?
13:13 Ven joined #perl6
13:14 lizmat could that maybe explain why the setting compilation got slower?  that we're modifying the grammar again, when we shouldn' t?
13:15 brrt seems like a reasonable explanation
13:16 FROGGS it's possible... you can test it by adding several pre/post/infixes and see what happens
13:17 lizmat maybe putting a say in the grammar cloning logic would be handier ?
13:18 jnthn lizmat: I checked that a few days ago; we were in one place, and I fixed it
13:18 jnthn lizmat: That's where we got our startup time improvement back from :)
13:18 lizmat aha!
13:18 lizmat ok  :-)
13:19 dalek roast: f9d8b9a | lizmat++ | S06-operator-overloading/sub.t:
13:19 dalek roast: Revert "Skip tests that makes compilation barf"
13:19 dalek roast:
13:19 dalek roast: Seems to have been a flaky fail.
13:19 dalek roast: review: https://github.com/perl6/roast/commit/f9d8b9a74b
13:20 lizmat jnthn: would it make sense to have a canary in the grammar cloning logic that would fire when building the setting ?
13:20 brrt hmmmmmm
13:20 jnthn lizmat: We could; it's catch the mistake sooner
13:20 lizmat .oO( pardon the mangled metaphors )
13:20 lizmat jnthn: where would I do that ?
13:21 jnthn Hah, fire that canary!
13:21 jnthn lizmat: add_categorical
13:21 lizmat ok
13:21 jnthn Note that it's ok to make it into there
13:21 darutoko joined #perl6
13:21 jnthn But not OK if we make it past a certain point
13:21 jnthn (There's a bunch of return statements in there)
13:21 lizmat ok, will look
13:22 lizmat # Mix an appropraite role into the grammar for parsing the new op. # jnthn ?
13:23 jnthn aye
13:23 lizmat or at # This also becomes the current MAIN. Also place it in %?LANG. ?
13:25 skids joined #perl6
13:25 jnthn lizmat: I'd stick it here: https://github.com/rakudo/rakudo/bl​ob/nom/src/Perl6/Grammar.nqp#L4471
13:25 lizmat oki
13:27 biff_ joined #perl6
13:29 biff_ left #perl6
13:32 aborazmeh joined #perl6
13:32 aborazmeh joined #perl6
13:32 psch RT #125689 is interesting
13:32 psch m: class X is nosuchtrait { }
13:32 camelia rakudo-moar f93126: ( no output )
13:32 timotimo .o( synopsebot ;_; )
13:32 lizmat hmmm.. another hang in S17-supply/syntax.t  :-(
13:33 psch that passes because the symbol lookup for X::Inheritance::NoParent looks for Inheritance::NoParent instead
13:33 dalek rakudo/nom: b9c7b4f | lizmat++ | src/Perl6/Grammar.nqp:
13:33 dalek rakudo/nom: Add canary to signal grammar changing in setting
13:33 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b9c7b4fb2e
13:33 psch but that lookup is in a CATCH
13:34 psch if i change the find_symbol call to have :setting-only i get an infinite loop
13:34 timotimo bwahaha, calling your classes X
13:34 timotimo always a very bad idea
13:34 psch https://github.com/rakudo/rakudo/b​lob/nom/src/Perl6/World.nqp#L2743
13:35 psch is the CATCH in question
13:35 psch adding an CATCH { } seems to fix that, but feels somewhat band-aidy
13:35 FROGGS lizmat: I am surprised you can compile the setting with your patch
13:35 lizmat it was suggested by jnthn   :-)   but why ?
13:35 lizmat m: use attributes :D; class A { has Int $.a }
13:35 camelia rakudo-moar f93126: OUTPUT«5===SORRY!5=== Error while compiling /tmp/WDsewoxsf2␤Variable definition of type Int (with implicit :D) requires an initializer␤at /tmp/WDsewoxsf2:1␤------> 3se attributes :D; class A { has Int $.a 7⏏5}␤»
13:36 FROGGS because we have stuff like 'sub infix...' that would make it to that code
13:36 lizmat well, apparently it doesn't because it's already in the grammar ?
13:36 jnthn FROGGS: But we already have those in the grammar
13:36 lizmat I mean, that's the whole idea, no ?
13:36 jnthn FROGGS: So we never make it as far as where lizmat's sticking the check
13:37 * jnthn stuck a nqp::say in such a place recently, fixed one thing, and didn't reach it, fwiw
13:37 ely-se joined #perl6
13:37 FROGGS so what about these?
13:37 FROGGS rakudo/src/core/Stringy.pm:14:proto sub infix:<~>(|) is pure { * }
13:37 chrstphrhrt joined #perl6
13:37 jnthn FROGGS: ~ is already in the grammar, so we don't have to generate it
13:41 n0tjack joined #perl6
13:41 FROGGS ahh, understood
13:43 khw joined #perl6
13:44 lllllll joined #perl6
13:44 Jaglor joined #perl6
13:48 synbot6 joined #perl6
13:50 Hor|zon joined #perl6
13:51 Ven joined #perl6
13:53 [ptc] gdmf
13:53 lizmat [ptc]: bless you
13:54 [ptc] gdmf
13:58 lizmat .oO( has [ptc] keyboard been hijacked ? )
14:00 thou joined #perl6
14:08 n0tjack how come I can say "constant $X=10" but not "constant Int $X=10"?
14:08 n0tjack m: constant Real $pi=3;
14:08 camelia rakudo-moar b9c7b4: OUTPUT«5===SORRY!5=== Error while compiling /tmp/hMi_C7fszT␤Missing initializer on constant declaration␤at /tmp/hMi_C7fszT:1␤------> 3constant Real7⏏5 $pi=3;␤»
14:09 timotimo type restrictions on constants don't make terribly much sense; also constants with a $ doesn't work completely as you'd expect IIRC
14:09 n0tjack meaning constants are expected to be spelled like barewords?
14:09 n0tjack m: constant PI=3;
14:09 camelia rakudo-moar b9c7b4: ( no output )
14:10 timotimo aye, that'? the normal way to spell 'em
14:10 timotimo that's*
14:10 timotimo m: constant Int foobar = 5
14:10 camelia rakudo-moar b9c7b4: OUTPUT«5===SORRY!5=== Error while compiling /tmp/L1cPzb0sqV␤Missing initializer on constant declaration␤at /tmp/L1cPzb0sqV:1␤------> 3constant Int7⏏5 foobar = 5␤»
14:10 andreoss` joined #perl6
14:10 PerlJam m: constant $xxx = 5;  $xxx++;   # leakage
14:10 camelia rakudo-moar b9c7b4: OUTPUT«Parameter '$a' expected a writable container, but got Int value␤  in block <unit> at /tmp/Xjy59cOMZK:1␤␤»
14:10 timotimo i think it parses "Int" as the name of the identifier and then complains it can't find a =
14:10 n0tjack yeah, I think I initially had it without the sigil but then stuck it on because I was getting the "missing initializer" thing and I panicked
14:11 psch isn't that about containers?
14:11 timotimo it could backtrack, figure out if the name it parsed is the name of a type already existing and if there's a name + a "=" afterwards
14:11 n0tjack m: constant SEVEN=8; say SEVEN.WHAT;
14:11 camelia rakudo-moar b9c7b4: OUTPUT«(Int)␤»
14:11 n0tjack m: constant SEVEN=0.8; say SEVEN.WHAT;
14:11 camelia rakudo-moar b9c7b4: OUTPUT«(Rat)␤»
14:11 psch e.g. "constant $x" doesn't get a container, but the container would do the type check
14:11 timotimo PerlJam: i don't understand your problem with that
14:12 PerlJam timotimo: An unsuspecting programmer will ask "What parameter $a?  I don't have an $a in my code!"
14:12 timotimo oh
14:12 timotimo ah, yeah
14:12 timotimo now i see
14:13 psch m: constant $circumfix = "@, µ"; sub circumfix:<<$circumfix>>($a) { say $a }; @ 4, 5 µ # this constant needs a $, fwiw
14:13 camelia rakudo-moar b9c7b4: OUTPUT«(4 5)␤»
14:13 psch without the $ there's no interpolation from << >>
14:13 timotimo there'd be { } right?
14:13 ely-se psch: is that possible are you kidding me
14:14 psch ely-se: what's the problem?  $circumfix is known at compile time
14:14 dalek roast: 1152761 | lizmat++ | S12-attributes/smiley.t:
14:14 dalek roast: Unfudge now passing test
14:14 dalek roast: review: https://github.com/perl6/roast/commit/1152761f94
14:15 ely-se Context-sensitive grammar: Perl edition.
14:15 PerlJam Perl is powerful.  Get used to it  :)
14:15 psch ely-se: i'm pretty sure perl 6 has longer lengths of rope to hang your foot with
14:16 PerlJam m: constant blah = "@, µ"; sub circumfix:<< {blah} >>($a) { say $a }; @ 4, 5 µ    # curious
14:16 camelia rakudo-moar b9c7b4: OUTPUT«5===SORRY!5=== Error while compiling /tmp/KrweGN_viS␤Colon pair value ' {blah} ' too complex to use in name␤at /tmp/KrweGN_viS:1␤------> 3lah = "@, µ"; sub circumfix:<< {blah} >>7⏏5($a) { say $a }; @ 4, 5 µ    # curious␤»
14:17 PerlJam bummer
14:17 psch m: constant blah = "@, µ"; say << {blah} >>
14:17 camelia rakudo-moar b9c7b4: OUTPUT«(@, µ)␤»
14:17 psch PerlJam: i guess that means that should work as well...
14:17 ely-se If I were Emacs and someone would tell me to load perl6-mode, I'd import Carp and call croak.
14:17 psch PerlJam: fwiw, the previous bit started working a few hours ago... :)
14:17 timotimo ely-se: i appreciate you're a person and not just a program
14:18 timotimo you are a person, though ... right?
14:18 darutoko joined #perl6
14:18 darutoko joined #perl6
14:18 timotimo i mean, i wouldn't be mad or anything
14:19 ely-se No, I'm camelia.
14:19 timotimo no, I'm camelia!
14:19 ely-se I'm you.
14:20 timotimo le gasp
14:21 dalek rakudo/nom: 08d854c | peschwa++ | src/Perl6/World.nqp:
14:21 dalek rakudo/nom: Fix RT #125689.
14:21 dalek rakudo/nom:
14:21 dalek rakudo/nom: For some reason the lookup with $*W.find_symbol in apply_trait doesn't look for
14:21 dalek rakudo/nom: X::Inheritance::UnknownParent but Inheritance::UnknownParent in 'class X is
14:21 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=125689
14:21 dalek rakudo/nom: nosuchtrait { }', presumably because it happens 'inside' package X. Changing
14:21 dalek rakudo/nom: the lookup to only look inside the setting loops infinitely when compiling the
14:21 dalek rakudo/nom: setting.  The empty (but commented) CATCH prevents this.
14:21 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/08d854cfd4
14:21 skids You're me?!?  Then who's batman?
14:21 yoleaux 11:56Z <timotimo> skids: a bigger MAST can result in better performance if our dynamic optimizer can understand it better, so that might be an explanation. ..
14:23 pierrot joined #perl6
14:26 masak skids: isn't it weird that no-one has ever seen you and Batman in the same room?
14:26 skids Very weird.
14:27 psch hmm, the circumfix:<<{blah}>> case has a WVal(Block) innermost
14:27 psch which again brings me to "which WVals are allowed"
14:28 psch oh, but allowing Block there can't be right, can it
14:28 psch 'cause we can't guarantee that it's a Block with a use{ful,able} compile time value
14:29 PerlJam if it gets treated like a BEGIN perhaps
14:29 * psch .oO( sub infix:<< { 'x' x rand * 10 } >> )
14:30 psch eh, ^10 . pick probably :)
14:30 PerlJam DIHWIDT
14:31 psch PerlJam: afaiu, everything there gets BEGIN treatment, as in evaluated as compile time
14:32 psch (that's to mean "World.compile_time_evaluate is most of what BEGIN means, isn't it?")
14:32 psch i'm just unsure how i can guarantee that things that don't make sense as an op don't sneak through
14:32 psch m: sub infix:[/./]($, $) { } # like this one for example
14:32 camelia rakudo-moar b9c7b4: OUTPUT«5===SORRY!5=== Error while compiling /tmp/j51HqDteXO␤Colon pair value '/./' too complex to use in name␤at /tmp/j51HqDteXO:1␤------> 3sub infix:[/./]7⏏5($, $) { } # like this one for example␤»
14:34 mfollett joined #perl6
14:34 KotH joined #perl6
14:36 csd_ joined #perl6
14:36 telex joined #perl6
14:36 breinbaas joined #perl6
14:38 n0tjack m: my @a=(1,2,3,4); my $b=0; say $b,@a; # how do I do array catentation?
14:38 camelia rakudo-moar b9c7b4: OUTPUT«0[1 2 3 4]␤»
14:38 timotimo m: my @a=(1,2,3,4); my $b=0; say flat $b,@a;
14:38 n0tjack m: my @a=(1,2,3,4); my $b=0; say $b ~ @a; # this is string cat
14:38 camelia rakudo-moar b9c7b4: OUTPUT«(0 1 2 3 4)␤»
14:38 camelia rakudo-moar b9c7b4: OUTPUT«01 2 3 4␤»
14:39 n0tjack ah! thanks. I tried | to flatten but that was wrong
14:39 timotimo m: my @a=(1,2,3,4); my $b=0; say $b,@a.Slip;
14:39 camelia rakudo-moar b9c7b4: OUTPUT«01234␤»
14:39 timotimo that's because it's in an argument list for "say"
14:40 lizmat m: no strict; EVAL q/say $a/   # jnthn, should that be considered a bug or a feature
14:40 camelia rakudo-moar b9c7b4: OUTPUT«5===SORRY!5=== Error while compiling EVAL_0␤Variable '$a' is not declared␤at EVAL_0:1␤------> 3say 7⏏5$a␤»
14:42 psch lizmat: RT #124912 says it's a bug
14:42 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=124912
14:42 psch mostly 'cause it's on RT, though
14:43 psch S02-names/strict.t has a few references to that ticket
14:43 jnthn lizmat: Bug, in so far as pragmas are part of the current language
14:43 psch i guess the comments in S02-names/strict.t were there first
14:43 jnthn lizmat: We carry over the current language braid, for example
14:43 lizmat and %*PRAGMAS is not a part of that yet, right ?
14:44 jnthn m: sub infix:<beer>($a, $b) { "glug" }; EVAL 'say 1 beer 2'
14:44 camelia rakudo-moar b9c7b4: OUTPUT«glug␤»
14:44 jnthn lizmat: Aye
14:45 lizmat it would be just to set up a new clone, rather than initializing, right ?
14:46 jnthn You could maybe stash the clone in a %?PRAGMAS like we do with %?LANG
14:46 lizmat ah, ok... will look into that
14:46 PerlJam How would you write that EVAL such that infix:<beer> *wasn't* carried over?
14:47 lizmat PerlJam: I know a way, but I don't think that's supposed to be exposed...
14:48 psch m: sub infix:<beer>($a, $b) { "glug" }; EVAL 'say 1 beer 2', :context(CORE::)
14:48 camelia rakudo-moar b9c7b4: OUTPUT«5===SORRY!5=== Error while compiling EVAL_0␤Two terms in a row␤at EVAL_0:1␤------> 3say 17⏏5 beer 2␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        statement modifier␤   …»
14:48 * psch now wonders if lizmat has a different way
14:49 lizmat psch: that would be essentially it, maybe a different value for :context, but yeah
14:49 PerlJam I would have thought that something like EVAL :lang<Perl6>, q/ say 1 beer 2 /;  would do it.
14:50 psch heh
14:50 psch i guess that depends on whether Perl 6 stops being Perl 6 when you add an operator
14:51 moritz it stops being The Perl 6 and becomes A Perl 6
14:52 domidumont joined #perl6
14:52 PerlJam The current language is Perl 6 plus however someone has tweaked it.  I would think that Perl6 is the pristine Perl6 that all programs start from.
14:53 PerlJam (though I guess that doesn't make enough sense given multiple settings)
14:54 ely-se joined #perl6
14:55 domidumont joined #perl6
14:56 n0tjack m: sub foo (Int $a, Int @b) { }; say foo(12, 1 xx 10); # :(
14:56 camelia rakudo-moar 08d854: OUTPUT«Type check failed in binding @b; expected Positional[Int] but got List␤  in sub foo at /tmp/bdXkVWThDe:1␤  in block <unit> at /tmp/bdXkVWThDe:1␤␤»
14:56 dalek rakudo-star-daily: 09e7b94 | coke++ | log/ (9 files):
14:56 dalek rakudo-star-daily: today (automated commit)
14:56 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/09e7b9414a
14:56 dalek perl6-roast-data: dd4e506 | coke++ | / (9 files):
14:56 dalek perl6-roast-data: today (automated commit)
14:56 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/dd4e506001
14:56 dalek perl6-roast-data: 0feddd3 | coke++ | / (9 files):
14:56 dalek perl6-roast-data: today (automated commit)
14:56 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/0feddd38bb
14:57 jnthn m: sub foo (Int $a, Int @b) { }; say foo(12, my @ = 1 xx 10);
14:57 camelia rakudo-moar 08d854: OUTPUT«Type check failed in binding @b; expected Positional[Int] but got Array␤  in sub foo at /tmp/Iq58pek7gt:1␤  in block <unit> at /tmp/Iq58pek7gt:1␤␤»
14:57 jnthn m: sub foo (Int $a, Int @b) { }; say foo(12, my Int @ = 1 xx 10);
14:57 camelia rakudo-moar 08d854: OUTPUT«Nil␤»
14:57 jnthn Like that
14:57 n0tjack freaky
14:57 n0tjack thanks
14:57 jnthn If you demand an Int array in the receiver, then you have to provide one
14:57 n0tjack I thought I did
14:57 n0tjack is 1 xx 10 not an Int array?
14:57 n0tjack it's an array and each element is an Int
14:57 jnthn No, it's not
14:57 PerlJam It's not typed enough
14:58 skids No just a list that happens to contain them.
14:58 n0tjack your face isn't typed enough1
14:58 jnthn And Int array is an Array that is *explicitly* declared as containing Ints
14:58 n0tjack interesting
14:59 n0tjack does that mean if I'm going to type my inputs, I should also declare my output types?
14:59 jnthn Otherwise, (a) we could not actually do the type check in O(1), but it'd be O(n) to examine everything, where n might be infinite on a lazy array, and (b) the constraint might become untrue during the execution of the thing you passed it to if you manage to mutate the array in that time
14:59 n0tjack in practice, do people use explicit typing?
15:00 n0tjack I'm not married to that idea, but I figure the type system was put in, so I'm encouraged to use it
15:00 skids n0tjack: more often for MMD than for sanity, but yes.
15:01 skids Less so on arrays, though.
15:01 PerlJam unless you're coming from a  Pascal/Modula/etc. background  ;)
15:01 ely-se type systems are invaluable automatic bug detectors
15:02 ely-se or rather, type checkers, but they depend on them
15:02 n0tjack I'm coming from an APL background. We have one type: the array.
15:02 jnthn n0tjack: Personally, a lot for MMD, sometimes as a succinct way to get sanity checks expressed in a declarative way, and sometimes I use native types for performance.
15:03 PerlJam The joke that you can program Fortran in any language changes a little bit for Perl ... you can program any language in Perl
15:03 ely-se what is MMD?
15:03 PerlJam multi method dispatch
15:04 [Coke] S99:MMD?
15:04 synbot6 Link: http://design.perl6.org/S99.html#MMD
15:04 ely-se ooh
15:05 Guizmofr38 joined #perl6
15:05 ely-se not sure what to do this evening: write a compiler in Perl, or watch spongebob squarepants episodes?
15:05 n0tjack I do like the my Int @ = blah stuff, much nicer than forcing me to create an actual named variable just to satisfy the type checker
15:06 [Coke] ely-se: "wy not both?"
15:06 jnthn ely-se: Write a compiler for a spongebob-inspired language
15:06 ely-se [Coke]: excellent!
15:06 ely-se jnthn: SpongeScript
15:07 ely-se the language in which you can make fire under water. kinda like how covariance works in Dart
15:08 skids m: Array[Int].new(1,2,3).perl.say # alternative to "my Int @ =" depending on taste.
15:08 camelia rakudo-moar 08d854: OUTPUT«Array[Int].new(1, 2, 3)␤»
15:08 jnthn m: say Array[Int](1..10) # also, I guess
15:08 camelia rakudo-moar 08d854: OUTPUT«Type check failed in assignment to ; expected Int but got Range␤  in block <unit> at /tmp/j4VJPzXCf2:1␤␤»
15:08 PerlJam A pity you can't say  @[Int](...) as a short-hand
15:08 jnthn Hmm, mebbe that should follow the single arg rule :)
15:08 jnthn m: @[Int](1,2,3)
15:08 camelia rakudo-moar 08d854: OUTPUT«Invocant requires a type object of type Array, but an object instance was passed.  Did you forget a 'multi'?␤  in block <unit> at /tmp/IU9gZRhA7V:1␤␤»
15:09 jnthn ah, yeah, it means that... :)
15:09 lizmat wasn't this supposed to work?      Int:[1,2,3,4]
15:09 jnthn lizmat: I think it was only ever handwaved about, not really decided as a good solution
15:09 lizmat ah, ok
15:10 ely-se new Int[] {1, 2, 3, 4} :P
15:11 PerlJam [1,2,3]:of<Int>   :)
15:12 skids .oO(Any,Int:{} probably not a good parse thing [Any,Int]:{} maybe...)
15:12 PerlJam "my Int @" seems weird (is that "my" really useful?), but so far I think we've shown it's a least-worst syntax  :)
15:14 n0tjack Is there a cute way to write $v /= 10 but with an implicit floor?
15:14 n0tjack I mean of course I can write $v = floor $v / 10 but I'm trying to set my foot up for a good shooting
15:15 jnthn $v div= 10
15:15 pippo joined #perl6
15:15 skids m: my $v = 42; $v div= 10; $v.say;
15:15 camelia rakudo-moar 08d854: OUTPUT«4␤»
15:15 jnthn .oO( a floorless solution... )
15:15 n0tjack oh nice
15:15 thou I've got a bug that I haven't managed to golf down yet: https://pastee.org/qc3ns
15:16 n0tjack I haven't gotten one "no" yet. I coudl get used to p6.
15:16 PerlJam careful of what type $v is though ...
15:16 PerlJam m: my $v = 1234.1; $v div= 10; say $v;
15:16 camelia rakudo-moar 08d854: OUTPUT«Cannot call infix:<div>(Rat, Int); none of these signatures match:␤    (Int:D \a, Int:D \b)␤    (int $a, int $b --> int)␤  in block <unit> at /tmp/N7ZgKsL5bp:1␤␤»
15:16 thou It shows up when Rakudo warns about useless "is rw" in Web::Request module, but not in a simple test module.
15:16 jnthn Well, he did ask us to set his foot up for shooting too... :P
15:16 Ven joined #perl6
15:18 n0tjack The result of my gather for @a is an array, but the result of reverse gather for @a is an arrayref
15:18 n0tjack 'sup with that?
15:18 dalek rakudo/nom: f91d8ee | peschwa++ | src/Perl6/World.nqp:
15:18 dalek rakudo/nom: Another bit for nibble_to_str.
15:18 dalek rakudo/nom:
15:18 dalek rakudo/nom: As PerlJam++ noticed, 'circumfix<< {some-constant} >>' should probably work.
15:18 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f91d8ee4e4
15:18 thou Not sure if it's just happening to me or if others have seen it
15:18 dalek roast: 9c89e3f | peschwa++ | S06-operator-overloading/sub.t:
15:18 dalek roast: Test another way of adding an operator.
15:18 dalek roast: review: https://github.com/perl6/roast/commit/9c89e3ff68
15:20 pippo joined #perl6
15:21 psch oh err
15:21 psch i done a thinko there a bit earlier, i realize...
15:24 thou m: my $x = gather for ^5 {take $_}; my $y = reverse gather for ^5 {take $_}; dd $x; dd $y;
15:24 camelia rakudo-moar 08d854: OUTPUT«Seq $x = (0, 1, 2, 3, 4).Seq␤List $y = $(4, 3, 2, 1, 0)␤»
15:24 Ven joined #perl6
15:24 xfix joined #perl6
15:24 psch thou: the reverse consumes the Seq
15:24 thou n0tjack: ^
15:25 psch oh
15:25 psch yeah
15:25 thou thanks, psch
15:26 psch m: my $x = eager gather for ^5 {take $_}; my $y = reverse gather for ^5 {take $_}; dd $x; dd $y;
15:26 camelia rakudo-moar 08d854: OUTPUT«List $x = $(0, 1, 2, 3, 4)␤List $y = $(4, 3, 2, 1, 0)␤»
15:26 PerlJam n0tjack: what made you think you got an "arrayref"?  What do you think an arrayref is?
15:27 thou n0tjack: I think the currently best explanation for Seq, etc., is http://design.perl6.org/S07.html#Sequences_vs._Lists
15:29 |Tux| doc question. "foodle can be abbreviated to foo" or "foodle can be abbreviated as foo" ?
15:29 n0tjack PerlJam: because when I had just the gather and "said" the output, I saw (1 2 3 4), whereas when I added the reverse and "said" the output, I got [4 3 2 1]
15:29 n0tjack thou: thanks
15:30 n0tjack PerlJam: IOW, the brackets changed. And I'm using arrayref in the perl5 sense: a reference to an array stored in a scalar
15:30 n0tjack PerlJam: when I added "flat" before the "reverse", I got the (4 3 2 1) I was expecting
15:30 PerlJam |Tux|: the latter
15:31 |Tux| thnx
15:31 PerlJam n0tjack: gotcha.
15:35 n0tjack m: sub foo(Int @a){ gather for @a {take 1+$_;} } my Int @v = (1,2,3,4); say foo @v;
15:35 camelia rakudo-moar 08d854: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ls5gLD5RgV␤Strange text after block (missing semicolon or comma?)␤at /tmp/ls5gLD5RgV:1␤------> 3oo(Int @a){ gather for @a {take 1+$_;} }7⏏5 my Int @v = (1,2,3,4); say foo @v;␤    expecting any of:…»
15:36 n0tjack well, I'm having trouble showing you in the channel, but I'm seeing it in the REPL
15:36 psch m: sub foo(Int @a){ gather for @a {take 1+$_;} }; my Int @v = (1,2,3,4); say foo @v;
15:36 camelia rakudo-moar 08d854: OUTPUT«(2 3 4 5)␤»
15:37 n0tjack sub foo(Int @a){ reverse gather for @a {take 1+$_;} }; my Int @v = (1,2,3,4);  say foo @v;
15:37 n0tjack m: sub foo(Int @a){ reverse gather for @a {take 1+$_;} }; my Int @v = (1,2,3,4);  say foo @v;
15:37 camelia rakudo-moar 08d854: OUTPUT«(5 4 3 2)␤»
15:37 n0tjack that's different from what I'm seeing.
15:38 virtualsue joined #perl6
15:42 n0tjack In map { foo($_, 27) }, @array, is there a way to directly curry the 27, without having to introduce a new block context?
15:42 Screed joined #perl6
15:42 masak not sure exactly what you mean
15:43 n0tjack well, I'm imagining some syntax like map foo(...,27), @values;
15:43 moritz somthing like map &foo.assuming( 1 => 27 ), @values
15:44 n0tjack 1 is the position of the parameter, zero-indexed?
15:44 moritz I don't actually know if it works like that
15:44 moritz I know there's a method named assuming
15:44 moritz and that it curries
15:45 n0tjack yes; that's the kind of thing I'm reaching for.
15:45 psch m: &say.assuming( *, "bar" )("foo")
15:45 camelia rakudo-moar 08d854: OUTPUT«foobar␤»
15:45 moritz m: sub f($a, $b) { "$a|$b" }; say f.assuming(*, 4)(5)
15:45 camelia rakudo-moar 08d854: OUTPUT«5===SORRY!5=== Error while compiling /tmp/E5mDm6mzxH␤Calling f() will never work with declared signature ($a, $b)␤at /tmp/E5mDm6mzxH:1␤------> 3sub f($a, $b) { "$a|$b" }; say 7⏏5f.assuming(*, 4)(5)␤»
15:45 moritz m: sub f($a, $b) { "$a|$b" }; say &f.assuming(*, 4)(5)
15:45 camelia rakudo-moar 08d854: OUTPUT«5|4␤»
15:45 moritz ah, that's how it works
15:46 n0tjack nice!
15:46 moritz a * is a hole in the list of primed parameters
15:47 masak yet another possible meaning of Whatever ;)
15:47 masak "don't prime this positional parameter" :)
15:47 n0tjack yeah, * is killer.
15:47 masak ab5tract_: ^^
15:48 * masak .oO( * is kilter )
15:52 stewa02 joined #perl6
15:57 z448 joined #perl6
15:57 dalek Heuristic branch merge: pushed 49 commits to rakudo/curli by lizmat
16:00 Peter_R joined #perl6
16:02 rurban joined #perl6
16:04 Ven joined #perl6
16:04 FireFly joined #perl6
16:10 npsuc joined #perl6
16:14 [ptc] m: sub c(Int $n, [ $x, *@xs ]) { if $n  == 0  { return [] }; if @xs ~~ () { return () }; map({ [ $x, @^others ] }, c($n - 1, @xs)), c($n, @xs); }; say c(1, <a b>);
16:14 camelia rakudo-moar f91d8e: OUTPUT«(() ())␤»
16:14 [ptc] m: sub c(Int $n, [ $x, *@xs ]) { if $n  == 0  { return [] }; if @xs ~~ () { return () }; map({ [ $x, @^others ] }, c($n - 1, @xs)), c($n, @xs); }; say c(2, <a b>);
16:14 camelia rakudo-moar f91d8e: OUTPUT«(() ())␤»
16:16 [ptc] the first example should return ["a", "b"] and the second example should return ["ab"]
16:17 thou OK, I did golf that bug down.  https://rt.perl.org/Ticket/Display.html?id=126302
16:17 Screed left #perl6
16:17 [ptc] this used to work pre GLR, and I'm not sure what needs to be corrected so that it now does the right thing...
16:18 [ptc] any ideas anyone?
16:21 lea joined #perl6
16:23 dalek roast: 78bb330 | lizmat++ | S02-types/WHICH.t:
16:23 dalek roast: Add some missing exception classes
16:23 dalek roast: review: https://github.com/perl6/roast/commit/78bb3303a3
16:26 tokuhirom joined #perl6
16:29 carlin m: END { require Test; ok 1; }
16:29 camelia rakudo-moar f91d8e: OUTPUT«5===SORRY!5=== Error while compiling /tmp/xbLjGauLiu␤Undeclared routine:␤    ok used at line 1. Did you mean 'on'?␤␤»
16:29 carlin is it expected that require in END does nothing?
16:30 jnthn carlin: require is runtime
16:30 jnthn carlin: And things need to be imported at compile time
16:31 ilmari m: END { require Test; Test::ok(1) }
16:31 camelia rakudo-moar f91d8e: OUTPUT«===SORRY!===␤Could not find symbol '&ok'␤»
16:31 lizmat https://www.quora.com/Perl-programmin​g-language-1/Why-did-Larry-Wall-final​ly-ship-Perl6-and-does-anybody-care/  # was this mentioned here already ?
16:32 lizmat m: END { require Test; import Test; ok(1) }
16:32 camelia rakudo-moar f91d8e: OUTPUT«5===SORRY!5=== Error while compiling /tmp/VMAgjK_qtI␤Could not find module Test to import symbols from␤at /tmp/VMAgjK_qtI:1␤------> 3END { require Test; import Test7⏏5; ok(1) }␤»
16:33 carlin Test is a bad example, since I'm not trying import subs I want a class... can't think of a way to demonstrate it with camelia
16:34 laouji joined #perl6
16:34 jnthn m: END { use Test; ok 1; }
16:34 camelia rakudo-moar f91d8e: OUTPUT«ok 1 - ␤»
16:36 jnthn lizmat: Don't think so. :)
16:36 ^elyse^ joined #perl6
16:37 jnthn .oO( Why are some software developers so unable to understand how challening open source software projects work, and why should I care what they think? :) )
16:38 timotimo what is that in reference to, jnthn?
16:38 z448 joined #perl6
16:38 jnthn timotimo: It was a pun on the quora question lizmat linked
16:39 timotimo ah, that one
16:39 RabidGravy joined #perl6
16:40 ^elyse^ I prefer to reduce questions to:
16:40 ^elyse^ .oO ( Why? )
16:41 n0tjack joined #perl6
16:44 timotimo elyse has grown wings!
16:46 rcy left #perl6
16:48 AlexDaniel joined #perl6
16:50 Kogurr joined #perl6
16:50 ^elyse^ horns, and y has a tail :P
16:52 timotimo ah
16:53 timotimo \m/ and all that
16:53 dalek rakudo/nom: adca54e | peschwa++ | src/Perl6/World.nqp:
16:53 dalek rakudo/nom: Fix a thinko in constant handling for circumfix declarations.
16:53 dalek rakudo/nom:
16:53 dalek rakudo/nom: With this we can have interpolated compile time constants in << >> for
16:53 dalek rakudo/nom: circumfixes that have more than one character as delimiters, e.g.
16:53 dalek rakudo/nom: 'constant $x = "µµ, @@"; sub circumfix:<<$x>> { ... }'.
16:53 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/adca54e2e5
16:54 dalek roast: f1424a5 | peschwa++ | S06-operator-overloading/sub.t:
16:54 dalek roast: Add another test for constants and circumfix.
16:54 dalek roast: review: https://github.com/perl6/roast/commit/f1424a57ae
16:55 dalek roast: 7ae2e35 | lizmat++ | S02-types/WHICH.t:
16:55 dalek roast: Add some more missing classes
16:55 dalek roast: review: https://github.com/perl6/roast/commit/7ae2e35225
16:57 yqt joined #perl6
16:58 firstdayonthejob joined #perl6
16:58 llfourn joined #perl6
17:01 PerlJam psch: I just noticed ... you're splitting on comma;  it should be whitespace.  i.e., constant $x = "µµ @@"; sub circumfix:<<$x>> { ... }  should be the same as sub circumfix:<µµ @@> { ... } which is the same as  sub circumfix:[ 'µµ', '@@' ] { ... }
17:02 PerlJam (note there's no comma in my constant $x)
17:04 psch PerlJam: ooh, right!  the constants i've been using have been wrong, yes
17:05 psch that also makes also this icky whitespace juggling unneccessary, which i like
17:05 PerlJam yep.
17:05 PerlJam (the whitespace juggling is why I finally noticed it :)
17:05 laouji joined #perl6
17:07 psch s:2nd/also/all/ # o.o
17:10 FROGGS[mobile] joined #perl6
17:11 FROGGS[mobile] o/
17:11 dalek rakudo/nom: da99978 | peschwa++ | src/Perl6/World.nqp:
17:11 dalek rakudo/nom: Another thinko corrected.
17:11 dalek rakudo/nom:
17:11 dalek rakudo/nom: As PerlJam++ noted, circumfix:<< >> declarations don't have commas.
17:11 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/da99978524
17:12 dalek rakudo/nom: 0a39e0b | lizmat++ | src/Perl6/World.nqp:
17:12 dalek rakudo/nom: Make sure we mention the implicit smiley
17:12 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0a39e0bf6b
17:12 dalek roast: d3b8702 | peschwa++ | S06-operator-overloading/sub.t:
17:12 dalek roast: Correct circumfix:<< >> tests.
17:12 dalek roast: review: https://github.com/perl6/roast/commit/d3b8702464
17:12 psch o/ FROGGS[mobile]
17:12 lizmat FROGGS[mobile] \o
17:13 psch FROGGS[mobile]: i've had another look at the curious case of the wrong SC on jvm recently
17:13 psch FROGGS[mobile]: the only new thing i saw was that the rhs was from BOOTSTRAP.nqp, while the lhs was from CORE
17:13 psch at least i think it was that way around...
17:15 psch i might look at that again tomorrow, but i'm done for today o/
17:21 laouji joined #perl6
17:22 leont joined #perl6
17:25 concerned joined #perl6
17:25 concerned is perl6 faster than perl5
17:26 timotimo only sometimes
17:26 timotimo but perl6 has better concurrency than perl5
17:26 timotimo so you can more easily scale with the number of cores you have
17:27 lizmat use nqp; class A { has Int $.a; method BUILD($!a) { self }; method new(Int:D $a) { nqp::create(self).BUILD($a) } }; dd A.new(42)   # completely valid
17:27 concerned ahh okay
17:27 lizmat m: use nqp; class A { has Int $.a; method BUILD($!a) { self }; method new(Int:D $a) { nqp::create(self).BUILD($a) } }; dd A.new(42)   # completely valid
17:27 camelia rakudo-moar adca54: OUTPUT«A.new(a => 42)␤»
17:27 lizmat m: use nqp; class A { has Int:D $.a; method BUILD($!a) { self }; method new(Int:D $a) { nqp::create(self).BUILD($a) } }; dd A.new(42)   # this is not?
17:27 camelia rakudo-moar adca54: OUTPUT«5===SORRY!5=== Error while compiling /tmp/4pFet0JQy9␤Variable definition of type Int:D requires an initializer␤at /tmp/4pFet0JQy9:1␤------> 3use nqp; class A { has Int:D $.a7⏏5; method BUILD($!a) { self }; method new␤    expecting any of:…»
17:27 timotimo lizmat: i see your point and i'm +1
17:27 PerlJam concerned: do you use Moose in Perl 5?
17:27 concerned PerlJam, never used it, I use POE a lot thoug
17:27 concerned though*
17:28 lizmat FROGGS[mobile]: ^^^ I feel that the initializer error is more trouble than it's worth
17:28 concerned and I'm hoping that I can use some perl5 modules in perl6
17:28 PerlJam concerned: with Inline::Perl5, you can use many P5 modules in P6.
17:28 lizmat m: use nqp; class A { has Int:D $.a = 666; method BUILD($!a) { self }; method new(Int:D $a) { nqp::create(self).BUILD($a) } }; dd A.new(42)   # and this is again?
17:28 camelia rakudo-moar adca54: OUTPUT«A.new(a => 42)␤»
17:28 concerned omg there's an inline perl for perl lol
17:29 lizmat Inline::Perl6 for perl 5, and Inline::Perl5 for perl 6 , yes
17:29 timotimo you can use pretty much all perl 5 modules
17:29 FROGGS[mobile] lizmat: see the p6c list, I said something about that case
17:29 * lizmat looks
17:29 timotimo you can make subclasses of perl5 classes with perl6 code and subclass perl6 classes with perl5 classes
17:29 jonadab Inline::Perl5, that could be rather useful.  I must investigate this.
17:29 timotimo yes, it's very good
17:29 PerlJam timotimo: I didn't have much success using PDL in P6 with Inline::Perl5  ;)
17:29 timotimo oh :(
17:30 FROGGS[mobile] psch: nine also said that Bool has two .WHICHes... one from BOOTSTRAP, one from the setting
17:32 n0tjack is there any sugar for declaring an optional Boolean param and setting it to false?
17:32 FROGGS[mobile] lizmat: in short, Int:D means it has to be defined NOW, doing it later is not an option...
17:32 n0tjack *defaulting
17:32 nine FROGGS[mobile]: indeed, that's where I'm stuck currently
17:32 nine perl6 -e 'say (Bool.WHERE, Bool.^mro[0].WHERE, Bool::True.WHERE, Bool::False.WHERE);'
17:32 nine (66994184 47994512 47838216 47838272)
17:32 timotimo n0tjack: just Bool $foo = False
17:32 nine FROGGS[mobile]: note who the address for Bool.WHERE is very much different from the others
17:33 nine s/who/how
17:33 lizmat FROGGS[mobile]: ok, fair enough...
17:33 FROGGS[mobile] lizmat: and requiring a defined value is not equal to requiring *some* value at instantiation time
17:33 n0tjack timotimo: Yep, that's what I'm using. I only asked because I had a vague recollection there was some sugar
17:33 lizmat jnthn: wouldn't this need to be handled at C-level properly, in the typecheck logic, to make it real first class citizen ?
17:33 timotimo there's sugar for passing a named parameter that's set to False
17:33 timotimo it's :!Foo
17:34 timotimo m: say (:!Foo)
17:34 camelia rakudo-moar adca54: OUTPUT«Foo => False␤»
17:34 n0tjack ah! that was it.
17:34 n0tjack so the sugar is for passing, not declaring
17:34 timotimo pair syntax in parameter lists allows you to have a name for callers and a different name for the variable in your scope
17:34 lizmat m: my $a = :!foo; dd $a  # also for declaring
17:34 camelia rakudo-moar adca54: OUTPUT«Pair $a = :!foo␤»
17:35 timotimo right, it's a shorthand for every place that accepts pairs
17:35 timotimo including a literal Pair object
17:35 lizmat m: my Int $a = :!foo
17:35 camelia rakudo-moar adca54: OUTPUT«Type check failed in assignment to $a; expected Int but got Pair␤  in block <unit> at /tmp/XJiTdd1F3k:1␤␤»
17:35 paulmr joined #perl6
17:36 n0tjack that's gonna come in handy.
17:36 timotimo yeah
17:36 timotimo and here's the funnest syntax of all:
17:36 timotimo m: my $thing = :42skidoo; say $thing.perl
17:36 camelia rakudo-moar adca54: OUTPUT«:skidoo(42)␤»
17:37 * moritz finds :$variable most useful
17:37 lizmat m: my $times = :10times
17:37 camelia rakudo-moar adca54: ( no output )
17:37 lizmat m: my $times = :10times; dd $times
17:37 camelia rakudo-moar adca54: OUTPUT«Pair $times = :times(10)␤»
17:37 timotimo oh, yes, :$variable is definitely awesome
17:37 lizmat in a way, it's like breaking the 4th wall
17:37 timotimo wir sind das folk! die mauer muss weg!
17:37 NoRefill joined #perl6
17:38 lizmat ehh... not quite that wall  :-)
17:39 psch FROGGS[mobile]: doesn't that mean that there's something wonky with the deserialization fixup?
17:40 timotimo lizmat: who's the fourth wall? :)
17:40 psch i haven't ever looked at how that works, so i'm mostly guessing contextually
17:42 FROGGS joined #perl6
17:43 FROGGS psch: I guess that's not unlikely
17:50 wollmers joined #perl6
17:51 yqt joined #perl6
17:51 nine Anything I can do to get to the bottom of this?
17:51 b2gills the fourth wall is like the fifth wheel, it better to not point it out
17:51 wollmers p6: say 42.WHAT;
17:51 camelia rakudo-moar adca54: OUTPUT«(Int)␤»
17:51 b2gills s/it/it is/
17:52 b2gills p6: say 42.WHY
17:52 camelia rakudo-moar adca54: OUTPUT«(Any)␤»
17:52 FROGGS psch: is there some sample code that highlights the problem?
17:53 psch FROGGS: reverting nqp/52e409e highlights the problem - the setting doesn't build anymore
17:53 FROGGS nine: do you want to look into this?
17:53 psch keep in mind that's (apparently) jvm specific
17:54 psch although i wouldn't want to have to say if moar maybe just fudges over something here or there which makes it work out in the end
17:54 nine FROGGS: definitely. But I'll need some pointers. I've run out of conventional means of debugging.
17:54 FROGGS there are differences... as we still have prior invocation on jvm where it went away on moar
17:55 psch ah, i remember arnsholt complaining about prior invocation quite some time ago... :)
17:58 FROGGS aye
17:58 alpha123 joined #perl6
17:58 FROGGS I lack brain power to rip it out :o(
17:59 FROGGS ohh awesome, htmlify got fixed! \o/
17:59 FROGGS [Coke]++
18:00 n0tjack I thought $0 was $*EXECUTABLE_NAME now, but p6 says I'm wrong
18:00 n0tjack what is my script called now?
18:00 lizmat m: dd $*EXECUTABLE
18:00 camelia rakudo-moar 0a39e0: OUTPUT«q|./rakudo-inst/bin/perl6​-m|.IO(:SPEC(IO::Spec::Unix))␤»
18:01 lizmat m: dd $*PROGRAM
18:01 camelia rakudo-moar 0a39e0: OUTPUT«q|/tmp/zS_8XXPalF|.I​O(:SPEC(IO::Spec::Unix))␤»
18:01 lizmat m: dd $*PROGRAM.name
18:01 camelia rakudo-moar 0a39e0: OUTPUT«Method 'name' not found for invocant of class 'IO::Path'␤  in block <unit> at /tmp/i0uKclUzQb:1␤␤»
18:01 lizmat m: dd $*PROGRAM-NAME
18:01 camelia rakudo-moar 0a39e0: OUTPUT«"/tmp/Dta7U2aN5U"␤»
18:01 n0tjack there we go
18:01 lizmat m: dd ~$*PROGRAM
18:01 camelia rakudo-moar 0a39e0: OUTPUT«"/tmp/NoqILSCaX4"␤»
18:02 [Coke] dha, moritz: I have a commit pending that moves all the docs to doc/ and leaves the utility stuff in lib/ for building the site. Ok if I push?
18:02 [Coke] also FROGGS
18:02 masak psch: you mean "priori invocatem" :P
18:03 psch masak: only if that's what FROGGS means :)
18:04 [Coke] .seen dha
18:04 yoleaux I saw dha 7 Oct 2015 21:53Z in #perl6: <dha> What did I do now? :-)
18:04 * [Coke] wonders if we can get yoleaux to say "... hours ago" instead of a zulu time.
18:05 [Coke] .time
18:05 masak breaking the fourth wall is an art, just like many other things
18:05 * TimToady wonders which of us is the fourth one
18:05 masak :)
18:05 * TimToady wonders if we should rewrite yoleaux in Perl 6
18:05 [Coke] .t
18:05 yoleaux Thu, 08 Oct 2015 18:05:42 UTC
18:06 * [Coke] has a bot project that he started in perl 6 way too many years ago, and ponders resurrecting it. Too many ponderings, not enough time to do stuff.
18:06 [Coke] dha,moritz,FROGGS: impatient. pushing.
18:06 * TimToady wonders if we should scan ahead for new tokens and introduce them into the lexer all in a batch, and just enable them when we actually hit the declaration
18:06 dalek doc: f9d2442 | coke++ | t/pod-convenience.t:
18:06 dalek doc: first-code-block now always returns the 1st block.
18:06 dalek doc:
18:06 dalek doc: Before it returned the second because it was only checking
18:06 dalek doc: 2nd position.
18:06 dalek doc: review: https://github.com/perl6/doc/commit/f9d2442601
18:06 dalek doc: 0f38cf1 | coke++ | Makefile:
18:06 dalek doc: Add target to run web server
18:06 dalek doc: review: https://github.com/perl6/doc/commit/0f38cf171d
18:06 dalek doc: 8249119 | coke++ | / (512 files):
18:06 ambs E_NOTIME affects all of us
18:06 dalek doc: Move all docs to doc
18:06 dalek doc: review: https://github.com/perl6/doc/commit/824911967e
18:07 n0tjack I'm using multi sub MAIN(...) but I dont' want to put "say" at the end of each of the subs; is there a way to tell p6 I want an implicit sub of the result of any MAIN()?
18:07 * TimToady wonders if he should get dressed and go to PPW
18:08 masak TimToady: I notice you're in a wonder-ful mood today ;)
18:08 FROGGS [Coke]: I have no opinion on this :o)
18:08 n0tjack can I shoot myself in the foot with a phaser, here?
18:08 ambs n0tjack: you can always call a common function that does the stuff
18:08 n0tjack ambs: sure, but I like the multi MAIN thing
18:08 masak n0tjack: Perl 6 gives you enough rope to shoot yourself in the foot -- so yes :)
18:08 * ambs hands a phaser to n0tjack.
18:08 n0tjack masak: hey, no changing my puns.
18:09 n0tjack I was actually asking if I can use END or something like that
18:09 masak sorry, "no chaing my puns" is *so* not going to fly in here :P
18:09 masak changing*
18:10 psch n0tjack: you can overwrite the CORE MAIN proto
18:10 n0tjack for context, here's what I'm trying to do
18:10 n0tjack https://gist.github.com/ano​nymous/948a39efd73275266fa1
18:10 El_Che for whoever worked on the Nativecall stuff: wow!
18:10 psch as in 'proto MAIN(|) { {*}; say "did any of the MAINs" }'
18:10 pfhork joined #perl6
18:11 n0tjack in order to wrap everything, while also making use of the neat MAIN() feature, I'd have to create 4 new functions with identical signatures to the existing ones
18:11 n0tjack which seems unperly
18:11 n0tjack psch: can I get the result of the invoked MAIN in order to print it?
18:12 psch n0tjack: yeah
18:12 psch n0tjack: you can assign the {*} to a variable in the proto
18:12 n0tjack psch: neat!
18:12 psch as in 'proto MAIN(|) { my $result = {*}; say $result }'
18:13 ambs everytime I see a Perl 6 line my spine shivers.
18:13 FROGGS IMO that's where you can see that Perl 6 is not a hack, but is carefully designed and correctly implemented
18:14 n0tjack that's printing a spurious "true" after my result
18:14 dha joined #perl6
18:14 pink_mist can't you wrapper here too?
18:14 pink_mist *+use a
18:15 dha Anyone know what %twiddles is in the signature for Mu.clone? ("method clone(*%twiddles)")
18:16 lizmat m: my $a = :foo; my $b = $a.clone(value => 42); dd $a, $b
18:16 camelia rakudo-moar 0a39e0: OUTPUT«Cannot modify an immutable Bool␤  in block <unit> at /tmp/63uCWLWy0c:1␤␤»
18:16 jnthn lizmat: Yes, ideally definedness types become first-class and maybe pushed downwards to VM level. But we may be able to do it more first class even without VM support by writing the appropriate meta-object.
18:16 dha Is it just general arguments? If so, why "twiddles"?
18:16 lizmat m: my $a = foo => my $ = 666; my $b = $a.clone(value => 42); dd $a, $b
18:16 camelia rakudo-moar 0a39e0: OUTPUT«Pair $a = :foo(666)␤Pair $b = :foo(42)␤»
18:16 pink_mist [Coke]: speak of the devil =) dha came in =)
18:16 dha eh?
18:16 lizmat dha: it's the attributes you want twiddled
18:16 antiatom joined #perl6
18:16 pink_mist dha: might want to check the channel log =)
18:17 psch n0tjack: the Trues in usage output are from the &say calls in lines 38 and 39
18:17 [Coke] dha: I just rearranged perl6/doc a bit. docs are now in doc/ instead of mixed into lib/
18:17 alpha123 psch: is there anything similar to common lisp's defun :around/:before/:after stuff?
18:17 dha Ah. Ok, now it makes sense.
18:17 [Coke] apologies for any churn this causes you.
18:17 dha Ah.
18:17 dha minimal at this point. glad for the heads up. thanks.
18:17 psch alpha123: i don't know any lisp beyond what s-expressions are :)
18:17 n0tjack ah, I get it, one of my MAIN()s is calling another, so it's printing the result of both!
18:18 psch n0tjack: right, and the result of *any* MAIN is a &say call
18:18 pink_mist alpha123: I think that's what I was trying to get at
18:18 PerlJam alpha123: you can call &thing.wrap()
18:18 psch n0tjack: because that's what the proto wrap does
18:18 moritz n0tjack: I hope you're aware that you can name your functions other than MAIN in Perl 6 :-)
18:19 n0tjack psch: yeah, that makes sense. seems I'm going to have to create 4 new subs and invoke them from thr 4 mains
18:19 pink_mist alpha123: http://design.perl6.org/S06.html#Wrapping
18:19 jnthn lizmat: But we'd still need special handling at object build time even with that...
18:19 alpha123 pink_mist: Thanks, that seems a little cleaner than overriding the proto.
18:19 dalek doc/usage_statements: 4055f38 | (Ronald Schmidt)++ | lib/Type/Cool.pod:
18:19 dalek doc/usage_statements: Update Cool.pod
18:19 dalek doc/usage_statements:
18:19 dalek doc/usage_statements: Add Match to list of descendants of Cool
18:19 dalek doc/usage_statements: review: https://github.com/perl6/doc/commit/4055f38728
18:19 jnthn lizmat: The conservative thing is to always require an initializer, I think
18:19 nine jnthn: do you have any idea for me for my Bool.WHERE problem or do you think it's some low level thing? I've run out of hypotheses.
18:20 jnthn (On a :D-constrained thing)
18:20 lizmat yeah, ok, clear
18:20 dalek joined #perl6
18:20 n0tjack feature-request: command-line flag for implicit "print result of final function invoked"
18:20 alpha123 pink_mist: woah, wrap is actually super cool
18:20 pink_mist yes it is :D
18:21 jnthn nine: No, I'd have to go digging some to figure it ut.
18:21 jnthn nine: Though .WHERE is not really reliable
18:21 PerlJam n0tjack: seems like a low-wattage feature to me.
18:21 nine jnthn: how so?
18:21 FROGGS[mobile] joined #perl6
18:21 PerlJam n0tjack: though, I have wished for something similar with grammars.
18:21 jnthn nine: Objects move
18:21 PerlJam (not since we got a debugger though :)
18:22 jnthn nine: nqp::objectid(...) is more reliable
18:22 n0tjack it just seems to me that multi sub MAIN() loses a lot of applicability if there's no way to have them share any code
18:22 n0tjack and that's a cool feature
18:22 psch n0tjack: your problem comes from cross-calling of MAINs
18:22 moritz n0tjack: there are lots of ways to share code with MAIN
18:22 PerlJam n0tjack: "no way"?  There's the standard ways of sharing code.
18:23 n0tjack PerlJam: do educate me! this is my 2nd day with perl6
18:23 moritz you can call MAIN. MAIN can call other code you write.
18:23 nine > perl6 -e 'use nqp; say (nqp::objectid(Bool), nqp::objectid(Bool.^mro[0]), nqp::objectid(Bool::True), nqp::objectid(Bool::False));'(50020552 31151760 30995464 30995520)
18:23 psch n0tjack: actually, the lack-of-usefulness of proto MAIN comes from there...
18:23 PerlJam n0tjack: just listen to moritz
18:23 nine jnthn: ^^^ I wonder why Bool's objectid is so different from the other 3
18:24 moritz n0tjack: it seems you're set on some fixed way to use MAIN; maybe that's not the best way to do it
18:24 n0tjack moritz: take a look at my gist, what's the minimum change you would make to have the results printed in all cases?
18:24 jnthn nine: Yes, that's...interesting
18:24 moritz n0tjack: URL?
18:24 n0tjack https://gist.github.com/ano​nymous/948a39efd73275266fa1
18:24 jnthn nine: Given you'd expected all of them to be deserialized from BOOTSTRAP
18:24 nine jnthn: may be a hint?
18:24 nine yes
18:25 jnthn nine: You do all of the setup work for Bool/True/False inside of the BEGIN block in BOOTSTRAP, yes?
18:25 vendethiel joined #perl6
18:25 nine jnthn: yes
18:25 jnthn OK, so it's not that we're re-running it...
18:25 moritz n0tjack: uhm, WTF? calling MAIN from USAGE?
18:26 n0tjack moritz: no I'm not
18:26 thou joined #perl6
18:26 moritz say MAIN :60[10,12,34]; # 10,12,34
18:26 n0tjack moritz: oh, nevermind that, that's an editing artifact
18:26 moritz that's a call to MAIN
18:26 n0tjack moritz: USAGE is supposed to jsut print usage, I was debugging something for htose lines
18:26 nine jnthn: the only parts outside that block are the declaration of the stub Bool and the methods implemented in Bool.pm
18:26 jnthn *nod*
18:27 * TimToady & the Mrs -> SFO -> DEN -> PIT
18:27 TimToady afk &
18:27 FROGGS[mobile] what a PITty
18:27 masak I see TimToady is now using curried Haskell function type syntax for travel routes :P
18:28 FROGGS[mobile] let's redesign all the things while you know who is not watching /o/
18:28 masak I like the way you're thinking
18:28 dalek rakudo/nom: c1e9ede | lizmat++ | src/Perl6/World.nqp:
18:28 dalek rakudo/nom: Use variable if we have it anyway
18:28 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c1e9ede8a9
18:28 dalek rakudo/nom: 94d4570 | lizmat++ | src/Perl6/ (2 files):
18:28 dalek rakudo/nom: Make 'use variable :D' work
18:28 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/94d4570db0
18:29 * masak .oO( "oh, TimToady, we decided to draft up and release Perl 7 while you were in transit" )
18:29 lizmat *variables  :-(
18:29 moritz n0tjack: sorry, I have trouble understanding your code
18:29 moritz n0tjack: this feels like golf, not like code I'd write
18:31 n0tjack moritz: it's an exercise in learning perl6, I'm not actually going to use the thing
18:31 moritz n0tjack: first step would probably to use a slurpy, so that you don't have to distinguish the $value and @values cases
18:31 n0tjack moritz: the point was to learn as many of the new features in as little time as I coudl manage
18:31 n0tjack moritz: doesn't the logic depend on array-ness?
18:33 moritz n0tjack: does it? it seems you just iterate over every value in @values and do the same thing for each
18:33 lizmat .oO( before we redo the core with Int:D, it should be noted it is 5.5 *slower* than Int )
18:33 FROGGS lizmat: we wont
18:34 lizmat but yeah, an extra argument for putting it in the mop
18:34 FROGGS lizmat: because you need to be able to construct a Pair, and you cant do that that early
18:34 lizmat :-)
18:34 antiatom joined #perl6
18:34 n0tjack moritz: I guess the iteration is what I meant by "different". I'm only familiar with slurpy from general tutorials. Is there some way to use it to create an implicit loop?
18:36 moritz n0tjack: no, just explicitly loop over it
18:36 antiatom joined #perl6
18:37 moritz sub MAIN(*@values, :@radix) { @radix ||= DEFAULT_RADIX xx *; for @values -> $v { say do_your_calculation_here($v, :@radix) }
18:37 moritz and make sure that the calculation aborts when the vaue is zero, then the lazy/infinite @radix doesn't hurt
18:37 jnthn lizmat: We may be able to move it MOP-ward pre-xmas, and it's perhaps desirable. Pretty certain we don't have the tuits for VM-level support, which'd give the bigger speedup, though. Though since it's just an optimization once we have it as a MOP thing, it doesn't matter much when we get the opt :)
18:38 * grondilu bites his nails as he's upgrading his RaspberryPi OS for the first time
18:38 n0tjack moritz: thanks, that helps a lot.
18:38 grondilu (hopefully he'll have a more recent gcc so he can compile MoarVM again)
18:39 moritz n0tjack: you're welcome
18:39 lizmat jnthn: would an extra attribute to Perl6::Metamodel::ContainerDescriptor be a start ?
18:40 dha Hm. Nil.pod says that Nil has a Str method, but p6 spits at me when I try to use it.
18:40 jnthn lizmat: No
18:40 lizmat ok
18:40 jnthn lizmat: It has to be a different kind of type
18:40 jnthn It's nothing to do with containers
18:40 jnthn A container has a type
18:40 lizmat ok, so Int:D would be a real subtype of Int
18:40 jnthn Not a subtype
18:41 jnthn A...definiteness type
18:41 masak m: say Int:D ~~ Int
18:41 camelia rakudo-moar 0a39e0: OUTPUT«True␤»
18:41 jnthn Int:D.HOW.WHAT # DefiniteHOW or some such
18:41 psch dha: it just warns, doesn't it?
18:41 psch m: print Nil.Str; say "ok"
18:41 camelia rakudo-moar 0a39e0: OUTPUT«Use of Nil in string context  in block <unit> at /tmp/Yw5cpUoUTP:1␤ok␤»
18:41 jnthn It'd smartmatch like masak showed
18:41 masak ...but not be a subtype?
18:41 jnthn Right
18:41 jnthn Well
18:41 lizmat jnthn: ok, that's above my internals foo atm
18:42 jnthn Not in the "inheritance" sense
18:42 masak of course not :)
18:42 psch m: say so Nil.^can('Str')[0]
18:42 camelia rakudo-moar 0a39e0: OUTPUT«True␤»
18:42 jnthn Depends which definition of "subtype" you pick :)
18:42 chrstphrhrt joined #perl6
18:42 masak at this point, subtype is detached from inheritance in my mind... :)
18:42 dha psch - I guess it does. Good point.
18:42 yqt joined #perl6
18:43 jrm joined #perl6
18:43 FROGGS m: say nqp::istype(Any, Mu)
18:43 camelia rakudo-moar 0a39e0: OUTPUT«1␤»
18:43 dha m: perl6 -e 'my $x = Nil.Str;say "Be", $x, "ep!";say $x.gist;'
18:43 camelia rakudo-moar 0a39e0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/9EAUXOsYlT␤Two terms in a row␤at /tmp/9EAUXOsYlT:1␤------> 3perl6 -e7⏏5 'my $x = Nil.Str;say "Be", $x, "ep!";sa␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤  …»
18:44 dha Should that be warning? Shouldn't $x just be the empty string?
18:44 dha oh. wait.
18:44 masak m: my $x = Nil.Str;say "Be", $x, "ep!";say $x.gist
18:44 camelia rakudo-moar 0a39e0: OUTPUT«Use of Nil in string context  in block <unit> at /tmp/86GpNCGUTH:1␤Beep!␤␤»
18:44 timotimo m: say Nil.Hooray
18:44 camelia rakudo-moar 0a39e0: OUTPUT«Nil␤»
18:44 timotimo m: say Nil.Hooray.say
18:44 camelia rakudo-moar 0a39e0: OUTPUT«Nil␤True␤»
18:44 timotimo m: say Nil.Hooray.Str
18:44 camelia rakudo-moar 0a39e0: OUTPUT«Use of Nil in string context  in block <unit> at /tmp/GuEKykXuhn:1␤␤»
18:44 dha Yeah, that.
18:45 dha in masak's example, why are you getting that warning?
18:45 timotimo because Nil doesn't want to be stringified
18:45 dha You do not appear to be using Nil in string context.
18:45 timotimo it's basically how Nil.Str is implemented
18:45 vendethiel Zoffix: should I just wait before you're done with your learnx issue, or should I start now?
18:45 yoleaux 5 Oct 2015 22:49Z <^elyse^> vendethiel: http://repzret.org/p/repzret/
18:45 ^elyse^ lol
18:45 dha but it's *not* being stringified. Nil.Str says it returns the empty string.
18:45 timotimo m: my $foo = Nil.Str; say $foo.WHAT
18:45 camelia rakudo-moar 0a39e0: OUTPUT«Use of Nil in string context  in block <unit> at /tmp/6yGwAdHhvg:1␤(Str)␤»
18:46 timotimo m: my $foo = Nil.Str; say $foo.perl
18:46 camelia rakudo-moar 0a39e0: OUTPUT«Use of Nil in string context  in block <unit> at /tmp/VlBOdV9Els:1␤""␤»
18:46 dha so $x should contain the empty string. not some kind of Nil.
18:46 timotimo right, it does return the empty string
18:46 timotimo but first it warns :)
18:46 apotheon joined #perl6
18:47 dha Oh. it's coming from the assignment, not the say. Ah.
18:47 dha Why do we have that method in the first place? :-)
18:47 lizmat dha: it comes from calling .Str on Nil
18:47 lizmat *not* from the assignment
18:47 timotimo it's not from the assignment
18:47 timotimo yeah
18:47 dalek doc/usage_statements: e675207 | coke++ | / (4 files):
18:47 dalek doc/usage_statements: Prefer append over push?
18:47 dalek doc/usage_statements: review: https://github.com/perl6/doc/commit/e675207e08
18:47 dalek doc/usage_statements: 99dcace | coke++ | lib/Pod/Convenience.pm6:
18:47 dalek doc/usage_statements: Make first-code-block less picky about location
18:47 dalek doc/usage_statements:
18:48 dha Right. I meant the statement that does the assignment. Sorry.
18:48 dalek joined #perl6
18:48 dha (i.e. the statement that also has the Nil.Str)
18:48 timotimo k :)
18:48 lizmat m: Nil.Str
18:48 camelia rakudo-moar 0a39e0: OUTPUT«Use of Nil in string context  in block <unit> at /tmp/vw4BpCykRc:1␤»
18:49 dha Is there some context in which Nil.Str is actually of any use?
18:49 spider-mario joined #perl6
18:50 [Coke] dha: I read your question as : "is it worth having this work if it's going to warn all the time?"
18:50 lizmat dha: the warning is the point
18:50 dha Ah.
18:50 FROGGS Nil.Str is there to tell you you did something wrong
18:50 dha Ok.
18:50 lizmat m: sub a { Nil }; say "This is a: { a }"
18:50 camelia rakudo-moar 0a39e0: OUTPUT«Use of Nil in string context  in block <unit> at /tmp/PfnGWtCwWk:1␤This is a: ␤»
18:50 [Coke] but, to not crash your program.
18:50 dha My head is now wrapped around that appropriately. :-)
18:50 timotimo when did assigning nil to something stop restoring default values?
18:51 lizmat m: my $a is default(42) = 666; dd $a; $a = Nil; dd $a
18:51 camelia rakudo-moar 0a39e0: OUTPUT«Int $a = 666␤Int $a = 42␤»
18:51 FROGGS it doesnt
18:51 lizmat timotimo: seems to work as designed ?
18:51 FROGGS lizmat: btw, I think I've got a fix for #126291
18:51 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=126291
18:52 timotimo oh
18:52 timotimo i forgot we were .Str ing on that :)
18:52 lizmat FROGGS: cool!
18:53 lizmat FROGGS: I'm about to add a number of tests to S04-declarations/smiley.t, is that ok with you ?
18:53 FROGGS lizmat: and I think we might want to attempt to delay the :D check on attributes... but these are still two concepts IMO :o)
18:53 FROGGS sure, if they pass :o)
18:53 lizmat they should, now
18:53 FROGGS awesome
18:53 lizmat as should any attributes tests
18:54 FROGGS sadly this does not yet:
18:54 FROGGS m: my ($a, Int:D $b); say $b
18:54 camelia rakudo-moar 94d457: OUTPUT«(Int:D (with implicit :D))␤»
18:54 ZoffixWork joined #perl6
18:54 FROGGS implicit?
18:54 FROGGS O.o
18:54 FROGGS and it should not even compile
18:54 lizmat that's intriguing
18:54 ZoffixWork vendethiel, wait. I should be done tonight or tomorrow :)
18:55 lizmat m: use variables :D; my Int $a
18:55 camelia rakudo-moar 94d457: OUTPUT«5===SORRY!5=== Error while compiling /tmp/OEBWL11flN␤Variable definition of type Int (with implicit :D) requires an initializer␤at /tmp/OEBWL11flN:1␤------> 3use variables :D; my Int $a7⏏5<EOL>␤    expecting any of:␤        constraint␤»
18:56 FROGGS m: my Int:D $a
18:56 camelia rakudo-moar 94d457: OUTPUT«5===SORRY!5=== Error while compiling /tmp/CtrxTpM6Tv␤Variable definition of type Int:D requires an initializer␤at /tmp/CtrxTpM6Tv:1␤------> 3my Int:D $a7⏏5<EOL>␤    expecting any of:␤        constraint␤»
18:56 lizmat FROGGS: I didn't want to say just Int:D, as that would not be shown in the code
18:56 lizmat if you specified it directly, it does show directly
18:56 FROGGS yet, it is correct there
18:57 nine m: say (Mu, Any, Nil, Cool, Attribute, Scalar, Proxy, Signature, Parameter, Code, Block, Routine, Sub, Method, Submethod, Regex, Str, Int, Num, List, Slip, Array, Map, Hash, Capture, Bool, ObjAt, Stash, PROCESS, Grammar, Junction, Metamodel, ForeignCode, CompUnitRepo, IntLexRef, NumLexRef, StrLexRef, IntAttrRef, NumAttrRef, StrAttrRef, IntPosRef, NumPosRef, StrPosRef).map({$_.^name ~ nqp::objectid(nqp::decont($_))});
18:57 camelia rakudo-moar 94d457: OUTPUT«(Mu40148688 Any40148472 Nil40147992 Cool40148544 Attribute59957720 Scalar40148256 Proxy40147704 Signature40147944 Parameter40148664 Code40148424 Block40148400 Routine40148640 Sub40147848 Method40147824 Submethod40148520 Regex40148376 Str40148304 Int4014818…»
18:57 lizmat ah, I think I see the issue...
18:57 lizmat the message is wrong because it assumed it would die
18:57 Hor|zon joined #perl6
18:58 nine jnthn: of all types stubbed in BOOTSTRAP, only Attribute and Bool are in a completely different address range than the rest.
18:58 dha I just noticed that "camelia" contains "camel". I'm slow.
18:58 FROGGS m: my Int:D $a = 0; say nqp::istype(0, $a)
18:58 camelia rakudo-moar 94d457: OUTPUT«0␤»
18:58 FROGGS :o(
18:59 nine m: say (Attribute, Map, Hash, Capture, Bool, ObjAt, Stash, PROCESS, Grammar, Junction, Metamodel, ForeignCode, CompUnitRepo, IntLexRef, NumLexRef, StrLexRef, IntAttrRef, NumAttrRef, StrAttrRef, IntPosRef, NumPosRef, StrPosRef).map({$_.^name ~ nqp::objectid(nqp::decont($_))});
18:59 camelia rakudo-moar 94d457: OUTPUT«(Attribute41716200 Map21908624 Hash21908288 Capture21908864 Bool21908552 ObjAt21908792 Stash21908840 PROCESS21909008 Grammar21908192 Junction21908576 Metamodel21909080 ForeignCode21908384 CompUnitRepo21908528 IntLexRef21908744 NumLexRef21909128 StrLexRef21…»
18:59 jnthn FROGGS: Yes, that's the reason I think this has to end up in the MOP
18:59 FROGGS :S
18:59 lizmat m: my Int:D $a = 0; say nqp::istype("", $a)
18:59 camelia rakudo-moar 94d457: OUTPUT«0␤»
18:59 jnthn FROGGS: A DefiniteHOW which implements the accepts_type method to do the check
18:59 FROGGS another can of worms :o)
18:59 * FROGGS .oO( what have I started here )
19:00 jnthn m: say nqp::objectid(Attribute); say nqp::objectid(Attribute.^mro[0])
19:00 camelia rakudo-moar 94d457: OUTPUT«60325720␤60325720␤»
19:00 jnthn nine: No MRO oddity there, though...
19:00 jnthn FROGGS: It shoudln't be too bad; look at CoercionHOW for inspiration. I'm a bit preoccupied with SpecialCasing ATM...
19:01 * FROGGS .oO( Scheiße! )
19:01 jnthn Precisely.
19:01 FROGGS :P
19:01 FROGGS okay, I give my best
19:01 jnthn m: say "Scheiße!".fc
19:01 camelia rakudo-moar 94d457: OUTPUT«scheisse!␤»
19:02 jnthn m: say "Scheiße!".uc # :(
19:02 camelia rakudo-moar 94d457: OUTPUT«SCHEIßE!␤»
19:02 FROGGS :/
19:02 jnthn That's what I'm working on ATM.
19:02 masak jnthn++
19:02 jnthn And when I get done with that there's like, "what if somebody puts a combiner on the ß, we make a synthetic, then uppercase"...omg. :)
19:03 masak finally, we'll be able to SCHEISSE right... :P
19:03 FROGGS *g*
19:03 masak jnthn: thanks for the bug tip :P
19:03 lizmat .oO( and nobody will be able to say that Perl 6 doesn't handle its shit right )
19:03 apotheon joined #perl6
19:05 ZoffixWork Does Perl 6 consistently call class attributes "fields"? e.g. class Foo { has $.bar; } <--- would you call bar an "attribute" or "field"?
19:05 jnthn We use "attribute" pretty consistently
19:06 ZoffixWork OK. Thanks :)
19:09 tony___ joined #perl6
19:15 apotheon joined #perl6
19:19 dha Hm. I'm probably doing this wrong.
19:19 dha so, if the signature is "method spawn(Proc:D *@args ($, *@), :$cwd = $*CWD, Hash() :$env = %*ENV) returns Bool:D", how would you call that. Specifically, if you wanted to specify cwd or env?
19:20 dha I think I'm getting confused by colons.
19:21 jnthn m: say chr(0xFB04)
19:21 camelia rakudo-moar 94d457: OUTPUT«ffl␤»
19:22 lizmat cwd => "dir".IO
19:22 FROGGS dha: $proc.spawn(:cwd</home/froggs>, :env({ FOO => 42, BAR => 111 }))
19:22 lizmat :cwd("dir".IO)   # same thing
19:22 jnthn > say(nqp::uc('effluent'));
19:22 jnthn EFFLUENT
19:22 jnthn \o/
19:22 FROGGS \o/
19:23 dha Gah. that makes usage statements... difficult. But that's what I was afraid of.
19:23 FROGGS dha: mind that I left out the @args
19:24 * dha is going to have to think and revise.
19:24 dha would @args be required there?
19:24 FROGGS yes
19:24 dha ok, I got that part right...
19:24 FROGGS it is the command and params to execute
19:24 * dha considers giving up before things get too out of whack.
19:25 ZoffixWork jnthn++ that's pretty amazing :)
19:25 FROGGS ($, *@) basically just means that the @args must be unpackable to a scalar and other things, to enforce that @args is not empty
19:26 dha Yeah, that doesn't affect the usage statement particularly.
19:26 dha named optional arguments, though. Leah.
19:26 dha bleah, even.
19:26 FROGGS :S
19:27 dha Also trying to get a meta key to work in vim on os x. :-(
19:29 n0tjack joined #perl6
19:29 biff_ joined #perl6
19:34 cognominal joined #perl6
19:36 laouji joined #perl6
19:39 diana_olhovik joined #perl6
19:44 biff_ joined #perl6
19:48 biff_ joined #perl6
19:49 n0tjack joined #perl6
19:49 Carolin joined #perl6
19:50 Carolin joined #perl6
19:51 geekosaur have to thwack terminal settings, it uses alt/option for extended characters by default
19:52 _itz meta in vim? emacs has meta!
19:52 ZoffixWork jnthn, once that's in, it would be nice to advertise it (a blog post?). PHP, Python, and Ruby say the answer is "EfflUENT" :)
19:52 jdv79 where can i publish a blurb about perl6 and cpan that people will see - probably getting on pl6anet.org would be good
19:53 ZoffixWork (Perl 5 does respond with "EFFLUENT")
19:53 jdv79 also, i'm not terribly great at writing so if anyone can review it that'd be nice
19:53 biff_ left #perl6
19:54 _itz jdv79: https://github.com/stmuk/pl6an​et.org/blob/master/perlanetrc Pull Request?
19:54 _itz I can review too
19:54 jnthn ZoffixWork: It's in MoarVM HEAD now; got another case to handle, a little more testing and revision bumps tomorrow.
19:54 ZoffixWork \o/
19:54 concerned is there an IRC server made in pure perl6?
19:54 jnthn ZoffixWork: So, "soon" :)
19:55 ZoffixWork concerned, I doubt it :)
19:55 jdv79 _itz: https://gist.github.com/ano​nymous/1ff2c7748f950a1cff93
19:55 concerned if not, is there some example script that shows me how to identify individual clients and relay messages, kinda like an internet relay chat, know what I mean?
19:55 FROGGS jnthn: I think I understand what to do fwiw
19:55 ZoffixWork concerned, but there's always a place for IRC::Server here *wink* *wink*: http://modules.perl6.org/
19:56 jnthn FROGGS: With the serialization?
19:56 FROGGS hehe, no
19:56 jnthn FROGGS: Or the MOP?
19:56 FROGGS *nod*
19:56 concerned I'd love to make IRC::Server but I don't know the first thing about sockets in perl6, let alone perl at all lol
19:56 concerned socket servers that is
19:57 concerned seems like all I have to do is identify every client, when they join a channel it puts them in a hash with other clients in that channel, relays messages to users etc
19:57 btyler concerned: here's a single threaded non-blocking TCP "chat": https://gist.github.com/kanat​ohodets/8ffb1a18ff04c80225cc
19:57 concerned but I don't know how to identify every client
19:57 n0tjack joined #perl6
19:57 concerned oh yeah this is much better than echo server lol
19:58 concerned so I add to an ID number for every socket... not as bad as I thought
19:59 dha _itz - meta can be used in vim as well. If you can find it. :-/
19:59 [Coke] dha: can you sum up why usage statements again?
19:59 btyler in that case I just shove all the sockets into an array, but yeah, something more sophisticated would probably be in order for a larger program
19:59 [Coke] as opposed to the signatures?
20:00 dha why have them? Because signatures are more useful for implementers than users. You shouldn't have to understand what "multi method lc(Str:D:) returns Str:D" means to do "$string.lc"
20:01 dha Granted, some things, like lc are relatively obvious, but some are not. And it seems to me that, for consistency, all functions should have them, even if they seem obvious.
20:01 FROGGS yes, usage statements are way easier to handle for newbies
20:01 dha Please let me know if you disagree.
20:01 btyler concerned: and for even more fun, here's a multithreaded socket server https://gist.github.com/kanat​ohodets/21929bf2a05625d1d67c
20:01 ZoffixWork jdv79, for those who've not been involved in Perl 5, it would be clearer if you explained what "pause" and "metacpan" are. Could be just "pause (module author's module management interface); metacpan (documentation/module browsing website)".
20:01 [Coke] My concern is that it's a completely different syntax to learn that isn't strict.
20:01 woolfy joined #perl6
20:02 concerned btyler, lol nice
20:02 jnthn Time for me to go rest
20:02 jnthn 'night #perl6
20:02 ZoffixWork \o
20:02 woolfy \o #perl6
20:02 FROGGS gnight jnthn
20:02 FROGGS hi woolfy
20:02 [Coke] if there's a return type, why should that be skipped in the usage?
20:02 dha If you have a way to make things usable for people coming to Perl 6 that would be strict, that would be great. :-)
20:03 woolfy Tonight, I send in proposals for a booth and a devroom for Perl at FOSDEM next year.  And I made a blog post about talk proposals and why FOSDEM is interesting.
20:03 woolfy So if any of you is interesting in talking, or just attending, please have a look and a read.  https://wendyga.wordpress.com/2015​/10/08/fosdem-30-31-january-2016-b​russels-belgium-call-for-speakers/
20:04 dha [Coke] - I see your concern, but not how to solve it. My worry is that we wind up with a lovely language coming out in December, but no one outside the echo chamber wanting to take the time to learn it, because the signatures are often not obvious.
20:04 btyler concerned: so probably a more realistic chat server would handle client connections in their own promise (perhaps?) and then use supplies to move data between them
20:04 dha Again, you may disagree.
20:05 concerned btyler, "promise" and "supplies" are unfamiliar terms to me
20:06 dha As far as return values are concerned, if they're not obvious and you need to know them, the signature is there if you need it.
20:06 dalek roast: 22e4acc | lizmat++ | S04-declarations/smiley.t:
20:06 dalek roast: Add a lot of 'use variables' related testing
20:06 dalek roast: review: https://github.com/perl6/roast/commit/22e4accfc1
20:06 concerned heh, concerned
20:07 lizmat dha: return types are really only interesting from a performance point of view
20:07 lizmat they don't partake in MMD
20:07 grondilu joined #perl6
20:07 lizmat so generally, a user would be less interested in it
20:07 ZoffixWork What's MMD?
20:07 btyler concerned: this document will help: https://github.com/perl6/doc/blob/m​aster/doc/Language/concurrency.pod (click 'view raw')
20:07 [Coke] dha: so let's have a "how to read signatures" language page.
20:07 dha lizmat - yes.
20:07 lizmat ZoffixWork: multi-method dispatch
20:07 ZoffixWork Thanks.
20:08 btyler concerned: but a promise is just some asynchronous piece of work, with their own execution context
20:08 [Coke] S99:MMD
20:08 synbot6 Link: http://design.perl6.org/S99.html#MMD
20:08 [Coke] (second time today!)
20:08 FROGGS ZoffixWork: which also applies to routines
20:08 * ZoffixWork nods
20:08 lizmat [Coke]: did you actually follow that link ?
20:08 btyler they're awesome because you can write "synchronous" code inside them (see my "sleep 1" in the cat facts server) without blocking the whole server, like you would in many single-threaded async environments (node.js, for example)
20:09 lizmat [Coke]: and then again ?
20:09 FROGGS lizmat: lol
20:09 dha [Coke] - I find that a barrier to adoption. YMMV.
20:09 btyler concerned: underneath promises are being served by a pool of thread workers, so they're running on different cores on your machine
20:10 [Coke] lizmat: it says "see multi method dispatch"
20:10 btyler a supply is asynchronous pub/sub: you can subscribe to it and be notified every time it emits some data
20:10 lizmat and you click on that...
20:10 [Coke] the point is more to tell people they can look this stuff up.
20:10 dha I did get some consensus on adding usage statements before I started, otherwise I wouldn't have done it. If they're a problem, I suppose I could back it all out.
20:10 lizmat ah, ok: anyway, ZoffixWork : https://en.wikipedia.org/wiki/Multiple_dispatch
20:10 [Coke] lizmat: so? it's as much as an answer as he got in channel.
20:11 [Coke] dha: can you point out a signature that is particularly painful?
20:11 dha [Coke] - starts feeling like yak shaving to the newcomer, I think.
20:11 [Coke] perhaps I can craft a sample that addresses it.
20:11 btyler concerned: so to translate my speculation about a server earlier: probably you'd do something like 'cat facts' where you handle a new connection in its own promise (thread context) and use supplies (pub/sub) to send data between them
20:11 ZoffixWork lizmat, yeah, I've learned what multiple dispatch is today on learnxiny, but I wasn't sure what "MMD" stood for (other than "Make My Day" from AcronymFinder.com :)
20:12 concerned oh
20:12 btyler you see this pattern a lot in Go, for example
20:12 TEttinger joined #perl6
20:12 btyler where each client or request is its own goroutine
20:12 [Coke] Or, we can dynamically create Usage based on the signatures - that would be a step up from keeping 2 things in sync manually.
20:12 concerned btyler, I've been porting the "chat server" script you gave me to the "cat facts" script handling method
20:13 btyler and inside that goroutine is a 'select' loop that handles new messages on any channels it is attached to
20:13 concerned does this work on windows? lol
20:13 dha [Coke] - pretty much anything that involves ":$whatever". It it wholly unobvious how that would work.
20:13 btyler concerned: it should, the guy who wrote it works on a windows machine
20:13 concerned oh haha
20:13 btyler and under the hood it uses libuv, which is cross platform with windows support
20:13 concerned ooh
20:15 btyler the only caveat is that the async socket stuff on MoarVM is still a little fragile in places, so you might bump into segfaults or MVM exceptions (which can't be caught)
20:15 dha Out of curiosity, does anyone other than [Coke] have problems with having usage statements. Not that [Coke]'s concerns are to be ignored, but I'm wondering how widespread they are.
20:15 concerned well, trying to put the chat server inside of handle-socket fails
20:15 concerned if I make 3 connections to it, it crashes
20:15 concerned and messages aren't relayed
20:16 btyler can you share your code? I'll try to hack something up; it might well be a VM issue
20:17 pmurias joined #perl6
20:17 concerned btyler, https://gist.github.com/imco​ncerned/337a6a10065819bd1834
20:17 pmurias dha: by usage statements you mean examples of use?
20:17 Carolin left #perl6
20:17 dha And I'm wondering if I should start backing them out.
20:17 dha pmurias - not so much examples as... I guess, templates?
20:18 concerned also btyler, `cat /dev/urandom | base64 | ncat localhost 3005` then ctrl-c'ing crashes the server with: connection reset by peer  in block <unit> at irc.pl6:5
20:18 dha e.g. split( DELIMITER, STRING [, LIMIT] [, :all])
20:18 [Coke] dha: if you don't know how named arguments work, that's a problem when reading the docs. one thing we could do is detect when a signature has named args and give some help icon they can click on to explain that syntax.
20:18 pmurias dha: do you have an example of a "usage statement"?
20:18 [Coke] dha: I wouldn't back them out yet, but I wouldn't bother adding more until we get more agreement.
20:19 pmurias dha: ahh, I have see
20:19 adam321 joined #perl6
20:19 dha [Coke] - I think that goes back to the issue of how people read docs. If you're trying to read the docs in a terminal, icons will not be useful...
20:19 pmurias dha: an example seems more useful
20:19 dha [Coke] - so noted.
20:19 n0tjack m: say log 2**16,2; sub infix:<log>($radix, $x){log $x, $radix}; say 2 log 2**16;
20:19 camelia rakudo-moar 94d457: OUTPUT«16␤16␤»
20:19 dha pmurias - although I'm using a somewhat different format now.
20:20 concerned btyler, apparently the code for "chat server" unmodified crashes with many connections and base64ing
20:20 jdv79 ZoffixWork and _itz: anyting else?  so far better for non-p5'ers.
20:20 pmurias dha: where can the docs containing usage statements be found?
20:20 dha [Coke] - as far as named arguments are concerned, I find telling them from adverbs occasionally potentially confusing.
20:21 dha pmurias - Several have been merged into the main doc tree already, but there's also the usage_statements branch, where I've  been doing the work.
20:21 laouji joined #perl6
20:22 adam321 left #perl6
20:22 [Coke] dha: as an aside, the usage statements broke the site generator; we need to get some testing in here so you can do a make test before submitting. We're not ready for that yet. (but in the meantime, usage statements no longer break the site.)
20:23 pecastro joined #perl6
20:23 dha Oh. sorry. :-(
20:23 [Coke] dha: not your fault.
20:23 ZoffixWork jdv79, I'd add a comma after "way to some" here. It took me a few moments to parse that sentence correctly without one :) https://gist.github.com/anonymous/1ff2c​7748f950a1cff93#file-gistfile1-txt-L28
20:23 ZoffixWork Other than that. It looks good to me :)
20:24 [Coke] dha: note usage formatting problem here:
20:24 [Coke] http://doc.perl6.org/type/Cool#method_rand
20:25 [Coke] not sure if that's a pod parsing problem or if we need to update the .pod there.
20:25 dha *nod*
20:25 [Coke] for now, updating the pod is quicker. not sure how many are like that.
20:27 pmurias dha: a lot of the usage statements seems like pointless duplication
20:27 dha pmurias - I can see that, but I was also aiming for a bit of consistency.
20:28 tokuhirom joined #perl6
20:28 pmurias like "chars STRING"
20:28 lizmat m: say Int:U.WHAT   # FROGGS : is that expected ?
20:28 camelia rakudo-moar 94d457: OUTPUT«(Int)␤»
20:28 psch i'd argue for either real examples or only signature, actually
20:28 psch regarding "Usage", that is
20:28 pmurias real examples have value
20:29 psch where "real examples" should mean code that actually can be copied and pasted
20:29 psch and runs and shows what happens
20:29 ZoffixWork +1 on real examples
20:29 psch i don't see any value in replacing sigiled variables with uppercase types
20:29 pmurias say 'mop'.chars; # 3 has value
20:30 pmurias STRING.chars just wastes screen space
20:30 psch mind, from those two i personally would prefer only signatures
20:30 lizmat m: say Int:Foo.WHAT   # aaah, that explains
20:30 camelia rakudo-moar 94d457: OUTPUT«(Int)␤»
20:30 psch because being able to read signatures should come easily enough - writing subs isn't dark magic
20:31 pmurias examples are good
20:31 jdv79 ZoffixWork: thanks
20:31 jdv79 _itz: i pushed a pr
20:31 dha psch - maybe if you already understand the language. If you want people to actually use the language, some more work should probably be done.
20:31 psch hm, maybe automagical crosslinking from every signature to the corresponding language explanation is an idea?
20:31 FROGGS lizmat: that should do the right thing the the MOP stuff is in
20:31 dha But if people don't like them, I can back it all out.
20:31 FROGGS when the*
20:32 lizmat FROGGS: ack
20:32 dha My personal feeling is that if you need a doc on how to read the docs, that's a problem with the docs. *shrug*
20:32 [Coke] psch: to dha's point, we can do stuff in html that we can't do in, say, nroff.
20:32 cognominal m: say 'a' ~~ / a & a /
20:32 camelia rakudo-moar 94d457: OUTPUT«Nil␤»
20:32 pmurias dha: without the signature I wouldn't be sure what the usage statements do
20:32 cognominal m: say 'a' ~~ / a & \w /
20:32 camelia rakudo-moar 94d457: OUTPUT«「a」␤»
20:32 jdv79 http://jdv79.blogspot.com/2​015/10/perl6-and-cpan.html
20:32 psch [Coke]: oh, right, that makes sense...
20:32 pmurias .oO(wtf is STRING?)
20:32 psch i guess that'd seal it on "real examples", at least for me
20:33 dha pmurias - It's a string. :-)
20:33 lizmat [Coke] dha  so I would like to see both usage and signature
20:33 [Coke] dha: no, that's Str.
20:33 cognominal I don't get why the first match fails
20:33 jdv79 hopefully that'l be on pl6anet soon.
20:33 lizmat and then let the HTML guru's figure out how to show them in separate tabs or hovers or whatever
20:33 ienh joined #perl6
20:34 dha [Coke] - Yes. But I'm trying to look at this from the perspective of someone who might know what a string is, but is new to Perl 6. But maybe I'm doing that wrong.
20:34 PerlJam dha: I don't think you're doing it wrong.
20:34 cognominal m: my &rx = / a /; say 'a' ~~ / a & &rx /
20:34 camelia rakudo-moar 94d457: OUTPUT«「a」␤»
20:34 dha lizmat - That's my thought as well, but there seems to be some disagreement.
20:34 [Coke] I think we should explain them what a String is right away. on the html page, we can link any signature types to the type page.
20:34 PerlJam dha: (at least, I agree with your premise and have no better alternative)
20:35 [Coke] I don't think we should be optimizing for command line doc readers.
20:35 [Coke] (I think we can make some accomodations there.) but my goal is "if you don't know what this thing on this page is, we should have a way for you to find out"
20:35 Guest83961 joined #perl6
20:36 psch i don't think every documented sub should have a mini perl6intro next to it
20:36 laouji joined #perl6
20:36 psch and that's kind of what this Usage looks like to me, fwiw
20:36 [Coke] I agree there needs to be a path for n00bs, but it shouldn't be on all the time everywhere.
20:36 pmurias [Coke]: yes, rather then have a different thing that you have no idea what it is
20:37 pmurias as the usage statements seem to be either useless or confusing
20:37 dha Ok. I only note that it should be in place by Christmas.
20:38 pmurias like what is a DELIMITER?
20:39 dha It's a delimiter. like the variable in the signature. But without the noise of the signature.
20:39 PerlJam It's a human-centered word rather than a programming language-centered word
20:39 psch cognominal: that seems to be a problem with literals on the RHS of regex-&
20:39 psch m: say "a" ~~ /\w & a/
20:39 camelia rakudo-moar 94d457: OUTPUT«Nil␤»
20:39 psch m: say "a" ~~ /\w & 'a'/
20:39 camelia rakudo-moar 94d457: OUTPUT«「a」␤»
20:41 psch m: say "a" ~~ /b | a/
20:41 camelia rakudo-moar 94d457: OUTPUT«「a」␤»
20:41 dalek roast: 6a329a3 | lizmat++ | S04-declarations/smiley.t:
20:41 dalek roast: Better check and better todo message
20:41 dalek roast: review: https://github.com/perl6/roast/commit/6a329a3d5b
20:41 dha What PerlJam said.
20:42 pmurias examples actually help people
20:43 masak can I ask a somewhat philosophical question? what exactly is a compunit?
20:43 dha yes. Usage statements also help people. as people have said to me. Just because they don't help you doesn't mean they don't help anyone.
20:43 btyler concerned: here's what I was thinking of: https://gist.github.com/kanat​ohodets/04c3486cfa5db983d6dc
20:43 masak I know two things that can be a compunit, I think. a file, and the thing that goes into an EVAL
20:43 masak but is a quasi a compunit, too?
20:44 dalek doc: 894232a | (Zoffix Znet)++ | / (3 files):
20:44 dalek doc: Prevent search box "flicker" on page load (Closes #149)
20:44 dalek doc: review: https://github.com/perl6/doc/commit/894232ab26
20:44 masak do compunits ever have an OUTER?
20:44 btyler concerned: I think your gist will be unhappy in high concurrency because it modifies @clients from multiple threads
20:44 lizmat S99:compilation unit
20:44 synbot6 Link: http://design.perl6.org/S99.html#compilation
20:44 dha I guess I'm just trying to think outside of the Perl 6 box. We want people to use Perl 6 widely, I would think.
20:44 lizmat masak: a compunit is basically only what's inside an EVAL
20:44 lizmat the file case just first slurps the file into a string
20:45 masak lizmat: thank you. but I think that fails to address my question... :)
20:45 pmurias in the html version a tooltip explaining what the different parts of the signature are is what's needed in my opinion
20:45 cognominal psch: right, indeed
20:45 n0tjack does Rakudo support the tighter/looser traits?
20:45 lizmat masak: is a quasi an EVAL ?
20:45 masak it's kind of half of one
20:45 masak in that it parses the thing, but doesn't run it
20:45 pmurias if you know perl 6 signature syntax the usage statements are just a pure waste of screen space
20:45 PerlJam masak: I think that's a "no"
20:45 [Coke] dha: of course we want people to use perl 6 widely.
20:46 btyler yo folks discussing documentation: this might be the text<->human connection, but my impression is that the conversation is getting a little tough. good docs are really hard, and iterating is easier than innovating whole-cloth - can we iterate on the kernel of usefulness in usage?
20:46 cognominal I did not realize until today how useful is & in regex.
20:46 [Coke] in any case: There's plenty of docs to write. If we want usage statements, it's possible to automate adding them. I'd focus on fleshing out things other than usage for right now.
20:46 dha IMO, if you want wide acceptance, you shouldn't assume how people are going to read docs. So even if you don't want to optimize for terminal reading, you should still consider it.
20:46 masak reason I'm asking is that 007 development is raising this as a question right now :)
20:46 masak cognominal: I still haven't realized that :P
20:47 dha [Coke] -  agreed. How can we make that happen?
20:47 lizmat m: my $a = 42; EVAL "say OUTER::<$a>"   # this should say 42 in my book
20:47 camelia rakudo-moar 94d457: OUTPUT«(Any)␤»
20:47 lizmat masak ^^^
20:48 masak lizmat: I could argue that one both ways, actually.
20:48 n0tjack m: sub infix:<log> is looser(&infix:<max>) ($r, $x) {log $x, $r;}; 10 log 1 max 1234;
20:48 [Coke] dha: I'm making it happen by fixing bugs in building the html docs right now.
20:48 camelia rakudo-moar 94d457: OUTPUT«5===SORRY!5=== Error while compiling /tmp/2HgtNb3hwF␤Missing block␤at /tmp/2HgtNb3hwF:1␤------> 3sub infix:<log> is looser(&infix:<max>)7⏏5 ($r, $x) {log $x, $r;}; 10 log 1 max 12␤    expecting any of:␤        new name to be defined␤»
20:48 lizmat m: my $a = 42; { say OUTER::<$a> }   # same without EVAL
20:48 camelia rakudo-moar 94d457: OUTPUT«42␤»
20:48 masak lizmat: sometimes I feel we don't have a good "theory" for what EVAL does, and how it interacts with scopes.
20:49 dha [Coke] -  That's important, but it's not fleshing things out. Not a criticism, by the way.
20:49 pierrot joined #perl6
20:49 dha [Coke]++
20:49 btyler concerned: the caveat with the chat server gist I just sent you is that it crashes on my moar when sockets disconnect -- looks like a VM bug, so I'm building a JVM rakudo to see if that copes better, or if what I wrote is actually a terrible anti-pattern
20:49 cognominal m:  say  '#&!' ~~ m/ [ \S & \W ]+ /  # match non blank, non alphabetic chars    <=== masak
20:49 camelia rakudo-moar 94d457: OUTPUT«「#&!」␤»
20:50 psch n0tjack: the signature always comes after the longname
20:50 psch m: sub infix:<log> ($r, $x) is looser(&infix:<max>) {log $x, $r;}; 10 log 1 max 1234;
20:50 camelia rakudo-moar 94d457: ( no output )
20:50 lizmat m: my $a = 42; EVAL( "say $a", :context(MY::) )
20:50 camelia rakudo-moar 94d457: OUTPUT«42␤»
20:50 cognominal masak, \W alone would not cut it in this case
20:51 n0tjack psch: thanks; that makes sense now
20:51 PerlJam cognominal: most people would use character classes though (in that case)
20:51 masak was gonna say
20:51 cognominal m:  say  '# & !' ~~ m/  \W+  /
20:51 camelia rakudo-moar 94d457: OUTPUT«「# & !」␤»
20:51 lizmat masak: the default :context is CALLER::
20:52 lizmat m: my $a = 42; EVAL "say $a"
20:52 camelia rakudo-moar 94d457: OUTPUT«42␤»
20:52 masak lizmat: aha -- so what you're saying is you wish the EVAL thing happened inside of an implicit block
20:52 n0tjack what's the recommended way to cast an X to a Y without creating an intermediate dummy variable?
20:53 n0tjack huh, I suppose I could Y.new(X);
20:53 lizmat masak: well, the EVAL *does* start a new compunit, which means it starts parsing from TOP
20:54 z8 joined #perl6
20:54 lizmat does *all* of the normal startup initailizations and then decided on an initial scope that is not empty (which it would when loading a file, e.g.)
20:54 [Coke] dha: how about this: if we decide we want usages, we should generate them programmatically based on the signature rather than maintaining them separately. I'm happy to write that code if it comes to that. that will free you up to worry about adding non generated content for now.
20:55 masak m: EVAL 'my $x = 7' # should the $x be available in the mainline code? is it?
20:55 camelia rakudo-moar 94d457: ( no output )
20:55 masak I... don't know how to check whether the $x is there, without running into static checking.
20:56 masak something with ::MY or something
20:56 lizmat m: no strict; EVAL 'my $x = 7'; say $x
20:56 camelia rakudo-moar 94d457: OUTPUT«(Any)␤»
20:56 lizmat hmmm...
20:56 PerlJam masak: I would say not, unless it was injected via OUTER::MY:: or something
20:56 lizmat m: no strict; EVAL 'my $x = 7'; EVAL 'say $x'
20:56 camelia rakudo-moar 94d457: OUTPUT«5===SORRY!5=== Error while compiling EVAL_1␤Variable '$x' is not declared␤at EVAL_1:1␤------> 3say 7⏏5$x␤»
20:56 masak PerlJam: right.
20:56 lizmat ehe
20:56 pierrot_ joined #perl6
20:56 masak PerlJam: and even that should probably be pessimised, so that we can do good optimizations by default.
20:57 masak so, in short, I agree with lizmat++
20:57 masak there should be an implicit block in the EVAL
20:57 masak there is in the quasi :)
20:57 lizmat there *is* an implicit block in the EVAL
20:57 masak then OUTER:: should work
20:57 * grondilu upgraded his Debian system from wheezy to jessie and now rakudo seems to be compiling fine
20:57 PerlJam [Coke]: I don't quite see how you'd programmatically generate a bit of human-centric documentation from the sigs and other docs.   It seems much easier for the humans to do that and then programmatically omit it if desired.
20:58 [Coke] speaking of textual docs.. I think our target for Christmas should be an html version of the docs.
20:58 lizmat masak: there are a few bugs atm with EVAL scoping
20:59 lizmat for one, pragma's don't carry over into the EVAL
20:59 lizmat they should
20:59 [Coke] PerlJam: I'm pretty sure there's a pattern in what dha is doing to create those usages.
20:59 dha [Coke] -  If that can actually be done, sure. I guess I'll look at other issues in the meantime. Of course, that means I'll probably be asking lots of questions. So be prepared for that. :-)
21:00 [Coke] absolutely.
21:00 [Coke] yikes, it's late.
21:00 llfourn joined #perl6
21:00 [Coke] adios.
21:02 pmurias [Coke]: the usage statements seem to be just a cripled version of the signatures for reading by people who don't know Perl 6 syntax yet
21:02 pmurias [Coke]: I think we can generate such things without much problems
21:03 * pmurias should just shut up today as he is just being pointlessly mean :(
21:03 borg2 joined #perl6
21:04 lizmat good night, #perl6!
21:04 dha *shrug* Just let me know if I should back it all out.
21:05 antiatom joined #perl6
21:05 laouji joined #perl6
21:06 FROGGS gnight lizmat
21:07 FROGGS dha: leave it in until someone can autogenerate it in a better quality to what you added
21:07 dha Whatever.
21:08 n0tjack m: my IntStr @v = (IntStr.new(123,"123"),IntStr.new(456,"456")); say (@v>>.Int).WHAT; # I want Int @, not int @
21:08 camelia rakudo-moar 94d457: OUTPUT«(Array[IntStr])␤»
21:14 larion joined #perl6
21:21 FROGGS .tel lizmat is it possible that you wait working on smileys (implementation wise, not test wise) until I've merged the MOP stuff?
21:21 FROGGS .tell lizmat is it possible that you wait working on smileys (implementation wise, not test wise) until I've merged the MOP stuff?
21:21 yoleaux FROGGS: I'll pass your message to lizmat.
21:21 laouji joined #perl6
21:25 FROGGS .tell jnthn does nqp::settypecheckmode affect nqp::istype?
21:25 yoleaux FROGGS: I'll pass your message to jnthn.
21:25 gonz_ joined #perl6
21:26 FROGGS hmmm, seems so...
21:26 FROGGS why doesnt it work for me?
21:27 n0tjack I can't work out how to cast an IntStr @ to an Int @
21:28 n0tjack and it's really hard to google for p6 docs :/
21:29 FROGGS m: my IntStr @v = (IntStr.new(123,"123"),IntStr.new(456,"456")); say (+<<@v).WHAT
21:29 camelia rakudo-moar 94d457: OUTPUT«(Array[IntStr])␤»
21:29 n0tjack oh, dude
21:29 FROGGS m: my IntStr @v = (IntStr.new(123,"123"),IntStr.new(456,"456")); say (Int @ = +<<@v).WHAT
21:29 camelia rakudo-moar 94d457: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Tco4rdnQoe␤Two terms in a row␤at /tmp/Tco4rdnQoe:1␤------> 3,"123"),IntStr.new(456,"456")); say (Int7⏏5 @ = +<<@v).WHAT␤    expecting any of:␤        infix␤        infix stopper␤        stat…»
21:29 FROGGS m: my IntStr @v = (IntStr.new(123,"123"),IntStr.new(456,"456")); say (my Int @ = +<<@v).WHAT
21:29 camelia rakudo-moar 94d457: OUTPUT«(Array[Int])␤»
21:29 FROGGS m: my IntStr @v = (IntStr.new(123,"123"),IntStr.new(456,"456")); say (my Int @ = +<<@v)
21:29 camelia rakudo-moar 94d457: OUTPUT«[123 456]␤»
21:30 LLamaRider joined #perl6
21:30 FROGGS not nice, but works
21:30 n0tjack I'll take it
21:30 n0tjack I tried a bunch of >>s, but not +<<
21:31 masak 'night, #perl6
21:31 concerned oh hi btyler
21:32 FROGGS gnight masak
21:32 concerned btyler, somehow, https://gist.github.com/kanat​ohodets/04c3486cfa5db983d6dc works just fine when I feed base64 into it
21:33 concerned it continues accepting connections and sending messages
21:33 concerned let's see about making many many connections
21:33 concerned oh
21:33 concerned when I ctrl-C the last connection, the script dies
21:33 concerned oh no, when I ctrl-C the third connection
21:34 concerned dang
21:36 laouji joined #perl6
21:37 dha pmurias -  just put in a pull request for an example rather than a usage statement. I hope you like it. :-)
21:38 cygx joined #perl6
21:38 cygx o/
21:39 cygx question - what's the closest perl6 equivalent to %words = ($input =~ /([^\n\t]+)\t(\N+)/g)
21:39 cygx the only thing I could come up with was %words = $input.match(/(<-[\n\t]>+)\t(\N+)/, :g).map(*.list>>.Str.Slip)
21:45 borg2 joined #perl6
21:48 bjz joined #perl6
21:50 rurban joined #perl6
21:51 kid51 joined #perl6
21:56 FROGGS m: sub foo returns Str:U { "bar" }; foo
21:56 camelia rakudo-moar 94d457: ( no output )
21:57 FROGGS locally:
21:57 FROGGS $ perl6 -e 'sub foo returns Str:U { "bar" }; foo'
21:57 FROGGS Type check failed for return value; expected Str:U but got Str
21:59 mprelude joined #perl6
21:59 mr_ron joined #perl6
22:01 PerlJam cygx: my %words = flat lines.map: { .split: /\t, 2 };
22:01 PerlJam cygx: you could have used the limit paramter to split in P5 too
22:01 PerlJam er, ... my %words = flat lines.map: { .split: /\t/, 2 };
22:02 mr_ron Where do I report the need for a small change to a synopsis?
22:02 cygx PerlJam: that'snot really close, though
22:02 PerlJam cygx: por que no?
22:02 pink_mist cygx: much more expressive to me
22:02 pink_mist and more readable
22:03 pink_mist in fact, thanks to that I finally actually understand what you were doing
22:03 cygx PerlJam: it's part of some micro-benchmarking I'm doing
22:03 cygx readability is not the point of the exercise
22:03 PerlJam oh
22:05 laouji joined #perl6
22:06 mr_ron m: "\t" ~~ <sp>
22:06 camelia rakudo-moar 94d457: ( no output )
22:06 mr_ron m: "\t" ~~ <space>
22:06 camelia rakudo-moar 94d457: ( no output )
22:06 mr_ron m: say "\t" ~~ <sp>
22:06 camelia rakudo-moar 94d457: OUTPUT«False␤»
22:06 cygx m: say "\t" ~~ /<space>/
22:06 camelia rakudo-moar 94d457: OUTPUT«「    」␤ space => 「   」␤»
22:09 mr_ron m: say qq/#&\t!A/ ~~ m/ <- alnum - sp>
22:09 camelia rakudo-moar 94d457: OUTPUT«5===SORRY!5===␤Regex not terminated.␤at /tmp/EwkbITtUHn:1␤------> 3say qq/#&\t!A/ ~~ m/ <- alnum - sp>7⏏5<EOL>␤Couldn't find terminator / (corresponding / was at line 1)␤at /tmp/EwkbITtUHn:1␤------> 3say qq/#&\t!A/ ~~ m/ <- alnum - s…»
22:10 mr_ron m: say qq/#&\t!A/ ~~ m/ <- alnum - sp>+ /
22:10 camelia rakudo-moar 94d457: OUTPUT«Method 'sp' not found for invocant of class 'Cursor'␤  in block <unit> at /tmp/BjjB4RvR6u:1␤␤»
22:10 mr_ron m: say qq/#&\t!A/ ~~ m/ <- alnum - space>+ /
22:10 camelia rakudo-moar 94d457: OUTPUT«「#&」␤»
22:11 mr_ron m:  "\t" ~~ /<sp>/
22:11 camelia rakudo-moar 94d457: OUTPUT«Method 'sp' not found for invocant of class 'Cursor'␤  in block <unit> at /tmp/iA3DUp1FLJ:1␤␤»
22:11 mr_ron m:  "\t" ~~ /<space>/
22:11 camelia rakudo-moar 94d457: ( no output )
22:12 mr_ron sorry that took so long.  It means that in http://design.perl6.org/S05.h​tml#Character_class_shortcuts sp needs to be updated to say space.  Where do I report the change?
22:16 pink_mist https://github.com/perl6/specs here looks like a likely place
22:21 laouji joined #perl6
22:21 mr_ron pink_mist: thanks ... working on it ...
22:24 _itz_ joined #perl6
22:28 cygx https://gist.github.com/cygx/cbb08f0c01a0cc28c9d3
22:28 telex joined #perl6
22:28 cygx PerlJam: ^^ that's what I've got for now...
22:33 timotimo cygx: and your results? :)
22:37 cygx timotimo: nqp at 0.8s, p5 at 0.5..1.5s, p6 at 1.5..130s
22:39 timotimo yeah ... damn :(
22:46 BenGoldberg joined #perl6
22:50 cygx not to worry, just use Inline::Perl5 for performance-critical code :p
22:50 laouji joined #perl6
22:51 skids joined #perl6
22:52 pink_mist NativeCall to C!
22:54 Ben_Goldberg joined #perl6
22:58 dalek ecosystem: 87a8b93 | ugexe++ | META.list:
22:58 dalek ecosystem: Add Grammar::HTTP
22:58 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/87a8b933cf
23:04 thou joined #perl6
23:08 dalek doc: 8b9f93c | (David H. Adler)++ | lib/Language/control.pod:
23:08 dalek doc: Added docs for C<while> and C<until>
23:08 dalek doc: review: https://github.com/perl6/doc/commit/8b9f93c46c
23:08 dalek doc: 55755e0 | (David H. Adler)++ | / (524 files):
23:08 dalek doc: Merge branch 'master' of https://github.com/perl6/doc
23:08 dalek doc: review: https://github.com/perl6/doc/commit/55755e070c
23:08 dalek doc: 2523914 | (David H. Adler)++ | doc/Type/Int.pod:
23:08 dalek doc: Added example for .chr
23:08 dalek doc: review: https://github.com/perl6/doc/commit/2523914273
23:08 dalek doc: 7421597 | RabidGravy++ | doc/ (2 files):
23:08 dalek doc: Merge pull request #132 from dha/master
23:08 dalek doc:
23:08 dalek doc: Added docs for C<while> and C<until> in control.pod
23:08 dalek doc: review: https://github.com/perl6/doc/commit/74215972dd
23:09 cygx ~~
23:09 cygx left #perl6
23:12 eliasr joined #perl6
23:12 Ben_Goldberg I've a silly question, concerned, btyler... in either of your code, what happens if you leave out the "start {" and "} around the call to handle_socket, and remove the "react {" "}" within handle_socket?  Do the 'whenever's within it get attached to the topmost 'react'?
23:13 pink_mist afaik they should
23:16 mr_ron joined #perl6
23:18 concerned Ben_Goldberg, I dunno man
23:18 concerned this is my first experiences with perl 6
23:19 tokuhirom joined #perl6
23:19 timotimo right, there's not really a need to go onto separate threads there, because it's all I/O you're doing
23:20 timotimo and then you'll also have the socket objects pinned to the thread they were created in, which - IIRC? - was able to cause some problems somehow?
23:28 takadonet joined #perl6
23:31 * TimToady very briefly in DEN
23:31 timotimo that's probably not denmark
23:32 timotimo denver?
23:32 TimToady yup
23:34 Ben_Goldberg If 'react' and 'whenever' where named 'evloop' and 'evwatch' would this make their behavior clearer, or more confusing?
23:36 pink_mist I think whenever is an awesome name
23:36 TimToady boarding &/e
23:36 pink_mist much better than evwatch
23:36 TimToady boarding &
23:37 pink_mist react certainly speaks more about what it actually does ... evloop might be more evident to someone who are already familiar with the technology
23:37 pink_mist but to someone who isn't I think react is a much better name choice
23:37 pink_mist *someone who is
23:38 Ben_Goldberg Ok.  On another subject, suppose I want to react to the first 5 sockets accepted by a listening socket; how do I make the react stop 'whenever'ing the listener?
23:44 pink_mist LAST
23:44 pink_mist no wait, that's the opposite issue :P
23:45 pink_mist close the supply maybe?
23:45 Kcop joined #perl6
23:51 laouji joined #perl6
23:56 pink_mist seems there's a $supply.done method

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

Perl 6 | Reference Documentation | Rakudo