Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-03-07

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:09 skids joined #perl6
00:10 panchiniak joined #perl6
00:35 xenoterracide joined #perl6
00:48 vladns joined #perl6
00:59 dayangkun joined #perl6
01:00 tgt joined #perl6
01:00 xenoterracide joined #perl6
01:02 TimToady r: my int @array = 1..10;
01:02 camelia rakudo-jvm 44a466: OUTPUT«(timeout)»
01:02 camelia ..rakudo-parrot 44a466, rakudo-moar 44a466: OUTPUT«No such method 'STORE' for invocant of type 'Int'␤  in block  at /tmp/tmpfile:1␤␤»
01:11 KohdMonkey joined #perl6
01:19 SubTerra joined #perl6
01:47 kaare_ joined #perl6
01:57 benabik joined #perl6
02:06 ilbot3 joined #perl6
02:06 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:,  niecza:, std:, or /msg camelia perl6: ... | irclog: http://irc.perl6.org | UTF-8 is our friend!
02:06 mathw joined #perl6
02:06 avuserow joined #perl6
02:08 go|dfish joined #perl6
02:09 woosley joined #perl6
02:10 telex joined #perl6
02:13 klapperl joined #perl6
02:18 ribasushi_ joined #perl6
02:19 pdcawley_ joined #perl6
02:20 FROGGS__ joined #perl6
02:21 cognominal__ joined #perl6
02:21 ggherdov_ joined #perl6
02:21 hoelzro_ joined #perl6
02:22 breinbaa1 joined #perl6
02:23 Ben_Goldberg joined #perl6
02:23 japhb__ joined #perl6
02:24 sunnavy_ joined #perl6
02:25 yoleaux joined #perl6
02:25 atrodo joined #perl6
02:25 silug____ joined #perl6
02:25 orevdiabl joined #perl6
02:25 rylinaux joined #perl6
02:25 yoleaux joined #perl6
02:25 Sqirrel joined #perl6
02:26 rylinaux joined #perl6
02:26 timotimo joined #perl6
02:28 renormalist joined #perl6
02:30 klapperl_ joined #perl6
02:31 sivoais_ joined #perl6
02:31 pdcawley joined #perl6
02:32 grep0r joined #perl6
02:36 xenoterracide joined #perl6
02:51 woosley1 joined #perl6
02:59 daniel-s_ joined #perl6
03:01 tgt joined #perl6
03:01 awwaiid_ joined #perl6
03:04 arnsholt_ joined #perl6
03:06 woosley joined #perl6
03:06 hoverboard joined #perl6
03:08 bowtie joined #perl6
03:08 sivoais joined #perl6
03:14 dalek perl6-roast-data: dd16b36 | coke++ | perl6_pass_rates.csv:
03:14 dalek perl6-roast-data: today (automated commit)
03:14 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/dd16b366e7
03:17 Sqirrel_ joined #perl6
03:18 scumdog1 joined #perl6
03:22 pdcawley_ joined #perl6
03:23 lee__ joined #perl6
03:30 tadzik joined #perl6
03:33 Khisanth joined #perl6
03:57 [Coke] m: my $a = "3"; say q{"$a"};
03:57 [Coke] ENOCAM?
04:03 dalek mojo6: 6ae2497 | coke++ | / (2 files):
04:03 dalek mojo6: Add Mojo::Util:: quote/unquote
04:03 dalek mojo6: review: https://github.com/coke/mojo6/commit/6ae2497965
04:04 tgt joined #perl6
04:04 BrotherBen joined #perl6
04:04 daniel-s_ joined #perl6
04:08 BrotherBen Which perl6 features will allow it to become a leading programming langauge for big data analytics ?
04:09 JimmyZ Grammar and thread?
04:22 jercos Enterprise-compliant JVM backend, advanced brace-based code block grouping techniques, modern first-class functions?
04:23 jercos Maximal compatibility with agile development methodologies in a task-oriented goal-based mission-driven environment?
04:26 bonsaikitten buzzword-compliant ChangeLogs
05:02 woosley joined #perl6
05:04 dalek roast: 0491b90 | larry++ | S15-unicode-information/unimatch-general.t:
05:04 dalek roast: add unimatch tests for general categories
05:04 dalek roast: review: https://github.com/perl6/roast/commit/0491b9011d
05:05 tgt joined #perl6
05:14 dalek roast: 48eb6c6 | larry++ | S15-unicode-information/unimatch-general.t:
05:14 dalek roast: copy-pasto
05:14 dalek roast: review: https://github.com/perl6/roast/commit/48eb6c653d
05:15 TimToady heh, heh, we'll see who's 100% now... :)
05:48 woosley joined #perl6
05:52 dalek roast: 529cb9c | larry++ | S15-unicode-information/unimatch-general.t:
05:52 dalek roast: don't bother trying to match nonchar props
05:52 dalek roast: review: https://github.com/perl6/roast/commit/529cb9c8d8
06:12 mtj_ joined #perl6
06:53 Alina-malina joined #perl6
07:11 kaleem joined #perl6
07:41 arnsholt_ MoarVM on the HN frontpage! https://news.ycombinator.com/item?id=7357670
07:52 kongtomorrow joined #perl6
07:52 Alina-malina joined #perl6
07:52 woosley1 joined #perl6
07:52 nebuchadnezzar joined #perl6
07:52 darutoko joined #perl6
07:52 awwaiid joined #perl6
07:52 JimmyZ joined #perl6
07:52 dayangkun_ joined #perl6
07:52 labster joined #perl6
07:52 sbauer joined #perl6
07:52 dylanwh joined #perl6
07:52 bowtie joined #perl6
07:52 jtpalmer joined #perl6
07:52 _sri joined #perl6
07:52 aindilis joined #perl6
07:52 cognominal__ joined #perl6
07:52 flussence joined #perl6
07:52 go|dfish joined #perl6
07:52 hinachan joined #perl6
07:52 lue joined #perl6
07:52 wooden joined #perl6
07:52 camelia joined #perl6
07:52 gfldex joined #perl6
07:52 isacloud joined #perl6
07:52 zamolxes joined #perl6
07:52 japhb joined #perl6
07:52 Psyche^_ joined #perl6
07:52 Celelibi joined #perl6
07:52 Pleiades` joined #perl6
07:52 [particle]1 joined #perl6
07:52 itz__ joined #perl6
07:52 xragnar joined #perl6
07:52 bjz joined #perl6
07:52 benabik joined #perl6
07:52 sftp_ joined #perl6
07:52 ggherdov_ joined #perl6
07:52 sunnavy_ joined #perl6
07:52 rurban__ joined #perl6
07:52 siruf joined #perl6
07:52 sorear joined #perl6
07:52 cxreg joined #perl6
07:52 renormalist joined #perl6
07:52 stevan_ joined #perl6
07:52 synopsebot joined #perl6
07:52 ribasushi joined #perl6
07:52 xfix joined #perl6
07:52 molaf joined #perl6
07:52 yoleaux joined #perl6
07:52 tokuhirom joined #perl6
07:52 atrodo joined #perl6
07:52 mcglk joined #perl6
07:57 pnu joined #perl6
08:00 siruf joined #perl6
08:09 dmol joined #perl6
08:27 brrt joined #perl6
08:27 FROGGS joined #perl6
08:31 brrt hi
08:35 JimmyZ hello
08:35 tgt joined #perl6
08:36 brrt yay moarvm is getting love on hacker news
08:38 FROGGS yeah :o)
08:38 zakharyas joined #perl6
08:39 sqirrel__ joined #perl6
08:43 moritz and no hate so far
08:43 FROGGS somebody needs to reply to the newest reply :/
08:44 FROGGS <TimToady> heh, heh, we'll see who's 100% now... :) <----- lol :o)
08:48 mcglk joined #perl6
08:50 FROGGS okay, I replied
08:51 sergot morning o/
08:51 FROGGS morning sergot
08:52 lizmat FROGGS++  not seeing it yet, though
08:52 FROGGS :o)
08:53 lizmat seeing it now  :-)
08:54 breinbaas joined #perl6
09:02 virtualsue joined #perl6
09:11 mcglk joined #perl6
09:19 kbaker joined #perl6
09:22 fhelmberger joined #perl6
09:23 fhelmberger joined #perl6
09:29 rindolf joined #perl6
09:40 denis_boyun joined #perl6
09:48 kurahaupo_mobile joined #perl6
10:05 woosley joined #perl6
10:06 woosley1 joined #perl6
10:08 yihshih left #perl6
10:41 Alina-malina joined #perl6
10:47 timotimo the pypy people are right, you know. pypy isn't a VM, it's a language that you can implement a VM + compiler in
10:48 timotimo and since the jit is a meta-tracing-jit, it'll trace right through whatever layers you have
10:48 timotimo but pypy has some *crazy* compile times :(
10:48 tadzik also, they keep saying how production ready it is, but people tried it at $work and all it did was segfault :)
10:49 timotimo really?
10:49 tadzik yup
10:49 timotimo i've had fantastic experiences with pypy so far
10:49 tadzik I don't know the details
10:49 timotimo so you may have been doing something spectacularly daring ;)
10:49 tadzik I know that they were well aware that linking to C-stuff may not work
10:49 tadzik or: will not work
10:50 timotimo oh, is that CPython stuff?
10:50 timotimo like CPython extensions?
10:50 brrt timotimo - i don't think you've compiled it yourself then
10:50 timotimo brrt: i have!
10:50 tadzik well, I assume that since they know that those don't work on PyPy, they wouldn't be saying "but we still tried and yep, didn't work" :)
10:50 timotimo because their equivalent to NativeCall is rock solid and even gets some jit love.
10:50 tadzik but still, I don't even know which product taht was
10:51 brrt … then you must be in the possession of one beastly machine :-P
10:51 timotimo there's CPython extension support in pypy; unfortunately they have to emulate CPython's own internal data structures for extensions that rely on them and that is slow (especially doing the ref counting)
10:51 timotimo b
10:51 timotimo brrt: i really did mean crazy bad compile timesn
10:52 brrt to me, that is the part that screams 'too clever for their own good'
10:52 timotimo well. i may be biased, but if you ask me, i'll tell you pypy rocks. and i'll tell you any day of the week.
10:53 brrt :-)
10:53 brrt don't get me wrong
10:53 brrt it is _very_ clever
10:53 brrt and it even works
10:53 brrt its also humongous and takes well over an hour to compile
10:54 timotimo the crazy thing is that the jit really doesn't have to know much about the target language or the vm
10:54 timotimo they're doing meta-tracing, we're doing meta-object-programming ;)
10:54 brrt and does so only using an earlier pypy because _regular_ python just crashes trying to compile
10:54 brrt mop is a much better understood field
10:55 timotimo oh, that's not true though
10:55 timotimo i've compiled many pypys with CPython
10:55 timotimo pypy has only been memory-efficient enough to compile itself with reasonable amounts of ram usage for like two or three years now
10:55 brrt then again, you must have some beastly machine :-D
10:55 brrt or i must have some decidely unbeastly ones
10:57 * brrt is going lunching
10:59 dalek rakudo/nom: 24c94e0 | (Elizabeth Mattijsen)++ | src/core/ (2 files):
10:59 dalek rakudo/nom: Add X::Routine::Banned and ban "length" and "bytes"
10:59 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/24c94e0d3f
11:00 lizmat was inspired by the wording of "length" in S32/Str:167
11:03 robinsmidsrod joined #perl6
11:04 timotimo haha
11:05 timotimo lizmat: instead of putting a qq in there with text going to column 0 in the second line, why not use auto-unindented heredocs? :)
11:05 timotimo that's a features that's wildly underappreciated in perl 6, i find.
11:06 lizmat timotimo: last time I tried that in the settings, it didn't work
11:06 lizmat does it work now (in the settings, and rather early at that?)
11:07 timotimo aaw
11:07 timotimo don't know :(
11:12 lizmat there's also the matter of the trailing newline when using heredocs
11:12 timotimo oh, right
11:12 lizmat or is there a solution for that?
11:12 timotimo there should be a :chomp adverb, right?
11:13 lizmat I suggested that once, I recall, don't think it got implemented
11:13 lizmat doing it as a heredoce gives:
11:13 lizmat Cannot call ACCEPTS; no signatures match
11:13 lizmat at src/gen/m-BOOTSTRAP.nqp:2124  (blib/Perl6/BOOTSTRAP.moarvm::30)
11:13 lizmat when building the setting  :-(
11:13 timotimo oh, huh
11:13 timotimo heredocs call accepts?
11:14 timotimo oh, to find the terminator perhaps
11:14 lizmat probably, somewhere, internally
11:14 lizmat I have spent too much time altready trying to use real Perl 6 features in the settings
11:15 lizmat so I'll settle for more nqp like features  :-)
11:15 lizmat that works
11:16 lizmat anyway, having a better error message when using bytes or length seemed like a nice thing to have
11:16 timotimo aye
11:17 lizmat r: say bytes 1
11:17 camelia rakudo-parrot 44a466, rakudo-jvm 44a466, rakudo-moar 44a466: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Undeclared routine:â�¤    bytes used at line 1â�¤â�¤Â»
11:17 lizmat $ perl6 -e 'say bytes 1'
11:17 lizmat ===SORRY!===
11:17 lizmat "bytes()" is banned in Perl 6.
11:17 lizmat Did you mean .encode($encoding).bytes instead?
11:18 masak seems a bit harsh.
11:18 FROGGS p: say: anyother one bytes the dust
11:18 camelia rakudo-parrot 44a466: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/OnftIbuR_zâ�¤Undeclared routines:â�¤    anyother used at line 1â�¤    bytes used at line 1â�¤    dust used at line 1â�¤    the used at line 1â�¤â�¤Â»
11:19 lizmat better would be to do this at compile time, but I'm afraid that might interfere with any custom defined bytes or length subs/methods
11:19 FROGGS I thought we know at compile time which sub is there?
11:19 masak can theoretically do it for subs, not for methods.
11:19 FROGGS we don't know that for methods though I think
11:21 lizmat looking into making it compile time for subs
11:21 masak can't know it statically, because of late binding of invocant.
11:21 lizmat Ah, I see how I can do this
11:22 timotimo is "is pure" enough?
11:25 masak r: sub foo {}; sub bar {}; say &foo === &bar; say &foo === &foo
11:25 camelia rakudo-parrot 44a466, rakudo-jvm 44a466, rakudo-moar 44a466: OUTPUT«False␤True␤»
11:25 masak r: my @a; for ^2 { @a[$_] = sub foo {} }; say @a[0] === @a[1]
11:25 camelia rakudo-parrot 44a466, rakudo-jvm 44a466, rakudo-moar 44a466: OUTPUT«False␤»
11:25 kaleem joined #perl6
11:26 timotimo r: sub explode() is pure { die "dead" }; eval q{ say "beginning"; explode(); say "end" }
11:26 masak r: my @a; for ^2 { @a[$_] = class {} }; say @a[0] === @a[1]
11:26 camelia rakudo-moar 44a466: OUTPUT«WARNINGS:␤Useless use of "explode()" in expression "explode()" in sink context (line 1)␤beginning␤dead␤  in sub explode at /tmp/tmpfile:1␤  in block  at eval_0:1␤  in any  at eval_0:1␤  in sub eval at src/gen/m-CORE.setting:703␤  in sub eva…»
11:26 camelia ..rakudo-jvm 44a466: OUTPUT«WARNINGS:␤Useless use of "explode()" in expression "explode()" in sink context (line 1)␤beginning␤dead␤  in sub explode at /tmp/tmpfile:1␤  in block  at eval_0:1␤  in any  at eval_0:1␤  in sub eval at gen/jvm/CORE.setting:703␤  in sub eval a…»
11:26 camelia ..rakudo-parrot 44a466: OUTPUT«WARNINGS:␤Useless use of "explode()" in expression "explode()" in sink context (line 1)␤beginning␤dead␤  in sub explode at /tmp/tmpfile:1␤  in block  at eval_0:1␤  in any  at eval_0:1␤  in sub eval at gen/parrot/CORE.setting:705␤  in sub …»
11:26 camelia rakudo-parrot 44a466, rakudo-jvm 44a466, rakudo-moar 44a466: OUTPUT«True␤»
11:26 masak o.O
11:26 timotimo oh, heh.
11:27 masak ok, so there are (in some sense) *two* functions, one for each iteration. but only one class.
11:28 kaleem joined #perl6
11:28 masak r: my @a; for ^2 { @a[$_] = class { has $.x = $_ } }; say @a[0].new.x; say @a[1].new.x
11:28 camelia rakudo-parrot 44a466, rakudo-jvm 44a466, rakudo-moar 44a466: OUTPUT«(Any)␤(Any)␤»
11:28 masak heh.
11:29 masak r: my @a; for ^2 { my $i = $_; @a[$_] = class { has $.x = $i } }; say @a[0].new.x; say @a[1].new.x
11:29 camelia rakudo-parrot 44a466, rakudo-jvm 44a466, rakudo-moar 44a466: OUTPUT«1␤1␤»
11:29 masak yeah.
11:29 timotimo it creates only one class, eh? so not fully closure-ish
11:29 masak right.
11:29 masak it doesn't re-clone like it does functions.
11:29 timotimo is it the same with roles, btw?
11:29 masak yeah.
11:30 timotimo well, in that case you can parameterize them
11:30 timotimo so that's probably the right way to go if you want something like the example you just had
11:30 masak well, then you're talking about the "use" side, not the "declare" side.
11:30 timotimo oh
11:36 * masak should make a list of all the declare/use pairs in Perl 6
11:37 timotimo hm. is this a problem with perl 6's specification?
11:37 timotimo seems a "gotta know this, unfortunately" aspect
11:39 timotimo on the other hand, if you're constructing classes inside loops and passing them around, you're probably an advanced user and then you'll have that exact thing on your mind already
11:39 mathw it is a little counterintuitive, although part of me's saying WHY ARE YOU EVEN DOING THAT
11:39 mathw but that kind of thinking leads to Java, so I'm going to stop there.
11:39 timotimo at least we don't have the problem python has where you have to write things like lambda var=var: ... if you want to have a "copy" of the local variable rather than a reference
11:40 timotimo r: my @lambdas; for ^5 { @lambdas.push: { $_ } }; say @lambdas[0](); say @lambdas[2]();
11:41 camelia rakudo-parrot 24c94e, rakudo-jvm 24c94e, rakudo-moar 24c94e: OUTPUT«0␤2␤»
11:41 timotimo in python, you have to explicitly say "please copy the $_ for my closure", otherwise you'll get 5\n5\n from that
11:41 timotimo er, i mean 4 and 4
11:45 scumdog joined #perl6
12:00 dalek rakudo/nom: 318a41a | (Elizabeth Mattijsen)++ | src/ (2 files):
12:00 dalek rakudo/nom: Make banning of length() and bytes() compile time
12:00 dalek rakudo/nom:
12:00 dalek rakudo/nom: Now uses the suggested subroutine mechanism for getting the message across
12:00 dalek rakudo/nom: rather than actually creating multi subs for length() and bytes()
12:00 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/318a41aafd
12:02 lizmat $ perl6 -e 'sub lengte {}; say length 1'
12:02 lizmat ===SORRY!=== Error while compiling -e
12:02 lizmat Undeclared routine:
12:02 lizmat length used at line 1. Did you mean '&lengte', 'chars', 'graphs', 'codes'?
12:03 spider-mario joined #perl6
12:03 moritz wtf is '&lengte' ?
12:03 moritz oh
12:03 * moritz actually looks at the code
12:04 lizmat to show it will also honour the levenshtein suggestions
12:04 moritz aye, that's way cool
12:04 moritz lizmat++
12:04 lizmat it's just that I think the & is out of place in the suggestion of &lengte
12:05 lizmat the message already says it's about routines, so the & is superfluous
12:05 moritz +1
12:05 lizmat and just a side-effect of the levenshtein algo
12:05 moritz but
12:05 moritz m: my $x = &hcars
12:05 camelia rakudo-moar 24c94e: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/NgtRBrItQqâ�¤Undeclared name:â�¤    &hcars used at line 1â�¤â�¤Â»
12:05 masak levenshtein++
12:05 moritz oh, that one doesn't levenshtein
12:06 moritz in this context, the & in the error message would have been highly appropriate
12:06 masak aye.
12:06 lizmat ok
12:06 masak "print it if the user did"?
12:06 lizmat so the chars, graphs, codes would need it also, is what you're saying?
12:06 moritz lizmat: no
12:06 moritz lizmat: only if the user tried to take a reference to the routine
12:07 brrt joined #perl6
12:07 moritz lizmat: but that case doesn't seem to be levensthein'ed anyway
12:07 moritz m: sub fooooooooobar { }; say &foooooooobar
12:07 camelia rakudo-moar 24c94e: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/_F5UcTdNRVâ�¤Undeclared name:â�¤    &foooooooobar used at line 1â�¤â�¤Â»
12:07 moritz nope
12:07 lizmat hmm... will look into that while I'm at it
12:08 moritz what masak++ suggested is that if the user typed a sigil, the error message should also contain the sigil
12:08 moritz and if the user typed a normal subcall without a sigil, that's what the error message produces
12:09 lizmat ok, will see if I can do this
12:12 pdcawley joined #perl6
12:16 kaleem joined #perl6
12:16 kaleem joined #perl6
12:23 pdcawley joined #perl6
12:25 masak I still have trouble verbalizing it concretely, but there's a principle going on there:
12:25 masak inside a program's model, you want to Postel it and normalize everything to a single, unambiguous representation.
12:26 masak but in output/view/error messages, you want to present that same information in the way the user expects to see it.
12:27 lizmat fwiw, suggest_routines is not being called in the &length case  :-(
12:32 lizmat investigating...
12:33 atphalix joined #perl6
12:37 masak lunch &
12:40 grep0r joined #perl6
12:41 * lizmat is puzzled by line 3740 in Grammar.nqp: "if $_ lt 'a' {"
12:42 timotimo "if it's not alpha"?
12:42 lizmat that condition seems odd in two ways: I sorta expect "$name" having to be checked
12:42 timotimo oh, isn't that about "lower case or upper case"?
12:42 lizmat secondly, it seems wrong for &foo
12:43 lizmat r: say "&length" lt "a"; say "length" lt "a"
12:43 camelia rakudo-parrot 318a41, rakudo-jvm 318a41, rakudo-moar 318a41: OUTPUT«True␤False␤»
12:44 timotimo a line above that one seems to assume there is no & in $name
12:44 timotimo that may be the cause of the problem
12:44 pecastro joined #perl6
12:44 lizmat it's not in this case, but indeed, seems wrong nonetheless
12:45 lizmat eh, maybe not
12:45 lizmat that's just ignoring a mystery when there's a known sub in scope
12:45 timotimo oh!
12:45 timotimo fair enough, i guess
12:46 lizmat I guess we can't have subs with & in their name ?
12:46 timotimo in the middle?
12:46 lizmat or in front, aka &&foo
12:46 timotimo doesn't seem sensible to me at least
12:47 FROGGS std: my &foo
12:47 camelia std 09dda5b: OUTPUT«ok 00:01 125m␤»
12:47 FROGGS std: my &foo; &&foo
12:47 camelia std 09dda5b: OUTPUT«ok 00:01 126m␤»
12:47 FROGGS p: my &foo; &&foo
12:47 camelia rakudo-parrot 318a41: ( no output )
12:47 lizmat std: my &&foo
12:47 camelia std 09dda5b: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Cannot declare an indirect variable name at /tmp/ssFbUP4i0o line 1:â�¤------> [32mmy &[33mâ��[31m&foo[0mâ�¤    expecting any of:â�¤      infix nounâ�¤     subshortnameâ�¤   twigilâ�¤Parse failedâ�¤FAILED 00:01 125mâ�¤Â»
12:48 timotimo mhm. that's not really part of the name, i guess; can you debug-print the values of $name that you can come up with in these cases?
12:48 timotimo maybe the rest of the grammar that feeds the mistery list strips the sigils before adding the values
12:49 FROGGS p: my &foo = -> { -> { say 42 } }; (&foo())
12:49 camelia rakudo-parrot 318a41: ( no output )
12:49 FROGGS p: my &foo = -> { -> { say 42 } }; (&foo())()
12:49 camelia rakudo-parrot 318a41: OUTPUT«42␤»
12:50 FROGGS the desigilname if foo of course
12:56 lizmat I don't think there is a desigilname at that stage yet
13:00 FROGGS yes, at a given point you only have the name starting with &
13:00 bluescreen10 joined #perl6
13:07 timotimo huh
13:07 timotimo http://rosettacode.org/wik​i/Twelve_statements#Perl_6  -  { all(.[1..12]) === any(True, False) } ← this does not really correspond to "this is a numbered list of 12 statements"
13:07 timotimo only "entries 1 through 12 are true or false"
13:08 lizmat $ perl6 -e 'sub lengte {}; say length(1)'
13:08 lizmat ===SORRY!=== Error while compiling -e
13:08 lizmat Undeclared routine:
13:08 lizmat length used at line 1. Did you mean 'lengte', 'chars', 'graphs', 'codes'?
13:08 timotimo so it'd need something like .elems == 13 to be anded into that?
13:08 timotimo oh nice :)
13:08 lizmat $ perl6 -e 'sub lengte {}; say &length(1)'
13:08 lizmat ===SORRY!=== Error while compiling -e
13:08 lizmat Undeclared routine:
13:08 lizmat &length used at line 1. Did you mean '&lengte', '&chars', '&graphs', '&codes'?
13:08 lizmat running spectest now
13:11 tgt joined #perl6
13:23 timotimo r: say 1.so
13:23 camelia rakudo-parrot 318a41, rakudo-jvm 318a41, rakudo-moar 318a41: OUTPUT«True␤»
13:23 timotimo i didn't know we have that
13:23 timotimo r: say 1.not
13:23 camelia rakudo-parrot 318a41, rakudo-jvm 318a41, rakudo-moar 318a41: OUTPUT«False␤»
13:23 timotimo r: say 1.so.not.so.not.so.not.so.not
13:24 camelia rakudo-parrot 318a41, rakudo-jvm 318a41, rakudo-moar 318a41: OUTPUT«True␤»
13:24 dalek rakudo/nom: be9ffea | (Elizabeth Mattijsen)++ | src/Perl6/Grammar.nqp:
13:24 dalek rakudo/nom: Suggestions for unknown subs specified with &sigil
13:24 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/be9ffeaac5
13:24 dalek rakudo/nom: 0a173fa | (Elizabeth Mattijsen)++ | src/Perl6/World.nqp:
13:24 dalek rakudo/nom: Use sigil in suggestions if specified
13:24 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0a173fabb2
13:24 pmurias joined #perl6
13:24 moritz lizmat: would you please add a changelog entry for that?
13:24 brrt left #perl6
13:24 * moritz tries to remember to nag committers to do that, and to remeber it himself
13:24 lizmat sure
13:25 lizmat $ perl6 -e 'sub fooooooooobar { }; say &foooooooobar'
13:25 lizmat ===SORRY!=== Error while compiling -e
13:25 lizmat Undeclared routine:
13:25 lizmat &foooooooobar used at line 1. Did you mean '&fooooooooobar'?
13:25 moritz lizmat++
13:25 timotimo now we need a routine that makes differences like that easier to spot
13:26 moritz :-)
13:26 timotimo "no such routine lo1, did you mean lol?"
13:26 moritz colored, character-based diffs
13:27 timotimo i'm slightly disappointed that there is no patience diff algorithm implementation for perl 6
13:28 timotimo since it's obviously superior to naive diff strategies
13:28 timotimo and perl 6 is all about taking the superior things from everywhere and combining them into a surprisingly elegant package
13:30 dalek rakudo/nom: c735e4d | (Elizabeth Mattijsen)++ | docs/ChangeLog:
13:30 dalek rakudo/nom: Changelog entries for suggestion stuff, moritz++
13:30 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c735e4df4e
13:38 hinachan joined #perl6
13:39 masak moritz++ # helping people remember to keep the changelog up-to-date
13:46 timotimo hmm
13:46 dalek rakudo/nom: 6676f76 | (Elizabeth Mattijsen)++ | src/core/ (2 files):
13:46 dalek rakudo/nom: s/X::Routine::Banned/X::Method::Banned/
13:46 dalek rakudo/nom:
13:46 dalek rakudo/nom: Since we only use the exception for methods now
13:46 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6676f76401
13:47 moritz huh? I thought we only use them for *subs*?
13:48 timotimo for subs you get the levenshtein-based "not found" errors
13:48 moritz ah
13:49 moritz ok
13:49 timotimo for methods you get "you really didn't mean that"
13:49 lizmat at compile time
13:49 moritz never mind me then
13:49 dalek rakudo/nom: 17c92be | moritz++ | docs/ChangeLog:
13:49 dalek rakudo/nom: update ChangeLog
13:49 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/17c92be325
13:49 moritz please review and enhance :-)
13:50 lizmat cycling&
13:54 masak is it really "banned", though? I would've gone for a term like "tabooed".
13:55 timotimo "thermally discouraged by laser beam"
13:55 * timotimo has to re-read all the binding syntaxes perl 6 supports
13:56 pmurias banned methods are like "foo".length?
13:56 moritz yes
13:57 pmurias so they are only raised at compile time if we know the class?
13:57 timotimo not yet
13:58 timotimo especially since you may have mixed in something with a role
13:58 timotimo knowing "the class" at compile time is exceedingly hard
13:58 pmurias perl6: class Foo {}; say Foo.length;
13:58 camelia rakudo-moar 318a41: OUTPUT«===SORRY!===␤".length" is banned in Perl 6.␤Did you mean .chars, .graphs or .codes instead?␤»
13:58 camelia ..niecza v24-109-g48a8de3: OUTPUT«Unhandled exception: Unable to resolve method length in type Foo␤  at /tmp/tmpfile line 1 (mainline @ 5) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4595 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4596 (module-CORE @ 576) ␤…»
13:58 camelia ..rakudo-jvm 318a41: OUTPUT«".length" is banned in Perl 6.␤Did you mean .chars, .graphs or .codes instead?␤  in method gist at gen/jvm/CORE.setting:12398␤  in method gist at gen/jvm/CORE.setting:1053␤  in sub say at gen/jvm/CORE.setting:13305␤  in block  at /tmp/tmpfile:1␤␤»
13:58 camelia ..rakudo-parrot 318a41: OUTPUT«".length" is banned in Perl 6.␤Did you mean .chars, .graphs or .codes instead?␤  in method gist at gen/parrot/CORE.setting:12419␤  in method gist at gen/parrot/CORE.setting:1056␤  in sub say at gen/parrot/CORE.setting:13347␤  in block  at /tmp/…»
13:59 pmurias rakudo-moar: class Foo {method length {1}}; say Foo.length;
13:59 camelia rakudo-moar 318a41: OUTPUT«1␤»
13:59 pmurias rakudo-moar: class Foo {method lengt {1}}; say "here";say Foo.length;
13:59 camelia rakudo-moar 318a41: OUTPUT«here␤===SORRY!===␤".length" is banned in Perl 6.␤Did you mean .chars, .graphs or .codes instead?␤»
13:59 timotimo one thing i don't quite like about this is that to an introspector, the method *exists*
14:01 masak timotimo: well, it's either that, or insert a special case in the "Method not found" logic.
14:02 moritz that might actually be cleaner, though not as easily extensible
14:02 * timotimo is always praising the introspective capabilities of Perl 6 and would be a bit disappointed if there were too many "special cases" like these
14:03 lizmat .oO( not cycling yet )
14:03 lizmat good points, actually
14:03 timotimo p: my ("0" => @short, "1" => @long) := (^1).roll(10).categorize({$_})
14:03 camelia rakudo-parrot 318a41: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/Wm8EmMrKyV�Preceding context expects a term, but found infix > instead�at /tmp/Wm8EmMrKyV:1�------> [32mmy ("0" =>[33m�[31m @short, "1" => @long) := (^1).roll(10).[0m�»
14:03 timotimo how would i do something like that?
14:03 lizmat will look at adapting the method not found logic when I'm back
14:03 grep0r joined #perl6
14:04 kaleem joined #perl6
14:05 kaleem joined #perl6
14:07 guru joined #perl6
14:12 timotimo it wouldn't be terribly bad if i weren't able to construct a signature binding that takes "0" and "1" as named parameters
14:12 timotimo i'd like to know if that's the case, though
14:13 timotimo (also, (^1).roll is prety useless %) )
14:14 moritz m: sub f(:$0) { }
14:14 camelia rakudo-moar 318a41: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/o_5_IJpu_l�Cannot declare a numeric parameter�at /tmp/o_5_IJpu_l:1�------> [32msub f(:$0[33m�[31m) { }[0m�»
14:14 timotimo i can unpack the hash on the right side and use positional parameters on the left
14:15 bjz joined #perl6
14:23 timotimo i'm wondering: should the code model for IDE support for perl 6 be based on the actual Perl6/Grammar.nqp implementation or would it be sensible to build a fast, but only approximating analysis tool?
14:26 masak I've yet to be convinced it's possible to make such an approximate parse of Perl 6.
14:26 masak either you know where quotes begin and end or you don't, for example.
14:26 masak what kind of parsing information could you skip and still yield a useful parse of the program?
14:26 pmurias timotimo: the ideal solution would be to build a fast Perl6/Grammar.nqp ;)
14:27 timotimo masak: BEGIN blocks :)
14:27 masak timotimo: no, you still need to *parse* the BEGIN block.
14:27 timotimo r: BEGIN for 1..* { 1 }
14:28 camelia rakudo-jvm 318a41, rakudo-moar 318a41: OUTPUT«(timeout)»
14:28 camelia ..rakudo-parrot 318a41: OUTPUT«===SORRY!===␤Null PMC access in get_bool()␤»
14:28 timotimo ... o_O
14:29 pmurias timotimo: the IDE support needs to handle grammar extensions
14:29 timotimo i guess it should, yeah.
14:30 timotimo in that case, there has to be some kind of sandboxing or something like that
14:30 timotimo and something cleverer than RESTRICTED.setting
14:31 * masak .oO( Parrot can run an infinite loop so fast it results in a Null PMC access! )
14:33 bjz joined #perl6
14:33 pmurias timotimo: for reading untrustworthy code some sort of a "safe" mode would be usefull
14:34 nwc10 beat that, Chuck Norris!
14:34 skids joined #perl6
14:35 * JimmyZ would like stole 'lazy val statement' from scala to rakudo's core.setting to get a faster rakudo startup time
14:40 tgt joined #perl6
14:49 dalek rakudo-star-daily: 3067e83 | coke++ | log/ (5 files):
14:49 dalek rakudo-star-daily: today (automated commit)
14:49 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/3067e832d1
14:54 btyler joined #perl6
14:58 jnap joined #perl6
15:01 kivutar joined #perl6
15:06 masak r: my ($x, $y) = 5, $x + 1; say $y
15:06 camelia rakudo-jvm 17c92b, rakudo-moar 17c92b: OUTPUT«use of uninitialized value of type Any in numeric context␤1␤»
15:06 camelia ..rakudo-parrot 17c92b: OUTPUT«use of uninitialized value of type Any in numeric context  in block  at /tmp/tmpfile:1␤␤1␤»
15:06 masak above the (tiny) WAT of simultaneous assignment.
15:12 FROGGS[mobile] joined #perl6
15:27 fridim__ joined #perl6
15:32 moritz WAT are you talking about?
15:32 moritz :-)
15:33 FROGGS joined #perl6
15:34 masak moritz: the (mistaken) expectation that you can use the value 5 in $x to compute the value of $y.
15:34 masak a lot of other languages work like that.
15:35 masak but they don't have the nice swap feature: ($x, $y) = $y, $x;
15:36 tgt joined #perl6
15:38 PerlJam masak: "If $x is available for use as soon as it's declared, why can't I use it to compute $y?"
15:38 PerlJam :-)
15:39 masak PerlJam: yes, exactly.
15:41 masak well, you *can*, but from the perspective of $y, the assignment of 5 to $x hasn't happened yet -- hence the term "simultaneous assignment".
15:41 masak I would say that in the case of a declaration, simultaneous assignment is more of a hindrance than a help.
15:41 masak but I'm *not* suggesting we should introduce a special case for declarations. :)
15:42 masak nor am I really suggesting we should get rid of simultaneous assignment. it's occasionally useful.
15:42 masak it's another one of those "if I designed a language, I would probably make different trade-offs"
15:44 PerlJam And you'd be WRONG!  ;)
15:44 akira1 joined #perl6
15:45 treehug88 joined #perl6
15:46 masak yes -- at least in the sense that all languages suck.
15:47 akira1 left #perl6
15:48 pecastro joined #perl6
15:51 __thou joined #perl6
15:54 hinachan_ joined #perl6
16:05 dylanwh_ joined #perl6
16:06 TimToady use ::= if you want left-to-right
16:06 guru joined #perl6
16:07 awwaiid_ joined #perl6
16:09 scumdog1 joined #perl6
16:09 dayangkun__ joined #perl6
16:12 xfix joined #perl6
16:13 cognominal joined #perl6
16:14 xragnar_ joined #perl6
16:15 virtualsue joined #perl6
16:21 xfix rn: say "a" x 0.5
16:21 camelia rakudo-parrot 17c92b, rakudo-jvm 17c92b, rakudo-moar 17c92b, niecza v24-109-g48a8de3: OUTPUT«␤»
16:24 xfix http://codegolf.stackexchange.com/a/23386/3103
16:24 xfix I like Perl 6!
16:24 arnsholt joined #perl6
16:25 TimToady it's pretty ok
16:26 xfix It wins with everything else (let's ignore this -2 polyglot, because it's rule abuse).
16:27 xfix (the rule abuse polyglot thinks that 0 is the only random number between 0 and 255, and outputs nothing)
16:28 xfix (and let's ignore bash fork bomb, because it doesn't solve the task)
16:28 TimToady 9.rand would be 2 characters shorter :)
16:29 TimToady oh, task requires 255
16:29 TimToady nm
16:31 xfix Well, it could be 0, with certain rule abuse.
16:31 xfix (to be exact, http://en.wikipedia.org/wik​i/Degenerate_distribution)
16:34 xfix ":)"256rand*
16:34 xfix oh wait, GolfScript won. Why I haven't noticed the first page.
16:42 molaf_ joined #perl6
16:52 TimToady oh, given context, ::= won't work on the RHS like that, so nevermind that too :)
16:52 TimToady wow, backlog done before 9am; you guys have been slacking off
16:53 timotimo TimToady: what's your answer to http://rosettacode.org/wik​i/Twelve_statements#Perl_6 not verifying that the number of statements is 12 long? :P
16:54 TimToady I have 3 teeth too.
16:56 TimToady but I'd use .end == 12
16:57 timotimo that's better, aye
16:58 TimToady feel free to fix it
17:00 kurahaupo joined #perl6
17:00 timotimo just putting "and .end == 12" at the end of the closure should be just fine, right?
17:00 TimToady the implementation of narcissistic numbers at https://gist.github.com/TimToady/9415288 runs my laptop out of memory, and it seems like it shouldn't
17:01 TimToady (it calculates using base 1000 digits :)
17:02 timotimo it does reach the body of the for loop?
17:02 TimToady sure
17:02 timotimo hm, do you really need that "gather take" at the end of the constant narcissistic?
17:03 TimToady not really, but without it returns them in batches for some reason
17:03 TimToady tried grep but it's slower
17:04 timotimo does it run on moar?
17:04 TimToady yes
17:04 TimToady as you can tell from the name 'digit', was originally doing it 10 at a time, not 1000
17:04 timotimo mhm
17:05 TimToady and @t was the original @table
17:05 hoverboard joined #perl6
17:05 TimToady that runs faster on the small numbers but slower on the big ones
17:07 vendethiel What's the "form" operator in perl6?
17:08 * timotimo has no idea what that would be
17:08 TimToady looks like it runs under jvm too
17:08 vendethiel <<perl6's "form">>
17:08 TimToady what's a 'form' operator?
17:09 vendethiel that's what I'm asking :o)
17:09 TimToady where do you see a form operator?
17:10 vendethiel TimToady: http://stackoverflow.com/questions/18234971​/make-perl-script-work-in-both-perl-5-and-6, http://search.cpan.org/~dcon​way/Perl6-Form-0.04/Form.pm
17:10 TimToady that's a module, that's not Perl 6
17:10 FROGGS timotimo: "cache iterators in encoding_find_*cclass" has hit parrot
17:10 timotimo oh!
17:10 vendethiel quotes a perl 6 example with "form" in it
17:11 timotimo i thought that code was in an unacceptable state, due to a decided lack of thread safety?
17:11 TimToady is it after a 'use Form;' ?
17:11 TimToady btw, the jvm doesn't seem to leak on the narcissistic proggie
17:11 vendethiel TimToady: not in the module docs "perl 6 example"
17:12 vendethiel TimToady: " Perl 6 Form.pm module"
17:12 vendethiel it just doesn't show it in the code example I guess
17:12 TimToady I can assure you there is no 'form' built into Perl 6 :)
17:13 vendethiel yep :-p
17:13 timotimo aye, perl 6 is amorph
17:13 * timotimo heads out
17:17 FROGGS TimToady: perhaps there was a "form" builtin back in 2004 that did something Pod-alike? http://search.cpan.org/~dcon​way/Perl6-Form-0.04/Form.pm
17:22 TimToady hmm, took the gather/take out of digits and it seems to not be leaking now
17:22 TimToady but need to run it into the higher numbers to be sure
17:25 TimToady iterestingly, the virtual image of java appears to be 20 times that of moar on this, at least in the lower numbers
17:25 TimToady *int
17:25 TimToady oops, moar grew by 1 meg :)
17:26 kurahaupo joined #perl6
17:27 benabik joined #perl6
17:27 kurahaupo joined #perl6
17:29 TimToady yeah, taking the gather/take out of digits and using push instead removed the memory leak on moar
17:30 TimToady and I'm quite please to see that the resident set of moar is about 1/10 of jvm's
17:30 TimToady *pleased
17:33 TimToady so it would appear that running thousands of quick little gather/takes is leaking something, maybe in the contination support somewhere
17:35 TimToady lemme see if I can reduce it to a test case, after I'm done racing these self-loving numbers
17:35 grep0r joined #perl6
17:42 renormalist joined #perl6
17:46 TimToady indeed, the following leaks very rapidly:
17:46 TimToady r: my @bar = (gather take 42) while 1;
17:46 telex joined #perl6
17:46 camelia rakudo-parrot 17c92b, rakudo-jvm 17c92b, rakudo-moar 17c92b: OUTPUT«(timeout)»
17:47 TimToady (leaks on moar, that is)
17:48 TimToady I guess I should say this on #moarvm :)
17:48 TimToady since those guys never come over here...
17:50 hoverboard joined #perl6
17:52 flussence joined #perl6
17:54 isBEKaml joined #perl6
18:00 cooper joined #perl6
18:01 TimToady I see that the Twelve Statements entry was also singed by whoever's browser was turning unicode chars into ?
18:08 guru joined #perl6
18:09 Alina-malina joined #perl6
18:11 grondilu joined #perl6
18:15 jnthn dagurval_:
18:16 jnthn oops
18:16 jnthn Darn, there's nothing full fart about this train wifi today...
18:18 TimToady well, doesn't appear that you can blame sunspots
18:20 jnthn Of course. We blame oraclespots nowadays...
18:20 isBEKaml was there no nqp-2014.02 release? http://rakudo.org/downloads/nqp
18:20 hinachan joined #perl6
18:20 isBEKaml (Hi, BTW)
18:22 kurahaupo joined #perl6
18:22 tgt joined #perl6
18:25 Alina-malina joined #perl6
18:27 TimToady timotimo: while fixing the implication arrow, I took the liberty to pull your .end up to the front, because "there are 12 things and they are all statements" reads better than the other way around
18:29 kurahaupo joined #perl6
18:31 pdcawley joined #perl6
18:40 Alina-malina joined #perl6
18:43 [Coke] I want an XMPP client in perl 6.
18:44 TimToady wanting it isn't enough--you have to WANT it.
18:45 benabik .WANT
18:46 lizmat joined #perl6
18:52 arnsholt [Coke]: XMPP is XML-based, isn't it?
18:52 lizmat afaik, yes (hence the X in XMPP)
18:54 rindolf joined #perl6
18:57 xfix yes
18:58 xfix I have support for it in my IRC bot, and it's XML based.
19:00 colomon joined #perl6
19:00 dalek rakudo/nom: ef8b8f9 | (Elizabeth Mattijsen)++ | src/core/ (2 files):
19:00 dalek rakudo/nom: Ban .length and .bytes from method not found handler
19:00 dalek rakudo/nom:
19:00 dalek rakudo/nom: As suggested on #perl6
19:00 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ef8b8f9cf0
19:04 colomon lizmat++ # on the loose again
19:05 lizmat loose is right, only needed N iterations to get this right :-)
19:05 mavcunha joined #perl6
19:06 zakharyas joined #perl6
19:06 TimToady lizmat: it's not right yet :)
19:06 TimToady should have .elems in there too :)
19:06 lizmat when you're right, you're right  :-)
19:08 lizmat I was also considering doing a levenshtein on the possible method names of the object if method not found
19:08 lizmat would that make sense ?
19:11 TimToady mebbe, though that won't help if you've called the wrong object :)
19:12 cognominal joined #perl6
19:12 lizmat true, but I think that's a smaller chance than a typo in the method name
19:16 * [Coke] has a java project at work that could really benefit from a levenshtein helper on the error messages.
19:16 dalek rakudo/nom: 55d5e36 | (Elizabeth Mattijsen)++ | src/ (2 files):
19:16 dalek rakudo/nom: Add elems to suggestion list for length
19:16 dalek rakudo/nom:
19:16 dalek rakudo/nom: As pointed out by TimToady++
19:16 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/55d5e36655
19:17 lizmat I'm starting to wonder whether the levenshtein algo shouldn't be a first class citizen somehow
19:17 lizmat instead of being hidden in World.nqp
19:18 [Coke] like, @array.leven('guess') == <guess1 guess2 gross> ?
19:18 FROGGS let's do it PHPish and call it str_levenshtein or so :o)
19:20 xfix It's levenshtein or similar_text in PHP
19:20 lizmat [Coke]: on the failed method exception, it would become something like $object.methods.leven($.method)
19:20 xfix Yeah, there are two functions that do very similar operation.
19:21 xfix Except they differ in algorithmic complexity, because, uh, it's PHP.
19:25 dalek rakudo/nom: b385720 | (Elizabeth Mattijsen)++ | docs/ChangeLog:
19:25 dalek rakudo/nom: Add Changelog entry for specific length/bytes feedback
19:25 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b385720e2b
19:37 [Coke] lizmat: seems legit.
19:44 isBEKaml Int and Num aren't the same?
19:45 FROGGS no, they even have different names
19:45 FROGGS like int/double in C
19:46 isBEKaml m: https://gist.github.com/svatsan/9418471
19:46 camelia rakudo-moar 17c92b: OUTPUT«gist not found»
19:47 [Coke] m: https://gist.github.com/svatsan/9418471
19:47 camelia rakudo-moar 17c92b: OUTPUT«gist not found»
19:47 grep0r joined #perl6
19:47 [Coke] weird. took a few seconds to load the first time locally, but is pretty zippy now.
19:47 [Coke] not sure why camelia is complaining.
19:49 FROGGS m: http://gist.github.com/svatsan/9418471
19:49 camelia rakudo-moar 17c92b: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/Q5WuTB2SXKâ�¤Two terms in a rowâ�¤at /tmp/Q5WuTB2SXK:1â�¤------> [32mhttp[33mâ��[31m://gist.git​hub.com/svatsan/9418471[0mâ�¤    expecting any of:â�¤        argument listâ�¤        postfixâ�¤    â€¦Â»
19:49 FROGGS hmmm
19:49 TimToady isBEKaml: it's an array of floaters, but arrays have integer indices
19:50 isBEKaml The reason I posted that gist: I got an error saying something like "Expected Num but got Int instead" for that variable.
19:50 TimToady well, 1..5 produces Ints, not Nums
19:50 isBEKaml TimToady: Is there any way I can get a specific type? .WHAT just gave me (array)
19:51 TimToady .[0].WHAT
19:52 TimToady those Num decls should probably be Numeric instead
19:52 TimToady you only care if the type fills the role
19:52 TimToady well, they should be Real instead
19:52 TimToady since Numeric includes Complex
19:52 TimToady m: say Int ~~ Real
19:53 camelia rakudo-moar 17c92b: OUTPUT«True␤»
19:53 isBEKaml TimToady: thanks. It was from RC :-)
19:53 isBEKaml http://rosettacode.org/wiki/Binary_search#Perl_6
19:53 TimToady probably from before we had those roles :)
19:55 TimToady whoever tested it probably used reals instead of integers
19:56 TimToady actually, they should allow any type that defines cmp
19:58 pecastro joined #perl6
19:59 TimToady why they do that jig with p $mid when it should just take a comparator function is beyond me
20:00 TimToady well, a binary table should know it's comparator in the first place
20:01 TimToady this should probably be rewritten as a binary table role
20:03 kongtomorrow left #perl6
20:08 grondilu r: sub is-narcissistic(Int $n) { $n == [+] $n.comb »**» $n.chars }; .say for (grep .&is-narcissistic, 1 .. *)[^10];
20:08 camelia rakudo-jvm 17c92b: OUTPUT«Nominal type check failed for parameter '$n'␤  in sub is-narcissistic at /tmp/tmpfile:1␤  in block  at /tmp/tmpfile:1␤␤»
20:08 camelia ..rakudo-moar 17c92b: OUTPUT«Nominal type check failed for parameter '$n'; expected Int but got Nil␤  in sub is-narcissistic at /tmp/tmpfile:1␤  in block  at /tmp/tmpfile:1␤␤»
20:08 camelia ..rakudo-parrot 17c92b: OUTPUT«Nominal type check failed for parameter '$n'; expected Int but got Nil instead␤  in sub is-narcissistic at /tmp/tmpfile:1␤  in block  at /tmp/tmpfile:1␤␤»
20:08 treehug8_ joined #perl6
20:09 isBEKaml What's a 'binary table' role? I don't seem to find it anywhere...
20:13 TimToady just an array that keeps itself ordered based on the cmp function it already knows, maintaining the ordering invariant so that a binary search always works under that cmp
20:14 TimToady seems like a very ordinary generic thing to want
20:14 xenoterracide joined #perl6
20:15 isBEKaml Well yes, I got confused when you said "this should probably be rewritten as a binary table role" -- so was wondering if there's some role as 'binary table' :-)
20:15 TimToady not yet
20:16 TimToady it's very like having generic hashes, except the constraint is it has to support comparison, not just equivalence
20:16 TimToady since we have generic hashes, there hasn't been much pressure to write generic binary tables
20:23 raydiak camelia is complaining about gists because the regex she uses to pull the 'view raw' url from the gist's page fails due to changes on github
20:23 raydiak I see the fix, if someone else wants to test it...not up for configuring my own bot instance right now
20:32 kpdisk joined #perl6
20:35 raydiak added the PR to perl6/evalbot, either way
20:35 isBEKaml raydiak: I see the fix too - it's some aria.js change that's making camelia to complain.
20:37 isBEKaml Your PR assumes that 'title' attribute will always be before 'href' -- we should probably add another case too.
20:42 raydiak isBEKaml: it occured to me, but I'm hoping its done a little more cleanly and correctly in the future (with a module for parsing html), so didn't really make any attempt to further future-proof it
20:44 isBEKaml raydiak: I wondered why there wasn't an HTML parser used, but then it's probably overkill just for fetching a single tag and working it.
20:49 raydiak isBEKaml: agreed, I can only imagine someone didn't want to add another dependency just for that one use
20:49 TimToady grondilu: added a faster version of http://rosettacode.org/wiki/Nar​cissistic_decimal_number#Perl_6
20:50 TimToady still takes more than 3 hours to get the first 25 numbers
20:50 masak TimToady: what did you meant at http://irclog.perlgeek.de/​perl6/2014-03-07#i_8399657 ?
20:50 masak r: my ($x, $y) ::= 5, $x + 1; say $y
20:50 camelia rakudo-jvm ef8b8f: OUTPUT«(timeout)»
20:50 camelia ..rakudo-moar ef8b8f: OUTPUT«use of uninitialized value of type Any in numeric context␤1␤»
20:50 camelia ..rakudo-parrot ef8b8f: OUTPUT«use of uninitialized value of type Any in numeric context  in block  at /tmp/tmpfile:1␤␤1␤»
20:50 TimToady I retracted it
20:51 masak oh.
20:51 * masak should backlog completely
20:51 cognominal joined #perl6
20:53 TimToady r: my ($x, $y) ::= 5, gather take $x + 1; say $y
20:53 camelia rakudo-parrot ef8b8f: OUTPUT«6␤»
20:53 camelia ..rakudo-jvm ef8b8f, rakudo-moar ef8b8f: OUTPUT«use of uninitialized value of type Any in numeric context␤1␤»
20:53 TimToady \o/
20:54 TimToady r: my ($x, $y) ::= gather take 5, $x + 1; say $y
20:54 camelia rakudo-parrot ef8b8f: OUTPUT«use of uninitialized value of type Any in numeric context  in block  at /tmp/tmpfile:1␤␤Not enough positional parameters passed; got 1 but expected 2␤  in block  at /tmp/tmpfile:1␤␤»
20:54 camelia ..rakudo-jvm ef8b8f, rakudo-moar ef8b8f: OUTPUT«use of uninitialized value of type Any in numeric context␤Not enough positional parameters passed; got 1 but expected 2␤  in block  at /tmp/tmpfile:1␤␤»
20:54 TimToady aww
20:54 TimToady r: my ($x, $y) ::= gather {take 5; take $x + 1}; say $y
20:54 camelia rakudo-jvm ef8b8f, rakudo-moar ef8b8f: OUTPUT«use of uninitialized value of type Any in numeric context␤1␤»
20:54 camelia ..rakudo-parrot ef8b8f: OUTPUT«use of uninitialized value of type Any in numeric context  in block  at /tmp/tmpfile:1␤␤1␤»
20:54 grondilu TimToady: noted.  Seems nice.
20:54 TimToady why doesn't that one work?
20:55 TimToady I guess something's not strictly lazy there
20:55 masak TimToady: want me to rakudobugsubmit it?
20:55 TimToady not sure
20:56 * masak branches into two universes, and submits it in one of them
20:56 * moritz wouldn't expect signature binding to be that lazy
20:56 TimToady r: my ($x, $y) ::= 5, gather take $x + 1; say $y
20:56 camelia rakudo-parrot ef8b8f: OUTPUT«6␤»
20:56 camelia ..rakudo-jvm ef8b8f, rakudo-moar ef8b8f: OUTPUT«use of uninitialized value of type Any in numeric context␤1␤»
20:56 TimToady but it's that lazy, on parrot
20:57 * tadzik can't wait to see which universe he ends up in
20:57 timotimo hey tadzik :)
20:57 tadzik probably in both :D
20:57 tadzik timotimo: heyhye
20:58 masak timotimo: ping
20:58 timotimo pong
20:58 masak timotimo: isBEKaml's question at http://irclog.perlgeek.de/​perl6/2014-03-07#i_8400645
20:58 timotimo oh
20:58 timotimo i think i made a tarball
20:59 timotimo probably didn't get anyone to upload it :o
20:59 isBEKaml masak, timotimo: I got it off github releases tab.
20:59 masak lizmat++ # https://github.com/rakudo/rakudo/commit/ef8b8f9cf0
20:59 masak lizmat: I think that's a nicer solution, even if it messes up the method-not-found logic a little.
21:00 timotimo http://t.h8.lv/nqp-2014.02.tar.gz
21:00 tadzik oh, I'm doing a release this month
21:00 tadzik mishu<TAB><TAB>
21:01 masak tadzik: wow, was that an obscure reference to the bot I haven't written yet? :)
21:01 tadzik I want a robot too :P
21:01 masak we all do.
21:01 masak tadzik: how about this:
21:01 masak tadzik: we take a weekend sometime, and we flesh out the design during a blitz design session. then we build the thing.
21:02 tadzik sounds good to me
21:02 masak tadzik: I have it all pretty planned out alread. I just need to allocate time for it.
21:02 masak already*
21:02 tadzik so it's all-ready? :P
21:02 masak hehe
21:02 masak all-most
21:02 isBEKaml yeah, tadzik just has to show up. SMOP. :P
21:02 tadzik :)
21:02 tadzik I want to see Sweden again
21:03 tadzik last time it was blizzard-cold
21:03 masak Sweden is really close to Poland.
21:03 tadzik it is
21:03 masak and it's not cold anymore.
21:03 masak we have spring here now.
21:03 tadzik I think there's a boat going there too
21:03 arnsholt Norway too. And apparently there's going to be several hours of sun tomorrow \o/
21:03 arnsholt I think we've had something like three sunny days since new year. It's ridiculous
21:05 tadzik well, the year has just started :)
21:05 arnsholt I'd still expect a bit more than three days with sun in two months =p
21:05 colomon beautiful sunny day here at my parents', and it's even a bit above freezing.  Love these days here, the bright white snow and the bright blue river are a gorgeous contrast.
21:05 arnsholt In fact, we're already about 16% into the new year
21:05 isBEKaml 5% of sunlight -- fun :-)
21:06 masak arnsholt: might be we here in .se took all the sun. sorry 'bout that.
21:06 colomon surprisingly little ice in the river considering the Great Lakes are frozen.
21:07 arnsholt masak: Bah!
21:08 isBEKaml arnsholt: then the Finns are worse off than the Nordics. :-)
21:08 masak arnsholt: we should cease this silly rivalry between .no and .se -- how about we re-form the union, and make Gothenburg the capital? :P
21:08 isBEKaml (if my geo-sense is right)
21:09 timotimo can somebody upload that tarball for me?
21:09 TimToady masak: we should add a third deck of guns to the ship, too
21:10 masak TimToady: ouch.
21:10 masak :P
21:11 * masak inspects his national pride for cuts and bruises :)
21:11 moritz TimToady: upload what tarball where?
21:11 moritz sorry, meant timotimo
21:11 masak TimToady: also, I can guess which museum you've been to. we were there a few months back.
21:12 isBEKaml moritz: timotimo was referring to the 2014.02 tarball for nqp for upload to rakudo.org/downloads.
21:13 timotimo he was, aye
21:14 isBEKaml o.O(timotimo's somehow related to Cap'n Crunch "I'm he.")
21:15 timotimo %)
21:15 timotimo he-man! :)
21:16 moritz and where can I find it?
21:16 colomon " .no and .se -- how about we re-form the union," and become .nose?
21:17 isBEKaml yeah, they'd turn into disapproving fellows. Turning up nose to everything.
21:17 moritz ah, found the link in the backlog
21:18 moritz uploaded.
21:18 timotimo thank you
21:18 timotimo it was only a page up :)
21:19 masak moritz++
21:20 arnsholt masak: Excellent idea, everyone'd be equally upset with Gothenburg as capital =D
21:21 masak arnsholt: except, I guess, people in Gothenburg, who'd all go "finally!"
21:24 beastd joined #perl6
21:28 arnsholt Tru dat, but how many people would that be, y'know, in the broader scheme of things?
21:28 masak half a million, give or take.
21:29 masak ...about the population of Oslo :P
21:30 arnsholt Not many at all, then ;)
21:34 masak actually, scratch this idea. let's make a Sweden-Denmark-Norway-Iceland union instead.
21:34 tadzik the Cold Fusion
21:34 moritz tadzik++
21:36 masak hehe
21:38 isBEKaml and they SIN'D.
21:40 tadzik 2 more countries and you'll have DISNEY
21:41 * masak .oO( Eritrea and Yemen? )
21:41 isBEKaml Call Eritrea and Yugoslavia. You'd be then "diverse" group.
21:42 TimToady how 'bout East Germany and Yugoslavia?
21:42 isBEKaml or Estonia and Yemen.
21:42 * colomon is not clear if Yugoslavia actually exists anymore
21:42 tadzik Estonia is pretty close
21:42 TimToady well, I suggest East Germany because it has the opposite problem to Yugoslavia
21:42 masak can I change to Egypt? it would offset the cold a bit.
21:42 colomon TimToady: ah, yes, missed that detail in your suggestion.  :)
21:45 isBEKaml or Ecuador and Yggdrasil :P
21:48 TimToady a line and a tree?
21:49 isBEKaml I was going for a seed and a tree.
21:52 jnthn Darn, weather was nice in Stockholm. Nasty here.
22:04 treehug88 joined #perl6
22:06 masak 'night, #perl6
22:06 tadzik good knight
22:13 virtualsue joined #perl6
22:19 pippo joined #perl6
22:40 virtualsue joined #perl6
22:41 BenGoldberg joined #perl6
22:49 lizmat masak: re  lizmat++ # https://github.com/rakudo/rakudo/commit/ef8b8f9cf0 , looking at ways to handle that the same as sub not found at compile time
22:50 lizmat so with levenshtein suggestions: then these particular ones could be added from another data structure (e.g. a hash with special case suggestions)
22:57 lizmat sleep&
23:06 Psyche^ joined #perl6
23:10 pippo left #perl6
23:29 lue r: say "ABC" ~~ / <wb> "ABC" <wb> /
23:29 [Coke] wubba wubba
23:29 camelia rakudo-jvm b38572: OUTPUT«(timeout)»
23:29 camelia ..rakudo-parrot b38572, rakudo-moar b38572: OUTPUT«「ABC」␤ wb => 「」␤ wb => 「」␤␤»
23:29 lue pm: say 'ABC[]' ~~ /<wb> 'ABC[]' <wb>/
23:29 lue r: say 'ABC[]' ~~ /<wb> 'ABC[]' <wb>/
23:30 camelia rakudo-parrot b38572, rakudo-jvm b38572, rakudo-moar b38572: OUTPUT«Nil␤»
23:31 lue Why does it fail when you have funny characters at the end? I was hoping to avoid writing my own "surrounded by spaces or ^/$ " rule
23:33 TimToady I believe wb is defined in terms of \w
23:34 TimToady r: say 'ABC[]' ~~ /<|s> 'ABC[]' <|s>/
23:34 camelia rakudo-parrot b38572, rakudo-jvm b38572, rakudo-moar b38572: OUTPUT«「ABC[]」␤␤»
23:34 TimToady r: say ' ABC[] ' ~~ /<|s> 'ABC[]' <|s>/
23:34 camelia rakudo-parrot b38572, rakudo-jvm b38572, rakudo-moar b38572: OUTPUT«「ABC[]」␤␤»
23:34 lue Ah. Funny thing is, I tried <|w> , but forgot about the other <| rules :)
23:35 TimToady I belive <|s> is what yer lookin fer
23:35 timotimo what are those?
23:35 TimToady <|x> means a boundary between \x and \X
23:35 TimToady either way
23:35 timotimo why didn't i know about that before?
23:36 lue TimToady: I skipped over them because "grapheme" and "codepoint" feel like they could conceivably include whitespace, which I don't want.
23:36 lue well, maybe not grapheme, but certainly codepoint.
23:36 BenGoldberg So it's like perl5's \b, but generalized?  Cool.
23:37 lue Oh, I see I was taking S05's listing of <| as an exhaustive list. Fixing...
23:40 lue TimToady: IIUC, would <|myrule> check for a boundary between <myrule> and <!myrule> ?
23:41 TimToady well, <+myrule> and <-myrule> maybe
23:41 timotimo huh, + and -?
23:41 TimToady I don't know how far it has been generalized
23:42 lue TimToady: the spec is way too sparse on <| , that's why I'm asking.
23:42 timotimo there's even more stuff in S05 i don't know about? =o
23:42 TimToady the rule definitely has to match something on one side, but maybe not on the negative side
23:42 spiritus joined #perl6
23:42 TimToady that doesn't mean it can match with no width if something is there
23:42 lue are the backslash sequences available as single-char rules in general? (e.g.  <.h> is just \h )
23:43 TimToady no
23:43 TimToady at least, not with the same name
23:43 lue So it's a special case for <| then
23:44 TimToady r: say ' ABC[] ' ~~ /<|h> 'ABC[]' <|h>/
23:44 camelia rakudo-parrot b38572, rakudo-jvm b38572, rakudo-moar b38572: OUTPUT«「ABC[]」␤␤»
23:48 dalek specs: 22231b9 | lue++ | S05-regex.pod:
23:48 dalek specs: [S05] Expand information on <|rule> syntax.
23:48 dalek specs:
23:48 dalek specs: Wouldn't want someone thinking that was an exhaustive list, now would
23:48 dalek specs: we? :)
23:48 dalek specs: review: https://github.com/perl6/specs/commit/22231b90e4

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

Perl 6 | Reference Documentation | Rakudo