Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-03-18

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:05 BenGoldberg joined #perl6
00:08 kid51 joined #perl6
00:23 tmch joined #perl6
00:36 Some-body_ joined #perl6
00:58 cpage_ joined #perl6
01:00 lizmat joined #perl6
01:13 BenGoldberg joined #perl6
01:28 arc__ joined #perl6
01:28 arcetera joined #perl6
01:34 grondilu joined #perl6
01:35 cdg joined #perl6
01:43 lustlife` joined #perl6
02:03 kalkin-__ joined #perl6
02:04 mohae joined #perl6
02:05 sufrostico joined #perl6
02:08 AlexDaniel m: my @a = <a b c>; say @a\ \ \ [1]
02:08 camelia rakudo-moar 595890: OUTPUT«b␤»
02:10 Nostrovus joined #perl6
02:13 AlexDaniel m: my @a = <a b c>; say @a.[1]
02:13 camelia rakudo-moar 595890: OUTPUT«b␤»
02:13 AlexDaniel m: my @a = <a b c>; say @a . [1]
02:13 camelia rakudo-moar 595890: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Yf0DuFxFCt␤Unsupported use of . to concatenate strings; in Perl 6 please use ~␤at /tmp/Yf0DuFxFCt:1␤------> 3my @a = <a b c>; say @a .7⏏5 [1]␤»
02:13 AlexDaniel :/
02:14 AlexDaniel m: my @a = <a b c>; say @a.[1]
02:14 camelia rakudo-moar 595890: OUTPUT«b␤»
02:14 AlexDaniel m: my @a = <a b c>; say @a..[1]
02:14 camelia rakudo-moar 595890: OUTPUT«3..1␤»
02:14 AlexDaniel m: my @a = <a b c>; say @a....[1]
02:14 camelia rakudo-moar 595890: OUTPUT«(a)␤»
02:17 AlexDaniel m: my @a = <a b c>; say  1R[@a] # heh
02:17 camelia rakudo-moar 595890: OUTPUT«5===SORRY!5=== Error while compiling /tmp/RnZlZRoxNE␤Confused␤at /tmp/RnZlZRoxNE:1␤------> 3my @a = <a b c>; say  17⏏5R[@a] # heh␤»
02:20 dalek rakudo-star-daily: 64f678d | coke++ | log/ (9 files):
02:20 dalek rakudo-star-daily: today (automated commit)
02:20 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/64f678d6da
02:20 dalek rakudo-star-daily: be4f27b | coke++ | log/ (9 files):
02:20 dalek rakudo-star-daily: today (automated commit)
02:20 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/be4f27bbd3
02:25 AlexDaniel “MVM_nfg_get_synthetic_info called with out-of-range synthetic” wtf
02:32 skids joined #perl6
02:34 AlexDaniel I can reproduce it (in fact, it gets in my way). What can I do now? Is there any way to get a stacktrace or something?
02:46 molaf_ joined #perl6
02:46 BenGoldberg joined #perl6
02:54 Ben_Goldberg joined #perl6
02:56 BenGoldberg_ joined #perl6
02:57 Nostrovus left #perl6
03:01 gnommer joined #perl6
03:06 gnommer Can I use unicode symbols in token's names (  my token Δ { ... } ) ??
03:08 skids tokens are identifiers so they have to follow the alphanumeric rules.
03:08 gnommer p6: my token Δ { abc };
03:08 camelia rakudo-moar 595890: ( no output )
03:08 gnommer p6: my token буква { abc };
03:08 camelia rakudo-moar 595890: ( no output )
03:08 Hotkeys well technically
03:08 Hotkeys those are all letters
03:09 Hotkeys m: my $буква = "Ay"; say $буква
03:09 camelia rakudo-moar 595890: OUTPUT«Ay␤»
03:09 FROGGS joined #perl6
03:15 TEttinger m: my $ꃔ "Yi!"; say $ꃔ
03:15 camelia rakudo-moar 595890: OUTPUT«5===SORRY!5=== Error while compiling /tmp/NMzLh37joW␤Two terms in a row␤at /tmp/NMzLh37joW:1␤------> 3my $ꃔ7⏏5 "Yi!"; say $ꃔ␤    expecting any of:␤        infix␤        infix stopper␤        statement end␤        statement mod…»
03:16 TEttinger m: my $ꃔ = "Yi!"; say $ꃔ
03:16 camelia rakudo-moar 595890: OUTPUT«Yi!␤»
03:17 gnommer p6: my $s="1234"; my token год {\d\d\d\d}; $s ~~ m/<год>/; say $<год>
03:17 camelia rakudo-moar 595890: OUTPUT«===SORRY!===␤Error encoding ASCII string: could not encode codepoint 1075␤»
03:18 gnommer p6:my $s="1234"; my token year {\d\d\d\d}; $s ~~ m/<year>/; say $<year>
03:18 gnommer p6: my $s="1234"; my token year {\d\d\d\d}; $s ~~ m/<year>/; say $<year>
03:18 camelia rakudo-moar 595890: OUTPUT«「1234」␤»
03:18 TEttinger hmm.
03:18 TEttinger that does seem like an odd difference
03:20 TimToady nqp might be cheating somewhere...
03:21 colomon joined #perl6
03:22 gnommer p6: my $sum="1234"; my token Σ {\d\d\d\d}; $sum ~~ m/<Σ>/; say $<Σ>
03:22 camelia rakudo-moar 595890: OUTPUT«===SORRY!===␤Error encoding ASCII string: could not encode codepoint 931␤»
03:22 TimToady p6: my $sum="1234"; my token TESTΣ {\d\d\d\d}; $sum ~~ m/<TESTΣ>/; say $<TESTΣ>
03:22 camelia rakudo-moar 595890: OUTPUT«===SORRY!===␤Error encoding ASCII string: could not encode codepoint 931␤»
03:23 TimToady looks like a low-level npq bug
03:26 cpage_ joined #perl6
03:38 noganex_ joined #perl6
03:46 Hotkeys m: 'ꃔ'.uniname
03:46 camelia rakudo-moar 595890: ( no output )
03:46 Hotkeys m: 'ꃔ'.uniname.say
03:46 camelia rakudo-moar 595890: OUTPUT«YI SYLLABLE FAP␤»
03:50 jack_rabbit joined #perl6
03:57 skids m: ().perl.say; [].perl.say; $[].perl.say; $().perl.say
03:57 camelia rakudo-moar 595890: OUTPUT«()␤[]␤$[]␤Use of Nil in string context  in block <unit> at /tmp/4KVUwb6EHb line 1␤""␤»
03:58 skids m: $().WHAT.say
03:58 camelia rakudo-moar 595890: OUTPUT«Use of Nil in string context  in block <unit> at /tmp/qsubM44sqj line 1␤(Str)␤»
04:01 * skids wonders if $() is doing something useful or whether the empty list special case should be made to work there.
04:02 skids m: @().perl.say # pre-GLR relic?
04:02 camelia rakudo-moar 595890: OUTPUT«(Nil,)␤»
04:09 wamba joined #perl6
04:19 SmokeMachine____ hi! how can I test if a return is a failure?
04:19 SmokeMachine____ m: sub f{1/0}; my $ret = f; say $ret ~~ Failure
04:19 camelia rakudo-moar 595890: OUTPUT«False␤»
04:20 Hotkeys m: sub f{1/0}; my $ret = f; say $ret
04:20 camelia rakudo-moar 595890: OUTPUT«Attempt to divide 1 by zero using div␤  in block <unit> at /tmp/gMFy7ynq4o line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/gMFy7ynq4o line 1␤␤»
04:20 SmokeMachine____ Hotkeys: yes, but I don't want to say if it's not a failure...
04:21 SmokeMachine____ my idea was:
04:21 Hotkeys m: sub f{1/0}; my $ret = f; say $ret.WHAT
04:21 camelia rakudo-moar 595890: OUTPUT«(Rat)␤»
04:21 SmokeMachine____ m: sub f{1/0}; my $ret = f; $ret.exception.throw if $ret ~~ Failure
04:21 camelia rakudo-moar 595890: ( no output )
04:21 SmokeMachine____ but it's no a Failure...
04:21 SmokeMachine____ *not
04:22 Hotkeys why not just use a try/catch
04:22 SmokeMachine____ Hotkeys: does Failure "activate" CATCH blocks?
04:23 SmokeMachine____ (in my case, the function is given by the user... so it's always possible to return a Failure...)
04:24 Hotkeys m: sub f {fail('foo')}; my $ret = f; say $ret ~~ Failure
04:24 camelia rakudo-moar 595890: OUTPUT«True␤»
04:25 Hotkeys (1/0).WHAT
04:25 Hotkeys m: (1/0).WHAT
04:25 camelia rakudo-moar 595890: ( no output )
04:25 Hotkeys m: (1/0).WHAT.say
04:25 camelia rakudo-moar 595890: OUTPUT«(Rat)␤»
04:25 Hotkeys are you sure that 1/0 does fail?
04:26 Hotkeys (if you know you'll get a fail then sure it'
04:26 Hotkeys ll work)
04:26 SmokeMachine____ m: sub f{1/0}; my $ret = f; $ret.say
04:26 camelia rakudo-moar 595890: OUTPUT«Attempt to divide 1 by zero using div␤  in block <unit> at /tmp/p6JEhxA_Jh line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/p6JEhxA_Jh line 1␤␤»
04:26 SmokeMachine____ the doc says: Sink (void) context causes a Failure to throw
04:27 SmokeMachine____ m: sub f{1/0}; my $ret = f; $ret; say "after"
04:27 camelia rakudo-moar 595890: OUTPUT«WARNINGS for /tmp/pTwDS7Cq_K:␤Useless use of $ret in sink context (line 1)␤after␤»
04:27 AlexDaniel // TODO … todo what?
04:28 SmokeMachine____ Hotkeys: ☝️
04:29 SmokeMachine____ Hotkeys: the problem is that I don't know if it'll be a Failure...
04:30 Hotkeys m: (1 / 0).WHAT.say
04:30 camelia rakudo-moar 595890: OUTPUT«(Rat)␤»
04:30 Hotkeys m: (1 div 0).WHAT.say
04:30 camelia rakudo-moar 595890: OUTPUT«(Failure)␤»
04:30 Hotkeys There's a failure for you
04:31 abaugher joined #perl6
04:31 AlexDaniel wait, why would 1/0 be a failure?
04:31 AlexDaniel it's a perfectly fine Rat as far as I can see
04:31 Hotkeys yeah
04:32 Hotkeys m: (1/0).nude.say
04:32 camelia rakudo-moar 595890: OUTPUT«(1 0)␤»
04:32 AlexDaniel so what are you trying to do?
04:32 AlexDaniel what do you mean by “if return is a failure”? It just isn't
04:33 SmokeMachine____ AlexDaniel: when I call a method on it, it throws a exception... looks like a Failure...
04:33 jdv79 hola
04:33 SmokeMachine____ m: sub f{1/0}; my $ret = f; $ret.say
04:33 camelia rakudo-moar 595890: OUTPUT«Attempt to divide 1 by zero using div␤  in block <unit> at /tmp/gwDm9ydtY3 line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/gwDm9ydtY3 line 1␤␤»
04:33 AlexDaniel SmokeMachine____: okay, then just catch it?
04:35 hjYjvimg joined #perl6
04:36 SmokeMachine____ I don't want to catch... I want to discover if the return is a Failure or not... with out running anything on a "not Failure" return
04:37 SmokeMachine____ I am writing a "auto function fuzz tester"... and the function can do anything that the user wants...
04:37 AlexDaniel SmokeMachine____: the result is a good looking Rat, it's not a failure. Failure comes up when you put this rat into things that don't handle it well
04:37 vendethiel joined #perl6
04:37 SmokeMachine____ I'll test the return to discover if the function "worked" with that input or not...
04:38 Hotkeys but like
04:38 Hotkeys if you do a catch
04:38 Hotkeys you then know that it failed
04:38 Hotkeys and if it doesn't fail
04:38 Hotkeys catch block doesn't run
04:38 Hotkeys no issue
04:39 SmokeMachine____ but that return doesn't "activate" the catch...
04:39 SmokeMachine____ I'll post my code...
04:40 Hotkeys but see
04:40 Hotkeys it isn't a failure then
04:40 AlexDaniel m: my $x = 1/0; { $x.say; CATCH { default { say ‘Houston, we have a problem’ } } };
04:40 camelia rakudo-moar 595890: OUTPUT«Houston, we have a problem␤»
04:40 AlexDaniel m: my $x = 1/5; { $x.say; CATCH { default { say ‘Houston, we have a problem’ } } };
04:40 camelia rakudo-moar 595890: OUTPUT«0.2␤»
04:40 Hotkeys if you do something to $x that actually makes it divide
04:40 Hotkeys that's a failure
04:40 Hotkeys but 1/0 is perfectly okay
04:40 Hotkeys it's a rat with 1 as nu and 0 as de
04:41 Hotkeys m: sub f{1/0}; my $ret = f; $ret.nu.say; $ret.de.say
04:41 camelia rakudo-moar 595890: OUTPUT«Method 'nu' not found for invocant of class 'Rat'␤  in block <unit> at /tmp/apLupCyhQ2 line 1␤␤»
04:41 Hotkeys rude
04:41 Hotkeys do I have to spell the whole thing for separate
04:41 Hotkeys m: sub f{1/0}; my $ret = f; $ret.numerator.say; $ret.denominator.say
04:41 camelia rakudo-moar 595890: OUTPUT«1␤0␤»
04:41 AlexDaniel yeah
04:41 Hotkeys like that's a perfectly fine rat
04:41 SmokeMachine____ My code https://www.irccloud.com/pastebin/2OFsNbFN/
04:41 Hotkeys it's only when you call .say on it that it fails
04:41 Hotkeys or other stuff
04:49 AlexDaniel SmokeMachine____: so I get False False False False… what should I get instead?
04:49 AlexDaniel some error, right?
04:49 AlexDaniel right
04:50 AlexDaniel SmokeMachine____: but nothing throws an exception so there is no problem at all currently
04:51 SmokeMachine____ try this: https://github.com/FCO/Test-Fuzz
04:51 SmokeMachine____ the code on pastern was wrong...
04:52 SmokeMachine____ the sample on github's README, works for me...
04:53 Actualeyes joined #perl6
04:54 AlexDaniel SmokeMachine____: yeah, it works
04:54 AlexDaniel you can run something that will throw an exception, like: ~$return;
04:55 AlexDaniel and then your CATCH block will work just fine
04:55 AlexDaniel what I don't understand is why would you want to do that
04:55 aindilis joined #perl6
04:55 SmokeMachine____ AlexDaniel: my intention is find possible bugs on functions...
04:56 SmokeMachine____ "automagically"...
04:56 AlexDaniel SmokeMachine____: okay, then you have to call your function
04:56 AlexDaniel oh you do
04:57 SmokeMachine____ that's what I do... with a big amount of input data...
04:58 AlexDaniel right.
04:58 AlexDaniel SmokeMachine____: okay, interestingly what you get back is Rat
04:58 AlexDaniel SmokeMachine____: so your function is working fine
04:59 AlexDaniel and it returns a Rat
04:59 AlexDaniel now let's say your function was doing something else
04:59 Vitrifur joined #perl6
04:59 SmokeMachine____ Yes, I think it is working fine... good point...
05:00 AlexDaniel like: $bla + $ble + "test"
05:00 SmokeMachine____ that function on README sample has a "bug" found with my lib... :)
05:00 AlexDaniel then it will probably attempt to stringify Rat
05:00 risou joined #perl6
05:00 AlexDaniel and then you'll get your division by zero, I guess
05:01 AlexDaniel no, you'll get another error :D
05:01 Hotkeys that might also just give you the
05:01 Hotkeys "must start with a base-10 number blah blah"
05:01 Hotkeys m: say 1/0+"test"
05:01 camelia rakudo-moar 595890: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5test' (indicated by ⏏)␤  in block <unit> at /tmp/L9m7bZgSX5 line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/L9m7bZgSX5 line 1␤␤»
05:02 Hotkeys yeah
05:02 AlexDaniel ~ $bla + ble
05:02 Hotkeys that
05:02 Hotkeys :p
05:02 Hotkeys m: say 1/0~"test"
05:02 camelia rakudo-moar 595890: OUTPUT«Attempt to divide 1 by zero using div␤  in block <unit> at /tmp/59OiJqjaWt line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/59OiJqjaWt line 1␤␤»
05:02 Hotkeys works
05:02 AlexDaniel why do we even get a Rat?
05:02 Hotkeys because it's a rat
05:02 AlexDaniel m: my Int $x = 1; my UInt $y = 2; say ($x + $y).WHAT
05:02 camelia rakudo-moar 595890: OUTPUT«(Int)␤»
05:04 leedo joined #perl6
05:05 cpage_ joined #perl6
05:05 SmokeMachine____ thank you all for your help!
05:05 AlexDaniel SmokeMachine____: by the way, it looks like a cool module
05:06 SmokeMachine____ AlexDaniel: thanks! if you wanna help... :)
05:07 AlexDaniel SmokeMachine____: I'm not sure if “is fuzzed” trait is helpful though. If I was going to use this module, I'd probably expect something like: fuzz(&myfunction)
05:08 rhr joined #perl6
05:08 SmokeMachine____ I was thinking of doing both...
05:08 wamba joined #perl6
05:09 SmokeMachine____ and on your script you could do:
05:09 SmokeMachine____ multi MAIN(:$fuzz-test!) {Test::Fuzz.run-tests}
05:10 sQuEE joined #perl6
05:11 SmokeMachine____ thank you all!
05:11 SmokeMachine____ have a good night!
05:33 lustlife joined #perl6
05:34 adu joined #perl6
05:35 wisti joined #perl6
05:56 Cabanossi joined #perl6
05:57 ufobat joined #perl6
06:01 musiKk_ joined #perl6
06:02 adu joined #perl6
06:05 kmwallio joined #perl6
06:12 cibs joined #perl6
06:22 keix joined #perl6
06:25 tmch joined #perl6
06:29 jameslenz joined #perl6
06:50 bjz joined #perl6
06:57 wamba joined #perl6
07:00 domidumont joined #perl6
07:04 domidumont joined #perl6
07:14 domidumont joined #perl6
07:21 bjz joined #perl6
07:37 firstdayonthejob joined #perl6
07:39 nadim joined #perl6
07:42 nakiro joined #perl6
07:43 El_Che joined #perl6
07:47 FROGGS joined #perl6
07:52 domidumont joined #perl6
07:53 spintronic joined #perl6
08:08 darutoko joined #perl6
08:20 jack_rabbit joined #perl6
08:23 bjz joined #perl6
08:27 CIAvash joined #perl6
08:41 zakharyas joined #perl6
08:44 avenj joined #perl6
09:06 RabidGravy joined #perl6
09:07 abraxxa joined #perl6
09:13 wamba joined #perl6
09:16 RabidGravy Rarr!
09:18 DrForr o/
09:28 sortiz \o #perl6
09:30 jameslenz joined #perl6
09:33 ely-se joined #perl6
09:36 Upasaka_ joined #perl6
09:53 gregf_ m: class Foo { has Hash $.items is rw; method decrease($item){ self.items[$item]-=1; }; method []($item) { } }
09:53 camelia rakudo-moar 595890: OUTPUT«5===SORRY!5=== Error while compiling /tmp/VPDOKmpROi␤Missing block␤at /tmp/VPDOKmpROi:1␤------> 3($item){ self.items[$item]-=1; }; method7⏏5 []($item) { } }␤»
09:54 gregf_ should it not be possible to implement a method like : method []($item){} ?
09:55 RabidGravy depends what you think it should do
09:57 gregf_ method {}($item) { self.items{$item]; } <== sorry that
09:58 gregf_ so the class has a hash and when i say something like this: my $f = Foo.new({a =>100, b => 200, c => 300}); print $f{a}; <- this should print 100
09:59 RabidGravy took me a few seconds, but ah
10:00 RabidGravy you need to make Foo an Associative and implement AT-KEY
10:00 FROGGS m: class Foo { has Hash $.items is rw; method decrease($item){ self.items[$item]-=1; }; method AT-KEY($key) { $!items{$key} } }; say Foo.new(items => {a => 1, b => 2})<a>
10:00 camelia rakudo-moar 595890: OUTPUT«1␤»
10:00 RabidGravy http://doc.perl6.org/language/subscripts#Meth​ods_to_implement_for_associative_subscripting
10:01 gregf_ ah - nice
10:01 FROGGS m: class Foo { has Hash $.items is rw; method new(Associative $h) { self.bless: items => $h }; method decrease($item){ self.items[$item]-=1; }; method AT-KEY($key) { $!items{$key} } }; say Foo.new({a => 1, b => 2})<a>
10:01 camelia rakudo-moar 595890: OUTPUT«1␤»
10:01 psch m: class A { has $.x handles <AT-KEY BIND-KEY> = Hash.new; }; my $x = A.new; $x{'foo'} = 1; say $x.perl
10:01 camelia rakudo-moar 595890: OUTPUT«A.new(x => ${:foo(1)})␤»
10:01 FROGGS ohh
10:01 FROGGS such magic
10:01 FROGGS psch++
10:02 gregf_ RabidGravy++ :)
10:02 psch still needs the .new though :)
10:02 gregf_ btw, even when i have not instantiated an object why does it not throw a null pointer exception?
10:03 FROGGS because there is no null pointer
10:03 psch m: say 1 + Int # kind of the closest we got
10:03 camelia rakudo-moar 595890: OUTPUT«Invocant requires an instance of type Int, but a type object was passed.  Did you forget a .new?␤  in block <unit> at /tmp/a0kiTnFC5F line 1␤␤»
10:03 FROGGS the type itself is also an object you can talk to and talk about
10:04 gregf_ like so class Foo { has $.a is rw;  method bar(){ say "Barred!"; } } ; class Bar { $.f Foo handles <bar> is rw; sub baz(){ self.bar(); } } ; Bar.new.baz
10:04 gregf_ FROGGS: by null pointer i meant, method on undefined object
10:04 FROGGS m: class Foo { has $.a is rw;  method bar(){ say "Barred!"; } } ; class Bar { has Foo $.f handles <bar> is rw; sub baz(){ self.bar(); } } ; Bar.new.baz
10:04 camelia rakudo-moar 595890: OUTPUT«5===SORRY!5=== Error while compiling /tmp/QxzKvPsLn9␤'self' used where no object is available␤at /tmp/QxzKvPsLn9:1␤------> 3 Foo $.f handles <bar> is rw; sub baz(){7⏏5 self.bar(); } } ; Bar.new.baz␤    expecting any of:␤        term␤»
10:04 FROGGS see?
10:05 FROGGS err
10:05 FROGGS ohh it is a sub
10:05 FROGGS m: class Foo { has $.a is rw;  method bar(){ say "Barred!"; } } ; class Bar { has Foo $.f handles <bar> is rw; method baz(){ self.bar(); } } ; Bar.new.baz
10:05 camelia rakudo-moar 595890: OUTPUT«Barred!␤»
10:05 gregf_ err. sorry. just typed that on the fly *hides*
10:06 FROGGS you can call method on types if they dont use self, which implies "I want an instance"
10:06 gregf_ FROGGS: there, you havent instantiated Foo?
10:06 FROGGS m: class Foo { has $.a is rw;  method bar(){ say self; } } ; class Bar { has Foo $.f handles <bar> is rw; method baz(){ self.bar(); } } ; Bar.new.baz
10:06 camelia rakudo-moar 595890: OUTPUT«(Foo)␤»
10:06 FROGGS gregf_: yes, you can implement static methods
10:06 FROGGS m: class Foo { has $.a is rw;  method bar(){ say self.defined; } } ; class Bar { has Foo $.f handles <bar> is rw; method baz(){ self.bar(); } } ; Bar.new.baz
10:06 camelia rakudo-moar 595890: OUTPUT«False␤»
10:07 gregf_ oh, so self is for class as well as instance variables?
10:07 FROGGS yes, kinda like in Perl 5
10:07 gregf_ :|
10:07 FROGGS it is just the invocant
10:08 FROGGS but you can restrict it...
10:08 gregf_ and i can see that self is mandatory *there was a discussion some days back.. and i lost the main point in the conversation*
10:08 gregf_ oh - ok
10:08 FROGGS m: class Foo { has $.a is rw; method bar(:D:){ say self.defined; } } ; class Bar { has Foo $.f handles <bar> is rw; method baz(){ self.bar(); } } ; Bar.new.baz
10:08 camelia rakudo-moar 595890: OUTPUT«5===SORRY!5=== Error while compiling /tmp/m3dtKx1iCz␤Missing block␤at /tmp/m3dtKx1iCz:1␤------> 3class Foo { has $.a is rw; method bar(:7⏏5D:){ say self.defined; } } ; class Bar {␤»
10:08 FROGGS m: class Foo { has $.a is rw; method bar(D:){ say self.defined; } } ; class Bar { has Foo $.f handles <bar> is rw; method baz(){ self.bar(); } } ; Bar.new.baz
10:08 camelia rakudo-moar 595890: OUTPUT«5===SORRY!5=== Error while compiling /tmp/GukiE8AYry␤Invalid typename 'D' in parameter declaration.␤at /tmp/GukiE8AYry:1␤------> 3class Foo { has $.a is rw; method bar(D7⏏5:){ say self.defined; } } ; class Bar { ␤»
10:08 FROGGS m: class Foo { has $.a is rw; method bar(Foo:D:){ say self.defined; } } ; class Bar { has Foo $.f handles <bar> is rw; method baz(){ self.bar(); } } ; Bar.new.baz
10:08 camelia rakudo-moar 595890: OUTPUT«Invocant requires an instance of type Foo, but a type object was passed.  Did you forget a .new?␤  in method bar at /tmp/RVvO2EJrOA line 1␤  in method baz at /tmp/RVvO2EJrOA line 1␤  in block <unit> at /tmp/RVvO2EJrOA line 1␤␤»
10:08 FROGGS there
10:09 FROGGS there you enforce that bar can only ever be called on a defined Foo
10:09 perlawhirl joined #perl6
10:09 gregf_ hmm
10:09 FROGGS and a defined Foo is an instanciated Foo
10:10 FROGGS and you can also only access attributes from instances
10:10 perlawhirl hi perlers
10:10 FROGGS if you want static attributes, you use "my" instead of "has"
10:10 perlawhirl is there such a thing as a set of lists?
10:10 perlawhirl m: set ([<a b c>], [<a b c>], [<d e f>])
10:10 camelia rakudo-moar 595890: ( no output )
10:10 perlawhirl m: set ([<a b c>], [<a b c>], [<d e f>]).say
10:10 camelia rakudo-moar 595890: OUTPUT«([a b c] [a b c] [d e f])␤»
10:10 FROGGS which probably is a rare use-case, but it exists
10:11 gregf_ FROGGS++
10:11 perlawhirl m: say set ([<a b c>], [<a b c>], [<d e f>])
10:11 camelia rakudo-moar 595890: OUTPUT«set(a, c, b, e, d, f)␤»
10:11 gregf_ FROGGS: thanks for explaining!
10:11 FROGGS gregf_: :o)
10:12 psch m: say [<a b c>] =:= [<a b c>]
10:12 camelia rakudo-moar 595890: OUTPUT«False␤»
10:12 FROGGS perlawhirl: I'm not sure if Sets will operate on that level...
10:12 psch m: say set($(<a b c>), $(<a b c>), $(<d e f>))
10:12 camelia rakudo-moar 595890: OUTPUT«set((a b c), (a b c), (d e f))␤»
10:12 psch hm, actually i'm not sure if Sets use =:= or eqv
10:12 FROGGS m: say ($(<a b c>), $(<a b c>), $(<d e f>)).Bag
10:12 camelia rakudo-moar 595890: OUTPUT«bag((d e f), (a b c), (a b c))␤»
10:12 psch they probably should use eqv, but don't seem to?
10:13 psch m: say [<a b c>] eqv [<a b c>]
10:13 camelia rakudo-moar 595890: OUTPUT«True␤»
10:13 FROGGS m: say ($(<a b c>), $(<a b c>), $(<d e f>)).Bag{$(<a b c>)}
10:13 camelia rakudo-moar 595890: OUTPUT«0␤»
10:13 perlawhirl fair enough... just playing with bags and sets to get my head around them
10:13 perlawhirl ie, i dont have a need (yet) for a set of lists
10:15 psch m: my $x = <a b c>; say set($x, $x, $(<d e f>))
10:15 camelia rakudo-moar 595890: OUTPUT«set((a b c), (d e f))␤»
10:15 psch yeah i think that hints at =:= instead of eqv
10:16 dalek ecosystem: 6c85109 | (Salvador Ortiz)++ | META.list:
10:16 dalek ecosystem: Add DBDish::ODBC to ecosystem
10:16 dalek ecosystem:
10:16 dalek ecosystem: Uses the DBDish infrastructure to provide access to ODBC
10:16 dalek ecosystem: This driver will be maintained separately.
10:16 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/6c85109f9c
10:17 perlawhirl psch: cool, so set of Seq seems to work if i define them first. ta
10:18 lizmat joined #perl6
10:18 virtualsue joined #perl6
10:23 RabidGravy "Files=3, Tests=48394" - that's the kind of numbers we like ;-)
10:24 RabidGravy sortiz++ # now to remember who it was that was asking about the other day
10:24 TimToady joined #perl6
10:25 sortiz RabidGravy, was nine++, among others.
10:26 rindolf joined #perl6
10:28 RabidGravy I wonder if I sneaked a UInt7 type in anyone would notice
10:29 frithnanth joined #perl6
10:31 Woodi hi #perl6 :)
10:32 Woodi is there a way to make grammar parsing lazy ?
10:35 vendethiel joined #perl6
10:35 kennygillen joined #perl6
10:37 RabidGravy I don't think so, but you could design things such the effect is a lazy parse
10:41 jnthn You could wrap a gather around the parse call and do takes in action methods ;)
10:42 psch or implement &cat :S
10:42 psch i really like that this is a straight quote from the synopses: "The resulting Cat is lazy."
10:42 jnthn :D
10:43 jnthn Laziness is pretty hard :)
10:43 jnthn Cat will need some effort
10:44 RabidGravy our Cat is lazy, it was a struggle to get her out of our bed last night
10:45 RabidGravy I'm sure I had a thing somewhere that turned a Julia set into a stream of MIDI events
10:46 Woodi jnthn: thanx
10:46 RabidGravy but can I find it, no
10:47 RabidGravy ah
10:54 perlawhirl joined #perl6
11:00 espadrine joined #perl6
11:04 espadrine_ joined #perl6
11:19 nine Any statistics buff here? I have two medians, one for group A, one for group B. The one for group A looks better but this group has about twice the variance of group B. How can I tell if the result is significant?
11:26 RabidGravy haha, brilliant I'd forgotten that I had got it to do http://rabidgravy.com/mandelbrot-midi-0.png
11:28 RabidGravy lilypond is rather good
11:28 tadzik mandelbrot midi? :)
11:28 tadzik yeah, the compile times are quite a bit of a pain though :)
11:29 RabidGravy yeah, it generates a MIDI stream with the notes based on the mandelbrot set
11:29 tadzik haha, awesome
11:30 kid51 joined #perl6
11:31 RabidGravy this is the P5 version https://github.com/jonathanstowe/midi-fractal
11:31 jast nine: I believe that's not evident from what you've explained so far. significance testing deals with p-values, which in turn compares sample results to a model. I'm assuming the medians are your results. what's your model?
11:32 vendethiel joined #perl6
11:34 jast or, more to the point, what's your null hypothesis and how do your values relate to it?
11:34 RabidGravy tadzik, the Audio::PortMIDI can *read* input right now, going to test the output at some point today, it should work but I haven't tested it yet
11:35 tadzik RabidGravy: read input, so see what comes in from a midi device?
11:35 RabidGravy yah
11:35 tadzik perfect, just what I need
11:36 RabidGravy https://github.com/jonathanstowe/Audio-PortMIDI
11:36 nine jast: as I'm dealing with "time for creating a customer's website" here I dare say that a normal distribution can be assumed. I guess what I'm asking is: can the "better" median in group A be sufficiently explained by the higher variance of my sample?
11:36 RabidGravy not finished yet, but may get you started
11:36 RabidGravy will be in a state to release over the weekend
11:37 tadzik awesome man
11:40 RabidGravy right, off out for a bit
11:42 jast nine: for any significance testing you need to formulate a null hypothesis. I'm having a hard time coming up with one that is testable and relates to the result/conclusion you're after. seems to me like you're trying to do a meta-analysis on a single study, sort of
11:45 jast in contrast, let's take the simple case. you've got a normally distributed probability variable X that you're trying to analyze. you have a null hypothesis about it, and you make a measurement
11:46 jast in significance testing, you take your measurement of X and calculate the probability that X is "more extreme" than your measurement, and that's your p-value.
11:47 jast what you've got here is a two-dimensional probability variable (with a multinomial distribution over median *and* variance)
11:48 jast in order to do any significance testing, you have to make an assumption about that distribution
11:48 jast and all I can tell you is that I don't have any good assumptions for you :)
11:50 nine This sounds quite a bit harder than I'd hoped :)
11:50 jast given two distributions (which is what you've got data for) and no idea of how they relate to each other, all you can do is compare the distributions, but that says nothing about significance of anything
11:50 jast sorry :)
11:51 jast anyway, this is a case of finding the right question to ask
11:52 jast generally speaking, if you have high variance, the way to fix that is to reduce variance, and you do that by collecting more data. :}
11:52 azawawi joined #perl6
11:54 jast I'm trying to think of something else to say that might be helpful but I'm a bit rusty in statistics...
11:54 azawawi hi
11:54 nine Both distributions are just time to create customer websites. One group with responsive design, the other with classical design + extra mobile version. Seems like going fully responsive would just take 7 % more time, but we only have 58 examples of those and standard deviation is at 70 % of the median. So my gut says that we shouldn't rely on the 7 % figure.
11:54 azawawi .seen FROGGS
11:54 yoleaux I saw FROGGS 10:13Z in #perl6: <FROGGS> m: say ($(<a b c>), $(<a b c>), $(<d e f>)).Bag{$(<a b c>)}
11:55 jast nine: one way to visualize it better, at least, is to scatterplot the two distributions
11:55 jast visualization is often enough to make these kinds of decisions
11:55 FROGGS azawawi: hi
11:56 jast actually in this case a candle diagram is probably enough
11:57 jkramer joined #perl6
11:57 jkramer Hello
11:57 jast if you want to actually crunch numbers, the Student's t-test may be relevant
11:58 jkramer I need some help understanding nested data structures. I have a hash %foo = foo => @some-array; (@some-array is empty). But when I do @bar = %foo<foo> then @bar is an array with one element which is an empty array.
11:58 jkramer Do I need to do some dereferencing as in Perl 5?
12:00 nadim joined #perl6
12:00 psch jkramer: in that specific case you bind ( := operator ) or slip ( .Slip method or prefix:<|> ) to not itemize the array in %foo<foo>.  note that the former is similar to assigning the reference, while the latter lowers the content of the rhs array into the lhs
12:04 jast a
12:04 jast that was my internet connection acting up...
12:05 jast nine: I believe this would fit your situation: https://en.wikipedia.org/wiki/Welch's_t_test
12:06 nine jast: looking at the scatter plot, it's hard to imagine any other conclusion than that the variance is just too high to read anything into it.
12:07 jast see, that way was much easier :}
12:07 jast looking at the data doesn't always help, but when it does it helps very quickly
12:09 nine jast: thank you so much! You helped me a lot.
12:17 azawawi FROGGS: im working on updating Selenium::WebDriver atm
12:20 FROGGS azawawi: \o/
12:20 FROGGS azawawi: do you wanna see my patch btw?
12:23 FROGGS azawawi: https://gist.github.com/FR​OGGS/8717727b20b18e6ea785
12:26 * azawawi takes a look
12:27 azawawi FROGGS: looks good. why is LEAVE { ... } section commented?
12:28 FROGGS azawawi: I think that code exploded (not the exception itself)... maybe it does not anymore
12:29 FROGGS azawawi: ahh, I remember
12:29 FROGGS azawawi: $response can be Any, and that will fail when you call .content on it
12:31 wamba joined #perl6
12:39 azawawi FROGGS: where is the code for Selenium::WebDriver::BlackBerry ?
12:51 FROGGS azawawi: in the gist: https://gist.github.com/FROGGS/87177​27b20b18e6ea785#file-blackberry-pm6
12:56 CurtisOvidPoe_ joined #perl6
12:56 CurtisOvidPoe_ Afternoon, all!
12:56 moritz \o CurtisOvidPoe_
12:56 perlpilot CurtisOvidPoe_: greetings!
12:57 CurtisOvidPoe_ I’m finishing an article about Perl 6 for TechBeacon. Can anyone make any comments about performance work?
12:57 moritz CurtisOvidPoe_: jnthn has a grant for working on it; he's doing a good job
12:57 moritz CurtisOvidPoe_: writing a memory profiler at the moment
12:57 moritz CurtisOvidPoe_: also there's ongoing work on a smarter JIT compiler
12:58 moritz http://news.perlfoundation.org/2016/0​2/grant-proposal-perl-6-performa.html
12:58 perlpilot CurtisOvidPoe_: lizmat is constantly making small performance improvements too
12:59 lizmat CurtisOvidPoe_ : check out https://6guts.wordpress.com for regular updates on the grant work
12:59 CurtisOvidPoe_ Thank you :)
13:00 skids joined #perl6
13:05 perlpilot CurtisOvidPoe_: At some point you might want to talk to people on #p6dev about what they're doing as that channel is more focused on development work.
13:07 tadzik ....there is #p6dev?
13:07 sjn o_O
13:07 lizmat http://irclog.perlgeek.de/p6dev
13:07 sjn oh, and o/ #perl6 :)
13:07 lizmat for the backlogging inclined  :-)
13:09 nine sjn: http://jobs.atikon.com/content/wer​beagentur/marketing/jobs/aktuell_o​ffene_stellen/index.html#_entry_0
13:09 perlpilot tadzik: yeah, and you should be there!  :)
13:11 sjn nine: ook, thanks :)
13:13 perlpilot btw, am I the only one who keeps reading "TechBeacon" as "TechBacon"?  It's making me hungry
13:14 moritz nom nom nom
13:14 moritz "to err is human. To propagate error to hundreds of machines is #devops". /me presses the "deploy" button...
13:20 azawawi FROGGS: what's 'phantomjs --version' on your linux machine?
13:21 FROGGS azawawi: 1.9.0
13:21 FROGGS azawawi: am I using it actually?
13:22 FROGGS probably not...
13:22 FROGGS (yet)
13:23 azawawi ::PhantomJS
13:23 azawawi FROGGS: it is working on 2.1 and failing on 1.9.0
13:23 azawawi FROGGS: part of this code was done on my windows machine where i used the latest software
13:24 FROGGS okay, will keep that in mind
13:25 azawawi also https://github.com/SeleniumHQ/​selenium/wiki/JsonWireProtocol is now OBSOLETE
13:25 FROGGS happily I dont need it for testing the blackberry browser
13:25 azawawi https://w3c.github.io/webd​river/webdriver-spec.html
13:25 FROGGS aha
13:27 azawawi it was released "new" so most probably it is the same with minor alterations
13:34 molaf joined #perl6
13:36 jkramer left #perl6
13:37 azawawi FROGGS: aha... https://github.com/ariya/phantomjs/issues/11421
13:37 azawawi FROGGS: "content-length" breaks phantomjs 1.9
13:42 perlawhirl joined #perl6
13:43 cdg joined #perl6
13:49 bjz joined #perl6
13:54 sufrostico joined #perl6
13:59 nadim joined #perl6
14:04 bjz joined #perl6
14:06 perlawhirl is there a succint way to get unique permutations?
14:06 perlawhirl this feels like it should work but maybe i'm missing something...
14:06 perlawhirl m: my @n = 1,1,2; say @n.permutations.grep:{ $_ eqv none @n }
14:06 camelia rakudo-moar 13ca30: OUTPUT«((1 1 2) (1 2 1) (1 1 2) (1 2 1) (2 1 1) (2 1 1))␤»
14:07 moritz m: say (1, 1, 2).permutations.map(~*).unique
14:07 camelia rakudo-moar 13ca30: OUTPUT«(1 1 2 1 2 1 2 1 1)␤»
14:07 moritz m: say (1, 1, 2).permutations.map(~*).unique.join(', ')
14:07 camelia rakudo-moar 13ca30: OUTPUT«1 1 2, 1 2 1, 2 1 1␤»
14:07 perlawhirl well now that i think about it... eqv to none would find nothing :D
14:07 sjoshi joined #perl6
14:07 perlawhirl hrm.. interesting moritz... taking the scenic route via stringification
14:08 moritz m: say (1, 1, 2).permutations.unique.join(', ') # I don't think that works, because lists aren't value objects
14:08 camelia rakudo-moar 13ca30: OUTPUT«1 1 2, 1 2 1, 1 1 2, 1 2 1, 2 1 1, 2 1 1␤»
14:08 moritz m: say (1, 1, 2).permutations.map(~*).un​ique(&infix:<eqv>).join(', ')
14:08 camelia rakudo-moar 13ca30: OUTPUT«Cannot call unique(Seq: Sub+{<anon|48540128>}+{Precedence}); none of these signatures match:␤    ($: *%_)␤    ($: :&as!, :&with!, *%_)␤    ($: :&as!, *%_)␤    ($: :&with!, *%_)␤  in block <unit> at /tmp/Fok1_fjrCi line 1␤␤»
14:08 moritz m: say (1, 1, 2).permutations.map(~*).unique(as => ~*).join(', ')
14:08 camelia rakudo-moar 13ca30: OUTPUT«1 1 2, 1 2 1, 2 1 1␤»
14:08 moritz that way you get lists out of it
14:09 perlawhirl yep... cool
14:09 moritz m: say (1, 1, 2).permutations.map(~*).unique(with => &infix:<eqv>).join(', ')
14:09 camelia rakudo-moar 13ca30: OUTPUT«1 1 2, 1 2 1, 2 1 1␤»
14:09 nadim Greetings from Africa, at least one person is doinf P6 here ;)
14:09 moritz no stringification involved here
14:09 perlawhirl GOT IT!
14:09 psch m: say (1,1,2).permutations.unique(with => &infix:<eqv>)
14:09 camelia rakudo-moar 13ca30: OUTPUT«((1 1 2) (1 2 1) (2 1 1))␤»
14:09 moritz \o Africa, nadim
14:09 perlawhirl m: my @n = 1,1,2; say @n.permutations.unique(as => ~*)
14:09 camelia rakudo-moar 13ca30: OUTPUT«((1 1 2) (1 2 1) (2 1 1))␤»
14:09 Timbus joined #perl6
14:12 nadim moritz: P& with a view http://imgur.com/1ktwKcN
14:12 nadim how wouldi , in the most perlish way, set all the elements of a hash to a certain value?
14:13 Actualeyes joined #perl6
14:14 psch m: my %h = a => 1, b => 2; %h{%h.keys} = "foo" xx *; say %h.perl # might be something neater around somewhere
14:14 camelia rakudo-moar 13ca30: OUTPUT«{:a("foo"), :b("foo")}␤»
14:14 moritz m: my %h = a => 1, b =>2 ; $_ = 0 for %h.values; say %h
14:14 camelia rakudo-moar 13ca30: OUTPUT«a => 0, b => 0␤»
14:14 psch m: my %h = a => 1, b => 2; %h{*} = "foo"; say %h.perl # this error i find weird
14:14 camelia rakudo-moar 13ca30: OUTPUT«Cannot assign to *, as the order of keys is non-deterministic␤  in block <unit> at /tmp/2Pf6AKkZS3 line 1␤␤»
14:14 psch or is .keys deterministic?
14:15 moritz m: my %h = a => 1, b =>2 ; %h{}:values = 0 xx *
14:15 camelia rakudo-moar 13ca30: OUTPUT«Unexpected named parameter 'values' passed␤  in block <unit> at /tmp/nUBeaxWnA8 line 1␤␤»
14:15 nadim psch: I like the * way
14:15 moritz m: my %h = a => 1, b =>2 ; %h{}:v = 0 xx *; say %h
14:15 camelia rakudo-moar 13ca30: OUTPUT«(timeout)»
14:15 nadim hehe!
14:16 Skarsnik joined #perl6
14:16 Skarsnik Hello
14:17 nadim Skarsnik: hi
14:17 perlawhirl m: my %h = one => 1, two => 2; %h.keys.map:{ %h{$_} = 5 }; say %h;
14:17 camelia rakudo-moar 13ca30: OUTPUT«one => 5, two => 5␤»
14:17 tmch joined #perl6
14:18 dalek ecosystem: 58e7aa8 | okaoka++ | META.list:
14:18 dalek ecosystem: Change username
14:18 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/58e7aa81ae
14:18 dalek ecosystem: e8a0064 | moritz++ | META.list:
14:18 dalek ecosystem: Merge pull request #172 from titsuki/change-username
14:18 dalek ecosystem:
14:18 dalek ecosystem: Change username
14:18 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/e8a0064dd0
14:19 perlawhirl nadim: one more way... : %h{$_} = 0 for %h.keys
14:20 nadim la compact one too!
14:20 perlawhirl it's quite perlish cos it's how youd do it in perl5, more or less
14:21 colomon_ joined #perl6
14:21 perlawhirl p5 would be : $h{$_} = 0 for keys %h
14:21 psch m: my %h = one => 1, two => 2; %h = %h.keys >>=>>> 5; say %h.perl
14:21 camelia rakudo-moar 13ca30: OUTPUT«{:one(5), :two(5)}␤»
14:22 perlawhirl hot damn... what is that operator
14:22 psch the long fish operator vOv
14:22 lizmat what's wrong with $_ = 0 for %h.values ?
14:22 psch well, no, it's a hypered fat arrow
14:23 * moritz visually prefers Z=>
14:23 psch moritz: but Z doesn't repeat the shorter side
14:23 psch m: my %h = one => 1, two => 2; %h = %h.keys Z=> 5; say %h.perl
14:23 camelia rakudo-moar 13ca30: OUTPUT«{:two(5)}␤»
14:24 nadim Z not repeating the short side is a pity I miss it i other places too
14:24 perlawhirl lizmat: it works! i presumed $_ would be a copy of the value and wouldn't modify the value
14:24 moritz psch: erm right, X=> then
14:24 lizmat $_ is defined to be bound to the values returned by .values, on purpose, so you *can* change them that way
14:25 perlawhirl yeah i dunno why i thought that. it works in p5 too
14:25 ufobat joined #perl6
14:27 [Coke] moritz++ #devops
14:27 nadim The one thingthat is a tad fuzzy with a for loop is that you can't have an if /unless after without putting the whole thing between parenthesis
14:28 azawawi FROGGS: something was changed in HTTP::UserAgent since it was working before (evidence: https://travis-ci.org/azawawi/perl6​-selenium-webdriver/builds/88746537 :) )
14:29 azawawi FROGGS: lowercase http headers most probably
14:29 perlawhirl m: my %h = one => 1, two => 2; %h.values X= 0; say %h;
14:29 camelia rakudo-moar 13ca30: OUTPUT«one => 0, two => 0␤»
14:29 psch oh neat!
14:29 perlawhirl that would be the most perl6ish way, id think
14:29 psch that was kind of what i was looking for, perlawhirl++
14:31 lizmat m: my %h = a => 42, b => 666; %h X= 0; dd %h # too bad this doesn't work
14:31 camelia rakudo-moar 57df3d: OUTPUT«Cannot modify an immutable Pair␤  in block <unit> at /tmp/rjuuKldzNb line 1␤␤»
14:31 perlawhirl yeah, moritz pointed me in the right direction. X=> is if you wanted a new Pair... ie my %zeroed = %h.keys X=> 0; %h is unchanged
14:32 lizmat I wonder if the Pair creation of Hash.pairs should bind to the container in the hash
14:32 moritz maybe
14:32 azawawi .tell RabidGravy HTTP::UserAgent seems to be forcing lower-case HTTP header names. Any chance one can override that behavior?
14:32 yoleaux azawawi: I'll pass your message to RabidGravy.
14:34 nadim perlawhirl: pretty perlish indeed
14:38 FROGGS $ perl6 -MHTTP::UserAgent -e 'say HTTP::Message.new( Foo => 42 ).Str'
14:38 FROGGS Foo: 42
14:38 FROGGS azawawi: do you mean that it outputs "foo: 42" fo you?
14:39 FROGGS for*
14:44 zuzu joined #perl6
14:51 Actualeyes joined #perl6
14:52 itaipu joined #perl6
14:55 TreyHarris joined #perl6
14:57 nine moritz: seeing your devops talk was a bit weird for me because we come from the other direction: we used to work directly on our production system via ssh to the server and vim. We only later moved to developing on the developer's machine and using a VCS.
14:58 nine We still don't do releases and our production systems just run git master.
14:58 moritz nine: well, that's a form of releasing software
14:58 moritz it just suffers from a few problems :-)
14:58 nine You could call every commit on master a release.
14:58 perlpilot nine: I'd wager that most shops made (are making) the transition as you did.
14:59 moritz nine: I'd say it's the right direction: you've moved to separate environments, and you have a process for getting your software to production
15:00 moritz nine: later you can refine that process (automating gating based on tests, dependency resolution etc.)
15:01 nine Which is exactly what we're planning to do. Once we made the move to VMs, we'll test each change in a copy of the production environment before automatically pushing it to production.
15:06 rindolf joined #perl6
15:08 * [Coke] wishes we had tests!
15:09 azawawi joined #perl6
15:09 azawawi hi
15:09 azawawi FROGGS: https://gist.github.com/az​awawi/da5757238d792491b92b
15:10 timotimo FROGGS: how do you feel about making Inline::C work again?
15:11 Skarsnik Inline::C is weird, does it requiere a compilateur at run time?
15:11 [Coke] m: say 1/1.WHAT
15:11 camelia rakudo-moar 57df3d: OUTPUT«Parameter 'de' requires an instance of type Int, but a type object was passed.  Did you forget a .new?␤  in block <unit> at /tmp/nXuZTSJpWB line 1␤␤»
15:11 [Coke] m: say (1/1).WHAT
15:11 camelia rakudo-moar 57df3d: OUTPUT«(Rat)␤»
15:12 jnthn I'd imagine so, though you might be able to arrange for it to happen at BEGIN time
15:15 azawawi FROGGS: https://github.com/azawawi/perl6-selenium-webdrive​r/blob/master/lib/Selenium/WebDriver/Wire.pm6#L744 . Please notice the "Content-Length" to "content-length" translation. phantomjs 1.9.x which is normally installed on Debian checks for "Content-Length" case sensitiveness (an HTTP spec bug which was fixed in 2.x)
15:18 FROGGS azawawi: I bet this causes it: https://github.com/sergot/http-useragen​t/blob/master/lib/HTTP/Request.pm6#L128
15:18 azawawi FROGGS: yup
15:18 FROGGS PR and you are done :o)
15:19 FROGGS wait, let me do it
15:22 azawawi FROGGS: confirmed, Content-Length on that line fixed the issue
15:24 FROGGS timotimo: I could attempt that...
15:24 timotimo consider it a low priority request from me
15:24 FROGGS Skarsnik: yes, I dont know of away to do that without a compilateur
15:24 * azawawi forces installation of HTTP::UserAgent after FROGGS++ fix :)
15:25 FROGGS azawawi: in the H:UA commit I changed more stuff... hopefully travis agrees...
15:26 azawawi FROGGS: the funny thing i realized i may have a commit bit on H:UA :)
15:26 FROGGS that's a good thing to have :o)
15:29 azawawi phantomjs 1.9 compatibility restored... FROGGS++ :)
15:29 FROGGS \o/
15:30 kurahaupo joined #perl6
15:34 * azawawi is now fixing ::Firefox issues
15:34 azawawi FROGGS: bit rot
15:36 nadim given: my $diff_glyphs = True; $diff_glyphs = %options<diff_glyphs> if %options<diff_glyphs>.defined ; Is there a cleaner way?
15:36 timotimo there's "with" to check .defined, but give you the original value
15:37 skids Actually in this case the default needs to be True.
15:37 moritz nine: my $diff_glyphs = %options<diff_glyphs> // True;
15:37 moritz sorry, meant nadim
15:37 nadim timotimo: sounds good but how would that look like?
15:37 skids So // is your friend.
15:38 hoelzro but what if $diff_glyphs already has a value?
15:38 nadim then it is overridden  but only if the option is set
15:38 hoelzro $diff_glyphs = %options<diff_glyphs> // $diff_glyphs; would cover that case
15:38 moritz hoelzro: nadim's example starts with my $diff_glyphs = True;
15:38 hoelzro ah, I didn't see that
15:39 skids $diff_glyphs = %options<diff_glyphs> // $diff_glyphs // True; # :)
15:39 skids or, precedence?
15:39 nadim anyway to remove the repetion? the default value is set many lines above at the start of the role declaration.
15:40 nadim the repetition of $diff_glyphs
15:41 skids You can in the other direction but not this direction.
15:41 skids (using //=)
15:41 timotimo try R//=?
15:41 jnthn m: my %options = diff_glyphs => 1; my $diff_glyphs = True; #`(later...) $diff_glyphs [R//]= %options<diff_glyphs>; say $diff_glyphs
15:41 camelia rakudo-moar 57df3d: OUTPUT«1␤»
15:41 nadim I was actually thinking of a =// ;)
15:41 jnthn m: my %options; my $diff_glyphs = True; #`(later...) $diff_glyphs [R//]= %options<diff_glyphs>; say $diff_glyphs
15:41 camelia rakudo-moar 57df3d: OUTPUT«True␤»
15:42 jnthn Like that :)
15:42 jnthn R being the reverse-arguments meta-op
15:42 nadim Cool!
15:42 jnthn And we only reverse those of the //, not of the assignment
15:43 jnthn Cute :)
15:43 AlexDaniel joined #perl6
15:48 kmwallio if I have an example in my examples directory, should I list that in me provides section in the META.info?
15:49 nadim no
15:50 timotimo maybe we ought to have some kind of infrastructure for example-viewing and storage
15:52 perlawhirl why isn't this working...
15:52 nadim timotimo: IMO, no. just clone and be done
15:52 perlawhirl m: say "this that".subst(/(this)/, "{$0.uc}")
15:52 camelia rakudo-moar 57df3d: OUTPUT«Use of Nil in string context  in block  at /tmp/VTmkUTbpId line 1␤ that␤»
15:52 perlawhirl why is $0 Nil ?
15:52 perlawhirl i'm sure i've used captures in substitution before... is my brain fried
15:53 timotimo perlawhirl: that string is executed before the .subst is called
15:53 moritz m: say "this that".subst(/(this)/, {$0.uc})
15:53 camelia rakudo-moar 57df3d: OUTPUT«THIS that␤»
15:54 moritz us a string in a closure, not a closure in a string :-)
15:54 perlawhirl ok, i'm hitting a weird issue where it's using a previous capture
15:55 perlawhirl right now if i run this in the repl: "this that".subst(/(this)/, {$0})
15:55 perlawhirl it returns: i that
15:55 timotimo yeah, i know your problem
15:55 timotimo "repl"
15:55 perlawhirl hah, ok
15:55 perlawhirl figures
15:55 perlawhirl i know for next time :D
16:06 Relsak joined #perl6
16:07 nadim some Data::Dump::Tree news, for those interested, it soed data dumping, side by side data synchronization, and now only diff between two data structures
16:07 nadim it's not perfect yet but going slowly towrds good enough  http://imgur.com/cAYNEnk
16:08 dalek perl6-examples: 47d57e5 | (Shlomi Fish)++ | t/categories/euler.t:
16:08 dalek perl6-examples: Fix the tests. Hopefully.
16:08 dalek perl6-examples:
16:08 dalek perl6-examples: The result was wrong before in the test and now it's fixed.
16:08 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/47d57e59d4
16:09 azawawi FROGGS: S:W:Firefox is now fixed. Please test after reinstalling File::Zip. Enjoy :)
16:10 azawawi FROGGS: on Windows it will not work since firefox is not on $PATH
16:16 FROGGS well, one can adjust PATH :o)
16:16 timotimo nadim: you reap what you soe? :)
16:17 nadim timotimo: I will get my revenge one day ;)
16:17 azawawi FROGGS: i was discussing it with RabidGravy last year and something like Stuff::Finder or Program::Finder may be a useful module on windows
16:19 RabidGravy joined #perl6
16:19 azawawi RabidGravy: hi :)
16:19 RabidGravy rarr!
16:19 yoleaux 14:32Z <azawawi> RabidGravy: HTTP::UserAgent seems to be forcing lower-case HTTP header names. Any chance one can override that behavior?
16:19 Woodi nadim: I tried DDT yesterday and it failed tests on star 2016.01, known problem ?
16:20 nadim Woodi: can you please put it on github? all test pass here (tm).
16:22 nadim Woodi:  there will be another version next week with the synch and diff role in the distro.
16:22 Woodi nadim: you use R*201601 ? I tried it with panda, will try wit git clone
16:23 nadim I use perl6::version=2016.02-77-g855de77
16:25 nadim Woodi: note that I thought I'd push the latest diff branch for you but it failed two tests ;) will fix it now
16:25 azawawi RabidGravy: FROGGS fixed it. so ignore it :)
16:25 RabidGravy azawawi, cool
16:26 Woodi nadim: prove failed test 41, line 25...
16:26 azawawi RabidGravy: like 1 min ago I said your name and then you joined #perl6. Coincidence? :)
16:27 RabidGravy I am omniscient
16:28 nadim Woodi: what file?
16:28 DrForr RabidGravy eq Kibo.
16:29 azawawi RabidGravy: so what will happen to perl6 in 20 years from now? :)
16:30 timotimo it'll be a bit faster than it is today
16:30 RabidGravy :)
16:30 RabidGravy only a bit mind, wouldn't want people to get over-excited
16:30 timotimo i forsee that code using native arrays and regular mathy operators will be almost the same speed as C-generated code
16:31 azawawi :)
16:32 RabidGravy and I will have finally finished the couchdb nodule that I started almost a year ago
16:32 azawawi https://travis-ci.org/azawawi/perl6​-selenium-webdriver/jobs/116942097  # MacOS X Travis CI builds seems to be buffered a lot
16:32 khw joined #perl6
16:33 Woodi nadim: t/41_type_callframe.t line 25
16:34 nadim Woodi: fixed in the latest. I'llupdate everything soon.
16:41 dalek ecosystem: d3b4b81 | kmwallio++ | META.list:
16:41 dalek ecosystem: Add Acme::Skynet to ecosystem
16:41 dalek ecosystem:
16:41 dalek ecosystem: See https://github.com/kmwallio/Acme-Skynet
16:41 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/d3b4b81e56
16:41 dalek ecosystem: ac2ebd8 | RabidGravy++ | META.list:
16:41 dalek ecosystem: Merge pull request #173 from kmwallio/master
16:41 dalek ecosystem:
16:41 dalek ecosystem: Add Acme::Skynet to ecosystem
16:41 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/ac2ebd8cc7
16:47 Woodi Acme::Skynet ?  .oO( T2000: Miss Connor, I just do my job... Pleas let me in )
17:08 FROGGS joined #perl6
17:11 perl6-newbie joined #perl6
17:26 araujo joined #perl6
17:26 telex joined #perl6
17:26 bdmatatu joined #perl6
17:27 Azry How would you make a IO::Handle object out of a NativeCall function that returns a FILE* ?
17:28 perl6-newbie how do I do foreach(1..100){} in perl6?
17:29 geekosaur Azry, I don;t think you would unless you are *very* careful about how both the native functions and perl 6 use it
17:30 Azry ha i can answer that perl6-newbie: for ^100; :D
17:30 perl6-newbie thanks!
17:32 geekosaur Azry, the problem is that you're mixing buffering abstractions; libuv does one thing, libc stdio does something else, things can get *really confused* if each one is buffering separately
17:32 Azry well i'm not yet very comfortable in all this :S
17:33 geekosaur doing it right would probably require that IO::Handle have different backends for libc stdio, libuv (current perl6/moar), etc.
17:33 psch yeah, geekosaur says fits my knowledge there.  as in, you'd probably have to also NC into libuv, stuff the FILE* in there and wrap what you get back into whatever exactly it is we do for IO::Handle!PIO
17:33 psch +what
17:33 psch that's assuming that libuv can take a FILE* and turn it into something it normally does things with
17:34 Azry i submitted a ticket on rt for this, i need to create a filehandle from a file descriptor, but i didn't want to wait :(
17:34 Azry i guess that would be more of a ugly hack
17:34 psch definitely :)
17:35 SCHAAP137 joined #perl6
17:36 itaipu joined #perl6
17:36 AlexDaniel perl6-newbie: well the answer is not entirely correct since ^100 is basically 0..99
17:36 psch Azry: maybe exposing what's been merged in libuv here https://github.com/joyent/libuv/pull/316 to NQP could work
17:36 AlexDaniel m: .say for ^10
17:36 camelia rakudo-moar 57df3d: OUTPUT«0␤1␤2␤3␤4␤5␤6␤7␤8␤9␤»
17:36 AlexDaniel m: .say for 0..9
17:36 camelia rakudo-moar 57df3d: OUTPUT«0␤1␤2␤3␤4␤5␤6␤7␤8␤9␤»
17:36 AlexDaniel m: .say for 1..10
17:36 camelia rakudo-moar 57df3d: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤»
17:37 psch Azry: but that'd involve a significant bit of moar hacking as well
17:37 psch well, the fact that the issue only covers half your use-case aside :/
17:37 Azry i just started perl6, i'm definetely not ready for that yet =D
17:37 psch well, moar is C, NQP is minimal... ;)
17:38 psch the language that is, although the code base mostly looks scarier than it really is
17:38 psch well, except for the regex-y bits :)
17:38 perl6-newbie is perl6 really 10 times slower than perl5?
17:38 perl6-newbie e.g.:
17:38 perl6-newbie $ time /opt/rakudo-star-2016.01/bin/perl6 -e 'constant $FOO = 0; for 1..10_000_000 {}' # takes 2.5s on my macbook
17:38 geekosaur often, yes. getting it right came first, getting it fast is ongoing.
17:39 perl6-newbie $ time perl -e 'use constant FOO => 0; foreach (1..100_000_000){}' # takes 2.3s on my macbook
17:39 Woodi perl6-newbie: 10x slower is good news for many of us :)
17:39 perl6-newbie lol :-)
17:39 sjn easy-to-understand > correct > fast
17:39 psch perl6-newbie: of note is that a bare perl6 program is more equal to a perl5 with Moose
17:39 psch perl6-newbie: even if you don't do anything OO-y
17:40 psch of course that's a reason, not an excuse :)
17:41 perl6-newbie it'll be interesting to see if that was a clever strategy to concentrate on other things than speed
17:41 AlexDaniel perl6-newbie: it's a complex topic, actually
17:42 timotimo you do realize that 2016 is the year we're concentrating on speed, though?
17:42 psch heh
17:42 perl6-newbie yeah, I heard that... but I always assumed it was a bit slower or twice as slow... but not 10x slower!
17:42 AlexDaniel perl6-newbie: e.g. in perl6 you can easily crunch something in parallel and you will end up doing it faster in terms of clock time
17:42 perl6-newbie :-)
17:42 Woodi perl6-newbie: actually Perl6 OO is faster then Perl5 Moose since few years (or was?)
17:42 AlexDaniel perl6-newbie: and with much less code than you would have to write in perl5
17:43 timotimo perl6-newbie: you can try -> int $i {} instead of just {} and it'll become a bit faster
17:43 psch https://gist.github.com/pe​schwa/58a33d7636656a0c4c33
17:43 * psch .oO( is perl5 really 3 times slower than perl6? )
17:43 timotimo crucially, we're apparently not inlining the block, which we totally should be able to
17:43 AlexDaniel perl6-newbie: but yeah, it is kinda true that it is slow-ish
17:44 timotimo psch: unfair comparison; you have to "use integer" in perl5 to get it to be fairer
17:44 psch oh, wait, 4 times
17:44 AlexDaniel psch: wait, what if you use ++ ?
17:44 psch timotimo: "use integer" brings perl5 to 3.8s
17:45 timotimo in any case, microbenchmarks are a poor approximation of behavior in general, because it really accentuates problem spots we have. like invocation being much more expensive than it should be
17:45 psch yeah, that's kind of my point here as well
17:45 psch AlexDaniel: ++ brings perl5 to 5s and stays the same for perl6 :)
17:46 timotimo since the for loop perl6-newbie wrote is equivalent to the code psch pasted after static optimization, but psch's code doesn't have an invocation for every round 'round the loop, we get a drastic difference there
17:46 ugexe why isnt IO::Socket an IO::Handle?
17:46 Woodi ugexe: IO::Socket is older ?
17:46 RabidGravy I wondered that before
17:46 ugexe rather: is there anything stopping us from making IO::Socket an IO::Handle
17:47 AlexDaniel psch: that's some really good nitpicking there :)
17:47 perl6-newbie my worry is that it may only be possible to optimize perl6 so far -- due to its architecture -- and e.g. the for loop I posted my never get close in speed to perl5 ?
17:47 AlexDaniel psch: I love it
17:48 ugexe it would allowa nice abstraction between sockets, files, and pipes then
17:48 AlexDaniel perl6-newbie: all things that I know so far are suggesting otherwise
17:48 timotimo perl6-newbie: the for loop you've pasted can (and probably will) become exactly as fast as what psch posted
17:48 AlexDaniel perl6-newbie: in fact, if you follow commit log you'll see 10x-like speedups for certain small things
17:49 geekosaur perl6-newbie, I think it's entirely possible, it just hasn't been done because people have been concentrating on getting stuff working and usable rather than on making it fast
17:49 geekosaur the making it fast part, as I said, is ongoing. literally every day there's at least one commit making something significantly faster
17:49 perl6-newbie sounds good... I will make a note of those loops and try them again later in the year and see what has happened
17:49 RabidGravy actually as far as I'm concerned questions of speed are somewhat moot anyway, the only useful metric for me is "fast enough" and I find that it is fast enough for a lot of things
17:49 geekosaur there's a *lot* of those "somethings" to speed up, though
17:50 AlexDaniel by the way, are there any plans for JIT on ARM?
17:50 RabidGravy I'd love to see that
17:50 timotimo AlexDaniel: if you build it, we'll have it
17:50 timotimo same goes for RabidGravy
17:50 AlexDaniel or what is blocking it?
17:50 timotimo as far as i know, DynASM already supports ARM
17:51 psch lizmat++ does a lot of making things fast
17:52 timotimo perl6-newbie: https://6guts.wordpress.com/2016/03/06/dig​ging-into-the-performancereliability-work/  -  have you seen this?
17:52 mst perl6-newbie: if anything, the lack of typing in perl5 means that rakudo should be able to be faster
17:53 RabidGravy right now I'm trying to remember what the MIDI clock meter thing for linux is, then we can find out if it is fast enough to generate accurate MIDI clocks
17:53 timotimo mst: though that is really only true for native types at the moment, like "int", "num" and "str"
17:54 mst timotimo: notice my use of the future tense. it's almost as if grammar can mean things :D
17:55 araujo joined #perl6
17:55 timotimo statically declared types don't mean as much to perl6 as to java or c++, though
17:55 timotimo and unless we get around to making our classes "closed", or otherwise preventing mix-ins and other shenanigans, i'd assume it won't help a lot for a long time
17:56 timotimo we really get our big benefits from observing actual types at run-time, and reacting to that with specialization and jitting
17:58 wamba joined #perl6
17:58 virtualsue joined #perl6
18:00 firstdayonthejob joined #perl6
18:01 domidumont joined #perl6
18:03 perl6-newbie thanks for the link on performance work... I wonder how quickly that work will filter into the production perl6?
18:04 timotimo the things he talked about are already in. they were already in when that post was posted
18:04 bjz_ joined #perl6
18:04 timotimo so ... "quickly", i guess
18:05 perl6-newbie it's also interesting to note how slow perl5 when running the same 10M loop in 'OO mode'
18:06 perl6-newbie hmm... if it's already 'in' and the 10M perl6 loop in the blog was running is 0.6s then why did my perl6 10M loop take 2.5s doing nothing in the loop body?
18:06 timotimo what is OO mode?
18:06 RabidGravy let's put it like this : 6 months ago I could just about stream audio at 128Kbps from a Perl 6 program, now I can *easily* stream at 320
18:06 RabidGravy *that's* fast enough
18:07 psch perl6-newbie: for and loop (and while) optimize differently well (currently)
18:07 psch perl6-newbie: note that my microbench used while and was 4 times faster than perl5
18:07 perl6-newbie he says in the blog post "Just to put that figure on the map a little, I wrote the following Perl 5 program, which I hope is reasonably equivalent" ...
18:07 RabidGravy also *now* and and rakudo 2016-01 are different
18:08 timotimo perl6-newbie: i'm willing to bet the loop body in jnthn's code was inlined, whereas your (the empty loop body) wasn't
18:09 perl6-newbie makes sense
18:09 timotimo and also, another difference is that the empty loop body you had got the loop variable passed to it
18:09 Azry since i can't work on my module util my ticket is resolved, is there a list somewhere of modules that people would like to have ?
18:09 timotimo whereas the loop (...) { } one doesn't have such a thing going on
18:10 psch Azry:
18:10 psch gr
18:10 psch https://github.com/perl6/perl6-most-wan​ted/blob/master/most-wanted/modules.md
18:10 psch that
18:10 yqt joined #perl6
18:11 Azry looks good thanks =)
18:11 timotimo perl6-newbie: did you see the difference between "for 1..10_000_000 {}" and "for 1..10_000_000 -> int $i {}"? the second one is quite noticably faster
18:11 RabidGravy I'd like http digest authentication
18:12 timotimo i find http indigestible
18:13 perl6-newbie it goes about 0.1 seconds faster for me with the -> int $i
18:13 RabidGravy because you haven't got a new enough rakudo
18:14 perl6-newbie hmmm... I literally just downloaded it this morning... so do you mean a non-production version?
18:14 timotimo probably
18:15 timotimo if i understand correctly, we're getting the 2016.03 compiler release this weekend, and then we'll see about a rakudo star release
18:15 colomon joined #perl6
18:18 perl6-newbie $ time /opt/rakudo-star-2016.01/bin/perl6 -e 'constant $FOO = 0; loop (my $i = 1; $i <= 10_000_000; $i++) {}' # takes 1.4s on my macbook
18:20 perl6-newbie $ time /opt/rakudo-star-2016.01/bin/perl6 -e 'constant $FOO = 0; loop (my $i = 1; $i <= 10_000_000; $i++) {say $_ if $FOO;}' # takes 4.2s on my macbook
18:20 perl6-newbie so perl6 does not do constant folder like perl5 does?
18:21 pmurias joined #perl6
18:21 psch fwiw, the first one is 1.6s here, and with adding the type 'int' it's 0.26
18:22 psch the constant folding we do is turning e.g. 4 div 2 into 2 at compile time, afaik
18:22 Azry these examples are 7s and 14s on my freebsd
18:22 geekosaur perl5's optimization of that does not yet exist
18:22 psch not sure where in that example constant folding applies, anyway vOv
18:23 virtualsue joined #perl6
18:23 timotimo it could throw out the "say $_"
18:23 timotimo thus making both programs equivalent in code
18:23 timotimo there's probably some $_-saving stuff in there, too
18:23 psch that's constant folding too?  huh
18:23 timotimo well, in this case it'd be dead code elimination, really
18:24 mrsolo joined #perl6
18:25 perl6-newbie $ time /opt/rakudo-star-2016.01/bin/perl6 -e 'constant $FOO = 0; loop (my int $i = 1; $i <= 10_000_000; $i++) {}' # takes 0.2s on my macbook
18:25 perl6-newbie nice
18:25 perl6-newbie $ time /opt/rakudo-star-2016.01/bin/perl6 -e 'constant $FOO = 0; loop (my int $i = 1; $i <= 10_000_000; $i++) {say $_ if $FOO;}' # takes 2.6s on my macbook
18:26 psch yeah, in the end this is all meaningless microbenchmarks... :)
18:26 perl6-newbie in perl5 then the say $_ if $FOO; statement would be optimized away because of constant folding... perl5 is one of the few languages to do that...
18:27 mst say $_ if FOO; would
18:28 perl6-newbie surely the 2.6s suggests that the say $_ if $FOO; is not being optimized away?
18:29 psch patches welcome :)
18:29 perl6-newbie but I guess it could be that the loop optimization is still so flaky that it did get optimized away but as a result the loop didn't get optimized?
18:30 timotimo you can find out all of this with our introspective tools
18:30 timotimo you can for example compare the ast we generate statically with --target=ast and --target=optimize
18:30 pmurias mst: the non-native type checks are mostly a hindrance for performance, what should hopefully allow Perl 6 to be really fast in the future is that a lot more things are lexical then in Perl 5 and that the implemementation is not exposed by XS
18:31 timotimo --profile will not terribly likely be helpful here
18:31 timotimo but you can set the env var MVM_SPESH_LOG=foobar.txt to get low-level bytecode that is run, that'll give you quite an amount of information about what's going on
18:33 dwarring joined #perl6
18:37 perl6-newbie wow setting MVM_SPESH_LOG causes a fire hose of info :-)
18:38 perl6-newbie but it's not intention revealing enough -- for me at least -- to discover if the say statement was infact optimized away :-(
18:39 timotimo yes, it really is a firehose
18:39 timotimo the thing is, that spesh optimizes a crapton of stuff in the compiler during startup :)
18:39 timotimo so you get to see all of that, too
18:40 timotimo you probably just want to look at the last 5%
18:40 timotimo or start from the bottom actually
18:40 timotimo anyway, gotta go!
18:40 perl6-newbie thanks ttfn
18:43 sjoshi joined #perl6
18:43 lostinfog joined #perl6
18:52 sufrostico joined #perl6
18:55 timotimo god damn it, now i've got weird al's UHF stuck in my head
18:56 RabidGravy timotimo, I just remembered another lightweight sequencer for Linux - "non-sequencer"
18:57 RabidGravy but I still haven't found anything that will tell me if this midi clock I'm sending is anything near right
18:57 RabidGravy but it definitely is sending it
19:00 timotimo so all you need to know is if the timing is all right?
19:01 timotimo send it out via an ethernet jack or midi plug and hook up an oscilloscope?
19:04 RabidGravy Oh I've got lots of options on the hardware front, I'd just plug it in the MPC1000 via MIDI and it would tell me straight away ;-)
19:08 RabidGravy but that would entail remembering where I put all the midi cables
19:09 psch hah, i don't have any midi cables
19:09 psch but then also don't have any hw samplers or synths vOv
19:09 CQ joined #perl6
19:10 RabidGravy yeah I have somewhat of a hardware addiction
19:11 rindolf joined #perl6
19:12 psch eh, if it fits somewhere in the room and is affordable, why not :)
19:15 hankache joined #perl6
19:15 chansen_ joined #perl6
19:15 RabidGravy https://www.facebook.com/photo.php?fb​id=10151551555116830&amp;l=5c4c84c7be  is a taste
19:16 RabidGravy it's a bit tidier than that at the moment
19:16 psch "Sorry, this content isn't available right now"
19:17 nadim joined #perl6
19:19 RabidGravy weird
19:21 RabidGravy http://rabidgravy.com/stuff.jpg
19:23 psch well, i could maybe guess what half of those boxes do... :)
19:27 RabidGravy mostly things that mess sound up and a drum machine, two bass synths and a monomachine
19:32 rindolf Hi all.
19:33 * rindolf wonders if he should rebuild rakudobrew to see if perl6/moar got faster recently.
19:35 lichtkind_ joined #perl6
19:35 spider-mario joined #perl6
19:40 mrsolo joined #perl6
19:49 Hotkeys rindolf: i just rebuild all the time
19:52 AlexDaniel Hotkeys: in a hope that it gets faster after every rebuild? :)
19:52 cognominal joined #perl6
19:52 Hotkeys nah just cause
19:52 Hotkeys why not
19:53 khw joined #perl6
19:55 lustlife` joined #perl6
19:57 * perlpilot rebuilds every so often too  (once a week or so)
19:58 RabidGravy Sunday usually and smoke test all my modules
19:59 RabidGravy has proved to be a reasonable canary
19:59 AlexDaniel m: {sum @^a.sort Z*[R,] @^b.sort}((1, 3, -5),(-2, 4, 1)).say
19:59 camelia rakudo-moar 57df3d: OUTPUT«-25␤»
20:00 AlexDaniel Hotkeys: 3 bytes shorter or something
20:02 AlexDaniel m: {(grep {.comb.sum==.².comb.sum},1..*)[$_]}(13).say
20:02 camelia rakudo-moar 57df3d: OUTPUT«189␤»
20:02 AlexDaniel Hotkeys: another 3 bytes
20:03 psch ...those do the same? oO
20:03 AlexDaniel psch: no :D
20:03 psch that's reassuring :)
20:04 AlexDaniel I love this .² thing :)
20:05 psch yeah, it's neat
20:05 Hotkeys you can do it with any postfix I think
20:05 Hotkeys or am i wrong
20:05 Hotkeys probably wrong
20:05 psch m: 1.++.say
20:05 camelia rakudo-moar 57df3d: OUTPUT«Cannot call postfix:<++>(Int); none of these signatures match:␤    (Mu:D $a is rw)␤    (Mu:U $a is rw)␤    (Int:D $a is rw)␤    (int $a is rw)␤    (Bool:U $a is rw)␤    (Bool:D $a is rw)␤    (Num:D $a is rw)␤    (Num:U $a is rw)␤    (num …»
20:05 cognominal that's $_ ** 2 ?
20:06 AlexDaniel yeah
20:06 psch cognominal: yeah, superscripts Just Work
20:06 psch m: say 2²²
20:06 camelia rakudo-moar 57df3d: OUTPUT«4194304␤»
20:06 AlexDaniel m: say ²²² # fun, but don't rely on this
20:06 camelia rakudo-moar 57df3d: OUTPUT«4194304␤»
20:06 cognominal ...and indices for arrays ?
20:07 Hotkeys no subscripts
20:07 psch that'd be subscripts, no?
20:07 psch i don't think we have that
20:07 AlexDaniel no subscripts yet :(
20:07 cognominal ok
20:07 Hotkeys subscripts are hard
20:07 AlexDaniel in fact, most people say that subscript should not work like array subscripts :(
20:07 Hotkeys I'd prefer having them for vars
20:07 AlexDaniel s
20:07 Hotkeys than having them for arrays
20:07 psch yeah, i'd rather have them allowed in ident too
20:07 AlexDaniel look ↑
20:08 AlexDaniel if you are using numbers in the end of the variable name, perhaps consider using an array?
20:09 cognominal m: say 3 ³ ³
20:09 camelia rakudo-moar 57df3d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/PPhKeN_Qx9␤Confused␤at /tmp/PPhKeN_Qx9:1␤------> 3say 37⏏5 ³ ³␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        statement modifie…»
20:09 cognominal m: say 3³³
20:09 camelia rakudo-moar 57df3d: OUTPUT«5559060566555523␤»
20:09 AlexDaniel m: say 3\ ³³
20:09 camelia rakudo-moar 57df3d: OUTPUT«5559060566555523␤»
20:10 psch m: say 3\ .\ ³
20:10 camelia rakudo-moar 57df3d: OUTPUT«27␤»
20:10 psch m: say 2².²
20:10 camelia rakudo-moar 57df3d: OUTPUT«16␤»
20:10 psch that's actually cool
20:10 psch dot as parens replacement there
20:11 AlexDaniel m: say 2²\ ²
20:11 camelia rakudo-moar 57df3d: OUTPUT«16␤»
20:11 AlexDaniel oops
20:11 AlexDaniel ah, it works
20:11 psch yeah, toss the space and it's the same amount of bytes
20:11 AlexDaniel m: say 2²\²
20:11 camelia rakudo-moar 57df3d: OUTPUT«16␤»
20:11 AlexDaniel right
20:12 psch m: say 2²   .\   2
20:12 camelia rakudo-moar 57df3d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/KAlUVEyrOD␤Unsupported use of . to concatenate strings; in Perl 6 please use ~␤at /tmp/KAlUVEyrOD:1␤------> 3say 2²   .7⏏5\   2␤»
20:12 psch hm
20:12 psch m: say 2   .\   2
20:12 camelia rakudo-moar 57df3d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/cHULsZMbJu␤Unsupported use of . to concatenate strings; in Perl 6 please use ~␤at /tmp/cHULsZMbJu:1␤------> 3say 2   .7⏏5\   2␤»
20:12 psch m: 2 .say
20:12 camelia rakudo-moar 57df3d: OUTPUT«2␤»
20:12 AlexDaniel m: say 2   \.   2
20:12 camelia rakudo-moar 57df3d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/6LoPmTnFNH␤Confused␤at /tmp/6LoPmTnFNH:1␤------> 3say 27⏏5   \.   2␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        statement modi…»
20:12 psch that confuses me
20:12 Hotkeys m: say 2.\             2
20:12 camelia rakudo-moar 57df3d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/2Zj0RKMrMi␤Unsupported use of . to concatenate strings; in Perl 6 please use ~␤at /tmp/2Zj0RKMrMi:1␤------> 3say 2.7⏏5\             2␤»
20:12 AlexDaniel m: say 2\   \.   2
20:12 camelia rakudo-moar 57df3d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/LIN9xmTEqR␤Bogus postfix␤at /tmp/LIN9xmTEqR:1␤------> 3say 27⏏5\   \.   2␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        statemen…»
20:12 psch i mean, methodop can have spaces before
20:12 Hotkeys m: say 2\.             2
20:12 camelia rakudo-moar 57df3d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/rlfMbGjOvZ␤Confused␤at /tmp/rlfMbGjOvZ:1␤------> 3say 2\.7⏏5             2␤    expecting any of:␤        dotty method or postfix␤»
20:12 psch except for literals?
20:12 psch m: "foo" .say
20:12 camelia rakudo-moar 57df3d: OUTPUT«foo␤»
20:12 AlexDaniel psch: it is often half-broken
20:12 psch or just numerics..?
20:12 psch ah
20:13 AlexDaniel m: 42 . WHAT.say
20:13 camelia rakudo-moar 57df3d: OUTPUT«===SORRY!===␤Method call must either supply a name or have a child node that evaluates to the name␤»
20:13 Hotkeys I was under the impression that if you wanted space like that you had to use a \
20:13 johnP joined #perl6
20:13 Hotkeys regardless
20:13 AlexDaniel WHAT is special, I know, but that's just another way of breaking .
20:13 AlexDaniel m: 42 . say
20:13 camelia rakudo-moar 57df3d: OUTPUT«42␤»
20:13 AlexDaniel Hotkeys: there's infix .
20:14 virtualsue joined #perl6
20:14 AlexDaniel m: {(e**(i*$^x)).im}(pi).sa
20:14 camelia rakudo-moar 57df3d: OUTPUT«Method 'sa' not found for invocant of class 'Num'␤  in block <unit> at /tmp/maQzPEYllf line 1␤␤»
20:14 AlexDaniel m: {(e**(i*$^x)).im}(pi).say
20:14 camelia rakudo-moar 57df3d: OUTPUT«1.22464679914735e-16␤»
20:14 AlexDaniel m: {(e**(i*$_)).im}(pi).say
20:14 camelia rakudo-moar 57df3d: OUTPUT«1.22464679914735e-16␤»
20:15 AlexDaniel Hotkeys: -1 byte :)
20:15 johnP Hello guys.. I'm a student looking into perl6, I wrote a simple script that read 10000 numbers from a text file, sort them and print them back to the screen. I noticed that the same thing done in perl 5 takes less than a second. in perl6 however it takes 29sec.
20:15 Hotkeys oh
20:15 AlexDaniel johnP: which perl 6 version?
20:15 AlexDaniel johnP: or rather which rakudo version
20:16 Hotkeys idk why I used $^x there
20:16 timotimo johnP: yeah, sometimes perl 6 can be painfully slow, but it's very possible to speed things up by writing things with better selection of primitives
20:16 johnP This is Rakudo version 2016.02-180-g57df3dd built on MoarVM version 2016.02-33-g1e3d2ac
20:16 johnP implementing Perl 6.c.
20:16 AlexDaniel johnP: and perhaps you could show us the code so that we can suggest some improvements :)
20:16 timotimo ah, well, at least your rakudo isn't out of date :)
20:17 johnP I'll put the code online and provide a link just one sec
20:17 timotimo thanks
20:17 timotimo if you want to do your own performance tuning, using "perl6 --profile yourscript.p6" is a good place to start to see if anything much sticks out
20:17 psch johnP: keep in mind that perl6 had about 4 months of "make it fast" (if that) while perl5 had upward of 10 years of "make it fast"
20:17 yqt joined #perl6
20:18 timotimo i'd say we've had a few more months of that, but only few people working on that during these months
20:18 psch eh, arguable :)
20:18 AlexDaniel yeah, we should probably consider cloning jnthn and lizmat
20:18 psch i mean, yes, lizmat and jnthn did perf work before 6.c
20:18 psch but they also did some amount of semantic work after 6.c
20:19 * timotimo doesn't make the list ;_;
20:19 psch in the end the mistake i made was probably supplying an actual number... :)
20:19 psch as in, "we had months, p5 had years" still rings true
20:19 timotimo yes
20:20 johnP http://hostcode.sourceforge.net/view/5106
20:20 psch timotimo: your perf work is mostly in mvm directly, isn't it?  i admit i tend to overlook that...
20:20 AlexDaniel m: {e**(i*$_) .im}(pi).say
20:20 camelia rakudo-moar 57df3d: OUTPUT«1.22464679914735e-16␤»
20:20 timotimo p6 performance still feels to me like there's a few tarpits you can accidentally dip your toe into, and suddenly you get 100x-10000x slower
20:20 AlexDaniel Hotkeys: ↑ -1 more byte
20:21 timotimo johnP: first thing that sticks out to me is you probably want to numify the numbers from the file once up front
20:21 timotimo then you don't have to use <=> in your sort
20:21 timotimo and using $^a <=> $^b is likely a few times slower than just { +$^a }
20:21 psch m: say "2" < "3"; say now - BEGIN now
20:21 camelia rakudo-moar 57df3d: OUTPUT«True␤0.0106056␤»
20:22 psch m: say 2 < 3; say now - BEGIN now
20:22 camelia rakudo-moar 57df3d: OUTPUT«True␤0.0111133␤»
20:22 * psch snickers
20:22 timotimo lol, well done :)
20:22 timotimo watch out, those comparisons would potentially get compile-time evaluated
20:23 psch yeah, i don't expect anything significant from running that repeatedly
20:23 psch and i'd guess 5% isn't really something to write home about with camelia's host either
20:23 johnP timotimo your advice helped
20:23 psch especially considering there's network latency involved
20:23 timotimo cool. by how much? :)
20:23 johnP now it takes 3 sec
20:24 AlexDaniel that's not too bad :)
20:24 johnP so quite a lot
20:24 timotimo how big are those numbers usually?
20:24 timotimo there's 10k of them, right?
20:24 timotimo are they only integers? or would they pass as rational numbers perhaps?
20:25 AlexDaniel johnP: hm, could you provide the file itself too? So that I can play with it
20:25 timotimo it's probably also a whole lot faster to say @array.join("\n")
20:25 timotimo rather than to print each one in turn
20:25 johnP sure
20:25 Hotkeys I was thinking that
20:25 Hotkeys wasn't sure though
20:25 johnP this is the link for my perl5 similar script http://hostcode.sourceforge.net/view/5107
20:26 AlexDaniel I didn't know that sourceforge has it's own snippet thingy
20:26 AlexDaniel maybe I should add it to camelia too… except that I don't really want to support sourceforge in any way now
20:26 RabidGravy they had to counter github somehow
20:26 Hotkeys I didn't know people still used sourceforge ;p
20:27 RabidGravy I don't think I can even remember my sourceforge login
20:27 johnP AlexDaniel http://hostcode.sourceforge.net/view/5108
20:27 AlexDaniel Hotkeys: they do, in fact they usually refuse to move elsewhere when you suggest that
20:27 timotimo why would we add sourceforge pasting, but not, for example, sprunge?
20:27 AlexDaniel timotimo: which sprunge?
20:27 timotimo the sprunge
20:27 AlexDaniel timotimo: camelia already supports github gists, bitbucket snippets and gitlab snipeets
20:28 timotimo oh, i didn't knw that
20:28 AlexDaniel oops, snippets
20:28 AlexDaniel I can add sprunge too, if you think that it is commonly used
20:28 timotimo i like sprunge
20:28 psch well there's data to check for the most used pastebins in the clog...
20:28 timotimo good point
20:29 AlexDaniel psch: if you make a list then I'll implement all of them
20:29 RabidGravy I'd like github gist a lot more if the pasting was a lot easier
20:29 Hotkeys '(slurp $path~'\5108.txt').lines.sort.join("\n").say; say now - INIT now' gave me half a second
20:29 Hotkeys but that might just be hardware differences
20:30 timotimo Hotkeys: you forgot to intify
20:30 Hotkeys oh wait
20:30 Hotkeys yeah
20:30 johnP will try
20:30 timotimo that only works by accident because the numbers are same-length
20:30 timotimo oh, they are not, though
20:30 psch AlexDaniel: ...not sure i'm actually up to that :)  considering there's checking all the urls involved...
20:30 hankache johnP print_array(sort_file(readfile())); can be replaced with sort_file(readfile())>>.say;
20:31 timotimo hankache: no, >> messes up your ordering
20:31 hankache timotimo hyper is still broken?
20:31 Hotkeys with the proper sorting it gave me about a second
20:31 Hotkeys but
20:31 timotimo hankache: no
20:32 timotimo hankache: it's by design. though the mess-up-order-intentionally code has been removed some months ago
20:32 Hotkeys looks ordered to me
20:32 timotimo do not rely on ordering of what hyperoperators do
20:32 hankache but hyper should preserve order
20:32 Hotkeys fair
20:32 Hotkeys no
20:32 johnP perl5 version is faster than python on my machine is:  real0m0.028s
20:32 timotimo hankache: order, but not order of execution. which is what you get when you .say
20:32 Hotkeys hyper preserves the order eventually
20:32 timotimo i mean, when you >>.say
20:32 Hotkeys but not e- yeah
20:33 Hotkeys I also did (+«(slurp $path~'\5108.txt').lines).sort.join("\n").say for fun
20:33 Hotkeys which also did about a second
20:33 hankache timotimo ok
20:34 timotimo my profile shows 55% time spent in readfile, 29% in sort_file and 15% time spent in print_array
20:35 timotimo i'm not sure why, but 10% overall is spent inside a Bool method
20:35 lizmat which one?
20:36 timotimo line 914
20:36 timotimo that's probably Mu?
20:36 timotimo yeah, it looks like it's the proto method Bool
20:37 lizmat indeed
20:37 lizmat perhaps it would help to change the signature from (|) to () ?
20:37 johnP Hotkeys could u show me the snippet you used?
20:38 Hotkeys (slurp $path~'\5108.txt').lines.s​ort({+$^a}).join("\n").say
20:38 Hotkeys $path being the folder I had it in
20:38 timotimo right, we're not really expecting to pass any arguments at all there
20:39 timotimo i also see find_best_dispatchee is at it again ... inside method Numeric
20:41 timotimo in hotkeys' snippet i also get find_best_dispatchee in the routine list ... 2nd place by exclusive time :|
20:42 timotimo and actually method Bool is creating a gigantic amount of CallCapture objects
20:42 psch ("1\n2\n3\n4").lines>>.&[+].sort.join("\n").say # explicit numifying instead of letting sort do it
20:43 psch probably won't do much for perf though
20:43 timotimo even though the garbage collection time is only about 10%, it'd probably be worth to make Bool not allocate so much
20:43 psch well, and neither for clarity
20:43 johnP with Hotkeys code I get 2 secs
20:43 psch although i suspect you could replace the method-call-prefix:<+> with .Int hah
20:43 timotimo psch: i don't expect >>. to give very good performance as opposed to .map(+*) for example
20:43 psch timotimo: oh, yeah, of course not
20:44 timotimo also, i expect using .Int is probably more direct than prefix:<+> or even infix:<+>
20:44 psch timotimo: i was just thinking about the closure to sort...
20:44 psch timotimo: in any case, if anything of that sort .map is probably the better call
20:44 * psch doesn't often think in term of performance
20:44 psch mostly clarity, brevity or fanciness :)
20:47 zakharyas joined #perl6
20:47 timotimo johnP: tell us again, how fast is perl5 for this task?
20:47 cdg joined #perl6
20:47 RabidGravy I tend to think ahead too much when I am writing code so continuously refactoring for things that I haven't yet started implementing
20:48 RabidGravy then clarity
20:48 johnP on my machine with the code I posted for perl5 real0m0.027s
20:48 timotimo yikes, that's still quite a bit faster
20:48 RabidGravy and I only care about performance if it isn't fast enough to actually work
20:49 johnP considering my perl is not very efficient..
20:49 timotimo i would have suggested trying to write the same task in nqp, but we don't expose p6sort to nqp at all
20:49 psch nqp-m: nqp::sort(1,2,3)
20:49 camelia nqp-moarvm: OUTPUT«No registered operation handler for 'sort'␤   at gen/moar/stage2/QAST.nqp:1584  (/home/camelia/rakudo-m-inst-2/share​/nqp/lib/QAST.moarvm:compile_op:64)␤ from gen/moar/stage2/QAST.nqp:5797  (/home/camelia/rakudo-m-inst-2/share/​nqp/lib/QAST.moarvm:compile_node:2…»
20:49 psch mhm, we don't have sort at that level do we?
20:49 timotimo that's what i just said :)
20:49 psch just write mvm bytecode manually..? :P
20:50 johnP do you think perl6 will be faster in the near future?
20:50 timotimo psch: why would you ever do that? :)
20:50 perlpilot johnP: I know it will be faster  (just not at everything)
20:50 timotimo johnP: yeah, we're working on performance in 2016
20:50 timotimo we didn't do much performance work yet
20:50 psch timotimo: honestly, i think nobody would, ever.  i'm pretty sure it's a terrible idea :)
20:51 johnP so are you guys the actual developers of perl6?
20:51 timotimo no, we've done so in the past for tests while we were building moarvm
20:51 timotimo well, i'm not part of that effort, i came in way late
20:51 timotimo but also, brrt wrote mvm bytecode through nqp code in the early stages of the jit, i think
20:52 psch johnP: i for one am somewhat of an occassional contributor.  timotimo is quite a bit more involved, especially with the prefered underlying vm, which is moarvm
20:52 timotimo johnP: the barrier of entry to perl6 core development isn't very high, as a big portion of rakudo is written in perl6 and the rest is written in nqp, which is "not quite perl6"
20:52 perlpilot timotimo: But when you need a low level sort op ....   ;)
20:53 AlexDaniel johnP: most people here do some kind of contributions :)
20:53 johnP I'm kinda flattered :-)
20:53 RabidGravy except me I just heckle from the sidelines
20:53 timotimo https://github.com/rakudo/rakudo/blo​b/nom/src/vm/moar/Perl6/Ops.nqp#L284  -  this is our implementation of p6sort. it's not that low level.
20:53 AlexDaniel well, maybe TimToady should say hi ;)
20:53 johnP thanks for the help anyway
20:53 perlpilot johnP: #p6dev is where the development discussion happens these days.  We try to keep #perl6 for the users.
20:54 timotimo i think those for loops, the one at the beginning and the one at the end, really could be turned into a postfix-while without curly braces for a measurable benefit
20:55 TEttinger joined #perl6
20:55 nadim joined #perl6
20:58 nadim joined #perl6
20:59 perlpilot I wonder how optimized p6sort becomes in real code
20:59 timotimo not at all. it's called rather than inlined
20:59 timotimo i think especially the invocation of "comparator" over and over can cost us a lot of potential performance when all we're doing is compare int objects, for example
20:59 virtualsue joined #perl6
20:59 perlpilot yep
20:59 AlexDaniel Hotkeys: you did not apply suggested changes, didn't you? :)
20:59 vendethiel joined #perl6
21:00 itaipu joined #perl6
21:00 timotimo it's feasible to build another op that specializes on having only Int objects
21:01 timotimo well, we're doing more than one pass over the data anyway. we can do analysis in the first pass
21:01 timotimo if for example it turns out that every object in there is an Int, we can enter a different implementation that uses nqp::islt_I instead of a comparator
21:01 timotimo (though of course only if "the default" comparator is used, which has to be flagged to the op somehow)
21:02 timotimo in general, please consider p6sort and the sort methods and subs completely re-writable as far as i'm concerned
21:02 timotimo as long as the API stays the same
21:02 timotimo perlpilot: do you want to tackle that project? :)
21:02 psch hm
21:03 perlpilot My problem with hacking on P6 continues to be finding time. :(
21:04 psch wouldn't we also want a Str-specialized p6sort case?
21:05 psch as in, we have two steps: (1) default comparator? if yes (2) consistent typing which a low-level comparison op exists for?
21:06 psch nqp-m: say(nqp::islt("foo", "fop"))
21:06 camelia nqp-moarvm: OUTPUT«No registered operation handler for 'islt'␤   at gen/moar/stage2/QAST.nqp:1584  (/home/camelia/rakudo-m-inst-2/share​/nqp/lib/QAST.moarvm:compile_op:64)␤ from gen/moar/stage2/QAST.nqp:5797  (/home/camelia/rakudo-m-inst-2/share/​nqp/lib/QAST.moarvm:compile_node:2…»
21:06 psch ...huh
21:06 psch there *is* islt in ops.markdown vOv
21:06 psch ah but i confused those >_>
21:07 psch so nevermind
21:07 psch 'cause we do not actually have lowlevel relative str comparison
21:07 * psch stops monologuing
21:08 johnP is parrot VM still in use for perl? or everything has been moved to moar?
21:09 perlpilot no, parrot isn't used
21:11 adu joined #perl6
21:12 mst johnP: parrot was a dead end half a decade ago
21:12 AlexDaniel is it even alive?
21:12 mst johnP: it has now been excised entirely
21:12 AlexDaniel :)
21:12 mst AlexDaniel: I think every so often somebody nails it back to the perch and cuts a release, but I can't say I've cared enough to check in quite some time
21:13 lizmat the last release was pre-Christmas, afaik
21:14 johnP ok I'm gonna go.. pleased to have met you guys. Thanks a lot for the help.
21:15 perlpilot I think I still get email from the parrot mailing list, but the only thing I remember seeing lately is the monthly reminder
21:15 AlexDaniel .oO( monthly reminder? “this project is still dead. Thanks for reading this email” )
21:16 lizmat http://rakudo.org is dead for me
21:16 lizmat argh
21:16 lizmat I meant: http://parrot.org
21:16 zakharyas joined #perl6
21:17 mst lizmat: whereas in my case it's more s/for/to/ :D
21:18 perlpilot just checked ... the only parrot email I have since 2014 is from Parrot Raiser on the Perl6 mailing list.
21:22 pochi joined #perl6
21:23 timotimo psch: excuse me, we don't have string comparison in our nqp ops?
21:23 CQ2 joined #perl6
21:23 lizmat iseq_s
21:24 timotimo oh, we were talking about sorting and such
21:24 timotimo so we'd want gt, lt, and friends
21:24 psch timotimo: right, *relative* string comparison
21:24 clkao_ joined #perl6
21:25 lizmat m: use nqp; my int $a = 1; my int $b = 2; dd nqp::cmp_i($a,$b)
21:25 camelia rakudo-moar 57df3d: OUTPUT«-1␤»
21:25 psch we have cmp_s
21:25 timotimo we also have isgt_s
21:25 dsp-_ joined #perl6
21:25 psch huh
21:25 psch i didn't see them in the list on top, my bad
21:25 psch i guess in that case the approach could still work
21:25 btyler joined #perl6
21:25 eyck_ joined #perl6
21:25 mst joined #perl6
21:25 au joined #perl6
21:25 krakan joined #perl6
21:25 pmurias joined #perl6
21:26 timotimo see also Str.pm
21:26 cfloare joined #perl6
21:26 psch yeah i was looking at ops.markdown but didn't see them
21:26 Amnez777 joined #perl6
21:26 diakopter joined #perl6
21:26 psch i'll confidently blame it on the time and day :)
21:27 ssm joined #perl6
21:28 [ptc] joined #perl6
21:29 Fleurety joined #perl6
21:29 ribasushi joined #perl6
21:32 vendethiel o/, #perl6 :)
21:33 atta joined #perl6
21:35 timotimo yo vendethiel, how are you today?
21:36 vendethiel tired. students going very crazy. how about you?
21:36 hankache joined #perl6
21:36 timotimo also tired
21:37 timotimo i went to bed early-ish last night and thought that'd be an excellent thing to do to have a good day
21:37 timotimo instead of having a good day i woke up super early and couldn't get back to sleep ... and later i napped which didn't help at all, of course >_>
21:37 timotimo but now i'm going to be served dinner, and that'll make things better
21:38 vendethiel seems like a plan :-)
21:38 timotimo you're still leading that computer lab thingie?
21:38 pierrot joined #perl6
21:39 vendethiel not even. they're just overstepping their bounds as students...
21:39 psch that sounds controversial :S
21:39 espadrine_ joined #perl6
21:40 pierrot_ joined #perl6
21:41 psch google shows the daily mail reporting about demonstrations in reaction to a government announcement
21:41 psch there's probably better news sources... :)
21:41 sortiz joined #perl6
21:46 vendethiel psch: yeah, very much
21:48 psch i don't think i have enough information for... anything really.  the article i found talks about something that the govt wants to sell as "reduces unemployment", but the student apparently disagree..?
21:48 psch s/ent/ents/
21:48 timotimo i don't understand what you're talking about, tbh
21:49 timotimo BBIAB food
21:50 pmurias joined #perl6
21:53 nadim joined #perl6
21:55 psch timotimo: oh, well, vendethiel is french, an googling "student protest france" showed that mentioned article, which talks about some govt measure to decrease unemployment...
21:55 psch ...at least i'm fairly sure vendethiel is, in fact, french :)
21:55 vendethiel no, that's very much outside of what i'm talking about.
21:55 psch ah, so something local
21:55 psch ?
21:55 vendethiel it is correct that I'm french, which you deduce from my wonky english :P.
21:56 psch no, i actually remember you stating you're french a few months ago
21:56 vendethiel psch: something personal, not really keen about talking more -- sorry :)
21:56 psch oh, no worries, i don't even intent to pry.  i was just curious
21:57 vendethiel it's okay. yeah, it's all kind of worrying what's happening about work laws and other things around here, though...
21:57 psch fwiw, the first association in my mind was to our (that is, the german) ALGII
21:58 psch which can be argued as well-intended, but mostly turns out as a means of hiding unemployment instead of finding jobs for people outside of employment
21:58 psch ...but that's probably because i'm affect, so assume the appropriate amount of bias :)
22:00 nadim joined #perl6
22:14 Skarsnik m: module A {our $foo is export := "42"}; import A; say $foo;
22:14 camelia rakudo-moar 24b4b2: OUTPUT«(Any)␤»
22:14 Skarsnik Is that a bug?
22:15 psch Skarsnik: looks like binding interfers there
22:16 psch m: module A { our $foo is export = "42" }; import A; say $foo # as this works
22:16 camelia rakudo-moar 24b4b2: OUTPUT«42␤»
22:16 psch m: my $x is DEPRECATED := 42; $x
22:16 camelia rakudo-moar 24b4b2: OUTPUT«5===SORRY!5=== Error while compiling /tmp/hYq6HfSz5_␤Can't use unknown trait 'is DEPRECATED' in a variable declaration.␤at /tmp/hYq6HfSz5_:1␤------> 3my $x is DEPRECATED7⏏5 := 42; $x␤    expecting any of:␤        TypeObject␤        de…»
22:16 psch hrm
22:16 Skarsnik my real usage was export var that were binding to cglobal()
22:17 lizmat psch: I don't think DEPRECATED ever worked on variables
22:17 psch lizmat: yeah, i think so too
22:17 lizmat not sure how it could actually report on its usage, like it does on subs/methods
22:18 psch lizmat: no, yeah, i agree, it was a misguided attempt :)
22:18 psch m: class A { has $.x is rw := "foo" }; # this seems more related, fwiw
22:18 camelia rakudo-moar 24b4b2: OUTPUT«5===SORRY!5=== Error while compiling /tmp/V7TBiHsskV␤Cannot use := to initialize an attribute␤at /tmp/V7TBiHsskV:1␤------> 3class A { has $.x is rw := "foo" 7⏏5}; # this seems more related, fwiw␤»
22:18 psch ...i'm not sure though vOv
22:19 psch eh, disregard all of that, i'll poke more and speak up again if i discover anything actually useful :)
22:29 skids joined #perl6
22:35 raiph joined #perl6
22:37 musiKk_ joined #perl6
22:50 saaki more simple version of this? (1...^10).grep: {$_ %% 2 or $_ %% 3}
22:52 colomon joined #perl6
23:00 psch m: say (1...^10).grep: * %% (2|3) # not sure where if "more syntax" means "more simple" vOv
23:00 camelia rakudo-moar 24b4b2: OUTPUT«(2 3 4 6 8 9)␤»
23:00 psch saaki: ^^^
23:02 psch semantically there's a tiny difference, as well.  infix:<|> is an any-Junction, whereas the or in the original short-circuits
23:02 RabidGravy or, y'know just "say <2 3 4 6 8 9>"
23:03 lucasb joined #perl6
23:03 RabidGravy same output so it's gotta be right yeah?
23:03 RabidGravy ;-)
23:03 lucasb hello o/
23:04 lucasb m: class C { method defined { True } }; say ?C
23:04 camelia rakudo-moar 24b4b2: OUTPUT«False␤»
23:04 lucasb star: class C { method defined { True } }; say ?C
23:04 camelia star-m 2016.01: OUTPUT«True␤»
23:04 lucasb ^^ is this a valid change for 6.c?
23:05 psch star-m: class C { method Bool { False } }; say ?C
23:05 camelia star-m 2016.01: OUTPUT«False␤»
23:05 psch star-m: class C { method Bool { True } }; say ?C
23:05 camelia star-m 2016.01: OUTPUT«True␤»
23:05 psch m: class C { method Bool { False } }; say ?C
23:05 camelia rakudo-moar 24b4b2: OUTPUT«False␤»
23:06 psch m: class C { method Bool { True } }; say ?C
23:06 camelia rakudo-moar 24b4b2: OUTPUT«True␤»
23:06 psch interesting
23:06 psch afaik, prefix:<?> never should ask .defined
23:06 psch 'cause it's the prefix-op equivalent of .Bool
23:07 timotimo it asks Bool, which by default asks .defined
23:07 psch oh
23:07 psch so .Bool defaults to .defined, that makes sense
23:07 timotimo that's what lucasb observed, that the change in Mu's defined will make things perhaps change?
23:07 psch i mean, the results do
23:10 lizmat well, it wasn't picked up by the test suite
23:10 psch right, that was my other thought
23:10 timotimo right
23:10 lizmat but yes, if you add a .defined method to your class
23:11 timotimo you're playing with fire ;)
23:11 lizmat you probably should also make your own .Bool
23:13 lucasb yeah, I never defined any 'defined' or Bool methods for my classes. I just noticed this recent commit and decided to try some snippet. Because I remember Failure handled their Bool/defined methods differently. But I'm ok with it, if it makes things faster. :)
23:14 lizmat my commit didn't change that: you can still do whatever you want with your own .Bool and .defined
23:14 lizmat it's just that if you do define your own, you probably want to do both
23:15 lucasb ok, understood. thanks
23:23 wamba joined #perl6
23:24 lucasb the specs briefly mentions the relationship between Bool and .defined for the Mu class, but I guess it can be updated.
23:24 lucasb S02:4660
23:24 synopsebot6 Link: http://design.perl6.org/S02.html#line_4660
23:26 lucasb anyway, I'm waiting for the release this weekend. thanks for your work, everybody! good night
23:27 lizmat hmmm... that seals the fate of that commit, I guess  :-(
23:29 sufrostico joined #perl6
23:47 BenGoldberg joined #perl6
23:49 timotimo brr. i totes broke the profiler's routine view >_>
23:51 RabidGravy tut
23:56 nadim joined #perl6

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

Perl 6 | Reference Documentation | Rakudo