»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by masak on 12 May 2015.
ShimmerFairy m: say "0123456789" ~~ /<:Numeric_Value(0..8)>/ 00:00
camelia rakudo-moar 25d348: OUTPUT«「0」␤»
ShimmerFairy m: say "0123456789" ~~ /<:Numeric_Value(0..8)>+/
camelia rakudo-moar 25d348: OUTPUT«「01234567」␤»
flussence maybe it's looking at .bounds directly? 00:02
m: say "0123456789" ~~ /<:Numeric_Value(1..8)>+/ 00:03
camelia rakudo-moar 25d348: OUTPUT«「1234567」␤»
flussence m: say "0123456789" ~~ /<:Numeric_Value(1^..^8)>+/
camelia rakudo-moar 25d348: OUTPUT«「1234567」␤»
00:03 cestdiego left
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 AlexDaniel left
ShimmerFairy flussence: it _seems_ like it's doing an implicit ..^ no matter what, but who knows? 00:04
timotimo that's weird 00:06
m: say "0123456789" ~~ /<:Numeric_Value(2..5)>+/ 00:07
camelia rakudo-moar 25d348: OUTPUT«「234」␤»
gfldex sitaram_: could you check please if your version eats lots of ram on your host?
ShimmerFairy m: say "0123456789" ~~ /<:Nv(0..8)>+/ 00:08
camelia rakudo-moar 25d348: OUTPUT«「0123456789」␤»
ShimmerFairy timotimo: and the short alias Nv doesn't work at all! :P
flussence m: say "0123456789" ~~ /<:Numeric_Value(1,3,5,7,9)>+/
camelia rakudo-moar 25d348: OUTPUT«Nil␤»
flussence dunno if that's intended to work or not.
ShimmerFairy I would think so. 00:10
timotimo i would have expected it takes a regex-like or at least a matcher-like thing
so a range makes sense, a list ... not terribly much
maybe a set or junction
flussence oh, good point...
m: say "0123456789" ~~ /<:Numeric_Value(any(1,3,5,7,9))>+/
camelia rakudo-moar 25d348: OUTPUT«「1」␤»
timotimo that wouldn't work
you'd have to skip non-matchers
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…»
timotimo whoops
m: say "0123456789" ~~ m:g/<:Numeric_Value(any(1,3,5,7,9))>+/
camelia rakudo-moar 25d348: OUTPUT«(「1」 「3」 「5」 「7」 「9」)␤»
flussence oh right, my bad :)
timotimo there we go
ShimmerFairy m: say "0123456789" ~~ /<:Numeric_Value((0..7).any)>+/ 00:12
camelia rakudo-moar 25d348: OUTPUT«「01234567」␤»
ShimmerFairy m: say "0123456789" ~~ /<:Nv((0..7).any)>+/
camelia rakudo-moar 25d348: OUTPUT«「0123456789」␤»
00:13 kyclark joined
timotimo just removing "return" statements from the formula evaluation benchmark brings my timings from ~64s down to ~58s 00:14
m: say 58 / 64 00:15
camelia rakudo-moar 25d348: OUTPUT«0.90625␤»
timotimo 10% off just from that ... damn.
i thought we had a "throw out return statements at the end of a sub if they are unnecessary" optimization somewhere
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?
timotimo perhaps it'll want to be *@ARGS 00:17
00:23 thou left 00:24 laouji joined
kyclark OK, I can use that to get access to @ARGS but it won't create a pretty usage like "foo.pl <numbers>" 00:25
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:26
00:27 cognominal left 00:28 Peter_R left
timotimo no, it's a twigil 00:28
@*ARGS is the dynamic variable that holds the actual full arguments passed in 00:29
what does your code look like?
perl6 -e 'sub MAIN($a, $b) { }'
that works, right?
hm. sub MAIN(@args) is very unhappy 00:30
that should probably die early
*@args on the other hand means you define a slurpy positional parameter called "@args"
kyclark lpaste.net/142512
timotimo (i got confused there for a tiny second)
ah
there you have a parameter called @ARGS, but you access @*ARGS instead, which is a different variable 00:31
though i now realize that @*ARGS doesn't include the program name
so that's good
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
pink_mist how /do/ you access the program name? 00:32
timotimo m: say $*PROGRAM-NAME
camelia rakudo-moar 25d348: OUTPUT«/tmp/kIQxriNQVn␤»
pink_mist oh, logical :D
timotimo more logical than $0, we think
gfldex sitaram_: i can run over all tweets in real 2m33.496s with gist.github.com/anonymous/f86be02d...tfile1-txt
pink_mist m: say $*INTERPRETER-NAME #does this exist?
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␤␤»
pink_mist nope =/
kyclark So @* is together the way to access these global bits?
gfldex sitaram_: your version eats all my ramz with any larger file :(
skids * is a twigil for dynamic variables 00:33
timotimo dynamic variables are a little bit like globals, except they are stacky
kyclark define "twigil"
pink_mist design.perl6.org/S02.html#Twigils
timotimo that was quick, pink_mist :) 00:34
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 :-)
timotimo OK :)
skids (or I' just getting old) 00:36
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␤»
ShimmerFairy m: sub foo { say $BAR }; my $BAR = 42; foo; # a quick show of dynamic vs. lexical
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␤»
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?
* but the AREN'T required
00:39 laouji left
timotimo yes, look here: 00:40
m: sub MAIN($first, *@rest) { }
camelia rakudo-moar 25d348: OUTPUT«Usage:␤ /tmp/ODqJmiHrIl <first> [<rest> ...] ␤»
timotimo but you'll have to put $first in front of @rest later
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␤␤»
ShimmerFairy hm, apparently &USAGE doesn't exist unless you make it. I always thought it was provided by default O_o
kyclark how do i cons in p6? 00:42
00:42 laouji joined
kyclark parse($number, @numbers) -> those are no longer one flattened array, so how do i join them with $number in the front? 00:42
timotimo i'd @numbers is copy and then @numbers.unshift($number) 00:43
otherwise it'd just be "flat $number, @numbers"
00:44 lichtkind_ left
skids m: my $a = 1; my @b = 2,3; ($a, |@b).join(",") 00:44
camelia ( no output )
00:44 lichtkind left
skids m: my $a = 1; my @b = 2,3; ($a, |@b).join(",").say 00:44
camelia rakudo-moar 25d348: OUTPUT«1,2,3␤»
timotimo m: my $a = 1; my @b = 2,3; (flat $a, @b).join(",")
camelia ( no output )
timotimo m: my $a = 1; my @b = 2,3; say (flat $a, @b).join(",")
camelia rakudo-moar 25d348: OUTPUT«1,2,3␤»
timotimo both ways work
flussence argh, --profile-compile doesn't fit in 16GB of ram+swap, only took 10 last time I poked at it... 00:45
00:46 thowe joined
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
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:48
timotimo note + exit 00:49
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:50
00:51 laouji_ joined
timotimo i should give you the source i'm looking at 00:51
github.com/koorchik/formula-evalua...rl6/ast.pl
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
camelia rakudo-jvm 25d348: OUTPUT«(1 2 3)␤(4 5 6)␤(7 8 9)␤(10)␤»
ugexe must have already warmed it up 00:53
BenGoldberg kyclark, I think what you want with that 'parse' thing is parse( $number, |@numbers ). I could be wrong though. 00:55
00:55 laouji_ left
kyclark OK, comments to make this really idiomatic P6? 00:55
lpaste.net/142512
timotimo in this case i'd really just throw out sub MAIN completely
and then use @*ARGS directly instead 00:56
also, we have a %% operator (and its negated version !%%) for your divisibility tests
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"
m: say <1 3 3 2 8>.classify(* %% 2)
camelia rakudo-moar 25d348: OUTPUT«False => [1 3 3], True => [2 8]␤»
timotimo sorry, i told you about "categorize", then immediately used "classify" instead %) 00:59
kyclark for ({ * %% 2 }, { * !%% 2 }) -> $cond ?? that doesn't work
timotimo it doesn't?
00:59 aborazmeh joined, aborazmeh left, aborazmeh joined
kyclark ------> for ({ * %% 2 }⏏, { * !%% 2 }) -> $cond { 01:00
expecting any of:
horizontal whitespace
statement end
flussence well it's a closure inside a closure...
kyclark statement modifier
statement modifier loop
timotimo oh
that, too
BenGoldberg How about: for [(* %% 2), (* % 2)] -> $cond {
timotimo m: for * %% 2, * !%% 2 -> $cond { say $cond }
camelia rakudo-moar 25d348: OUTPUT«WhateverCode.new␤WhateverCode.new␤»
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)␤»
kyclark wait -- classify -- i see it work in the REPL, but what is it!? an array?
BenGoldberg m: for [(* %% 2), (* % 2)] -> $cond { say $cond }
camelia rakudo-moar 25d348: OUTPUT«WhateverCode.new␤WhateverCode.new␤»
BenGoldberg If forget if classify returns an array of pairs, or a hash ;) 01:02
m: say <1 3 3 2 8>.classify(* %% 2).WHAT
camelia rakudo-moar 25d348: OUTPUT«(Hash[Any,Any])␤»
BenGoldberg There we go, that's it.
kyclark that. is. crazy.
BenGoldberg Why? 01:03
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␤»
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.
BenGoldberg It's not much differnent from doing, with perl 5: sub classify { my $cond = shift; my %result; push @{$result{$cond->{$_}}}, $_ for @_; \%result }
flussence I think List::MoreUtils had a thing for doing that... 01:05
timotimo or in python something like { classificator(inval): inval for invals }
BenGoldberg Except of course that since arrays are objects in p6, it's a class method, not just a subroutine.
01:06 laouji_ joined
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:06
01:07 kid51 joined
kyclark classify would have to consume the entire list first, right? 01:07
not possible to work on inifinite lists?
01:09 pierrot joined, klabstriechst joined 01:10 kyclark left
BenGoldberg Making classify work on infinite lists would be tricky -- it could be done, perhaps, but ... 01:10
01:10 laouji_ left
timotimo BenGoldberg: you are right of course 01:12
we have a classify method for Supplies, IIRC
it spits out a supply of supplies
and i think you can coerce an infinite list into a supply? perhaps?
you'll have to pump it, of course 01:13
can't really pull from one of the ends, that would be kinda weird
01:13 rurban left
timotimo especially if no further items matching your criterion follow after a certain point 01:13
you'll just keep filling up the other resulting lists
01:14 csd__ joined
BenGoldberg I don't see classify anywhere on doc.perl6.org/type/Supply 01:17
01:18 jonadab joined, csd__ left
timotimo could be i only dreamt it up 01:19
but with supplies and the "on" primitive it should be easy to build
BenGoldberg It's in S17. There are tests for it. It's just been omited from the docs. 01:20
timotimo oh
ah, yes
implemented in SupplyOperations
colomon is there a way for users to access quoting characters in regex? 01:21
01:21 klabstriechst left
colomon generic quote, I mean. 01:21
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
ShimmerFairy I don't think so, you'd have to use stuff in $~MAIN most likely. 01:23
timotimo hmm
ShimmerFairy (Or use $~Quote if it's right for what you want to do)
TimToady you need the quibble stuff too
ShimmerFairy ah, right 01:24
timotimo oh hey TT 01:26
01:26 ienh joined 01:27 thou left
timotimo transfers to bed in the hopes of getting rid of his all-day-headache 01:27
01:28 nuc joined, nuc__ left 01:34 llfourn joined 01:36 laouji_ joined, kaare_ joined
TimToady I'm starting to get a handle on why sitaram_'s program is slow 01:37
parsing a single million-line file, about 8 seconds is the lines/NFG work, so that's in the noise for now 01:38
01:38 llfourn left
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:38
3 minutes for 'next unless m:i/knicks/' 01:39
taking off :i there takes it down to about 70 seconds
[Coke] on doc.perl6.org, why are some of the methods of Cool listed as "routine" instead of method or sub?
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:40
01:40 laouji_ left
TimToady putting the :i back on, using the .simplematch, takes it back up to about 2m25 01:41
so the :i pattern is running about 10 times slower than the non-:i pattern
[Coke] ah. I think maybe some of the htmlify stuff is being broken by the new usage blocks. 01:43
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:44
01:45 llfourn joined
TimToady and, roughly, for running the non-:i pattern through .match instead of .simplematch, we pay about 500% overhead 01:45
jnthn: ^^^ 01:46
dinner &
01:48 llfourn left 01:49 spudboy joined, kid51 left 01:50 spudboy left
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:51
gfldex: oh yeah it's hitting RAM quite a bit now; it's the top in memory 01:52
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:53
gfldex: first I thought the "for" should be a "while" (in P5 that would make a difference), but you also have a "for" 01:54
01:55 llfourn joined 01:57 llfourn left, llfourn joined
dalek c: e675207 | coke++ | / (4 files):
Prefer append over push?
01:58
c: 99dcace | coke++ | lib/Pod/Convenience.pm6:
Make first-code-block less picky about location

This lets us deal with the recent additions of text marking
  "defined as" vs. the "Usage"
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
sitaram_ ...definitely no reason to cross firefox in RAM usage :-)
timotimo you might be keeping around full match objects
these hold a reference to the whole source string 02:01
02:05 laouji_ joined 02:10 laouji_ left 02:11 tokuhirom joined 02:16 tokuhirom left 02:26 noganex_ joined 02:29 noganex left 02:34 coetry joined
dalek c: 19c6a84 | coke++ | lib/Type/Iterable.pod:
fix typo
02:39
[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
02:40 chenryn joined
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:48
[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:49
02:51 laouji_ joined 02:55 laouji_ left
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:05
llfourn you could also do: append @files, @found_files 03:07
03:11 thou joined 03:15 thou left 03:17 coetry left 03:19 coetry joined
sitaram_ TimToady: what is "lines/NFG"? (unless it's internal, in which case I may not understand anyway !) 03:22
03:22 mfollett joined 03:26 coetry left 03:27 justine_o joined
sitaram_ TimToady: 8 secs for one million lines without doing anything is a bit high. With a cold cache, paste.fedoraproject.org/276186/74630144 takes 16 seconds for 12.2 million lines (in 13 files) 03:28
(umm that's P5 I meant to say but you probably guessed anyway)
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
it's not necessarily what you want for this particular benchmark, of course
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
also, there are potentially ways we can improve that 8 seconds 03:32
but I'm not worried about those yet, given the that's not the slow bit
sitaram_ indeed
TimToady it's currently mostly the :i implementation, and to a lesser extent, the setup of an unneeded lazy gather/take 03:33
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
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.
I remember a grep speed up from that sort of thing until a year or so ago when they fixed it 03:35
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
as opposed to more than two minutes
and only 5 seconds slower than the bare string 03:37
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
and I don't think our index does boyer-moore yet, so that could get better too 03:39
you don't have the .simplematch I'm using
sitaram_ yup; and the 32-bit stuff is also probably an issue 03:40
03:41 csd_ joined
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:42
03:43 aborazmeh left
TimToady seems to add a second or two, so I'll leave it out 03:45
03:45 csd_ left 03:46 aborazmeh joined, aborazmeh left, aborazmeh joined 03:48 tokuhirom joined
dalek kudo/nom: 472ea02 | TimToady++ | src/core/Str.pm:
add a temp routine for speed testing of .match
03:48
TimToady and I've been using lines that look like: next unless .simplematch(/:i knicks/); 03:49
on my machine it runs 6 times longer with the :i than without (discounting the 8 seconds of lines() overhead) 03:50
dalek oblem_solver_tutorial: cebd3b6 | (Herbert Breunung)++ | chapter/text0.md:
wrote chapter 0 paragraph 2
03:51
03:58 chenryn left 04:02 advwp left
dalek oblem_solver_tutorial: b9428f5 | (Herbert Breunung)++ | chapter/text0.md:
linktest
04:06
04:06 avuserow left, avuserow joined 04:07 Kogurr left 04:08 coetry joined
dalek oblem_solver_tutorial: 05c49ac | (Herbert Breunung)++ | chapter/text0.md:
next linktest
04:09
04:10 advwp joined
dalek oblem_solver_tutorial: f9c46cd | (Herbert Breunung)++ | chapter/text0.md:
last linktest
04:13
04:18 khw left
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:19
04:21 kyclark joined, laouji_ joined
dalek oblem_solver_tutorial: 3b2b0ed | (Herbert Breunung)++ | chapter/text0.md:
linking complete chapter 0
04:23
04:23 kyclark left 04:26 laouji_ left 04:30 coetry left 04:32 coetry joined
thowe will rakudobrew get me the latest jazz? 04:33
dalek oblem_solver_tutorial: 38c5867 | (Herbert Breunung)++ | chapter/text0.md:
fixing head links
04:34
oblem_solver_tutorial: 8820d33 | (Herbert Breunung)++ | / (2 files):
update menu
04:34 chenryn joined, allen joined 04:36 laouji_ joined, lichtkind joined
lichtkind brew info rakudo-star 04:38
shows you version it will install
thowe I want Birthday, or Birthday+ 04:39
04:40 dbenton left, laouji_ left
TimToady rakudobrew installs 2015.09-271-g0cee783, which is early Birthday 04:41
lichtkind installing from git is easy
TimToady yeah, it's not bad, though you have to install panda yourself too
lichtkind sorry for annoyance here but i have to figuere one thing out and test it on the server 04:42
04:42 vendethiel joined, llfourn left
dalek oblem_solver_tutorial: c3bb273 | (Herbert Breunung)++ | chapter/text (2 files):
link dir fix
04:43
04:44 coetry left
lichtkind hurry that was last time 04:45
fix worked
04:45 allen left
lichtkind good night 04:45
04:46 lichtkind left 04:49 coetry joined, allen joined
moritz idly wonders what time zone lichtkind lives in right now 04:51
dalek osystem: 29e9366 | ugexe++ | META.list:
Add PathTools

General purpose file system utility routines
04:52
04:54 justine_o left 04:57 Xor_ left 04:59 thou joined, aborazmeh left 05:03 thou left
skids .tell timotimo gist.github.com/skids/7be38321eade492c3fd9 05:05
yoleaux skids: I'll pass your message to timotimo.
05:06 jkva joined 05:07 vendethiel left 05:13 skids left 05:15 mfollett left 05:17 BenGoldberg left 05:18 ][Sno][ is now known as [Sno] 05:26 xtreak left 05:28 Xor_ joined
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:29 coetry left, allen left
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␤»
TimToady say wot?
is that one bug or two? 05:31
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…»
TimToady two and a half? 05:33
.tell FROGGS RT #126291 is aimed in your general direction 05:40
yoleaux TimToady: I'll pass your message to FROGGS.
FROGGS k 05:43
yoleaux 05:40Z <TimToady> FROGGS: RT #126291 is aimed in your general direction
FROGGS yeah, I wonder how we make that one work... 05:44
05:50 FROGGS left, davido_ joined 05:56 telex left 05:58 FROGGS[mobile] joined
FROGGS[mobile] okay, I guess I know how 05:58
05:58 telex joined 06:01 mjp_ left
TimToady jnthn: re irclog.perlgeek.de/perl6/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:03
06:08 csd_ joined 06:09 pierrot left 06:10 FROGGS joined 06:12 csd_ left 06:15 FROGGS[mobile] left 06:17 summa joined
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)␤»
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 davido_ left, diana_olhovik joined
summa a squish bug? 06:19
06:19 summa left 06:20 laouji_ joined
TimToady kinda looks like it 06:22
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:25 laouji_ left
TimToady m: say (1,1,2,2,2,3,3).unique 06:26
camelia rakudo-moar 472ea0: OUTPUT«(1 2 3)␤»
[Tux] test 50000 36.738 36.628 06:28
test-t 50000 36.702 36.591
tux.nl/Talks/CSV6/speed4.html 06:29
TimToady m: say (1,1,2,2,2,3,3).squish(:with(&[eqv]))
camelia rakudo-moar 472ea0: OUTPUT«(1 1 2 2 2 3 3)␤»
dalek : a2dfe24 | (Ingo Blechschmidt)++ | docs/Perl6/Perl5/Differences.pod:
Correct a few tiny typos
06:30
: 988a56a | FROGGS++ | docs/Perl6/Perl5/Differences.pod:
Merge pull request #9 from iblech/patch-1

Correct a few tiny typos
06:31 firstdayonthejob joined 06:35 PotatoGim left 06:36 jkva left 06:38 Ven joined 06:42 PotatoGim joined 06:44 derlg_ joined
derlg_ hello 06:44
FROGGS hi derlg_
06:47 thou joined 06:51 bsb joined 06:52 thou left 06:55 grondilu left, zakharyas joined
Ven waves at #perl6. o/ 06:56
derlg_ *waves* 06:57
06:57 bjz joined 06:59 derlg_ left, jkva joined
dalek kudo/nom: e54ea07 | TimToady++ | src/core/Str.pm:
setting $/ is in the noise level, so do it

The .simplematch method is still considered a temporary experiment, but setting $/ makes it likely that the parser could select it when it knows there are no external options like :g. (Internal options like :i are okay.)
07:01
07:02 bjz left 07:03 rurban joined, domidumont joined, bsb left 07:06 laouji_ joined 07:09 Woodi joined
moritz really wants an infix:<Z> in Perl 5 07:09
07:11 laouji_ left
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
07:15 larion left, grondilu joined 07:16 antiatom left, antiatom joined
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
07:17 bjz joined
moritz nine: the workaround is my %h; @h{@names} = @values; foo(%h) 07:17
nine: but once you're used to Z, you want to write that without the temporary var as foo( @names Z @values );
nine foo(zip @names, @values) would work, too
moritz ... at the expense of another dependency 07:18
nine List::MoreUtils is in core
moritz Data for 2014-09-14
List::MoreUtils was not in CORE (or so I think)
nine Oh, indeed 07:19
Don't know, why I thought it was...
A huge improvement for Perl 5 would already be to just unify List::Util and List::MoreUtils
moritz wishful thinking :-)
El_Che nine++ 07:20
nine moritz: according to metacpan.org, 738 CPAN modules depend on List::MoreUtils. You may already depend on it anyway. 07:22
07:23 Ven left 07:24 firstdayonthejob left 07:25 bjz left 07:26 bjz joined 07:27 cucushka joined
moritz nine: probably. But don't undermine my ramblings, will you? :-) 07:28
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:29
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:30
07:35 maddingu1 is now known as maddingue, bakedb left
dalek ast: 6fa03d9 | TimToady++ | S04-statement-modifiers/ (8 files):
test that all statement modifiers are terminators
07:37
p: 6717984 | TimToady++ | src/HLL/Grammar.nqp:
nulltermish should check terminator

This lets statement modifiers be terminators after comma, as in STD. Fixes RT #79174.
07:39 llfourn joined
dalek kudo/nom: 23c9dff | TimToady++ | src/Perl6/Grammar.nqp:
with/without statement mods are also terminators
07:39
kudo/nom: 651e17c | TimToady++ | tools/build/NQP_REVISION:
bump nqp to get RT #79174 fix
moritz wow, a 5-digit RT fixed \o/ 07:41
07:43 ely-se joined, llfourn left 07:44 bakedb joined 07:56 cucushka left 07:58 darutoko joined 07:59 domm_ left 08:00 KotH left
dalek osystem: e22c33d | moznion++ | META.list:
Add HTML::Escape
08:01
osystem: 178284b | moritz++ | META.list:
Merge pull request #68 from moznion/html-escape

Add HTML::Escape
kudo/nom: f3aace1 | lizmat++ | src/core/Any-iterable-methods.pm:
Fix for #126293

For some reason, the "once" block was fired for *every* time a pull-one was called. Also very unclear why the tests didn't spot this. Weird.
08:02 ienh left 08:06 ienh joined, domm joined 08:09 dakkar joined
dalek ast: 522ca4a | lizmat++ | S32-list/squish.t:
Add test for #126293
08:10
08:12 RabidGravy joined
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
08:14 Ven joined
lizmat hmmm... all the tests seem to have .list, which probably gets the push-all version of the iterator 08:18
08:19 csd_ joined 08:20 llfourn joined 08:21 AlexDaniel joined
dalek ast: c8e924a | lizmat++ | S32-list/squish.t:
Some more test adjustments
08:22
AlexDaniel awwaiid: it seems like rakudo version in debian unstable is 2014.07-something
awwaiid: so I think that I'd much rather prefer if it was not there at all 08:23
08:24 csd_ left, zacts` left, larion joined
AlexDaniel awwaiid: Oh! but nqp, indeed, is 2015.09 08:24
08:27 kjs_ joined, Axord joined 08:28 ienh left
lizmat afk for a few hours& 08:34
08:35 AlexDaniel left, thou joined
ely-se I prefer awk for a few hours. 08:37
moritz is awkward all day
ely-se I think a2p should be upgraded so that it can generate Perl 6 code. 08:38
08:39 thou left 08:40 jmc left, kjs_ left
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␤»
literal what does this mean?
08:44 dr_bibble joined
moritz it's bogus warning 08:44
or error
08:44 dr_bibble left 08:45 rindolf joined 09:01 kjs_ joined 09:02 espadrine joined 09:20 kjs_ left 09:25 jkva left 09:26 spider-mario joined 09:29 Psyche^ joined 09:32 ][Sno][ joined 09:33 Psyche^_ left
jnthn morning, #perl6 09:33
09:34 [Sno] left
DrForr Afternoon... 09:34
09:34 TEttinger left
jnthn Certainly before noon here :) 09:34
09:35 ][Sno][ left
jnthn Granted, it's "jitro" not "ráno", but... :) 09:35
09:36 [Sno] joined
DrForr Damn you timezone Dan :) 09:36
jnthn TimToady++ # another one off the xmas list
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
DrForr Oh, right, another apocalypse survived. 09:42
masak jnthn: yeah, that's how I use "antenoon"
09:43 FireFly joined 09:47 lolisa joined 09:49 kid51 joined
dalek c: 851cf02 | (Lloyd Fournier)++ | lib/Language/modules.pod:
Fixed misstatement about packages and 'is export'
09:49
09:50 vytas joined 09:54 andreoss joined
dalek c: 7df7c77 | (Lloyd Fournier)++ | lib/Language/modules.pod:
added missing =end code
09:54
andreoss where the difference between [$a] and [$a,] is described?
09:55 pmurias joined
masak m: my $a = 42; say [$a].perl; say [$a,].perl 09:55
camelia rakudo-moar f3aace: OUTPUT«[42]␤[42]␤»
andreoss m: ([[1,2,3],] , [[1,2],[3]] ).flat.say
camelia rakudo-moar f3aace: OUTPUT«([1 2 3] [1 2] [3])␤»
pmurias what do I need to do to have perl6-bench benchmark nqp-js?
andreoss m: ([[1,2,3]] , [[1,2],[3]] ).flat.say
camelia rakudo-moar f3aace: OUTPUT«(1 2 3 [1 2] [3])␤»
jnthn andreoss: S07 if nowhere else
jnthn thought somebody worked on getting a description into the docs too 09:56
llfourn m: [1] ~~ [1,]
camelia ( no output )
llfourn say [1] ~~ [1,]
m: say [1] ~~ [1,]
camelia rakudo-moar f3aace: OUTPUT«True␤»
andreoss it doesn't .flat the same way 09:57
why [[1]] is the same as [1]? 09:58
jnthn Signle argument rule
Same thing that makes [1..10] work
10:01 virtualsue joined, ely-se left
llfourn m: say [[1]] ~~ [[1],] 10:03
camelia rakudo-moar f3aace: OUTPUT«False␤»
llfourn m: say [[1]] ~~ [[1]] 10:04
camelia rakudo-moar f3aace: OUTPUT«True␤»
10:06 laouji_ joined 10:10 laouji_ left, rurban left 10:16 rurban joined 10:21 Ven left 10:23 thou joined 10:27 chenryn left 10:28 thou left 10:31 antiatom left 10:32 nerfur joined
nerfur hello 10:33
10:33 virtualsue left 10:34 antiatom joined
psch hi #perl6 o/ 10:35
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:38 antiatom left 10:39 [ptc]_ joined
jnthn psch: Is there another form to write it that does work? 10:40
10:40 [ptc]_ left
dalek ast: 7f75447 | jnthn++ | S32-str/fc.t:
Tests for .fc.

Including the various tricky cases.
10:41
psch jnthn: i don't think so, no
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…»
psch huh, accidental underline o.o
jnthn: but that form also doesn't do the .words.Stringy conversion either, so..?
jnthn No
Ah, so the first one is the one we might have expected to work
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.
If it's -Ofun to make it work, feel free ;)
psch i'm struggling to find a way to figure out which values i can compile time evaluate 10:44
as in, the check that fails that one is the same that forbids infix:[/./]
and that is definitely bogus...
dalek kudo/nom: c7b6128 | lizmat++ | src/Perl6/World.nqp:
Only initialize $Pair when we need it
10:45
jnthn I recently did a patch to make constants interpolated in regexes contribute to LTM; dunno if that could be of interest.
Well, or inspiration.
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
psch i guess i'll try that, see if it works 10:46
unless there's a case that a WVal could turn into a correct compile time value..?
10:49 chenryn joined 10:51 laouji_ joined, larion left 10:55 laouji_ left 10:56 antiatom joined 10:57 ely-se joined 11:01 antiatom left
jnthn psch: Well, you can probably check the value is a Str 11:04
(If you have a WVal) 11:05
dalek p: 0853cdb | jnthn++ | tools/build/MOAR_REVISION:
Bump MOAR_REVISION for new foldcase op.
11:10
p: 84f7b50 | jnthn++ | src/vm/moar/QAST/QASTOperationsMAST.nqp:
Map nqp::fc op on Moar backend.
p: a488d59 | jnthn++ | src/vm/jvm/QAST/Compiler.nqp:
For now, map nqp::fc to nqp::lc on JVM.

It's right for a bunch of cases, at least.
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:12
11:16 laouji left
dalek kudo/nom: 54451b3 | jnthn++ | tools/build/NQP_REVISION:
Bump NQP_REVISION for new nqp::fc op.
11:23
kudo/nom: 912d208 | jnthn++ | src/core/ (2 files):
Implement .fc method and fc(...) sub.

Performs the Unicode foldcase operation. Unlike uc/tc/lc, it already understands full mappings (where one grapheme may expand to many). It is made available on JVM too, but is incomplete there.
kudo/nom: 1a1c0ff | jnthn++ | t/spectest.data:
Run S32-str/fc.t on MoarVM.
11:23 larion joined
dalek kudo/nom: 6f31121 | lizmat++ | src/Perl6/World.nqp:
Reduce number of $*W lookups
11:30
11:32 gtl joined
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:32
masak .oO( what apout fc?! ) :P 11:33
11:34 chenryn left 11:35 gtl left
jnthn
.oO( don't give a fc! )
11:37
bbiab &
11:47 ely-se left 11:49 Ven left 11:51 laouji joined, domm left 11:52 ely-se joined, cognominal joined
domidumont FROGGS: done: rakudo 2015.09 is now available on Debian/sid. Thanks for the help 11:53
[ptc] domidumont++
domidumont [ptc]: hi.. glad you're still around :-) 11:54
11:54 brrt joined
[ptc] domidumont: sorry for my lack of help over the last while 11:54
domidumont [ptc]: no problem. That's what teams are for
[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...
domidumont: really happy that you got the whole stack built on Debian!
11:55 laouji left 11:56 Loren joined
timotimo i'm also quite delighted to see 2015.09 on debian! :) 11:56
yoleaux 05:05Z <skids> timotimo: gist.github.com/skids/7be38321eade492c3fd9
moritz domidumont++
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. ..
yoleaux timotimo: I'll pass your message to skids.
11:56 kid51 left
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
[ptc] domidumont: I believe they should all have the same tag
moritz yes, they need dependencies on the exact version numbers
timotimo between nqp and rakudo it can be much, much hairier 11:58
[ptc] domidumont: e.g. moarvm|nqp|rakudo.2015.09 should work
timotimo in any case, a change in nqp version means rakudo has to rebuild all its files
12:00 AlexDaniel joined
domidumont ok. I'm retrying, rebuild moar, test... ok. no problem.. now nqp... 12:01
no. By rebuilding nqp (same code), I break rakudo
moritz aye
that's the really hairy part.
AlexDaniel domidumont: great!!
domidumont AlexDaniel: thanks :-) 12:02
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
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
domidumont [ptc]: usually, not if the change is backward compatible 12:05
moritz rakudo depends on exact versions of serialization contexts in nqp 12:06
so even if your fix adds a single object that's not exposed to the outside world, you need a rakudo rebuild
[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?
domidumont moritz: that sounds reasonable. But why impose a rebuild if the code does not change ?
12:07 Ven joined
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
timotimo domidumont: ah, well, that's a change in rakudo's eyes :\
moritz domidumont: nqp and rakudo identify serialization contexts via hashes
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
domidumont: which is why it introduces timestamps into these SCs, to avoid collision 12:09
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
then a rebuild without a code change should get an SC with the same hash
timotimo that could also give us shorter identifiers
i'd like that
save a tiny bit more ram and disk space
12:12 thou joined
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
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 Ven left
moritz domidumont: no 12:13
12:13 Ven joined
moritz domidumont: because stage 1 and stage 2 have the same source code 12:13
domidumont can the hash be salted with stage1 and then stage2 ? 12:15
moritz something like that, yes 12:16
that's what I meant with command-line-supplyable identifiers
12:16 thou left
domidumont ah ok. 12:16
timotimo those identifiers could very well have - for example - the git commit identifier (plus a random string if the commit is "dirty") 12:17
12:17 Ven left
dalek kudo/nom: 6f65c36 | peschwa++ | src/Perl6/World.nqp:
Add some more nibble_to_str logic.

This lets us distinguish a few more valid-at-compile-time values for &foofix declarations.
12:19
FROGGS domidumont: \o/
dalek ast: db4b845 | peschwa++ | S06-operator-overloading/sub.t:
Add a test for defining a circumfix operator from a single constant.
12:21 laouji joined
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:21
jnthn I suspect we can find a different way to manage the bootstrap issue than the timestamps. 12:23
Without too much trouble.
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:25 laouji left
jnthn andreoss: Because natively typed arrays are stored differently (in a packed form, rather like C arrays) 12:26
moritz seems we already have a stable-sc option 12:27
but don't use it anywhere
12:27 laouji joined
jnthn (Meaning they can be passed off to to native code, even) 12:27
moritz though it needs a bit extending
grondilu got: MoarVM op 'fc' is unknown as a core or extension op at gen/moar/stage1/QAST.nqp:1862 (gen/moar/stage1/QAST.moarvm:moarop_return_type:98)
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.
moritz grondilu: seems like your moarvm is too old
[Coke]++ # thanks!
timotimo grondilu: needs a newer moarVM
jnthn did bump MOAR_REVISION and NQP_REVISION...hopefully correctly :)
moritz jnthn: might've been just a rebuild without running Configure.pl 12:29
jnthn aye :) 12:30
timotimo it's a very easy mistake to make 12:32
12:32 sufrostico joined
moritz jnthn: github.com/perl6/nqp/commit/a19dab...5543fd8888 do you think that's the right direction? 12:34
I guess src/QAST/Block.nqp my $cuid_suffix := ~nqp::time_n(); wants similar treatment 12:35
dalek p/stable-sc: a19dab8 | moritz++ | / (3 files):
Build stage2 with the --stable-sc option

also extend --stable-sc to accept an identifier which is to be part of the SC hash
Can only make stage 1 stable after a bootstrap, I fear
12:35 lea left 12:36 lea joined
dalek p/stable-sc: c0c31bf | moritz++ | src/QAST/Block.nqp:
Avoid use of nqp::time_n() if --stable-sc was provided
12:37
timotimo i'm liking the way this branch goes
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:38
timotimo "remove"? 12:39
i hope you mean "rebuild" :)
grondilu ran 'rm $(which moar)' before running Configure.pl again
moritz Code ref 'BUILD' does not exist in serialization context
EEKS
lizmat hmm. that sounds familiar 12:40
moritz that's after bootstrapping
12:40 rurban left
moritz (in the stable-sc branch, and with --stable-sc=s0) 12:40
after bootstrapping, and without --stable-sc=s0, all is fine 12:41
where "all" = all(build, tests)
grondilu ah some other ugly errors
src/6model/reprs/MVMIter.c: In function ‘MVM_iter’:
src/6model/reprs/MVMIter.c:304:1: error: unrecognizable insn:
(insn 577 576 578 45 (set (reg:SI 2 r2)
(sign_extend:SI (mem/s:QI (plus:SI (mult:SI (reg/v:SI 187 [ idx ])
(const_int 8 [0x8]))
(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
grondilu (nil)) 12:41
12:42 rurban joined
jnthn grondilu: It...caused an internal error in your *C* compiler?! 12:42
grondilu sthe hell if I know 12:43
jnthn It's what it looks like
[ptc] it sure looks that way. Which compiler is it? (just curious)
grondilu I'm removing my nqp dir and start again
moritz rofls
grondilu gcc (Debian 4.6.3-14+rpi1) 4.6.3 12:44
jnthn
.oO( When will gcc be production ready? :) )
[ptc] in 15 years ;-)
timotimo what the .... %)
grondilu that's arguably a pretty old version 12:45
timotimo yeah, but still ...
masak apparently, gcc is implemented using Lisp :P 12:46
moritz masak: in its own Lisp dialect, of course
timotimo not guile, eh?
well, that's a scheme, right?
moritz GCLisp 12:47
timotimo: I'm just kidding, I have no idea
timotimo heh
jnthn Well, Greenspun's Tenth Rule... :)
timotimo when can gcc read mail?
actually ... when can rakudo read mail? 12:48
[Coke] m: open fail
camelia ( no output )
moritz timotimo: port Email::MIME to Perl 6! :-)
[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!
Actually....I remember having demonstrated reading my email with Perl 6 a year ago ;)
FROGGS nine: bah! don't stop the movement! /o/ 12:52
masak nine: "Don't port, use!" is a nice slogan
though, it's also a nice point that this is not an either-or situation...
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.
moritz [Coke]: "lib" for code.
[Coke]: for the docs... dunno. 'src' or 'doc' (singular please)
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
gfldex m: 'mbox'.IO.lines()>>.say # timotimo there you go
camelia rakudo-moar 6f65c3: OUTPUT«From [email@hidden.address] Thu Oct 23 11:00:01 2014␤Return-Path: [email@hidden.address] camelia␤Delivered-To: [email@hidden.address] by ns1.niner.name (Postfix, from userid 1012)␤ id 6BFCBC0041; Thu, 23 Oct 2014 11:00…»
pink_mist imo
timotimo gfldex: wow, perl6 is miraculous!
however
>>.say will give you the lines in a semi-random order :)
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 :)
moritz you don't read it "really fast", with the good old "rm -rf *" command?
"read mails, really fast"
gfldex I read every 2nd mail and assume it to be a good average 12:57
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 ast: 0f71d26 | lizmat++ | S06-operator-overloading/sub.t:
Skip tests that makes compilation barf
kudo/nom: f931261 | lizmat++ | src/Perl6/Grammar.nqp:
Make 'use attributes' work as designed
12:59
masak "So I can go to Japan and ask for directions, but I can’t really understand the answers!" -- www.linuxvoice.com/interview-larry-wall/
TimToady: so... you're saying you speak... "write-only Japanese"? :P :P :P 13:00
masak .oO( ご注意:上記は冗談です ) 13:01
psch lizmat: that test worked fine for me when i pushed it :/ 13:02
i guess that means something i rebased over broke it again 13:04
well, except if there's something OSX-specific somewhere in there
lizmat trying to reproduce the error message 13:06
psch hm, no, nothing due to the rebase
lizmat compiling takes about 40 seconds
Guest49363 should END run before all the threads are done? leads to this happening:
m: my $fh = open('/dev/urandom'); END { $fh.close }; Thread.start({ $fh.read(2) });
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'…»
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/perl6/runtime/CORE.setting.moarvm:read:58)␤ from /tmp/v31PshSTYr:1 (<ephemeral file>::19)␤ from gen/moar…»
13:07 nerfur left
lizmat Guest49363: I think it has to do with a malformed UTF-8 error message being improperly handled 13:07
13:07 Guest49363 is now known as carlin
timotimo m: say '/dev/urandom'.IO.WHAT 13:07
camelia rakudo-moar 6f65c3: OUTPUT«(IO::Path)␤»
timotimo m: say '/dev/urandom'.IO.perl 13:08
camelia rakudo-moar 6f65c3: OUTPUT«q|/dev/urandom|.IO(:SPEC(IO::Spec::Unix))␤»
timotimo m: say '/dev/urandom'.IO.open.WHAT
camelia rakudo-moar 6f65c3: OUTPUT«(IO::Handle)␤»
timotimo m: say '/dev/urandom'.IO.open.perl
camelia rakudo-moar 6f65c3: OUTPUT«IO::Handle.new(path => q|/dev/urandom|.IO(:SPEC(IO::Spec::Unix)), ins => 0, chomp => Bool::True)␤»
lizmat psch: grrrr... now it compiles and runs ok :-(
13:08 darutoko left
timotimo the restricted setting should restrict this, too .. :S 13:08
psch lizmat: that's curious :/
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
hmmm.... so why does *parsing* S06-operator-overloading/sub.t take as long as parsing the setting, with only 516 lines ??? 13:11
FROGGS because it clones and modifies the grammar very often? 13:13
13:13 Ven joined
lizmat could that maybe explain why the setting compilation got slower? that we're modifying the grammar again, when we shouldn' t? 13:14
brrt seems like a reasonable explanation 13:15
FROGGS it's possible... you can test it by adding several pre/post/infixes and see what happens 13:16
lizmat maybe putting a say in the grammar cloning logic would be handier ? 13:17
jnthn lizmat: I checked that a few days ago; we were in one place, and I fixed it 13:18
lizmat: That's where we got our startup time improvement back from :)
lizmat aha!
ok :-)
dalek ast: f9d8b9a | lizmat++ | S06-operator-overloading/sub.t:
Revert "Skip tests that makes compilation barf"

Seems to have been a flaky fail.
13:19
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
jnthn lizmat: We could; it's catch the mistake sooner
lizmat
.oO( pardon the mangled metaphors )
jnthn: where would I do that ? 13:21
jnthn Hah, fire that canary!
lizmat: add_categorical
lizmat ok
jnthn Note that it's ok to make it into there
13:21 darutoko joined
jnthn But not OK if we make it past a certain point 13:21
(There's a bunch of return statements in there)
lizmat ok, will look
# Mix an appropraite role into the grammar for parsing the new op. # jnthn ? 13:22
jnthn aye 13:23
lizmat or at # This also becomes the current MAIN. Also place it in %?LANG. ?
13:24 ely-se left 13:25 skids joined
jnthn lizmat: I'd stick it here: github.com/rakudo/rakudo/blob/nom/....nqp#L4471 13:25
lizmat oki
13:26 lolisa left 13:27 biff_ joined 13:29 biff_ left 13:30 n0xff left 13:32 aborazmeh joined, aborazmeh left, aborazmeh joined
psch RT #125689 is interesting 13:32
m: class X is nosuchtrait { }
camelia ( no output )
timotimo .o( synopsebot ;_; )
lizmat hmmm.. another hang in S17-supply/syntax.t :-(
psch that passes because the symbol lookup for X::Inheritance::NoParent looks for Inheritance::NoParent instead 13:33
dalek kudo/nom: b9c7b4f | lizmat++ | src/Perl6/Grammar.nqp:
Add canary to signal grammar changing in setting
psch but that lookup is in a CATCH
if i change the find_symbol call to have :setting-only i get an infinite loop 13:34
13:34 brrt left
timotimo bwahaha, calling your classes X 13:34
13:34 Gruber is now known as Grrrr
timotimo always a very bad idea 13:34
psch github.com/rakudo/rakudo/blob/nom/....nqp#L2743
is the CATCH in question 13:35
adding an CATCH { } seems to fix that, but feels somewhat band-aidy
FROGGS lizmat: I am surprised you can compile the setting with your patch
lizmat it was suggested by jnthn :-) but why ?
m: use attributes :D; class A { has Int $.a }
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 Hor|zon_ left
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 ?
jnthn FROGGS: But we already have those in the grammar
lizmat I mean, that's the whole idea, no ?
jnthn FROGGS: So we never make it as far as where lizmat's sticking the check
jnthn stuck a nqp::say in such a place recently, fixed one thing, and didn't reach it, fwiw 13:37
13:37 ely-se joined
FROGGS so what about these? 13:37
rakudo/src/core/Stringy.pm:14:proto sub infix:<~>(|) is pure { * }
13:37 chrstphrhrt joined
jnthn FROGGS: ~ is already in the grammar, so we don't have to generate it 13:37
13:41 n0tjack joined
FROGGS ahh, understood 13:41
13:43 khw joined 13:44 lllllll joined 13:45 Jaglor joined, lllllll left 13:48 synbot6 joined 13:50 Hor|zon joined, Ven left 13:51 Ven joined
[ptc] gdmf 13:53
lizmat [ptc]: bless you
[ptc] gdmf 13:54
lizmat
.oO( has [ptc] keyboard been hijacked ? )
13:58
14:00 thou joined 14:02 aborazmeh left 14:03 darutoko left, llfourn left 14:07 AlexDaniel left
n0tjack how come I can say "constant $X=10" but not "constant Int $X=10"? 14:08
m: constant Real $pi=3;
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;␤»
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?
m: constant PI=3;
camelia ( no output )
timotimo aye, that'? the normal way to spell 'em 14:10
that's*
m: constant Int foobar = 5
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
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␤␤»
timotimo i think it parses "Int" as the name of the identifier and then complains it can't find a =
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
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
n0tjack m: constant SEVEN=8; say SEVEN.WHAT;
camelia rakudo-moar b9c7b4: OUTPUT«(Int)␤»
n0tjack m: constant SEVEN=0.8; say SEVEN.WHAT;
camelia rakudo-moar b9c7b4: OUTPUT«(Rat)␤»
psch e.g. "constant $x" doesn't get a container, but the container would do the type check
timotimo PerlJam: i don't understand your problem with that
PerlJam timotimo: An unsuspecting programmer will ask "What parameter $a? I don't have an $a in my code!" 14:12
timotimo oh
ah, yeah
now i see
14:12 andreoss left
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)␤»
psch without the $ there's no interpolation from << >>
timotimo there'd be { } right?
ely-se psch: is that possible are you kidding me
psch ely-se: what's the problem? $circumfix is known at compile time 14:14
dalek ast: 1152761 | lizmat++ | S12-attributes/smiley.t:
Unfudge now passing test
ely-se Context-sensitive grammar: Perl edition. 14:15
PerlJam Perl is powerful. Get used to it :)
psch ely-se: i'm pretty sure perl 6 has longer lengths of rope to hang your foot with
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␤»
PerlJam bummer 14:17
14:17 Ven left
psch m: constant blah = "@, µ"; say << {blah} >> 14:17
camelia rakudo-moar b9c7b4: OUTPUT«(@, µ)␤»
psch PerlJam: i guess that means that should work as well...
ely-se If I were Emacs and someone would tell me to load perl6-mode, I'd import Carp and call croak.
psch PerlJam: fwiw, the previous bit started working a few hours ago... :)
timotimo ely-se: i appreciate you're a person and not just a program
you are a person, though ... right? 14:18
14:18 darutoko joined, darutoko left, darutoko joined
timotimo i mean, i wouldn't be mad or anything 14:18
ely-se No, I'm camelia. 14:19
timotimo no, I'm camelia!
ely-se I'm you.
timotimo le gasp 14:20
dalek kudo/nom: 08d854c | peschwa++ | src/Perl6/World.nqp:
Fix RT #125689.

For some reason the lookup with $*W.find_symbol in apply_trait doesn't look for X::Inheritance::UnknownParent but Inheritance::UnknownParent in 'class X is nosuchtrait { }', presumably because it happens 'inside' package X. Changing the lookup to only look inside the setting loops infinitely when compiling the setting. The empty (but commented) CATCH prevents this.
14:21
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=125689
skids You're me?!? Then who's batman?
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 14:25 rurban left
masak skids: isn't it weird that no-one has ever seen you and Batman in the same room? 14:26
skids Very weird.
psch hmm, the circumfix:<<{blah}>> case has a WVal(Block) innermost 14:27
which again brings me to "which WVals are allowed"
oh, but allowing Block there can't be right, can it 14:28
'cause we can't guarantee that it's a Block with a use{ful,able} compile time value
PerlJam if it gets treated like a BEGIN perhaps 14:29
14:29 ely-se left
psch .oO( sub infix:<< { 'x' x rand * 10 } >> ) 14:29
eh, ^10 . pick probably :) 14:30
PerlJam DIHWIDT
psch PerlJam: afaiu, everything there gets BEGIN treatment, as in evaluated as compile time 14:31
(that's to mean "World.compile_time_evaluate is most of what BEGIN means, isn't it?") 14:32
14:32 RabidGravy left
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
m: sub infix:[/./]($, $) { } # like this one for example 14:33
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, KotH joined 14:35 telex left 14:36 mfollett left, csd_ joined, telex joined, breinbaas joined
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]␤»
timotimo m: my @a=(1,2,3,4); my $b=0; say flat $b,@a;
n0tjack m: my @a=(1,2,3,4); my $b=0; say $b ~ @a; # this is string cat
camelia rakudo-moar b9c7b4: OUTPUT«(0 1 2 3 4)␤»
rakudo-moar b9c7b4: OUTPUT«01 2 3 4␤»
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;
camelia rakudo-moar b9c7b4: OUTPUT«01234␤»
timotimo that's because it's in an argument list for "say"
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:41
psch lizmat: RT #124912 says it's a bug 14:42
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=124912
psch mostly 'cause it's on RT, though
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
psch i guess the comments in S02-names/strict.t were there first
jnthn lizmat: We carry over the current language braid, for example
lizmat and %*PRAGMAS is not a part of that yet, right ?
jnthn m: sub infix:<beer>($a, $b) { "glug" }; EVAL 'say 1 beer 2' 14:44
camelia rakudo-moar b9c7b4: OUTPUT«glug␤»
jnthn lizmat: Aye
lizmat it would be just to set up a new clone, rather than initializing, right ? 14:45
14:46 pierrot left
jnthn You could maybe stash the clone in a %?PRAGMAS like we do with %?LANG 14:46
lizmat ah, ok... will look into that
PerlJam How would you write that EVAL such that infix:<beer> *wasn't* carried over?
lizmat PerlJam: I know a way, but I don't think that's supposed to be exposed... 14:47
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␤ …»
psch now wonders if lizmat has a different way
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 domidumont left
psch heh 14:50
i guess that depends on whether Perl 6 stops being Perl 6 when you add an operator
moritz it stops being The Perl 6 and becomes A Perl 6 14:51
14:52 domidumont joined
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:52
(though I guess that doesn't make enough sense given multiple settings) 14:53
14:54 ely-se joined, domidumont left, larion left 14:55 domidumont joined
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␤␤»
dalek kudo-star-daily: 09e7b94 | coke++ | log/ (9 files):
today (automated commit)
rl6-roast-data: dd4e506 | coke++ | / (9 files):
today (automated commit)
rl6-roast-data: 0feddd3 | coke++ | / (9 files):
today (automated commit)
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␤␤»
jnthn m: sub foo (Int $a, Int @b) { }; say foo(12, my Int @ = 1 xx 10);
camelia rakudo-moar 08d854: OUTPUT«Nil␤»
jnthn Like that
n0tjack freaky
thanks
jnthn If you demand an Int array in the receiver, then you have to provide one
n0tjack I thought I did
is 1 xx 10 not an Int array?
it's an array and each element is an Int
jnthn No, it's not
PerlJam It's not typed enough
skids No just a list that happens to contain them. 14:58
n0tjack your face isn't typed enough1
jnthn And Int array is an Array that is *explicitly* declared as containing Ints
n0tjack interesting
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
n0tjack in practice, do people use explicit typing?
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.
Less so on arrays, though. 15:01
PerlJam unless you're coming from a Pascal/Modula/etc. background ;)
ely-se type systems are invaluable automatic bug detectors
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.
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.
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?
PerlJam multi method dispatch
[Coke] S99:MMD? 15:04
synbot6 Link: design.perl6.org/S99.html#MMD
ely-se ooh
15:05 Guizmofr38 joined
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
[Coke] ely-se: "wy not both?" 15:06
jnthn ely-se: Write a compiler for a spongebob-inspired language
ely-se [Coke]: excellent!
jnthn: SpongeScript
the language in which you can make fire under water. kinda like how covariance works in Dart 15:07
15:07 Loren left
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 diana_olhovik left
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␤␤»
PerlJam A pity you can't say @[Int](...) as a short-hand
jnthn Hmm, mebbe that should follow the single arg rule :)
m: @[Int](1,2,3)
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␤␤»
jnthn ah, yeah, it means that... :) 15:09
lizmat wasn't this supposed to work? Int:[1,2,3,4]
jnthn lizmat: I think it was only ever handwaved about, not really decided as a good solution
lizmat ah, ok
ely-se new Int[] {1, 2, 3, 4} :P 15:10
PerlJam [1,2,3]:of<Int> :) 15:11
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:13 Guizmofr38 left
n0tjack Is there a cute way to write $v /= 10 but with an implicit floor? 15:14
I mean of course I can write $v = floor $v / 10 but I'm trying to set my foot up for a good shooting
jnthn $v div= 10 15:15
15:15 pippo joined
skids m: my $v = 42; $v div= 10; $v.say; 15:15
camelia rakudo-moar 08d854: OUTPUT«4␤»
jnthn
.oO( a floorless solution... )
n0tjack oh nice
thou I've got a bug that I haven't managed to golf down yet: pastee.org/qc3ns
n0tjack I haven't gotten one "no" yet. I coudl get used to p6. 15:16
PerlJam careful of what type $v is though ...
m: my $v = 1234.1; $v div= 10; say $v;
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 ely-se left
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
n0tjack The result of my gather for @a is an array, but the result of reverse gather for @a is an arrayref 15:18
'sup with that?
dalek kudo/nom: f91d8ee | peschwa++ | src/Perl6/World.nqp:
Another bit for nibble_to_str.

As PerlJam++ noticed, 'circumfix<< {some-constant} >>' should probably work.
thou Not sure if it's just happening to me or if others have seen it
dalek ast: 9c89e3f | peschwa++ | S06-operator-overloading/sub.t:
Test another way of adding an operator.
15:19 pippo left 15:20 pippo joined
psch oh err 15:21
i done a thinko there a bit earlier, i realize...
15:24 Ven left
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, xfix joined
psch thou: the reverse consumes the Seq 15:24
thou n0tjack: ^
psch oh 15:25
yeah
thou thanks, psch
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 tokuhirom left
PerlJam n0tjack: what made you think you got an "arrayref"? What do you think an arrayref is? 15:26
thou n0tjack: I think the currently best explanation for Seq, etc., is design.perl6.org/S07.html#Sequences_vs._Lists 15:27
|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]
thou: thanks
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
PerlJam: when I added "flat" before the "reverse", I got the (4 3 2 1) I was expecting
PerlJam |Tux|: the latter
|Tux| thnx 15:31
PerlJam n0tjack: gotcha.
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:…»
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;
camelia rakudo-moar 08d854: OUTPUT«(2 3 4 5)␤»
n0tjack sub foo(Int @a){ reverse gather for @a {take 1+$_;} }; my Int @v = (1,2,3,4); say foo @v; 15:37
m: sub foo(Int @a){ reverse gather for @a {take 1+$_;} }; my Int @v = (1,2,3,4); say foo @v;
camelia rakudo-moar 08d854: OUTPUT«(5 4 3 2)␤»
n0tjack that's different from what I'm seeing.
15:38 FROGGS left, pmurias left, virtualsue joined 15:39 zakharyas left
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
15:42 Screed joined
masak not sure exactly what you mean 15:42
n0tjack well, I'm imagining some syntax like map foo(...,27), @values; 15:43
moritz somthing like map &foo.assuming( 1 => 27 ), @values
n0tjack 1 is the position of the parameter, zero-indexed? 15:44
moritz I don't actually know if it works like that
I know there's a method named assuming
and that it curries
n0tjack yes; that's the kind of thing I'm reaching for. 15:45
psch m: &say.assuming( *, "bar" )("foo")
camelia rakudo-moar 08d854: OUTPUT«foobar␤»
moritz m: sub f($a, $b) { "$a|$b" }; say f.assuming(*, 4)(5)
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)␤»
moritz m: sub f($a, $b) { "$a|$b" }; say &f.assuming(*, 4)(5)
camelia rakudo-moar 08d854: OUTPUT«5|4␤»
moritz ah, that's how it works
n0tjack nice! 15:46
moritz a * is a hole in the list of primed parameters
masak yet another possible meaning of Whatever ;) 15:47
"don't prime this positional parameter" :)
n0tjack yeah, * is killer.
masak ab5tract_: ^^
masak .oO( * is kilter ) 15:48
15:50 nakajima left 15:52 stewa02 joined, Ven left 15:56 stewa02 left 15:57 z448 joined
dalek Heuristic branch merge: pushed 49 commits to rakudo/curli by lizmat 15:57
16:00 z448 left, Peter_R joined 16:02 rurban joined 16:03 FireFly left 16:04 Ven joined, lea left, FireFly joined 16:07 thowe left 16:08 pippo left 16:10 npsuc joined, domidumont left
[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«(() ())␤»
[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>);
camelia rakudo-moar f91d8e: OUTPUT«(() ())␤»
[ptc] the first example should return ["a", "b"] and the second example should return ["ab"] 16:16
thou OK, I did golf that bug down. rt.perl.org/Ticket/Display.html?id=126302 16:17
16:17 Screed left
[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:17
any ideas anyone? 16:18
16:21 lea joined
dalek ast: 78bb330 | lizmat++ | S02-types/WHICH.t:
Add some missing exception classes
16:23
16:24 espadrine left 16:26 tokuhirom joined
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'?␤␤»
carlin is it expected that require in END does nothing?
jnthn carlin: require is runtime 16:30
carlin: And things need to be imported at compile time
16:31 tokuhirom left, npsuc left
ilmari m: END { require Test; Test::ok(1) } 16:31
camelia rakudo-moar f91d8e: OUTPUT«===SORRY!===␤Could not find symbol '&ok'␤»
lizmat www.quora.com/Perl-programming-lan...body-care/ # was this mentioned here already ?
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) }␤»
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:33
16:33 laouji left 16:34 laouji joined
jnthn m: END { use Test; ok 1; } 16:34
camelia rakudo-moar f91d8e: OUTPUT«ok 1 - ␤»
jnthn lizmat: Don't think so. :) 16:36
16:36 ^elyse^ joined 16:37 virtualsue left
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:37
16:37 n0tjack left
timotimo what is that in reference to, jnthn? 16:38
16:38 z448 joined
jnthn timotimo: It was a pun on the quora question lizmat linked 16:38
timotimo ah, that one 16:39
16:39 RabidGravy joined
^elyse^ I prefer to reduce questions to: 16:40
.oO ( Why? )
16:41 n0tjack joined, z448 left
timotimo elyse has grown wings! 16:44
16:45 dakkar left 16:46 rcy left, chrstphrhrt left 16:48 AlexDaniel joined 16:50 Kogurr joined
^elyse^ horns, and y has a tail :P 16:50
16:52 Ven left
timotimo ah 16:52
\m/ and all that 16:53
dalek kudo/nom: adca54e | peschwa++ | src/Perl6/World.nqp:
Fix a thinko in constant handling for circumfix declarations.

With this we can have interpolated compile time constants in << >> for circumfixes that have more than one character as delimiters, e.g.
  'constant $x = "µµ, @@"; sub circumfix:<<$x>> { ... }'.
ast: f1424a5 | peschwa++ | S06-operator-overloading/sub.t:
Add another test for constants and circumfix.
16:54
ast: 7ae2e35 | lizmat++ | S02-types/WHICH.t:
Add some more missing classes
16:55
16:57 yqt joined 16:58 firstdayonthejob joined, llfourn joined
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:01
(note there's no comma in my constant $x) 17:02
17:03 llfourn left
psch PerlJam: ooh, right! the constants i've been using have been wrong, yes 17:04
17:04 laouji left
psch that also makes also this icky whitespace juggling unneccessary, which i like 17:05
PerlJam yep.
(the whitespace juggling is why I finally noticed it :)
17:05 laouji joined
psch s:2nd/also/all/ # o.o 17:07
17:10 laouji left, FROGGS[mobile] joined
FROGGS[mobile] o/ 17:11
dalek kudo/nom: da99978 | peschwa++ | src/Perl6/World.nqp:
Another thinko corrected.

As PerlJam++ noted, circumfix:<< >> declarations don't have commas.
kudo/nom: 0a39e0b | lizmat++ | src/Perl6/World.nqp:
Make sure we mention the implicit smiley
17:12
ast: d3b8702 | peschwa++ | S06-operator-overloading/sub.t:
Correct circumfix:<< >> tests.
psch o/ FROGGS[mobile]
lizmat FROGGS[mobile] \o
psch FROGGS[mobile]: i've had another look at the curious case of the wrong SC on jvm recently 17:13
FROGGS[mobile]: the only new thing i saw was that the rhs was from BOOTSTRAP.nqp, while the lhs was from CORE
at least i think it was that way around...
i might look at that again tomorrow, but i'm done for today o/ 17:15
17:18 sftp left 17:21 laouji joined 17:22 leont joined 17:25 concerned joined
concerned is perl6 faster than perl5 17:25
17:26 laouji left
timotimo only sometimes 17:26
but perl6 has better concurrency than perl5
so you can more easily scale with the number of cores you have
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
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
camelia rakudo-moar adca54: OUTPUT«A.new(a => 42)␤»
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?
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:…»
timotimo lizmat: i see your point and i'm +1
PerlJam concerned: do you use Moose in Perl 5?
concerned PerlJam, never used it, I use POE a lot thoug
though*
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
PerlJam concerned: with Inline::Perl5, you can use many P5 modules in P6.
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?
camelia rakudo-moar adca54: OUTPUT«A.new(a => 42)␤»
concerned omg there's an inline perl for perl lol
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
FROGGS[mobile] lizmat: see the p6c list, I said something about that case
lizmat looks
timotimo you can make subclasses of perl5 classes with perl6 code and subclass perl6 classes with perl5 classes
jonadab Inline::Perl5, that could be rather useful. I must investigate this.
timotimo yes, it's very good
PerlJam timotimo: I didn't have much success using PDL in P6 with Inline::Perl5 ;)
timotimo oh :(
FROGGS[mobile] psch: nine also said that Bool has two .WHICHes... one from BOOTSTRAP, one from the setting 17:30
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...
n0tjack *defaulting
nine FROGGS[mobile]: indeed, that's where I'm stuck currently
perl6 -e 'say (Bool.WHERE, Bool.^mro[0].WHERE, Bool::True.WHERE, Bool::False.WHERE);'
(66994184 47994512 47838216 47838272)
timotimo n0tjack: just Bool $foo = False
17:32 yqt left
nine FROGGS[mobile]: note who the address for Bool.WHERE is very much different from the others 17:32
s/who/how 17:33
lizmat FROGGS[mobile]: ok, fair enough...
FROGGS[mobile] lizmat: and requiring a defined value is not equal to requiring *some* value at instantiation time
n0tjack timotimo: Yep, that's what I'm using. I only asked because I had a vague recollection there was some sugar
lizmat jnthn: wouldn't this need to be handled at C-level properly, in the typecheck logic, to make it real first class citizen ?
timotimo there's sugar for passing a named parameter that's set to False
it's :!Foo
m: say (:!Foo) 17:34
camelia rakudo-moar adca54: OUTPUT«Foo => False␤»
n0tjack ah! that was it.
so the sugar is for passing, not declaring
timotimo pair syntax in parameter lists allows you to have a name for callers and a different name for the variable in your scope
lizmat m: my $a = :!foo; dd $a # also for declaring
camelia rakudo-moar adca54: OUTPUT«Pair $a = :!foo␤»
timotimo right, it's a shorthand for every place that accepts pairs 17:35
including a literal Pair object
lizmat m: my Int $a = :!foo
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
n0tjack that's gonna come in handy. 17:36
timotimo yeah
and here's the funnest syntax of all:
m: my $thing = :42skidoo; say $thing.perl
camelia rakudo-moar adca54: OUTPUT«:skidoo(42)␤»
moritz finds :$variable most useful 17:37
lizmat m: my $times = :10times
camelia ( no output )
lizmat m: my $times = :10times; dd $times
camelia rakudo-moar adca54: OUTPUT«Pair $times = :times(10)␤»
timotimo oh, yes, :$variable is definitely awesome
lizmat in a way, it's like breaking the 4th wall
timotimo wir sind das folk! die mauer muss weg!
17:37 NoRefill joined
lizmat ehh... not quite that wall :-) 17:38
psch FROGGS[mobile]: doesn't that mean that there's something wonky with the deserialization fixup? 17:39
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
FROGGS psch: I guess that's not unlikely 17:43
17:44 NoRefill left, rurban left 17:50 wollmers joined 17:51 yqt joined
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
wollmers p6: say 42.WHAT;
camelia rakudo-moar adca54: OUTPUT«(Int)␤»
b2gills s/it/it is/
p6: say 42.WHY 17:52
camelia rakudo-moar adca54: OUTPUT«(Any)␤»
FROGGS psch: is there some sample code that highlights the problem?
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?
psch keep in mind that's (apparently) jvm specific
17:53 FROGGS[mobile] left
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.
FROGGS there are differences... as we still have prior invocation on jvm where it went away on moar
psch ah, i remember arnsholt complaining about prior invocation quite some time ago... :) 17:55
FROGGS aye 17:58
17:58 alpha123 joined
FROGGS I lack brain power to rip it out :o( 17:58
ohh awesome, htmlify got fixed! \o/ 17:59
[Coke]++
n0tjack I thought $0 was $*EXECUTABLE_NAME now, but p6 says I'm wrong 18:00
what is my script called now?
lizmat m: dd $*EXECUTABLE
camelia rakudo-moar 0a39e0: OUTPUT«q|./rakudo-inst/bin/perl6-m|.IO(:SPEC(IO::Spec::Unix))␤»
lizmat m: dd $*PROGRAM 18:01
camelia rakudo-moar 0a39e0: OUTPUT«q|/tmp/zS_8XXPalF|.IO(:SPEC(IO::Spec::Unix))␤»
lizmat m: dd $*PROGRAM.name
camelia rakudo-moar 0a39e0: OUTPUT«Method 'name' not found for invocant of class 'IO::Path'␤ in block <unit> at /tmp/i0uKclUzQb:1␤␤»
lizmat m: dd $*PROGRAM-NAME
camelia rakudo-moar 0a39e0: OUTPUT«"/tmp/Dta7U2aN5U"␤»
n0tjack there we go
lizmat m: dd ~$*PROGRAM
camelia rakudo-moar 0a39e0: OUTPUT«"/tmp/NoqILSCaX4"␤»
[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
also FROGGS
18:02 thou left, spider-mario left
masak psch: you mean "priori invocatem" :P 18:02
psch masak: only if that's what FROGGS means :) 18:03
[Coke] .seen dha 18:04
yoleaux I saw dha 7 Oct 2015 21:53Z in #perl6: <dha> What did I do now? :-)
[Coke] wonders if we can get yoleaux to say "... hours ago" instead of a zulu time.
.time 18:05
masak breaking the fourth wall is an art, just like many other things
TimToady wonders which of us is the fourth one
masak :)
TimToady wonders if we should rewrite yoleaux in Perl 6
[Coke] .t
yoleaux Thu, 08 Oct 2015 18:05:42 UTC
[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
dha,moritz,FROGGS: impatient. pushing.
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
dalek c: f9d2442 | coke++ | t/pod-convenience.t:
first-code-block now always returns the 1st block.

Before it returned the second because it was only checking 2nd position.
c: 0f38cf1 | coke++ | Makefile:
Add target to run web server
c: 8249119 | coke++ | / (512 files):
Move all docs to doc
ambs E_NOTIME affects all of us
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
masak TimToady: I notice you're in a wonder-ful mood today ;) 18:08
FROGGS [Coke]: I have no opinion on this :o)
n0tjack can I shoot myself in the foot with a phaser, here?
ambs n0tjack: you can always call a common function that does the stuff
n0tjack ambs: sure, but I like the multi MAIN thing
masak n0tjack: Perl 6 gives you enough rope to shoot yourself in the foot -- so yes :)
ambs hands a phaser to n0tjack.
n0tjack masak: hey, no changing my puns.
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
changing*
psch n0tjack: you can overwrite the CORE MAIN proto 18:10
n0tjack for context, here's what I'm trying to do
gist.github.com/anonymous/948a39efd73275266fa1
El_Che for whoever worked on the Nativecall stuff: wow!
psch as in 'proto MAIN(|) { {*}; say "did any of the MAINs" }'
18:10 pfhork joined
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
which seems unperly
18:11 apotheon left
n0tjack psch: can I get the result of the invoked MAIN in order to print it? 18:11
psch n0tjack: yeah 18:12
n0tjack: you can assign the {*} to a variable in the proto
n0tjack psch: neat!
psch as in 'proto MAIN(|) { my $result = {*}; say $result }'
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
n0tjack that's printing a spurious "true" after my result 18:14
18:14 dha joined
pink_mist can't you wrapper here too? 18:14
*+use a
dha Anyone know what %twiddles is in the signature for Mu.clone? ("method clone(*%twiddles)") 18:15
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␤␤»
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.
dha Is it just general arguments? If so, why "twiddles"?
lizmat m: my $a = foo => my $ = 666; my $b = $a.clone(value => 42); dd $a, $b
camelia rakudo-moar 0a39e0: OUTPUT«Pair $a = :foo(666)␤Pair $b = :foo(42)␤»
pink_mist [Coke]: speak of the devil =) dha came in =)
dha eh?
lizmat dha: it's the attributes you want twiddled
18:16 antiatom joined
pink_mist dha: might want to check the channel log =) 18:16
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/
alpha123 psch: is there anything similar to common lisp's defun :around/:before/:after stuff?
dha Ah. Ok, now it makes sense.
[Coke] apologies for any churn this causes you.
dha Ah.
minimal at this point. glad for the heads up. thanks.
psch alpha123: i don't know any lisp beyond what s-expressions are :)
n0tjack ah, I get it, one of my MAIN()s is calling another, so it's printing the result of both!
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
PerlJam alpha123: you can call &thing.wrap()
psch n0tjack: because that's what the proto wrap does
moritz n0tjack: I hope you're aware that you can name your functions other than MAIN in Perl 6 :-)
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: design.perl6.org/S06.html#Wrapping
jnthn lizmat: But we'd still need special handling at object build time even with that...
alpha123 pink_mist: Thanks, that seems a little cleaner than overriding the proto.
dalek c/usage_statements: 4055f38 | (Ronald Schmidt)++ | lib/Type/Cool.pod:
Update Cool.pod

Add Match to list of descendants of Cool
18:19 dalek left
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.
jnthn (On a :D-constrained thing) 18:20
lizmat yeah, ok, clear
18:20 dalek joined, ChanServ sets mode: +v dalek
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
pink_mist yes it is :D
jnthn nine: No, I'd have to go digging some to figure it ut. 18:21
nine: Though .WHERE is not really reliable
PerlJam n0tjack: seems like a low-wattage feature to me.
nine jnthn: how so?
18:21 FROGGS[mobile] joined
PerlJam n0tjack: though, I have wished for something similar with grammars. 18:21
jnthn nine: Objects move
PerlJam (not since we got a debugger though :)
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
and that's a cool feature
psch n0tjack: your problem comes from cross-calling of MAINs
moritz n0tjack: there are lots of ways to share code with MAIN
PerlJam n0tjack: "no way"? There's the standard ways of sharing code.
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.
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)
psch n0tjack: actually, the lack-of-usefulness of proto MAIN comes from there...
PerlJam n0tjack: just listen to moritz
nine jnthn: ^^^ I wonder why Bool's objectid is so different from the other 3
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?
jnthn nine: Yes, that's...interesting
moritz n0tjack: URL?
n0tjack gist.github.com/anonymous/948a39efd73275266fa1
jnthn nine: Given you'd expected all of them to be deserialized from BOOTSTRAP
nine jnthn: may be a hint?
yes
jnthn nine: You do all of the setup work for Bool/True/False inside of the BEGIN block in BOOTSTRAP, yes? 18:25
18:25 vendethiel joined
nine jnthn: yes 18:25
jnthn OK, so it's not that we're re-running it...
moritz n0tjack: uhm, WTF? calling MAIN from USAGE?
n0tjack moritz: no I'm not 18:26
18:26 thou joined
moritz say MAIN :60[10,12,34]; # 10,12,34 18:26
n0tjack moritz: oh, nevermind that, that's an editing artifact
moritz that's a call to MAIN
n0tjack moritz: USAGE is supposed to jsut print usage, I was debugging something for htose lines
nine jnthn: the only parts outside that block are the declaration of the stub Bool and the methods implemented in Bool.pm
jnthn *nod*
TimToady & the Mrs -> SFO -> DEN -> PIT 18:27
afk &
FROGGS[mobile] what a PITty
masak I see TimToady is now using curried Haskell function type syntax for travel routes :P
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
dalek kudo/nom: c1e9ede | lizmat++ | src/Perl6/World.nqp:
Use variable if we have it anyway
kudo/nom: 94d4570 | lizmat++ | src/Perl6/ (2 files):
Make 'use variable :D' work
masak .oO( "oh, TimToady, we decided to draft up and release Perl 7 while you were in transit" ) 18:29
lizmat *variables :-(
moritz n0tjack: sorry, I have trouble understanding your code
18:29 Hor|zon left
moritz n0tjack: this feels like golf, not like code I'd write 18:29
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
n0tjack moritz: the point was to learn as many of the new features in as little time as I coudl manage
moritz: doesn't the logic depend on array-ness?
18:32 antiatom left
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 )
FROGGS lizmat: we wont
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
lizmat :-)
18:34 antiatom joined, antiatom left
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:34
moritz n0tjack: no, just explicitly loop over it 18:36
18:36 andreoss` left, antiatom joined
moritz sub MAIN(*@values, :@radix) { @radix ||= DEFAULT_RADIX xx *; for @values -> $v { say do_your_calculation_here($v, :@radix) } 18:37
and make sure that the calculation aborts when the vaue is zero, then the lazy/infinite @radix doesn't hurt
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 :)
grondilu bites his nails as he's upgrading his RaspberryPi OS for the first time 18:38
n0tjack moritz: thanks, that helps a lot.
grondilu (hopefully he'll have a more recent gcc so he can compile MoarVM again)
moritz n0tjack: you're welcome 18:39
lizmat jnthn: would an extra attribute to Perl6::Metamodel::ContainerDescriptor be a start ?
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
lizmat ok
jnthn lizmat: It has to be a different kind of type
It's nothing to do with containers
A container has a type
lizmat ok, so Int:D would be a real subtype of Int
jnthn Not a subtype
A...definiteness type 18:41
masak m: say Int:D ~~ Int
camelia rakudo-moar 0a39e0: OUTPUT«True␤»
jnthn Int:D.HOW.WHAT # DefiniteHOW or some such
psch dha: it just warns, doesn't it?
m: print Nil.Str; say "ok"
camelia rakudo-moar 0a39e0: OUTPUT«Use of Nil in string context in block <unit> at /tmp/Yw5cpUoUTP:1␤ok␤»
jnthn It'd smartmatch like masak showed
masak ...but not be a subtype?
jnthn Right
Well
lizmat jnthn: ok, that's above my internals foo atm
jnthn Not in the "inheritance" sense 18:42
masak of course not :)
psch m: say so Nil.^can('Str')[0]
camelia rakudo-moar 0a39e0: OUTPUT«True␤»
18:42 yqt left
jnthn Depends which definition of "subtype" you pick :) 18:42
18:42 chrstphrhrt joined
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 18:43 jrm joined
FROGGS m: say nqp::istype(Any, Mu) 18:43
camelia rakudo-moar 0a39e0: OUTPUT«1␤»
dha m: perl6 -e 'my $x = Nil.Str;say "Be", $x, "ep!";say $x.gist;'
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␤ …»
dha Should that be warning? Shouldn't $x just be the empty string? 18:44
oh. wait.
masak m: my $x = Nil.Str;say "Be", $x, "ep!";say $x.gist
camelia rakudo-moar 0a39e0: OUTPUT«Use of Nil in string context in block <unit> at /tmp/86GpNCGUTH:1␤Beep!␤␤»
timotimo m: say Nil.Hooray
camelia rakudo-moar 0a39e0: OUTPUT«Nil␤»
timotimo m: say Nil.Hooray.say
camelia rakudo-moar 0a39e0: OUTPUT«Nil␤True␤»
timotimo m: say Nil.Hooray.Str
camelia rakudo-moar 0a39e0: OUTPUT«Use of Nil in string context in block <unit> at /tmp/GuEKykXuhn:1␤␤»
dha Yeah, that.
in masak's example, why are you getting that warning? 18:45
timotimo because Nil doesn't want to be stringified
dha You do not appear to be using Nil in string context.
timotimo it's basically how Nil.Str is implemented
vendethiel Zoffix: should I just wait before you're done with your learnx issue, or should I start now?
yoleaux 5 Oct 2015 22:49Z <^elyse^> vendethiel: repzret.org/p/repzret/
^elyse^ lol
dha but it's *not* being stringified. Nil.Str says it returns the empty string.
timotimo m: my $foo = Nil.Str; say $foo.WHAT
camelia rakudo-moar 0a39e0: OUTPUT«Use of Nil in string context in block <unit> at /tmp/6yGwAdHhvg:1␤(Str)␤»
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␤""␤»
dha so $x should contain the empty string. not some kind of Nil.
timotimo right, it does return the empty string
but first it warns :)
18:46 apotheon joined
dha Oh. it's coming from the assignment, not the say. Ah. 18:47
Why do we have that method in the first place? :-)
lizmat dha: it comes from calling .Str on Nil
*not* from the assignment
timotimo it's not from the assignment
yeah 18:48
dalek c/usage_statements: e675207 | coke++ | / (4 files):
Prefer append over push?
doc/usage_statements: 99dcace | coke++ | lib/Pod/Convenience.pm6:
doc/usage_statements: Make first-code-block less picky about location
doc/usage_statements:
18:48 dalek left
dha Right. I meant the statement that does the assignment. Sorry. 18:48
18:48 dalek joined, ChanServ sets mode: +v dalek
dha (i.e. the statement that also has the Nil.Str) 18:48
timotimo k :)
lizmat m: Nil.Str
camelia rakudo-moar 0a39e0: OUTPUT«Use of Nil in string context in block <unit> at /tmp/vw4BpCykRc:1␤»
dha Is there some context in which Nil.Str is actually of any use? 18:49
18:49 spider-mario joined
[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
dha Ah.
FROGGS Nil.Str is there to tell you you did something wrong
dha Ok.
lizmat m: sub a { Nil }; say "This is a: { a }"
camelia rakudo-moar 0a39e0: OUTPUT«Use of Nil in string context in block <unit> at /tmp/PfnGWtCwWk:1␤This is a: ␤»
[Coke] but, to not crash your program.
dha My head is now wrapped around that appropriately. :-)
timotimo when did assigning nil to something stop restoring default values?
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␤»
FROGGS it doesnt
lizmat timotimo: seems to work as designed ?
18:51 wollmers left
FROGGS lizmat: btw, I think I've got a fix for #126291 18:51
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=126291
timotimo oh 18:52
i forgot we were .Str ing on that :)
lizmat FROGGS: cool!
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)
sure, if they pass :o)
lizmat they should, now
FROGGS awesome
lizmat as should any attributes tests
FROGGS sadly this does not yet: 18:54
m: my ($a, Int:D $b); say $b
camelia rakudo-moar 94d457: OUTPUT«(Int:D (with implicit :D))␤»
18:54 ZoffixWork joined
FROGGS implicit? 18:54
O.o
and it should not even compile
lizmat that's intriguing
ZoffixWork vendethiel, wait. I should be done tonight or tomorrow :)
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␤»
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␤»
lizmat FROGGS: I didn't want to say just Int:D, as that would not be shown in the code
if you specified it directly, it does show directly
FROGGS yet, it is correct there
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…»
lizmat ah, I think I see the issue...
18:57 apotheon left
lizmat the message is wrong because it assumed it would die 18:57
18:57 Hor|zon joined
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.
FROGGS m: my Int:D $a = 0; say nqp::istype(0, $a)
camelia rakudo-moar 94d457: OUTPUT«0␤»
FROGGS :o(
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…»
jnthn FROGGS: Yes, that's the reason I think this has to end up in the MOP
FROGGS :S
lizmat m: my Int:D $a = 0; say nqp::istype("", $a)
camelia rakudo-moar 94d457: OUTPUT«0␤»
jnthn FROGGS: A DefiniteHOW which implements the accepts_type method to do the check
FROGGS another can of worms :o)
FROGGS .oO( what have I started here )
jnthn m: say nqp::objectid(Attribute); say nqp::objectid(Attribute.^mro[0]) 19:00
camelia rakudo-moar 94d457: OUTPUT«60325720␤60325720␤»
jnthn nine: No MRO oddity there, though...
FROGGS: It shoudln't be too bad; look at CoercionHOW for inspiration. I'm a bit preoccupied with SpecialCasing ATM...
FROGGS .oO( Scheiße! ) 19:01
jnthn Precisely.
FROGGS :P
okay, I give my best
jnthn m: say "Scheiße!".fc
camelia rakudo-moar 94d457: OUTPUT«scheisse!␤»
jnthn m: say "Scheiße!".uc # :( 19:02
camelia rakudo-moar 94d457: OUTPUT«SCHEIßE!␤»
FROGGS :/
jnthn That's what I'm working on ATM.
masak jnthn++
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. :)
masak finally, we'll be able to SCHEISSE right... :P 19:03
FROGGS *g*
masak jnthn: thanks for the bug tip :P
lizmat
.oO( and nobody will be able to say that Perl 6 doesn't handle its shit right )
19:03 apotheon joined
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
ZoffixWork OK. Thanks :) 19:06
19:09 FROGGS[mobile] left, tony___ joined 19:11 apotheon left 19:13 csd_ left 19:15 apotheon joined 19:19 grondilu left
dha Hm. I'm probably doing this wrong. 19:19
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?
I think I'm getting confused by colons. 19:20
jnthn m: say chr(0xFB04) 19:21
camelia rakudo-moar 94d457: OUTPUT«ffl␤»
lizmat cwd => "dir".IO 19:22
FROGGS dha: $proc.spawn(:cwd</home/froggs>, :env({ FOO => 42, BAR => 111 }))
lizmat :cwd("dir".IO) # same thing
jnthn > say(nqp::uc('effluent'));
EFFLUENT
\o/
FROGGS \o/
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
dha is going to have to think and revise. 19:24
would @args be required there?
FROGGS yes
dha ok, I got that part right...
FROGGS it is the command and params to execute
dha considers giving up before things get too out of whack.
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
dha Yeah, that doesn't affect the usage statement particularly. 19:26
named optional arguments, though. Leah.
bleah, even.
FROGGS :S
dha Also trying to get a meta key to work in vim on os x. :-( 19:27
19:28 n0tjack left 19:29 n0tjack joined 19:30 biff_ joined 19:34 cognominal left, cognominal joined 19:36 laouji joined 19:39 diana_olhovik joined 19:40 laouji left 19:44 biff_ left, biff_ joined, AlexDaniel left 19:45 diana_olhovik left 19:48 biff_ left, n0tjack left, biff_ joined 19:49 n0tjack joined, Carolin joined 19:50 Carolin left, Carolin joined
geekosaur have to thwack terminal settings, it uses alt/option for extended characters by default 19:51
_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" :)
jdv79 where can i publish a blurb about perl6 and cpan that people will see - probably getting on pl6anet.org would be good
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, n0tjack left
_itz jdv79: github.com/stmuk/pl6anet.org/blob/...perlanetrc Pull Request? 19:54
I can review too
jnthn ZoffixWork: It's in MoarVM HEAD now; got another case to handle, a little more testing and revision bumps tomorrow.
ZoffixWork \o/
concerned is there an IRC server made in pure perl6?
jnthn ZoffixWork: So, "soon" :)
ZoffixWork concerned, I doubt it :) 19:55
jdv79 _itz: gist.github.com/anonymous/1ff2c7748f950a1cff93
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?
FROGGS jnthn: I think I understand what to do fwiw
ZoffixWork concerned, but there's always a place for IRC::Server here *wink* *wink*: modules.perl6.org/
jnthn FROGGS: With the serialization? 19:56
FROGGS hehe, no
jnthn FROGGS: Or the MOP?
FROGGS *nod*
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
socket servers that is
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": gist.github.com/kanatohodets/8ffb1...04c80225cc
concerned but I don't know how to identify every client
19:57 n0tjack joined
concerned oh yeah this is much better than echo server lol 19:57
so I add to an ID number for every socket... not as bad as I thought 19:58
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?
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
[Coke] as opposed to the signatures?
20:00 paulmr left, pfhork left
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:00
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
dha Please let me know if you disagree.
btyler concerned: and for even more fun, here's a multithreaded socket server gist.github.com/kanatohodets/21929...5625d1d67c
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)".
[Coke] My concern is that it's a completely different syntax to learn that isn't strict.
20:02 woolfy joined
concerned btyler, lol nice 20:02
jnthn Time for me to go rest
'night #perl6
ZoffixWork \o
woolfy \o #perl6
FROGGS gnight jnthn
hi woolfy
[Coke] if there's a return type, why should that be skipped in the usage?
dha If you have a way to make things usable for people coming to Perl 6 that would be strict, that would be great. :-)
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
So if any of you is interesting in talking, or just attending, please have a look and a read. wendyga.wordpress.com/2015/10/08/f...-speakers/
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
dha Again, you may disagree.
concerned btyler, "promise" and "supplies" are unfamiliar terms to me 20:05
20:05 darutoko left
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 ast: 22e4acc | lizmat++ | S04-declarations/smiley.t:
Add a lot of 'use variables' related testing
concerned heh, concerned
lizmat dha: return types are really only interesting from a performance point of view 20:07
they don't partake in MMD
20:07 grondilu joined
lizmat so generally, a user would be less interested in it 20:07
ZoffixWork What's MMD?
btyler concerned: this document will help: github.com/perl6/doc/blob/master/d...rrency.pod (click 'view raw')
[Coke] dha: so let's have a "how to read signatures" language page.
dha lizmat - yes.
lizmat ZoffixWork: multi-method dispatch
ZoffixWork Thanks. 20:08
btyler concerned: but a promise is just some asynchronous piece of work, with their own execution context
[Coke] S99:MMD
synbot6 Link: design.perl6.org/S99.html#MMD
[Coke] (second time today!)
FROGGS ZoffixWork: which also applies to routines
ZoffixWork nods
lizmat [Coke]: did you actually follow that link ?
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)
lizmat [Coke]: and then again ? 20:09
FROGGS lizmat: lol
dha [Coke] - I find that a barrier to adoption. YMMV.
btyler concerned: underneath promises are being served by a pool of thread workers, so they're running on different cores on your machine
[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
lizmat and you click on that...
[Coke] the point is more to tell people they can look this stuff up.
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.
lizmat ah, ok: anyway, ZoffixWork : en.wikipedia.org/wiki/Multiple_dispatch
[Coke] lizmat: so? it's as much as an answer as he got in channel.
20:11 pecastro left
[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.
[Coke] perhaps I can craft a sample that addresses it.
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
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 :)
concerned oh 20:12
btyler you see this pattern a lot in Go, for example
20:12 TEttinger joined
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.
concerned btyler, I've been porting the "chat server" script you gave me to the "cat facts" script handling method
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
dha [Coke] - pretty much anything that involves ":$whatever". It it wholly unobvious how that would work.
btyler concerned: it should, the guy who wrote it works on a windows machine
concerned oh haha
btyler and under the hood it uses libuv, which is cross platform with windows support
concerned ooh
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.
concerned well, trying to put the chat server inside of handle-socket fails
if I make 3 connections to it, it crashes
and messages aren't relayed
btyler can you share your code? I'll try to hack something up; it might well be a VM issue 20:16
20:17 pmurias joined
concerned btyler, gist.github.com/imconcerned/337a6a...5819bd1834 20:17
pmurias dha: by usage statements you mean examples of use?
20:17 Carolin left
dha And I'm wondering if I should start backing them out. 20:17
pmurias - not so much examples as... I guess, templates?
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])
[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.
pmurias dha: do you have an example of a "usage statement"?
[Coke] dha: I wouldn't back them out yet, but I wouldn't bother adding more until we get more agreement.
pmurias dha: ahh, I have see 20:19
20:19 adam321 joined
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
dha [Coke] - so noted.
n0tjack m: say log 2**16,2; sub infix:<log>($radix, $x){log $x, $radix}; say 2 log 2**16;
camelia rakudo-moar 94d457: OUTPUT«16␤16␤»
dha pmurias - although I'm using a somewhat different format now.
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.
pmurias dha: where can the docs containing usage statements be found?
dha [Coke] - as far as named arguments are concerned, I find telling them from adverbs occasionally potentially confusing.
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
20:21 laouji joined 20:22 adam321 left
[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:22
20:23 pecastro joined
dha Oh. sorry. :-( 20:23
[Coke] dha: not your fault.
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 :) gist.github.com/anonymous/1ff2c774...e1-txt-L28
Other than that. It looks good to me :)
20:23 Kogurr left
[Coke] dha: note usage formatting problem here: 20:24
doc.perl6.org/type/Cool#method_rand
not sure if that's a pod parsing problem or if we need to update the .pod there. 20:25
dha *nod*
[Coke] for now, updating the pod is quicker. not sure how many are like that.
20:25 laouji left
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
pmurias like "chars STRING" 20:28
lizmat m: say Int:U.WHAT # FROGGS : is that expected ?
camelia rakudo-moar 94d457: OUTPUT«(Int)␤»
psch i'd argue for either real examples or only signature, actually
regarding "Usage", that is
pmurias real examples have value
psch where "real examples" should mean code that actually can be copied and pasted 20:29
and runs and shows what happens
ZoffixWork +1 on real examples
psch i don't see any value in replacing sigiled variables with uppercase types
pmurias say 'mop'.chars; # 3 has value
STRING.chars just wastes screen space 20:30
psch mind, from those two i personally would prefer only signatures
lizmat m: say Int:Foo.WHAT # aaah, that explains
camelia rakudo-moar 94d457: OUTPUT«(Int)␤»
psch because being able to read signatures should come easily enough - writing subs isn't dark magic
pmurias examples are good 20:31
jdv79 ZoffixWork: thanks
_itz: i pushed a pr
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.
psch hm, maybe automagical crosslinking from every signature to the corresponding language explanation is an idea?
FROGGS lizmat: that should do the right thing the the MOP stuff is in
dha But if people don't like them, I can back it all out.
FROGGS when the*
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*
[Coke] psch: to dha's point, we can do stuff in html that we can't do in, say, nroff.
cognominal m: say 'a' ~~ / a & a /
camelia rakudo-moar 94d457: OUTPUT«Nil␤»
pmurias dha: without the signature I wouldn't be sure what the usage statements do
20:32 tokuhirom left
cognominal m: say 'a' ~~ / a & \w / 20:32
camelia rakudo-moar 94d457: OUTPUT«「a」␤»
jdv79 jdv79.blogspot.com/2015/10/perl6-and-cpan.html
psch [Coke]: oh, right, that makes sense...
pmurias
.oO(wtf is STRING?)
psch i guess that'd seal it on "real examples", at least for me
dha pmurias - It's a string. :-) 20:33
lizmat [Coke] dha so I would like to see both usage and signature
[Coke] dha: no, that's Str.
cognominal I don't get why the first match fails
jdv79 hopefully that'l be on pl6anet soon.
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 20:34 xfix left
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.
cognominal m: my &rx = / a /; say 'a' ~~ / a & &rx /
camelia rakudo-moar 94d457: OUTPUT«「a」␤»
dha lizmat - That's my thought as well, but there seems to be some disagreement.
[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.
PerlJam dha: (at least, I agree with your premise and have no better alternative)
[Coke] I don't think we should be optimizing for command line doc readers. 20:35
(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
psch i don't think every documented sub should have a mini perl6intro next to it 20:36
20:36 laouji joined
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.
pmurias [Coke]: yes, rather then have a different thing that you have no idea what it is
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.
pmurias like what is a DELIMITER? 20:38
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
psch cognominal: that seems to be a problem with literals on the RHS of regex-&
m: say "a" ~~ /\w & a/
camelia rakudo-moar 94d457: OUTPUT«Nil␤»
psch m: say "a" ~~ /\w & 'a'/
camelia rakudo-moar 94d457: OUTPUT«「a」␤»
20:40 laouji left
psch m: say "a" ~~ /b | a/ 20:41
camelia rakudo-moar 94d457: OUTPUT«「a」␤»
dalek ast: 6a329a3 | lizmat++ | S04-declarations/smiley.t:
Better check and better todo message
dha What PerlJam said.
20:41 Guest83961 is now known as sourcef
pmurias examples actually help people 20:42
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.
btyler concerned: here's what I was thinking of: gist.github.com/kanatohodets/04c34...5db983d6dc
masak I know two things that can be a compunit, I think. a file, and the thing that goes into an EVAL
but is a quasi a compunit, too?
dalek c: 894232a | (Zoffix Znet)++ | / (3 files):
Prevent search box "flicker" on page load (Closes #149)
20:44
masak do compunits ever have an OUTER?
btyler concerned: I think your gist will be unhappy in high concurrency because it modifies @clients from multiple threads
lizmat S99:compilation unit
synbot6 Link: design.perl6.org/S99.html#compilation
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 sourcef is now known as borg7, borg7 is now known as borg2
lizmat masak: a compunit is basically only what's inside an EVAL 20:44
the file case just first slurps the file into a string
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
cognominal psch: right, indeed
n0tjack does Rakudo support the tighter/looser traits?
lizmat masak: is a quasi an EVAL ?
masak it's kind of half of one
in that it parses the thing, but doesn't run it
pmurias if you know perl 6 signature syntax the usage statements are just a pure waste of screen space
PerlJam masak: I think that's a "no"
[Coke] dha: of course we want people to use perl 6 widely.
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.
[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.
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.
masak reason I'm asking is that 007 development is raising this as a question right now :)
cognominal: I still haven't realized that :P
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
camelia rakudo-moar 94d457: OUTPUT«(Any)␤»
lizmat masak ^^^
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;
[Coke] dha: I'm making it happen by fixing bugs in building the html docs right now.
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␤»
lizmat m: my $a = 42; { say OUTER::<$a> } # same without EVAL
camelia rakudo-moar 94d457: OUTPUT«42␤»
masak lizmat: sometimes I feel we don't have a good "theory" for what EVAL does, and how it interacts with scopes.
dha [Coke] - That's important, but it's not fleshing things out. Not a criticism, by the way. 20:49
20:49 pierrot joined
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 pierrot is now known as Guest70167
cognominal m: say '#&!' ~~ m/ [ \S & \W ]+ / # match non blank, non alphabetic chars <=== masak 20:49
camelia rakudo-moar 94d457: OUTPUT«「#&!」␤»
20:49 Guest70167 left
psch n0tjack: the signature always comes after the longname 20:50
m: sub infix:<log> ($r, $x) is looser(&infix:<max>) {log $x, $r;}; 10 log 1 max 1234;
camelia ( no output )
lizmat m: my $a = 42; EVAL( "say $a", :context(MY::) )
camelia rakudo-moar 94d457: OUTPUT«42␤»
cognominal masak, \W alone would not cut it in this case
n0tjack psch: thanks; that makes sense now 20:51
PerlJam cognominal: most people would use character classes though (in that case)
masak was gonna say
cognominal m: say '# & !' ~~ m/ \W+ /
camelia rakudo-moar 94d457: OUTPUT«「# & !」␤»
lizmat masak: the default :context is CALLER::
20:52 kaare_ left
lizmat m: my $a = 42; EVAL "say $a" 20:52
camelia rakudo-moar 94d457: OUTPUT«42␤»
20:52 ZoffixWork left
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?
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
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.
masak m: EVAL 'my $x = 7' # should the $x be available in the mainline code? is it? 20:55
camelia ( no output )
masak I... don't know how to check whether the $x is there, without running into static checking.
20:55 borg2 left
masak something with ::MY or something 20:56
lizmat m: no strict; EVAL 'my $x = 7'; say $x
camelia rakudo-moar 94d457: OUTPUT«(Any)␤»
lizmat hmmm...
PerlJam masak: I would say not, unless it was injected via OUTER::MY:: or something
lizmat m: no strict; EVAL 'my $x = 7'; EVAL 'say $x'
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␤»
masak PerlJam: right.
lizmat ehe
20:56 pierrot_ joined
masak PerlJam: and even that should probably be pessimised, so that we can do good optimizations by default. 20:56
so, in short, I agree with lizmat++ 20:57
there should be an implicit block in the EVAL
there is in the quasi :)
lizmat there *is* an implicit block in the EVAL
masak then OUTER:: should work
grondilu upgraded his Debian system from wheezy to jessie and now rakudo seems to be compiling fine
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.
[Coke] speaking of textual docs.. I think our target for Christmas should be an html version of the docs. 20:58
20:58 pierrot_ is now known as pierrot
lizmat masak: there are a few bugs atm with EVAL scoping 20:58
for one, pragma's don't carry over into the EVAL 20:59
they should
[Coke] PerlJam: I'm pretty sure there's a pattern in what dha is doing to create those usages.
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. :-)
[Coke] absolutely. 21:00
yikes, it's late.
21:00 llfourn joined
[Coke] adios. 21:00
21:00 thou left
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
[Coke]: I think we can generate such things without much problems
pmurias should just shut up today as he is just being pointlessly mean :( 21:03
21:03 borg2 joined 21:04 antiatom left
lizmat good night, #perl6! 21:04
dha *shrug* Just let me know if I should back it all out.
21:05 antiatom joined, llfourn left 21:06 laouji joined
FROGGS gnight lizmat 21:06
dha: leave it in until someone can autogenerate it in a better quality to what you added 21:07
dha Whatever.
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:10 laouji left 21:14 larion joined 21:15 skids left
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
.tell lizmat is it possible that you wait working on smileys (implementation wise, not test wise) until I've merged the MOP stuff?
yoleaux FROGGS: I'll pass your message to lizmat.
21:21 laouji joined
FROGGS .tell jnthn does nqp::settypecheckmode affect nqp::istype? 21:25
yoleaux FROGGS: I'll pass your message to jnthn.
21:25 laouji left 21:26 gonz_ joined
FROGGS hmmm, seems so... 21:26
why doesnt it work for me?
n0tjack I can't work out how to cast an IntStr @ to an Int @ 21:27
and it's really hard to google for p6 docs :/ 21:28
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])␤»
n0tjack oh, dude
FROGGS m: my IntStr @v = (IntStr.new(123,"123"),IntStr.new(456,"456")); say (Int @ = +<<@v).WHAT
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…»
FROGGS m: my IntStr @v = (IntStr.new(123,"123"),IntStr.new(456,"456")); say (my Int @ = +<<@v).WHAT
camelia rakudo-moar 94d457: OUTPUT«(Array[Int])␤»
FROGGS m: my IntStr @v = (IntStr.new(123,"123"),IntStr.new(456,"456")); say (my Int @ = +<<@v)
camelia rakudo-moar 94d457: OUTPUT«[123 456]␤»
21:30 LLamaRider joined
FROGGS not nice, but works 21:30
21:30 bjz left
n0tjack I'll take it 21:30
I tried a bunch of >>s, but not +<<
masak 'night, #perl6 21:31
concerned oh hi btyler
FROGGS gnight masak 21:32
21:32 borg2 left
concerned btyler, somehow, gist.github.com/kanatohodets/04c34...5db983d6dc works just fine when I feed base64 into it 21:32
it continues accepting connections and sending messages 21:33
let's see about making many many connections
oh
when I ctrl-C the last connection, the script dies
oh no, when I ctrl-C the third connection
dang 21:34
21:36 laouji joined
dha pmurias - just put in a pull request for an example rather than a usage statement. I hope you like it. :-) 21:37
21:37 TEttinger left 21:38 cygx joined
cygx o/ 21:38
question - what's the closest perl6 equivalent to %words = ($input =~ /([^\n\t]+)\t(\N+)/g) 21:39
the only thing I could come up with was %words = $input.match(/(<-[\n\t]>+)\t(\N+)/, :g).map(*.list>>.Str.Slip)
21:40 laouji left 21:46 borg2 joined 21:48 LLamaRider left, bjz joined 21:50 rurban joined, dha left 21:51 kid51 joined 21:54 bjz left
FROGGS m: sub foo returns Str:U { "bar" }; foo 21:56
camelia ( no output )
FROGGS locally: 21:57
$ perl6 -e 'sub foo returns Str:U { "bar" }; foo'
Type check failed for return value; expected Str:U but got Str
21:59 mprelude joined, mr_ron joined 22:00 ^elyse^ left
PerlJam cygx: my %words = flat lines.map: { .split: /\t, 2 }; 22:01
cygx: you could have used the limit paramter to split in P5 too
er, ... my %words = flat lines.map: { .split: /\t/, 2 };
mr_ron Where do I report the need for a small change to a synopsis? 22:02
cygx PerlJam: that'snot really close, though
PerlJam cygx: por que no?
pink_mist cygx: much more expressive to me
and more readable
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
readability is not the point of the exercise
PerlJam oh
22:04 Jaglor left 22:06 laouji joined
mr_ron m: "\t" ~~ <sp> 22:06
camelia ( no output )
mr_ron m: "\t" ~~ <space>
camelia ( no output )
mr_ron m: say "\t" ~~ <sp>
camelia rakudo-moar 94d457: OUTPUT«False␤»
cygx m: say "\t" ~~ /<space>/
camelia rakudo-moar 94d457: OUTPUT«「 」␤ space => 「 」␤»
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…»
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␤␤»
mr_ron m: say qq/#&\t!A/ ~~ m/ <- alnum - space>+ /
camelia rakudo-moar 94d457: OUTPUT«「#&」␤»
22:10 laouji left
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␤␤»
mr_ron m: "\t" ~~ /<space>/
camelia ( no output )
mr_ron sorry that took so long. It means that in design.perl6.org/S05.html#Character..._shortcuts sp needs to be updated to say space. Where do I report the change? 22:12
pink_mist github.com/perl6/specs here looks like a likely place 22:16
22:17 vendethiel left 22:18 pmurias left 22:21 laouji joined
mr_ron pink_mist: thanks ... working on it ... 22:21
22:24 _itz_ joined 22:25 laouji left 22:27 _itz left, telex left 22:28 n0tjack left
cygx gist.github.com/cygx/cbb08f0c01a0cc28c9d3 22:28
22:28 telex joined
cygx PerlJam: ^^ that's what I've got for now... 22:28
22:29 borg2 left 22:33 spider-mario left
timotimo cygx: and your results? :) 22:33
cygx timotimo: nqp at 0.8s, p5 at 0.5..1.5s, p6 at 1.5..130s 22:37
22:37 chrstphrhrt left
timotimo yeah ... damn :( 22:39
22:46 leont left, BenGoldberg joined
cygx not to worry, just use Inline::Perl5 for performance-critical code :p 22:50
22:50 laouji joined 22:51 skids joined
pink_mist NativeCall to C! 22:52
22:54 BenGoldberg left, Ben_Goldberg joined 22:55 laouji left
dalek osystem: 87a8b93 | ugexe++ | META.list:
Add Grammar::HTTP
22:58
23:00 rurban left 23:04 thou joined
dalek c: 8b9f93c | (David H. Adler)++ | lib/Language/control.pod:
Added docs for C<while> and C<until>
23:08
c: 55755e0 | (David H. Adler)++ | / (524 files):
Merge branch 'master' of github.com/perl6/doc
c: 2523914 | (David H. Adler)++ | doc/Type/Int.pod:
Added example for .chr
c: 7421597 | RabidGravy++ | doc/ (2 files):
Merge pull request #132 from dha/master

Added docs for C<while> and C<until> in control.pod
cygx ~~ 23:09
23:09 cygx left 23:10 firstdayonthejob left 23:12 eliasr joined
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:12
pink_mist afaik they should 23:13
23:15 mr_ron left 23:16 mr_ron joined
concerned Ben_Goldberg, I dunno man 23:18
this is my first experiences with perl 6
23:18 rindolf left 23:19 tokuhirom joined
timotimo right, there's not really a need to go onto separate threads there, because it's all I/O you're doing 23:19
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:20
23:22 cognominal left, RabidGravy left 23:23 tokuhirom left 23:25 mprelude left, takadonet left 23:27 Peter_R left 23:28 takadonet joined
TimToady very briefly in DEN 23:31
timotimo that's probably not denmark 23:32
denver?
TimToady yup
Ben_Goldberg If 'react' and 'whenever' where named 'evloop' and 'evwatch' would this make their behavior clearer, or more confusing? 23:34
pink_mist I think whenever is an awesome name 23:36
TimToady boarding &/e
pink_mist much better than evwatch
TimToady boarding &
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
but to someone who isn't I think react is a much better name choice
*someone who is
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:38
pink_mist LAST 23:44
no wait, that's the opposite issue :P
close the supply maybe? 23:45
23:45 Kcop joined 23:47 Xor_ left 23:51 laouji joined 23:55 laouji left
pink_mist seems there's a $supply.done method 23:56