Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-12-02

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:12 raydiak oh right
00:12 raydiak tony-o: you might have more luck if you make it an "our" method
00:12 raydiak m: class Foo { our method foo ($foo) {say $foo} }; my $f = &Foo::foo; $f(Foo,123);
00:12 camelia rakudo-moar 91d899: OUTPUT«123␤»
00:15 vendethiel joined #perl6
00:24 TimToady an "our" method is not really a method, it's just a subroutine in disguise
00:27 TimToady the problem with m:g and smartmatch is that m:g does not yet return a fake Match object
00:27 TimToady m: say (m:g/\w/.WHAT given "abcde")
00:27 camelia rakudo-moar 91d899: OUTPUT«(List)␤»
00:27 TimToady m: say (m:g/\w/ given  "abcde")
00:27 camelia rakudo-moar 91d899: OUTPUT«「a」␤ 「b」␤ 「c」␤ 「d」␤ 「e」␤␤»
00:27 TimToady so use given for now, instead of ~~
00:28 TimToady smls: ^^
00:33 tony-o guess i'm changing this to a module then :-)
00:33 TimToady if you really want a method, you'd can as the MOP for the method reference using .can
00:33 TimToady but it won't be stored in a package
00:34 TimToady unlike in Perl 5
00:34 tony-o i'm trying to pass an instance method as a reference
00:34 TimToady with or without its invocant?
00:34 tony-o with
00:35 TimToady the only way to do that is with $code.assuming($obj), where $code is what you get back from the MOP
00:36 TimToady but it probably means you just want to be using functions instead
00:37 TimToady well, okay, you can also just return a closure instead of using assuming
00:37 TimToady -> |args { $obj.method(|args) }  or so
00:38 TimToady in that case the method lookup would be late bound
00:39 TimToady unlike looking up $code = $obj.can("method")[0], which is earlier bound
00:44 tony-o m: class c { method g() {'g'.say;} }; sub r($call) {'r'.say;$call();'/r'.say;}; r(c.new.can('g')[0]);
00:44 camelia rakudo-moar 91d899: OUTPUT«r␤Too few positionals passed; expected 1 argument but got 0␤  in method g at /tmp/8sYbjHE0lJ:1␤  in sub r at /tmp/8sYbjHE0lJ:1␤  in block <unit> at /tmp/8sYbjHE0lJ:1␤␤»
00:44 tony-o m: class c { method g() {'g'.say;} }; sub r($call) {'r'.say;$call();'/r'.say;}; my $c = c.new; r($c.^can('g')[0]);
00:44 camelia rakudo-moar 91d899: OUTPUT«r␤Too few positionals passed; expected 1 argument but got 0␤  in method g at /tmp/aB9zymykGC:1␤  in sub r at /tmp/aB9zymykGC:1␤  in block <unit> at /tmp/aB9zymykGC:1␤␤»
00:45 dayangkun joined #perl6
00:47 tony-o m: class c { method g() {'g'.say;} }; sub r($call) {'r'.say;$call();'/r'.say;}; my $c = c.new; r(-> |args { $c.g(|args); });
00:47 camelia rakudo-moar 91d899: OUTPUT«r␤g␤/r␤»
00:48 tony-o closure is probably easiest
00:48 tony-o thanks TimToady
00:49 Spot__ joined #perl6
00:50 ipa_blah joined #perl6
00:51 Timbus m: class c { method g() {'g'.say;} }; sub r($call) {'r'.say;$call();'/r'.say;}; my $c = c.new; r(c.new.can('g')[0].assuming($c));
00:51 camelia rakudo-moar 91d899: OUTPUT«r␤g␤/r␤»
00:53 Timbus yeah. blocks are definitely the best way to pass 'lazy code' around. would macros be able to fix that
00:54 Timbus or course they could
00:54 Timbus of*
00:55 ggherdov joined #perl6
00:59 stapler joined #perl6
00:59 stapler hi!
01:01 Timbus helo
01:01 TimToady tony-o: to do it the .can way, you also have to provide teh invocant with .assuming
01:06 vendethiel joined #perl6
01:12 ssqq joined #perl6
01:14 tony-o interesting
01:14 tony-o similar to the .apply in js
01:15 tony-o but more secure
01:25 japhb I haven't been able to update my r-j build today (first time in ~a month), because it crashes attempting to install bootstrap panda.  Is this known?
01:27 japhb Also, is it expected that pl6anet.org is unstyled?
01:29 stapler joined #perl6
01:32 ash___ joined #perl6
01:32 ash___ Hi guys
01:32 ash___ Can you explain the loop/winner construction for working with channels?
01:33 ash___ Namely, I am not sure about how this works:
01:33 ash___ $ch = Supplier.for(1..10).Channel;
01:34 ash___ loop { winner $ch { more $ch -> $x {say "x=$x"}  more $ch -> $y {say "y=$y"} done {...}}}
01:34 ash___ here, the two more keywords, do they state any kind of parallelism>
01:34 ash___ ?
01:41 ugexe japhb: if its the thread exception error im thinking of, then just keep trying
01:51 dalek ecosystem: 6a13a31 | tony-o++ | META.list:
01:51 dalek ecosystem: Simple "REST"ful style router for http-async
01:51 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/6a13a31843
01:52 vendethiel joined #perl6
01:54 timotimo ash___: i don't think supplying the same argument to more twice makes sense
01:55 timotimo winner is about race-free-ly matching one of many channels/promises to give a result/value or finish
01:55 timotimo also, i think winner has been re-named to earliest recently?
01:56 timotimo http://perlcabal.org/syn/S17.html#Channels - maybe this explanation helps?
01:56 timotimo well, "specification" really
01:57 japhb ugexe: Ewww.  >.<
01:58 timotimo japhb: yeah, pl6anet.org was supposed to be a very short-term stop-gap solution
01:58 japhb timotimo: Ah, I see.
02:01 BenGoldberg Is there a more concise way to do the following?
02:01 BenGoldberg m: my @a = (^6).pick(*); my $p = Promise.new; for ^4 { my @b = @a; start { repeat { @b .= pick(*) } until [<=] @b; $p.keep(@b) } }; say await $p;
02:01 camelia rakudo-moar 91d899: OUTPUT«0 1 2 3 4 5␤»
02:01 BenGoldberg Keeping it as a concurent bogosort, of course ;)
02:02 timotimo BenGoldberg: can you try to turn the @b + @b .= pick(*) ... [<=] @b into a sequence?
02:02 timotimo (because fsck memory usage, am i rite)
02:02 tony-o i had to look up bogosort to figure out why you'd do something that way
02:03 timotimo :D
02:03 tony-o that should be a module..lol
02:04 dayangkun joined #perl6
02:06 BenGoldberg m: my @s := [(^5).pick(*)], [$_.pick(*)] ... [<=] @$_; say @s[0]; say @s[1];
02:06 camelia rakudo-moar 91d899: OUTPUT«2 0 1 3 4␤Nil␤»
02:11 timotimo m: my @s := [(^5).pick(*)], [(@$_).pick(*)] ... [<=] @$_; say @s[0]; say @s[1];
02:11 camelia rakudo-moar 91d899: OUTPUT«1 2 4 0 3␤Nil␤»
02:12 timotimo m: my @s := [(^5).pick(*)], [(@$_).pick(*)] ... { [<=] @$^a }; say @s[0]; say @s[1];
02:12 camelia rakudo-moar 91d899: OUTPUT«3 0 2 4 1␤␤»
02:12 timotimo i wonder if it flattens the individual arrays before applying the endpoint check
02:13 timotimo m: my @s := [(^5).pick(*)], [(@$_).pick(*)] ... { say "checking $^a.perl()" }; say @s[0]; say @s[1];
02:13 camelia rakudo-moar 91d899: OUTPUT«checking [4, 1, 3, 0, 2]␤4 1 3 0 2␤Nil␤»
02:13 timotimo m: say [<=] @$_ given [4, 1, 3, 0, 2]
02:13 camelia rakudo-moar 91d899: OUTPUT«False␤»
02:14 timotimo oh, wait
02:14 timotimo we'd have to reverse that, no?
02:14 timotimo hm, no, we wouldn't
02:15 timotimo ah
02:16 timotimo it probably doesn't build the code properly
02:16 timotimo m: my @s := [(^5).pick(*)], { [(@$^a).pick(*)] } ... { [<=] @$^a }; say @s[0]; say @s[1];
02:16 camelia rakudo-moar 91d899: OUTPUT«0 1 4 3 2␤3 2 1 0 4␤»
02:16 timotimo m: my @s := [(^5).pick(*)], { [(@$^a).pick(*)] } ... { [<=] @$^a }; say @s[0]; say @s[*-1]
02:16 camelia rakudo-moar 91d899: OUTPUT«2 3 4 0 1␤0 1 2 3 4␤»
02:17 japhb m: my @a = ^6.pick(*); my $p = Promise.new; for ^4 {start {$p.keep((@:=$@a, *.pick(*) ... {[<=] $^a})[*-1])}}; say await $p;
02:17 camelia rakudo-moar 91d899: OUTPUT«0 1 2 3 4 5␤␤eption in code scheduled on thread 139789340813056»
02:17 japhb ^^ Either produces the right answer in parallel, or a thread exception, or both.  In the above case, both.  :-(
02:18 tony-o is the thread-exception thing a known issue with moar?
02:18 tony-o i've been getting it a lot ..
02:18 tony-o now that i'm no longer working in serials
02:18 japhb I dunno.  It really shouldn't be, but something is clearly wrong.
02:19 timotimo well, jnthn has said often enough that the parallel stuff hasn't had enough time to harden yet
02:19 tony-o what happened to diakopter and moar?
02:19 japhb diakopter is deep in no-free-hacking-'time land
02:20 tony-o is moar still being developed?
02:21 japhb tony-o: Oh definitely.  jnthn is the founder and still active (just not today).  There are a number of other contributors as well.
02:22 tony-o ahh, i thought diakopter started that project, he recruited me into the 5 lines i commited to it :p
02:22 japhb I believe he was #2 or #3.
02:24 jimmy_ joined #perl6
02:26 [Coke] japhb: that prints out 0 1 2 3 4 5 locally.
02:27 [Coke] This is perl6 version 2014.11-46-g62c092f built on MoarVM version 2014.11-59-g25a4405 ( OS X)
02:27 [Coke] doing a fresh rebuild to check...
02:35 japhb [Coke]: If you re-run it a few times, do you always get the same (correct) result?
02:40 [Coke] japhb: fresh build, same thing.
02:41 [Coke] while [ 1 ] ; do  perl6 foo.p6 ; done # gets me a page full of the same results.
02:41 [Coke] ProductName:Mac OS X
02:41 [Coke] ProductVersion:10.9.5
02:45 [Coke] IWBNI panda said "please wait, panda-ing" during a rebootstrap instead of vanishing.
02:45 * [Coke] is bummed that X 1..13 doesn't work anymore.
02:59 timotimo tony-o: i'm among the people who work on moar, though my contributions are very rarely features, mostly little tweaks and attempts to improve performance
03:03 japhb [Coke]: No, I meant, just rerun it over and over (up-arrow, enter  :-)
03:03 [Coke] japhb: ... my way is more efficient. no, same result. :P
03:03 japhb [Coke]: Oh, sorry, didn't see the line where you while-1'ed.
03:04 japhb In any case, I guess I should be happy it's rock solid on *some* OS.  Clearly not on whatever camelia is running on at the moment,
03:05 japhb s:2nd/,/./
03:05 [Coke] wierd that it's OS X, though. :)
03:05 KCL_ joined #perl6
03:07 * japhb is working his way through reading the source for all concurrency classes in Rakudo to get a handle on how to start testing the underlying nqp::ops.
03:07 Mso150 joined #perl6
03:10 * [Coke] commits some stuff to https://github.com/coke/poker, which he hasn't done in ages. whee.
03:22 noganex joined #perl6
03:34 onebitboy joined #perl6
03:50 dayangkun joined #perl6
03:51 erkan joined #perl6
03:51 erkan joined #perl6
03:56 stapler you guys seem alive an kicking for the most part
03:58 immortal joined #perl6
04:04 erkan joined #perl6
04:24 sorear joined #perl6
04:36 adu joined #perl6
05:11 kaare_ joined #perl6
05:24 araujo joined #perl6
05:35 onebitboy joined #perl6
05:39 onebitboy joined #perl6
05:44 onebitboy joined #perl6
06:04 telex joined #perl6
06:14 dayangkun joined #perl6
06:27 jimmy_ joined #perl6
06:42 kaleem joined #perl6
06:44 Possum joined #perl6
06:50 rindolf joined #perl6
06:57 Possum joined #perl6
07:00 TimToady was livelier before the sun wandered out over the Pacific...
07:00 anaeem1 joined #perl6
07:00 TimToady we need some minions in Hawaii :)
07:01 anaeem1_ joined #perl6
07:04 V_S_C joined #perl6
07:08 [Sno] joined #perl6
07:11 lizmat the minions in Perl just woke up
07:12 woolfy I see Perl houses
07:13 lizmat (the other Perl people are still asleep, apparently :-)
07:16 sqirrel_ joined #perl6
07:21 FROGGS joined #perl6
07:31 oetiker joined #perl6
07:33 chenryn joined #perl6
07:46 zakharyas joined #perl6
07:59 Isp-sec joined #perl6
08:00 Possum joined #perl6
08:06 ribasushi joined #perl6
08:07 virtualsue joined #perl6
08:11 cibs joined #perl6
08:11 zakharyas1 joined #perl6
08:18 darutoko joined #perl6
08:25 krunen joined #perl6
08:30 araujo joined #perl6
08:36 sqirrel_ joined #perl6
08:42 onebitboy joined #perl6
08:46 KCL joined #perl6
08:47 sergot morning o/
08:48 TimToady \o
08:49 immortal joined #perl6
08:49 vendethiel joined #perl6
08:54 Mso150 joined #perl6
08:58 dalek rakudo/newio: 6e8aaa2 | (Elizabeth Mattijsen)++ | src/core/ (2 files):
08:58 dalek rakudo/newio: Fix some spurt() related spectest glitches
08:58 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/6e8aaa2272
08:58 mathw o/
09:00 molaf_ joined #perl6
09:14 dddddd joined #perl6
09:14 ssqq joined #perl6
09:15 mvuets joined #perl6
09:15 dalek nqp: 6bde551 | TimToady++ | src/ (4 files):
09:15 dalek nqp: reduce NFAs 40% by removing 2/3 of epsilons
09:15 dalek nqp:
09:15 dalek nqp: Edges that point to simple epsilon states can instead point to whatever
09:15 dalek nqp: the epsilon points to (transitively).  Identical fates can be similarly
09:15 dalek nqp: merged.  Once the useless states are delinked, we resequence the states
09:15 dalek nqp: and associated edges, removing any states that no longer have any
09:15 dalek nqp: reference, and remapping the state pointers.
09:15 dalek nqp:
09:15 dalek nqp: Also fixed a bug in quant that can produce states with no edges when quant
09:15 dalek nqp: is called with a 'to' of -1.
09:15 dalek nqp:
09:15 dalek nqp: Also installed a whole lot of debugging code to figure all this out.
09:15 dalek nqp:
09:15 dalek nqp: Also added tests for epsilons pointing to 0 on parrot and jvm (moar already
09:15 dalek nqp: has this check).  Should become unnecessary once nqp is rebootstrapped, but
09:15 dalek nqp: the stage 0 NFAs have the edgeless state bug that triggers this.
09:15 dalek nqp: review: https://github.com/perl6/nqp/commit/6bde5518b0
09:15 dalek nqp: 70056d5 | TimToady++ | tools/build/MOAR_REVISION:
09:15 dalek nqp: bump moar
09:15 dalek nqp: review: https://github.com/perl6/nqp/commit/70056d592c
09:17 jimmy_ \o TimToady++
09:17 lizmat TimToady++ indeed!
09:17 lizmat commute to Amsterdam&
09:21 woolfy left #perl6
09:24 TimToady there is, apparently, still some subtle bug causing t/spec/integration/99problems-41-to-50.t to fail, but that's the only failure that seems related
09:24 jimmy_ TimToady: dentout's arg looks like unused?
09:25 TimToady it returns it
09:26 gtodd joined #perl6
09:26 TimToady so we can unindent after whatever the final statement is
09:32 dalek rakudo/nom: 03d1599 | TimToady++ | tools/build/NQP_REVISION:
09:32 dalek rakudo/nom: bump nqp
09:32 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/03d15991f3
09:33 TimToady it's vaguely possible that the parsing bug that is biting 99problems-41-to-50.t will also affect something downstream, but hopefully not
09:34 TimToady it seems to involve a 0 state transition from a non-epsilon somehow, but I'll look at that tomorrow
09:34 tadzik TimToady++
09:34 moritz stage parse: 30s
09:34 moritz TimToady++
09:35 TimToady uh, are you using nqp/master?  or did you wait for the bump?
09:36 moritz nqp/master
09:36 moritz and moar/master
09:36 TimToady what was yours before?
09:37 nwc10 good *, *
09:37 * nwc10 did wonder that
09:37 TimToady this shouldn't really speed up the parser by more than a few percent
09:37 moritz TimToady: no idea; it's also been a while since I last looked at the build time on this machine
09:37 TimToady given the nfa was only 10% of the parser before this
09:38 TimToady also, compiling grammars has more overhead, but they run faster once they're compiled, so parsing a parser is a bit of a wash
09:39 TimToady should also help any regex that uses nfa
09:40 salv0 joined #perl6
09:44 dakkar joined #perl6
09:44 TimToady and startup should be a bit faster too
09:44 TimToady since the optimization is applied before serialization
09:45 vendethiel joined #perl6
09:46 jimmy_ didn't see a faster startup, I think that's because coresetting init spents too much time
09:52 Ugator joined #perl6
09:55 abraxxa joined #perl6
10:03 TimToady this is bizarre, when I checked out rakudo on a different machine and configed it, it says it pulled in 650333f for MoarVM, just as the tag is, but it's missing the patch that showed up in #moarvm a couple hours ago
10:04 TimToady how can two different versions have the same hash?
10:05 TimToady my nqp and moar are both on branch master, and the bumps both looks right
10:06 TimToady lemme try downloading again
10:06 fhelmberger joined #perl6
10:13 pecastro joined #perl6
10:15 TimToady fresh clone seems to have fixed it somehow
10:19 ssqq which file define token *<ident>* in the nqp repo?
10:19 FROGGS TimToady++ # 6bde551
10:20 TimToady and jvm only fails the same 99problems test on my laptop, so I think I'll go to bed and let my other machine crank on all the spectests while I sleep
10:21 vendethiel joined #perl6
10:21 TimToady zzz &
10:23 FROGGS sleep wall
10:23 FROGGS err, well
10:23 TimToady with a will
10:24 ssqq_ joined #perl6
10:27 bjz joined #perl6
10:37 virtualsue joined #perl6
10:44 denis_boyun_ joined #perl6
10:52 Ulti could I get an invite for the advent calendar? Wordpress username is 'matteoates'
10:53 virtualsue joined #perl6
10:55 Ulti also whatever changes have happened in the last couple of days ++ 23% speed up on my bioinformatics stuff
10:55 Ulti :)
10:59 jnthn mebbe TimToady++'s NFA work, if you're parse-heavy...
11:02 Ulti actually I haven't run the parsing test but I noticed yesterday that was fast enough that I couldn't notice it doing it on a reasonable sized file when it used to take a while
11:02 Ulti this is mostly splitting strings into lists and back again
11:06 pecastro joined #perl6
11:11 vendethiel joined #perl6
11:12 Ulti out of interest what memory usage should I expect from rakudo on moarvm just for hello world?
11:16 tadzik up to 200M, I think?
11:16 tadzik just guessing :)
11:18 Ulti ~132MB for me here
11:22 tadzik here it seems to be below 100, freshly built
11:22 tadzik how are you measuring it though?
11:37 chenryn joined #perl6
11:44 mvuets joined #perl6
11:48 mr-foobar joined #perl6
11:54 Possum joined #perl6
11:54 Ulti memusg which basically calls ps over and over
11:55 kurahaupo joined #perl6
11:55 Ulti so has a bias for longer running jobs, like it says ruby and perl use about 1KB to do hello world which feels too small
11:56 moritz $ /usr/bin/time ./perl6-m -e ''
11:56 moritz 0.20user 0.02system 0:00.23elapsed 99%CPU (0avgtext+0avgdata 94612maxresident)k
11:56 moritz so about 100M max RSS
11:57 moritz though I guess the virtual memory size might be more interesting
11:57 Alina-malina joined #perl6
11:57 ssqq_ joined #perl6
12:01 ssqq joined #perl6
12:06 jferrero joined #perl6
12:12 smls joined #perl6
12:13 smls m: say +"aa\nbb\n".comb(/^^/); say +"aa\nbb\ncc".comb(/^^/);
12:13 camelia rakudo-moar 91d899: OUTPUT«2␤3␤»
12:13 smls ^ Why does it not match the final newline in the first case?
12:16 rindolf joined #perl6
12:18 colomon smls: Because you asked it to match the beginning of lines, and no line begins there?
12:18 mr-fooba_ joined #perl6
12:18 smls does an empty line not have a beginning? :)
12:24 prevost joined #perl6
12:29 psch joined #perl6
12:29 psch hi #perl6
12:29 psch S05:804 # smls, as reference
12:29 synopsebot Link: http://perlcabal.org/syn/S05.html#line_804
12:30 psch no idea if it would make more sense to have line-beginning at the end of a line that ends with "\n", but it's been thought about apparently
12:30 psch s/end of a line/end of a string/
12:30 smls ok, thanks
12:31 timotimo my core setting moarvm file is still 13 mb, i wonder how much of that is serialized NFA
12:37 colomon smls: there was oodles of thought given to what empty strings you might get back from comb.  I don't remember all the rules, alas.
12:38 smls yeah come to think of it, the way it works probably does DWIM for most use-cases of ^^
12:39 smls in my case I'll just use (1 + .comb(/\n/))
12:39 sven_123 joined #perl6
12:40 ssqq joined #perl6
12:48 colomon m: say "aa\nbb\n".comb(/^^/); say "aa\nbb\ncc".comb(/^^/);
12:48 camelia rakudo-moar 91d899: OUTPUT« ␤  Ã¢ÂÂ¤Ã‚»
13:21 mephinet- joined #perl6
13:21 mephinet- joined #perl6
13:26 jnthn timotimo: It's your Perl6/Grammar.nqp that shoulda shrunk for the most part
13:27 timotimo ah, of course
13:28 timotimo 3.1 megabytes. i wonder how big it was before
13:28 kaleem joined #perl6
13:31 psch timotimo: i have a Perl6/Grammar.moarvm from a few days ago with 5.5MB here
13:31 psch the "rougly 40%" seems to be a decent estimate
13:33 dayangkun joined #perl6
13:34 timotimo cool
13:34 nwc10 is there any command line parsing for NQP other than src/HLL/CommandLine.nqp ?
13:34 nwc10 and if so, is there any way to use it other than tools/build/gen-cat.pl?
13:34 nwc10 why am I asking - because I would like to write a build tool *in* NQP
13:43 psch i don't think there's anything but src/HLL/CommandLine.nqp, but it's also used in HLL/Compiler.nqp which hands the Result to the process, iirc
13:44 mr-foobar joined #perl6
13:45 * psch still finds bootstrapping compiler somewhat magical
13:47 jnthn Bootstrapping compiler finds itself somewhat magical... :)
13:47 arnsholt I'm discovering enough magic in making a non-bootstrapping compiler
13:48 moritz :-)
13:50 arnsholt To get all functions to be class instances I'll probably cheat a bit, at least for the initial iteration
13:53 smls m: note "foo"; sub note ($msg) { CORE::note("Info: $msg") }
13:53 camelia rakudo-moar 91d899: OUTPUT«Cannot find method 'Any'␤  in sub note at /tmp/WdJJaTCqov:1␤  in block <unit> at /tmp/WdJJaTCqov:1␤␤»
13:53 smls ^ Is something like that possible?
13:53 arnsholt Oh come to think of it, the spec actually allows for some cheating, with the separation between built-in and user-defined functions
13:53 arnsholt Yaaay \o/
13:54 psch smls: delayed declaration? or overwriting builtins?
13:54 smls wrapping built-ins
13:54 smls e.g. add ANSI color codes to all warn/note messages
13:54 psch m: my &note = &note.assuming("Info: " ~ *); note("test")
13:54 timotimo m: say &SETTING::note
13:54 camelia rakudo-moar 91d899: OUTPUT«No such method 'assuming' for invocant of type 'Callable'␤  in block <unit> at /tmp/2TdHeYzyXt:1␤␤»
13:54 camelia rakudo-moar 91d899: OUTPUT«(Any)␤»
13:54 moritz that's the beauty of the built-ins just being in an outer scope
13:55 timotimo m: say SETTING::note
13:55 camelia rakudo-moar 91d899: OUTPUT«(Any)␤»
13:55 moritz m: say CORE::<&note>
13:55 camelia rakudo-moar 91d899: OUTPUT«sub note (Any |) { #`(Sub|69342656) ... }␤»
13:55 timotimo ah
13:55 moritz it's not a package
13:55 psch i wonder if it's sensible to &assuming with a WhateverCode.  probably not...
13:56 psch m: my &note = -> { note("Info: " ~ $^a) }; note("test")
13:56 camelia rakudo-moar 91d899: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/2QNg0AET_Y�Placeholder variable '$^a' cannot override existing signature�at /tmp/2QNg0AET_Y:1�------> [32mmy &note = -> { note("Info: " ~ $^a) }[33m�[31m; note("test")[0m�    expecting…»
13:56 psch oh, right
13:57 psch m: my &note = { note("Info: " ~ $^a) }; note("test")
13:57 camelia rakudo-moar 91d899: OUTPUT«Memory allocation failed; could not allocate 1583080 bytes␤»
13:57 colomon :\
13:57 psch m: { my &note = { &CORE::<note>("Info: " ~ $^a) }; note("test") }
13:57 camelia rakudo-moar 91d899: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/4TMEoZ0ppT�Undeclared routine:�    &CORE used at line 1��»
13:58 psch eh, now i have all the pieces i think... :)
13:58 psch sorry for the spam
14:00 jnthn hah, that large allocation was probably yet more stack frames :P
14:00 smls m: sub note { CORE::<&note>("Info: $^a") }; note "test"
14:00 camelia rakudo-moar 91d899: OUTPUT«Info: test␤»
14:00 smls \o/
14:00 telex joined #perl6
14:00 psch moritz++ for the right place to look for &note
14:01 xinming joined #perl6
14:02 smls m: say $*DISTRO.name
14:02 camelia rakudo-moar 91d899: OUTPUT«linux␤»
14:02 smls ^ will that always say 'linux' on any linux distro?
14:04 virtualsue joined #perl6
14:06 * moritz hopes so
14:09 smls Why do we have  $*DISTRO.is-win  but not  .is-unix  .is-posix  etc.?
14:10 FROGGS smls: because in most cases you'll find: if $is-win { ... } else { ... }
14:12 adu joined #perl6
14:12 timotimo sad truth?
14:13 smls m: my &note = $*DISTRO.is-win ?? CORE::<&note> !! { CORE::<&note>("\x1b[31m" ~ $^a ~ "\x1b[0m") };  note "test"
14:13 camelia rakudo-moar 91d899: OUTPUT«[31mtest[0m�»
14:13 smls ^^ On a scale of 1 ro 10, how evil would you rate this? :P
14:13 smls *to
14:14 moritz 3
14:14 smls Would it be better to have a new sub that checks each time whether it should add colors?
14:14 vendethiel joined #perl6
14:14 smls (each time it is called)
14:15 dalek snake: cd52f91 | (Arne Skjærholt)++ | src/Snake/ (2 files):
14:15 dalek snake: Implement hash literals.
14:15 dalek snake: review: https://github.com/arnsholt/snake/commit/cd52f91a9c
14:15 FROGGS smls: we have have a env var in rakudo about colors... starts with RAKUDO_
14:15 FROGGS this should be taken into account too
14:16 blackbolt joined #perl6
14:16 smls FROGGS: Even in a user script?
14:17 FROGGS smls: I use that variable in modules too that output color, aye
14:24 nwc10 how does one use nqp::readfh from NQP? I can only find examples that use it which are Perl 6
14:30 jluis joined #perl6
14:30 timotimo FROGGS: that's for Pod::To::Text
14:31 FROGGS timotimo: and for backtrace printing
14:31 rindolf joined #perl6
14:32 timotimo oh?
14:32 timotimo didn't know that
14:33 FROGGS nqp-m: my $fh := nqp::open("foo", "r"); say(nqp::readfh($fh)); nqp::closefh($fh);
14:33 camelia nqp-moarvm: OUTPUT«Arg count 1 doesn't equal required operand count 3 for op 'read_fhb'␤   at gen/moar/stage2/QAST.nqp:1466  (/home/camelia/rakudo-inst-2/languages/nqp/lib/QAST.moarvm:compile_mastop:209)␤ from gen/moar/stage2/QAST.nqp:1682  (/home/camelia/rakudo-inst-2/languages…»
14:33 FROGGS nqp-m: my $fh := nqp::open("foo", "r"); my $result; say(nqp::readfh($fh, $result, 42)); nqp::closefh($fh);
14:33 camelia nqp-moarvm: OUTPUT«Failed to open file: no such file or directory␤   at /tmp/_Ps3Utgnql:1  (<ephemeral file>:<mainline>:23)␤ from gen/moar/stage2/NQPHLL.nqp:1239  (/home/camelia/rakudo-inst-2/languages/nqp/lib/NQPHLL.moarvm:eval:172)␤ from gen/moar/stage2/NQPHLL.nqp:1432  (/ho…»
14:34 FROGGS nwc10: ^^
14:35 FROGGS nqp-m: my $fh := nqp::open("/home/camelia/rakudo-inst-2/VERSION", "r"); my $result; say(nqp::readfh($fh, $result, 4)); nqp::closefh($fh);
14:35 camelia nqp-moarvm: OUTPUT«Failed to open file: no such file or directory␤   at /tmp/ctifKM74Ba:1  (<ephemeral file>:<mainline>:23)␤ from gen/moar/stage2/NQPHLL.nqp:1239  (/home/camelia/rakudo-inst-2/languages/nqp/lib/NQPHLL.moarvm:eval:172)␤ from gen/moar/stage2/NQPHLL.nqp:1432  (/ho…»
14:35 nwc10 FROGGS: no, that doesn't work
14:35 nwc10 read_fhb requires a native array to write to at /home/nc/test/moar.nqp:15  (<ephemeral file>:MAIN:98)
14:35 FROGGS ohh
14:35 nwc10 I can't work out how to create the relevant array of uint8
14:35 nwc10 sorry, should have been clearer that that was my probelm
14:36 psch nqp::bootarray and nqp::bootintarray don't seem to work, from my tests just now
14:37 psch which makes this somewhat confusing
14:37 nwc10 from the C code, it looks like I need to have
14:37 nwc10 REPR(result)->ID == MVM_REPR_ID_MVMArray
14:37 nwc10 and
14:37 nwc10 (MVMArrayREPRData *)STABLE(result)->REPR_data)->slot_type == MVM_ARRAY_U8
14:37 nwc10 (or MVM_ARRAY_I8)
14:37 nwc10 but I have no idea how to write NQP code that makes something that the C code likes
14:38 arnsholt bootintarray probably has word-sized ints
14:38 arnsholt In Rakudo I think Buf[int8] should do the trick
14:39 mephinet joined #perl6
14:40 nwc10 arnsholt: that seems to be syntactically valid NQP, but it's not working (same error message about 'requires a native array'
14:40 nwc10 )
14:40 psch nwc10: does nqp::readcharsfh fit for you use-case?
14:40 smls joined #perl6
14:40 nwc10 psch: no, sadly not
14:40 arnsholt Yeah, not sure how to do it in NQP
14:41 psch from docs.markdown it does look like you need the perl6-type Buf for readfh :/
14:41 FROGGS gimme another minute
14:41 * psch bbl o/
14:42 dalek joined #perl6
14:42 nwc10 but, Rakudo is written in NQP, so it must have a way to make its Buf objects using NQP :-)
14:42 arnsholt Yeah, it's all accessible from NQP
14:43 PerlJam my $Buf := buf8.new();
14:44 timotimo it seems like the memory usage of "say 'test'" went down noticably (now 102 megabytes maxrss)
14:44 timotimo i claim TimToady++ is to blame for this
14:45 smls FROGGS: I don't think normal scripts should react to RAKUDO_* variables.
14:45 smls Why should users care that running a program they installed happens to involve something calles "Rakudo"?
14:45 smls And shouldn't authors try to keep their Perl 6 scripts implementation independent?
14:46 FROGGS it is just that rakudo is the leading Perl 6 implementation and modules authors can take sane environment variables into account to disable colored prompts
14:47 FROGGS if there are more Perl 6 implementations I make my modules happily aware of more implementation specific things
14:47 smls if it's just for *dis*abling, then okay
14:47 FROGGS that's better than 20+ different env vars just to disable colors for a handful modules
14:47 FROGGS yes
14:47 FROGGS I think this one was about disabling
14:48 smls Ideally, one should also check whether $*OUT is a terminal
14:49 smls like `ls` prints color codes, but `ls > file` does not
14:50 smls m: say $*OUT.t
14:50 camelia rakudo-moar 91d899: OUTPUT«Cannot find method 'isatty': no method cache and no .^find_method␤  in method t at src/gen/m-CORE.setting:15808␤  in block <unit> at /tmp/RrRl45JJjr:1␤␤»
14:50 smls NYI?
14:50 moritz not yet implemented
14:50 moritz erm
14:50 moritz you weren't asking what 'NYI' meant :-)
14:50 moritz p: say $*OUT.t
14:51 camelia rakudo-parrot 91d899: OUTPUT«False␤»
14:51 moritz smls: seems NYI; a ticket would be welcome
14:51 smls haven't opened a Rakudo ticket before; should I get into the habit?
14:52 PerlJam smls: I think only masak has made it habitual  :)
14:52 smls hrm, the links from http://rakudo.org/tickets/ lead to bogus "cross site forgery" warning page
14:53 timotimo yeah
14:53 timotimo you can safely ignore that one if it reads "some malicious site may be trying to do a search on your behalf"
14:54 timotimo because that's exactly what rakudo.org is trying to do and it's not dangerous to execute a particular search, at least AFAIK
14:54 smls I clicked "new tickets", and the first one it shows is 5 years old
14:54 smls Am I in the right place?
14:55 timotimo "new" is just a state a ticket can be in
14:55 moritz smls: you have to click on 'created' to sort by newness
14:58 anaeem1_ joined #perl6
14:59 nwc10 jnthn: my $buf := NQPArray.new;    creates (I think) an array of objects. How do I create an array of unit8? I think I need to end up in the `case MVM_STORAGE_SPEC_BP_INT:` of compose() in MVMArray.c
14:59 FROGGS nqp::list_i would give you an int array
14:59 FROGGS but not uint8
14:59 nwc10 io.c is fussy
15:00 timotimo that's something that the native shaped arrays stuff is going to change, if my guess is correct
15:00 arnsholt You'll probably have to pull out the relevant stuff from Rakudo's source
15:00 FROGGS I am trying to create an uint8 and then Blob[uint8] type using the mop in nqp... but I end up getting: This representation (VMArray) does not support attribute storage
15:01 nwc10 FROGGS: thanks for continuing to try. I didn't realise that I'd DOSed you :-/
15:01 arnsholt Make an int8 native type, then create an array type and set it to be of the int8 type
15:01 timotimo i kind of think list_i will only give you something that's compatible with the integer registers of the VM
15:02 FROGGS nqp-m -e 'my $fh := nqp::open("test.pl", "r"); my $result := nqp::list_i; say(nqp::readfh($fh, $result, 4)); nqp::closefh($fh);'
15:02 FROGGS read_fhb requires a native array of uint8 or int8
15:02 arnsholt You want the array_type trait in src/core/traits.pm from Rakudo, the header of src/core/Buf.pm and src/core/natives.pm
15:02 arnsholt Then stuff the equivalent types into your code
15:02 FROGGS that is the best you can do without the mop I think
15:03 FROGGS arnsholt: which is what I tried
15:03 FROGGS arnsholt: https://gist.github.com/FROGGS/81b81e4282ae9d426381
15:03 FROGGS I cannot add attributes to VMArray reprs
15:04 arnsholt I have to decommute now, but I'll try to hack up something that works once I get home. Shouldn't be too hard
15:04 FROGGS so I maybe need a P6opaque too...
15:04 timotimo do you need to build a class that is repr('MVMArray') and has the correct bitsize?
15:04 FROGGS yes
15:04 timotimo does that workh in nqp?
15:04 arnsholt Sort of
15:05 arnsholt An int type of the correct bitsize, and a VMArray parametrized to that type
15:05 timotimo i don't know how parameterizing types works in nqp %)
15:05 FROGGS timotimo: this line does it: https://gist.github.com/FROGGS/81b81e4282ae9d426381#file-buf8-nqp-L15
15:05 FROGGS (in case it would work)
15:06 FROGGS ohh, lemme try something
15:06 jnthn nwc10: nqp::list_i(), but you already found there's a bit more to it than that... :)
15:07 jnthn The trick is to compose a repr with the appropriate settings.
15:07 timotimo a repr with settings is different from adding an attribute
15:08 jnthn https://github.com/rakudo/rakudo/blob/nom/src/Perl6/Metamodel/REPRComposeProtocol.nqp#L11
15:08 jnthn timotimo: very :)
15:11 jnthn nqp-m: my $at := nqp::newtype(NQPClassHOW.new, 'VMArray'); nqp::composetype($at, nqp::hash('array', nqp::hash('type', int))); my $arr := nqp::create($at); nqp::bindpos_i($arr, 0, 42); say(nqp::atpos_i($arr, 0));
15:11 camelia nqp-moarvm: OUTPUT«42␤»
15:11 jnthn So if you know how to get an int8 then you feed it to this.
15:12 erkan joined #perl6
15:12 erkan joined #perl6
15:13 FROGGS sec
15:17 JimmyZ_ joined #perl6
15:18 JimmyZ_ timotimo: it is not easy to remove set op from nqp compiler, since the set op is sometimes needed, IIRC
15:19 JimmyZ_ timotimo: I think the better ways still is in statick optimization
15:19 JimmyZ_ *way
15:19 timotimo JimmyZ_: i think the set op results from an InstructionList allocating a register to store its result, but not telling the "child" InstructionList that it can re-use the already-allocated result register, OSLT
15:22 Celelibi joined #perl6
15:24 treehug88 joined #perl6
15:25 immortal joined #perl6
15:25 immortal joined #perl6
15:27 * nwc10 doesn't know how to get a uint8
15:27 nwc10 or an int8 either
15:27 FROGGS This representation (P6int) does not support attribute storage :o(
15:28 FROGGS jnthn: what's wrong here? https://gist.github.com/FROGGS/81b81e4282ae9d426381
15:28 FROGGS jnthn: is assplodes when I uncomment line 19 and 20
15:28 jnthn Using NQPClassHOW instead of NQPNativeHOW, I suspect
15:29 JimmyZ_ nwc10: get the type?
15:29 FROGGS jnthn: Native types may not have attributes
15:30 FROGGS ohh
15:30 FROGGS ahh no, I dunno
15:31 colomon one would hope native types have no attributes, wouldn't one?
15:32 FROGGS ohh, I think I found it
15:33 Juerd joined #perl6
15:34 FROGGS \o/
15:35 FROGGS nwc10: that does it: https://gist.github.com/FROGGS/81b81e4282ae9d426381
15:35 FROGGS jnthn++ / colomon++
15:35 FROGGS timotimo / arnsholt: https://gist.github.com/FROGGS/81b81e4282ae9d426381
15:36 nwc10 FROGGS++ # yay
15:36 JimmyZ_ and can be in BEGIN{ .. } block ?
15:37 timotimo cool
15:37 vendethiel joined #perl6
15:40 smls m: my $bar = "a b"; .say for <<foo $bar baz>>
15:40 camelia rakudo-moar 91d899: OUTPUT«foo␤a␤b␤baz␤»
15:40 smls :(
15:41 smls Why doesn't  <<...>>  treat interpolated variables as a single token, like grammars do?
15:43 dalek nqp: 3b45964 | (Timo Paulssen)++ | src/vm/moar/QAST/QASTOperationsMAST.nqp:
15:43 dalek nqp: pre-size lists if the num of initial values is known
15:43 dalek nqp: review: https://github.com/perl6/nqp/commit/3b45964482
15:43 dalek nqp: 3069179 | (Timo Paulssen)++ | src/vm/moar/QAST/QASTOperationsMAST.nqp:
15:43 dalek nqp: give "$newer" a less confusing name
15:43 dalek nqp: review: https://github.com/perl6/nqp/commit/3069179b3f
15:43 FROGGS smls: because you interpolated it into that construct
15:43 Celelibi joined #perl6
15:43 felher r: my $x = "y z"; .say for <<a "$x" c>>;
15:43 camelia rakudo-{parrot,moar} 91d899: OUTPUT«a␤y z␤c␤»
15:44 smls oh, felher++
15:49 nwc10 oh, next naive question
15:49 nwc10 seems that my filehandle from nqp::open was expecting the file to be valid UTF-8
15:49 nwc10 how do I do the equivalent of binmode?
15:51 jluis joined #perl6
15:52 JimmyZ_ timotimo: looks like pre-size set it to $size and then set it to zero?
15:52 timotimo yes
15:52 timotimo if we don't reset the size to 0, the objects get pushed at the end :)
15:55 rurban joined #perl6
15:55 JimmyZ_ oh, it's nice to have a comments there
15:55 timotimo can do
15:55 nwc10 oh, this might be a PEBKAC
15:57 dalek nqp: 92a5f72 | (Timo Paulssen)++ | src/vm/moar/QAST/QASTOperationsMAST.nqp:
15:57 dalek nqp: explain the setelems n + setelems 0 trick
15:57 dalek nqp: review: https://github.com/perl6/nqp/commit/92a5f72b28
15:58 timotimo .tell japhb a knowledgable friend tells me that OpenGL 3.3 Core is a good point to start from, as later versions in the 3 series mostly introduce advanced features you're not going to need as "a beginner" and mesa has some trouble with 4.0
15:59 FROGGS nwc10: it should not expect utf8 IIRC
15:59 nwc10 no, that problem was between the keyboard and the chiar
16:00 FROGGS exactly :o)
16:07 jnthn It's nice when you're teaching a class and somebody comes at the end for help with their compiler hobby project. :)
16:07 FROGGS :o)
16:08 jnthn Another day's teacing done... :)
16:08 moritz ... arnsholt?
16:08 timotimo :3
16:08 * jnthn wonders if he'll have Perl 6 energy tonight :)
16:10 jnthn hotel &
16:11 dalek joined #perl6
16:22 vendethiel joined #perl6
16:22 arnsholt moritz: pong?
16:27 spider-mario joined #perl6
16:27 tadzik there should totally be a post on Inline::Perl5 on the advent calendar
16:27 tadzik volunteers, or can I take it?
16:27 japhb jnthn: What language were they writing a compiler for?
16:28 japhb No yoleaux, sigh
16:29 japhb timotimo: I see a highlight referring to OpenGL versions.  Is there context I am missing here?
16:29 [Sno] joined #perl6
16:29 timotimo wasn't it you i showed the opengl api xml files to?
16:31 japhb Oh yes, some time ago.  I had forgotten about that.  :-(
16:31 kaleem_ joined #perl6
16:33 tony-o timotimo: i got a simple router out there for http-async, i'll work on keep-alive next
16:33 timotimo tony-o: i likes :)
16:33 timotimo japhb: aaw, i was hoping one day during the advent calendar or something there'd suddenly be an opengl module + accompanying post :)
16:53 Celelibi joined #perl6
16:53 anaeem1_ joined #perl6
16:55 anaeem1_ joined #perl6
16:56 raydiak \o
16:57 erkan joined #perl6
16:57 erkan joined #perl6
17:09 timotimo hay ray
17:13 kaleem joined #perl6
17:23 mvuets tadzik: hi (-: did you have a chance to look at my pr?
17:23 pmurias joined #perl6
17:24 moritz arnsholt: mentioning you was in response to http://irclog.perlgeek.de/perl6/2014-12-02#i_9747580
17:26 moritz masak: how's your advent post coming along?
17:27 arnsholt moritz: Yeah, I eventually figured that out. I claim CaffeineUnderflowException =)
17:29 timotimo ICaffeineUnderflow?
17:29 moritz ENOTENOUGHCOFF
17:30 japhb timotimo: The only spare time I'd have to write an advent post is *after* the advent is over.  :-(
17:30 timotimo aaw
17:31 timotimo well, that's okay
17:31 timotimo you're already doing a pretty awesome job with perl6-bench, so i can hardly ask you to invest more into perl6 than you already are :)
17:35 japhb :-)
17:38 ab5tract joined #perl6
17:42 masak moritz: will make dinner, then write it.
17:42 masak good evening, #perl6
17:43 ab5tract \o masak
17:44 mvuets masak: hi (-: today on my way to work i watched your talk about GOTO from YAPC::EU. liked it (-:
17:44 masak \o/
17:44 * masak .oO( goto work considered awesome )
17:52 * moritz blug: http://perlgeek.de/blog-en/perl-6/2014-community-server-update.html
17:53 arnsholt moritz++
17:53 arnsholt And moritz++ for organizing all of this server stuff
17:54 timotimo moritz: i'm wondering about your website's color scheme
17:54 smls m: Foo.parse("abcd"); grammar Foo {  }
17:54 camelia rakudo-moar 91d899: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/eAcR78EVRS�Illegally post-declared type:�    Foo used at line 1��»
17:54 smls ^^ Why is it illegal?
17:54 ab5tract m: grammar Foo { ... }; Foo.parse("abcd
17:54 camelia rakudo-moar 91d899: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/d3HWEWqJBe�Unable to parse expression in double quotes; couldn't find final '"' �at /tmp/d3HWEWqJBe:1�------> [32mgrammar Foo { ... }; Foo.parse("abcd[33m�[31m<EOL>[0m�    expecting an…»
17:54 ab5tract m: grammar Foo { ... }; Foo.parse("abcd"); grammar Foo { };
17:54 camelia rakudo-moar 91d899: OUTPUT«No such method 'TOP' for invocant of type 'Foo'␤  in method parse at src/gen/m-CORE.setting:14194␤  in block <unit> at /tmp/7cCrlHZ72e:1␤␤»
17:55 ab5tract smls: makes sense?
17:56 smls I see
17:56 smls Why allow subs to be post-declared though, but not types?
17:57 [Coke] you get the same error for classes, btw.
17:59 ab5tract smls: i imagine it is difficult to do type checking if you allowed it, but i'd be interested to hear a more informed answer from someone in the know
17:59 TimToady because class definitions change syntax
18:00 TimToady and we're very strict about the order of things that change the current language
18:00 TimToady we get away with it on subroutines because the invocation syntax doesn't change
18:01 smls ok
18:03 vendethiel o/, #perl6
18:03 [Coke] hugme: high five moritz
18:04 [Coke] aw, man!
18:04 vendethiel yeee! moritz++
18:04 geekosaur the few cases where you cn use a type that has not yet been defined, you have to say something like ::T so it knows what you mean
18:04 ab5tract geekosaur: what cases are those?
18:05 * geekosaur not recalling off the top of his head :(
18:05 geekosaur today I am a bundle of not very well indexed random snippets >.>
18:05 * TimToady feels like he stayed up till the wee hours hacking...
18:06 [Coke] .seen ingy
18:06 [Coke] blah
18:06 geekosaur (I think one of them is when you're referring to a parameterized type? so it needs the :: prefix to tell it that what follows is a "variable" of sorts)
18:06 TimToady when capturing a type in a siggie, aye
18:07 xinming_ joined #perl6
18:08 TimToady m: ::Foo.new().x.say; class Foo { method x { say "huh" } }
18:08 camelia rakudo-moar 91d899: OUTPUT«===SORRY!===␤Could not locate compile-time value for symbol Foo␤»
18:08 TimToady I guess it doesn't really work for that
18:09 ingy hi [Coke]
18:09 TimToady m: class Foo {...}; Foo.new().x.say; class Foo { method x { say "huh" } }
18:09 camelia rakudo-moar 91d899: OUTPUT«huh␤True␤»
18:09 masak moritz: s/payed/paid/
18:09 TimToady anyway, prestubbing is more readable than scattering :: all over
18:11 geekosaur right, I would not have expected that to work because is it use before declaration or is there some way to "bind" ::Foo at runtime?
18:12 geekosaur (use before declaration being sort of a special case of the latter since it's resolved at compile time, just later in the compilation unit)
18:13 TimToady runtime is too late, note the message I got
18:13 TimToady why ::Foo depends on a compile-time value, I dunno
18:13 geekosaur yes, I am assuming that that is an implementation detail that could be changed (at of course a time penalty) *if* the corresponding mechanism existed; but the mechanism itself is dubious
18:14 TimToady well, we encourage stubbing instead
18:14 geekosaur yes, stubbing is clearer and eliminates the ambiguity I mentioed
18:14 TimToady m: class Foo {...}; Foo Foo
18:14 camelia rakudo-moar 91d899: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/0vEBbShwhk�Two terms in a row�at /tmp/0vEBbShwhk:1�------> [32mclass Foo {...}; Foo [33m�[31mFoo[0m�    expecting any of:�        postfix�        infix stopper�        infix or m…»
18:15 TimToady note that types and such become terms rather than functions
18:15 geekosaur my point was more that, if the mechanism existed, it would invite the alternative implementation where I somehow bound ::Foo instead of simply using it before definition
18:15 ab5tract it could be an idea to just disallow the ::Unstubbed form then?
18:15 geekosaur but that introduces an ambiguity
18:15 TimToady m: say ::Foo; class Foo { has $.x = 42; }
18:15 camelia rakudo-moar 91d899: OUTPUT«===SORRY!===␤Could not locate compile-time value for symbol Foo␤»
18:16 moritz well, only allow ::foo in declarative context
18:16 TimToady n: say ::Foo; class Foo { has $.x = 42; }
18:16 camelia niecza v24-109-g48a8de3: OUTPUT«(Foo)␤»
18:16 TimToady niecza handles it
18:16 TimToady but it's not trying to optimize the heck out of everything :)
18:17 TimToady n: say ::Foo.new; class Foo { has $.x = 42; }
18:17 camelia niecza v24-109-g48a8de3: OUTPUT«Foo.new(...)␤»
18:17 TimToady n: say ::Foo.new.x; class Foo { has $.x = 42; }
18:17 camelia niecza v24-109-g48a8de3: OUTPUT«42␤»
18:17 TimToady so it's certainly possible to allow it
18:18 TimToady so maybe it's just a bug; certainly the original intent was that ::Foo defer judgement
18:19 TimToady n: ::Foo ::Foo
18:19 camelia niecza v24-109-g48a8de3: OUTPUT«[31m===[0mSORRY![31m===[0m��Two terms in a row at /tmp/seaNVlJz1_ line 1:�------> [32m::Foo [33m�[31m::Foo[0m��Parse failed��»
18:19 ab5tract m: sub b( ::Thing, $num ) { ::Thing.new($num) }; class Thing  { method new($num) { say $num } }; b( Thing, 5 );
18:19 camelia rakudo-moar 91d899: OUTPUT«5␤»
18:19 TimToady m: ::Foo ::Foo
18:19 camelia rakudo-moar 91d899: OUTPUT«===SORRY!===␤Could not locate compile-time value for symbol Foo␤»
18:19 colomon moritz++
18:20 geekosaur right, I'm just noting that, *given* that ability, a logical extension is to allow that ::Foo to be bound to something else instead of being a use before declaration
18:20 TimToady the :: seems to turn it into a term in niecza, which is a bit odd, considering that an internal :: doesn't
18:20 ab5tract m: sub b( ::Thing, $num ) { ::Thing.new($num) }; b( ::Thing, 5); class Thing  { method new($num) { say $num } };
18:20 camelia rakudo-moar 91d899: OUTPUT«===SORRY!===␤Could not locate compile-time value for symbol Thing␤»
18:20 geekosaur making it potentially a variable. but that's ambiguous and potentially quite expensive
18:20 TimToady you leave off the :: in use
18:20 ab5tract m: sub b( ::Thing, $num ) { ::Thing.new($num) }; b( Thing, 5); class Thing  { method new($num) { say $num } };
18:20 camelia rakudo-moar 91d899: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/0vxa3qs71P�Illegally post-declared type:�    Thing used at line 1��»
18:20 TimToady it's only in the binding that :: is allowed
18:21 ab5tract i like that tbh
18:21 TimToady m: sub b( ::Thing, $num ) { Thing.new($num) }; b( Thing, 5); class Thing  { method new($num) { say $num } };
18:21 camelia rakudo-moar 91d899: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/qVWEnSVgRP�Illegally post-declared type:�    Thing used at line 1��»
18:22 TimToady m: sub b( ::Thing, $num ) { Thing.new($num) }; class Thing { method new($num) { say $num } }; b( Thing, 5 );
18:22 camelia rakudo-moar 91d899: OUTPUT«5␤»
18:23 TimToady m: sub b( ::Thing, $num ) { Thing.new($num) }; class Thing { method new($num) { say $num } }; b( Int, 5 );
18:23 camelia rakudo-moar 91d899: OUTPUT«Default constructor for 'Int' only takes named arguments␤  in method new at src/gen/m-CORE.setting:931␤  in sub b at /tmp/ozoaKnVuBm:1␤  in block <unit> at /tmp/ozoaKnVuBm:1␤␤»
18:24 gfldex joined #perl6
18:24 ab5tract that doesn't look right
18:26 flussenc1 wow... the spectest's doubled in size since I last paid attention to it, *and* it still finished faster.
18:27 TimToady esp if you use TEST_JOB=3 or so on a multicore :)
18:27 TimToady *JOBS
18:27 flussence yeah, it used to be about 17k tests in 7.5 minutes for 4 cores, now it's 34k tests in 6.5.
18:28 flussence r-m is running 100 tests *a second* :)
18:28 TimToady well, some of that is startup improvements too
18:29 japhb .oO( 100 tests a second?  Why not 100_000? )
18:29 flussence if only we had a 4096-core box... :)
18:29 TimToady What's 3 orders of magnitude among friends?
18:30 rurban parrot is also soon 20% faster. better resizablepmcarray
18:30 japhb Not much, in the big scheme of things.  :-)
18:30 japhb rurban: Nice!
18:31 TimToady rurban: the NFA changes also speed up rakudo on parrot and jvm, potentially
18:31 rurban And I still have 20% with the new gc, and the calling convention fixes upcoming
18:31 rurban new gc: = previous gc
18:35 rurban 20% each. not speaking about ext_call runloop fixes for methods and the jit yet.
18:35 PerlJam https://portal.tacc.utexas.edu/home) and get access to a bunch of CPUs (See https://portal.tacc.utexas.edu/system-monitor)   Not quite the same thing, but close   ;)
18:35 PerlJam flussence: Someone could request an account on the Texas Advanced Computing Cluster (TACC,
18:35 PerlJam reverse those two lines. :)
18:36 denis_boyun_ joined #perl6
18:36 flussence .oO( IRC still has thread-safety problems... )
18:37 pyrimidine PerlJam: if you have science-y questions to try answering, could also use Blue Waters: https://bluewaters.ncsa.illinois.edu
18:38 pyrimidine And 'science' is fairly broadly applied in some cases there :)
18:38 PerlJam .oO( How fast can Rakudo go?  IS that sciencey enough?  :)
18:39 pyrimidine might be.  though the 'Powers that Be' might think throwing Blue Waters at it may be a tad overkill
18:39 TimToady if anyone has transmitted rakudo on radio, it's going the speed of light
18:39 rurban PerlJam: Thanks. I tried, since I still have my texas address.
18:40 TimToady come to think of it, my wifi has sent rakudo at the speed of light many times
18:41 Mso150 joined #perl6
18:46 TimToady well, doesn't quite get to c until it leaves the atmosphere...
18:47 ab5tract TimToady: in that example above, I would have expected some kind of 'mismatched type object' error
18:47 TimToady I love being more precise than necessary, to make up for the times I'm less precise than necessary.
18:48 PerlJam plus there's all of those pesky state transitions as it moves through the equipment that could throttle is to somewhat less than c as well
18:48 PerlJam s/is to/it to/
18:48 rurban My TACC account was accepted, without mentioning the Perl Org
18:48 TimToady well, copper tends to transmit at about 1/3 c iirc
18:49 TimToady or maybe it was 1/2
18:49 rurban I'm trying now XSEDE also, they have fields for non-profits
18:52 geekosaur mrr, I thought I recalled it being around 80%
18:53 rurban Also accepted https://www.xsede.org/group/xup/profile/-/profile/view/rurban I can now try 10.000 cpu's
18:53 pyrimidine rurban: nice!
18:53 japhb TimToady: I thought it was more like 2/3c or .7c, for both electrical signals in copper and light in fiber.
18:53 geekosaur "velocity factor"
18:55 geekosaur oh, that's what I'm remembering. about 66% for standard cabling, 80% is for air dielectric antenna cable
18:57 Isp-sec joined #perl6
19:01 mvuets joined #perl6
19:02 * TimToady is probably remembering ancient phone wiring or so
19:02 * TimToady being fairly ancient himself
19:03 rurban TACC is only using Intel's icc, no gcc :) But 22,656 Xeon CPU's is nice. I"ll just try 64 or so
19:07 FROGGS joined #perl6
19:11 tadzik nine: do you want to do Inline::Perl5 advent post, or can I?
19:15 PerlJam tadzik: if you take Inline::Perl5, you have to give nine another post idea in return   ;)
19:15 jnthn evening, #perl6
19:16 timotimo hey J
19:16 dalek panda: 7399a55 | (Andrew Egeler)++ | bin/panda.bat:
19:16 dalek panda: Make .bat file work with powershell as well as cmd
19:16 dalek panda: review: https://github.com/tadzik/panda/commit/7399a55011
19:16 dalek panda: d3dc5e4 | tadzik++ | bin/panda.bat:
19:16 dalek panda: Merge pull request #124 from retupmoca/master
19:16 dalek panda:
19:16 dalek panda: Make .bat file work with powershell as well as cmd
19:16 dalek panda: review: https://github.com/tadzik/panda/commit/d3dc5e4482
19:17 colomon m: sub prefix:<∃>($a) { $a.any; }; my @a = 1..10; my @b = 4, 8; say so ∃@a ∈ @b
19:17 camelia rakudo-moar 91d899: OUTPUT«True␤»
19:17 colomon m: sub prefix:<∀>($a) { $a.all; }; my @a = 1..10; my @b = 4, 8; say so ∀@a ∈ @b
19:17 camelia rakudo-moar 91d899: OUTPUT«False␤»
19:19 TimToady m: sub prefix:<∀>($a) { $a.all; }; my \a = 1..10; my \b = 4, 8; say so ∀a ∈ b
19:19 camelia rakudo-moar 91d899: OUTPUT«False␤»
19:19 tadzik mvuets: yeah, I did :)
19:20 tadzik mvuets: meanwhile, someone submitted #17 which does that using `git --ls-remote`, so without LWP or anything
19:21 tadzik mvuets: which seems like a simplier solution (the code is shorter too), but then your PR has a few more improvements that I'd also like pulled in
19:22 tadzik mvuets: so I think I'll merge that one first and then we can try to pull out the rest of the goodies from yuors :)
19:23 immortal joined #perl6
19:23 immortal joined #perl6
19:23 tadzik mvuets: poke me when you're around
19:25 prevost joined #perl6
19:25 mvuets tadzik: i see. yeah, that indeed looks to be more robust
19:26 ugexe personally i think an LWP solution would be better, as it doesnt require having git installed
19:26 mvuets git is a prerequisite for rakudobrew anyways
19:27 tadzik yeah
19:27 colomon heck, it's basically a prerequisite for Rakudo itself
19:27 tadzik that too
19:27 ugexe dont forget about your windows friends :)
19:28 mvuets plus my solution is vulnerable to api rate limit
19:28 lizmat joined #perl6
19:28 jercos Well most of the complexity of git to my way of viewing is in the merge algorithms... if you never want to merge (e.g., if you're only ever cloneing a git repo to get the current head of a given branch), the code to do that with LWP would be pretty simple.
19:28 tadzik ugexe: well, windows users still need git around for rakudo and friends :)
19:28 TimToady what're we gonna do if we discover that git is lying about the extra backdoor code stashed in the bootstrap?
19:28 tadzik mvuets: can you open a new PR with the rest of the features you wrote?
19:28 tadzik mvuets: bonus points if each is in a separate commi t:)
19:28 jercos Wouldn't even need smart HTTP transport if you know in advance the name of the branch you want.
19:29 ugexe you dont need git if you install the .msi
19:30 mvuets me, when looking at p6 globals: https://i.imgflip.com/etqry.jpg (-:
19:31 timotimo ... typeglobs?
19:31 tadzik ugexe: but then you're not likely to use rakudobrew
19:31 mvuets tadzik: each commit - a separate pr?
19:31 tadzik (I think)
19:31 tadzik mvuets: not neceserilly, just in separate commits
19:31 tadzik that makes it easier to track down possible issues in the future, or pick only some of the features
19:32 mvuets tadzik: ah, they are already (-:
19:32 tadzik if the original PR was like that, I'd just cherry-pick all the things but the list-available, and it'll save us work
19:32 tadzik oh, huh
19:32 tadzik indeed :)
19:32 mvuets i'll just merge upstream into my branch, rip off `available` subcommand and send a new pr
19:32 mvuets i mean, my version of the command
19:33 mvuets timotimo: this star in $*foo just reminds me scary p5 typeglobs
19:33 * mvuets has been looking into p6 for just few days, bear with him
19:34 timotimo oh?
19:34 timotimo i thought typeglobs were just stuff you spell in uppercase?
19:34 * vendethiel taught perl6 to $work's sysadmin (who just started his internship) today
19:34 ab5tract mvuets: i always interpreted the * twigil as intentionally dangerous looking :)
19:35 TimToady well, all twigils are longer huffman coding for some kind of "weight"
19:35 TimToady but * particularly looks like a glob
19:35 tadzik mvuets: alright, thanks :)
19:36 TimToady and globs kinda mean "whatever, dude"
19:36 PerlJam vendethiel: what did he think of it?
19:36 TimToady just find me a 'foo' variable somewhere...
19:37 vendethiel PerlJam: "oh my god this is so cool" "oh wow so nice" "oh and that works too?" "you must use that for everything"
19:37 vendethiel for an hour and a half :)
19:37 * vendethiel didn't get much done today :PP
19:37 PerlJam nice!
19:37 TimToady you should tell him about all the bits you don't like to balance it out :)
19:37 mvuets vendethiel++
19:38 mvuets vendethiel: you should write an advent post about it (-;
19:38 vendethiel mvuets: well, I wrote a tutorial about it instead :P
19:38 vendethiel TimToady: the bits I don't like are bound to change :)
19:38 mvuets perl6 crash course for sysadmins
19:38 PerlJam more perl6 people should go to pycon and rubyconf and such to give talks on Perl 6  :)
19:38 tadzik sounds great :)
19:38 Mso150_p joined #perl6
19:38 vendethiel (not because I want them to, just because that's been decided by other people)
19:38 dalek joined #perl6
19:38 vendethiel PerlJam: I don't think those confs are cross-languages, though?
19:38 mvuets vendethiel: oh, may i have a look at the tutorial, please?
19:39 vendethiel mvuets: learnxinyminutes.com/docs/perl6
19:39 PerlJam vendethiel: if your comparing languages, you have to mention both of them  ;)
19:39 erkan joined #perl6
19:39 erkan joined #perl6
19:39 vendethiel PerlJam: not sure what you mean?
19:40 mvuets vendethiel: ooooh, that's you! moar kudos to vendethiel++
19:40 PerlJam the talks could be short "tutorials" of the style "Here's how to do <insert awesome feature of Perl 6> in <insert other language>"
19:41 TimToady just put up a link to rosettacode :)
19:41 vendethiel PerlJam: well, the ruby conf I've been to only talked about ruby stuff. no cross-language comparison or whatever. but I think I've seen this kind of stuff
19:41 vendethiel .oO( they'll throw a ETOOCRAZY )
19:42 jnthn I'll likely continue have few tuits through this week and the weekend, but next week it looks like I'll be able to have one or two entire days for Perl 6 things. At darn last. \o/
19:42 jnthn EBS606740157
19:42 TimToady yay
19:42 jnthn ...well bother. :)
19:42 dalek joined #perl6
19:43 * jnthn didn't want to paste anything, but at least it was harmless :)
19:43 PerlJam TimToady: it would have to be a curated set of links as showing rosettacode "in the raw" would be somewhat like showing CPAN (lots of warts)
19:44 TimToady jnthn: currently I'm copying the states down into the same array, but I'm wondering whether I should bother to copy to a new list so the old one can be GC'd
19:45 jnthn TimToady: Ah, 'cus the new one ends up with a lot less of them?
19:45 TimToady well, 35-40% less on average, but with a certain variance
19:45 jnthn Do you pop them off the end and insert them lower down, or?
19:46 mvuets tadzik: i am thinking... if it's called 'list-available' then 'list' should be called 'list-builds'; or if leave it 'list', then 'list-available' should be called just 'available'... maybe? (i prefer the second option) q-:
19:46 TimToady no, just copy from one index to a smaller index
19:46 jnthn Provided elems reports somehting smaller then for pre-comp you'll be in decent shape.
19:46 dalek perl6-roast-data: 5d3da53 | coke++ | / (5 files):
19:46 dalek perl6-roast-data: today (automated commit)
19:46 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/5d3da5314d
19:46 TimToady I do setelems at the end
19:46 jnthn Aha
19:46 jnthn Yeah
19:46 TimToady but I doubt that reclaims anything?
19:46 jnthn setelems doesn't reclaim, no
19:46 jnthn Most use cases don't want that.
19:47 jnthn Following the "if we needed the memory once we'll need it again" principle
19:47 TimToady for something that's just going to serialize, I don't care, but for nfas going to be used this process, I care more
19:48 TimToady I do know how much it'll change, so maybe I'll just copy if it's over a threshold
19:48 jnthn Right
19:48 jnthn that's what I menat about pre-comp
19:48 jnthn You're already clear there, but for in-process...it'd keep hold of the memory
19:49 jnthn I'd have hoped that we get a meg or two off the process memory size thanks for your improvements.
19:49 TimToady well, for precomp it already should help
19:50 [Coke] TimToady++
19:50 TimToady but I was mostly hoping for more speed :)
19:50 TimToady and getting closer to DFAability
19:50 jnthn *nod*
19:50 jnthn I'm doing a build now to see how it is
19:51 TimToady as I mentioned earlier, Stage parse is kind of a wash, since we're running faster NFAs, but more time analyzing the newly parsed ones
19:51 jnthn Not much of STD is grammars/regexes, though?
19:52 jnthn uh
19:52 jnthn Not much of *CORE.setting*
19:52 TimToady oh, right
19:52 jnthn Gee, that nap after work apparently didn't work...
19:52 dalek snake: 1908c5e | (Arne Skjærholt)++ | src/Snake/World.nqp:
19:52 dalek snake: Simplify some cargo-culted code from NQP.
19:52 dalek snake:
19:52 dalek snake: We're not bootstrapping, so we can just reference the ModuleLoader directly.
19:52 dalek snake: review: https://github.com/arnsholt/snake/commit/1908c5eef4
19:52 dalek snake: 21ba500 | (Arne Skjærholt)++ | src/ (2 files):
19:52 dalek snake: Remove the need for a load task getting the ModuleLoader.
19:52 dalek snake:
19:52 dalek snake: Adding "use Snake::ModuleLoader" to snake.nqp makes this superfluous.
19:52 dalek snake: review: https://github.com/arnsholt/snake/commit/21ba500540
19:52 * TimToady ahd a short night
19:52 * jnthn too in terms of sleep, though not 'cus he went to bed late... :S
19:54 jnthn I *think* stage parse may be a little faster, but I tend to know the numbers of my desktop better than my laptop...
19:54 TimToady well, i got a stage parse of 26 something for the first time
19:55 TimToady so yeah, I think it's a hair faster
19:55 jnthn Grammar.moarvm went from 5,334,400 down to 3,214,066
19:55 TimToady heh
19:55 TimToady that seems about right
19:55 TimToady should definitely affect startup then
19:55 jnthn Wow
19:56 jnthn Yeah
19:56 jnthn Memory use starting REPL: 33,920KB -> 22,152KB
19:56 jnthn Memory after "say 42": 101,908 -> 90,240KB
19:56 jnthn So, 11MB off
19:56 FROGGS 33% off sounds very nice :o)
19:57 jnthn Really.
19:58 jnthn And if you undo the patch that disabled lazy deserialization in Moar, you get them down to 11,456KB and 68,696KB respectively.
19:59 jnthn An NQP REPL sits at 7,224KB and after say(42) is at 12,120KB.
19:59 TimToady tiddly pom
20:00 jnthn Disable spesh and you are only at 8,852KB after the say(42). So specializations...
20:00 TimToady still a ways from fitting it onto a PDP-11
20:01 jnthn And 54,500KB for Rakudo. I think I might want to look at why spesh produces 14MB worth of specialized bytecode and JITted output at some point :)
20:01 FROGGS these stats look kinde sweet: http://testers.perl6.org/dist/Acme::DSON
20:01 Celelibi joined #perl6
20:02 moritz FROGGS: very nice, yes
20:02 moritz FROGGS: why are there so many dots in the version numbers after the 'g'?
20:02 TimToady the green revolution
20:02 FROGGS moritz: like is really has a use or something :o)
20:03 FROGGS moritz: because it is how Version objects stringify
20:03 moritz eeks
20:03 FROGGS m: say $*PERL.compiler.version
20:03 camelia rakudo-moar 91d899: OUTPUT«v2014.11.50.g.91.d.8995␤»
20:03 FROGGS yepp
20:04 FROGGS moritz: I mean, I can strip these dots for the webpage, but had no time to do that yet
20:04 dalek nqp/6pe: 22143f6 | jonathan++ | src/vm/moar/QAST/QASTOperationsMAST.nqp:
20:04 dalek nqp/6pe: Map nqp:: ops for parametricity on MoarVM backend.
20:04 dalek nqp/6pe: review: https://github.com/perl6/nqp/commit/22143f60d2
20:04 dalek nqp/6pe: e9b1b9c | jonathan++ | t/nqp/87-parametric-6model.t:
20:04 dalek nqp/6pe: Some initial tests for 6model parametric ops.
20:04 dalek nqp/6pe: review: https://github.com/perl6/nqp/commit/e9b1b9c2c3
20:04 moritz FROGGS: no, it wants to be stripped inside rakudo
20:05 Celelibi joined #perl6
20:05 FROGGS yeah, that should be possible too...
20:08 dalek joined #perl6
20:11 mvuets tadzik: also found a bug in 'list-available' (-:
20:19 Juerd joined #perl6
20:20 telex joined #perl6
20:24 TimToady $*DISTRO was supposd to be something like 'ubuntu', and $*KERNEL was supposed to be 'linux'
20:24 TimToady we seem to be re-inventing $*OS :/
20:24 nwc10 I see that Rakudo's Configure.pm calls `nqp-m --show-config` to get the MoarVM config, which it uses to expand Makefile.in
20:25 nwc10 er Configure.pl
20:25 FROGGS I still have that old spreadsheet - https://ethercalc.org/wrwsbhvuim
20:25 nwc10 what's the right way to get MoarVM config information in *NQP*'s Configure.pl ?
20:26 FROGGS since we have a stage0, we could probably call nqp::backendcfg or what it is called
20:27 jnthn We also could consider having a flag on moar that dumps the info.
20:27 FROGGS nqp: say(nqp::backendconfig()<cc>)
20:27 camelia nqp-parrot: OUTPUT«cc␤»
20:27 camelia ..nqp-jvm: OUTPUT«(signal ABRT)»
20:27 camelia ..nqp-moarvm: OUTPUT«gcc␤»
20:28 nwc10 FROGGS: yes, that works
20:28 nwc10 ../MoarVM/moar --libpath=src/vm/moar/stage0 src/vm/moar/stage0/nqp.moarvm -e 'for nqp::backendconfig() { say($_) }'
20:28 nwc10 [output]
20:29 nwc10 jnthn: for now, we can survive without the flag
20:29 jnthn OK, cool :)
20:29 jnthn I'm always happy to have less things :)
20:29 FROGGS me too :o)
20:29 nwc10 although I might be going to bed before I hack the next bit
20:29 nwc10 me three
20:30 FROGGS well, except for food and kids... you can never have enough food and kids at home :o)
20:32 tony-o stock up on some kids
20:32 nine Good evening, everyone!
20:34 nwc10 Rutan said that the goal of private space tourism is to reduce the cost of space travel and exploration. "If we go through a time period where the focus is on flying the consumer, these 'payloads' who pay to fly and can be reproduced with unskilled labor...with tools around the house," he joked, "there will be a breakthrough to enormous volume."
20:35 jnthn o/ nine
20:35 masak is "listop" defined anywhere in the synopses?
20:36 TimToady well, grep finds 29 mentions
20:36 dalek joined #perl6
20:37 TimToady but listop is actually a P5ism
20:37 mvuets tadzik: ok, my pr for rakudobrew should be good to go now
20:37 masak TimToady: yes, I suspected as much.
20:39 jnthn masak: Turns out Poznan also has a street called Listopadowa :P
20:40 TimToady demonstrating that the Useless Facts collection is, in fact, highly contextual
20:40 mvuets jnthn: what country is that? "listopadowa" makes sense to me (-:
20:40 jnthn mvuets: Poland. :)
20:41 Juerd joined #perl6
20:42 mvuets jnthn: ah! that would mean something like "leaf fall", or "november" if it was a ukrainian month name (-;
20:42 * FROGGS can't get enough of https://www.youtube.com/watch?v=YfXPhWb38u8
20:43 dalek nqp/6pe: 2124b66 | jonathan++ | t/nqp/87-parametric-6model.t:
20:43 dalek nqp/6pe: Basic tests for parameterization interning.
20:43 dalek nqp/6pe: review: https://github.com/perl6/nqp/commit/2124b66f21
20:44 jnthn Well, listops in Perl 6 might cause precedence to fall, at least... :)
20:44 TimToady they do in Perl 5 too
20:45 TimToady but we've got more precedence droppers in P6
20:45 TimToady all them statement prefixes, for starters
20:46 TimToady and : on a method call
20:48 TimToady I think ours tend to read rather better than Haskell's $
20:48 PerlJam TimToady: amen.
20:48 itz I'm not a Web Designer and neither do I play one on TV but is this better?
20:49 itz http://pl6anet.org/test/
20:49 jnthn itz: Yes.
20:49 jnthn itz++
20:49 TimToady anything with Camelia is automatically better :)
20:50 FROGGS itz: yes, way better :o)
20:51 ab5tract itz++
20:52 mvuets itz++ # sexy!
20:52 masak advent day 3 blog post draf, comments welcome: https://gist.github.com/masak/bd47a4022aa90a58e55a
20:52 itz I wonder if there is an xsnow.css :)
20:53 masak draft*
20:53 jnthn Going to find a pre-sleep beer... &
20:53 TimToady you show disrespect to teh elder gods by calling them mere "beings"
20:54 * masak edits
20:55 masak there, updated: https://gist.github.com/masak/bd47a4022aa90a58e55a
20:56 TimToady sub all-positive(@list --> Bool) covers a world of hurt
20:56 TimToady or someday, --> Bool(), and it'll deduce the 'so' for you
20:57 TimToady admittedly 'so' is shorter :)
20:57 masak ;)
20:57 masak the principle still needs to be learned.
20:57 TimToady maybe we should rename Bool to So
20:57 masak no, please don't. :)
20:58 TimToady so, I won't. :)
20:59 TimToady but return types will also tend to serve as containment, is my point
20:59 TimToady so maybe it's worth mentioning
20:59 TimToady m: sub foo (--> Bool) { 1 | 42 }; foo()
20:59 camelia rakudo-moar 91d899: OUTPUT«Type check failed for return value; expected 'Bool' but got 'Junction'␤  in any return_error at src/vm/moar/Perl6/Ops.nqp:649␤  in sub foo at /tmp/OKHPfWKeXk:1␤  in block <unit> at /tmp/OKHPfWKeXk:1␤␤»
20:59 TimToady like that
20:59 masak I dunno... I would mention it if we actually had the functionality...
20:59 TimToady ^^^
21:00 TimToady we have the containment, it's just resulting in a run-time error
21:00 * masak gives in
21:00 TimToady the junction will never propagate out to the elder thingies
21:01 anaeem1 joined #perl6
21:01 TimToady and in general, we're trying to encourage declarative solutions over procedural
21:01 TimToady the compiler could easily turn this into "That will never work!"
21:02 TimToady in fact, that might be mid-hanging fruit for someone
21:03 TimToady we know the return types of operators and functions lexically
21:03 TimToady assuming they're declared appropriately
21:03 Mso150_p joined #perl6
21:04 TimToady the compiler can, in fact, compare return types to see that --> Bool doesn't need to be enforced if you also use 'so'
21:04 TimToady no need for runtime specialization there
21:04 PerlJam masak++ good post
21:05 PerlJam masak: though, you mentioned "elder beings" twice, but only changed the first to say "elder non-beings"
21:05 masak added the point about return type declarations: https://gist.github.com/masak/bd47a4022aa90a58e55a
21:05 masak PerlJam: oh, good catch.
21:05 masak fixed.
21:06 dalek rakudo/newio: 03d1599 | TimToady++ | tools/build/NQP_REVISION:
21:06 dalek rakudo/newio: bump nqp
21:06 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/03d15991f3
21:06 dalek rakudo/newio: 8f804a9 | (Elizabeth Mattijsen)++ | tools/build/NQP_REVISION:
21:06 dalek rakudo/newio: Merge branch 'nom' into newio
21:06 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/8f804a974e
21:07 TimToady what the...oh... :)
21:07 masak merges. they're tricky. :)
21:08 lizmat I haven't backlogged yet, but the parse stage of the settings went for me from ~30 seconds to ~21 seconds
21:09 lizmat so TimToady++
21:09 kurahaupo joined #perl6
21:09 TimToady shouldn't have that big an effect
21:10 lizmat well, it did for me  :-)
21:10 * lizmat going to check again
21:10 smls masak: After "collapse back into the normal, sane, non-junctive world", I would add a colon, or even an extra half-sentence like ", which we can do using one of these ways:"
21:11 smls Otherwise, newbies might not get that that is what the following code snipped is showing.
21:11 TimToady if "that that" is good enough for Lincoln, it's good enough for smls++
21:11 lizmat TimToady: you're right, 2nd time it's 28 seconds
21:11 lizmat huh?
21:12 lizmat Stage start      :   0.000
21:12 lizmat Stage parse      :  21.764
21:12 lizmat so I didn't imagine it...
21:12 PerlJam lizmat: maybe you imagined the ~30 seconds?  :)
21:12 * moritz also points out that collapsing a junction due to boolification is taken from the quantum world, where collapsing a wave function into an eigenstate is triggered by a measurement
21:12 smls masak: s/the most common use of junctions/the most common uses of junctions/
21:13 lizmat alas:
21:13 lizmat Stage start      :   0.000
21:13 lizmat Stage parse      :  28.726
21:13 smls or, s/don't/doesn't/ immediately after
21:13 moritz rebuilding nqp segfaults on latest moar :(
21:13 lizmat new theory: my notebook came out of the cold back of the car the first time
21:13 TimToady moritz: that happened to me last night
21:14 TimToady git said it gave me the newest moar, but it didn't
21:14 anaeem1_ joined #perl6
21:14 lizmat I guess at room temp it's throttling CPU or not turboing it anymore
21:14 lizmat still...
21:14 moritz TimToady: ... and for a moment I thought you meant that the wave function collapse happened to you
21:14 TimToady had to blow away nqp/install to force clone
21:14 FROGGS moritz: I thought the same *g*
21:15 moritz TimToady: indeed
21:15 TimToady git describe even said I had the new moar, but git log didn't show the patch
21:15 * TimToady has no idea what went wrong
21:15 FROGGS maybe this sha1 already exists?
21:15 TimToady that seems, unlikely
21:15 FROGGS though not the rest of the revision can axist
21:15 FROGGS exist*
21:16 TimToady both my nqp and my nqp/MoarVM were on master branch, and the bumps look correct
21:16 mvuets TimToady, lizmat: it's conspiracy
21:16 TimToady lizmat: I get wide variations based on CPU temp
21:17 lizmat yeah, I guess I rarely let my notebook get that cold   :-)
21:17 * moritz wonders if --gen-moar=master merges correctly from origin/master
21:17 masak smls: thank you, fixing.
21:17 TimToady I was just using the tagged version, not =master
21:17 TimToady (on my other machine)
21:18 TimToady but the bumps shoulda made those the same
21:18 TimToady but the problem seems like it's in git, not in our use of it
21:18 smls masak: possibly s/whether you want to or not/whether you want it to or not/
21:18 lizmat m: sub a(Int $a = 42) {}; sub a(Str $a = "foo") {}; # shouldn't this be a compile time error?
21:18 camelia rakudo-moar 91d899: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/sePrNvgvv6�Redeclaration of routine a�at /tmp/sePrNvgvv6:1�------> [32mnt $a = 42) {}; sub a(Str $a = "foo") {}[33m�[31m; # shouldn't this be a compile time err[0m�    expecting any of…»
21:18 TimToady or how would 'git describe' get out of sync with 'git log'
21:18 lizmat m: multi a(Int $a = 42) {}; multi a(Str $a = "foo") {}; # shouldn't this be a compile time error?
21:18 camelia rakudo-moar 91d899: ( no output )
21:19 lizmat m: multi a(Int $a = 42) {}; multi a(Str $a = "foo") {}; a()   # rather than a runtime error ?
21:19 camelia rakudo-moar 91d899: OUTPUT«Ambiguous call to 'a'; these signatures all match:␤:(Int $a = { ... })␤:(Str $a = { ... })␤  in sub a at /tmp/8jHgisS73E:1␤  in block <unit> at /tmp/8jHgisS73E:1␤␤»
21:19 TimToady lizmat: well volunteer'd :)
21:20 moritz lizmat: could be, but doesn't have to be
21:20 masak smls: fixed.
21:20 masak moritz: collapsing quantum analogy added.
21:20 TimToady oh wait, it's not an error
21:20 masak (I'm now in the wordpress draft, by the way, so your changes won't show up in the gist)
21:20 TimToady you have defaults, which make it merely ambiguous
21:21 lizmat but, you can never call that sub without parameters
21:21 lizmat it will always fail
21:21 lizmat or am I missing something ?
21:22 TimToady no, you're correct
21:22 Juerd joined #perl6
21:22 TimToady and the candidate lists are generated at compile time, so it could in theory know that the dispatch will be formally ambiguous
21:22 TimToady but that's a little harder than telling that no candidates match
21:22 tadzik mvuets: looks good, thanks!
21:23 lizmat ok, so well volunteered then   :-)
21:24 mvuets tadzik: cool, thanks! jj just discovered and fixed a warning in my fix of his thing
21:25 mvuets tadzik: put he sent me the pl
21:26 mvuets tadzik: maybe just fix it right in your repo to avoid these multiple pull requests mess? https://github.com/JJ/rakudobrew/commit/ccd15167cd47d3971da41bcad5b579bced426148
21:26 tadzik /o\
21:26 tadzik so many PRs :)
21:26 tadzik in a moment, refactoring stuff now
21:31 Celelibi joined #perl6
21:31 masak "Scheduled for
21:31 masak 12/3/2014 0:01"
21:32 masak post scheduled on Wordpress.
21:32 moritz \o/
21:33 tadzik masak++
21:33 masak almost feel like it took longer to port the post from Markdown to Wordpress-subverted HTML than it took to write it in the first place :)
21:34 bartolin maybe a stupid question: if I have an array @a=1,2,3 -- how can I create a parcel which has the same elements as @a?
21:34 masak ISTR I had a script to convert it... don't think I saved it, but it should be easy to rewrite.
21:34 masak m: my @a = 1, 2, 3; say @a.Parcel.WHAT
21:34 camelia rakudo-moar 91d899: OUTPUT«(Parcel)␤»
21:34 masak m: my @a = 1, 2, 3; say @a.Parcel.perl
21:34 camelia rakudo-moar 91d899: OUTPUT«(ListIter.new(),)␤»
21:34 masak m: my @a = 1, 2, 3; say @a.Parcel.elems
21:34 camelia rakudo-moar 91d899: OUTPUT«1␤»
21:34 masak :/
21:35 masak m: my @a = 1, 2, 3; say @a.list.Parcel.elems
21:35 camelia rakudo-moar 91d899: OUTPUT«1␤»
21:35 masak :/ :/
21:35 moritz m: my @a = 1, 2, 3; say @a.Parcel.perl
21:35 camelia rakudo-moar 91d899: OUTPUT«(ListIter.new(),)␤»
21:35 bartolin . o O (maybe a not-so-stupid-question) ;-)
21:35 * masak confesses to not having a good intuition for Perl 6 coercers
21:35 moritz ah, I see you tried it
21:37 bartolin m: my @a = 1, 2, 3; my $b = Parcel.new( @a.values );
21:37 camelia rakudo-moar 91d899: ( no output )
21:37 bartolin m: my @a = 1, 2, 3; my $b = Parcel.new( @a.values ); say $b.perl;
21:37 camelia rakudo-moar 91d899: OUTPUT«$((1, 2, 3).list,)␤»
21:37 moritz m: my @a = 1..3; say Parcel(@a).perl
21:37 camelia rakudo-moar 91d899: OUTPUT«(ListIter.new(),)␤»
21:37 moritz m: my @a = 1..3; say Parcel(@a.eager).perl
21:37 camelia rakudo-moar 91d899: OUTPUT«(1, 2, 3)␤»
21:38 moritz m: @a = 1, 2, 3; say @a.eager.Parcel.perl
21:38 camelia rakudo-moar 91d899: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/PzNpgyv05t�Variable '@a' is not declared�at /tmp/PzNpgyv05t:1�------> [32m@a[33m�[31m = 1, 2, 3; say @a.eager.Parcel.perl[0m�    expecting any of:�        postfix�»
21:38 moritz m: my @a = 1, 2, 3; say @a.eager.Parcel.perl
21:38 camelia rakudo-moar 91d899: OUTPUT«(1, 2, 3)␤»
21:38 moritz bartolin: ^^ that seems to work
21:39 bartolin thanks a lot!
21:40 Mso150_p joined #perl6
21:41 * masak is unsatisfied by that
21:41 * moritz too
21:41 moritz array assignment is already eager
21:41 moritz why should the .eager be necessary?
21:42 * masak submits rakudobug
21:42 mvuets i leave. take care, #perl6
21:42 moritz \o mvuets
21:42 masak fare thee well, mvuets
21:44 moritz we had about 2k page views in total over the last two days
21:44 DarthGandalf joined #perl6
21:44 moritz on p6advent, that is
21:44 smls re topic of masak's post: Maybe routines should have a default return type of Any?
21:45 sqirrel joined #perl6
21:45 smls So unless you go and add   --> Mu   to your signature, you won't accidentally return a junction.
21:46 smls Or would that have too much of a performance impact?
21:46 masak smls: I don't think that fix would be a net good.
21:47 masak smls: and it's not so much about routine boundaries -- that's just an example.
21:47 masak smls: the main thing is to not let junctional values run away.
21:48 smls Well, routine boundaries is what they need to pass to run away to code that a different person than the one who creates the junction, wrote...
22:01 masak only if your model is one-routine-one-author.
22:04 kaare_ joined #perl6
22:17 masak 'night, #perl6
22:17 ab5tract does someone have a moment to explain the practical differences between 'method new' and 'submethod BUILD' ?
22:17 KCL_ joined #perl6
22:17 timotimo new is what your users call
22:17 ab5tract ciao masak!
22:17 timotimo BUILD will be called on all subclasses by BUILDALL
22:17 timotimo BUILD is not derivable, because it's a submethod
22:18 timotimo the arguments you pass to self.bless will be given to BUILD directly
22:18 ab5tract so BUILDALL is called implicitly by the parent class?
22:18 timotimo hm. who calls buildall? i think bless does.
22:18 ab5tract ok
22:18 timotimo easy to test :)
22:19 ron1230 joined #perl6
22:19 timotimo what random class to derive from, i wonder
22:19 ab5tract timotimo: working through my advent post
22:19 ab5tract so Setty provides the new method to classes which use the role
22:20 ron1230 I met Jonathan Swartz author of Mason.  He isn't that big physically.  It wouldn't take a very big person to push him around, rough him up or ....
22:20 ab5tract and Set uses submethod BUILD to bind its private %!elems variable using nqp::bindattr, which I assume is what makes the Set mutable
22:20 ron1230 left #perl6
22:20 ab5tract sorry, immutable
22:21 ab5tract and i'm showing both code snippets and want to make sure i really understand the distinction between the two
22:21 ab5tract ah! in Setty.new :         self.bless(:elems(%e));
22:22 ab5tract sweet :)
22:30 vendethiel joined #perl6
22:30 timotimo i couldn't come up with an example class to derive from in order to cause an exception + backtrace from a BUILD submethod ...
22:31 virtualsue joined #perl6
22:34 ptc_p6 joined #perl6
22:37 ab5tract will any class with a submodule BUILD do?
22:40 ab5tract m: class A does Setty { submethod BUILD { die "except" } }; A.new
22:40 camelia rakudo-moar 91d899: OUTPUT«except␤  in submethod BUILD at /tmp/LnOLhhTqHD:1␤  in method BUILDALL at src/gen/m-CORE.setting:961␤  in method bless at src/gen/m-CORE.setting:944␤  in method new at src/gen/m-CORE.setting:18258␤  in block <unit> at /tmp/LnOLhhTqHD:1␤␤»
22:47 ash___ joined #perl6
22:49 Alina-malina joined #perl6
22:51 ash___ does anyone know if/where there is a perl6/nqp grammar for emacs or vim? I am working on a Textmate/Atom one and what to be consistent
22:52 ash___ and by grammar, I mean for syntax highlighting
22:52 PerlJam ash___: https://github.com/vim-perl/vim-perl
22:52 colomon Textmate!
22:52 rurban left #perl6
22:53 Ulti yeah the vim one isn't perfect but is quite good
22:53 vendethiel joined #perl6
22:53 rurban joined #perl6
22:54 rurban1 joined #perl6
22:54 ab5tract timotimo: the way it is used to abstract Setty.new and Set / SetHash is pretty cool
22:54 ash___ github also uses the textmate highlighting in their site now, which why some files don’t look right now
22:55 ab5tract is BUILD technically a phaser? it isn't listed as such in S04
22:55 BenGoldberg joined #perl6
23:00 Celelibi joined #perl6
23:00 TimToady it's not syntactically a phaser
23:00 TimToady it is called automatically, which is why it's in CAPS
23:07 ggherdov joined #perl6
23:07 ohcamacj-2 joined #perl6
23:08 pyrimidi_ joined #perl6
23:09 ab5tract gotcha, thanks for clarifying.
23:10 hugme joined #perl6
23:15 cognominal joined #perl6
23:25 bloonix joined #perl6
23:28 vendethiel joined #perl6
23:30 ab5tract so when subclassing and also defining a .new, it's probably a good practice to call self.bless
23:31 dalek nqp: d7849cb | TimToady++ | src/QRegex/NFA.nqp:
23:31 dalek nqp: plug more null state holes
23:31 dalek nqp:
23:31 dalek nqp: As a rule, if you add an edge to -1 to generate a new state, you should
23:31 dalek nqp: always *do* something with that new state, or it generates null epsilons.
23:31 dalek nqp: review: https://github.com/perl6/nqp/commit/d7849cb3ce
23:31 TimToady bless will make sure ancestors do their part
23:32 TimToady ^^^ fixes the crash with t/spec/integration/99problems-41-to-50.t
23:32 TimToady All tests successful.
23:32 lizmat joined #perl6
23:33 ab5tract yeah, i'm liking P6's BUILD semantics a lot. this blog post is getting a bit thick in the middle :)
23:33 TimToady oh, I'd better bup
23:33 TimToady *m
23:33 ggoebel111111115 joined #perl6
23:34 dalek rakudo/nom: dd27056 | TimToady++ | tools/build/NQP_REVISION:
23:34 dalek rakudo/nom: bump nqp
23:34 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/dd27056fcb
23:34 smls joined #perl6
23:35 denis_boyun_ joined #perl6
23:36 lizmat .oO( wish we could see why nqp was bumped in the rakudo git log )
23:37 TimToady well, but it's in the nqp git log, which is why we had to bump it :)
23:37 ab5tract and do i assume correctly that Mu's BUILD is always called, even if a .new is defined but doesn't call self.bless?
23:38 TimToady I don't think so
23:38 TimToady not unless you defer to the built-in new from your new
23:38 TimToady when nextsame or so
23:38 TimToady *with
23:39 TimToady but if the reason for your own new is to change the argument processing, builtin new won't like it
23:39 TimToady so better to call .bless
23:40 TimToady only one new needs to call .bless
23:40 ab5tract in the class hierarchy?
23:41 TimToady yes, for a given lineage
23:41 TimToady BUILDALL does all the hard work
23:41 TimToady and makes sure parents are ready before children
23:43 ab5tract hmmm.. but any subclass .new overrides the parent .new, so i'm confused by "only one new needs to call .bless"
23:45 TimToady I meant dynamically, not statically
23:45 ab5tract unless i take your meaning as, you only need self.bless called once, because BUILDALL does what it says :)
23:45 TimToady every new wants to have a bless, but you only need to run the most derived .bless
23:46 * TimToady did not realize he said something terribly ambiguous, which is unusual for him...
23:46 TimToady means I need a nap, in all likelihood...
23:46 ab5tract ok, so good practice is to always call bless? sorry to be hammering the point, but i want to give good advice
23:48 TimToady yes, in general, though of course there are always exceptions, like if you just want to write a logging new around the built-in
23:48 TimToady in that case use callsame or nextsame instead
23:49 TimToady note that BUILDALL is a virtual call, so even if a parent calls .bless, all the correct BUILDs are run
23:50 TimToady bless always needs to be called by someone, let's put it that way
23:51 TimToady and it's the most derived new's responsibility to either call .bless or call something that will call .bless
23:52 TimToady (note that this is all an oversimplification when it comes to native types with other representations than P6Opaque)
23:52 ab5tract i see. yeah, i'm looking for the general rule. the edge cases can have their own blog post :)
23:53 vendethiel joined #perl6
23:54 * TimToady is tired of generalities, and specifically wants a nap :)
23:54 TimToady &
23:55 ab5tract enjoy TimToady :)
23:55 ab5tract m: class D { submethod BUILD { say "D.BUILD" } }; class E is D { method new { say "E.new"; self.bless } }; class H is E { method new { say "H.new" } }; H.new
23:55 camelia rakudo-moar 91d899: OUTPUT«H.new␤»
23:56 ab5tract still lost in the contrast between that code snippet and "so even if a parent calls .bless, all the correct BUILDs are run", but sleep is appealing to me as well
23:56 TimToady m: class D { submethod BUILD { say "D.BUILD" } }; class E is D { method new { say "E.new"; self.bless } }; class H is E { method new { say "H.new"; nextsame } }; H.new
23:56 camelia rakudo-moar 91d899: OUTPUT«H.new␤E.new␤D.BUILD␤»
23:57 TimToady m: class D { submethod BUILD { say "D.BUILD" } }; class E is D { method new { say "E.new"; self.bless } }; class H is E { method new { say "H.new"; self.bless } }; H.new
23:57 camelia rakudo-moar 91d899: OUTPUT«H.new␤D.BUILD␤»
23:57 TimToady that's all correct
23:57 ab5tract it's crystal now
23:57 ab5tract thanks :D
23:57 TimToady thunk & :D
23:58 rmgk_ joined #perl6
23:58 BenGoldberg p56: s/(.)(.*)(.)/First [$1], Second [$2], Third[$3]/; # Why does the rhs of s/// dissapear with p56?
23:58 camelia p5-to-p6 : OUTPUT«s:P5!(.)(.*)(.)!!␤»
23:59 woolfy joined #perl6

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

Perl 6 | Reference Documentation | Rakudo