Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-05-11

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:01 pierre_ joined #perl6
00:02 skink Alright, time to guess what's terrible wrong
00:03 skink my Pointer $hProv .= new;
00:03 skink my $ctx_ret = CryptAcquireContextA(&$hProv ...
00:03 * skink wonders if CryptAcquireContextA(Pointer[Pointer]...) is also wrong
00:05 yqt joined #perl6
00:06 geraud TimToady: for some value of "NC"
00:07 sjohnson joined #perl6
00:10 sortiz skink, use: "class HCP is repr('CPointer') { };" and then "CryptAccquireContextA(HCP is rw,…)", and call with "my HCP $h .= new; …($h,…)"
00:16 kid51 joined #perl6
00:16 sortiz That way you have a typed pointer that can be safely in other calls with for the same type, and as a Handler you even can define methods for it in the class. Ie that sub can be the constructor in the class.
00:17 BenGoldberg joined #perl6
00:19 itaipu joined #perl6
00:22 cognominal joined #perl6
00:23 hotel just saw an ad with what I assume was a failed XSS attack in it lol
00:23 hotel something like print '<scri' + 'pt>'
00:24 skink Thanks sortiz. I was both trying to figure out the custom type and wondering about is rw instead of the other pointer previously
00:24 skink That combines the two
00:24 skink sortiz++
00:25 kurahaupo joined #perl6
00:28 kurahaupo joined #perl6
00:31 Bot1 joined #perl6
00:32 Bot1 Sup
00:32 sortiz skink, Take that with a grain of salt, some years have passed since the last time I wrote for Windows. And I don't have my Windows at hand :-)
00:34 skink Oh my god what.
00:34 skink All tests successful.
00:34 skink It's a miracle!
00:34 timotimo cool
00:35 pRiVi joined #perl6
00:35 sortiz nice
00:42 Bucciarati joined #perl6
00:48 Actualeyes joined #perl6
00:51 hotel what kind of project can I do in perl6? looking for ideas I guess
00:56 MadcapJake servers, text processing, nativecall bindings, lots of stuff! The only limiting factor right now is it should be something not very expensive (in terms of performance)
00:57 ugexe software for manipulating emissions is pretty hot right now
00:58 hotel did VW write that in perl 6? kek
00:58 MadcapJake ugexe: lol
00:59 MadcapJake not just VW now! Fiat and Mitsubishi too
00:59 geekosaur they should have written it in php so they;d have plausible deniability >.>
01:00 hotel oh really? hadn't heard that
01:00 ugexe i hear dracony worked for toyota and thats how that happened
01:03 hotel m: my $supply = Supplier.new.Supply; $supply.tap(-> $v { say 'this car is fuel-efficient and eco-friendly! }); $supply.emit('CO2 >> normal values') # `emissions` manipulation
01:03 camelia rakudo-moar 9c8989: OUTPUT«5===SORRY!5=== Error while compiling /tmp/HQCPRTABs5␤Two terms in a row␤at /tmp/HQCPRTABs5:1␤------> 3ent and eco-friendly! }); $supply.emit('7⏏5CO2 >> normal values') # `emissions` man␤    expecting any of:␤        infix␤        infi…»
01:04 hotel well if I had closed the quote it would have been better
01:04 MadcapJake I'm guessing they wrote it in Lua and just thought it was 0-based indices ;)
01:04 hotel m: my $supply = Supplier.new.Supply; $supply.tap(-> $v { say 'this car is fuel-efficient and eco-friendly!' }); $supply.emit('CO2 >> normal values') # `emissions` manipulation
01:04 camelia rakudo-moar 9c8989: OUTPUT«Method 'emit' not found for invocant of class 'Supply'␤  in block <unit> at /tmp/SdeW8G8GGX line 1␤␤»
01:04 skink sortiz, timotimo: Well that didn't last long :D
01:04 skink Bytecode validation error
01:04 hotel >=| you get the point
01:04 MadcapJake (funny enough Lua evolved from Sol a language designed for petroleum engineers)
01:05 hotel that's hilarious
01:05 TEttinger I thought it was a full rewrite because sol was impossible to read
01:05 BenGoldberg joined #perl6
01:06 hotel iirc lua was developed in brazil while sol was made by the us navy
01:07 MadcapJake http://www.lua.org/history.html
01:07 TEttinger ah, yeah, del was the unreadable one
01:09 Ben_Goldberg joined #perl6
01:09 hotel looks like they tried to follow the KISS design philosophy
01:09 hotel one-letter control codes are usually a good idea
01:09 dvinciguerra joined #perl6
01:10 skink Hm... Very odd. Changed some params from uint64 to uint32 for consistency and the whole thing exploded
01:10 perlawhirl joined #perl6
01:10 skink operand type 160 does not match register type 152
01:11 sortiz skink, Are you using native types in named arguments?
01:11 skink Nope
01:12 sortiz Umm, so a different bug.
01:14 skink https://github.com/skinkade/crypt-random/commit/5e08e1fbe651b82c0caca21a864ac02ae222f4eb
01:15 itaipu joined #perl6
01:21 pierre_ joined #perl6
01:21 sortiz I've seen that error but only with named args:
01:21 sortiz m: sub Foo(uint32 :$bar) { say $bar }; Foo(:bar(4));
01:21 camelia rakudo-moar 9c8989: OUTPUT«Bytecode validation error at offset 40, instruction 6:␤operand type 160 does not match register type 152␤  in block <unit> at /tmp/BXyC79IP3f line 1␤␤»
01:22 sortiz Isn't NC related, is codegen related.
01:25 skink It works with uint32 though
01:25 skink er, 64
01:26 skink m: sub Foo(uint64 $x) { say $x; }; Foo(4);
01:26 camelia rakudo-moar 9c8989: OUTPUT«4␤»
01:26 skink m: sub Foo(uint32 $x) { say $x; }; Foo(4);
01:26 camelia rakudo-moar 9c8989: OUTPUT«4␤»
01:26 skink ... Interesting
01:26 skink m: sub Foo(uint64 :$bar) { say $bar }; Foo(:bar(4));
01:26 camelia rakudo-moar 9c8989: OUTPUT«4␤»
01:27 cdg joined #perl6
01:27 skink m: sub Foo(uint32 $x = 4) { say $x; }; Foo();
01:27 camelia rakudo-moar 9c8989: OUTPUT«Bytecode validation error at offset 40, instruction 6:␤operand type 160 does not match register type 152␤  in block <unit> at /tmp/PKlFkvKzRc line 1␤␤»
01:27 hotel so uint32 is broken
01:27 skink sortiz, Not just named types, also default values
01:27 skink named params*
01:28 sortiz Ok, can you add that example to RT#127813 ?
01:28 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=127813
01:33 sortiz Yep, also for default values, and for all native types not in(int64, num64)
01:34 Su-Shee_ joined #perl6
01:34 skink m: sub Foo(int8 $x = 4) { say $x; }; Foo();
01:34 camelia rakudo-moar 9c8989: OUTPUT«Bytecode validation error at offset 40, instruction 6:␤operand type 32 does not match register type 8␤  in block <unit> at /tmp/piYiIHbdC8 line 1␤␤»
01:34 skink Wow
01:34 skink m: sub Foo(UInt32 $x = 4) { say $x; }; Foo();
01:34 camelia rakudo-moar 9c8989: OUTPUT«5===SORRY!5=== Error while compiling /tmp/bOmnaE7f8b␤Invalid typename 'UInt32' in parameter declaration. Did you mean 'uint32', 'int32'?␤at /tmp/bOmnaE7f8b:1␤------> 3sub Foo(UInt327⏏5 $x = 4) { say $x; }; Foo();␤»
01:35 hotel m: sub Foo(int32 $x = 4) { say $x; }; Foo();
01:35 camelia rakudo-moar 9c8989: OUTPUT«Bytecode validation error at offset 40, instruction 6:␤operand type 32 does not match register type 24␤  in block <unit> at /tmp/3UE92nKKsp line 1␤␤»
01:35 hotel even when signed
01:35 hotel fun
01:36 skink Right, UInt32 is in Subsets::Common
01:38 ZoffixWin joined #perl6
01:38 ZoffixWin m: loop(;;){last}
01:38 camelia rakudo-moar 9c8989: OUTPUT«5===SORRY!5=== Error while compiling /tmp/sI4M_XRt0W␤Undeclared routine:␤    loop used at line 1␤␤»
01:38 ZoffixWin LTA Error
01:39 hotel lawn tennis association?
01:39 AlexDaniel well, hm
01:39 AlexDaniel m: loop(;;) {last}
01:39 camelia rakudo-moar 9c8989: OUTPUT«5===SORRY!5===␤Word 'loop' interpreted as 'loop()' function call; please use whitespace around the parens␤at /tmp/R5D0VS0mht:1␤------> 3loop7⏏5(;;) {last}␤Unexpected block in infix position (two terms in a row)␤at /tmp/R5D0VS0mht:1␤--…»
01:40 ZoffixWin hm
01:40 ZoffixWin Screw it then.
01:40 hotel but really, lighter than air?
01:41 AlexDaniel so the error message is quite good, but it is not printed when you omit space *after* parens
01:41 jjido joined #perl6
01:41 ZoffixWin huggable, LTA
01:41 huggable ZoffixWin, Less Than Awesome
01:41 hotel oh
01:41 hotel right
01:41 * hotel knew that :\
01:41 ZoffixWin huggable, TTIAR
01:41 huggable ZoffixWin, nothing found
01:41 ZoffixWin huggable, TTIAR :is: Two Terms In A Row
01:41 hotel huggable, PEBCAK
01:41 huggable ZoffixWin, Added TTIAR as Two Terms In A Row
01:41 huggable hotel, nothing found
01:42 AlexDaniel ZoffixWin: well, at least it is not this
01:46 AlexDaniel m: sub Foo(uint32 $x = 4) { }; Foo
01:46 camelia rakudo-moar 9c8989: OUTPUT«Bytecode validation error at offset 40, instruction 6:␤operand type 160 does not match register type 152␤  in block <unit> at /tmp/uBp7pf9zfb line 1␤␤»
01:46 hotel lol
01:46 ZoffixWin :o
01:46 AlexDaniel skink: will you submit a bug report?
01:46 hotel there was already a ticket opened, wasn't there?
01:46 AlexDaniel ah, there's already one
01:46 AlexDaniel ok, missed it
01:46 wbill_ joined #perl6
01:47 ilbot3 joined #perl6
01:47 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
01:47 AlexDaniel how can I declare @x:delete? :)
01:47 AlexDaniel oh
01:47 AlexDaniel m: my @x:delete = 42; say @x:delete
01:47 camelia rakudo-moar 9c8989: OUTPUT«[42]␤»
01:48 AlexDaniel since when colons are allowed
01:48 hotel m: my $: = 'colon'; say $:
01:48 camelia rakudo-moar 9c8989: OUTPUT«5===SORRY!5=== Error while compiling /tmp/7AlCZQ90De␤Unsupported use of $: variable; in Perl 6 please use Form module␤at /tmp/7AlCZQ90De:1␤------> 3my $:7⏏5 = 'colon'; say $:␤»
01:48 AlexDaniel m: my $hello:world = 42; say $hello:world
01:48 camelia rakudo-moar 9c8989: OUTPUT«42␤»
01:49 hotel I guess it's like hyphens
01:49 cognominal joined #perl6
01:50 ZoffixWin wtf
01:51 ZoffixWin m: my $hello::world = 42; say $hello::world
01:51 camelia rakudo-moar 9c8989: OUTPUT«42␤»
01:51 hotel welp
01:51 ZoffixWin m: my $h::::e:l:l:o::wo:r:l:d = 42; say $h::::e:l:l:o::wo:r:l:d
01:51 camelia rakudo-moar 9c8989: OUTPUT«5===SORRY!5=== Error while compiling /tmp/H5Z3GXtqUl␤Name component may not be null␤at /tmp/H5Z3GXtqUl:1␤------> 3my $h::7⏏5::e:l:l:o::wo:r:l:d = 42; say $h::::e:l:␤»
01:51 ZoffixWin m: my $h::x::e:l:l:o::wo:r:l:d = 42; say $h::::e:l:l:o::wo:r:l:d
01:51 camelia rakudo-moar 9c8989: OUTPUT«5===SORRY!5=== Error while compiling /tmp/c9sN87qKIA␤Confused␤at /tmp/c9sN87qKIA:1␤------> 3my $h::x::e:l:l:o:7⏏5:wo:r:l:d = 42; say $h::::e:l:l:o::wo:r:␤    expecting any of:␤        colon pair␤»
01:52 ZoffixWin m: my $h::x::e:l:l:o::wo:r:l:d = 42; say $h::x::e:l:l:o::wo:r:l:d
01:52 camelia rakudo-moar 9c8989: OUTPUT«5===SORRY!5=== Error while compiling /tmp/X4M_SBZjGH␤Confused␤at /tmp/X4M_SBZjGH:1␤------> 3my $h::x::e:l:l:o:7⏏5:wo:r:l:d = 42; say $h::x::e:l:l:o::wo:r␤    expecting any of:␤        colon pair␤»
01:52 hotel m: my $kebab--case = 'help I\'m dying'; say $kebab--case
01:52 camelia rakudo-moar 9c8989: OUTPUT«5===SORRY!5=== Error while compiling /tmp/uSYPBbtXtE␤Two terms in a row␤at /tmp/uSYPBbtXtE:1␤------> 3my $kebab--7⏏5case = 'help I\'m dying'; say $kebab--ca␤    expecting any of:␤        infix␤        infix stopper␤        statement…»
01:52 AlexDaniel m: my $_-_'_:_ = 42; say $_-_'_:_
01:52 camelia rakudo-moar 9c8989: OUTPUT«42␤»
01:52 ZoffixWin Feels like a bug with the thing that decides namespaced vars
01:53 ZoffixWin m: my \Δ_-_'_:_ = 42; say Δ_-_'_:_
01:53 camelia rakudo-moar 9c8989: OUTPUT«5===SORRY!5=== Error while compiling /tmp/YthMv1GQ70␤Variable '&Δ_-_'_:_' is not declared␤at /tmp/YthMv1GQ70:1␤------> 3my \Δ_-_'_:_ = 42; say 7⏏5Δ_-_'_:_␤»
01:53 ZoffixWin m: my \Δ_-_'__ = 42; say Δ_-_'__
01:53 camelia rakudo-moar 9c8989: OUTPUT«42␤»
01:53 hotel m: my $x-::-y = 'but' say $x-::-y
01:53 camelia rakudo-moar 9c8989: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Fpe8haOoHS␤Unsupported use of y///; in Perl 6 please use tr///␤at /tmp/Fpe8haOoHS:1␤------> 3my $x-::-y7⏏5 = 'but' say $x-::-y␤»
01:53 hotel wat
01:53 ZoffixWin m: my %Δ_-_'_:_ = 42; say %Δ_-_'_:_
01:53 camelia rakudo-moar 9c8989: OUTPUT«Odd number of elements found where hash initializer expected␤  in block <unit> at /tmp/i29BbOTCJw line 1␤␤»
01:53 ZoffixWin m: my %Δ_-_'_:_ = 42 => 'meow'; say %Δ_-_'_:_
01:53 camelia rakudo-moar 9c8989: OUTPUT«{42 => meow}␤»
01:53 hotel life is just crazy
01:54 AlexDaniel hah, look at this
01:54 AlexDaniel m: my $_-_'_::_ = 42; say $_-_'_::_
01:54 camelia rakudo-moar 9c8989: OUTPUT«42␤»
01:54 AlexDaniel but
01:54 AlexDaniel m: my $_-_'_:::_ = 42; say $_-_'_:::_
01:54 camelia rakudo-moar 9c8989: OUTPUT«5===SORRY!5=== Error while compiling /tmp/GEbksP4vIs␤Variable '$_-_'_:_' is not declared. Did you mean '$_-_'_:::_'?␤at /tmp/GEbksP4vIs:1␤------> 3my $_-_'_:::_ = 42; say 7⏏5$_-_'_:::_␤»
01:55 ZoffixWin Something is off :)
01:55 AlexDaniel : not declared, use :::… well, that's what I am doing!
01:55 hotel lmao
01:55 AlexDaniel by the way, related discussion here: https://github.com/perl6/specs/issues/106
01:55 ZoffixWin File that as LTA Error for the luls :P
01:56 cbk joined #perl6
01:57 AlexDaniel indeed
01:57 hotel class help { my $method = method (|args) { 42 }; $?CLASS.^addmethod(' ', $method); }; say help.new" "()
01:57 hotel m: class help { my $method = method (|args) { 42 }; $?CLASS.^addmethod(' ', $method); }; say help.new" "()
01:57 camelia rakudo-moar 9c8989: OUTPUT«5===SORRY!5=== Error while compiling /tmp/SmkhdIMv8l␤Two terms in a row␤at /tmp/SmkhdIMv8l:1␤------> 3addmethod(' ', $method); }; say help.new7⏏5" "()␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤     …»
01:57 skink You can just a space as a method name? O_O
01:57 skink just use*
01:58 hotel according to that discussion
01:58 hotel *.*
01:59 geekosaur you can. but not like that
01:59 * hotel thought he was copying the example given
02:00 geekosaur given where?
02:00 geekosaur because `help.new" "()` looks rather wrong to me
02:00 hotel <AlexDaniel> by the way, related discussion here: https://github.com/perl6/specs/issues/106
02:00 geekosaur I recall stuff like that needing some kind of ::()
02:01 hotel oh I forgot the .
02:01 hotel m: class help { my $method = method (|args) { 42 }; $?CLASS.^addmethod(' ', $method); }; say help.new." "()
02:01 camelia rakudo-moar 9c8989: OUTPUT«Method 'addmethod' not found for invocant of class 'Perl6::Metamodel::ClassHOW'␤  in block <unit> at /tmp/h3aF_YPBgj line 1␤␤»
02:01 geekosaur oh
02:01 geekosaur right, that makes more sense
02:01 ZoffixWin m: my $foo = class {}.new; $foo.^add_method(' ', {say "Weee";}); $foo." "()
02:01 camelia rakudo-moar 9c8989: OUTPUT«Weee␤»
02:01 hotel m: class help { my $method = method (|args) { 42 }; $?CLASS.^add_method(' ', $method); }; say help.new." "()
02:01 camelia rakudo-moar 9c8989: OUTPUT«42␤»
02:01 hotel yeah also would help if I used the right method call
02:03 ZoffixWin m: class {$?CLASS.^add_method(' ', {say "Weee";})}." "()
02:03 camelia rakudo-moar 9c8989: OUTPUT«Weee␤»
02:03 ZoffixWin neat
02:03 ZoffixWin m: class {$?CLASS.^add_method('', {say "Weee";})}.""()
02:03 camelia rakudo-moar 9c8989: OUTPUT«Weee␤»
02:03 hotel super anonymous many wow
02:03 ZoffixWin :o
02:03 ZoffixWin Empty method name! That's perverse.
02:03 skink Alright, I added a subset of Int to get around the uint32 thing. Crypt::Random now works again, using the actual and proper Windows Crypt API
02:03 hotel good for golf I guess
02:04 AlexDaniel ZoffixWin: RT #128120
02:04 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=128120
02:05 ZoffixWin heh
02:05 ZoffixWin AlexDaniel++
02:05 ZoffixWin my $foo:::_ = 42; say $foo:::_
02:05 ZoffixWin m: my $foo:::_ = 42; say $foo:::_
02:05 camelia rakudo-moar 9c8989: OUTPUT«5===SORRY!5=== Error while compiling /tmp/WVtvbaBWf0␤Variable '$foo:_' is not declared␤at /tmp/WVtvbaBWf0:1␤------> 3my $foo:::_ = 42; say 7⏏5$foo:::_␤»
02:06 ZoffixWin m: my $foo_:::_ = 42; say $foo_:::_
02:06 camelia rakudo-moar 9c8989: OUTPUT«5===SORRY!5=== Error while compiling /tmp/uc8idlJOMT␤Variable '$foo_:_' is not declared. Did you mean '$foo_:::_'?␤at /tmp/uc8idlJOMT:1␤------> 3my $foo_:::_ = 42; say 7⏏5$foo_:::_␤»
02:06 hotel it's like escaping one of the colons
02:06 ZoffixWin AlexDaniel, the "code" in your RT is off :) Though, if corrected, the error is same
02:06 AlexDaniel ah fuck
02:07 hotel more like it's a different result?
02:07 hotel kek
02:07 ZoffixWin I'll comment, 'cause I have something to add.
02:07 AlexDaniel m: my $foo_:::_ = 42; say $foo_:::_
02:07 camelia rakudo-moar 9c8989: OUTPUT«5===SORRY!5=== Error while compiling /tmp/xn360F0bKe␤Variable '$foo_:_' is not declared. Did you mean '$foo_:::_'?␤at /tmp/xn360F0bKe:1␤------> 3my $foo_:::_ = 42; say 7⏏5$foo_:::_␤»
02:08 AlexDaniel and there is no way to edit your bug report!
02:08 * geekosaur wonders how that ::: is parsed
02:09 hotel maybe it thinks there's a namespace called :_
02:09 molaf joined #perl6
02:09 hotel rather, a namespace called foo_ with a method called :_**
02:09 geekosaur single colon has to do with things like term:foo
02:10 kid511 joined #perl6
02:10 AlexDaniel m: my $foo_:_ = 42; say $foo_:::_
02:10 camelia rakudo-moar 9c8989: OUTPUT«42␤»
02:10 AlexDaniel that's how it is parsed. I HAVE NO IDEA
02:10 noganex joined #perl6
02:10 hotel lol wtf
02:10 geekosaur m: my $foo_:_ = 42; say $foo_:_
02:10 camelia rakudo-moar 9c8989: OUTPUT«42␤»
02:11 ZoffixWin AlexDaniel, yeah, that's why I hate RT.
02:11 geekosaur right, so : is doing whatever and then ::_ is being the same as _?
02:11 geekosaur but I have not tried to figure out the grammar for that single colon
02:11 BenGoldberg m: my $foo:_ = 42; say $foo::_;
02:11 camelia rakudo-moar 9c8989: OUTPUT«(Any)␤»
02:12 AlexDaniel m: my $foo:_ = 42; say $foo::::::::_
02:12 camelia rakudo-moar 9c8989: OUTPUT«5===SORRY!5=== Error while compiling /tmp/CoLHwp3udq␤Name component may not be null␤at /tmp/CoLHwp3udq:1␤------> 3my $foo:_ = 42; say $foo::7⏏5::::::_␤»
02:12 AlexDaniel ok, three is a magic number
02:12 geekosaur also, hm, LTM implies it should parse as :: : not : ::
02:12 geekosaur (or does it?)
02:13 Ben_Goldberg joined #perl6
02:13 AlexDaniel ZoffixWin: it was a funny bug report. Until I noticed that there's a typo :(((
02:14 ZoffixWin AlexDaniel, I now wish I've read the WHOLE discussion you linked to. I missed the mention of ':', so now I feel like an idiot
02:14 ZoffixWin Still, variables aren't methods. And we still have discrepancy between \foo:bar and $foo:bar
02:15 zakharyas joined #perl6
02:16 BenGoldberg joined #perl6
02:16 hotel how the heck do I leave selfservice on the rt site?
02:17 BenGoldberg Close the window?
02:17 AlexDaniel hotel: I think that in order to leave selfservice you have to write an email to the admin
02:17 hotel oh
02:17 hotel cool
02:17 AlexDaniel hotel: well, if nothing else works
02:18 AlexDaniel hotel: have you ever had a functional rt?
02:18 hotel I emailed one in I think
02:18 BenGoldberg On an unrelated note, perl6's regexes, if i recall correctly, use longest-leftmost matching when there are multiple options.
02:18 BenGoldberg So ::: should be parsed as :: :, not as : ::.  I think.
02:19 cpage_ joined #perl6
02:20 ZoffixWin [22:12:47] <geekosaur> also, hm, LTM implies it should parse as :: : not : ::
02:20 ZoffixWin :)
02:21 AlexDaniel m: my $w:t:f = 42; say $w:t:f
02:21 camelia rakudo-moar 9c8989: OUTPUT«42␤»
02:21 AlexDaniel m: my $w:t:f = 42; say $w:::t:f
02:21 camelia rakudo-moar 9c8989: OUTPUT«42␤»
02:21 AlexDaniel m: my $w:t:f = 42; say $w:t:::f
02:21 camelia rakudo-moar 9c8989: OUTPUT«5===SORRY!5=== Error while compiling /tmp/nWz20UXNgy␤Variable '$w:t' is not declared␤at /tmp/nWz20UXNgy:1␤------> 3my $w:t:f = 42; say 7⏏5$w:t:::f␤»
02:21 ZoffixWin m: say ':::' ~~ /':'|'::'/; say ':::' ~~ /':'||'::'/
02:21 camelia rakudo-moar 9c8989: OUTPUT«「::」␤「:」␤»
02:24 AlexDaniel so why ::: does not work after : ?
02:29 ZoffixWin m: say "loop(i++) in Perl 6 is {(7*60+8.954) /3.429} times slower than loop(register i++) in C"
02:29 camelia rakudo-moar 9c8989: OUTPUT«loop(i++) in Perl 6 is 125.095946 times slower than loop(register i++) in C␤»
02:29 ZoffixWin Not tooo bad
02:31 Ben_Goldberg joined #perl6
02:32 AlexDaniel m: my $x::::::::::::::::::::::::::::::::::::::::::x = 42;
02:32 camelia rakudo-moar 9c8989: OUTPUT«5===SORRY!5=== Error while compiling /tmp/LxhcyVoTBu␤Name component may not be null␤at /tmp/LxhcyVoTBu:1␤------> 3my $x::7⏏5::::::::::::::::::::::::::::::::::::::::␤»
02:33 AlexDaniel whoops!
02:33 geekosaur you have a C which still does register? (I thought gcc and clang both ignored it these days)
02:33 ZoffixWin Why would it ignore it? :/
02:34 ZoffixWin geekosaur, based on my tests, yes: 0m7.880s without register and 0m3.431s with
02:34 geekosaur because it was interfering with their own optimizations (which include moving stuff to registers if it's appropriate)
02:34 ZoffixWin gcc version 4.8.4
02:36 BenGoldberg joined #perl6
02:37 AlexDaniel ZoffixWin: is it with -O3 ?
02:41 * hotel is still looking for p6 project ideas
02:43 AlexDaniel hotel: what about this? https://github.com/perl6/perl6-most-wanted/blob/master/most-wanted/modules.md
02:43 hotel interesting, thanks
02:47 BenGoldberg joined #perl6
02:53 hotel what about for more... self-serving purposes, like becoming fluent in perl 6
02:53 ssotka joined #perl6
02:55 skink If it's just for learning, do you have older projects for translating?
02:55 hotel I have a couple half-finished things, nothing really relevant though
02:56 skink e.g. every time I explore a new language, I write a passphrase generator in it
03:05 MadcapJake hotel: https://www.reddit.com/r/learnprogramming/comments/2a9ygh/1000_beginner_programming_projects_xpost/
03:05 AlexDaniel m: say (^36¹⁵).pick.base(36)
03:05 camelia rakudo-moar 9c8989: OUTPUT«WW2890CV3FM1CUW␤»
03:05 hotel みんな、ありがとう
03:05 AlexDaniel m: say (^36¹⁵).pick.base(36)
03:05 camelia rakudo-moar 9c8989: OUTPUT«M7ODCTR7TSAN8N2␤»
03:06 MadcapJake どういたしまして
03:07 AlexDaniel m: say (^36¹⁵).pick.base(36).comb».&{(.tc, .lc).pick}.join
03:07 camelia rakudo-moar 9c8989: OUTPUT«V36s555BdTxpI3Z␤»
03:07 AlexDaniel m: say (^36¹⁵).pick.base(36).comb».&{(.tc, .lc).pick}.join
03:07 camelia rakudo-moar 9c8989: OUTPUT«hbu8BmlvsFze0Lu␤»
03:11 Actualeyes left #perl6
03:12 AlexDaniel m: my @chars = flat ‘a’..‘z’, ‘A’..‘Z’, 0..9; say [~] @chars.pick(15)
03:12 camelia rakudo-moar 9c8989: OUTPUT«e9aWbz63VmETyY1␤»
03:12 AlexDaniel m: my @chars = flat ‘a’..‘z’, ‘A’..‘Z’, 0..9; say [~] @chars.pick(15)
03:12 camelia rakudo-moar 9c8989: OUTPUT«mLEuhsZavMnqFWR␤»
03:12 grondilu m: say (^36).roll(15).base(36)
03:12 camelia rakudo-moar 9c8989: OUTPUT«Method 'base' not found for invocant of class 'Seq'␤  in block <unit> at /tmp/CeYWEMsxkL line 1␤␤»
03:12 grondilu m: say (^36).roll(15)[].base(36)
03:12 camelia rakudo-moar 9c8989: OUTPUT«Method 'base' not found for invocant of class 'Seq'␤  in block <unit> at /tmp/KwqkTXTXZt line 1␤␤»
03:12 hotel what it do
03:12 grondilu m: say (^36).roll(15).list.base(36)
03:12 camelia rakudo-moar 9c8989: OUTPUT«Method 'base' not found for invocant of class 'List'␤  in block <unit> at /tmp/5SmVObRPX7 line 1␤␤»
03:12 grondilu oh yeah
03:13 grondilu m: say (^36).roll(15)>>.base(36)
03:13 camelia rakudo-moar 9c8989: OUTPUT«(5 P H P Y 4 A K 0 2 W K 5 L Q)␤»
03:14 AlexDaniel 5 PHP
03:15 hotel it's a sign
03:17 * grondilu was wondering if it was a RC task.  There is a draft but it has annoying additional requirements.
03:17 hotel lol project 98 on this list is to make a basic lisp interpreter
03:25 mr-foobar joined #perl6
03:26 TEttinger hotel: heh, other than forth it's hard to have an easier language to implement the base of
03:27 hotel what's forth's base?
03:27 TEttinger forth can be implemented in assembly and often is, but anything really
03:28 hotel ah
03:28 hotel lisp is just lists right?
03:28 TEttinger jonesforth is a well-known assembly forth IIRC.
03:28 geekosaur yep. and forth is just stacks
03:28 TEttinger perl already basically has most of what lisp would need
03:28 frew left #perl6
03:28 TEttinger there's an existing perl 6 grammar for a lisp somewhere
03:28 TEttinger in japanese IIRC
03:29 hotel あ、よかった
03:29 MadcapJake TEttinger, hotel: my Perl 6 forth https://github.com/MadcapJake/rabble
03:30 hotel wow
03:30 hotel cool
03:35 MadcapJake hotel: what other PLs do you know?
03:35 hotel python and java mostly
03:36 hotel and then some web-related stuff: semi-literate in php and javascript
03:37 MadcapJake one of my favorite ways to learn is find a cool, isolated (and small) project in another langauge (python/java) and re-implement in Perl 6.  You really get a grasp of how Perl 6 differs from the ones you know.  Try and find ways to improve design via Perl 6 unique features and then when implemented, try and adjust the interface to be more Perl 6 ish.  This
03:37 MadcapJake is more a long-haul idea but it's really helped me learn and the legwork of designing is already done by the source project :)
03:38 skink MadcapJake: Well-deserving of 'Mad'
03:38 hotel lol, thanks
03:38 skink @ rabble
03:39 hotel what's the overhead like on rabble?
03:39 MadcapJake skink: oh! haha! I have some cool plans for Rabble, I really need to add more operations but I *really* want to try and rewrite it mostly in NQP :D
03:40 MadcapJake well so far I've only really done little one liners with it, but I'd say the only overhead is a little bit more startup time (seems negligible to me but will grow as I add more, surely)
03:41 MadcapJake My initial design was just to make the code slick, now I want to go back and make it ugly for performance-sake
03:42 MadcapJake But I'm also reading through some books/docs on Forth languages, I'm looking for some neat ideas that could make Rabble a really unique beast
03:44 MadcapJake hotel: remember that Perl 6 uses a grammar to parse Perl 6! So any language written in Perl 6 (via grammars) should have similar performance (of course how you design the rest is certainly going to have an impact)
03:44 hotel this is making me excited for next year (but I need to finish this year's homework first :0)
03:44 hotel oh good point
03:45 skink hotel, If you want have some real fun, there is a Perl6 implementation of... Perl6!
03:46 skink https://github.com/masak/yapsi
03:46 skink want to* have, gah
03:46 hotel no way! *clicks*
03:48 hotel on a side note, something is using 10GB of memory on my computer
03:48 MadcapJake `killall moar` :D
03:49 geekosaur on my machine thats usually chrome >.>
03:49 hotel it seems to be a mixture of chrome (no surprises there) and "service host: local system (18)"
03:49 geekosaur (initially I typoed that as "chrime" --- which sometimes seems apropos <.< )
03:49 hotel yeah you right
03:50 MadcapJake "service host" sounds like Windows, amirite?
03:50 hotel well... http://puu.sh/oNC26/8f6b487911.png http://puu.sh/oNC1M/9a99644cef.png
03:51 geekosaur yeh, that's svchost.exe
03:51 hotel for some reason opening taskmanager made my computer sound a lot less like a jet engine, anyway
03:52 MadcapJake check your services tab
03:52 geekosaur when I had that problem it turned out to be a lot of OEM crapware that I subsequently purged
03:53 hotel 17 services with pid 9916
03:53 MadcapJake also could be microsoft downloading updates :P
03:53 hotel yeah I've purged this machine a few times
03:53 geekosaur because it included things like a wifi widget that didn't even work as well as the one in winxp)
03:53 * MadcapJake is so glad to be done with Windows
03:53 MadcapJake 3 years clean now :P
03:54 hotel what did you switch to?
03:54 MadcapJake Xubuntu initially but I've since bastardized it into basically what Ubuntu Gnome is today :P
03:54 geekosaur anyway, windows services exist as DLLs, and svchost.exe exists to start a thread for activated services, load the service DLL in that thread, and jump to its entry point
03:55 hotel sounds efficient
03:55 geekosaur running as the local system account
03:55 geekosaur (not even administrator has full access to the entire system. LSA does)
03:56 hotel apparently chrome was only using 4% of 66% of my memory
03:59 hotel guess I'll restart
03:59 hotel peace
04:16 skids joined #perl6
04:25 mr-foobar joined #perl6
04:33 mr-foobar joined #perl6
04:44 pierre_ joined #perl6
04:49 Actualeyes joined #perl6
04:56 Cabanossi joined #perl6
05:18 molaf joined #perl6
05:25 mr-foobar joined #perl6
05:33 mr-foobar joined #perl6
05:36 domidumont joined #perl6
05:40 domidumont joined #perl6
05:43 CIAvash joined #perl6
05:45 Su-Shee left #perl6
05:45 pierre_ joined #perl6
06:04 domidumont joined #perl6
06:04 jjido joined #perl6
06:09 pierre_ joined #perl6
06:25 sno joined #perl6
06:25 sno joined #perl6
06:26 firstdayonthejob joined #perl6
06:30 wamba joined #perl6
06:36 ufobat good morning perl6
06:48 _mg_ joined #perl6
06:50 masak morning, ufobat; #perl6
07:07 moritz \o
07:11 nine Good morning!
07:15 DrForr Morning.
07:19 masak m: for my @greeting = 777982, 787378, 713333 -> $cchunk.comb(/../) -> $chunklet { print chr $chunklet }; print "-" }
07:19 camelia rakudo-moar 9c8989: OUTPUT«5===SORRY!5=== Error while compiling /tmp/9cOPrHblmk␤Malformed parameter␤at /tmp/9cOPrHblmk:1␤------> 3ting = 777982, 787378, 713333 -> $cchunk7⏏5.comb(/../) -> $chunklet { print chr $ch␤    expecting any of:␤        constraint␤»
07:20 masak m: for my @greeting = 777982, 787378, 713333 -> $chunk { for $chunk.comb(/../) -> $chunklet { print chr $chunklet }; print "-" }
07:20 camelia rakudo-moar 9c8989: OUTPUT«MOR-NIN-G!!-»
07:23 ufobat could anyone please explain why this error occurs? https://gist.github.com/ufobat/b32e882564057ead07de146b51672a9f
07:27 masak ufobat: not sure. but the problem does go away if you make line 4 be `$!env = $env;`
07:28 masak (which I would tend to do anyway, all other things being equal)
07:28 masak I somehow feel that it should work the way it is too. it might be a bug that it doesn't.
07:28 ufobat jap, then it's gone
07:31 moritz I've added two lines of debugging to method rest
07:31 moritz *reset
07:31 moritz say $!env.VAR.^name;
07:31 moritz say $!env.VAR.defined;
07:31 moritz the first one always says Scalar, which is to be exected
07:31 moritz the second says False first, and then True
07:31 moritz so, somehow a Scalar gets autovivified on assignment, but it's a RO scalar?
07:32 masak m: class Strange { has $.env is rw; method reset($env) { $.env = $env } }; my $s = Strange.new; my %env = (1 => 2, 3 => 4); $s.reset(%env); $s.reset(%env)
07:32 camelia rakudo-moar 9c8989: OUTPUT«Cannot assign to a readonly variable or a value␤  in method reset at /tmp/plljs3r5Zt line 1␤  in block <unit> at /tmp/plljs3r5Zt line 1␤␤»
07:32 masak golf'd
07:33 moritz how do I introspect a Scalar for whether it's RO?
07:33 moritz are there things such as read-only scalars?
07:33 moritz m: sub f($x) { say $x.VAR.^name }
07:33 camelia rakudo-moar 9c8989: ( no output )
07:33 moritz m: sub f($x) { say $x.VAR.^name }; f 42
07:33 camelia rakudo-moar 9c8989: OUTPUT«Scalar␤»
07:33 moritz there seem to be, yes
07:35 masak m: class Strange { has $.env is rw; method reset($.env) {} }; my $s = Strange.new; my %env = (1 => 2, 3 => 4); $s.reset(%env); $s.reset(%env); say "strangely, this works"
07:35 camelia rakudo-moar 9c8989: OUTPUT«strangely, this works␤»
07:35 moritz well, this binds two times
07:36 abraxxa joined #perl6
07:38 ufobat soo, it's a bug?
07:38 masak pretty sure it is, yes
07:38 masak care to submit it? :)
07:38 pierre_ joined #perl6
07:40 ufobat of course :-)
07:40 ufobat thanks for your help
07:44 moritz ufobat++, masak++ # golfing
07:45 pierre_ joined #perl6
07:45 abraxxa joined #perl6
07:56 pierre_ joined #perl6
08:10 RabidGravy joined #perl6
08:11 lizmat psch: re http://irclog.perlgeek.de/perl6/2016-05-09#i_12456079 , good point: will mention it next week
08:12 darutoko joined #perl6
08:14 lizmat psch: otoh, make test / spectest are supposed to run *without* make install
08:17 rindolf joined #perl6
08:27 pierre_ joined #perl6
08:33 s_kilk joined #perl6
08:46 Ven joined #perl6
08:51 RabidGravy boom
08:52 perlawhirl joined #perl6
09:04 telex joined #perl6
09:05 |Tux| joined #perl6
09:07 |Tux| left #perl6
09:19 kurahaupo joined #perl6
09:25 cpage_ joined #perl6
09:25 _nadim joined #perl6
09:30 mr-fooba_ joined #perl6
09:33 psch lizmat: right, which means instead of a && before "make test" we should have two scripts, one with --make-install and one with "; make test"
09:34 psch lizmat: not quite sure how that fits into the p6weekly though (which i assume you mean with "mention next week")
09:34 lizmat well, the fact that you fixed not spotting install errors by Travis, would be mentionable ?
09:35 araujo joined #perl6
09:35 psch oh.  yeah, i suppose that makes sense
09:35 psch ...well as soon as i actually fix it :)
09:35 cpage_ joined #perl6
09:39 psch hm, travis docs aren't quite clear on how to do that, to me at least
09:56 kurahaupo_ joined #perl6
10:10 ZoffixWin .tell AlexDaniel you're right, with -O3 register doesn't matter and the whole thing goes down to 0m2.284s
10:10 yoleaux ZoffixWin: I'll pass your message to AlexDaniel.
10:11 ZoffixWin I wonder when computers will be able to take -O10 to figure out that for (x = 2; x < 2e9; x++); can be optimized into an assignment XD
10:12 timotimo it's already doing -O10, it's just the base isn't decimal
10:12 ZoffixWin but it doesn't change that loop into an assignment :)
10:12 espadrine_ joined #perl6
10:12 timotimo yeah, because clearly you want to have a loop there
10:13 timotimo if you didn't actually want it to loop, you would have written the assignment :P
10:14 huggable joined #perl6
10:16 sjoshi joined #perl6
10:18 arnsholt joined #perl6
10:31 mr-foobar joined #perl6
10:37 mr-foobar joined #perl6
10:38 pmurias joined #perl6
10:45 pmurias masak: It's interesting how a more complex QAST test ends up looking (for contvars), as opposed to the elegant sexprs tests 007 has: http://paste.debian.net/683340/
10:47 dvinciguerra joined #perl6
11:01 rindolf joined #perl6
11:02 masak pmurias: the comparison has occurred to me, yes.
11:02 pmurias masak: the test is broken btw ;)
11:03 masak pmurias: but -- it's not that QAST is bad; it's just that it targets a different demographic. compilers, rather than code authors.
11:09 pmurias The big things seems to be that .new constructors are a pretty bad notation for writing big chunks of QAST
11:10 jnthn To be fair, "easy to write big chunks of QAST" wasn't really a design goal :)
11:13 masak yes, that's much of my point
11:14 masak even in the 007 tests, we eschew the slightly more longhand 007 constructor notation with named parameters, in favor of Lisp-like positional syntax
11:18 pmurias jnthn: prior experience with pir suggests that an easy to write intermediate format is not a good design goal ;)
11:20 pmurias jnthn: contvar locals seem to be supported only on the moarvm, but not on the jvm. Should I implement them on the js?
11:21 jnthn Hm, are they really supported on MoarVM?
11:21 * jnthn somehow thought not
11:21 jnthn lunch, bbiab
11:23 pmurias jnthn: the is an error message: Can only use 'contvar' decl with scope 'lexical
11:23 pmurias jnthn: but a check above attempts to implement them anyway ;)
11:24 pmurias jnthn: and they don't work
11:25 pmurias as in don't give an error message and don't do the cloning
11:27 itaipu joined #perl6
11:29 masak I'm not sure PIR's failing was that it was an easy to write intermediate format. rather it, like Parrot, was designed before it was clear what the uses would be and how they would be distributed.
11:30 masak making it difficult to use effectively once those uses became clear.
11:31 pmurias it's big failing that is that it was used as an actual programming language
11:33 masak well, it was the only choice for some things people needed to do.
11:33 masak and I'm not all that sure about "easy to write" either. it ended up being used far beyond its designed purpose.
11:36 pmurias was there a real problem blocking the parrot people from having something like NQP rather then pir?
11:36 pmurias (for use by humans)
11:37 moritz well, one design problem with PIR was that it was meant to be used as an intermediate representation, but it wasn't designed to be fast to process
11:37 moritz pmurias: the main problem seemed to be that people couldn't agree on one language
11:37 jast that doesn't sound like a useful combination :)
11:37 lizmat isn't the concept of NQP a lesson learned from Parrot ?
11:37 moritz pmurias: at some point, and older version of NQP served that niche partially, then winxed came along
11:38 arnsholt lizmat: NQP was initially built on top of Parrot
11:38 moritz pmurias: but there was never a (successful) push to write basically all human-level parrot code in either language
11:38 lizmat arnsholt: ah, ok
11:39 moritz iirc the progression was PGE, NQP, NQP-rx (which had its own regex engine, didn't use PGE anymore) and then the current NQP, which is 6model-based
11:39 masak there was also talk about putting Parrot on a better meta-object foundation. I think it was called m0, and it was supposed to borrow heavily from 6model.
11:39 moritz steps before PGE are before my involvement, and eluded me :-)
11:39 moritz masak: right. But at that point, parrot had lost enough steam that it never happened
11:39 masak moritz: before PGE there was TGE, IIRC. but I wasn't around then either, or at least not paying attention enough.
11:40 moritz masak: sounds vaguely familiar
11:40 masak moritz: yes. there simply wasn't ever a champion for m0.
11:40 moritz "tree grammar engine"
11:40 masak yes. I think it was clunky to use.
11:41 arnsholt Speaking of PGE, there was GGE as well =)
11:41 arnsholt Of course, that was in Perl 6
11:42 * moritz still admires GGE from a distance
11:42 arnsholt Same, same
11:43 masak pity I couldn't take it further
11:43 aindilis joined #perl6
11:43 masak for a brief while there, it could have been quite a game-changer for Perl 6 code
11:43 moritz now I have Bette Midler in my head ("from a distance")
11:43 arnsholt (For those who weren't around for that: GGE is the Glacial Grammar Engine, a masak++ project reimplementing PGE [IIRC] in Perl 6)
11:53 rindolf joined #perl6
11:54 TimToady joined #perl6
11:55 masak yeah, it was basically a straight port of PGE into Perl 6.
11:56 masak which means at some point I must have been able to read PIR pretty well.
11:56 pierre_ joined #perl6
11:56 masak I learned a lot about grammar engines, and Perl 6's in particular.
11:56 kaare_ joined #perl6
11:57 pierre_ joined #perl6
12:00 s_kilk joined #perl6
12:07 pierre_ joined #perl6
12:08 pierre_ joined #perl6
12:09 araujo_ joined #perl6
12:11 araujo_ joined #perl6
12:13 araujo_ joined #perl6
12:15 araujo_ joined #perl6
12:17 kurahaupo joined #perl6
12:18 araujo_ joined #perl6
12:18 pierre_ joined #perl6
12:20 araujo_ joined #perl6
12:30 smls joined #perl6
12:31 molaf joined #perl6
12:33 smls [Coke], others: Should we reject RT tickets like #127440 ?
12:33 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=127440
12:33 smls It reports a segfault when putting a third-party Perl 6 module under heavy load, and is in this form probably not useful to Rakudo implementors.
12:34 smls It should probably be submitted as an issue on the github page of the module in question, so that the module author can investigate it, and hopefully submit a more useful Rakudobug with a golfed testcase.
12:34 pierre_ joined #perl6
12:38 jnthn smls: I think the reporter *is* the developer of the module in question.
12:38 smls ah
12:39 perlpilot joined #perl6
12:43 smls jnthn: While you're here: A Perl 6 variable should never end up being a `VMNull`, right?
12:43 smls So #127254 and #126857 are still a bug even though they no longer crash?
12:43 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=127254
12:43 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=126857
12:45 brrt joined #perl6
12:46 perlpilot smls: that sounds right to me.  (What do those do on the jvm?)
12:46 smls no idea
12:47 jnthn smls: Yeah, VMNull leaking into Perl 6 space is a Bad Thing.
12:47 smls ok
12:47 jnthn smls: Better than SEGV, of course :)
12:48 pmurias I get a compile error with the JVM backend
12:48 pmurias http://paste.debian.net/683363
12:49 pmurias it's caused by 58d507380d068b8cba0ce92ba02c26047d0b4909
12:49 psch ...i promise i'll stop pushing things at 3 in the morning
12:52 psch pmurias: you built with --gen-nqp=master?
12:52 psch pmurias: cause afaics we didn't bump NQP to that commit yet
12:52 pierre_ joined #perl6
12:52 sufrostico joined #perl6
12:55 Khisanth joined #perl6
12:59 pmurias psch: I just built nqp-j
12:59 dalek ecosystem: 8e1adbb | titsuki++ | META.list:
12:59 dalek ecosystem: Fix Term::Readsecret to Terminal::Readsecret
12:59 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/8e1adbbd14
12:59 dalek ecosystem: 4361ee7 | titsuki++ | META.list:
12:59 dalek ecosystem: Merge pull request #205 from titsuki/change-module-name
12:59 dalek ecosystem:
12:59 dalek ecosystem: Fix Term::Readsecret to Terminal::Readsecret
12:59 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/4361ee7802
13:00 pmurias psch: not to get rakudo-js, just to add a print statement to see when a given hack is used
13:01 psch pmurias: ah.  i've patched coerce_i2n and _n2i locally, fwiw.  gonna push that in a bit
13:02 psch ...and then look at the nqp make test failures i'm seeing right now, which seem to relate to the getattr hack for NC i recently implemented
13:11 pierre_ joined #perl6
13:15 |2701 joined #perl6
13:19 tomboy64 psch: could i ask for your time one more time?
13:20 psch tomboy64: sure, what's up?
13:20 tomboy64 psch: i need to provide a custom path for -Djna.library.path in tools/build/create-jvm-runner.pl
13:20 tomboy64 what would be the proper way to implement that?
13:21 tomboy64 it's related to https://github.com/perl6/nqp/pull/281 - building rakudo fails when there's a custom jna.jar used for nqp
13:21 tomboy64 since rakudo's perl6-j needs to know about the native library via jna.library.path
13:21 psch tomboy64: can't you just initialize $sharedir from e.g. %ENV?
13:22 psch ...or however Perl 5 does that.  i think it's %ENV :S
13:22 tomboy64 yes, that's a good idea. thanks!
13:31 dvinciguerra joined #perl6
13:31 AW3i joined #perl6
13:32 Actualeyes joined #perl6
13:37 smls [Coke], others: Do we need a Roast test for "This is not allowed and its behavior is undefined, but at least it probably shouldn't segfault" cases like #127208 ?
13:37 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=127208
13:41 smls Or can the ticket be closed directly?
13:42 moritz a test would be appreciated, yes
13:53 teatime so, can you have something like:    sub (MyType(Str) $foo) {…}    without augmenting Str to have a .MyType() method?
13:58 tony-o MadcapJake: i fixed the updating mechanism on modules.zef.pm - it's being updated every 15 minutes now
14:00 MadcapJake nice! Looking good, though I miss the colored icons :)
14:00 * MadcapJake is off to an interview
14:04 pierre_ joined #perl6
14:05 moritz MadcapJake: good luck
14:05 teatime hrmz... what do I want to work on today...
14:06 tony-o MadcapJake: good luck
14:07 prammer joined #perl6
14:09 teatime so, can you have something like:    sub (MyType(Str) $foo) {…}    without augmenting Str to have a .MyType() method?  <--  this really seems like no, but perhaps I am just overlooking something?
14:11 tony-o do you consider inheritance to be augmenting?
14:14 cdg joined #perl6
14:14 teatime if you mean 'MyType is Str', then no.  but that would let me use a MyType in a sub that takes a Str; how does it help me wanting to use a Str in a sub that takes a MyType?
14:14 huggable joined #perl6
14:15 teatime I think I am just missing something very obvious.
14:15 tharkun joined #perl6
14:15 tony-o it doesn't, you also didn't say that was a constraint.  what are you trying to do that you'd like to add a method call to Str without augmenting?
14:15 teatime I don't want to do that.
14:16 tony-o do what?
14:16 psch teatime: the only thing besides "augment" i can think of is only useful if you have control over where the Str come from
14:16 domidumont joined #perl6
14:16 psch teatime: that'd be "but role { method MyType { ... } }"
14:18 teatime psch: ah well.  I was hoping perhaps it would try auto-calling MyType.new(Str) with $foo
14:18 teatime or something similar
14:19 psch teatime: https://irclog.perlgeek.de/perl6/2015-01-23#i_9992538 is where this was discussion previously
14:20 teatime thank you
14:20 teatime oh ok, so there *is* a way
14:20 * teatime reads.
14:21 araujo joined #perl6
14:21 tony-o m: class A { has $.x; }; sub r ($x where { A.new(:x{$_}) }) { $x.say; }; r("hello"); #teatime - is this what you're attempting to do?
14:21 camelia rakudo-moar dc7346: OUTPUT«hello␤»
14:22 tony-o or something similar
14:22 psch m: sub f (Str(Int) $x) { say $x.WHAT }; f(5)
14:22 camelia rakudo-moar dc7346: OUTPUT«(Str)␤»
14:23 psch tony-o: ^^^ that but with MyType as target, not Str (well, and Str as source, not Int)
14:23 tony-o glad you guys could interpret :-)
14:23 pierre_ joined #perl6
14:23 tharkun joined #perl6
14:26 teatime tony-o: that's interesting 'cause I didn't know you could do that.
14:26 psch m: class A { has $.x; }; sub r ($x where { A.new(:x{$_}) }) { $x.WHAT.say; }; r("hello");
14:26 camelia rakudo-moar dc7346: OUTPUT«(Str)␤»
14:27 psch you can't really :)
14:27 teatime and forgive me, I didn't mean to be unclear.  by 'sub (MyType(Str) $foo) {…}' I just meant, can I define my own implicit coercions from basic types w/o augmenting them.
14:28 teatime the goal is to reduce boring boilerplateish code to enhance readability, though, so complex/tricky solutions are not too interesting.  except when they're interesting, heh.
14:29 teatime psch: mm, does that actually create a type, and if it were a multi, that r() would only be called where A.new($x) returns a true value?
14:30 psch m: class A { has $.x; method Bool { False } }; sub r ($x where { A.new(:x{$_}) }) { $x.WHAT.say; }; r("hello");
14:30 camelia rakudo-moar dc7346: OUTPUT«Constraint type check failed for parameter '$x'␤  in sub r at /tmp/4GZsgSQgY2 line 1␤  in block <unit> at /tmp/4GZsgSQgY2 line 1␤␤»
14:30 psch teatime: it does create an object and checks if that object is truthy, yeah
14:31 psch teatime: the truthiness determins if dispatch works for that parameter or not
14:31 dalek doc: 5a05c56 | (Wenzel P. P. Peppmeyer)++ | doc/Language/functions.pod:
14:31 dalek doc: add where clause to MAIN example
14:31 dalek doc: review: https://github.com/perl6/doc/commit/5a05c569dd
14:31 dalek doc: 8a9014a | (Wenzel P. P. Peppmeyer)++ | doc/Language/functions.pod:
14:31 dalek doc: add MAIN to index
14:31 dalek doc: review: https://github.com/perl6/doc/commit/8a9014adb0
14:31 dalek doc: e4ac430 | (Wenzel P. P. Peppmeyer)++ | doc/Language/functions.pod:
14:31 dalek doc: indent MAIN example a little better
14:31 dalek doc: review: https://github.com/perl6/doc/commit/e4ac430aa0
14:32 teatime yup, ok.  yay I understand something.
14:35 sortiz joined #perl6
14:35 sortiz \o #perl6
14:36 lowecase joined #perl6
14:48 tony-o you can, you just need a copy :-)
14:48 tony-o m: class A { has $.x; }; sub r ($x is copy where { $x = A.new(:$x) }) { $x.WHAT.say; }; r("hello");
14:48 camelia rakudo-moar dc7346: OUTPUT«(A)␤»
14:50 tony-o teatime: ^
14:50 tony-o for readability, i'd just constrain Str:D $x in the params and create a new MyType in the block
14:52 lowecase joined #perl6
14:52 teatime tony-o: yes, that's the alternative.  or probably, have it be a multi where `sub foo(Str:D $x)` converts and calls `sub foo(MyType:D $x)`.
14:52 wamba joined #perl6
14:52 teatime it seems like what I wanted might actually be possible though
14:53 moritz shocking!
14:54 teatime btw, am I correct in thinking that --> used in signatures is definitely not an operator (that you could, e.g., overload)
14:54 teatime I guess I should grep the code for it first
14:55 jnthn No, not an operator; special syntax in signature parsing
14:55 teatime k, assumed so.
14:58 lowecase joined #perl6
14:58 ajoe joined #perl6
15:01 Sgeo joined #perl6
15:15 ajoe joined #perl6
15:18 mcsnolte joined #perl6
15:19 araujo joined #perl6
15:26 MadcapJake tony-o, moritz: thanks for the well-wishes! Had two interviews already this morning and they both went well!
15:27 mspo let the bidding wars begin
15:29 MadcapJake I wish! These are just crappy customer service jobs :(
15:32 EvilBOT joined #perl6
15:36 nicq joined #perl6
15:38 teatime psch: so I guess, S13 says it should already fallback to calling MyType.new(Str $x), and that's just NYI.
15:39 teatime thx again for link to discuss, I suppose it told me everything I wanted to know.
15:40 ZoffixW joined #perl6
15:41 ZoffixW Where does NativeCall look for libraries? I have libmahlib.so in ./ and I run perl6 -I. -MNativeCall -e 'sub mahfunc(Str) is native("mahlib") {}; mahfunc("fooo")', but I get an error Cannot locate native library 'libmahlib.so'
15:41 ZoffixW I guess a better question is: "How to tell NativeCall where to look for libraries?"
15:42 teatime LD_LIBRARY_PATH ?
15:43 pmurias MadcapJake: non-programming ones?
15:43 nine MadcapJake: why do you apply for crappy jobs?
15:44 ZoffixW teatime, hm, that does the trick if I set it on the command line, but not via %*ENV
15:44 MadcapJake I don't have a programming degree :(
15:44 * ZoffixW looks at NativeCall sauce
15:44 ZoffixW MadcapJake, neither do I!
15:45 MadcapJake how do you get programming jobs then?! They all say "minimum bachelors/associates in computer field".
15:45 ZoffixW Neither do the XX% of self-taught programmers (/me doesn't recall exact StackOverflow survey figures, but they're double-digits)
15:45 ZoffixW MadcapJake, apply anyway :)
15:45 ZoffixW Say you have "equivalent"
15:45 teatime Yes, apply anyway.  Never think of job ad requirements as actual requirements.
15:46 nine MadcapJake: github repos and contributions to free software are pretty much worth as much as a degree
15:46 geekosaur MadcapJake, it's worth remembering that the folks who write those requirements also toss in a "must have 5 years experience in <tech released last week>"
15:46 ZoffixW MadcapJake, a lot of jobs require you write a test program before they even look at you. If you can write stellar code there, they'll care less about papers
15:46 teatime Sometimes they're filler added by HR and aren't requirements at all.  Other times, they may be waived for the right cantidate.  They're rarely set in stone, so assume they never are.
15:47 tadzik I always smile when job offers list "BS in Computer Science" as a requirement
15:47 nine MadcapJake: I would actually like to have an applicant with a good online track record :) Is much easier to judge than papers
15:47 tadzik don't you people have enough BS in computer science to deal with already?
15:47 MadcapJake wow never realized that!
15:47 ssotka joined #perl6
15:49 MadcapJake I also live in the midwest so I'm not sure tech employers here would be so flexible
15:49 sortiz ZoffixW, In linux NativeCall uses dlopen(3) so, without an explicit path, it uses the rules annotated.
15:50 nine MadcapJake: you'll never know unless you ask
15:50 ZoffixW sortiz, thanks
15:50 geekosaur HR *always* mangles those things beyond recognition
15:51 MadcapJake I'll give it a try! Thanks for the advice Sixians! You guys are the best! :)
15:51 nine MadcapJake: don't know about the US but in Europe people are desparate again to find developers. I'd probably hire you just on the base that you asked NativeCall questions ;)
15:51 teatime ZoffixW: also only vaguely related, but I found this enlightening a while back.  http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html
15:51 geekosaur one of the things we had to do when I was at Carnegie Mellon was help figure out what job description to feed to HR that would be vaguely recognizeable when it came back out
15:52 ZoffixW teatime, thanks
15:53 teatime ZoffixW: interesting that that doesn't work from %*ENV.
15:53 ZoffixW teatime, it calls something from nqp, so maybe that's why
15:53 ZoffixW teatime, and well, as sortiz pointed out, dlopen(3)
15:53 MadcapJake nine: wow! I think some parts of US are hiring but the Midwest is a little behind-the-times :P
15:54 tony-o MadcapJake: probably more flexible there than out here
15:54 sortiz ZoffixW, so, to load that use 'is native("./libmahlib.so")'
15:54 tony-o MadcapJake: detroit is building up around tech, or trying at least
15:54 MadcapJake tony-o: huh, never thought of it that way, good point!
15:55 teatime MadcapJake: this is an instance of, it never hurts to ask / you miss 100% of the shots you don't take.
15:56 nicq joined #perl6
15:56 teatime The other big place where requirements are actually quite mutable but people frequently lose out by not realizing it, is uni degree requirements and especially course prerequisites.
15:56 EvilBOT joined #perl6
15:57 EvilBOT just a test
15:57 EvilBOT joined #perl6
15:57 nicq EvilBot: hello
15:58 nicq EvilBot: hello
15:58 Guest35459 hello
15:59 dogbert17 joined #perl6
16:00 MadcapJake teatime: this is true, I gotta keep reminding myself of that. I also should write some more non-Perl 6 code for practice. I've been in a Perl 6 bubble as-of-late :)
16:00 ZoffixW sortiz, ah, cool!
16:00 ZoffixW sortiz++
16:03 dogbert17 o/ #perl6
16:04 ZoffixW \o
16:05 * geekosaur would also note that the problem with tech employers isn't flexibility so much as availability (that is, they gotta actually be hiring)
16:05 geekosaur in the midwest US
16:05 dogbert17 I would like to close https://github.com/perl6/doc/issues/494 and https://github.com/perl6/doc/issues/493 can I Do that or should I wait for titsuki to do it?
16:06 mr-foobar joined #perl6
16:07 moritz dogbert17: you can
16:07 dalek DBIish: aded2a4 | (Salvador Ortiz)++ | lib/NativeLibs.pm6:
16:07 dalek DBIish: Some subs missing the move outside its methods
16:07 dalek DBIish: review: https://github.com/perl6/DBIish/commit/aded2a43c8
16:07 dalek DBIish: 33fcb99 | (Salvador Ortiz)++ | / (5 files):
16:07 dalek DBIish: Pg: Add some DB introspection methods
16:07 dalek DBIish:
16:07 dalek DBIish: Like perl5 DBI: $drv.data-sources and $dbh.table-info
16:07 dalek DBIish: + $dbh.quote for generic quoting
16:07 dalek DBIish: review: https://github.com/perl6/DBIish/commit/33fcb99fe3
16:07 dogbert17 moritz: thx, will fix
16:09 dalek doc: 960e14c | (Wenzel P. P. Peppmeyer)++ | doc/Type/Int.pod:
16:09 dalek doc: add 0x and friends to class Int
16:09 dalek doc: review: https://github.com/perl6/doc/commit/960e14c8ed
16:12 nicq joined #perl6
16:14 dalek doc: 9da6285 | (Jan-Olof Hendig)++ | doc/Language/5to6-perlvar.pod:
16:14 dalek doc: Fixed two typos
16:14 dalek doc: review: https://github.com/perl6/doc/commit/9da628596f
16:17 dalek DBIish: 1bb0d44 | (Salvador Ortiz)++ | lib/DBDish/mysql (3 files):
16:17 dalek DBIish: mysql: Fix column NULL type
16:17 dalek DBIish: review: https://github.com/perl6/DBIish/commit/1bb0d44287
16:17 dalek DBIish: 82c072f | (Salvador Ortiz)++ | t/41-sqlite-exec-error.t:
16:17 dalek DBIish: SQLite: Fail earlier when no library available
16:17 dalek DBIish: review: https://github.com/perl6/DBIish/commit/82c072f65c
16:18 nicqbot joined #perl6
16:18 nicqbot hi
16:21 nicq p6: sub desc($var) { say $var.WHAT; }; "hello".&desc;
16:21 camelia rakudo-moar dc7346: OUTPUT«(Str)␤»
16:28 tony-o hi
16:28 smls p6: sub desc($var is copy) { say $var.WHAT; }; "hello".&desc;
16:28 camelia rakudo-moar dc7346: OUTPUT«(Str)␤»
16:29 gregf_ m: sub desc($var) { say $var.WHAT; }; &desc.^name.say
16:29 camelia rakudo-moar dc7346: OUTPUT«Sub␤»
16:30 smls Am I the only one who sometimes misses a postfix/method form of `given`?
16:31 smls `for` --> `.map`,   `given` --> ??
16:33 dalek doc: a90a5e5 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Order.pod:
16:33 dalek doc: doc enum Order
16:33 dalek doc: review: https://github.com/perl6/doc/commit/a90a5e51c2
16:33 dalek doc: 9360de4 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Order.pod:
16:33 dalek doc: remove double wording twice
16:33 dalek doc: review: https://github.com/perl6/doc/commit/9360de4dc3
16:33 dalek doc: 1d02351 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Order.pod:
16:33 dalek doc: fix copypasta mistage
16:33 dalek doc: review: https://github.com/perl6/doc/commit/1d0235165f
16:33 dalek doc: 7f19607 | (Wenzel P. P. Peppmeyer)++ | doc/Language/5to6-perlvar.pod:
16:33 dalek doc: Merge branch 'master' of https://github.com/perl6/doc
16:33 dalek doc: review: https://github.com/perl6/doc/commit/7f1960733f
16:34 timotimo smls: that's literally invocation :)
16:35 smls hm?
16:35 timotimo m: { .say; $_ + 10 .say }(1234)
16:35 camelia rakudo-moar dc7346: OUTPUT«1234␤10␤»
16:35 timotimo well, the precedence isn't right there, but ...
16:35 timotimo m: { .say; $_ + 10 .say }.(1234)
16:35 camelia rakudo-moar dc7346: OUTPUT«1234␤10␤»
16:35 timotimo that's totally the postfix/method form of given
16:36 smls timotimo: Ah, I was thinking the other way around
16:36 smls I.e. instead of:
16:36 smls my $aspect = .[0] / .[1] given @dimensions;
16:36 smls We'd write something like:
16:36 smls my $aspect = @dimensions.do: { .[0] / .[1] };
16:36 timotimo oh!
16:36 smls basically like  .map  except without iterating
16:37 tokomer joined #perl6
16:37 timotimo well, at least for a purely side-effect related thing, you can use a for over a single variable to get a given
16:37 timotimo but you'll probably want the return value to not be listified
16:37 smls right
16:43 smls Of course if the code to apply is in a named sub, we can use the  .&foo   form.
16:43 timotimo if you know the thing is defined-ish, you can use "with"
16:43 teatime hrm, I seem to remember someone rejiggering Test to allow description-first argument order... or something..
16:44 timotimo yeah, there's a pull-request, probably to rakudo. or just a branch perhaps
16:44 teatime k, thx
16:44 smls timotimo: Isn't `with` a block  or statement suffix keyword like given?
16:44 timotimo i know i saw it on the mailing list
16:44 timotimo oh!
16:44 timotimo well, you can use "do" in front of any of these. including "given"
16:45 smls timotimo: I'm mostly concerned about flow of readin in method chains, where it would allow to write:
16:45 smls $source.step1.step2.do({STEP3}).step4
16:46 timotimo oh
16:46 timotimo hmm.
16:46 timotimo m: 1234.&[{ .say; $_ }].sin.say
16:46 camelia rakudo-moar dc7346: OUTPUT«5===SORRY!5=== Error while compiling /tmp/1D4nMcgDTd␤Missing infix inside []␤at /tmp/1D4nMcgDTd:1␤------> 1234.&[7⏏5{ .say; $_ }].sin.say␤    expecting any of:␤        dotty method or postfix␤        infix␤        infix noun␤   …»
16:46 timotimo not quite
16:47 teatime also, is there any reason I may not be thinking of, why you would not want to:  make your t/*.t files chmod +x and add '#!/usr/bin/env perl6'
16:47 timotimo on clue
16:48 sortiz m: my @dims = 3,4; my $aspect = @dims.&{ .[0] / .[1] }; say $aspect;
16:48 camelia rakudo-moar dc7346: OUTPUT«0.75␤»
16:49 timotimo oooh
16:49 timotimo that's fine
16:49 smls neat!
16:49 sortiz :)
16:51 smls I guess there are always new things to learn in Perl 6... :P
16:51 perlpilot There will forever be new things to learn in Perl 6.
16:51 perlpilot (until it's a dead language)
16:52 aries_liuxueyang joined #perl6
16:59 _28_ria joined #perl6
17:04 dalek doc: 03dd1b5 | (Jan-Olof Hendig)++ | doc/Language/functions.pod:
17:04 dalek doc: Fixed broken example code with suggested fixes from nd3i++
17:04 dalek doc: review: https://github.com/perl6/doc/commit/03dd1b59a6
17:05 xiaomiao joined #perl6
17:07 gregf_ m: say [ &{ .uc }.("foo"), "foo".&{ .uc }, "".can("uc")[0].("foo") ]
17:07 camelia rakudo-moar dc7346: OUTPUT«[FOO FOO FOO]␤»
17:09 gregf_ can these 3 be equivalent? i can see there can be a sub, a block, a method and heaven only knows what else :|
17:10 psch m: say [eqv] [ &{ .uc }.("foo"), "foo".&{ .uc }, "".can("uc")[0].("foo") ]
17:10 camelia rakudo-moar dc7346: OUTPUT«True␤»
17:10 psch gregf_: looks like they are eqv
17:10 psch well, their results in this case at least
17:10 gregf_ p6: class Foo { has Int $.bar is rw; method baz(Int $v where $v > 0){ $!bar * $v; } }; say Foo.new(bar => 100).&{ .baz(10) + 100 };
17:10 camelia rakudo-moar dc7346: OUTPUT«1100␤»
17:10 gregf_ psch: ok, thanks
17:15 patrickz joined #perl6
17:16 firstdayonthejob joined #perl6
17:25 domidumont joined #perl6
17:29 sortiz m: 'foo'."{'u'~'c'}"().say; # One more :)
17:29 camelia rakudo-moar dc7346: OUTPUT«FOO␤»
17:29 psch m: say ::("&uc")("foo")
17:29 camelia rakudo-moar dc7346: OUTPUT«FOO␤»
17:31 grondilu joined #perl6
17:31 grondilu Hi #perl6
17:34 noganex joined #perl6
17:34 sortiz \o grondilu
17:54 itaipu joined #perl6
18:05 [Coke] smls: I agree with the folks who responded to you. thanks for doing ticket wrangling.
18:17 bartolin yeah, smls++
18:18 ZoffixW joined #perl6
18:20 ZoffixW How well must NativeCall sub signatures match C prototypes? Is there any good guidelines? I have a function with prototype driver_return_code_t    cdio_eject_media_drive (const char *psz_drive), but it still works fine if I define it without any parameters or return types
18:21 MadcapJake how do you convert an Int to an int?
18:21 moritz MadcapJake: in user-space code, you assign to an int-typed variable
18:21 jdv79 aka unbox.  assign to a var of that type?  idk really:)
18:21 moritz in the setting, nqp::unbox_i()
18:24 _28_ria joined #perl6
18:25 MadcapJake m: Array[int].new(0 xx 10).say # I wish this worked
18:25 camelia rakudo-moar dc7346: OUTPUT«Type check failed in assignment to ; expected int but got Int (0)␤  in block <unit> at /tmp/BX7tw7lAJK line 1␤␤»
18:26 timotimo m: Array[int].new(|(0 xx 10))
18:26 camelia rakudo-moar dc7346: OUTPUT«Type check failed in assignment to ; expected int but got Int (0)␤  in block <unit> at /tmp/M3IvCdkZu0 line 1␤␤»
18:26 timotimo mhm
18:26 timotimo m: Array[int].new(@(0 xx 10))
18:26 camelia rakudo-moar dc7346: OUTPUT«Type check failed in assignment to ; expected int but got Int (0)␤  in block <unit> at /tmp/EkOIjZ9X2q line 1␤␤»
18:26 timotimo m: Array[int].new((0 xx 10).list)
18:26 camelia rakudo-moar dc7346: OUTPUT«Type check failed in assignment to ; expected int but got Int (0)␤  in block <unit> at /tmp/NgLz5m5kkM line 1␤␤»
18:26 MadcapJake m: Array[Int].new(0 xx 10).say # timotimo, this works fine
18:26 camelia rakudo-moar dc7346: OUTPUT«[0 0 0 0 0 0 0 0 0 0]␤»
18:26 timotimo sucks :)
18:27 MadcapJake m: my int $zero = 0; Array[int].new($zero xx 10).say # why doesn't this work even?
18:27 camelia rakudo-moar dc7346: OUTPUT«Type check failed in assignment to ; expected int but got Int (0)␤  in block <unit> at /tmp/k_GOLXd04O line 1␤␤»
18:28 psch m: use nqp; my int $zero = 0; say nqp::istype(($zero xx 10)[0], int)
18:28 timotimo m: (Array[int].new() = 0 xx 10).perl.say
18:28 camelia rakudo-moar dc7346: OUTPUT«0␤»
18:28 camelia rakudo-moar dc7346: OUTPUT«Type check failed in assignment to ; expected int but got Int (0)␤  in block <unit> at /tmp/cHIEqGvZSf line 1␤␤»
18:28 timotimo m: ((my @foo := Array[int].new()) = 0 xx 10).perl.say
18:28 camelia rakudo-moar dc7346: OUTPUT«Type check failed in assignment to ; expected int but got Int (0)␤  in block <unit> at /tmp/AfHXuwQbWu line 1␤␤»
18:28 timotimo how do ...
18:29 MadcapJake m: my int $zero := 0; Array[int].new($zero xx 10).say
18:29 camelia rakudo-moar dc7346: OUTPUT«5===SORRY!5=== Error while compiling /tmp/mNu_GYYir1␤Cannot bind to natively typed variable '$zero'; use assignment instead␤at /tmp/mNu_GYYir1:1␤------> 3my int $zero := 07⏏5; Array[int].new($zero xx 10).say␤»
18:29 timotimo m: my int @a = 0 xx 10
18:29 camelia rakudo-moar dc7346: ( no output )
18:29 timotimo why not use this way of spelling it, btw?
18:30 sno joined #perl6
18:30 sortiz ZoffixW, that is a difficult question, there are lots of details involved.
18:30 ZoffixW Alright.
18:30 timotimo ZoffixW: it really depends mostly on the ABI in use on the platform you're on
18:30 MadcapJake timotimo: I wasn't assigned it I wanted to just use to to build a hash that has Array[int] values
18:31 MadcapJake s/assigned/assigning/
18:31 timotimo for example, usually the first few parameters are passed via register. if you don't have anything in your signature, those registers will just keep whatever value they had "the last time"
18:31 psch m: my %h = a => my int @, b => my int @; say %h.perl
18:31 camelia rakudo-moar dc7346: OUTPUT«{:a(array[int].new()), :b(array[int].new())}␤»
18:31 psch MadcapJake: that still works spelled like that
18:32 ZoffixW timotimo, so it's a bad idea not to match the signature? I'm writing a short article. I don't wanna say "Hey, look! No signature and it still works" if it's wrong :)
18:32 timotimo it's highly non-portable is what it is :)
18:32 timotimo i.e. on a different architecture, your stuff might blow up. who knows?
18:33 timotimo i expect the signature you give the function on the perl6 side also tells moar how many things to push onto the stack before invoking the function, so if you have too few, maybe the function ends up reading past the beginning of its stack segment or something?
18:33 timotimo and there's extra differences based on floating point values, because those go in special registers
18:34 ZoffixW I see. Thanks.
18:34 sortiz There are some details on calling conventions in dyncall's documentation.
18:35 MadcapJake psch: sweet thanks! Didn't know `my` would work there
18:35 timotimo you can even give each function a different calling convention via a trait on the perl6 side, if i remember correctly
18:36 psch MadcapJake: it's still scoped in the same scope as %h i think, but as it's anon you don't have to care, i suppose... :)
18:37 MadcapJake I'm so close, but still getting a type check error on the key now:
18:37 MadcapJake m: my $nodes = 5; my Array[int] %hash{int} = (my int $i = ++$) xx $nodes Z=> (my int @a = 0 xx $nodes) xx $nodes;
18:37 camelia rakudo-moar dc7346: OUTPUT«Type check failed in binding key; expected int but got Int (1)␤  in block <unit> at /tmp/dFDA6wTnO7 line 1␤␤»
18:37 jnthn Native arrays are spelt `array`, not `Array`
18:38 timotimo oooooooooooh!
18:38 * timotimo facepalms
18:38 timotimo that makes so much sense
18:38 jnthn Should probably have a better error to point that out though :)
18:38 mst perl6 should've been capitalisation insenstivie like nim
18:38 MadcapJake m: my $nodes = 5; my array[int] %hash{int} = (my int $i = ++$) xx $nodes Z=> (my int @a = 0 xx $nodes) xx $nodes;
18:38 camelia rakudo-moar dc7346: OUTPUT«Type check failed in binding key; expected int but got Int (1)␤  in block <unit> at /tmp/JldrU5JjsW line 1␤␤»
18:38 MadcapJake still same error
18:39 MadcapJake or you mean earlier when creating it?
18:39 MadcapJake ahh yeah that works but still, how can I get the key to work?
18:40 MadcapJake m: my $nodes = 5; my array[int] %hash{int} = (my int $i = ++$) xx $nodes Z=> array[int].new(0 xx $nodes) xx $nodes;
18:40 camelia rakudo-moar dc7346: OUTPUT«Type check failed in binding key; expected int but got Int (1)␤  in block <unit> at /tmp/mVlxLrsAZ1 line 1␤␤»
18:40 jnthn MadcapJake: We don't have natively typed hashes yet, sorry.
18:40 timotimo mst: you mean Nim, right?
18:40 mst timotimo: http://trout.me.uk/really.jpg
18:40 MadcapJake jnthn: oh alright, no prob, just like to try to go native whenever possible :)
18:41 jnthn They're a reasonable thing to want, and on the wish list... :)
18:41 timotimo trout.me.uk’s server DNS address could not be found.
18:41 timotimo :(
18:42 mst augh
18:42 mst yes, sorry, registration fsckup temporarily
18:42 mst must remember not to use the jpgs until that's fixed
18:44 timotimo understood
18:45 mst a button needs clicking once every five years or so, and mdk's third child arrived just in time to distract him from doing that yet
18:46 timotimo OK :)
18:47 spider-mario joined #perl6
18:49 * sortiz runs to pay an about to expire domain.
18:52 ZoffixW http://temp.perl6.party/really.jpg
18:54 timotimo d'aaw
18:57 mst ZoffixW++
19:01 MadcapJake My boston terrier does that head tilt thing all the time xD
19:05 timotimo http://mimi07.soup.io/post/683943882/Stiff-neck-Lets-exercise-a-little
19:08 timotimo http://suppe.tobold.cc/post/683826030/Image - a very good cat gif
19:10 * teatime suddenly yearns for a quote-words operator like <…> that interprets <foo> as ('foo') rather than 'foo'
19:10 TimToady you mean ('foo',) ?
19:11 ZoffixW m: dd [ 1, (<foo>,), 2 ]
19:11 camelia rakudo-moar dc7346: OUTPUT«[1, ("foo",), 2]␤»
19:11 timotimo m: say @(<foo>).perl
19:11 camelia rakudo-moar dc7346: OUTPUT«("foo",)␤»
19:11 ZoffixW Ohh
19:12 TimToady ('foo') is generally indistinguishable from 'foo', since by default parens are only for grouping
19:12 mst unlike in python where foreach will hate your face
19:12 teatime no, I was wanting a construct that would quote barewords like qw but that would make <a> and <a b> both return lists of strings.
19:12 teatime oh.
19:12 teatime then yes, I meant ('foo',)
19:13 TimToady in general, that's solved by treating single items as degenerate lists on the other end
19:14 lizmat m: say 1.elems
19:14 camelia rakudo-moar dc7346: OUTPUT«1␤»
19:14 lizmat m: say 42.elems
19:14 camelia rakudo-moar dc7346: OUTPUT«1␤»
19:14 teatime I'm being silly and contorting Perl in weird ways.
19:14 teatime and probably doing *that* in the wrong way.
19:15 TimToady in general, Perl is biased toward a tagmemics view of language, where you can use an X in a Y slot and get away with it much of the time
19:16 TimToady so, for instance $foo() is saying the $foo noun is going to be treated as a verb instead by context
19:17 TimToady likewise &foo is a noun that can be called, whereas foo is a verb that assumes it's being called even in the absence of any parens
19:18 TimToady we can't be quite as flexible in that regard as English, of course, where verbing weirds language
19:19 TimToady but that's because computers are still pretty darn stupid
19:21 TimToady Perl 5 tried to be a little too cute about turning verbs into methods for the indirect object form, and that's why Perl 6 requires a colon after the invocant to disambiguoate that form
19:22 diakopter o/ Ambigoates
19:22 khw joined #perl6
19:22 TimToady *guate even
19:24 mst TimToady: argh argh S_intuit_method argh *sob* argh argh *sob* *shiver*
19:24 * mst takes his copy of indirect.pm as a security blanket and hides under the desk until he stops remembering how he made Devel::Declare work
19:25 mst (first meeting TimToady from him saying "well that's a new way to mess with the perl compiler" over my shoulder was ... yeah ...)
19:25 TimToady so there's no need for an intuit_method in Perl 6 :)
19:25 dalek joined #perl6
19:26 mst for which I am glad, but I'm still never getting those SAN points back
19:26 * TimToady never had SAN points, so took the hits on his constitution
19:28 tony-o SAN ?
19:28 [Coke] totes my ambigoates.
19:28 [Coke] SANITY
19:28 [Coke] think rpg stats, but for call of c'thulhu
19:28 timotimo in allcaps
19:29 |2701 joined #perl6
19:33 vendethiel joined #perl6
19:36 TimToady .oO(describes US elections pretty well, low on sanity, about to take major hits on constitution...)
19:37 huf advanced forms of democracy might look surprisingly strange at first glance... :)
19:37 timotimo *groan*
19:37 * mst applauds
19:37 ufobat i fixed my tests! wheee :D
19:38 moritz huf: advanced or degenerate, that's the question
19:38 huf well advanced on the road to the next form
19:39 huf "this isnt even my final form"...
19:39 ufobat so its the perfect moment to open the wine leftovers from the gpw2016
19:45 ShimmerFairy joined #perl6
19:45 ShimmerFairy ohhhh man
19:45 yoleaux 1 Jan 2016 16:44Z <ZoffixWin> ShimmerFairy: I can certainly see the *reasons* for your frustration and the reasons for writing that blog post, but merely attacking the person responsible for your unpopular opinion does not make anything better. Your frustrated post could easily have been a post about a choice between poorly-tested code and a release without a key feature.
19:46 yoleaux 19 Jan 2016 19:21Z <[Coke]> ShimmerFairy: to see latest comment on RT #127108 that will give you a workaround so you can keep moving.
19:46 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=127108
19:46 ShimmerFairy I just thought I'd stop by to share this absolute gem of a bug I encountered last night: https://rt.perl.org/Ticket/Display.html?id=128128
19:47 ShimmerFairy Since apparently this is something I can expect to happen for as long as people don't install to the system. It's wonderful, I can't stop smiling over it :D
19:47 ZoffixW New blog post "Perl 6 NativeCall: Look, Ma! I'm a C Programmer!": http://blogs.perl.org/users/zoffix_znet/2016/05/perl-6-nativecall-look-ma-im-a-c-programmer-1.html
19:48 lizmat ShimmerFairy o/
19:48 ShimmerFairy \o
19:49 ShimmerFairy And I'm not lying: for some reason I'm genuinely happy and smiling that this bug would happen _again_ :)
19:49 lizmat glad to see you smiling  :-)
19:51 yqt joined #perl6
19:53 mst ShimmerFairy: oh, hey, you're back. excellent.
19:53 nine ShimmerFairy: welcome back!
19:53 moritz and I'm glad you think the fix is easy, because that means we can expect a patch from you, right?
19:54 * mst wonders if that's a 'rejoin to well volunteered' record time
19:54 ShimmerFairy not really, since I took myself out of the rakudo organization a while back. And besides, "remember people install to the system" isn't my lesson to learn :P .
19:55 diakopter ShimmerFairy: ohhh I didn't know you are lue
19:56 ShimmerFairy yep, c'est moi
19:56 mst ShimmerFairy: yeah, you ragequit just as I was setting up a toolchain team to try and fix this stuff and then blinked and one of the people I wanted for a founder member of the problem solving team had quit because of the problem :P
19:56 teatime ShimmerFairy: is that one windows?  I am curious why it would want to do mode 0777.
19:56 mst (note that's meant to read as a compliment as well as an 'augh' ;)
19:56 teatime *on
19:56 mst (you remember me, right? :)
19:57 ShimmerFairy teatime: it just says 777 because that's what Perl 6 wants; of course the usual umask would be applied to that, but the error doesn't do that
19:57 ShimmerFairy mst: of course I remember you :)
19:57 buharin joined #perl6
19:58 mst ShimmerFairy: good, that means you won't miss the compliment due to my sarcastic turn of phrase :D
20:03 masak ShimmerFairy: welcome back. I agree with lizmat -- nice to see you smiling over bug reports. :)
20:03 ShimmerFairy masak: though admittedly it's probably more of a smug-ish smile :P
20:05 * masak .oO( I *knew* it! ) :P
20:05 masak anyway, as long as Schadenfreude gets cranked out into bug reports... :)
20:06 tony-o nice
20:09 yqt joined #perl6
20:12 mr-foobar joined #perl6
20:13 cdg joined #perl6
20:14 dha joined #perl6
20:14 dha join #perl
20:14 dha bah.
20:15 masak dha: I hear #perl over att irc.perl.org is better.
20:15 masak at*
20:16 dha It's... different.
20:16 ShimmerFairy masak: well, I figured I shouldn't let my Schadenfreude be unproductive, hence the bug report :)
20:16 dha For instance, on the freenode version, you can talk about Perl. :-)
20:17 dha I have to give a talk on Perl resources for beginners next month, so I'm looking at freenode #perl for a change.
20:17 masak dha: heh :)
20:17 * masak .oO( don't let your Schadenfreude just sit around! put it to work! )
20:18 moritz SDD, Schadenfreude-Driven Development
20:18 dha So, silly question. Since Perl 6 uses a Perl 6 grammar to parse Perl 6, one could, in theory, change how the language works, right?
20:19 moritz dha: not just in theory
20:19 dha oh good. Where would one find information on how to actually do that, then?
20:20 moritz dha: you can define operators on the fly, which changes the language
20:20 moritz dha: also, look on https://modules.perl6.org/ for "slang"
20:20 dha Right.
20:20 moritz and look at how those modules do that
20:20 dha I wish to do something stupid.
20:20 leedo_ anyone else seeing this when installing rakudo? https://gist.github.com/leedo/bb83ded06dbcb8e7119287ccd6f7fb1f
20:22 ZoffixMobile joined #perl6
20:22 nine ShimmerFairy: looks like I'm getting close to making packaging modules work which for me is a blocker for using system installed rakudo. So your use case may get a boost somewhat soon :)
20:22 ZoffixMobile leedo_, yeah, I was getting it a couple of days ago when running rakudobrew triple nom master master.... though, I've no idea what it means :/
20:22 dha Hm... looks like it may require at least mild understanding of nqp. and roles.
20:23 * dha wonders how much effort he wants to put into doing something stupid.
20:23 ShimmerFairy nine: cool :) I just wish it were a more common thing in general, so anything to help with that would be good.
20:23 moritz dha: how invasive is your change going to be?
20:24 dha Well, I... want to change the statement terminator.
20:24 dha I wanted to port over my only CPAN module, actually.
20:24 nine ShimmerFairy: well my goal is to be able to deploy rpm packages on our servers.
20:25 moritz changing the statement terminator sounds like something that's very hairy in the grammar
20:25 ShimmerFairy nine: how about .ebuilds? :P
20:25 espadrine_ joined #perl6
20:25 moritz but at least you don't need to change the actions
20:25 nine ShimmerFairy: they face the same issues, so it doesn't matter all that much
20:26 dha https://metacpan.org/pod/Semi::Semicolons
20:26 ShimmerFairy I can help with any gentoo-related stuff if it comes up, since I'm on a gentoo system and have poked at helping out with gentoo before.
20:26 timotimo ShimmerFairy: i'm glad you're stopping by :)
20:26 nine ShimmerFairy: actually I'm a bit puzzled by your bug report since with literally every change I make I have in mind that we won't be able to write to the site repository unless we're installing
20:27 timotimo ShimmerFairy: any chance you could make supernova available? :3
20:27 timotimo i was really bugged i didn't clone it before you took it down :|
20:27 timotimo so was hoelzro
20:27 nine ShimmerFairy: but I guess nothing beats trying it out in practice
20:28 ShimmerFairy timotimo: sure, I can put it back later :)
20:29 ShimmerFairy I was planning on only stopping by for a brief second, but your darn kind community ways have suckered me back in :3
20:29 timotimo yay
20:29 * timotimo has dinner now
20:29 ShimmerFairy nine: yeah, I was surprised by that too.
20:29 timotimo bbiab
20:29 ShimmerFairy I have to go afk for a few hours now, but I'll be back :)
20:31 _dolmen_ joined #perl6
20:33 MadcapJake how can I .shift a seq?
20:33 moritz MadcapJake: no, a Seq is immutable
20:34 moritz m: say gather { take 42 }.^name
20:34 camelia rakudo-moar a31ab3: OUTPUT«Seq␤»
20:34 MadcapJake let me rephrase, how can you lazily shift an Array?
20:34 moritz m: say gather { take 42; take 23}[1..*]
20:34 camelia rakudo-moar a31ab3: OUTPUT«(23)␤»
20:35 MadcapJake i.e., turn a gather block into a lazy array that you can shift
20:35 MadcapJake is that possible?
20:36 moritz m: @a = gather { take 42; take 23; say 'reified';};
20:36 camelia rakudo-moar a31ab3: OUTPUT«5===SORRY!5=== Error while compiling /tmp/bwhXKmtNvm␤Variable '@a' is not declared␤at /tmp/bwhXKmtNvm:1␤------> 3<BOL>7⏏5@a = gather { take 42; take 23; say 'rei␤»
20:36 moritz m: my @a = gather { take 42; take 23; say 'reified';};
20:36 camelia rakudo-moar a31ab3: OUTPUT«reified␤»
20:36 moritz m: @a = lazy gather { take 42; take 23; say 'reified';};
20:36 camelia rakudo-moar a31ab3: OUTPUT«5===SORRY!5=== Error while compiling /tmp/nhB1AvGXCS␤Variable '@a' is not declared␤at /tmp/nhB1AvGXCS:1␤------> 3<BOL>7⏏5@a = lazy gather { take 42; take 23; say␤»
20:36 moritz m: my @a = lazy gather { take 42; take 23; say 'reified';};
20:36 camelia rakudo-moar a31ab3: ( no output )
20:36 moritz MadcapJake: ^^ like this
20:36 moritz m: my @a = lazy gather { take 42; take 23; say 'reified';}; @a.shift; say @a.perl
20:36 camelia rakudo-moar a31ab3: OUTPUT«Cannot .elems a lazy list␤  in block <unit> at /tmp/cZvEMwo85z line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/cZvEMwo85z line 1␤␤»
20:36 moritz m: my @a = lazy gather { take 42; take 23; say 'reified';}; @a.shift; say @a
20:36 camelia rakudo-moar a31ab3: OUTPUT«[...]␤»
20:37 moritz m: my @a = lazy gather { take 42; take 23; say 'reified';}; @a.shift; say @a[0];
20:37 camelia rakudo-moar a31ab3: OUTPUT«23␤»
20:38 teatime what does a union type look like in Perl6
20:40 psch m: my @a = lazy gather { take 42; take 23; say 'reified';}; say @a.shift while @a;
20:40 camelia rakudo-moar a31ab3: OUTPUT«42␤23␤reified␤»
20:41 psch m: my @a = lazy gather { take 42; take 23; say 'reified';}; say so @a.shift while @a;
20:41 camelia rakudo-moar a31ab3: OUTPUT«True␤True␤reified␤»
20:41 psch that's neat
20:42 psch m: my @a = lazy gather { take 1; take 2; say "you sure you need more elems?"; take 3; say "alright, that's definitely enough" }; say @a[0..1];
20:42 camelia rakudo-moar a31ab3: OUTPUT«(1 2)␤»
20:42 psch m: my @a = lazy gather { take 1; take 2; say "you sure you need more elems?"; take 3; say "alright, that's definitely enough" }; say @a[0..*];
20:42 camelia rakudo-moar a31ab3: OUTPUT«you sure you need more elems?␤alright, that's definitely enough␤(1 2 3)␤»
20:42 psch well, the slice does it differently... :)
20:46 MadcapJake moritz: thanks! I'm curious though, I thought gather was already lazy? Does `lazy` make it explicit?
20:46 dvinciguerra joined #perl6
20:49 MadcapJake m: (lazy gather { take 1 }).WHAT.say; (gather { take 1 }).WHAT.say
20:49 camelia rakudo-moar a31ab3: OUTPUT«(Seq)␤(Seq)␤»
20:49 lizmat the assignment of the (lazy) list is by default eager
20:49 lizmat the "lazy" prefix makes it lazy
20:49 MadcapJake m: (lazy gather { take 1 }).is-lazy.say; (gather { take 1 }).is-lazy.say
20:49 camelia rakudo-moar a31ab3: OUTPUT«True␤False␤»
20:50 lizmat I recall that before the GLR you would have to bind to get the lazy behaviour
20:50 lizmat prefix lazy seems less as a WAT to me  :-)
20:50 dogbert17 would be pleased if someone reviewed my attempt to document Pair.freeze. https://gist.github.com/dogbert17/81529690ccf4ded4f00be96faf999b0c
20:50 TimToady joined #perl6
20:51 MadcapJake m: (gather { loop { take ++$ } }).Array.[0] # is this equivalent to assignment?
20:51 camelia rakudo-moar a31ab3: OUTPUT«(timeout)»
20:51 dvinciguerra joined #perl6
20:52 sortiz lizmat, for the Array case, for the List case no. The difference is Array.pm/L53
20:52 psch m: &infix:<=>(my @a, gather { take 1; say "took first"; take 2 }); say @a[0];
20:52 camelia rakudo-moar a31ab3: OUTPUT«took first␤1␤»
20:52 psch m: &infix:<=>(my @a, lazy gather { take 1; say "took first"; take 2 }); say @a[0];
20:52 camelia rakudo-moar a31ab3: OUTPUT«1␤»
20:53 ZoffixWin left #perl6
20:53 psch m: (gather { take 1; say "took first"; take 2 })[0].say
20:53 camelia rakudo-moar a31ab3: OUTPUT«1␤»
20:54 psch m: lazy &infix:<=>(my @a, gather { take 1; say "took first"; take 2 }); say @a[0];
20:54 camelia rakudo-moar a31ab3: OUTPUT«took first␤1␤»
20:54 MadcapJake So let me see if I get this: a gather block is lazy in the sense that Seqs are lazily "collected".  However upon placing in an Array it (I'm assuming) checks is-lazy and if False, it eagerly collects all the values.  Is this accurate?
20:55 MadcapJake s/placing in/converting to/
20:56 lizmat MadcapJake: I think so, yes
20:56 sortiz MadcapJake, yes, Array explicitly need the Seq lazy == True to avoid instant reifycation.
20:57 MadcapJake alrighty thanks! (this is for that generator blog post I'm working on)
20:58 sortiz a gather/loop block by default crates a Seq with lazy = false.
20:59 MadcapJake sortiz: ok gotcha, but that lazy attribute doesn't really come into effect until you leave the Seq world, right? Because Seqs are inherently lazy.
20:59 sortiz Yep, And you can use 'lazy' to create a new Seq wrapping the original one with a lazy = True.
21:03 MadcapJake got it!
21:04 solarbunny joined #perl6
21:06 lizmat dogbert17: looks fine, but you have no example of Pair.freeze actually returning the value as well
21:07 lizmat dogbert17: perhaps use "$p.freeze.say" as an example
21:07 dogbert17 lizmat++ will fix
21:08 perlpilot dogbert17: also a little jargony with "deconts".  Maybe use more words there.   Maybe.
21:08 dogbert17 gist updated
21:09 dogbert17 perlpilot: any suggestions, I also think decont is a bit on the vague side
21:09 sortiz "Remove the Scalar container" ?
21:10 jnthn "removes the value from its Scalar container, making it unassignable" or so perhaps
21:10 perlpilot dogbert17: what those guys said  ;)
21:10 dogbert17 oh, lots of suggestions, many thanks
21:10 lizmat "Makes the value of the Pair read-only"
21:10 psch s/unassignable/semantically constant/ # maybe
21:10 lizmat the fact that it's deconting, is an implementation detail, I would think
21:10 dogbert17 what to choose, what to choose :)
21:10 jnthn Is .freeze in place?
21:11 perlpilot lizmat++
21:11 lizmat yes, and there is a test for it
21:11 ZoffixWin joined #perl6
21:11 jnthn Hm, curious choice :)
21:11 perlpilot dogbert17: what lizmat said.  That's the best answer IMHO
21:11 ZoffixWin With Inline::Perl5, there's no way to make the used code see command line args, is there?
21:11 * ZoffixWin is experimenting with using Mojolicious via Inline::Perl5
21:11 dogbert17 Ok, I'll go for lizmat's variant
21:11 lizmat actually, jnthn has a point also
21:12 lizmat "Makes the value of the Pair read-only by removing the value from its Scalar container"
21:12 lizmat jnthn in his perl 6 introduction course, makes a point of explaining Scalar containers and making sure people get that
21:13 jnthn It's worth grasping early since it explains quite a lot of things :)
21:13 lizmat so reinforcing that in the pod, is a good goal, I would think
21:14 lizmat BTW, dogbert17++  :-)
21:14 dogbert17 will fix :)
21:14 hi joined #perl6
21:14 hi hi
21:14 * masak briefly considers trolling #perl6 by innocently going "what's a Scalar container?"
21:14 masak hi, hi
21:14 perlpilot lizmat: if I read that (and didn't know anything), I'd immediately ask "why?"
21:15 jnthn masak: It's kinda like a fish with an open mouth
21:15 sortiz Well, one problem is that, by default, a Pair don't use a Scalar container for its value.
21:15 masak jnthn: so, a monad? :P
21:15 Guest76776 p6: say 2
21:15 camelia rakudo-moar a31ab3: OUTPUT«2␤»
21:15 Guest76776 p6: say 2;
21:15 camelia rakudo-moar a31ab3: OUTPUT«2␤»
21:15 masak p6: say 2;;
21:15 camelia rakudo-moar a31ab3: OUTPUT«2␤»
21:15 jnthn masak: :D
21:15 masak p6: say 2;;;
21:15 camelia rakudo-moar a31ab3: OUTPUT«2␤»
21:15 masak no, wait. a monad is more like a fish with a closed mouth. never mind.
21:16 jnthn That or a fish taco
21:16 perlpilot .oO( I've never heard of a monad fish )
21:16 jnthn Or was it a burrito...
21:17 * lizmat goes to bed hungry
21:17 masak :D
21:17 psch sortiz: i don't think that's completely true.  a Pair doesn't *add* a Scalar container for the value if there isn't one feels more right
21:18 * masak .oO( it's called Scalar because a fish... has... scales *mind blown* )
21:18 jnthn masak: It took you that long to spot the pun? :P
21:18 psch sortiz: which is the same behavior List has, which makes it feel right to me, fwiw
21:19 masak jnthn: I should have suspected something was fishy the moment you willingly mentioned fish.
21:19 masak jnthn: scale-aaah
21:20 timotimo i use fish as my shell
21:20 * psch .oO( so Perl has Scalars 'cause someone got scared of python..? )
21:20 sortiz psch, i talk in the sense that the user needs to use a container in the first place.
21:20 * psch is reaching
21:20 timotimo "scientists have described their fish-spider chimaera as 'the first web-scale animal'"
21:20 masak ba dum fish
21:21 psch maybe we need Pair.thaw vOv
21:21 perlpilot dogbert17: in any case, this discussion makes me think the docs for .freeze should have a pointer to other docs that talk about containers and values and such  :)
21:21 psch sortiz: right, just like with List you don't get conts if you don't put conts.  in contrast to e.g. Array, which voluntarily adds conts
21:22 dogbert17 perlpilot: will add a link to https://doc.perl6.org/language/containers#Scalar_containers
21:23 perlpilot dogbert17++
21:23 sortiz Yep, in Array and Hash you need yo opt-out, in the other cases you need yo opt-in. :-)
21:23 sortiz s/yo/to/
21:26 Hotkeys m: Blob.new(pick 1000, 0..255).elems.say
21:26 camelia rakudo-moar a31ab3: OUTPUT«256␤»
21:26 Hotkeys why is there a cap here
21:26 Hotkeys m: ("farts" x 100).encode("Latin-1").elems.say
21:26 camelia rakudo-moar a31ab3: OUTPUT«500␤»
21:27 Hotkeys but not in this instance
21:28 huggable joined #perl6
21:28 psch m: Blob.new(roll 1000, 0..255).elems.say
21:28 camelia rakudo-moar a31ab3: OUTPUT«1000␤»
21:28 psch Hotkeys: pick is "select without putting back"
21:28 Hotkeys ah
21:28 Hotkeys do I want roll
21:28 psch Hotkeys: i don't know :)
21:29 Hotkeys m: Blob.new(roll 1000, 0..255).elems.say
21:29 camelia rakudo-moar a31ab3: OUTPUT«1000␤»
21:29 Hotkeys cool
21:29 Hotkeys thanks psch
21:29 dalek doc: ee43bb8 | (Jan-Olof Hendig)++ | doc/Type/Pair.pod:
21:29 dalek doc: Added some documentation for the 'freeze' method. #perl6++
21:29 dalek doc: review: https://github.com/perl6/doc/commit/ee43bb8657
21:30 perlpilot Hotkeys: the number of elements conveniently being the same size as the range should have given you a clue that something wasn't quite right in your understanding ;)
21:30 perlpilot m: Blob.new(pick 1000, 15..45).elems.say;   # I suppose this would have been more obvious
21:30 camelia rakudo-moar a31ab3: OUTPUT«31␤»
21:30 Hotkeys the number of elements being 2^8 made me think it was some kind of limit
21:31 Hotkeys i didn't really relate it to me also using 2^8 in my pick :p
21:33 dha Hm... DBIish still hates me.
21:34 perlpilot If .freeze decontainerizes, then presumably someone (other than psch) will want .thaw to containerize   ... What will the P6 version of Storable use?
21:34 AlexDaniel joined #perl6
21:34 AlexDaniel dogbert17++ # for doc improvements
21:34 yoleaux 10:10Z <ZoffixWin> AlexDaniel: you're right, with -O3 register doesn't matter and the whole thing goes down to 0m2.284s
21:35 AlexDaniel ZoffixWin: great :)
21:35 ZoffixWin :)
21:35 dha Dammit, I hate this senility. How do I get around Task::Star bailing out on DBIish?
21:35 masak 'night, #perl6
21:35 * dha knows he's done this before...
21:35 ZoffixWin dha, don't install it? :) Fix DBIish? :)
21:35 dha night masak
21:35 ZoffixWin masak, night
21:35 perlpilot renaming .freeze to .decont will also allow for .cont and not conflict with other commonish usages of .freeze/.thaw
21:35 perlpilot g'night masak
21:35 ZoffixWin dha, --force ?
21:36 ZoffixWin dha, what's the error message(s)? It should be installing fine
21:36 dha ZoffixWin - I'm happy not to install it. I think Task::Star does not agree with that plan.
21:36 tony-o perlpilot: if perl6 is supposed to be englishy then it makes sense to words for all kinds of things they were never meant for
21:36 tony-o to use words*
21:37 ZoffixWin dha, I think --force will work fine. panda --force install Task::Star; zef --force install Task::Star
21:37 dha There's a LOT of errors.
21:37 ZoffixWin pastebin them
21:38 dha yep.
21:38 TEttinger joined #perl6
21:40 khw joined #perl6
21:40 dha http://pastebin.com/fVCG3ATW
21:40 pmurias_ joined #perl6
21:40 ZoffixWin 0.o
21:41 dha Yes.
21:41 ZoffixWin does rerunning install DBIish show the same errors?
21:41 ZoffixWin I vaguely remember Basic failing for me, but succeeding on a re-try
21:42 dha I won't swear it's *exactly* the same errors, but it sure *looks* the same.
21:43 ZoffixWin *shrug* Probably worth reporting on the DBIish repo. I saw a few commits go in recently. Maybe they broke something.
21:43 dha ok.
21:44 AlexDaniel ZoffixWin: “I wonder when computers will be able to take -O10 to figure out that for (x = 2; x < 2e9; x++); can be optimized into an assignment XD” – don't they do it already?
21:44 AlexDaniel ZoffixWin: maybe not by default, and not with huge numbers like this, but
21:44 ZoffixWin Not when I tried it at least :)
21:45 AlexDaniel ZoffixWin: try -funroll-loops
21:45 AlexDaniel ZoffixWin: or even -funroll-all-loops
21:45 AlexDaniel once unrolled, I think that it should be able to figure it out
21:45 ZoffixWin AlexDaniel, takes same amount of time ~2seconds
21:45 timotimo that'll unroll to quite a big piece of code
21:46 AlexDaniel ZoffixWin: try smaller number
21:46 ZoffixWin AlexDaniel, smaller number where?
21:46 AlexDaniel ZoffixWin: < 2e9 is a bit too much :)
21:47 ZoffixWin Well, without it, the code executes too fast anyway
21:47 ZoffixWin So you can't even tell if -funroll-loops does anything.
21:47 AlexDaniel run it 2e9 times instead
21:47 * ZoffixWin can't be bothered
21:51 AlexDaniel timotimo: “if you didn't actually want it to loop, you would have written the assignment” – the question was when compilers will get smarter than stupid human beings, so your remark does not apply here :)
21:51 timotimo :D
21:52 ZoffixWin Well, and I didn't mention it at the time, but there are cases where I--a human--would want to write a loop, which a compiler should optimize. Like raising into power.
21:53 ZoffixWin Hexchat-- # breaks support for windows alt+num pad sequences
21:53 jast joined #perl6
21:53 timotimo gtk, eh? :(
21:53 timotimo maybe you just have to right-click into the input field and change the input method
21:53 AlexDaniel timotimo: eh?
21:54 ZoffixWin Well, it's at System(Simple)... I've no idea what else would give me alt sequences if not system :)
21:55 AlexDaniel just as a side note: none of the Qt apps work properly with custom xkb keyboard layouts, but gtk apps are fine and dandy
21:56 timotimo neo2 on windows is a nightmare with java programs (especially intellij) and qt programs (in particular qtcreator)
21:56 timotimo none of them seem to understand the extra arrow keys
21:56 AlexDaniel yea, that kind of thing
21:57 AlexDaniel though my arrows work fine everywhere, it is combinations like ctrl+backspace that are not working
21:59 AlexDaniel (not the regular ctrl+backspace, but altgr-ed custom thingy)
22:05 jamesneko joined #perl6
22:14 dha Huh. Now panda is telling me that p6doc is a "Possibly ambiguous module name"
22:16 dha The problem with an software tool called "panda" is that, if you say "I want to beat panda to death with a baseball bat", people think you're talking about  doing that to an actual panda. Which I think would upset people.
22:17 ZoffixWin Try zef
22:17 ZoffixWin modules.perl6.org/repo/zef
22:17 sortiz dha, Seems that  DBIish's SQLite driver detection is failing on OS X
22:17 kid51 joined #perl6
22:17 dha sortiz -  ah. I guess that would be a problem.
22:17 dha irony: using panda to install zef.
22:18 ZoffixWin dha, you don't have to :) You can download zip
22:18 dha yeah, but I already did it. I enjoy the irony.
22:19 dha zef seems slower than panda. For whatever that's worth (probably not much).
22:20 dogbert17 hmm, the documentation changes have not shown up, how can I see if something has gone wrong with the build?
22:20 ZoffixWin dha, yeah, it's a lot slower.
22:20 dha And... zef failed to install p6doc.
22:20 ZoffixWin :(
22:21 tadzik try redpanda now :P
22:21 tadzik App::redpanda
22:21 timotimo i still have no clue what the difference between panda and redpanda is supposed to be
22:22 sortiz The color? ;-)
22:22 tadzik redpanda is cpanm of panda
22:22 tadzik it's not trying to do all the things
22:22 tadzik it just installs stuff
22:22 tadzik also, I had no tuits to actually modernize panda itseluf
22:22 ZoffixWin neat
22:23 tadzik to the point of actually maintaining the features
22:23 cpage_ joined #perl6
22:26 dha Hm. redpanda says it successfully installed p6doc, but my system disbelieves it.
22:26 tony-o what's the reason for failing with zef, dha ?
22:26 dha good question let me look for that...
22:29 dha oh damn. I managed to install p6doc by downloading it and installing from the local directory. So I probably can't tell you why zef failed. :-/
22:29 timotimo ZoffixWin: you could have made the parameters optional for the cdio functions and invoking would have been simpler :)
22:29 dha sorry. :-(
22:29 tony-o interesting
22:30 tony-o running the install twice made it work on osx
22:30 dha oh? I didn't try it twice. :-)
22:30 ZoffixWin timotimo, that occurred to me when I was re-reading an already-posted post, but I was too lazy to change it
22:30 ZoffixWin timotimo, maybe I should
22:30 timotimo :)
22:30 tony-o i also can't 'use JSON::Fast'  on OSX, even though it's definitely installed
22:30 dha And now I have to go. Bah.
22:31 dha Later all, thanks for the suggestions.
22:34 ZoffixWin Hm, I get 'Cannot unbox a type object' if I specify Str = Str in the signature
22:35 timotimo no need to Str = Str
22:35 timotimo just Str $foo?
22:35 timotimo the default value is the type object already
22:35 ZoffixWin Same error
22:35 timotimo huh
22:35 timotimo that's weird. where does the error occur? (--ll-exception)
22:36 timotimo when you define it, or when you call it?
22:36 ZoffixWin Thought it actually happens on the call to close tray, that has sig close-tray(Str $x?, int32 = 0)
22:36 ZoffixWin open-tray works fine it seems
22:36 ZoffixWin Oh
22:37 ZoffixWin Nope... I thought naming, like, int32 $y = 0 would help, but same error
22:38 ZoffixWin --ll-exception: https://gist.github.com/zoffixznet/3c85f6cff44e7717fa5ee26bcb1c727c
22:38 sortiz ZoffixWin, Are you talking of the signature of a native sub, right?
22:38 ZoffixWin Yeah
22:38 ZoffixWin (code is in the gist above)
22:39 tony-o ZoffixWin: how does perl know which version of those to call?
22:39 ZoffixWin tony-o, "those"? They're different named subs. The signature isn't the only difference.
22:39 tony-o oh oops
22:39 ZoffixWin :)
22:40 tony-o guess it's time to go home
22:40 sortiz I see, in native subs an "optional" argument isn't permitted.
22:40 ZoffixWin hehe
22:40 tony-o or back to the hotel at least
22:40 ZoffixWin Good. Then I don't have to change my article \o/
22:48 psch m: sub f($x?, Str = "") { say $x }; f()
22:48 camelia rakudo-moar bffc3a: OUTPUT«(Any)␤»
22:48 psch that feels *really* confusing to me
22:49 psch i mean, it does make sense thinking about it for a second
22:49 psch but still, on first glance i was stumped :P
22:50 psch but yeah, i suppose it comes down to what sortiz++ says.  don't do "$x?" but do "$x = Str" instead
22:50 sortiz In fact in native signatures the only important (and valid) thing are the types and arity. For example, you don't need to declare variables.
22:53 ZoffixWin psch, but $x = Str doesn't work either (same error).
22:53 ZoffixWin Which seems more like an NIY than a technical limitation.
22:54 psch ZoffixWin: oh.  yeah, that's my bad.  i mean, the error says it can't unbox a type object, so defaulting to a type object is obviously nonsense... :)
22:54 psch ZoffixWin: does "$x = ''" work?
22:54 ZoffixWin psch, but it works if I declare it as foo(Str) and then call it as foo Str;
22:55 ZoffixWin psch, same error.
22:55 psch huh
22:55 ZoffixWin psch, and open-tray(Str?) works fine it seems. I think the issue is with int32 $x = 0; actually
22:55 psch ZoffixWin: but 0 is not a type object..?
22:56 ZoffixWin ¯\_(ツ)_/¯
22:56 psch ZoffixWin: in any case, this seems way to far into NC territory for my knowledge to be meaningful... :)
22:57 ZoffixWin wtf
22:57 ZoffixWin https://gist.github.com/zoffixznet/a03a6ef355e5eab2f4a01d8ba12cd3e9
22:58 ZoffixWin If I remove = 0 from signature of close-tray, it "works". But with it, I get "never work with this signature" :S
22:58 ZoffixWin (I saw "works", because on this box my tray isn't opening even with original code that was working on the box I wrote that code on first, but at least I get no errors)
22:58 ZoffixWin s/saw/say/;
22:59 sufrostico joined #perl6
23:02 * timotimo doesn't have optical drives nearby to test
23:02 sortiz ZoffixWin, for close-try the valid signature is (Str, int32), forget about defaults and optionals, if you need that, wrote a normal perl6 wrapper sub.
23:04 sortiz The signature at the C level is static, so dyncall constructs an immutable callsite for it, and use that.
23:07 ZoffixWin Alright
23:07 ZoffixWin Thanks.
23:12 john51_ joined #perl6
23:13 ShimmerFairy hey timotimo, wanted this? :)    https://github.com/ShimmerFairy/SUPERNOVA
23:14 perigrin_ joined #perl6
23:15 Score_Under joined #perl6
23:15 * timotimo ninja-forks
23:15 Amnez777 joined #perl6
23:15 nowan joined #perl6
23:17 timotimo much appreciated :)
23:19 ShimmerFairy :)
23:25 skink joined #perl6
23:29 jack_rabbit joined #perl6
23:32 mr-foobar joined #perl6
23:39 gfldex m: my @perm = <a b c>.combinations(2)».permutations; dd [ @perm.map(*.Slip) ]
23:39 camelia rakudo-moar bffc3a: OUTPUT«[("a", "b"), ("b", "a"), ("a", "c"), ("c", "a"), ("b", "c"), ("c", "b")]␤»
23:47 cdg joined #perl6
23:50 psch m: my @perm = map <a b c>.combinations(2): *.permutations.Slip; dd @perm
23:50 camelia rakudo-moar bffc3a: OUTPUT«Array @perm = [("a", "b"), ("b", "a"), ("a", "c"), ("c", "a"), ("b", "c"), ("c", "b")]␤»
23:50 psch ...not quite sure that's neater vOv
23:51 psch why does the type show up there anyway..?
23:55 timotimo i need help with something
23:55 timotimo https://gist.github.com/timo/7babb36055768fe04eeb - when i put "say energies(@bodies) into the loop, i get about the same value over and over again, but when it's only after the loop, it gets a completely different value
23:55 timotimo what the f is up with that?

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

Perl 6 | Reference Documentation | Rakudo