Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2011-09-04

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 woosley joined #perl6
00:28 Tene tadzik: I still care about language interop on parrot.
00:31 dark_x joined #perl6
00:41 beppu joined #perl6
00:42 raiph joined #perl6
00:42 skangas joined #perl6
01:00 dual joined #perl6
01:24 REPLeffect joined #perl6
01:24 colomon sorear: errr, what sqrt function did you change?
01:25 colomon ah, may not have properly gotten my niecza updated
01:28 Tedd1 joined #perl6
01:37 colomon sorear: ah, nothing like removing a line of code to get closer to the spec.  :)
02:00 colomon niecza: say 0.sqrt
02:00 p6eval niecza v9-8-gd3b0031: OUTPUT«0+0i␤»
02:00 colomon yeah, that's just silly.  :)
02:03 colomon as is: is sqrt(-0/1), -0/1
02:10 dalek roast: 8d1cec6 | (Solomon Foster)++ | S32-num/sqrt.t:
02:10 dalek roast: Result of a sqrt should never be a Rat.
02:10 dalek roast: review: https://github.com/perl6/roast/commit/8d1cec678f
02:31 colomon nom: say -0/1
02:32 colomon rakudo: say -0/1
02:32 p6eval rakudo 5aac38: OUTPUT«0␤»
02:33 colomon so is sqrt(-0/1), -0/1 was extra silly, because we don't actually support -0/1 as a Rat distinct from 0/1
02:33 colomon of course, that probably means I just broke sqrt.t on rakudo.
02:37 dalek roast: a25a620 | (Solomon Foster)++ | S32-num/sqrt.t:
02:37 dalek roast: sqrt(-0/1) was a silly test in the first place, because -0/1 == 0/1.  Therefore, this test never tested what its author thought it was testing, and I'm deleting it.
02:37 dalek roast: review: https://github.com/perl6/roast/commit/a25a620e86
02:40 envi joined #perl6
02:46 colomon BTW, niecza runs sin.t in 3.2 sec on my MBP, including fudging and niecza start up time
02:46 diegoviola left #perl6
03:05 abercrombie joined #perl6
03:06 colomon_ joined #perl6
03:08 JimmyZ joined #perl6
03:09 colomon joined #perl6
03:10 woosley joined #perl6
03:24 agentzh joined #perl6
03:29 Su-Shee joined #perl6
03:42 plobsing joined #perl6
04:05 agentzh joined #perl6
04:22 TimToady perl6: say sqrt(16/9).perl
04:22 p6eval pugs: OUTPUT«1.3333333333333333␤»
04:22 p6eval ..rakudo 5aac38, niecza v9-8-gd3b0031: OUTPUT«1.33333333333333␤»
04:22 jaldhar joined #perl6
04:23 TimToady 4/3 would be more exact :)
04:27 sorear TimToady: the rule we're using is that sqrt always returns a Num, except when it returns a Complex
04:28 sorear we're collectively operating under the assumption that identifying perfect squares is not worth it
04:28 TimToady well, it's practical, but I'm just pointing out there's arguments for Rat too
04:29 cognominal joined #perl6
04:29 JimmyZ joined #perl6
04:36 isBEKaml joined #perl6
04:41 isBEKaml b: say 0.sqrt
04:41 p6eval b 1b7dd1: OUTPUT«0␤»
04:41 isBEKaml perl6: say 0.sqrt
04:41 p6eval niecza v9-8-gd3b0031: OUTPUT«0+0i␤»
04:41 p6eval ..pugs, rakudo 5aac38: OUTPUT«0␤»
04:42 isBEKaml niecza seems to be extra careful about correctness. niecza++
04:42 isBEKaml niecza: say (-1).sqrt
04:42 p6eval niecza v9-8-gd3b0031: OUTPUT«0+1i␤»
04:42 TimToady except sqrt isn't supposed to promote Num to Complex
04:43 isBEKaml Well, I was just saying that sqrt of 0 is meaningless and falls under Complex domains.
04:45 isBEKaml TimToady: btw, what's the base type for all numbers? Isn't that Num?
04:45 sorear it seems to me that that case is a bug
04:45 sorear 0.sqrt is 0
04:46 TimToady isBEKaml: define "base" and "type" first :)
04:46 TimToady but it certainly isn't Num
04:46 isBEKaml TimToady: all numbers are X, Int and Real are subclasses of X.
04:46 TimToady Numeric
04:46 TimToady so's Complex
04:47 TimToady but Numeric isn't a class, of course
04:47 sorear isBEKaml: strictly speaking, Real is a role, not a class
04:47 sorear isBEKaml: it has no superclassers
04:47 sorear Numeric is the "tag" role for all numeric types
04:48 sorear however, Numeric has no semantics of its own; all numeric logic is handled by multisubs in CORE
04:48 isBEKaml ah. I see... So Numeric's just a place holder of sorts?
04:48 TimToady it's a role, and if there's any API that's common to all numbers, it'd be defined there
04:48 isBEKaml that is, without any semantics, enforcing bounds is done by respective types. ?
04:49 sorear Numeric exists so you can use it as a type constraint
04:49 sorear especially in a MMD context
04:49 TimToady bounds?
04:49 isBEKaml range bouns.
04:49 isBEKaml *bounds
04:49 TimToady Complex is not ordered
04:49 sorear multi foo (Numeric $x) { }; multi foo (Str $x) { }
04:50 sorear isBEKaml: types are not involved in the range-checking process
04:50 sorear isBEKaml: &infix:<+> looks at the result and then decides what kind of object to make
04:55 isBEKaml sorear: oh, I see... I guess I was just confused when I saw Num and Numeric. Sorry, I'm so off base here.. :/
04:55 sorear Num is the class for inexact real numbers
04:56 sorear it's expected that on most current systems Num will box a 64-bit IEEE.754 value
04:58 isBEKaml sorear: I see Num.pir defined in builtins and later augmented in src/core using role Real. HOw does Niecza do it?
04:59 sorear num is defined as a class in CORE.setting
04:59 sorear Num I mean
04:59 sorear but Num is not what you are after
04:59 isBEKaml sorear: btw, I had long wanted to ask this question about Niecza -- do you have primitive types or are types boxed in there too?
05:00 sorear in Perl 6, the numeric classes are very passive
05:00 mattp_ joined #perl6
05:01 sorear isBEKaml: bad question.   "boxing" is simply the procedure that allows you to store 1.5 in a variable of type Any; *every* Perl 6 implementation has to do it
05:01 sivoais joined #perl6
05:01 sorear isBEKaml: Niecza does not support primitive types.  Yet.
05:01 sorear however, Rakudo does
05:01 sorear rakudo: my int $x; say $x
05:01 p6eval rakudo 5aac38: OUTPUT«57840944␤»
05:01 isBEKaml niecza: my int $x = 42; my Int $y = 42;
05:01 p6eval niecza v9-8-gd3b0031: OUTPUT«[31m===[0mSORRY![31m===[0m��Malformed my at /tmp/TGQ8IeNevx line 1:�------> [32mmy [33m�[31mint $x = 42; my Int $y = 42;[0m��Parse failed��»
05:01 sorear Rakudo's answer is instructive
05:04 isBEKaml sorear: No, I was thinking about how some p6 implementation of numbers on the JVM would look like. It had to have numbers "boxed" into their respective classes than primitives on the jvm.(Integer, not int. Double, not double)  That's what I'm referring to.
05:05 isBEKaml s/numbers/numeric types/
05:06 sorear isBEKaml: ah.  in that case the answer is probably "yes".  $x = 2 + 2; allocates a single long-lived object as far as the CLR GC is concerned
05:07 sorear it allocates an object of type Niecza.BoxObject<int> with layout struct { MonoObject header; STable* sTable; MonoArray* extend; int value; }
05:08 isBEKaml sorear: sTable and extend are pointers? I didn't know C# had pointers!
05:10 isBEKaml sorear: never mind. first link in google. :)
05:11 sorear isBEKaml: the layout sample was C
05:11 sorear isBEKaml: in C#, it looks like: class BoxObject<T> { STable mo; object[] extend; T value; }
05:11 isBEKaml sorear: http://msdn.microsoft.com/en-us/l​ibrary/y31yhkeb%28v=vs.80%29.aspx
05:11 sorear isBEKaml: MonoObject and MonoArray are types defined in Mono :p
05:12 sorear isBEKaml: so?
05:12 sorear I know C# has pointers.  I just wasn't using C# there.
05:13 isBEKaml sorear: I knew it had to be generic enough. :P
05:13 sorear ... you must have touched a button.  Sorry, that responce was uncalled for.
05:20 isBEKaml sorry, I didn't mean to be offensive.
05:27 isBEKaml left #perl6
05:35 sorear oops, I scared them off
05:37 Sarten-X joined #perl6
05:44 isBEKaml joined #perl6
05:49 xinming joined #perl6
05:50 sivoais joined #perl6
05:51 TiMBuS joined #perl6
06:02 sivoais joined #perl6
06:05 mberends fwiw, fastest current nom test execution times: 9 microseconds on a 2.67GHz i7 for S02-builtin_data_types/num.rakudo test 58, S02-literals/radix.rakudo tests 7 and 24 (on Debian 64 bit)
06:06 mberends many more at 10 and 11 microseconds, it's down to noise at that level
06:09 mberends sorear: are you interested in measuring Niecza per-test execution times? It involves some instrumentation in Test.pm and a harness such as rakudo/tools/test_summary.pl.
06:12 sorear mberends: the evidence I have so far supports a theory that Niecza's per-test execution times are dominated by Niecza per se's load time
06:12 mberends sorear: yes, I think so too
06:12 sorear mberends: how are you measuring microsecond timing?  I guess you're not measuring the entire process time
06:13 sorear ah. Test.pm instrumentation
06:13 mberends it's hires wall clock time before and after the test
06:13 sorear I'd be very suprised if Rakudo can parse "use Test;" in less than 100 microseconds
06:14 mberends 'use Test;' is not being measured. The timestamps are taken by ok(), is() etc
06:15 mberends I mean per-test times, not per-script times
06:16 sorear Oh
06:16 mberends I suspect that Niecza executes some tests in nanoseconds, less than 1 microsecond
06:17 sorear doubtful
06:17 sorear Niecza takes a significant fraction of a microsecond to call a function with 0 arguments
06:18 wamba joined #perl6
06:18 sorear and ok() is 3 calls currently
06:18 mberends I see
06:18 sorear make that 8 or so, I'd forgotten how much work my ok() does
06:19 mberends hmm
06:19 sorear there's plenty of room to optimize Niecza's Test.pm
06:20 mberends I plan to measure an empty test as well, to establish a base time that could be subtracted from other test times.
06:20 sorear but, uh, when the parser takes around 10000µs per line, there's not much point
06:21 sorear actually more like 7500 now, and it'll be even lower for you, but still »1
06:21 mberends startup time dominates some perl applications, execution time others
06:21 sorear or is that >>1
06:21 sorear (I arrive at that figure by dividing 45 seconds by 6000 lines for STD.pm6)
06:25 mberends back to my question, are you interested, considering that it would affect Test.pm?
06:26 sorear Not really
06:26 mberends ok, then I'll not pursue it
06:47 jamtech joined #perl6
06:51 wamba joined #perl6
07:05 jfried joined #perl6
07:42 dalek niecza: d637b5c | sorear++ | lib/ (2 files):
07:42 dalek niecza: First draft of new MMD kernel
07:42 dalek niecza: review: https://github.com/sorear/niecza/commit/d637b5c1d9
07:48 tadzik Tene: (language interop) sorry, I seemed to recall you stopped working on it because no one else cared
07:49 sorear tadzik: ey cares but does not currently work
07:50 tadzik understood
07:51 wamba joined #perl6
07:53 sorear I wish I had looked in the C++ spec *first*.  not only does it use the same core overloading algorithm as C#, but it gives a linear time no-precalculation algorithm in a footnote
07:54 * sorear out
08:13 wamba joined #perl6
08:15 Tene tadzik: that's approximately correct
08:27 wamba joined #perl6
08:38 wamba joined #perl6
08:53 mj41 joined #perl6
08:54 pmurias joined #perl6
09:05 molaf joined #perl6
09:10 woosley joined #perl6
09:11 orafu joined #perl6
09:14 masak joined #perl6
09:14 masak top o' the morning to you, #perl6.
09:15 tadzik oh hai masak
09:16 * masak has been out for a morning run and feels all... fresh and healthy :)
09:17 * tadzik ate a proper breakfast and feels healthy as well
09:18 * masak is happy to hear tadzik is eating properly
09:18 tadzik I weighted 69 kgs last time I weighted myself
09:18 tadzik achievement (almost) unlocked :)
09:19 masak excellent. we'd be loath to see you wither away. ;)
09:20 tadzik wow, according to BMI I'm no longer underweight already!
09:20 masak \o/
09:21 tadzik (:
09:21 tadzik bacon++
09:23 im2ee joined #perl6
09:23 REPLeffect joined #perl6
09:24 JimmyZ \o
09:24 tadzik o/
09:26 im2ee Hello! :)
09:28 kaare_ joined #perl6
09:29 daniel-s hey guys
09:29 daniel-s are there really smart people around?
09:29 * daniel-s needs advice
09:32 tadzik everyone is too humble to answer, you better just ask away
09:34 masak there are really smart people in here.
09:40 MayDaniel joined #perl6
09:57 masak rakudo: enum Empty <>; say "alive"
09:57 p6eval rakudo 5aac38: OUTPUT«===SORRY!===␤Unsupported use of <>; in Perl 6 please use lines() to read input, ('') to represent a null string or () to represent an empty list at line 1, near "<>; say \"a"␤»
09:58 masak rakudo: enum Empty (); say "alive"
09:58 p6eval rakudo 5aac38: OUTPUT«alive␤»
10:19 sayu joined #perl6
10:24 phenny joined #perl6
10:25 xinming joined #perl6
10:55 colomon joined #perl6
10:55 Grimnir_ joined #perl6
10:57 masak jnthn++ # parrot-dev message
11:07 pmurias joined #perl6
11:24 im2ee joined #perl6
11:34 TiMBuS daniel-s, always ask. never ask to ask
11:35 masak ...mostly because it wastes time, not because we'll like you less (we won't) ;)
11:36 tadzik I had a physics teacher who used to say "the one who asks is stupid, but the one who doesn't remains stupid"
11:36 masak reminds me of the South Park teacher who says "there aren't any stupid questions, only stupid pupils". :P
11:37 TiMBuS i thought of that too
11:37 TiMBuS hah
11:38 im2ee How to get index of some value in an array? :)
11:38 im2ee E.g. i have ('a', 'b', 'c') array, and i want to get index of 'c'. :)
11:38 masak tadzik: Swedish students are very timid when it comes to asking questions. there's something about "standing out" that doesn't resonate well with them. I don't like that mentality, so I often ask lots of little questions. :)
11:39 im2ee Does exist any function in p6 to do this? :)
11:39 masak im2ee: I asked that a while back, and got lots of good answers.
11:39 masak im2ee: hold on, I'll get you the backlog linky.
11:39 im2ee masak, ok. :)
11:39 tadzik rakudo: <a b c>.indexof('b').say
11:39 p6eval rakudo 5aac38: OUTPUT«Method 'indexof' not found for invocant of class 'Parcel'␤  in <anon> at /tmp/YbfOT1V_nd:1␤  in <anon> at /tmp/YbfOT1V_nd:1␤␤»
11:39 tadzik maybe I remember wrongly :0
11:39 tadzik :)
11:40 tadzik doesn't our List::Utils have first()?
11:40 agentzh joined #perl6
11:40 tadzik doesn't seem so
11:41 masak rakudo: my @array = <a b c>; my $value = 'c'; say @array.keys.first({ @array[$_] eq $value })
11:41 p6eval rakudo 5aac38: OUTPUT«2␤»
11:41 masak https://github.com/masak/cry​pt/blob/master/crypt.pl#L126
11:41 tadzik oh, nice
11:42 im2ee great :)
11:42 masak that's the solution I ended up with, courtesy of moritz++
11:42 im2ee thanks masak :)
11:42 tadzik rakudo: my @array = <a b c>; my $value = 'c'; say @array.first($value)
11:42 p6eval rakudo 5aac38: OUTPUT«c␤»
11:42 tadzik ach
11:42 masak :)
11:42 mberends masak: do you have a URL for jnthn's parrot-dev message please?
11:42 masak perhaps .first :key could be made to work...
11:42 masak mberends: sure, sec.
11:42 tadzik mberends: http://lists.parrot.org/pipermail/pa​rrot-dev/2011-September/006173.html
11:43 mberends ty
11:43 masak http://groups.google.com/group/parrot-de​v/browse_thread/thread/77755393392e3634
11:44 tadzik masak: how does crypt like nom?
11:44 masak tadzik: don't remember if I tried it.
11:44 masak bet there's still a few pieces missing, though.
11:44 * masak tries it
11:52 jnthn afternoon, #perl6
11:52 masak jnthn! \o/
11:53 tadzik afterdinner, jnthn
11:56 cognominal joined #perl6
11:58 JimmyZ is there a method/sub to exchange keys and values? array/hash
11:59 yath reverse
11:59 yath oh
11:59 yath sorry, thought i was in #perl :)
11:59 tadzik invert I think
11:59 tadzik rakuod: { a => 1, b => 2}.invert.perl.say
12:00 tadzik rakudo: { a => 1, b => 2}.invert.perl.say
12:00 p6eval rakudo 5aac38: OUTPUT«(1 => "a", 2 => "b").list␤»
12:00 tadzik rakudo: <a b c d>.invert.perl.say
12:00 p6eval rakudo 5aac38: OUTPUT«Method 'invert' not found for invocant of class 'Parcel'␤  in <anon> at /tmp/mKvKEqkYjM:1␤  in <anon> at /tmp/mKvKEqkYjM:1␤␤»
12:00 tadzik b: <a b c d>.invert.perl.say
12:00 p6eval b 1b7dd1: OUTPUT«Method 'invert' not found for invocant of class 'Parcel'␤  in main program body at line 22:/tmp/_U_kvH8kVr␤»
12:00 tadzik b: <a b c d>.hash.invert.perl.say
12:00 p6eval b 1b7dd1: OUTPUT«("b" => "a", "d" => "c")␤»
12:00 tadzik b: <a b c d>.kv.invert.perl.say
12:00 p6eval b 1b7dd1: OUTPUT«Method 'invert' not found for invocant of class 'List'␤  in main program body at line 22:/tmp/18VAYm0Kcf␤»
12:01 tadzik then .kv.hash will work :)
12:01 im2ee Hmm, what is better for perl6? vim or emacs? :)
12:01 im2ee Or something else ?
12:01 jnthn Notepad++!
12:01 jnthn ;)
12:02 im2ee jnthn, on windows? :)
12:02 jnthn Yes :)
12:02 mberends gedit in Perl 5 mode ;)
12:02 im2ee I'm using gentoo linux. :)
12:02 im2ee hmm, mistake. I use gentoo linux. :)
12:04 mberends im2ee: both statements were completely correct :)
12:05 im2ee ok :)
12:05 JimmyZ b: (<a b c d>.kv.hash.invert)['c'].say
12:05 p6eval b 1b7dd1: OUTPUT«a      0␤»
12:05 whiteknight joined #perl6
12:05 tadzik im2ee: I use vim
12:06 tadzik don't know about perl6 hilighting for emacs but the one for vim is a bit less than awesome
12:06 JimmyZ rakudo: (<a b c d>.kv.hash.invert.hash)<c>.say
12:06 p6eval rakudo 5aac38: OUTPUT«2␤»
12:07 tadzik <a b c d>.kv.hash.invert<c>.value.say
12:07 tadzik rakudo: <a b c d>.kv.hash.invert<c>.value.say
12:07 p6eval rakudo 5aac38: OUTPUT«Method 'at_key' not found for invocant of class 'List'␤  in method postcircumfix:<{ }> at src/gen/CORE.setting:927␤  in <anon> at /tmp/JBayFnUe4Y:1␤  in <anon> at /tmp/JBayFnUe4Y:1␤␤»
12:07 tadzik pff
12:07 woosley rakudo: {a => 1, b => 1}.invert.perl.say
12:07 p6eval rakudo 5aac38: OUTPUT«(1 => "a", 1 => "b").list␤»
12:08 im2ee tadzik, i use vim too. And i have some problems with syntax highlighting. There are problems with highlighting when i use a function with more than 2 arguments. :)
12:08 tadzik im2ee: do you 'setf perl6'?
12:08 woosley {a => 1, b => 1}.invert.keys.perl.say
12:08 JimmyZ b: my @array = <a b c>; my $value = 'c'; @array.invert.perl.say
12:08 p6eval b 1b7dd1: OUTPUT«Method 'invert' not found for invocant of class 'Array'␤  in main program body at line 22:/tmp/KdvB3e1BUO␤»
12:08 tadzik I went full hardcore and have au BufRead,BufNewFile *.pl,*.pm,*.nqp,*.t set filetype=perl6 in my .vimrc :)
12:08 woosley b: {a => 1, b => 1}.invert.keys.perl.say
12:08 p6eval b 1b7dd1: OUTPUT«(0, 1)␤»
12:08 im2ee tadzik, yes i do.
12:09 tadzik that's strange
12:09 JimmyZ perl6 doesn't have a invert method for array?
12:09 woosley rakudo: {a => 1, b => 1}.invert.keys.perl.say
12:09 p6eval rakudo 5aac38: OUTPUT«(0, 1).list␤»
12:09 tadzik b: <a b c d>.flip.perl.say
12:09 p6eval b 1b7dd1: OUTPUT«"d c b a"␤»
12:10 woosley b: {1 => a, 1 => c}.keys.perl.say
12:10 p6eval b 1b7dd1: OUTPUT«Could not find sub &a␤  in main program body at line 22:/tmp/Sf_LTIAMNI␤»
12:10 tadzik b: <a b c b>.kv.hash.invert.perl.say
12:10 p6eval b 1b7dd1: OUTPUT«("a" => "0", "b" => "1", "c" => "2", "b" => "3")␤»
12:10 tadzik close enough
12:10 woosley b: {1 => 'a', 1 =>'c'}.keys.perl.say
12:10 p6eval b 1b7dd1: OUTPUT«("1")␤»
12:10 JimmyZ b: (<a b c b>.kv.hash.invert)<c>.say
12:10 p6eval b 1b7dd1:  ( no output )
12:11 woosley interesting
12:11 JimmyZ b: (<a b c b>.kv.hash.invert.hash)<c>.say
12:11 p6eval b 1b7dd1: OUTPUT«2␤»
12:11 woosley b: {a => 1, b => 1}.invert.keys.perl.say
12:11 p6eval b 1b7dd1: OUTPUT«(0, 1)␤»
12:16 im2ee When i have an array in hash. { "key" => <a b c> }, to push a value to "key" array should i write %hash{"key"}.push(...) or @hash{....
12:16 im2ee ? :)
12:16 im2ee I know how to do this in p5, but how in p6? :)
12:18 masak im2ee: %
12:18 woosley left #perl6
12:18 masak im2ee: as a rule, the sigil doesn't change in Perl 6 when you want to access an array or hash in different ways.
12:19 mberends invert for a search looks terribly inefficient
12:19 im2ee masak, ok, but when i use % i get:
12:20 masak rakudo: my %hash = "key" => <a b c>; %hash{"key"}.push("d"); say %hash.perl
12:20 p6eval rakudo 5aac38: OUTPUT«Method 'push' not found for invocant of class 'Parcel'␤  in <anon> at /tmp/3T2S0WU1Ad:1␤  in <anon> at /tmp/3T2S0WU1Ad:1␤␤»
12:20 masak rakudo: my %hash = "key" => [<a b c>]; %hash{"key"}.push("d"); say %hash.perl
12:20 p6eval rakudo 5aac38: OUTPUT«("key" => ["a", "b", "c", "d"]).hash␤»
12:20 masak \o/
12:20 masak rakudo: my %hash = "key" => [<a b c>]; %hash<key>.push("d"); say %hash.perl
12:20 p6eval rakudo 5aac38: OUTPUT«("key" => ["a", "b", "c", "d"]).hash␤»
12:20 im2ee Method 'push' not found for invocant of class ''
12:20 masak im2ee: see above :)
12:22 im2ee so it have to be reference to an array? :)
12:22 JimmyZ invert for a search is always simple and useful when it's a small array
12:23 * JimmyZ would like to see a invert method array too, not only in hash :)
12:24 JimmyZ s/array/in array/
12:24 mberends by the time invert has done its work, first will always have returned the answer. They both iterate, but first is allowed to stop early.
12:25 masak im2ee: <a b c> isn't an array, it's more like a list. lists can't be pushed to.
12:25 masak im2ee: [<a b c>] puts the list into an array.
12:26 JimmyZ mberends:  hash iterate too?
12:28 mberends JimmyZ: yes, iiuc
12:29 * JimmyZ thought %foo<bar> doesn't iterate
12:30 mberends JimmyZ: it doesn't.
12:31 JimmyZ mberends:  (<a b c b>.invert)<c>  only iterate once
12:31 mberends JimmyZ: I thought you meant something processing the entire hash, when you wrote 'hash iterate'
12:32 * JimmyZ want @array.invert method because it's very useful for WEB development ;)
12:32 * JimmyZ always use that
12:33 mberends JimmyZ: I agree with you there, it's more elegant source code, but costs more CPU cycles and GC pressure to execute.
12:33 JimmyZ mberends: only use for some small array, most are less than 30 elements
12:36 JimmyZ mberends:  it's not issues  in WEB because most performance issues  are in database :)
12:37 mberends JimmyZ: +1 :)
12:38 mberends JimmyZ: +2 if you store the inverted array in a hash and re-use it as a cache ;)
12:40 JimmyZ mberends: yeah, cache is important
12:49 im2ee masak, so [] is empty array?
12:50 masak im2ee: yes.
12:51 im2ee Hm, one more question. :)  delete() (on array) expected an index or value?
12:51 masak an index.
12:51 masak just like hashes.
12:52 masak rakudo: my @a = <a b c>; @a.delete(1); say @a.perl
12:52 p6eval rakudo 5aac38: OUTPUT«Method 'delete' not found for invocant of class 'Array'␤  in <anon> at /tmp/ShJfDidpRg:1␤  in <anon> at /tmp/ShJfDidpRg:1␤␤»
12:52 masak provided Array has .delete. I'm not so sure.
12:52 masak b: my @a = <a b c>; @a.delete(1); say @a.perl
12:52 p6eval b 1b7dd1: OUTPUT«["a", Any, "c"]␤»
12:52 masak ah. seems it does.
12:53 im2ee Any? So it still is, but without type?
12:53 im2ee b: my @a = <a b c>; @a.delete(1); say $_ for @a;
12:53 p6eval b 1b7dd1: OUTPUT«a␤Any()␤c␤»
12:54 im2ee rakudo: my @a = <a b c>; @a.delete(1); say $_ for @a;
12:54 p6eval rakudo 5aac38: OUTPUT«Method 'delete' not found for invocant of class 'Array'␤  in <anon> at /tmp/AHANjcYRq1:1␤  in <anon> at /tmp/AHANjcYRq1:1␤␤»
12:54 im2ee hm, i use rakudo on my machine/
12:54 masak im2ee: Any here means something like "undef".
12:54 im2ee :)
12:55 masak im2ee: you probably have what's now known as 'b' on your machine.
12:55 masak im2ee: bring this odd naming up with pmichaud :P
12:56 masak im2ee: what goes under the name 'rakudo: ' here on the channel is the branch 'nom'.
12:56 masak there's no master branch any more.
12:56 molaf joined #perl6
13:01 agentzh joined #perl6
13:05 im2ee masak, ok. :)
13:11 im2ee joined #perl6
13:13 im2ee joined #perl6
13:13 LoRe_ joined #perl6
13:14 Helios joined #perl6
13:14 tadzik ooh, wherefore-gc-bug seems not to fail anymore
13:19 wamba joined #perl6
13:22 agentzh joined #perl6
13:30 im2ee b: my $s = 'abc def'; say $s.split(/\s/);
13:30 p6eval b 1b7dd1: OUTPUT«abcdef␤»
13:30 im2ee b: my $s = 'abc def'; say $s.split(/\s/).perl;
13:30 p6eval b 1b7dd1: OUTPUT«("abc", "def")␤»
13:38 pmurias joined #perl6
13:38 donri joined #perl6
13:38 daniel-s joined #perl6
13:49 pmurias joined #perl6
13:51 whiteknight joined #perl6
13:51 tadzik Method 'WHY' not found for invocant of class 'Perl6::Grammar'
13:51 tadzik okay, the gc bug is not gone at all :P
13:53 dalek Heuristic branch merge: pushed 43 commits to rakudo/nom-buf by tadzik
13:53 dalek Heuristic branch merge: pushed 215 commits to rakudo/wherefore-gc-bug by tadzik
14:29 MayDaniel joined #perl6
14:32 dalek nqp: 41e1fd8 | jonathan++ | src/HLL/SerializationContextBuilder.pm:
14:32 dalek nqp: Make check for if we're in precompilation mode cheaper. Saves walking a load of call frames if we're quite deep in the parse, though probably only a small saving overall.
14:32 dalek nqp: review: https://github.com/perl6/nqp/commit/41e1fd8166
14:32 dalek nqp: f8a2d0a | jonathan++ | src/6model/knowhow_bootstrapper.c:
14:32 dalek nqp: Have KnowHOW publish a method cache, which should avoid a bunch of method cache misses and the resulting .^find_method call.
14:32 dalek nqp: review: https://github.com/perl6/nqp/commit/f8a2d0a0f9
14:32 dalek nqp: 903eaae | jonathan++ | src/6model/sixmodelobject.c:
14:32 dalek nqp: Avoid a use of Parrot_ext_call, so if we do have to go to .^find_method to locate a method then at least we don't have to do the whole signature string parsing thing.
14:32 dalek nqp: review: https://github.com/perl6/nqp/commit/903eaae683
14:36 SHODAN joined #perl6
14:39 jnthn tadzik: Few more tweaks, probably only make a small improvement though.
14:40 tadzik will check
14:48 pmurias joined #perl6
14:52 abercrombie joined #perl6
14:53 birdwindupbird joined #perl6
15:00 whiteknight joined #perl6
15:10 tadzik jnthn: settings compilation is 3 minutes now
15:12 tadzik make  425.54s user 5.14s system 113% cpu 6:19.45 total
15:13 jnthn tadzik: Whoa, what, that shaved 30 seconds off?!
15:14 tadzik 1600*     @tadzik | make  456.76s user 6.35s system 110% cpu 6:59.09 total
15:14 tadzik yeah, 31
15:14 jnthn That's the build overall, not just the setting, I guess?
15:14 tadzik yes
15:14 tadzik setting itself was 3:20 or 3:30, is about 3:00
15:15 jnthn OK, so we're now down to about a third of the time we used to spend compiling the setting? :)
15:15 tadzik 0.3 to be certain
15:15 jnthn Well, that's nice. :)
15:16 tadzik that's pretty awesome :)
15:16 tadzik jnthn: are the measures actually helping you technically, besides being a morale boost?
15:16 jnthn tadzik: Yes.
15:16 jnthn tadzik: Well, actually they mostly make me more curious.
15:16 jnthn tadzik: I'm interested which of the patches contributed most of that.
15:16 tadzik right, yesterday the separation you are working on now added 5 seconds to the build time
15:17 pmurias joined #perl6
15:17 felher reading masak++ blogpost about -n -p switch i wonder: what is PAST? AST is an abstract syntax tree i guess, whats the 'P' for?
15:17 jnthn tadzik: If you have time, maybe try it at 41e1fd8166.
15:18 tadzik jnthn: I'm running the spectest now
15:18 tadzik felher: Parrot I guess
15:18 jnthn tadzik: So we know if the it was the precomp mode check improvement that did it, or the other one.
15:18 tadzik jnthn: I'll try that when I finish the spectest
15:18 tadzik so in like 20 minutes or more
15:18 tadzik or I can try it now, if you prefer
15:19 felher tadzik: hm, yeah. that'd make sense, thnx.
15:19 jnthn tadzik: No, in 20 is fine :)
15:19 tadzik ok cool
15:19 jnthn Nice to know spectest time change too, if any.
15:19 tadzik ohbtw
15:19 tadzik Pod:: nodes are but simple objects, if we added them to the bootstrap, would we be able to document the setting?
15:20 tadzik I know, I'm going to lenghten the setting compilation just after you shortened it, but... ;)
15:20 jnthn tadzik: Hm, maybe. Lemme think on that one a little.
15:21 felher another question: What execatly is that 'setting' you're benchmarking quite a few times now? Is it 'src/gen/CORE.setting' ?
15:21 tadzik felher: yes
15:22 tadzik felher: it's a Standard Library, in some sense
15:22 felher tadzik: ah, i see. Thnx again. :)
15:22 tadzik you're welcome :)(
15:24 tadzik heh, I bought 4 new shiny DVDs to backup my pictures, and apparently I need 5 :/
15:24 mberends the off-by-one error strikes again! ;)
15:33 pmurias joined #perl6
15:36 benabik_ joined #perl6
15:37 felher Yeah. There are only two hard problems in computer science. Naming, caching and off-by-one errors.
15:37 * jnthn wonders if he'll understand knowhow_bootstrapper.c one day...
15:38 colomon_ joined #perl6
15:40 tadzik make spectest  1465.13s user 72.10s system 98% cpu 25:52.77 total
15:40 tadzik was 1831 yesterday
15:40 tadzik b: say (1831 - 1465) / 1831
15:40 p6eval b 1b7dd1: OUTPUT«0.199890770070999␤»
15:40 tadzik not bad
15:40 flussence bah, I have this really neat script to pull TAP archives off smolder.parrot.org, and the server's down :(
15:40 jnthn tadzik: Before any of the improvements?
15:41 jnthn tadzik: Or at the end of yesterday?
15:41 tadzik well, wait
15:41 tadzik 2351*       tadzik | jnthn: make spectest  1742.80s
15:41 tadzik the oldest measure I have
15:41 tadzik b: (1742 - 1465) / 1742
15:41 p6eval b 1b7dd1:  ( no output )
15:41 tadzik b: say (1742 - 1465) / 1742
15:41 p6eval b 1b7dd1: OUTPUT«0.159012629161883␤»
15:42 jnthn OK, so we spectest 15% or so faster.
15:42 tadzik jnthn: 41e1fd8166 in which repo?
15:42 jnthn nqp
15:43 jnthn tadzik: I pushed 3 commits to NQP. The were kinda in two "sets"
15:43 pmurias joined #perl6
15:43 jnthn tadzik: The first one did one thing
15:43 jnthn tadzik: The next two were related.
15:43 tadzik okay
15:43 jnthn tadzik: I'm curious if the first one (the caching of comp mode) or the second one (reducing method cache misses) made the bigger difference.
15:44 tadzik checking
15:44 jnthn OK. I'm just about to land some further (hopeful) improvements also.
15:45 dalek nqp: a29c8a7 | jonathan++ | src/ (3 files):
15:45 dalek nqp: Add a way to mark the method cache as being authoritative. Can't use this in Rakudo's meta-objects yet, but we can in NQP ones.
15:45 dalek nqp: review: https://github.com/perl6/nqp/commit/a29c8a798f
15:45 dalek nqp: c66f98e | jonathan++ | src/how/NQPClassHOW.pm:
15:45 dalek nqp: Mark NQP classes as having an authoritative method cache.
15:45 dalek nqp: review: https://github.com/perl6/nqp/commit/c66f98e4ec
15:45 dalek nqp: cf40a26 | jonathan++ | src/stage0/ (6 files):
15:45 dalek nqp: Update bootstrap files.
15:45 dalek nqp: review: https://github.com/perl6/nqp/commit/cf40a26e02
15:45 dalek nqp: fbcf303 | jonathan++ | src/6model/knowhow_bootstrapper.c:
15:45 dalek nqp: Mark method cache put out by KnowHOW and authoritative, and give the bootstrapped KnowHOW itself a method cache. We now get no method cache misses during the entire NQP build of itself.
15:45 dalek nqp: review: https://github.com/perl6/nqp/commit/fbcf3037d9
15:46 tadzik wow
15:46 moritz that sounds both great and scary
15:47 moritz scary because if there are no cache misses, it mean there's a codepath that isn't exercised anymore :-)
15:47 jnthn moritz: Don't worry, Rakudo misses :)
15:47 moritz jnthn: :-)
15:47 jnthn We miss a bunch when compiling the setting.
15:47 jnthn But all because we call methods on types we didn't define yet
15:48 jnthn er, didn't compose yet
15:48 jnthn There was one especially painful case in NQP before those patches
15:48 jnthn When we parse and reduce a rule, we always call an action method
15:49 jnthn If there is one...which we determine with can
15:49 jnthn The rule ws has no action method.
15:49 jnthn So every time we parsed whitespace, we got the cache miss, then did a nested runloop to make sure the meta-object didn't know better than the cache.
15:50 jnthn We...parse quite a lot of whitespace when compiling the setting, I guess. ;)
15:50 jnthn So above set of patches should help a little.
15:50 mberends wow, that must have been very time consuming
15:52 jnthn I rebootstrapped nqp so it builds itself faster thanks to this also :)
15:53 moritz how fast or slow is another runloop?
15:53 jnthn moritz: It's not something you want to be doing often.
15:53 jnthn moritz: It's not *that* bad, but it certainly isn't cheap.
15:53 jnthn It's fine if you're going to do quite a lot of work in it.
15:54 tadzik jnthn: make  455.77s user 5.37s system 111% cpu 6:54.60 total
15:54 jnthn tadzik: For...?
15:54 tadzik that's on 41e1fd8
15:54 jnthn OK, and it was 6:59 before that patch?
15:55 tadzik hmm, don't remember :P
15:55 tadzik will backlog
15:56 mberends another data point, compiling the setting now uses 607MB RAM instead of 787MB a week ago (both on 32 bit Linux)
15:57 tadzik 2321        tadzik | make  617.03s user 4.91s system 111% cpu 9:19.77 total
15:57 tadzik I think that was the "before"
15:57 jnthn oh, so that was quite dramatic then.
15:58 JimmyZ is that with whiteknight++'s branch?
15:58 tadzik yes
15:58 tadzik oh, yes, I'm still on whiteknight's branch
15:58 jnthn tadzik: Yeah, me too
15:58 jnthn That should hopefully get merged soonish :)
15:58 jnthn mberends: Thanks, that's also great to know.
15:59 jnthn mberends: It's movement in the right direction, even if it's still high.
15:59 mberends jnthn: :)
15:59 jnthn tadzik: Tests of my latest patches to nqp (still on the whiteknight branch) would be nice to have.
15:59 jnthn tadzik: Both for make, setting and spectest time ;)
16:00 tadzik jnthn: make goes now
16:00 jnthn \o/
16:00 jnthn tadzik++
16:00 moritz jnthn: compiling nom's setting with the new nqp now
16:00 whiteknight it gets merged sooner, the more tests we get on it
16:00 * whiteknight hints dubtly
16:00 whiteknight subtly*
16:00 jnthn :)
16:00 jnthn whiteknight: The only downvote I've heard is that it breaks the g++ build.
16:01 whiteknight I haven't had a chance to review that yet
16:01 whiteknight whatever it is, I'm sure it's a trivial fix involving a void* cast
16:02 jnthn mls++'s fix for the leak also just went into Parrot
16:04 mj41 joined #perl6
16:05 tadzik make  404.89s user 5.60s system 108% cpu 6:18.96 total
16:05 tadzik result not found :(
16:05 tadzik another 20 seconds it seems
16:07 jnthn tadzik: It's 20 seconds faster with latest nqp?
16:07 tadzik jnthn: it seems, yes
16:07 jnthn Nice
16:07 jnthn What's setting time now?
16:08 pmurias joined #perl6
16:09 tadzik like 2:50 or so
16:09 jnthn Woo, below 3 mins :)
16:10 benabik tadzik must have a faster machine than me.
16:11 tadzik benabik: it's some cheap c2d
16:11 tadzik with 2GBs of ram
16:11 benabik tadzik: I have an expensive c2d.  :-D
16:11 tadzik :P
16:11 jnthn benabik: Note that we're getting these with whiteknight's is_pmc_ptr branch of Parrot
16:12 benabik jnthn: Ah.  Significant difference?
16:12 tadzik 167.66s user 1.87s system 99% cpu 2:50.32 total
16:12 tadzik benabik: yeah, like 25%
16:12 tadzik the memory usage was just below 60%
16:12 tadzik (of 2GBs)
16:13 JimmyZ what? 404 down to 167?
16:14 tadzik JimmyZ: no, that's just SEttings.pir
16:16 masak jnthn++ tadzik++ # optimization exploration
16:16 JimmyZ compile setting takes 4:34 here with parrot master
16:17 kboga joined #perl6
16:19 pmurias joined #perl6
16:19 buubot_backup joined #perl6
16:20 * jnthn should blog about the weekend's improvements :)
16:21 felher jnthn: yeah, that'd be nice
16:21 JimmyZ maybe after the branch merge :)
16:22 buubot_backup joined #perl6
16:22 MayDaniel joined #perl6
16:22 jnthn JimmyZ: Yeah, I plan to do dinner and stuff soon. So it won't be for another little bit yet.
16:23 * JimmyZ plans to sleep, it's 0:23am here
16:24 JimmyZ good night
16:24 jnthn night o/
16:26 dalek rakudo/nom: 3654b00 | jonathan++ | tools/build/NQP_REVISION:
16:26 dalek rakudo/nom: Bump NQP_REVISION to get various performance improvements.
16:26 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3654b009ff
16:29 sorear good * #perl6
16:30 masak top o' the *, sorear
16:31 wamba joined #perl6
16:34 pmurias joined #perl6
16:39 sorear On closer examination, the C++ algorithm hides large constant factors and the algorithm I already have is probably better in realistic cases.
16:39 mberends good * sorear
16:39 masak sorear: this change you've made, does it implement the MMD improvement you talked about yesterday?
16:39 sorear masak: no.
16:40 masak oh, ok.
16:40 sorear it is a step in that direction
16:40 sorear but it is also a step towards CLR interop
16:44 masak sounds good.
16:45 pmichaud good morning, #perl6
16:45 jnthn hi, pmichaud
16:46 pmurias joined #perl6
16:46 pmichaud nice work on the performance improvements :)
16:46 pmichaud haven't tried them out here yet, but will be looking very much forward to it.
16:46 * pmichaud tries them out now.
16:46 masak hi, pmichaud
16:46 mberends good morning pmichaud
16:47 jnthn pmichaud: Note, build Parrot with appropriate branch to see full effect :)
16:48 pmichaud is that the whiteknight/... one?
16:49 moritz whiteknight/pmc_is_ptr or so
16:49 jnthn that one
16:50 moritz jnthn: fwiw nom spectest on top of latest nqp (but parrot master) is PASS here
16:51 jnthn moritz: nice to know - thanks
16:52 DarthGandalf joined #perl6
16:53 pmurias joined #perl6
16:54 sorear hello pmichaud, jnthn
16:55 jnthn o/ sorear
16:55 thou joined #perl6
16:55 jnthn shopping &
16:55 tadzik hello pmichaud
16:55 im2ee joined #perl6
16:59 pmichaud CORE.setting on my system goes from 164s to 118s after the nqp and other improvements (still on parrot master)
16:59 pmichaud haven't tried the pmc_is_ptr branch yet... trying that now.
16:59 pmurias joined #perl6
17:03 benabik Merft.  Setting still takes 9:02 for me.  Although I think that's several minutes faster than before.
17:04 pmichaud yes, I think we need to figure out a way to reduce the size of the PAST tree.
17:04 sorear I still think the fact that it's built of hashes is to blame
17:05 pmichaud I don't disagree, but in what ways do you see that as a problem?
17:05 sorear hashes have a high memory overhead
17:06 sorear if PCT::Nodes were 6model objects, the PAST tree would take up much less space
17:06 pmichaud well, except we'd still need hashes on some of them
17:06 pmichaud but yes, converting PAST to 6model is on our to-do list.
17:07 sorear Only some of them, I think/hope
17:07 pmichaud correct, only some of them.
17:07 pmichaud latest nom built on pmc_is_ptr branch is 94sec
17:07 sorear nice
17:08 moritz latest nom spectest on whiteknight/pmc_is_ptr merged into master (locally) is PASS
17:08 * sorear wonders how much overhead PCT is taking from PMCProxy, since PCT::Node inherits from parrot;Capture
17:09 pmurias joined #perl6
17:09 pmichaud so the pmc_is_ptr branch gives a 20% speedup (on top of the 28% speedup given by the other nqp improvements)
17:09 benabik Would it be too hard to add an RPA and a hash to PCT::Node to compare with Capture?
17:09 * benabik would try it himself, but classes start tomorrow...
17:09 sorear pmichaud: I am somewhat suprised that the PAST is bigger than the POST
17:09 pmichaud ...PAST is bigger than POST?
17:10 pmichaud how do you mean?
17:10 masak more sizable. bulkier. inherent of more granditude.
17:10 masak :P
17:10 pmichaud benabik: I think that adding an RPA + hash to PCT::Node means that we end up with inferior runloops instead of PMCProxies.
17:11 benabik pmichaud: …  LTA
17:11 pmichaud i.e., we end up having to do vtable overrides for hash accesses
17:11 pmichaud and array accesses
17:12 pmurias sorear: how will the mapping between C# and Perl 6 types be specified?
17:12 pmurias sorear: or will the Perl 6 code be exposed to things such as an ArrayList?
17:12 sorear pmurias: currently I expect the latter
17:13 sorear C# code doesn't expose Perlish APIs anyway; I expect Perl6-side wrappers for most stuff
17:14 sorear in the specific case of ArrayList, because it's mutable, Perl 6 code has to be exposed to it
17:14 sorear converting an ArrayList (which is actually just spelled List in C#) to a Perl6 Array would lose aliasing
17:18 jnthn nom: say 164 - 94
17:18 jnthn rakudo: say 164 - 94
17:18 p6eval rakudo 3654b0: OUTPUT«70␤»
17:18 pmurias joined #perl6
17:19 jnthn rakudo: say (164 - 94) / 164
17:19 p6eval rakudo 3654b0: OUTPUT«0.426829268292683␤»
17:19 jnthn pmichaud: Glad it's a win on your box too. :)
17:19 pmurias sorear: we could wrap ArrayList in a Array like interface which passes on the methods
17:19 jnthn pmichaud: Got stage timings?
17:19 pmichaud Stage parse: 50.694
17:19 pmichaud Stage past: 0.000
17:19 pmichaud Stage post: 33.058
17:19 pmichaud Stage pir: 10.033
17:20 jnthn pmichaud: That's more pleasing.
17:20 jnthn We're back to parse dominating
17:20 pmichaud yes, but the 'post' number is still a little high
17:20 jnthn Yeah, agree.
17:20 pmichaud anyway, parse should come way down soonish
17:21 pmichaud I actually have some better profiling tools and stuff at my disposal now.
17:21 pmichaud although I guess the pmc_is_ptr branch likely doesn't have the sub-profiler branch stuff in it
17:21 jnthn Yeah, if we can understand where we spend time during the post stage, that'd be a huge help.
17:22 jnthn pmichaud: No, but I have high hopes for that merging soon.
17:22 pmichaud well, the post stage is likely almost entirely a function of the number of past nodes
17:22 pmichaud but I can find out the number of past nodes now
17:22 jnthn pmichaud: Yeah but that doesn't mean that all past nodes are equal in compilation cost.
17:24 pmurias_ joined #perl6
17:25 pmurias_ if i'm having irc problems only the stuff that gets logged on irclog.perlgeek.de actually gets sent to the channel?
17:25 pmurias sorear: is there something like CPAN for C#/.NET so i can look at how the common APIs look like?
17:27 REPLeffect joined #perl6
17:27 jnthn pmichaud: Note also that a bunch of those PAST nodes are tied up with the deserialization code, which goes away when we get the serializer. Which I plan to start work on this month.
17:27 pmichaud jnthn: yeah, I suspect that'll be a big win.
17:27 pmichaud anyway, sub-100sec CORE.setting compilation time I can live with.
17:28 jnthn pmichaud: I'm not sure how much of the tree that is, but it wouldn't surprise me if it still amounts to between a third and a half o fit.
17:28 pmichaud it's still quite a bit longer than what we had with ng, but parsing updates should get us back in the same ballpark
17:28 plobsing joined #perl6
17:29 pmichaud I wonder how much faster ng compilation will be with the pmc_is_ptr branch.
17:29 jnthn Probably a bit.
17:29 jnthn tadzik++ measured us as having won 15% on spectest time too.
17:30 pmichaud that seems likely
17:31 pmichaud I fail S32-trig/pi.t on my box; I'm guessing that's expected though.
17:31 pmurias joined #perl6
17:33 pmichaud afk, lunch
17:38 pmurias joined #perl6
17:41 im2ee joined #perl6
17:42 MayDaniel joined #perl6
17:45 kboga left #perl6
17:47 wamba joined #perl6
17:47 moritz pmichaud, jnthn: if rakudo is supposed to pass spectest without gmp installed, maybe --gen-parrot should pass along --without-gmp to parrot's Configure.pl?
17:51 pmichaud we're not using gmp for anything, right?
17:51 pmichaud ...but we also need to be passing spectests when it is installed.
17:52 moritz well, I think gmp is the reason that pi.t passes on my system, but fails on yours
17:52 pmichaud very well could be, yes.
17:52 pmichaud but I'm not sure that turning off gmp is the answer.
17:53 pmichaud at least, not as a "we always test against parrot without gmp" sort of thing
17:54 pmichaud afk again
18:01 donri joined #perl6
18:13 kaare_ joined #perl6
18:14 avi_ joined #perl6
18:15 avi_ left #perl6
18:16 _avi joined #perl6
18:17 pmurias joined #perl6
18:33 dalek roast: 177516f | moritz++ | S0 (5 files):
18:33 dalek roast: rakudo unfudges
18:33 dalek roast: review: https://github.com/perl6/roast/commit/177516f64f
18:35 Youdaman joined #perl6
18:35 Youdaman left #perl6
18:44 mj41 joined #perl6
18:46 pmurias joined #perl6
18:46 im2ee Hmm, do you use perl to making websites etc.?
18:47 moritz well, in first approximation websites are just text
18:47 moritz and text is easy to do in perl :-)
18:48 moritz for example http://www.strangelyconsistent.org/ is generated with Perl 6, but I forgot what software exactly masak++ uses
18:49 im2ee moritz, i mean making engines, blogs. generaly web-developing :
18:49 im2ee :)
18:50 im2ee Does it have sense? Or better is make e.g. blog on WordPress? :)
18:51 moritz im2ee: rakudo isn't fast enough yet to generate dynamic pages on the fly
18:51 im2ee I used to use Django for web programming. But ... it is "heavy" ...
18:52 moritz im2ee: that's why there's not much dynamic web stuff for Perl 6 yet
18:52 felher I'm sure i only ask that question because i don't know enought but i wonder: with all that speed-improvements on nom and such, how come that a small perl6 programm like '.say for ^10000;' takes ~8secs on master and ~32secs on nom? (both are latest master and latest nom)
18:53 moritz felher: seems we've also have had lots of performance regressions :(
18:53 mberends felher: 'say' in particular was re-specced to add lots of user-friendly extra formatting. Try 'print' instead.
18:54 felher moritz: yeah, seems so.
18:54 felher mberends: hm, k, checking that out.
18:54 moritz mberends: but it's not *that* much more
18:55 moritz mberends: I mean it just calls .gist, and for an Int that's the same as .Str
18:55 masak moritz, im2ee: I'm using a program called psyde. https://github.com/masak/psyde
18:55 moritz mberends: so about another method call per say()
18:55 im2ee so, how do You think - what is better, making own websites or using free software? :)
18:55 im2ee masak, thanks. :)
18:56 im2ee masak, can You answer this question too? :)
18:56 felher hm, k. using print results in 6.3 vs 19.7. Thats at least better. :)
18:56 moritz less worse
18:56 felher yeah ^^ :)
18:56 im2ee It's channel about p6, but we can talking about other topics? :)
18:57 masak im2ee: yes.
18:57 masak im2ee: with moderation and good judgment.
18:57 mberends thanks moritz. I thought .gist was quite expensive, but it probably isn't
18:59 moritz im2ee: fwiw I'm writing a backend for a blog engine in p5 these days
18:59 moritz ouch
18:59 moritz $ time ./perl6 -e '1 for ^10_000'
18:59 moritz real    0m1.428s
18:59 moritz $ time ./perl6 -e '1 for ^100_000'
18:59 moritz real    0m36.667s
18:59 moritz rakudo: 36.6/1.4
18:59 p6eval rakudo 3654b0:  ( no output )
18:59 moritz rakudo: print 36.6/1.4
19:00 p6eval rakudo 3654b0: OUTPUT«26.1428571428571»
19:00 jnthn moritz: A good chunk of that 1.428 will be startup time
19:00 moritz iterating over 10x the elements take 26x the time
19:00 moritz if startup time was dominatring, the factor would be <10
19:01 moritz *dominating
19:01 masak jnthn: that makes the time even less proportional.
19:01 jnthn masak: right
19:01 moritz masak: maybe you should link to psyde on http://www.strangelyconsistent.org/about
19:02 masak ooh, good idea.
19:02 * masak does so
19:02 jnthn It's also slowly leaking, which won't be helping.
19:02 Grimnir_ joined #perl6
19:02 moritz for 50k items it's still linear
19:03 kst` joined #perl6
19:03 im2ee $ time perl6 -e '1 for ^100_000';
19:03 im2ee real2m13.565s
19:03 im2ee huh, my computer sucks
19:03 im2ee :D
19:04 moritz (that was nom, fwiw)
19:04 moritz (with the nesest patches on the newest most awesome parrot branch)
19:04 pmurias joined #perl6
19:07 tadzik im2ee: I do :)
19:07 tadzik as long as you mean Perl 5 :P
19:08 im2ee So, perl5 is now better for webdev? :))
19:08 tadzik I have a feeling it's more suitable. We don't have a good web framework for Perl 6 yet
19:09 masak moritz: linked to psyde from http://strangelyconsistent.org/about - moritz++
19:09 masak im2ee: Perl 5 will certainly make life easier for you at this point.
19:10 pmichaud anyone object to me doing the branch rename (master->ng) now?
19:10 masak im2ee: those of us who choose to doing web development with Perl 6 will invariably face a number of tradeoffs.
19:10 masak at this juncture.
19:11 im2ee so maybe just wordpress? :)
19:12 im2ee but.. perl is better than php :)
19:12 mberends im2ee: that's ok, or blogs.perl.org
19:12 * jnthn uses wordpress, fwiw. And happy so far.
19:13 pmurias joined #perl6
19:13 im2ee thanks. :)
19:15 masak im2ee: I also think Perl is better than PHP. but that doesn't stop Wordpress and MediaWiki from being fine pieces of usable software.
19:16 im2ee right :)
19:19 pmurias joined #perl6
19:20 masak I'm very happy with psyde for my blog, even though I should've implemented comments ages ago. :)
19:21 jrockway joined #perl6
19:21 Reaganomicon joined #perl6
19:23 lue hello world o/
19:23 sorear pmurias: I recommend looking at http://msdn.microsoft.com/e​n-us/library/gg145045.aspx
19:26 masak hellue!
19:28 wooden joined #perl6
19:28 wooden joined #perl6
19:30 * lue can't decide which fun P6 project to work on today
19:31 masak have you written a Little Animal Farm AI yet? :)
19:31 masak sooner or later, you will -- you know you will :)
19:34 cognominal joined #perl6
19:34 lue I actually have a couple ideas for that, a paranoid AI (named Marvin naturally) being the main one.
19:34 masak looking forward to that.
19:36 masak eiro: how'd your IA go?
19:38 lue Hm. Do 3 rabbits mean 1 pair and 1 "left over", which would yield a total of 1 rabbit? [Or does the game do nothing with "left overs"?]
19:39 sorear masak: ia?
19:39 * sorear wants to parse "eiro" as rōmaji
19:39 masak sorear: in French, all acronyms are reversed.
19:40 sorear I have a PDF here that says CLI / ICL
19:40 masak lue: 3 rabbits yield one rabbit, yes. the game ignores odd rabbits when mating them. :)
19:40 sorear infrastructure commune de langage
19:40 sorear not quite reversed...
19:40 masak sometimes they don't get reversed all the way, no.
19:41 pmurias joined #perl6
19:41 masak AIDS becomes SIDA, for example.
19:41 masak "permuted" is perhaps more accurate.
19:41 lue well, word order is reversed (which *usually* results in reversed acronyms from an english POV)
19:41 masak but it mostly stems from adjectives wanting to come before nouns in French.
19:42 masak oh, and genitives being reversed, of course.
19:42 sorear not all combinations of words reverse in the same way
19:42 * lue can't wait to start French 3 in a few days
19:43 sorear I like Japanese, it's very consistant about this
19:43 sorear all phrase-modifiers are prefixes
19:43 masak lue: "French 3" is great. not as good as the book, though.
19:43 sorear pmurias: I recommend looking at http://msdn.microsoft.com/e​n-us/library/gg145045.aspx
19:44 lue I get the feeling my idea of "French 3" is different from your's... [or there's a parsefail in my head]
19:44 masak lue: I'm just joking with you.
19:45 lue So it *was* a parsefail!
19:53 sorear btw, learning French is on my todolist
19:54 masak or, as the French say, "ma liste de choses à faire" :)
19:55 sorear well my mom speaks it so.
19:55 masak oh right. Canada.
19:55 sorear Canada?
19:55 masak no wait, you're from the US.
19:55 masak mis-association.
19:56 masak all you people from the Americas. hard to keep you straight! :P
19:56 sorear I live as far from Québec as is possible while still living in an English-speaking North American country
19:56 masak ah.
19:56 sorear my county borders the Pacific Ocean on the west and Mexico on the south.
19:57 masak Texas?
19:57 masak no wait. :)
19:57 masak California!
19:58 sorear https://secure.wikimedia.org/wik​ipedia/en/wiki/San_Diego_County
19:58 masak I used to listen to ads from the San Diego area.
19:58 masak when I was listening to the Dr Demento Show on Sunday evenings.
19:59 masak of course, over here it was five in the morning on Mondays... :)
19:59 masak (but so worth it!)
19:59 pmurias joined #perl6
19:59 sorear <3 Dr Demento
19:59 sorear pmurias: I recommend looking at http://msdn.microsoft.com/e​n-us/library/gg145045.aspx
19:59 sorear phenny: tell pmurias I recommend looking at http://msdn.microsoft.com/e​n-us/library/gg145045.aspx
19:59 phenny sorear: I'll pass that on when pmurias is around.
20:00 im2ee joined #perl6
20:03 jevin joined #perl6
20:04 im2ee good night! :)
20:05 masak night, im2ee
20:05 im2ee or day .
20:05 im2ee bye o/ :)
20:05 jnthn dobru noc, im2ee
20:05 jnthn oh wait, .pl, not .cz :)
20:05 * jnthn must keep the tlds straight :)
20:05 im2ee dobranoc - in pl. :)
20:05 jnthn nice :)
20:05 masak dobranoc, im2ee.
20:06 im2ee dobranoc!
20:06 im2ee :)
20:06 tadzik branoc
20:07 masak that looks almost like Swedish :)
20:08 jnthn heh :)
20:12 sorear aren't Polish and Czech very closely related?
20:12 jnthn sorear: Pretty closely, but not as closely as Czech and Slovak.
20:13 jnthn sorear: All three are in the western slavic group though.
20:14 * sorear wonders how hard Slavic was for jnthn
20:14 * sorear tried to learn Russian once but declension was too much for eir poor brain
20:14 masak typographically, Polish believes more in 'z's, and the other languages in that group believe more in hats. :) but that's mostly a surface difference.
20:15 sorear Polish has some odd typographical features like in Soŝnierz
20:15 tadzik Sośnierz, actually :)
20:15 * masak was just going to point that out :)
20:15 tadzik .u
20:15 phenny tadzik: You gave me zero length input.
20:15 tadzik .u ŝ
20:15 phenny U+015D LATIN SMALL LETTER S WITH CIRCUMFLEX (ŝ)
20:15 tadzik .u ś
20:15 phenny U+015B LATIN SMALL LETTER S WITH ACUTE (ś)
20:15 tadzik CUTE!
20:15 sorear ś is so odd it's not even in my default terminal fon
20:16 masak ŝ is in the Esperanto alphabet. it's more like 'sz' than like 'ś' in its pronunciation, though.
20:17 jnthn sorear: It was, and remains, kinda hard, though the declension becomes "automatic" after a while. I had the benefit of living in that part of the world for a couple of years, and thus daily practice. :-) Now I don't have that, and it's kinda slipping away a bit. :-S
20:17 * masak .oO( declension's on the decline )
20:18 jnthn I'd date a Russian girl, but they all decline me. :P
20:18 tadzik masak: by 'z's, do you mean "ogonki"?
20:18 jnthn .oO( that'd make an amusing linguistic cartoon... )
20:18 * sorear remembers jnthn(?)s bit about Slovak hamburgers and the Headache["very bad"] role mixin
20:18 masak tadzik: no, I meant the letter Z.
20:19 tadzik I see
20:19 tadzik I wonder if we actually have more tails than hats
20:19 sorear .u ż
20:19 phenny U+017C LATIN SMALL LETTER Z WITH DOT ABOVE (ż)
20:19 masak I don't know of any hats in Polish.
20:19 tadzik yeah, dots
20:19 tadzik we have no hats
20:19 masak dots don't count :P
20:20 masak they're hardly there!
20:20 tadzik with dots instead of hats we're a bit like Teletubbies
20:20 masak *and* you can write them as cross-bars on the 'z'! how weird is that!
20:20 tadzik like in ł
20:20 tadzik but ł cannot have the hat on top
20:20 sorear .u ǫ
20:20 phenny U+01EB LATIN SMALL LETTER O WITH OGONEK (ǫ)
20:20 masak dot, you mean.
20:20 jnthn .u ł
20:20 phenny U+0142 LATIN SMALL LETTER L WITH STROKE (ł)
20:20 sorear is ogonki the plural of ogonek, tadzik?
20:21 jnthn ah, stroke
20:21 tadzik sorear: yes
20:21 tadzik sorear: it means "little tails"
20:21 masak little tails of misery and woe :)
20:21 tadzik oooh, they're actually OGONEK in Unicode itself
20:22 tadzik although ǫ is not a Polish letter
20:22 jnthn tadzik: I guess "ogon" is a (non-little) tail?
20:22 tadzik jnthn: si
20:22 jnthn Cute :)
20:22 masak tadzik: it's not!?
20:22 masak tadzik: it's just an adorned 'o'?
20:22 sorear what do you call multiple ogon?
20:22 tadzik ogony
20:22 masak oh the ogony...
20:23 tadzik masak: I sometimes wonder where did ǫ go. Ę is "eu", but Ą is "ou", not "au"
20:23 masak oh right!
20:23 masak now I see what you mean.
20:23 tadzik I seem to recall where did "au" go over the ages
20:24 masak yes, Ą should clearly have been ǫ instead.
20:24 tadzik eww, parsefail
20:24 tadzik I seem to recall there was "au" once, but it's gone now
20:24 sorear .u č
20:24 phenny U+010D LATIN SMALL LETTER C WITH CARON (č)
20:24 masak ĉapelo.
20:24 tadzik .u ć
20:24 phenny U+0107 LATIN SMALL LETTER C WITH ACUTE (ć)
20:25 tadzik Polish is ACUTE
20:25 masak but never grave.
20:25 sorear .u ő
20:25 phenny U+0151 LATIN SMALL LETTER O WITH DOUBLE ACUTE (ő)
20:25 tadzik ooh
20:25 masak now we're in Hungary all of a sudden.
20:25 tadzik that's like "uuuu"
20:25 masak bőőőőring
20:25 tadzik there's no such letter like that in Polish alphabet though
20:26 tadzik masak: that's like "buuuuring"
20:26 tadzik ó is just u, fancy written
20:26 sorear the Slavs have so many beautiful diacritics and accents.
20:26 tadzik funny things is that ogonki and ACUTEs never indicate accent in Polish
20:26 masak tadzik: it's more like the Russian ы, IIRC.
20:27 masak no, wait. it isn't.
20:27 masak it's just a very dark ö.
20:30 natureboy joined #perl6
20:37 sorear masak: what is darkness?
20:38 masak an imprecise description of vowel quality... :/
20:39 pmurias joined #perl6
20:41 masak Wikipedia says ő is pronouneced /ø/ in Hungarian.
20:42 tadzik not pronounced?
20:42 masak no, that's a vowel sound.
20:42 masak doesn't mean "empty set" or anything funny like that :)
20:43 tadzik ...empty sound? :P
20:43 masak of one hand clapping, naturally.
20:44 masak by the way, has anyone ever replied to the question "what is the sound of one hand clapping?" by clapping with one hand?
20:44 masak I mean, to a Zen master.
20:47 uvtc joined #perl6
20:51 uvtc I notice that, in Perl 6, most methods on lists return a new list. Such that you can do things like: @a.sort.uniq.reverse (in contrast, you can't do that in Python because sort() sorts the array in place and doesn't return it).
20:52 uvtc Python's reverse also reverses in-place.
20:52 uvtc In Perl 6, is there any convention about methods that mutate vs. methods that return a new object?
20:52 sorear no
20:53 sorear you could write @a.=sort if you wanted
20:53 uvtc What is ".="?
20:53 sorear like +=, *=
20:53 uvtc Oh, "@a = @a.sort".
20:54 masak uvtc: there's a slight cultureal encouragement to make your method non-mutating, and then use the .= form to mutate things.
20:55 soh_cah_toa joined #perl6
20:55 uvtc Ok, that sounds good. Not only because it's easy enough to use ".=", but also because it allows you to do things like @a.sort.frobnicate.fossilize.etc
20:58 uvtc I noticed that someone the other day asked something like "is Perl 6 ready?". It seems to come up every once in a while.
20:58 uvtc It's interesting, because I don't hear that question asked often about other languages.
20:58 tlocalhos joined #perl6
20:58 uvtc I think, when people ask it, what they're really asking is 3 related questions:
20:58 uvtc 1. Is the design of the language fairly stable now (will not be changing under my feet -- for my basic needs)?
20:59 uvtc 2. For a given "main" implementation:
20:59 uvtc * Are the basic usual features most people most commonly need implemented?
20:59 uvtc * Does it have few enough bugs so as to not make my life *too* terribly difficult?
20:59 uvtc * Is its performance at least in the same ballpark as Perl 5 | Python? (slower is fine and expected -- just not more than, say, a factor of 5)
20:59 uvtc and
20:59 uvtc 3. Is there some user reference documentation for Perl 6 available? That is, some at-least-fledgling perldoc manpages for Perl 6.
21:02 masak yes, yes, yes, no, fragmented and too little.
21:05 uvtc masak, the feature comparison matrix indicates that nom does not yet handle "DateTime, Date".
21:07 masak sounds like a rife lowish-hanging fruit to pick.
21:07 jnthn rife or ripe? :)
21:08 masak er, just s/rife //
21:08 masak :)
21:08 masak didn't meant what I thought it meant...
21:08 uvtc rife with low-hanging fruit, ripe for the picking
21:08 jnthn right :)
21:08 masak right.
21:15 tadzik wrong :)
21:15 tadzik everyone who tried will tell you it's not low-hanging
21:16 masak oh!
21:16 masak 'night, #perl6
21:19 pmurias sorear: how high would the overhead of calling perl5 code from C#?
21:19 phenny pmurias: 19:59Z <sorear> tell pmurias I recommend looking at http://msdn.microsoft.com/e​n-us/library/gg145045.aspx
21:19 pmurias sorear: how much sensible would niecza/perl5 interop be?
21:20 pmurias s/much//
21:21 jamtech joined #perl6
21:22 sorear pmurias: supporting perl5 VM-VM interop is insane.  I did it once for Parrot and I have no intention of doing it again for the CLI
21:22 sorear pmurias: otoh, I do have plans to build a Perl5 language-compatibility mode into the Niecza parser
21:23 sorear uvtc: yes, yes, yes, yes, yes iff you count the Synopses
21:27 soh_cah_toa i really wouldn't consider the synopses user documentation though
21:27 pmurias joined #perl6
21:28 pmurias i might attempt perl5 VM-VM, i did it for SMOP and everything seemed to fit together nicely
21:32 uvtc sorear, I'm not sure I'd count the Synopses as user docs. Will have to look at them again & more.
21:34 soh_cah_toa agreed, they're really only meant for implementers and are be greek to non-compiler developers
21:34 soh_cah_toa i'm trying to help reduce p6's lack of user docs through the "using perl 6" book though
21:37 uvtc soh_cah_toa, I'd like to chat about this more, but need to get offline (family). Will look for you later.
21:37 uvtc left #perl6
21:41 lue Are there any (dis)advantages to using runtime importation vs. compile-time? I'd like to split my project into multiple files w/o cluttering the module namespace, and it seems only require would let me do that.
22:25 soh_cah_toa perl6: my $foo = 'foobar'; my $rx = '<alpha>*ob<alpha>*'; say 'FOOBAR!' if $foo ~~ rx/$rx/
22:25 p6eval rakudo 3654b0: OUTPUT«===SORRY!===␤Method 'rxtype' not found for invocant of class 'PAST;Regex'␤»
22:25 p6eval ..niecza v9-9-gd637b5c:  ( no output )
22:25 p6eval ..pugs: OUTPUT«Error eval perl5: "if (!$INC{'Pugs/Runtime/Match/HsBridge.pm'}) {␤    unshift @INC, '/home/p6eval/.cabal/share/Pugs-6​.2.13.16/blib6/pugs/perl5/lib';␤    eval q[require 'Pugs/Runtime/Match/HsBridge.pm'] or die $@;␤}␤'Pugs::Runtime::Match::HsBridge'␤"␤*** '<HANDLE>' trapped b…
22:28 soh_cah_toa how do i get that working? i want to interpolate a variable containing literal metacharacters into a regex and match it against something
22:29 tadzik soh_cah_toa: use b: for now
22:30 tadzik soh_cah_toa: nom cannot interpolate variables in regexes yet
22:30 soh_cah_toa tadzik: where? b:/$rx/
22:30 tadzik soh_cah_toa: no, no :)
22:30 tadzik b: say 'foo'
22:30 tadzik this b:
22:30 p6eval b 1b7dd1: OUTPUT«foo␤»
22:30 tadzik b is the old master branch
22:31 soh_cah_toa darn
22:31 soh_cah_toa i thought the rx// operator to create a Regex object was how that's done since variables are interpolated literally
22:31 jamtech joined #perl6
22:31 soh_cah_toa i'm working w/ rakudo btw. not nom
22:31 tadzik hmm
22:33 jnthn soh_cah_toa: "literal metacharacters"?
22:33 jnthn Do you mean, you want the thing you're interpolating to be treated as a regex?
22:33 soh_cah_toa jnthn: yes
22:34 jnthn ah
22:34 jnthn <$foo>
22:34 jnthn /$foo/ # matches exact contents of $foo
22:34 soh_cah_toa right
22:34 jnthn /<$foo>/ compiles $foo as a regex
22:34 soh_cah_toa i thought rx// did that?
22:34 jnthn (and then tires to match it)
22:34 jnthn No
22:37 tadzik 'night #perl6
22:37 jnthn 'night tadzik
22:40 soh_cah_toa jnthn: see S05 at 'Variable (non-)interpolation'
22:40 soh_cah_toa "However, if $var contains a Regex object, instead of attempting to convert it to a string, it is called as a subrule, as if you said <$var>. (See assertions below.) This form does not capture, and it fails if $var is tainted."
22:41 soh_cah_toa / $var / is like a Perl 5: / \Q$var\E /
22:41 jnthn ah
22:41 soh_cah_toa and rx// creates a Regex object
22:41 jnthn hm, interesting. I ddin't know that bit :)
22:42 jnthn pmichaud: ^^ is worth noting when putting regex interpolation stuff back into nom
22:43 soh_cah_toa speaking of nom, whatever happened to the august release?
22:44 jnthn soh_cah_toa: http://rakudo.org/2011/08/19/r​akudo-2011-08-release-status/
22:44 soh_cah_toa yeah, i read that
22:44 soh_cah_toa specifically the "We definitely will have some August 2011 releases" part ;)
22:45 soh_cah_toa i'm guessing those issues just haven't been resolved yet?
22:46 jnthn ah, hm :)
22:46 jnthn I'm guessing not
22:46 jnthn Well, I and @other have been working on resolving a bunch of the issues this weekend :)
22:46 jnthn Though there's some more to go.
22:48 soh_cah_toa great
22:48 soh_cah_toa last i heard the release was delayed b/c of issues that weren't really detailed and then pmichaud disappeared and i haven't heard anymore ;)
22:48 soh_cah_toa wasn't sure what was going on
22:53 orafu joined #perl6
22:57 jnthn sleep &
23:21 skangas joined #perl6
23:40 Psyche^ joined #perl6

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

Perl 6 | Reference Documentation | Rakudo